text:
Synthesis failed for AndroidEnterprise

Hello! Autosynth couldn't regenerate AndroidEnterprise. :broken_heart:
Here's the output from running synth.py:
2020-05-09 05:04:09 [INFO] logs will be written to: /tmpfs/src/github/synthtool/logs/googleapis/elixir-google-api
2020-05-09 05:04:09,627 autosynth > logs will be written to: /tmpfs/src/github/synthtool/logs/googleapis/elixir-google-api
Switched to branch 'autosynth-androidenterprise'
2020-05-09 05:04:11 [INFO] Running synthtool
2020-05-09 05:04:11,536 autosynth > Running synthtool
2020-05-09 05:04:11 [INFO] ['/tmpfs/src/github/synthtool/env/bin/python3', '-m', 'synthtool', '--metadata', 'clients/android_enterprise/synth.metadata', 'synth.py', '--']
2020-05-09 05:04:11,536 autosynth > ['/tmpfs/src/github/synthtool/env/bin/python3', '-m', 'synthtool', '--metadata', 'clients/android_enterprise/synth.metadata', 'synth.py', '--']
2020-05-09 05:04:11,746 synthtool > Executing /home/kbuilder/.cache/synthtool/elixir-google-api/synth.py.
On branch autosynth-androidenterprise
nothing to commit, working tree clean
2020-05-09 05:04:11,909 synthtool > Cloning https://github.com/googleapis/elixir-google-api.git.
2020-05-09 05:04:12,832 synthtool > Running: docker run --rm -v/home/kbuilder/.cache/synthtool/elixir-google-api:/workspace -v/var/run/docker.sock:/var/run/docker.sock -e USER_GROUP=1000:1000 -w /workspace gcr.io/cloud-devrel-public-resources/elixir19 scripts/generate_client.sh AndroidEnterprise
2020-05-09 05:04:17,621 synthtool > No files in sources /home/kbuilder/.cache/synthtool/elixir-google-api/clients were copied. Does the source contain files?
Traceback (most recent call last):
  File "/home/kbuilder/.pyenv/versions/3.6.9/lib/python3.6/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/home/kbuilder/.pyenv/versions/3.6.9/lib/python3.6/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/tmpfs/src/github/synthtool/synthtool/__main__.py", line 102, in <module>
    main()
  File "/tmpfs/src/github/synthtool/env/lib/python3.6/site-packages/click/core.py", line 829, in __call__
    return self.main(*args, **kwargs)
  File "/tmpfs/src/github/synthtool/env/lib/python3.6/site-packages/click/core.py", line 782, in main
    rv = self.invoke(ctx)
  File "/tmpfs/src/github/synthtool/env/lib/python3.6/site-packages/click/core.py", line 1066, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/tmpfs/src/github/synthtool/env/lib/python3.6/site-packages/click/core.py", line 610, in invoke
    return callback(*args, **kwargs)
  File "/tmpfs/src/github/synthtool/synthtool/__main__.py", line 94, in main
    spec.loader.exec_module(synth_module)  # type: ignore
  File "/tmpfs/src/github/synthtool/synthtool/metadata.py", line 180, in __exit__
    write(self.metadata_file_path)
  File "/tmpfs/src/github/synthtool/synthtool/metadata.py", line 112, in write
    with open(outfile, "w") as fh:
FileNotFoundError: [Errno 2] No such file or directory: 'clients/android_enterprise/synth.metadata'
2020-05-09 05:04:17 [ERROR] Synthesis failed
2020-05-09 05:04:17,653 autosynth > Synthesis failed
Traceback (most recent call last):
  File "/home/kbuilder/.pyenv/versions/3.6.9/lib/python3.6/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/home/kbuilder/.pyenv/versions/3.6.9/lib/python3.6/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/tmpfs/src/github/synthtool/autosynth/synth.py", line 599, in <module>
    main()
  File "/tmpfs/src/github/synthtool/autosynth/synth.py", line 471, in main
    return _inner_main(temp_dir)
  File "/tmpfs/src/github/synthtool/autosynth/synth.py", line 549, in _inner_main
    ).synthesize(base_synth_log_path)
  File "/tmpfs/src/github/synthtool/autosynth/synthesizer.py", line 118, in synthesize
    synth_proc.check_returncode()  # Raise an exception.
  File "/home/kbuilder/.pyenv/versions/3.6.9/lib/python3.6/subprocess.py", line 389, in check_returncode
    self.stderr)
subprocess.CalledProcessError: Command '['/tmpfs/src/github/synthtool/env/bin/python3', '-m', 'synthtool', '--metadata', 'clients/android_enterprise/synth.metadata', 'synth.py', '--', 'AndroidEnterprise']' returned non-zero exit status 1.

Google internal developers can see the full log here.

Autosynth is still having trouble generating AndroidEnterprise. :sob:
Here's the output from running synth.py:
2020-05-10 05:04:05 [INFO] logs will be written to: /tmpfs/src/github/synthtool/logs/googleapis/elixir-google-api
2020-05-10 05:04:05,356 autosynth > logs will be written to: /tmpfs/src/github/synthtool/logs/googleapis/elixir-google-api
Switched to branch 'autosynth-androidenterprise'
2020-05-10 05:04:07 [INFO] Running synthtool
2020-05-10 05:04:07,049 autosynth > Running synthtool
2020-05-10 05:04:07 [INFO] ['/tmpfs/src/github/synthtool/env/bin/python3', '-m', 'synthtool', '--metadata', 'clients/android_enterprise/synth.metadata', 'synth.py', '--']
2020-05-10 05:04:07,049 autosynth > ['/tmpfs/src/github/synthtool/env/bin/python3', '-m', 'synthtool', '--metadata', 'clients/android_enterprise/synth.metadata', 'synth.py', '--']
2020-05-10 05:04:07,270 synthtool > Executing /home/kbuilder/.cache/synthtool/elixir-google-api/synth.py.
On branch autosynth-androidenterprise
nothing to commit, working tree clean
2020-05-10 05:04:07,588 synthtool > Cloning https://github.com/googleapis/elixir-google-api.git.
2020-05-10 05:04:08,018 synthtool > Running: docker run --rm -v/home/kbuilder/.cache/synthtool/elixir-google-api:/workspace -v/var/run/docker.sock:/var/run/docker.sock -e USER_GROUP=1000:1000 -w /workspace gcr.io/cloud-devrel-public-resources/elixir19 scripts/generate_client.sh AndroidEnterprise
2020-05-10 05:04:11,616 synthtool > No files in sources /home/kbuilder/.cache/synthtool/elixir-google-api/clients were copied. Does the source contain files?
Traceback (most recent call last):
  File "/home/kbuilder/.pyenv/versions/3.6.9/lib/python3.6/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/home/kbuilder/.pyenv/versions/3.6.9/lib/python3.6/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/tmpfs/src/github/synthtool/synthtool/__main__.py", line 102, in <module>
    main()
  File "/tmpfs/src/github/synthtool/env/lib/python3.6/site-packages/click/core.py", line 829, in __call__
    return self.main(*args, **kwargs)
  File "/tmpfs/src/github/synthtool/env/lib/python3.6/site-packages/click/core.py", line 782, in main
    rv = self.invoke(ctx)
  File "/tmpfs/src/github/synthtool/env/lib/python3.6/site-packages/click/core.py", line 1066, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/tmpfs/src/github/synthtool/env/lib/python3.6/site-packages/click/core.py", line 610, in invoke
    return callback(*args, **kwargs)
  File "/tmpfs/src/github/synthtool/synthtool/__main__.py", line 94, in main
    spec.loader.exec_module(synth_module)  # type: ignore
  File "/tmpfs/src/github/synthtool/synthtool/metadata.py", line 180, in __exit__
    write(self.metadata_file_path)
  File "/tmpfs/src/github/synthtool/synthtool/metadata.py", line 112, in write
    with open(outfile, "w") as fh:
FileNotFoundError: [Errno 2] No such file or directory: 'clients/android_enterprise/synth.metadata'
2020-05-10 05:04:11 [ERROR] Synthesis failed
2020-05-10 05:04:11,640 autosynth > Synthesis failed
Traceback (most recent call last):
  File "/home/kbuilder/.pyenv/versions/3.6.9/lib/python3.6/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/home/kbuilder/.pyenv/versions/3.6.9/lib/python3.6/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/tmpfs/src/github/synthtool/autosynth/synth.py", line 599, in <module>
    main()
  File "/tmpfs/src/github/synthtool/autosynth/synth.py", line 471, in main
    return _inner_main(temp_dir)
  File "/tmpfs/src/github/synthtool/autosynth/synth.py", line 549, in _inner_main
    ).synthesize(base_synth_log_path)
  File "/tmpfs/src/github/synthtool/autosynth/synthesizer.py", line 118, in synthesize
    synth_proc.check_returncode()  # Raise an exception.
  File "/home/kbuilder/.pyenv/versions/3.6.9/lib/python3.6/subprocess.py", line 389, in check_returncode
    self.stderr)
subprocess.CalledProcessError: Command '['/tmpfs/src/github/synthtool/env/bin/python3', '-m', 'synthtool', '--metadata', 'clients/android_enterprise/synth.metadata', 'synth.py', '--', 'AndroidEnterprise']' returned non-zero exit status 1.

Google internal developers can see the full log here.

Autosynth is still having trouble generating AndroidEnterprise. :sob:
Here's the output from running synth.py:
2020-05-11 05:03:31 [INFO] logs will be written to: /tmpfs/src/github/synthtool/logs/googleapis/elixir-google-api
2020-05-11 05:03:31,073 autosynth > logs will be written to: /tmpfs/src/github/synthtool/logs/googleapis/elixir-google-api
Switched to branch 'autosynth-androidenterprise'
2020-05-11 05:03:32 [INFO] Running synthtool
2020-05-11 05:03:32,505 autosynth > Running synthtool
2020-05-11 05:03:32 [INFO] ['/tmpfs/src/github/synthtool/env/bin/python3', '-m', 'synthtool', '--metadata', 'clients/android_enterprise/synth.metadata', 'synth.py', '--']
2020-05-11 05:03:32,505 autosynth > ['/tmpfs/src/github/synthtool/env/bin/python3', '-m', 'synthtool', '--metadata', 'clients/android_enterprise/synth.metadata', 'synth.py', '--']
2020-05-11 05:03:32,690 synthtool > Executing /home/kbuilder/.cache/synthtool/elixir-google-api/synth.py.
On branch autosynth-androidenterprise
nothing to commit, working tree clean
2020-05-11 05:03:32,831 synthtool > Cloning https://github.com/googleapis/elixir-google-api.git.
2020-05-11 05:03:33,450 synthtool > Running: docker run --rm -v/home/kbuilder/.cache/synthtool/elixir-google-api:/workspace -v/var/run/docker.sock:/var/run/docker.sock -e USER_GROUP=1000:1000 -w /workspace gcr.io/cloud-devrel-public-resources/elixir19 scripts/generate_client.sh AndroidEnterprise
2020-05-11 05:03:36,859 synthtool > No files in sources /home/kbuilder/.cache/synthtool/elixir-google-api/clients were copied. Does the source contain files?
Traceback (most recent call last):
  File "/home/kbuilder/.pyenv/versions/3.6.9/lib/python3.6/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/home/kbuilder/.pyenv/versions/3.6.9/lib/python3.6/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/tmpfs/src/github/synthtool/synthtool/__main__.py", line 102, in <module>
    main()
  File "/tmpfs/src/github/synthtool/env/lib/python3.6/site-packages/click/core.py", line 829, in __call__
    return self.main(*args, **kwargs)
  File "/tmpfs/src/github/synthtool/env/lib/python3.6/site-packages/click/core.py", line 782, in main
    rv = self.invoke(ctx)
  File "/tmpfs/src/github/synthtool/env/lib/python3.6/site-packages/click/core.py", line 1066, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/tmpfs/src/github/synthtool/env/lib/python3.6/site-packages/click/core.py", line 610, in invoke
    return callback(*args, **kwargs)
  File "/tmpfs/src/github/synthtool/synthtool/__main__.py", line 94, in main
    spec.loader.exec_module(synth_module)  # type: ignore
  File "/tmpfs/src/github/synthtool/synthtool/metadata.py", line 180, in __exit__
    write(self.metadata_file_path)
  File "/tmpfs/src/github/synthtool/synthtool/metadata.py", line 112, in write
    with open(outfile, "w") as fh:
FileNotFoundError: [Errno 2] No such file or directory: 'clients/android_enterprise/synth.metadata'
2020-05-11 05:03:36 [ERROR] Synthesis failed
2020-05-11 05:03:36,883 autosynth > Synthesis failed
Traceback (most recent call last):
  File "/home/kbuilder/.pyenv/versions/3.6.9/lib/python3.6/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/home/kbuilder/.pyenv/versions/3.6.9/lib/python3.6/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/tmpfs/src/github/synthtool/autosynth/synth.py", line 599, in <module>
    main()
  File "/tmpfs/src/github/synthtool/autosynth/synth.py", line 471, in main
    return _inner_main(temp_dir)
  File "/tmpfs/src/github/synthtool/autosynth/synth.py", line 549, in _inner_main
    ).synthesize(base_synth_log_path)
  File "/tmpfs/src/github/synthtool/autosynth/synthesizer.py", line 118, in synthesize
    synth_proc.check_returncode()  # Raise an exception.
  File "/home/kbuilder/.pyenv/versions/3.6.9/lib/python3.6/subprocess.py", line 389, in check_returncode
    self.stderr)
subprocess.CalledProcessError: Command '['/tmpfs/src/github/synthtool/env/bin/python3', '-m', 'synthtool', '--metadata', 'clients/android_enterprise/synth.metadata', 'synth.py', '--', 'AndroidEnterprise']' returned non-zero exit status 1.

Google internal developers can see the full log here.

Autosynth is still having trouble generating AndroidEnterprise. :sob:
Here's the output from running synth.py:
2020-05-11 15:04:33 [INFO] logs will be written to: /tmpfs/src/github/synthtool/logs/googleapis/elixir-google-api
2020-05-11 15:04:33,205 autosynth > logs will be written to: /tmpfs/src/github/synthtool/logs/googleapis/elixir-google-api
Switched to branch 'autosynth-androidenterprise'
2020-05-11 15:04:34 [INFO] Running synthtool
2020-05-11 15:04:34,773 autosynth > Running synthtool
2020-05-11 15:04:34 [INFO] ['/tmpfs/src/github/synthtool/env/bin/python3', '-m', 'synthtool', '--metadata', 'clients/android_enterprise/synth.metadata', 'synth.py', '--']
2020-05-11 15:04:34,773 autosynth > ['/tmpfs/src/github/synthtool/env/bin/python3', '-m', 'synthtool', '--metadata', 'clients/android_enterprise/synth.metadata', 'synth.py', '--']
2020-05-11 15:04:34,985 synthtool > Executing /home/kbuilder/.cache/synthtool/elixir-google-api/synth.py.
On branch autosynth-androidenterprise
nothing to commit, working tree clean
2020-05-11 15:04:35,230 synthtool > Cloning https://github.com/googleapis/elixir-google-api.git.
2020-05-11 15:04:36,068 synthtool > Running: docker run --rm -v/home/kbuilder/.cache/synthtool/elixir-google-api:/workspace -v/var/run/docker.sock:/var/run/docker.sock -e USER_GROUP=1000:1000 -w /workspace gcr.io/cloud-devrel-public-resources/elixir19 scripts/generate_client.sh AndroidEnterprise
/workspace /workspace
The mix.lock file was generated with a newer version of Hex. Update your client by running `mix local.hex` to avoid losing data.
Resolving Hex dependencies...
Dependency resolution completed:
Unchanged:
  certifi 2.5.1
  google_api_discovery 0.7.0
  google_gax 0.3.2
  hackney 1.15.2
  idna 6.0.0
  jason 1.2.0
  metrics 1.0.1
  mime 1.3.1
  mimerl 1.2.0
  oauth2 0.9.4
  parse_trans 3.3.0
  poison 3.1.0
  ssl_verify_fun 1.1.5
  temp 0.4.7
  tesla 1.3.3
  unicode_util_compat 0.4.1
A new Hex version is available (0.20.1 < 0.20.5), please update with `mix local.hex`
All dependencies are up to date
The mix.lock file was generated with a newer version of Hex. Update your client by running `mix local.hex` to avoid losing data.

22:04:38.550 [info]  FETCHING: https://www.googleapis.com/discovery/v1/apis/androidenterprise/v1/rest

22:04:38.735 [info]  FOUND: https://www.googleapis.com/discovery/v1/apis/androidenterprise/v1/rest
Revision check: old=20200429, new=20200429, generating=true
Creating leading directories
Writing Administrator to clients/android_enterprise/lib/google_api/android_enterprise/v1/model/administrator.ex.
Writing AdministratorWebToken to clients/android_enterprise/lib/google_api/android_enterprise/v1/model/administrator_web_token.ex.
Writing AdministratorWebTokenSpec to clients/android_enterprise/lib/google_api/android_enterprise/v1/model/administrator_web_token_spec.ex.
Writing AdministratorWebTokenSpecManagedConfigurations to clients/android_enterprise/lib/google_api/android_enterprise/v1/model/administrator_web_token_spec_managed_configurations.ex.
Writing AdministratorWebTokenSpecPlaySearch to clients/android_enterprise/lib/google_api/android_enterprise/v1/model/administrator_web_token_spec_play_search.ex.
Writing AdministratorWebTokenSpecPrivateApps to clients/android_enterprise/lib/google_api/android_enterprise/v1/model/administrator_web_token_spec_private_apps.ex.
Writing AdministratorWebTokenSpecStoreBuilder to clients/android_enterprise/lib/google_api/android_enterprise/v1/model/administrator_web_token_spec_store_builder.ex.
Writing AdministratorWebTokenSpecWebApps to clients/android_enterprise/lib/google_api/android_enterprise/v1/model/administrator_web_token_spec_web_apps.ex.
Writing AppRestrictionsSchema to clients/android_enterprise/lib/google_api/android_enterprise/v1/model/app_restrictions_schema.ex.
Writing AppRestrictionsSchemaChangeEvent to clients/android_enterprise/lib/google_api/android_enterprise/v1/model/app_restrictions_schema_change_event.ex.
Writing AppRestrictionsSchemaRestriction to clients/android_enterprise/lib/google_api/android_enterprise/v1/model/app_restrictions_schema_restriction.ex.
Writing AppRestrictionsSchemaRestrictionRestrictionValue to clients/android_enterprise/lib/google_api/android_enterprise/v1/model/app_restrictions_schema_restriction_restriction_value.ex.
Writing AppState to clients/android_enterprise/lib/google_api/android_enterprise/v1/model/app_state.ex.
Writing AppUpdateEvent to clients/android_enterprise/lib/google_api/android_enterprise/v1/model/app_update_event.ex.
Writing AppVersion to clients/android_enterprise/lib/google_api/android_enterprise/v1/model/app_version.ex.
Writing ApprovalUrlInfo to clients/android_enterprise/lib/google_api/android_enterprise/v1/model/approval_url_info.ex.
Writing AuthenticationToken to clients/android_enterprise/lib/google_api/android_enterprise/v1/model/authentication_token.ex.
Writing AutoInstallConstraint to clients/android_enterprise/lib/google_api/android_enterprise/v1/model/auto_install_constraint.ex.
Writing AutoInstallPolicy to clients/android_enterprise/lib/google_api/android_enterprise/v1/model/auto_install_policy.ex.
Writing ConfigurationVariables to clients/android_enterprise/lib/google_api/android_enterprise/v1/model/configuration_variables.ex.
Writing Device to clients/android_enterprise/lib/google_api/android_enterprise/v1/model/device.ex.
Writing DeviceReport to clients/android_enterprise/lib/google_api/android_enterprise/v1/model/device_report.ex.
Writing DeviceReportUpdateEvent to clients/android_enterprise/lib/google_api/android_enterprise/v1/model/device_report_update_event.ex.
Writing DeviceState to clients/android_enterprise/lib/google_api/android_enterprise/v1/model/device_state.ex.
Writing DevicesListResponse to clients/android_enterprise/lib/google_api/android_enterprise/v1/model/devices_list_response.ex.
Writing Enterprise to clients/android_enterprise/lib/google_api/android_enterprise/v1/model/enterprise.ex.
Writing EnterpriseAccount to clients/android_enterprise/lib/google_api/android_enterprise/v1/model/enterprise_account.ex.
Writing EnterprisesListResponse to clients/android_enterprise/lib/google_api/android_enterprise/v1/model/enterprises_list_response.ex.
Writing EnterprisesSendTestPushNotificationResponse to clients/android_enterprise/lib/google_api/android_enterprise/v1/model/enterprises_send_test_push_notification_response.ex.
Writing Entitlement to clients/android_enterprise/lib/google_api/android_enterprise/v1/model/entitlement.ex.
Writing EntitlementsListResponse to clients/android_enterprise/lib/google_api/android_enterprise/v1/model/entitlements_list_response.ex.
Writing GroupLicense to clients/android_enterprise/lib/google_api/android_enterprise/v1/model/group_license.ex.
Writing GroupLicenseUsersListResponse to clients/android_enterprise/lib/google_api/android_enterprise/v1/model/group_license_users_list_response.ex.
Writing GroupLicensesListResponse to clients/android_enterprise/lib/google_api/android_enterprise/v1/model/group_licenses_list_response.ex.
Writing Install to clients/android_enterprise/lib/google_api/android_enterprise/v1/model/install.ex.
Writing InstallFailureEvent to clients/android_enterprise/lib/google_api/android_enterprise/v1/model/install_failure_event.ex.
Writing InstallsListResponse to clients/android_enterprise/lib/google_api/android_enterprise/v1/model/installs_list_response.ex.
Writing KeyedAppState to clients/android_enterprise/lib/google_api/android_enterprise/v1/model/keyed_app_state.ex.
Writing LocalizedText to clients/android_enterprise/lib/google_api/android_enterprise/v1/model/localized_text.ex.
Writing MaintenanceWindow to clients/android_enterprise/lib/google_api/android_enterprise/v1/model/maintenance_window.ex.
Writing ManagedConfiguration to clients/android_enterprise/lib/google_api/android_enterprise/v1/model/managed_configuration.ex.
Writing ManagedConfigurationsForDeviceListResponse to clients/android_enterprise/lib/google_api/android_enterprise/v1/model/managed_configurations_for_device_list_response.ex.
Writing ManagedConfigurationsForUserListResponse to clients/android_enterprise/lib/google_api/android_enterprise/v1/model/managed_configurations_for_user_list_response.ex.
Writing ManagedConfigurationsSettings to clients/android_enterprise/lib/google_api/android_enterprise/v1/model/managed_configurations_settings.ex.
Writing ManagedConfigurationsSettingsListResponse to clients/android_enterprise/lib/google_api/android_enterprise/v1/model/managed_configurations_settings_list_response.ex.
Writing ManagedProperty to clients/android_enterprise/lib/google_api/android_enterprise/v1/model/managed_property.ex.
Writing ManagedPropertyBundle to clients/android_enterprise/lib/google_api/android_enterprise/v1/model/managed_property_bundle.ex.
Writing NewDeviceEvent to clients/android_enterprise/lib/google_api/android_enterprise/v1/model/new_device_event.ex.
Writing NewPermissionsEvent to clients/android_enterprise/lib/google_api/android_enterprise/v1/model/new_permissions_event.ex.
Writing Notification to clients/android_enterprise/lib/google_api/android_enterprise/v1/model/notification.ex.
Writing NotificationSet to clients/android_enterprise/lib/google_api/android_enterprise/v1/model/notification_set.ex.
Writing PageInfo to clients/android_enterprise/lib/google_api/android_enterprise/v1/model/page_info.ex.
Writing Permission to clients/android_enterprise/lib/google_api/android_enterprise/v1/model/permission.ex.
Writing Policy to clients/android_enterprise/lib/google_api/android_enterprise/v1/model/policy.ex.
Writing Product to clients/android_enterprise/lib/google_api/android_enterprise/v1/model/product.ex.
Writing ProductApprovalEvent to clients/android_enterprise/lib/google_api/android_enterprise/v1/model/product_approval_event.ex.
Writing ProductAvailabilityChangeEvent to clients/android_enterprise/lib/google_api/android_enterprise/v1/model/product_availability_change_event.ex.
Writing ProductPermission to clients/android_enterprise/lib/google_api/android_enterprise/v1/model/product_permission.ex.
Writing ProductPermissions to clients/android_enterprise/lib/google_api/android_enterprise/v1/model/product_permissions.ex.
Writing ProductPolicy to clients/android_enterprise/lib/google_api/android_enterprise/v1/model/product_policy.ex.
Writing ProductSet to clients/android_enterprise/lib/google_api/android_enterprise/v1/model/product_set.ex.
Writing ProductSigningCertificate to clients/android_enterprise/lib/google_api/android_enterprise/v1/model/product_signing_certificate.ex.
Writing ProductVisibility to clients/android_enterprise/lib/google_api/android_enterprise/v1/model/product_visibility.ex.
Writing ProductsApproveRequest to clients/android_enterprise/lib/google_api/android_enterprise/v1/model/products_approve_request.ex.
Writing ProductsGenerateApprovalUrlResponse to clients/android_enterprise/lib/google_api/android_enterprise/v1/model/products_generate_approval_url_response.ex.
Writing ProductsListResponse to clients/android_enterprise/lib/google_api/android_enterprise/v1/model/products_list_response.ex.
Writing ServiceAccount to clients/android_enterprise/lib/google_api/android_enterprise/v1/model/service_account.ex.
Writing ServiceAccountKey to clients/android_enterprise/lib/google_api/android_enterprise/v1/model/service_account_key.ex.
Writing ServiceAccountKeysListResponse to clients/android_enterprise/lib/google_api/android_enterprise/v1/model/service_account_keys_list_response.ex.
Writing SignupInfo to clients/android_enterprise/lib/google_api/android_enterprise/v1/model/signup_info.ex.
Writing StoreCluster to clients/android_enterprise/lib/google_api/android_enterprise/v1/model/store_cluster.ex.
Writing StoreLayout to clients/android_enterprise/lib/google_api/android_enterprise/v1/model/store_layout.ex.
Writing StoreLayoutClustersListResponse to clients/android_enterprise/lib/google_api/android_enterprise/v1/model/store_layout_clusters_list_response.ex.
Writing StoreLayoutPagesListResponse to clients/android_enterprise/lib/google_api/android_enterprise/v1/model/store_layout_pages_list_response.ex.
Writing StorePage to clients/android_enterprise/lib/google_api/android_enterprise/v1/model/store_page.ex.
Writing TokenPagination to clients/android_enterprise/lib/google_api/android_enterprise/v1/model/token_pagination.ex.
Writing TrackInfo to clients/android_enterprise/lib/google_api/android_enterprise/v1/model/track_info.ex.
Writing User to clients/android_enterprise/lib/google_api/android_enterprise/v1/model/user.ex.
Writing UserToken to clients/android_enterprise/lib/google_api/android_enterprise/v1/model/user_token.ex.
Writing UsersListResponse to clients/android_enterprise/lib/google_api/android_enterprise/v1/model/users_list_response.ex.
Writing VariableSet to clients/android_enterprise/lib/google_api/android_enterprise/v1/model/variable_set.ex.
Writing WebApp to clients/android_enterprise/lib/google_api/android_enterprise/v1/model/web_app.ex.
Writing WebAppIcon to clients/android_enterprise/lib/google_api/android_enterprise/v1/model/web_app_icon.ex.
Writing WebAppsListResponse to clients/android_enterprise/lib/google_api/android_enterprise/v1/model/web_apps_list_response.ex.
Writing Devices to clients/android_enterprise/lib/google_api/android_enterprise/v1/api/devices.ex.
Writing Enterprises to clients/android_enterprise/lib/google_api/android_enterprise/v1/api/enterprises.ex.
Writing Entitlements to clients/android_enterprise/lib/google_api/android_enterprise/v1/api/entitlements.ex.
Writing Grouplicenses to clients/android_enterprise/lib/google_api/android_enterprise/v1/api/grouplicenses.ex.
Writing Grouplicenseusers to clients/android_enterprise/lib/google_api/android_enterprise/v1/api/grouplicenseusers.ex.
Writing Installs to clients/android_enterprise/lib/google_api/android_enterprise/v1/api/installs.ex.
Writing Managedconfigurationsfordevice to clients/android_enterprise/lib/google_api/android_enterprise/v1/api/managedconfigurationsfordevice.ex.
Writing Managedconfigurationsforuser to clients/android_enterprise/lib/google_api/android_enterprise/v1/api/managedconfigurationsforuser.ex.
Writing Managedconfigurationssettings to clients/android_enterprise/lib/google_api/android_enterprise/v1/api/managedconfigurationssettings.ex.
Writing Permissions to clients/android_enterprise/lib/google_api/android_enterprise/v1/api/permissions.ex.
Writing Products to clients/android_enterprise/lib/google_api/android_enterprise/v1/api/products.ex.
Writing Serviceaccountkeys to clients/android_enterprise/lib/google_api/android_enterprise/v1/api/serviceaccountkeys.ex.
Writing Storelayoutclusters to clients/android_enterprise/lib/google_api/android_enterprise/v1/api/storelayoutclusters.ex.
Writing Storelayoutpages to clients/android_enterprise/lib/google_api/android_enterprise/v1/api/storelayoutpages.ex.
Writing Users to clients/android_enterprise/lib/google_api/android_enterprise/v1/api/users.ex.
Writing Webapps to clients/android_enterprise/lib/google_api/android_enterprise/v1/api/webapps.ex.
Writing connection.ex.
Writing metadata.ex.
Writing mix.exs
Writing README.md
Writing LICENSE
Writing .gitignore
Writing config/config.exs
Writing test/test_helper.exs
fixing file permissions
2020-05-11 15:04:39,812 synthtool > No files in sources /home/kbuilder/.cache/synthtool/elixir-google-api/clients were copied. Does the source contain files?
Traceback (most recent call last):
  File "/home/kbuilder/.pyenv/versions/3.6.9/lib/python3.6/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/home/kbuilder/.pyenv/versions/3.6.9/lib/python3.6/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/tmpfs/src/github/synthtool/synthtool/__main__.py", line 102, in <module>
    main()
  File "/tmpfs/src/github/synthtool/env/lib/python3.6/site-packages/click/core.py", line 829, in __call__
    return self.main(*args, **kwargs)
  File "/tmpfs/src/github/synthtool/env/lib/python3.6/site-packages/click/core.py", line 782, in main
    rv = self.invoke(ctx)
  File "/tmpfs/src/github/synthtool/env/lib/python3.6/site-packages/click/core.py", line 1066, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/tmpfs/src/github/synthtool/env/lib/python3.6/site-packages/click/core.py", line 610, in invoke
    return callback(*args, **kwargs)
  File "/tmpfs/src/github/synthtool/synthtool/__main__.py", line 94, in main
    spec.loader.exec_module(synth_module)  # type: ignore
  File "/tmpfs/src/github/synthtool/synthtool/metadata.py", line 180, in __exit__
    write(self.metadata_file_path)
  File "/tmpfs/src/github/synthtool/synthtool/metadata.py", line 112, in write
    with open(outfile, "w") as fh:
FileNotFoundError: [Errno 2] No such file or directory: 'clients/android_enterprise/synth.metadata'
2020-05-11 15:04:39 [ERROR] Synthesis failed
2020-05-11 15:04:39,843 autosynth > Synthesis failed
Traceback (most recent call last):
  File "/home/kbuilder/.pyenv/versions/3.6.9/lib/python3.6/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/home/kbuilder/.pyenv/versions/3.6.9/lib/python3.6/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/tmpfs/src/github/synthtool/autosynth/synth.py", line 599, in <module>
    main()
  File "/tmpfs/src/github/synthtool/autosynth/synth.py", line 471, in main
    return _inner_main(temp_dir)
  File "/tmpfs/src/github/synthtool/autosynth/synth.py", line 549, in _inner_main
    ).synthesize(base_synth_log_path)
  File "/tmpfs/src/github/synthtool/autosynth/synthesizer.py", line 118, in synthesize
    synth_proc.check_returncode()  # Raise an exception.
  File "/home/kbuilder/.pyenv/versions/3.6.9/lib/python3.6/subprocess.py", line 389, in check_returncode
    self.stderr)
subprocess.CalledProcessError: Command '['/tmpfs/src/github/synthtool/env/bin/python3', '-m', 'synthtool', '--metadata', 'clients/android_enterprise/synth.metadata', 'synth.py', '--', 'AndroidEnterprise']' returned non-zero exit status 1.

Google internal developers can see the full log here.

Autosynth is still having trouble generating AndroidEnterprise. :sob:
Here's the output from running synth.py:
2020-05-12 05:04:18 [INFO] logs will be written to: /tmpfs/src/github/synthtool/logs/googleapis/elixir-google-api
2020-05-12 05:04:18,962 autosynth > logs will be written to: /tmpfs/src/github/synthtool/logs/googleapis/elixir-google-api
Switched to branch 'autosynth-androidenterprise'
2020-05-12 05:04:20 [INFO] Running synthtool
2020-05-12 05:04:20,453 autosynth > Running synthtool
2020-05-12 05:04:20 [INFO] ['/tmpfs/src/github/synthtool/env/bin/python3', '-m', 'synthtool', '--metadata', 'clients/android_enterprise/synth.metadata', 'synth.py', '--']
2020-05-12 05:04:20,453 autosynth > ['/tmpfs/src/github/synthtool/env/bin/python3', '-m', 'synthtool', '--metadata', 'clients/android_enterprise/synth.metadata', 'synth.py', '--']
2020-05-12 05:04:20,669 synthtool > Executing /home/kbuilder/.cache/synthtool/elixir-google-api/synth.py.
On branch autosynth-androidenterprise
nothing to commit, working tree clean
2020-05-12 05:04:20,812 synthtool > Cloning https://github.com/googleapis/elixir-google-api.git.
2020-05-12 05:04:21,415 synthtool > Running: docker run --rm -v/home/kbuilder/.cache/synthtool/elixir-google-api:/workspace -v/var/run/docker.sock:/var/run/docker.sock -e USER_GROUP=1000:1000 -w /workspace gcr.io/cloud-devrel-public-resources/elixir19 scripts/generate_client.sh AndroidEnterprise
/workspace /workspace
The mix.lock file was generated with a newer version of Hex. Update your client by running `mix local.hex` to avoid losing data.
Resolving Hex dependencies...
Dependency resolution completed:
Unchanged:
  certifi 2.5.1
  google_api_discovery 0.7.0
  google_gax 0.3.2
  hackney 1.15.2
  idna 6.0.0
  jason 1.2.0
  metrics 1.0.1
  mime 1.3.1
  mimerl 1.2.0
  oauth2 0.9.4
  parse_trans 3.3.0
  poison 3.1.0
  ssl_verify_fun 1.1.5
  temp 0.4.7
  tesla 1.3.3
  unicode_util_compat 0.4.1
A new Hex version is available (0.20.1 < 0.20.5), please update with `mix local.hex`
All dependencies are up to date
The mix.lock file was generated with a newer version of Hex. Update your client by running `mix local.hex` to avoid losing data.

12:04:24.871 [info]  FETCHING: https://www.googleapis.com/discovery/v1/apis/androidenterprise/v1/rest

12:04:25.050 [info]  FOUND: https://www.googleapis.com/discovery/v1/apis/androidenterprise/v1/rest
Revision check: old=20200429, new=20200429, generating=true
Creating leading directories
Writing Administrator to clients/android_enterprise/lib/google_api/android_enterprise/v1/model/administrator.ex.
Writing AdministratorWebToken to clients/android_enterprise/lib/google_api/android_enterprise/v1/model/administrator_web_token.ex.
Writing AdministratorWebTokenSpec to clients/android_enterprise/lib/google_api/android_enterprise/v1/model/administrator_web_token_spec.ex.
Writing AdministratorWebTokenSpecManagedConfigurations to clients/android_enterprise/lib/google_api/android_enterprise/v1/model/administrator_web_token_spec_managed_configurations.ex.
Writing AdministratorWebTokenSpecPlaySearch to clients/android_enterprise/lib/google_api/android_enterprise/v1/model/administrator_web_token_spec_play_search.ex.
Writing AdministratorWebTokenSpecPrivateApps to clients/android_enterprise/lib/google_api/android_enterprise/v1/model/administrator_web_token_spec_private_apps.ex.
Writing AdministratorWebTokenSpecStoreBuilder to clients/android_enterprise/lib/google_api/android_enterprise/v1/model/administrator_web_token_spec_store_builder.ex.
Writing AdministratorWebTokenSpecWebApps to clients/android_enterprise/lib/google_api/android_enterprise/v1/model/administrator_web_token_spec_web_apps.ex.
Writing AppRestrictionsSchema to clients/android_enterprise/lib/google_api/android_enterprise/v1/model/app_restrictions_schema.ex.
Writing AppRestrictionsSchemaChangeEvent to clients/android_enterprise/lib/google_api/android_enterprise/v1/model/app_restrictions_schema_change_event.ex.
Writing AppRestrictionsSchemaRestriction to clients/android_enterprise/lib/google_api/android_enterprise/v1/model/app_restrictions_schema_restriction.ex.
Writing AppRestrictionsSchemaRestrictionRestrictionValue to clients/android_enterprise/lib/google_api/android_enterprise/v1/model/app_restrictions_schema_restriction_restriction_value.ex.
Writing AppState to clients/android_enterprise/lib/google_api/android_enterprise/v1/model/app_state.ex.
Writing AppUpdateEvent to clients/android_enterprise/lib/google_api/android_enterprise/v1/model/app_update_event.ex.
Writing AppVersion to clients/android_enterprise/lib/google_api/android_enterprise/v1/model/app_version.ex.
Writing ApprovalUrlInfo to clients/android_enterprise/lib/google_api/android_enterprise/v1/model/approval_url_info.ex.
Writing AuthenticationToken to clients/android_enterprise/lib/google_api/android_enterprise/v1/model/authentication_token.ex.
Writing AutoInstallConstraint to clients/android_enterprise/lib/google_api/android_enterprise/v1/model/auto_install_constraint.ex.
Writing AutoInstallPolicy to clients/android_enterprise/lib/google_api/android_enterprise/v1/model/auto_install_policy.ex.
Writing ConfigurationVariables to clients/android_enterprise/lib/google_api/android_enterprise/v1/model/configuration_variables.ex.
Writing Device to clients/android_enterprise/lib/google_api/android_enterprise/v1/model/device.ex.
Writing DeviceReport to clients/android_enterprise/lib/google_api/android_enterprise/v1/model/device_report.ex.
Writing DeviceReportUpdateEvent to clients/android_enterprise/lib/google_api/android_enterprise/v1/model/device_report_update_event.ex.
Writing DeviceState to clients/android_enterprise/lib/google_api/android_enterprise/v1/model/device_state.ex.
Writing DevicesListResponse to clients/android_enterprise/lib/google_api/android_enterprise/v1/model/devices_list_response.ex.
Writing Enterprise to clients/android_enterprise/lib/google_api/android_enterprise/v1/model/enterprise.ex.
Writing EnterpriseAccount to clients/android_enterprise/lib/google_api/android_enterprise/v1/model/enterprise_account.ex.
Writing EnterprisesListResponse to clients/android_enterprise/lib/google_api/android_enterprise/v1/model/enterprises_list_response.ex.
Writing EnterprisesSendTestPushNotificationResponse to clients/android_enterprise/lib/google_api/android_enterprise/v1/model/enterprises_send_test_push_notification_response.ex.
Writing Entitlement to clients/android_enterprise/lib/google_api/android_enterprise/v1/model/entitlement.ex.
Writing EntitlementsListResponse to clients/android_enterprise/lib/google_api/android_enterprise/v1/model/entitlements_list_response.ex.
Writing GroupLicense to clients/android_enterprise/lib/google_api/android_enterprise/v1/model/group_license.ex.
Writing GroupLicenseUsersListResponse to clients/android_enterprise/lib/google_api/android_enterprise/v1/model/group_license_users_list_response.ex.
Writing GroupLicensesListResponse to clients/android_enterprise/lib/google_api/android_enterprise/v1/model/group_licenses_list_response.ex.
Writing Install to clients/android_enterprise/lib/google_api/android_enterprise/v1/model/install.ex.
Writing InstallFailureEvent to clients/android_enterprise/lib/google_api/android_enterprise/v1/model/install_failure_event.ex.
Writing InstallsListResponse to clients/android_enterprise/lib/google_api/android_enterprise/v1/model/installs_list_response.ex.
Writing KeyedAppState to clients/android_enterprise/lib/google_api/android_enterprise/v1/model/keyed_app_state.ex.
Writing LocalizedText to clients/android_enterprise/lib/google_api/android_enterprise/v1/model/localized_text.ex.
Writing MaintenanceWindow to clients/android_enterprise/lib/google_api/android_enterprise/v1/model/maintenance_window.ex.
Writing ManagedConfiguration to clients/android_enterprise/lib/google_api/android_enterprise/v1/model/managed_configuration.ex.
Writing ManagedConfigurationsForDeviceListResponse to clients/android_enterprise/lib/google_api/android_enterprise/v1/model/managed_configurations_for_device_list_response.ex.
Writing ManagedConfigurationsForUserListResponse to clients/android_enterprise/lib/google_api/android_enterprise/v1/model/managed_configurations_for_user_list_response.ex.
Writing ManagedConfigurationsSettings to clients/android_enterprise/lib/google_api/android_enterprise/v1/model/managed_configurations_settings.ex.
Writing ManagedConfigurationsSettingsListResponse to clients/android_enterprise/lib/google_api/android_enterprise/v1/model/managed_configurations_settings_list_response.ex.
Writing ManagedProperty to clients/android_enterprise/lib/google_api/android_enterprise/v1/model/managed_property.ex.
Writing ManagedPropertyBundle to clients/android_enterprise/lib/google_api/android_enterprise/v1/model/managed_property_bundle.ex.
Writing NewDeviceEvent to clients/android_enterprise/lib/google_api/android_enterprise/v1/model/new_device_event.ex.
Writing NewPermissionsEvent to clients/android_enterprise/lib/google_api/android_enterprise/v1/model/new_permissions_event.ex.
Writing Notification to clients/android_enterprise/lib/google_api/android_enterprise/v1/model/notification.ex.
Writing NotificationSet to clients/android_enterprise/lib/google_api/android_enterprise/v1/model/notification_set.ex.
Writing PageInfo to clients/android_enterprise/lib/google_api/android_enterprise/v1/model/page_info.ex.
Writing Permission to clients/android_enterprise/lib/google_api/android_enterprise/v1/model/permission.ex.
Writing Policy to clients/android_enterprise/lib/google_api/android_enterprise/v1/model/policy.ex.
Writing Product to clients/android_enterprise/lib/google_api/android_enterprise/v1/model/product.ex.
Writing ProductApprovalEvent to clients/android_enterprise/lib/google_api/android_enterprise/v1/model/product_approval_event.ex.
Writing ProductAvailabilityChangeEvent to clients/android_enterprise/lib/google_api/android_enterprise/v1/model/product_availability_change_event.ex.
Writing ProductPermission to clients/android_enterprise/lib/google_api/android_enterprise/v1/model/product_permission.ex.
Writing ProductPermissions to clients/android_enterprise/lib/google_api/android_enterprise/v1/model/product_permissions.ex.
Writing ProductPolicy to clients/android_enterprise/lib/google_api/android_enterprise/v1/model/product_policy.ex.
Writing ProductSet to clients/android_enterprise/lib/google_api/android_enterprise/v1/model/product_set.ex.
Writing ProductSigningCertificate to clients/android_enterprise/lib/google_api/android_enterprise/v1/model/product_signing_certificate.ex.
Writing ProductVisibility to clients/android_enterprise/lib/google_api/android_enterprise/v1/model/product_visibility.ex.
Writing ProductsApproveRequest to clients/android_enterprise/lib/google_api/android_enterprise/v1/model/products_approve_request.ex.
Writing ProductsGenerateApprovalUrlResponse to clients/android_enterprise/lib/google_api/android_enterprise/v1/model/products_generate_approval_url_response.ex.
Writing ProductsListResponse to clients/android_enterprise/lib/google_api/android_enterprise/v1/model/products_list_response.ex.
Writing ServiceAccount to clients/android_enterprise/lib/google_api/android_enterprise/v1/model/service_account.ex.
Writing ServiceAccountKey to clients/android_enterprise/lib/google_api/android_enterprise/v1/model/service_account_key.ex.
Writing ServiceAccountKeysListResponse to clients/android_enterprise/lib/google_api/android_enterprise/v1/model/service_account_keys_list_response.ex.
Writing SignupInfo to clients/android_enterprise/lib/google_api/android_enterprise/v1/model/signup_info.ex.
Writing StoreCluster to clients/android_enterprise/lib/google_api/android_enterprise/v1/model/store_cluster.ex.
Writing StoreLayout to clients/android_enterprise/lib/google_api/android_enterprise/v1/model/store_layout.ex.
Writing StoreLayoutClustersListResponse to clients/android_enterprise/lib/google_api/android_enterprise/v1/model/store_layout_clusters_list_response.ex.
Writing StoreLayoutPagesListResponse to clients/android_enterprise/lib/google_api/android_enterprise/v1/model/store_layout_pages_list_response.ex.
Writing StorePage to clients/android_enterprise/lib/google_api/android_enterprise/v1/model/store_page.ex.
Writing TokenPagination to clients/android_enterprise/lib/google_api/android_enterprise/v1/model/token_pagination.ex.
Writing TrackInfo to clients/android_enterprise/lib/google_api/android_enterprise/v1/model/track_info.ex.
Writing User to clients/android_enterprise/lib/google_api/android_enterprise/v1/model/user.ex.
Writing UserToken to clients/android_enterprise/lib/google_api/android_enterprise/v1/model/user_token.ex.
Writing UsersListResponse to clients/android_enterprise/lib/google_api/android_enterprise/v1/model/users_list_response.ex.
Writing VariableSet to clients/android_enterprise/lib/google_api/android_enterprise/v1/model/variable_set.ex.
Writing WebApp to clients/android_enterprise/lib/google_api/android_enterprise/v1/model/web_app.ex.
Writing WebAppIcon to clients/android_enterprise/lib/google_api/android_enterprise/v1/model/web_app_icon.ex.
Writing WebAppsListResponse to clients/android_enterprise/lib/google_api/android_enterprise/v1/model/web_apps_list_response.ex.
Writing Devices to clients/android_enterprise/lib/google_api/android_enterprise/v1/api/devices.ex.
Writing Enterprises to clients/android_enterprise/lib/google_api/android_enterprise/v1/api/enterprises.ex.
Writing Entitlements to clients/android_enterprise/lib/google_api/android_enterprise/v1/api/entitlements.ex.
Writing Grouplicenses to clients/android_enterprise/lib/google_api/android_enterprise/v1/api/grouplicenses.ex.
Writing Grouplicenseusers to clients/android_enterprise/lib/google_api/android_enterprise/v1/api/grouplicenseusers.ex.
Writing Installs to clients/android_enterprise/lib/google_api/android_enterprise/v1/api/installs.ex.
Writing Managedconfigurationsfordevice to clients/android_enterprise/lib/google_api/android_enterprise/v1/api/managedconfigurationsfordevice.ex.
Writing Managedconfigurationsforuser to clients/android_enterprise/lib/google_api/android_enterprise/v1/api/managedconfigurationsforuser.ex.
Writing Managedconfigurationssettings to clients/android_enterprise/lib/google_api/android_enterprise/v1/api/managedconfigurationssettings.ex.
Writing Permissions to clients/android_enterprise/lib/google_api/android_enterprise/v1/api/permissions.ex.
Writing Products to clients/android_enterprise/lib/google_api/android_enterprise/v1/api/products.ex.
Writing Serviceaccountkeys to clients/android_enterprise/lib/google_api/android_enterprise/v1/api/serviceaccountkeys.ex.
Writing Storelayoutclusters to clients/android_enterprise/lib/google_api/android_enterprise/v1/api/storelayoutclusters.ex.
Writing Storelayoutpages to clients/android_enterprise/lib/google_api/android_enterprise/v1/api/storelayoutpages.ex.
Writing Users to clients/android_enterprise/lib/google_api/android_enterprise/v1/api/users.ex.
Writing Webapps to clients/android_enterprise/lib/google_api/android_enterprise/v1/api/webapps.ex.
Writing connection.ex.
Writing metadata.ex.
Writing mix.exs
Writing README.md
Writing LICENSE
Writing .gitignore
Writing config/config.exs
Writing test/test_helper.exs
fixing file permissions
2020-05-12 05:04:26,156 synthtool > No files in sources /home/kbuilder/.cache/synthtool/elixir-google-api/clients were copied. Does the source contain files?
Traceback (most recent call last):
  File "/home/kbuilder/.pyenv/versions/3.6.9/lib/python3.6/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/home/kbuilder/.pyenv/versions/3.6.9/lib/python3.6/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/tmpfs/src/github/synthtool/synthtool/__main__.py", line 102, in <module>
    main()
  File "/tmpfs/src/github/synthtool/env/lib/python3.6/site-packages/click/core.py", line 829, in __call__
    return self.main(*args, **kwargs)
  File "/tmpfs/src/github/synthtool/env/lib/python3.6/site-packages/click/core.py", line 782, in main
    rv = self.invoke(ctx)
  File "/tmpfs/src/github/synthtool/env/lib/python3.6/site-packages/click/core.py", line 1066, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/tmpfs/src/github/synthtool/env/lib/python3.6/site-packages/click/core.py", line 610, in invoke
    return callback(*args, **kwargs)
  File "/tmpfs/src/github/synthtool/synthtool/__main__.py", line 94, in main
    spec.loader.exec_module(synth_module)  # type: ignore
  File "/tmpfs/src/github/synthtool/synthtool/metadata.py", line 180, in __exit__
    write(self.metadata_file_path)
  File "/tmpfs/src/github/synthtool/synthtool/metadata.py", line 112, in write
    with open(outfile, "w") as fh:
FileNotFoundError: [Errno 2] No such file or directory: 'clients/android_enterprise/synth.metadata'
2020-05-12 05:04:26 [ERROR] Synthesis failed
2020-05-12 05:04:26,190 autosynth > Synthesis failed
Traceback (most recent call last):
  File "/home/kbuilder/.pyenv/versions/3.6.9/lib/python3.6/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/home/kbuilder/.pyenv/versions/3.6.9/lib/python3.6/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/tmpfs/src/github/synthtool/autosynth/synth.py", line 599, in <module>
    main()
  File "/tmpfs/src/github/synthtool/autosynth/synth.py", line 471, in main
    return _inner_main(temp_dir)
  File "/tmpfs/src/github/synthtool/autosynth/synth.py", line 549, in _inner_main
    ).synthesize(base_synth_log_path)
  File "/tmpfs/src/github/synthtool/autosynth/synthesizer.py", line 118, in synthesize
    synth_proc.check_returncode()  # Raise an exception.
  File "/home/kbuilder/.pyenv/versions/3.6.9/lib/python3.6/subprocess.py", line 389, in check_returncode
    self.stderr)
subprocess.CalledProcessError: Command '['/tmpfs/src/github/synthtool/env/bin/python3', '-m', 'synthtool', '--metadata', 'clients/android_enterprise/synth.metadata', 'synth.py', '--', 'AndroidEnterprise']' returned non-zero exit status 1.

Google internal developers can see the full log here.

Autosynth passed, closing! :green_heart:

repo: googleapis/elixir-google-api


text:
<1dev is not a valid matcher for Python package versions in setup.py!

On the current master branch, you have this matcher for an install_requires package version in setup.py:
install_requires = [
    "httplib2>=0.15.0,<1dev",

The <1dev part is not a valid version specifier in the sense of PEP 440 and causes problems with a number of packing tools, as seen here:
$ python -c 'from distlib.version import NormalizedMatcher; NormalizedMatcher("httplib2>=0.15.0,<1dev")'
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/home/jan/.local/share/virtualenvs/master_clean-V3vlFZeD/lib/python3.7/site-packages/distlib/version.py", line 125, in __init__
    vn, prefix = self.version_class(s), False
  File "/home/jan/.local/share/virtualenvs/master_clean-V3vlFZeD/lib/python3.7/site-packages/distlib/version.py", line 33, in __init__
    self._parts = parts = self.parse(s)
  File "/home/jan/.local/share/virtualenvs/master_clean-V3vlFZeD/lib/python3.7/site-packages/distlib/version.py", line 267, in parse
    result = _normalized_key(s)
  File "/home/jan/.local/share/virtualenvs/master_clean-V3vlFZeD/lib/python3.7/site-packages/distlib/version.py", line 188, in _pep_440_key
    raise UnsupportedVersionError('Not a valid version: %s' % s)
distlib.version.UnsupportedVersionError: Not a valid version: 1dev

This is just speculation, but it looks like it was either faultily auto-generated by some tool, is an incomplete copy & paste or you meant <1.dev0. However, development versions are not typically considered by tooling and it's considered bad practice to but an upper bound on python dependencies for no good reason. This should be corrected and ideally the artifact files of the effected versions fixed and re-uploaded on pypi.org.

Discussion in: https://github.com/googleapis/python-api-core/issues/504

source: gharchive/issue

repo: googleapis/google-api-python-client

license_type: permissive

license_source: bigquery


text:
DevSite Import: Using OAuth 2.0 for Web Server Applications

Notice: This DevSite page will soon be deleted per b/133171590. Please add this sample to GitHub if it is relevant still:
https://developers.google.com/api-client-library/python/auth/web-app

Using OAuth 2.0 for Web Server Applications

This document explains how web server applications use the Google API
Client Library for Python to implement OAuth 2.0
authorization to access Google APIs.
OAuth 2.0 allows users to share specific data with an application while
keeping their usernames, passwords, and other information private.
For example, an application can use OAuth 2.0 to obtain permission from
users to store files in their Google Drives.

This OAuth 2.0 flow is specifically for user authorization. It is designed
for applications that can store confidential information and maintain state.
A properly authorized web server application can access an API while the user
interacts with the application or after the user has left the application.
Web server applications frequently also use
service accounts to authorize API
requests, particularly when calling Cloud APIs to access project-based data
rather than user-specific data. Web server applications can use service
accounts in conjunction with user authorization.

Prerequisites
Enable APIs for your project
Any application that calls Google APIs needs to enable those APIs in the
API Console. To enable the appropriate APIs for your project:

Open the Library page in the
    API Console.
Select the project associated with your application. Create a project if
    you do not have one already.
Use the Library page to find each API that your application will
    use. Click on each API and enable it for your project.

Create authorization credentials
Any application that uses OAuth 2.0 to access Google APIs must have
authorization credentials that identify the application to Google's OAuth 2.0
server. The following steps explain how to create credentials for your project.
Your applications can then use the credentials to access APIs that you have
enabled for that project.

Open the Credentials page in the API Console.
Click Create credentials > OAuth client ID.
Complete the form. Set the application type to Web
      application. Applications that use languages and frameworks
      like PHP, Java, Python, Ruby, and .NET must specify authorized
      redirect URIs. The redirect URIs are the endpoints to which the
      OAuth 2.0 server can send responses.
      For testing, you can specify URIs that refer to the local machine,
      such as http://localhost:8080. With that in mind, please
      note that all of the examples in this document use
      http://localhost:8080 as the redirect URI.

      We recommend that you design your app's auth
      endpoints so that your application does not expose authorization
      codes to other resources on the page.

After creating your credentials, download the client_secret.json file
   from the API Console. Securely store the file in a location
   that only your application can access.
Important: Do not store the client_secret.json
   file in a publicly-accessible location. In addition, if you share the source
   code to your application—for example, on GitHub—store the
   client_secret.json file outside of your source tree to avoid
   inadvertently sharing your client credentials.
Identify access scopes
Scopes enable your application to only request access to the resources that
it needs while also enabling users to control the amount of access that they
grant to your application. Thus, there may be an inverse relationship between
the number of scopes requested and the likelihood of obtaining user consent.
Before you start implementing OAuth 2.0 authorization, we recommend that you
identify the scopes that your app will need permission to access.
We also recommend that your application request access to authorization
   scopes via an incremental authorization
   process, in which your application requests access to user data in context.
   This best practice helps users to more easily understand why your
   application needs the access it is requesting.
The OAuth 2.0 API Scopes
document contains a full list of scopes that you might use to access Google
APIs.
Language-specific requirements
To run any of the code samples in this document, you'll need a Google
   account, access to the Internet, and a web browser. If you are using one
   of the API client libraries, also see the language-specific requirements
   below.
To run the Python code samples in this document, you'll need:

Python 2.6 or greater
The pip package management tool.

The Google APIs Client Library for Python:
pip install --upgrade google-api-python-client

The google-auth, google-auth-oauthlib, and google-auth-httplib2 for user authorization.
pip install --upgrade google-auth google-auth-oauthlib google-auth-httplib2

The Flask Python web application framework.
pip install --upgrade flask

The requests HTTP library.
pip install --upgrade requests

Obtaining OAuth 2.0 access tokens
The following steps show how your application interacts with Google's OAuth
2.0 server to obtain a user's consent to perform an API request on the user's
behalf. Your application must have that consent before it can execute a Google
API request that requires user authorization.
The list below quickly summarizes these steps:

Your application identifies the permissions it needs.
Your application redirects the user to Google along with the
      list of requested permissions.
The user decides whether to grant the permissions to your
      application.
Your application finds out what the user decided.
If the user granted the requested permissions, your application
      retrieves tokens needed to make API requests on the user's behalf.

Step 1: Set authorization parameters
Your first step is to create the authorization request. That request sets
   parameters that identify your application and define the permissions that
   the user will be asked to grant to your application.
The following code snippet uses the google-auth-oauthlib.flow
   module to construct the authorization request.
The code constructs a Flow object, which identifies your
   application using information from the client_secret.json file
   that you downloaded after creating authorization
   credentials. That object also identifies the scopes that your
   application is requesting permission to access and the URL to your
   application's auth endpoint, which will handle the response from Google's
   OAuth 2.0 server. Finally, the code sets the optional
   access_type and include_granted_scopes
   parameters.

For example, this code requests read-only, offline access to a user's
Google Drive:

import google.oauth2.credentialsimport google_auth_oauthlib.flow# Use the client_secret.json file to identify the application requesting# authorization. The client ID (from that file) and access scopes are required.flow = google_auth_oauthlib.flow.Flow.from_client_secrets_file(    'client_secret.json',    scope=['https://www.googleapis.com/auth/drive.metadata.readonly'])# Indicate where the API server will redirect the user after the user completes# the authorization flow. The redirect URI is required.flow.redirect_uri = 'https://www.example.com/oauth2callback'# Generate URL for request to Google's OAuth 2.0 server.# Use kwargs to set optional request parameters.authorization_url, state = flow.authorization_url(    # Enable offline access so that you can refresh an access token without    # re-prompting the user for permission. Recommended for web server apps.    access_type='offline',    # Enable incremental authorization. Recommended as a best practice.    include_granted_scopes='true')
The request specifies the following information:

Parameters

client_id
Required. The client ID for your application. You can find
    this value in the API Console.
    In Python, call the from_client_secrets_file method to
    retrieve the client ID from a client_secret.json file. (You can
    also use the from_client_config method, which passes the
    client configuration as it originally appeared in a client secrets file
    but doesn't access the file itself.)

flow = google_auth_oauthlib.flow.Flow.from_client_secrets_file(
    'client_secret.json',
    scope=['https://www.googleapis.com/auth/drive.metadata.readonly'])

redirect_uri
Required.
  Determines where the API server redirects the user after the user
  completes the authorization flow. The value must exactly match one of the
  redirect_uri values listed for your project in the
  API Console. Note that the http or
  https scheme, case, and trailing slash ('/')
  must all match.

      To set this value in Python, set the flow object's
      redirect_uri property:

flow.redirect_uri = 'https://www.example.com/oauth2callback'

scope
Required. A
  list of scopes that identify the
  resources that your application could access on the user's behalf. These
  values inform the consent screen that Google displays to the user.

  Scopes enable your application to only request access to the resources
  that it needs while also enabling users to control the amount of access
  that they grant to your application. Thus, there is an inverse
  relationship between the number of scopes requested and the likelihood
  of obtaining user consent.

      In Python, use the same method you use to set the
      client_id to specify the list
      of scopes.

flow = google_auth_oauthlib.flow.Flow.from_client_secrets_file(
    'client_secret.json',
    scope=['https://www.googleapis.com/auth/drive.metadata.readonly'])

The OAuth 2.0 API Scopes
document provides a full list of scopes that you might use to access
Google APIs.

We recommend that your application request access to authorization scopes
in context whenever possible. By requesting access to user data in context,
via incremental authorization,
you help users to more easily understand why your application needs the
access it is requesting.

access_type
Recommended. Indicates whether your application can refresh
    access tokens when the user is not present at the browser.  Valid parameter
    values are online, which is the default value, and
    offline.
    Set the value to offline if your application needs to refresh
    access tokens when the user is not present at the browser. This is the
    method of refreshing access tokens described later in this document. This
    value instructs the Google authorization server to return a refresh token
    and an access token the first time that your application exchanges
    an authorization code for tokens.

    In Python, set the access_type parameter by specifying
    access_type as a keyword argument when calling the
    flow.<wbr>authorization_url method:

authorization_url, state = flow.authorization_url(
    access_type='offline',
    include_granted_scopes='true')

state
Recommended. Specifies any string value that your application
    uses to maintain state between your authorization request and the
    authorization server's response. The server returns the exact value that
    you send as a name=value pair in the hash
    (#) fragment of the
    redirect_uri after the user consents
    to or denies your application's access request.
    You can use this parameter for several purposes, such as directing the
    user to the correct resource in your application, sending nonces, and
    mitigating cross-site request forgery. Since your redirect_uri
    can be guessed, using a state value can increase your
    assurance that an incoming connection is the result of an authentication
    request. If you generate a random string or encode the hash of a cookie or
    another value that captures the client's state, you can validate the
    response to additionally ensure that the request and response originated
    in the same browser, providing protection against attacks such as
    cross-site request forgery. See the OpenID Connect
    documentation for an example of how to create and confirm a
    state token.

    In Python, set the state parameter by specifying
    state as a keyword argument when calling the
    flow.<wbr>authorization_url method:

authorization_url, state = flow.authorization_url(
    access_type='offline',
    state=sample_passthrough_value,
    include_granted_scopes='true')

include_granted_scopes
Optional. Enables applications to use incremental authorization
    to request access to additional scopes in context. If you set this
    parameter's value to true and the authorization request is
    granted, then the new access token will also cover any scopes to which the
    user previously granted the application access. See the
    incremental authorization section
    for examples.

    In Python, set the include_granted_scopes parameter by
    specifying include_granted_scopes as a keyword argument
    when calling the flow.<wbr>authorization_url method:

authorization_url, state = flow.authorization_url(
    access_type='offline',
    include_granted_scopes='true')

login_hint
Optional. If your application knows which user is trying to
    authenticate, it can use this parameter to provide a hint to the Google
    Authentication Server.  The server uses the hint to simplify the login
    flow either by prefilling the email field in the sign-in form or by
    selecting the appropriate multi-login session.
    Set the parameter value to an email address or sub
    identifier, which is equivalent to the user's Google ID.

    In Python, set the login_hint parameter by specifying
    login_hint as a keyword argument when calling the
    flow.<wbr>authorization_url method:

authorization_url, state = flow.authorization_url(
    access_type='offline',
    login_hint='timmerman@google.com',
    include_granted_scopes='true')

prompt

Optional. A space-delimited, case-sensitive list of prompts to
      present the user. If you don't specify this parameter, the user will be
      prompted only the first time your app requests access.

      In Python, set the prompt parameter by specifying
      prompt as a keyword argument when calling the
      flow.<wbr>authorization_url method:

authorization_url, state = flow.authorization_url(
      access_type='offline',
      prompt='consent',
      include_granted_scopes='true')

  Possible values are:

      none
      Do not display any authentication or consent screens. Must not be
        specified with other values.

      consent
      Prompt the user for consent.

      select_account
      Prompt the user to select an account.

Step 2: Redirect to Google's OAuth 2.0 server
Redirect the user to Google's OAuth 2.0 server to initiate the
   authentication and authorization process. Typically, this occurs
   when your application first needs to access the user's data. In the case
   of incremental authorization, this step also
   occurs when your application first needs to access additional resources that
   it does not yet have permission to access.

This example shows how to redirect the user to the authorization URL

using the Flask web application framework:
return flask.redirect(authorization_url)
Google's OAuth 2.0 server authenticates the user and obtains consent from
the user for your application to access the requested scopes. The response
is sent back to your application using the redirect URL you specified.
Step 3: Google prompts user for consent
In this step, the user decides whether to grant your application the
requested access. At this stage, Google displays a consent window that shows
the name of your application and the Google API services that it is requesting
permission to access with the user's authorization credentials. The user can
then consent or refuse to grant access to your application.
Your application doesn't need to do anything at this stage as it waits for
the response from Google's OAuth 2.0 server indicating whether the access was
granted. That response is explained in the following step.
Step 4: Handle the OAuth 2.0 server response
The OAuth 2.0 server responds to your application's access request by using
the URL specified in the request.
If the user approves the access request, then the response contains an
authorization code. If the user does not approve the request, the response
contains an error message. The authorization code or error message that is
returned to the web server appears on the query string, as shown below:
An error response:
https://oauth2.example.com/auth?error=access_denied
An authorization code response:
https://oauth2.example.com/auth?code=4/P7q7W91a-oMsCeLvIaQm6bTrgtp7
Important: If your
response endpoint renders an HTML page, any resources on that page will be
able to see the authorization code in the URL. Scripts can read the URL
directly, and the URL in the Referer HTTP header may be sent
to any or all resources on the page.
Carefully consider whether you want to send authorization credentials to all
resources on that page (especially third-party scripts such as social plugins
and analytics). To avoid this issue, we recommend that the server first handle
the request, then redirect to another URL that doesn't include the response
parameters.
Sample OAuth 2.0 server response

You can test this flow by clicking on the following sample URL, which requests
read-only access to view metadata for files in your Google Drive:

https://accounts.google.com/o/oauth2/v2/auth?
 scope=https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fdrive.metadata.readonly&
 access_type=offline&
 include_granted_scopes=true&
 state=state_parameter_passthrough_value&
 redirect_uri=http%3A%2F%2Foauth2.example.com%2Fcallback&
 response_type=code&
 client_id=client_id
After completing the OAuth 2.0 flow, you should be redirected to
http://localhost/oauth2callback, which will likely yield a
404 NOT FOUND error unless your local machine serves a file
at that address. The next step provides more detail about the information
returned in the URI when the user is redirected back to your application.
Step 5: Exchange authorization code for refresh and access tokens
After the web server receives the authorization code, it can exchange the
authorization code for an access token.
On your callback page, use the google-auth library to verify
   the authorization server response. Then, use the
   flow.fetch_token method to exchange the authorization code
   in that response for an access token:
state = flask.session['state']flow = google_auth_oauthlib.flow.Flow.from_client_secrets_file(    'client_secret.json',    scopes=['https://www.googleapis.com/auth/youtube.force-ssl'],    state=state)flow.redirect_uri = flask.url_for('oauth2callback', _external=True)authorization_response = flask.request.urlflow.fetch_token(authorization_response=authorization_response)# Store the credentials in the session.# ACTION ITEM for developers:#     Store user's access and refresh tokens in your data store if#     incorporating this code into your real app.credentials = flow.credentialsflask.session['credentials'] = {    'token': credentials.token,    'refresh_token': credentials.refresh_token,    'token_uri': credentials.token_uri,    'client_id': credentials.client_id,    'client_secret': credentials.client_secret,    'scopes': credentials.scopes}
Calling Google APIs
After obtaining an access token, your application can use that token to
   authorize API requests on behalf of a given user account or service
   account. Use the user-specific authorization credentials to build a
   service object for the API that you want to call, and then use that object
   to make authorized API requests.

Build a service object for the API that you want to call. You build a
      service object by calling the googleapiclient.discovery
      library's build method with the name and version of the API
      and the user credentials:
For example, to call version 2 of the Drive API:

from googleapiclient.discovery import build

drive = build('drive', 'v2', credentials=credentials)

Make requests to the API service using the
  interface
  provided by the service object.
For example, to list the files in the authenticated user's Google Drive:
files = drive.files().list().execute()

Complete example
The following example prints a JSON-formatted list of files in a user's
Google Drive after the user authenticates and gives consent for the application
to access the user's Drive files.

This example uses the Flask

framework. It runs a web application at http://localhost:8080
that lets you test the OAuth 2.0 flow. If you go to that URL, you should
see four links:

Test an API request: This link points to a page that tries to
      to execute a sample API request. If necessary, it starts the authorization
      flow. If successful, the page displays the API response.
Test the auth flow directly: This link points to a page that tries
      to send the user through the authorization
      flow. The app requests permission to submit authorized API requests
      on the user's behalf.
Revoke current credentials: This link points to a page that
      revokes permissions that the user has already
      granted to the application.
Clear Flask session credentials: This link clears authorization
      credentials that are stored in the Flask session. This lets you see what
      would happen if a user who had already granted permission to your app
      tried to execute an API request in a new session. It also lets you see
      the API response your app would get if a user had revoked permissions
      granted to your app, and your app still tried to authorize a request
      with a revoked access token.

Note: To run this code locally, you must have followed the
   directions in the prerequisites section,
   including setting http://localhost:8080 as a valid redirect URI
   for your credentials and downloading the client_secret.json file
   for those credentials to your working directory.
# -*- coding: utf-8 -*-import osimport flaskimport requestsimport google.oauth2.credentialsimport google_auth_oauthlib.flowimport googleapiclient.discovery# This variable specifies the name of a file that contains the OAuth 2.0# information for this application, including its client_id and client_secret.CLIENT_SECRETS_FILE = "client_secret.json"# This OAuth 2.0 access scope allows for full read/write access to the# authenticated user's account and requires requests to use an SSL connection.SCOPES = ['https://www.googleapis.com/auth/drive.metadata.readonly']API_SERVICE_NAME = 'drive'API_VERSION = 'v2'app = flask.Flask(__name__)# Note: A secret key is included in the sample so that it works.# If you use this code in your application, replace this with a truly secret# key. See http://flask.pocoo.org/docs/0.12/quickstart/#sessions.app.secret_key = 'REPLACE ME - this value is here as a placeholder.'@app.route('/')def index():  return print_index_table()@app.route('/test')def test_api_request():  if 'credentials' not in flask.session:    return flask.redirect('authorize')  # Load credentials from the session.  credentials = google.oauth2.credentials.Credentials(      **flask.session['credentials'])  drive = googleapiclient.discovery.build(      API_SERVICE_NAME, API_VERSION, credentials=credentials)  files = drive.files().list().execute()  # Save credentials back to session in case access token was refreshed.  # ACTION ITEM: In a production app, you likely want to save these  #              credentials in a persistent database instead.  flask.session['credentials'] = credentials_to_dict(credentials)  return flask.jsonify(**files)@app.route('/authorize')def authorize():  # Create flow instance to manage the OAuth 2.0 Authorization Grant Flow steps.  flow = google_auth_oauthlib.flow.Flow.from_client_secrets_file(      CLIENT_SECRETS_FILE, scopes=SCOPES)  flow.redirect_uri = flask.url_for('oauth2callback', _external=True)  authorization_url, state = flow.authorization_url(      # Enable offline access so that you can refresh an access token without      # re-prompting the user for permission. Recommended for web server apps.      access_type='offline',      # Enable incremental authorization. Recommended as a best practice.      include_granted_scopes='true')  # Store the state so the callback can verify the auth server response.  flask.session['state'] = state  return flask.redirect(authorization_url)@app.route('/oauth2callback')def oauth2callback():  # Specify the state when creating the flow in the callback so that it can  # verified in the authorization server response.  state = flask.session['state']  flow = google_auth_oauthlib.flow.Flow.from_client_secrets_file(      CLIENT_SECRETS_FILE, scopes=SCOPES, state=state)  flow.redirect_uri = flask.url_for('oauth2callback', _external=True)  # Use the authorization server's response to fetch the OAuth 2.0 tokens.  authorization_response = flask.request.url  flow.fetch_token(authorization_response=authorization_response)  # Store credentials in the session.  # ACTION ITEM: In a production app, you likely want to save these  #              credentials in a persistent database instead.  credentials = flow.credentials  flask.session['credentials'] = credentials_to_dict(credentials)  return flask.redirect(flask.url_for('test_api_request'))@app.route('/revoke')def revoke():  if 'credentials' not in flask.session:    return ('You need to authorize before ' +            'testing the code to revoke credentials.')  credentials = google.oauth2.credentials.Credentials(    **flask.session['credentials'])  revoke = requests.post('https://accounts.google.com/o/oauth2/revoke',      params={'token': credentials.token},      headers = {'content-type': 'application/x-www-form-urlencoded'})  status_code = getattr(revoke, 'status_code')  if status_code == 200:    return('Credentials successfully revoked.' + print_index_table())  else:    return('An error occurred.' + print_index_table())@app.route('/clear')def clear_credentials():  if 'credentials' in flask.session:    del flask.session['credentials']  return ('Credentials have been cleared.

' +          print_index_table())def credentials_to_dict(credentials):  return {'token': credentials.token,          'refresh_token': credentials.refresh_token,          'token_uri': credentials.token_uri,          'client_id': credentials.client_id,          'client_secret': credentials.client_secret,          'scopes': credentials.scopes}def print_index_table():  return ('
' +          '
Test an API request	' +          'Submit an API request and see a formatted JSON response. ' +          '    Go through the authorization flow if there are no stored ' +          '    credentials for the user.
' +          '
Test the auth flow directly	' +          'Go directly to the authorization flow. If there are stored ' +          '    credentials, you still might not be prompted to reauthorize ' +          '    the application.
' +          '
Revoke current credentials	' +          'Revoke the access token associated with the current user ' +          '    session. After revoking credentials, if you go to the test ' +          '    page, you should see an invalid_grant error.' +          '
' +          '
Clear Flask session credentials	' +          'Clear the access token currently stored in the user session. ' +          '    After clearing the token, if you test the ' +          '    API request again, you should go back to the auth flow.' +          '

')if __name__ == '__main__':  # When running locally, disable OAuthlib's HTTPs verification.  # ACTION ITEM for developers:  #     When running in production *do not* leave this option enabled.  os.environ['OAUTHLIB_INSECURE_TRANSPORT'] = '1'  # Specify a hostname and port that are set as a valid redirect URI  # for your API project in the Google API Console.  app.run('localhost', 8080, debug=True)
Incremental authorization
In the OAuth 2.0 protocol, your app requests authorization to access
resources, which are identified by scopes. It is considered a best
user-experience practice to request authorization for resources at the time
you need them. To enable that practice, Google's authorization server supports
incremental authorization. This feature lets you request scopes as they are
needed and, if the user grants permission, add those scopes to your existing
access token for that user.
For example, an app that lets people sample music tracks and create mixes
might need very few resources at sign-in time, perhaps nothing more than the
name of the person signing in. However, saving a completed mix would require
access to their Google Drive. Most people would find it natural if they only
were asked for access to their Google Drive at the time the app actually
needed it.
In this case, at sign-in time the app might request the profile
scope to perform basic sign-in, and then later request the
https://www.googleapis.com/auth/drive.file scope at the time of the
first request to save a mix.
To implement incremental authorization, you complete the normal flow for
   requesting an access token but make sure that the authorization request
   includes previously granted scopes. This approach allows your app to avoid
   having to manage multiple access tokens.
The following rules apply to an access token obtained from an incremental
authorization:

The token can be used to access resources corresponding to any of the
      scopes rolled into the new, combined authorization.
When you use the refresh token for the combined authorization to obtain
      an access token, the access token represents the combined authorization
      and can be used for any of its scopes.
The combined authorization includes all scopes that the user granted
      to the API project even if the grants were requested from different
      clients. For example, if a user granted access to one scope using an
      application's desktop client and then granted another scope to the
      same application via a mobile client, the combined authorization would
      include both scopes.
If you revoke a token that represents a combined authorization, access
      to all of that authorization's scopes on behalf of the associated user
      are revoked simultaneously.

The example for setting authorization
     parameters demonstrates how to ensure authorization requests follow
     this best practice. The code snippet below also shows the code that you
     need to add to use incremental authorization.
In Python, set the include_granted_scopes keyword argument
   to true to ensure that an authorization request includes
   previously granted scopes. It is very possible that
   include_granted_scopes will not be the only keyword
   argument that you set, as shown in the example below.
authorization_url, state = flow.authorization_url(    # Enable offline access so that you can refresh an access token without    # re-prompting the user for permission. Recommended for web server apps.    access_type='offline',    # Enable incremental authorization. Recommended as a best practice.    include_granted_scopes='true')
Refreshing an access token (offline access)
Access tokens periodically expire. You can refresh an access token without
prompting the user for permission (including when the user is not present) if
you requested offline access to the scopes associated with the token.

If you use a Google API Client Library, the client
object refreshes the access token as needed as long as you configure that
object for offline access.

Requesting offline access is a requirement for any application that needs
   to access a Google API when the user is not present. For example, an app
   that performs backup services or executes actions at predetermined times
   needs to be able to refresh its access token when the user is not present.
   The default style of access is called online.
Server-side web applications, installed applications, and devices all
   obtain refresh tokens during the authorization process. Refresh tokens
   are not typically used in client-side (JavaScript) web applications.

In Python, set the access_type keyword argument to

offline to ensure that you will be able to refresh the
access token without having to re-prompt the user for permission.
It is very possible that access_type will not be the
only keyword argument that you set, as shown in the example below.
authorization_url, state = flow.authorization_url(    # Enable offline access so that you can refresh an access token without    # re-prompting the user for permission. Recommended for web server apps.    access_type='offline',    # Enable incremental authorization. Recommended as a best practice.    include_granted_scopes='true')
After a user grants offline access to the requested scopes, you can continue
   to use the API client to access Google APIs on the user's behalf when the
   user is offline. The client object will refresh the access token as
   needed.
Revoking a token
In some cases a user may wish to revoke access given to an application. A
user can revoke access by visiting
Account Settings.
It is also possible for an application to programmatically revoke the access
given to it. Programmatic revocation is important in instances where a user
unsubscribes or removes an application. In other words, part of the removal
process can include an API request to ensure the permissions granted to the
application are removed.
To programmatically revoke a token, make a request to
   https://accounts.google.com/o/oauth2/revoke that includes
   the token as a parameter and sets the Content-Type header:
requests.post('https://accounts.google.com/o/oauth2/revoke',    params={'token': credentials.token},    headers = {'content-type': 'application/x-www-form-urlencoded'})
Note: Following a successful revocation response, it
might take some time before the revocation has full effect.

I don't think this doc was fully imported into
https://github.com/googleapis/google-api-python-client/blob/master/docs/oauth-web.md
so I will leave it open until it is fully merged.

I've opened a PR to delete oauth-web.md as it is adds no additional value compared with https://developers.google.com/identity/protocols/oauth2/web-server.

authors: grant parthea


text:
doc: improve verbiage in packaging.md

Updated an improvised way to describe sentence, specially for professionals

This change is

Thank you for sending this PR.  As you may have noticed packaging.md is automatically generated by ci/generate-markdown/generate-packaging.sh.  Would you consider making the changes there too?  I understand if that gets too tedious, just say so if it is the case.

Yes coryan, i made your desired changes , thankyou for reminding me

Hi , is everything looks suitable ? because there are alot of check , some of which i couldn't understand very well

Yes, it is all copacetic.  I was going to double check with my colleagues on Monday, as their English is much better than mine.

Okay Sure ,  although your english is really phenomenal .

Thanks for your PR and your patience.

Thankyou coryan for your consideration

source: gharchive/pull-request

authors: coryan theSatvik

repo: googleapis/google-cloud-cpp

license_source: github-api


text:
cleanup: strip API from title in scaffolding

Also, split up the link to the cloud service root page and cloud service documentation page, where possible.
The first commit has the scaffolding changes. The second commit has all of the retroactive changes. Eventually I gave up making edits to the CMakeLists.txt.

This change is

Closing. I will probably differentiate the service/API link from the service/API docs link in a future PR.


text:
Release Google.Cloud.Bigtable.Common.V2 version 3.1.0

Changes in this release:
No API surface changes; just dependency updates.

Created release for Google.Cloud.Bigtable.Common.V2-3.1.0

authors: jskeet yoshi-automation

repo: googleapis/google-cloud-dotnet


text:
PERMISSION_DENIED for google service account

I've successfully subscribed to Pub?Sub service under my own user account. Howewer when i set GOOGLE_APPLICATION_CREDENTIALS env variable to point service account key file i got permission denied exception. This service account has Pub/Sub Admin role. Here is stack trace of exception:
SEVERE: terminated streaming with exception
com.google.api.gax.rpc.PermissionDeniedException: io.grpc.StatusRuntimeException: PERMISSION_DENIED: User not authorized to perform this action.
	at com.google.api.gax.rpc.ApiExceptionFactory.createException(ApiExceptionFactory.java:55)
	at com.google.cloud.pubsub.v1.StreamingSubscriberConnection$1.onFailure(StreamingSubscriberConnection.java:237)
	at com.google.common.util.concurrent.Futures$4.run(Futures.java:1123)
	at com.google.common.util.concurrent.MoreExecutors$DirectExecutor.execute(MoreExecutors.java:435)
	at com.google.common.util.concurrent.AbstractFuture.executeListener(AbstractFuture.java:900)
	at com.google.common.util.concurrent.AbstractFuture.complete(AbstractFuture.java:811)
	at com.google.common.util.concurrent.AbstractFuture.setException(AbstractFuture.java:675)
	at com.google.common.util.concurrent.SettableFuture.setException(SettableFuture.java:53)
	at com.google.cloud.pubsub.v1.StreamingSubscriberConnection$StreamingPullResponseObserver.onError(StreamingSubscriberConnection.java:173)
	at io.grpc.stub.ClientCalls$StreamObserverToCallListenerAdapter.onClose(ClientCalls.java:419)
	at io.grpc.ForwardingClientCallListener.onClose(ForwardingClientCallListener.java:41)
	at io.grpc.internal.CensusStatsModule$StatsClientInterceptor$1$1.onClose(CensusStatsModule.java:684)
	at io.grpc.ForwardingClientCallListener.onClose(ForwardingClientCallListener.java:41)
	at io.grpc.internal.CensusTracingModule$TracingClientInterceptor$1$1.onClose(CensusTracingModule.java:392)
	at io.grpc.internal.ClientCallImpl.closeObserver(ClientCallImpl.java:475)
	at io.grpc.internal.ClientCallImpl.access$300(ClientCallImpl.java:63)
	at io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl.close(ClientCallImpl.java:557)
	at io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl.access$600(ClientCallImpl.java:478)
	at io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl$1StreamClosed.runInContext(ClientCallImpl.java:590)
	at io.grpc.internal.ContextRunnable.run(ContextRunnable.java:37)
	at io.grpc.internal.SerializingExecutor.run(SerializingExecutor.java:123)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	at java.lang.Thread.run(Thread.java:745)
Caused by: io.grpc.StatusRuntimeException: PERMISSION_DENIED: User not authorized to perform this action.
	at io.grpc.Status.asRuntimeException(Status.java:526)
	... 19 more

I am also facing the same problem in production and with selective hosts. I am using the same JSON(service account credentials) on 30 different hosts and 3 of them have reported this error. This is a runtime error with a generic message. Please suggest a way to debug it.

I am also facing the same issue. Are you able to solve this?

No, we have decided to use RabbitMQ instead.

We have same issue, weird that some messages is received - some failed

Same problem here.
The publish role isn't sufficient to publish. The Subscriber role isn't sufficient to subscribe. Even the pub sub admin role isn't sufficient to publish or subscribe.
The only way we've been able to get this working is to use a service account with the owner role, which is obviously not acceptable.
There's clearly a privilege missing from all those pub sub roles. Even if this bug isn't going to get addressed, could we at least find out what privilege it is so we can create custom roles for pub sub that don't have all 1407 privileges on them like the Owner does?

This sounds bad. Am I understanding correctly that this issue is intermittent? Our authentication lib has to refresh credentials every hour or so. I suspect that the bug could creep in there.

@vchudnov-g  Single host sometimes succeeds and sometimes fails. We have also observed that only these 4 to 5 hosts which are ideal(haven't published a single message)for a day or more throws this exception. So maybe there is a problem in refreshing the credentials?

@PrashSi Am I understanding correctly that the failure is on the subscriber side and happens intermittently during streaming calls (pulling messages)?
Also are you running on any Google Cloud machines(GCE, GAE, GKE) or local machines?

Also, it would be great if any of you could do the following to help debug if you have cloud-debugger available:

set a watch point in OAuth2Credentials::shouldRefresh and log anytime expiresIn < 5000L

@hzyi-google Running on local machines.

I had a publisher and a few subscribers set up on my local machine and had them running for about 12 hours but could not reproduce this problem. The publisher publishes every 2 seconds. Anything different I can do to help increase the frequency of the bug?

I have observed this issue once in the following situation:

Spring boot application
Running in Google Container Engine
Application listening to 6 subscriptions
One of the subscribers stopped with this error about 4 days and 9 hours after launching the application
Between the application starting and the error occurring 1 message was published to a topic not connected to the erroneous subscription, no other messages were published.
Dependencies from the google-cloud-bom version 0.49.0-alpha

Same issue trying to use Stackdriver exporter.
WARNING: ApiException thrown when exporting TimeSeries.
com.google.api.gax.rpc.PermissionDeniedException: io.grpc.StatusRuntimeException: PERMISSION_DENIED: The caller does not have permission
at com.google.api.gax.rpc.ApiExceptionFactory.createException(ApiExceptionFactory.java:55)
at com.google.api.gax.grpc.GrpcApiExceptionFactory.create(GrpcApiExceptionFactory.java:72)
at com.google.api.gax.grpc.GrpcApiExceptionFactory.create(GrpcApiExceptionFactory.java:60)
at com.google.api.gax.grpc.GrpcExceptionCallable$ExceptionTransformingFuture.onFailure(GrpcExceptionCallable.java:95)
at com.google.api.core.ApiFutures$1.onFailure(ApiFutures.java:61)
at com.google.common.util.concurrent.Futures$4.run(Futures.java:1123)
at com.google.common.util.concurrent.MoreExecutors$DirectExecutor.execute(MoreExecutors.java:435)
at com.google.common.util.concurrent.AbstractFuture.executeListener(AbstractFuture.java:900)
at com.google.common.util.concurrent.AbstractFuture.complete(AbstractFuture.java:811)
at com.google.common.util.concurrent.AbstractFuture.setException(AbstractFuture.java:675)
at io.grpc.stub.ClientCalls$GrpcFuture.setException(ClientCalls.java:492)
at io.grpc.stub.ClientCalls$UnaryStreamToFuture.onClose(ClientCalls.java:467)
at io.grpc.PartialForwardingClientCallListener.onClose(PartialForwardingClientCallListener.java:39)
at io.grpc.ForwardingClientCallListener.onClose(ForwardingClientCallListener.java:23)
at io.grpc.ForwardingClientCallListener$SimpleForwardingClientCallListener.onClose(ForwardingClientCallListener.java:40)
at io.grpc.internal.CensusStatsModule$StatsClientInterceptor$1$1.onClose(CensusStatsModule.java:684)
at io.grpc.PartialForwardingClientCallListener.onClose(PartialForwardingClientCallListener.java:39)
at io.grpc.ForwardingClientCallListener.onClose(ForwardingClientCallListener.java:23)
at io.grpc.ForwardingClientCallListener$SimpleForwardingClientCallListener.onClose(ForwardingClientCallListener.java:40)
at io.grpc.internal.CensusTracingModule$TracingClientInterceptor$1$1.onClose(CensusTracingModule.java:391)
at io.grpc.internal.ClientCallImpl.closeObserver(ClientCallImpl.java:471)
at io.grpc.internal.ClientCallImpl.access$300(ClientCallImpl.java:63)
at io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl.close(ClientCallImpl.java:553)
at io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl.access$600(ClientCallImpl.java:474)
at io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl$1StreamClosed.runInContext(ClientCallImpl.java:591)
at io.grpc.internal.ContextRunnable.run(ContextRunnable.java:37)
at io.grpc.internal.SerializingExecutor.run(SerializingExecutor.java:123)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)```

I was able to make it work following the instructions from:
https://github.com/census-instrumentation/opencensus-java/tree/master/exporters/stats/stackdriver#quickstart
Specifically enabling billing to my gcp account.

@hzyi-google this one looks a tad scary.  Are you able to actively look at this?

@JustinBeckwith I've been trying to repro this but without any luck. I've been talking with Customer Solution Engineers to see if they can get more information from customers but didn't get anything useful. Could you help escalate this?

This issue appears to have diverged into a few scenarios:

Running locally never succeeded
Running on GCE without billing enabled

Closing this out and we can open a new issue with additional repro steps if it's still occurring.

Fecharam e não falaram nada com nada?

This issue appears to have diverged into a few scenarios:

Running locally never succeeded
Running on GCE without billing enabled

Closing this out and we can open a new issue with additional repro steps if it's still occurring.

Resolved?

I've got the same error.
To solve the error, please reference the following link.
https://cloud.google.com/iam/docs/permissions-reference

If you are using GCP service on Compute Engine then you need to provide Credentials explicitly to Publisher Class, faced the same issue this worked for me.
CredentialsProvider credentialsProvider =
FixedCredentialsProvider.create(
ServiceAccountCredentials.fromStream(PubSubUtil.class.getClassLoader().getResourceAsStream("key.json")));

I got the same issue.
For me locally it is working with my credentials and when I started to pass the default credential from VM, it started to fail with above error

authors: Greenbones JustinBeckwith PrashSi Sanoojkoloth agzamovr chingor13 ejgutierrezvega hzyi-google lucianosouzabobsin muzuro pimotte pongad prodev0329 sangamangreg surajjha-dev

repo: googleapis/google-cloud-java