looker-sdk 25.10.0__tar.gz → 25.18.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (42) hide show
  1. {looker_sdk-25.10.0 → looker_sdk-25.18.0}/PKG-INFO +1 -1
  2. {looker_sdk-25.10.0 → looker_sdk-25.18.0}/looker_sdk/rtl/serialize.py +2 -0
  3. {looker_sdk-25.10.0 → looker_sdk-25.18.0}/looker_sdk/sdk/api40/methods.py +213 -18
  4. {looker_sdk-25.10.0 → looker_sdk-25.18.0}/looker_sdk/sdk/api40/models.py +359 -107
  5. {looker_sdk-25.10.0 → looker_sdk-25.18.0}/looker_sdk/sdk/constants.py +1 -1
  6. {looker_sdk-25.10.0 → looker_sdk-25.18.0}/looker_sdk/version.py +1 -1
  7. {looker_sdk-25.10.0 → looker_sdk-25.18.0}/looker_sdk.egg-info/PKG-INFO +1 -1
  8. {looker_sdk-25.10.0 → looker_sdk-25.18.0}/LICENSE.txt +0 -0
  9. {looker_sdk-25.10.0 → looker_sdk-25.18.0}/MANIFEST.in +0 -0
  10. {looker_sdk-25.10.0 → looker_sdk-25.18.0}/README.rst +0 -0
  11. {looker_sdk-25.10.0 → looker_sdk-25.18.0}/looker_sdk/__init__.py +0 -0
  12. {looker_sdk-25.10.0 → looker_sdk-25.18.0}/looker_sdk/error.py +0 -0
  13. {looker_sdk-25.10.0 → looker_sdk-25.18.0}/looker_sdk/py.typed +0 -0
  14. {looker_sdk-25.10.0 → looker_sdk-25.18.0}/looker_sdk/rtl/__init__.py +0 -0
  15. {looker_sdk-25.10.0 → looker_sdk-25.18.0}/looker_sdk/rtl/api_methods.py +0 -0
  16. {looker_sdk-25.10.0 → looker_sdk-25.18.0}/looker_sdk/rtl/api_settings.py +0 -0
  17. {looker_sdk-25.10.0 → looker_sdk-25.18.0}/looker_sdk/rtl/auth_session.py +0 -0
  18. {looker_sdk-25.10.0 → looker_sdk-25.18.0}/looker_sdk/rtl/auth_token.py +0 -0
  19. {looker_sdk-25.10.0 → looker_sdk-25.18.0}/looker_sdk/rtl/constants.py +0 -0
  20. {looker_sdk-25.10.0 → looker_sdk-25.18.0}/looker_sdk/rtl/hooks.py +0 -0
  21. {looker_sdk-25.10.0 → looker_sdk-25.18.0}/looker_sdk/rtl/model.py +0 -0
  22. {looker_sdk-25.10.0 → looker_sdk-25.18.0}/looker_sdk/rtl/requests_transport.py +0 -0
  23. {looker_sdk-25.10.0 → looker_sdk-25.18.0}/looker_sdk/rtl/transport.py +0 -0
  24. {looker_sdk-25.10.0 → looker_sdk-25.18.0}/looker_sdk/sdk/__init__.py +0 -0
  25. {looker_sdk-25.10.0 → looker_sdk-25.18.0}/looker_sdk/sdk/api40/__init__.py +0 -0
  26. {looker_sdk-25.10.0 → looker_sdk-25.18.0}/looker_sdk.egg-info/SOURCES.txt +0 -0
  27. {looker_sdk-25.10.0 → looker_sdk-25.18.0}/looker_sdk.egg-info/dependency_links.txt +0 -0
  28. {looker_sdk-25.10.0 → looker_sdk-25.18.0}/looker_sdk.egg-info/requires.txt +0 -0
  29. {looker_sdk-25.10.0 → looker_sdk-25.18.0}/looker_sdk.egg-info/top_level.txt +0 -0
  30. {looker_sdk-25.10.0 → looker_sdk-25.18.0}/setup.cfg +0 -0
  31. {looker_sdk-25.10.0 → looker_sdk-25.18.0}/setup.py +0 -0
  32. {looker_sdk-25.10.0 → looker_sdk-25.18.0}/tests/integration/__init__.py +0 -0
  33. {looker_sdk-25.10.0 → looker_sdk-25.18.0}/tests/integration/test_methods.py +0 -0
  34. {looker_sdk-25.10.0 → looker_sdk-25.18.0}/tests/integration/test_netrc.py +0 -0
  35. {looker_sdk-25.10.0 → looker_sdk-25.18.0}/tests/rtl/__init__.py +0 -0
  36. {looker_sdk-25.10.0 → looker_sdk-25.18.0}/tests/rtl/test_api_methods.py +0 -0
  37. {looker_sdk-25.10.0 → looker_sdk-25.18.0}/tests/rtl/test_api_settings.py +0 -0
  38. {looker_sdk-25.10.0 → looker_sdk-25.18.0}/tests/rtl/test_auth_session.py +0 -0
  39. {looker_sdk-25.10.0 → looker_sdk-25.18.0}/tests/rtl/test_auth_token.py +0 -0
  40. {looker_sdk-25.10.0 → looker_sdk-25.18.0}/tests/rtl/test_requests_transport.py +0 -0
  41. {looker_sdk-25.10.0 → looker_sdk-25.18.0}/tests/rtl/test_serialize.py +0 -0
  42. {looker_sdk-25.10.0 → looker_sdk-25.18.0}/tests/rtl/test_transport.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: looker_sdk
3
- Version: 25.10.0
3
+ Version: 25.18.0
4
4
  Summary: Looker REST API
5
5
  Home-page: https://pypi.python.org/pypi/looker_sdk
6
6
  Author: Looker Data Sciences, Inc.
@@ -37,6 +37,7 @@ from typing import (
37
37
  )
38
38
 
39
39
  import cattr
40
+ from cattrs.cols import is_sequence, list_structure_factory
40
41
 
41
42
  from looker_sdk.rtl import model, hooks
42
43
 
@@ -67,6 +68,7 @@ def deserialize(
67
68
  except json.JSONDecodeError as ex:
68
69
  raise DeserializeError(f"Bad json {ex}")
69
70
  try:
71
+ converter.register_structure_hook_factory(is_sequence, list_structure_factory)
70
72
  response: TDeserializeReturn = converter.structure( # type: ignore
71
73
  data, structure
72
74
  )
@@ -21,7 +21,7 @@
21
21
  # SOFTWARE.
22
22
  #
23
23
 
24
- # 471 API methods
24
+ # 476 API methods
25
25
 
26
26
 
27
27
  # NOTE: Do not edit this file generated by Looker SDK Codegen for API 4.0
@@ -417,7 +417,10 @@ class Looker40SDK(api_methods.APIMethods):
417
417
  #
418
418
  # See 'login' for more detail on the access token and how to use it.
419
419
  #
420
- # Calls to this endpoint may be denied by [Looker (Google Cloud core)](https://cloud.google.com/looker/docs/r/looker-core/overview).
420
+ # In [Looker (Google Cloud core)](https://cloud.google.com/looker/docs/r/looker-core/overview) this call will be denied unless all of the following criteria are met:
421
+ # 1. The calling user is an [API-only Service Account](https://cloud.google.com/looker/docs/looker-core-user-management#creating_an_api-only_service_account) with the Admin role
422
+ # 2. The target user is an [Embed User type](https://cloud.google.com/looker/docs/r/single-sign-on-embedding)
423
+ # Regular user types can not be impersonated in [Looker (Google Cloud core)](https://cloud.google.com/looker/docs/r/looker-core/overview). If your application needs to call the API for these users, use OAuth authentication instead.
421
424
  #
422
425
  # POST /login/{user_id} -> mdls.AccessToken
423
426
  def login_user(
@@ -4102,16 +4105,18 @@ class Looker40SDK(api_methods.APIMethods):
4102
4105
  self,
4103
4106
  # Match content favorite id(s)
4104
4107
  id: Optional[str] = None,
4105
- # Match user id(s).To create a list of multiple ids, use commas as separators
4108
+ # Match user id(s). To create a list of multiple ids, use commas as separators
4106
4109
  user_id: Optional[str] = None,
4107
- # Match content metadata id(s).To create a list of multiple ids, use commas as separators
4110
+ # Match content metadata id(s). To create a list of multiple ids, use commas as separators
4108
4111
  content_metadata_id: Optional[str] = None,
4109
- # Match dashboard id(s).To create a list of multiple ids, use commas as separators
4112
+ # Match dashboard id(s). To create a list of multiple ids, use commas as separators
4110
4113
  dashboard_id: Optional[str] = None,
4111
- # Match look id(s).To create a list of multiple ids, use commas as separators
4114
+ # Match look id(s). To create a list of multiple ids, use commas as separators
4112
4115
  look_id: Optional[str] = None,
4113
- # Match board id(s).To create a list of multiple ids, use commas as separators
4116
+ # Match board id(s). To create a list of multiple ids, use commas as separators
4114
4117
  board_id: Optional[str] = None,
4118
+ # If true, and board_id is provided, returns the content favorites for all items on the board. If false, returns the content favorite for the board itself.
4119
+ include_board_items: Optional[bool] = None,
4115
4120
  # Number of results to return. (used with offset)
4116
4121
  limit: Optional[int] = None,
4117
4122
  # Number of results to skip before returning any. (used with limit)
@@ -4137,6 +4142,7 @@ class Looker40SDK(api_methods.APIMethods):
4137
4142
  "dashboard_id": dashboard_id,
4138
4143
  "look_id": look_id,
4139
4144
  "board_id": board_id,
4145
+ "include_board_items": include_board_items,
4140
4146
  "limit": limit,
4141
4147
  "offset": offset,
4142
4148
  "sorts": sorts,
@@ -5022,6 +5028,76 @@ class Looker40SDK(api_methods.APIMethods):
5022
5028
  )
5023
5029
  return response
5024
5030
 
5031
+ # ### Search LookML Dashboards
5032
+ #
5033
+ # Returns an array of **LookML Dashboard** objects that match the specified search criteria.
5034
+ # Note, this only returns LookML Dashboards in production.
5035
+ #
5036
+ # If multiple search params are given and `filter_or` is FALSE or not specified,
5037
+ # search params are combined in a logical AND operation.
5038
+ # Only rows that match *all* search param criteria will be returned.
5039
+ #
5040
+ # If `filter_or` is TRUE, multiple search params are combined in a logical OR operation.
5041
+ # Results will include rows that match **any** of the search criteria.
5042
+ #
5043
+ # String search params use case-insensitive matching.
5044
+ # String search params can contain `%` and '_' as SQL LIKE pattern match wildcard expressions.
5045
+ # example="dan%" will match "danger" and "Danzig" but not "David"
5046
+ # example="D_m%" will match "Damage" and "dump"
5047
+ #
5048
+ # Integer search params can accept a single value or a comma separated list of values. The multiple
5049
+ # values will be combined under a logical OR operation - results will match at least one of
5050
+ # the given values.
5051
+ #
5052
+ # Most search params can accept "IS NULL" and "NOT NULL" as special expressions to match
5053
+ # or exclude (respectively) rows where the column is null.
5054
+ #
5055
+ # Boolean search params accept only "true" and "false" as values.
5056
+ #
5057
+ #
5058
+ # The parameters `limit`, and `offset` are recommended for fetching results in page-size chunks.
5059
+ #
5060
+ # Get a **single LookML dashboard** by id with [dashboard_lookml()](#!/Dashboard/dashboard_lookml)
5061
+ #
5062
+ # GET /dashboards/lookml/search -> mdls.DashboardLookml
5063
+ def search_lookml_dashboards(
5064
+ self,
5065
+ # Filter on a particular folder.
5066
+ folder_id: Optional[str] = None,
5067
+ # Match LookML Dashboard title.
5068
+ title: Optional[str] = None,
5069
+ # Filter on a content favorite id.
5070
+ content_favorite_id: Optional[str] = None,
5071
+ # Requested fields.
5072
+ fields: Optional[str] = None,
5073
+ # Number of results to return. (used with offset and takes priority over page and per_page)
5074
+ limit: Optional[int] = None,
5075
+ # Number of results to skip before returning any. (used with limit and takes priority over page and per_page)
5076
+ offset: Optional[int] = None,
5077
+ # One or more fields to sort by. Sortable fields: [:title, :id, :folder_id, :content_favorite_id, :content_metadata_id]
5078
+ sorts: Optional[str] = None,
5079
+ transport_options: Optional[transport.TransportOptions] = None,
5080
+ ) -> mdls.DashboardLookml:
5081
+ """Search LookML Dashboards"""
5082
+ response = cast(
5083
+ mdls.DashboardLookml,
5084
+ self.get(
5085
+ path="/dashboards/lookml/search",
5086
+ structure=mdls.DashboardLookml,
5087
+ query_params={
5088
+ "folder_id": folder_id,
5089
+ "title": title,
5090
+ "content_favorite_id": content_favorite_id,
5091
+ "fields": fields,
5092
+ "limit": limit,
5093
+ "offset": offset,
5094
+ "sorts": sorts,
5095
+ },
5096
+ transport_options=transport_options,
5097
+ ),
5098
+ )
5099
+ return response
5100
+
5025
5101
  # ### Get lookml of a UDD
5026
5102
  #
5027
5103
  # Returns a JSON object that contains the dashboard id and the full lookml
@@ -6978,6 +7054,30 @@ class Looker40SDK(api_methods.APIMethods):
6978
7054
  )
6979
7055
  return response
6980
7056
 
7057
+ # Checks to see if the user is able to connect to their integration hub
7058
+ #
7059
+ # GET /integration_hubs/{integration_hub_id}/health -> mdls.IntegrationHubHealthResult
7060
+ def get_integration_hub_health(
7061
+ self,
7062
+ # Id of integration_hub
7063
+ integration_hub_id: str,
7064
+ # Requested fields.
7065
+ fields: Optional[str] = None,
7066
+ transport_options: Optional[transport.TransportOptions] = None,
7067
+ ) -> mdls.IntegrationHubHealthResult:
7068
+ """Check the health of Integration Hub"""
7069
+ integration_hub_id = self.encode_path_param(integration_hub_id)
7070
+ response = cast(
7071
+ mdls.IntegrationHubHealthResult,
7072
+ self.get(
7073
+ path=f"/integration_hubs/{integration_hub_id}/health",
7074
+ structure=mdls.IntegrationHubHealthResult,
7075
+ query_params={"fields": fields},
7076
+ transport_options=transport_options,
7077
+ ),
7078
+ )
7079
+ return response
7080
+
6981
7081
  # Accepts the legal agreement for a given integration hub. This only works for integration hubs that have legal_agreement_required set to true and legal_agreement_signed set to false.
6982
7082
  #
6983
7083
  # POST /integration_hubs/{integration_hub_id}/accept_legal_agreement -> mdls.IntegrationHub
@@ -7988,7 +8088,7 @@ class Looker40SDK(api_methods.APIMethods):
7988
8088
 
7989
8089
  # ### Fetches a CI Run.
7990
8090
  #
7991
- # GET /projects/{project_id}/ci/runs/{run_id} -> mdls.ProjectCIRun
8091
+ # GET /projects/{project_id}/ci/runs/{run_id} -> mdls.ProjectRun
7992
8092
  def get_ci_run(
7993
8093
  self,
7994
8094
  # Project Id
@@ -7998,15 +8098,15 @@ class Looker40SDK(api_methods.APIMethods):
7998
8098
  # Requested fields
7999
8099
  fields: Optional[str] = None,
8000
8100
  transport_options: Optional[transport.TransportOptions] = None,
8001
- ) -> mdls.ProjectCIRun:
8101
+ ) -> mdls.ProjectRun:
8002
8102
  """Fetch Continuous Integration run"""
8003
8103
  project_id = self.encode_path_param(project_id)
8004
8104
  run_id = self.encode_path_param(run_id)
8005
8105
  response = cast(
8006
- mdls.ProjectCIRun,
8106
+ mdls.ProjectRun,
8007
8107
  self.get(
8008
8108
  path=f"/projects/{project_id}/ci/runs/{run_id}",
8009
- structure=mdls.ProjectCIRun,
8109
+ structure=mdls.ProjectRun,
8010
8110
  query_params={"fields": fields},
8011
8111
  transport_options=transport_options,
8012
8112
  ),
@@ -10345,6 +10445,8 @@ class Looker40SDK(api_methods.APIMethods):
10345
10445
  fields: Optional[str] = None,
10346
10446
  # Optional list of ids to get specific roles.
10347
10447
  ids: Optional[mdls.DelimSequence[str]] = None,
10448
+ # Get all Looker support roles.
10449
+ get_all_support_roles: Optional[bool] = None,
10348
10450
  transport_options: Optional[transport.TransportOptions] = None,
10349
10451
  ) -> Sequence[mdls.Role]:
10350
10452
  """Get All Roles"""
@@ -10353,7 +10455,11 @@ class Looker40SDK(api_methods.APIMethods):
10353
10455
  self.get(
10354
10456
  path="/roles",
10355
10457
  structure=Sequence[mdls.Role],
10356
- query_params={"fields": fields, "ids": ids},
10458
+ query_params={
10459
+ "fields": fields,
10460
+ "ids": ids,
10461
+ "get_all_support_roles": get_all_support_roles,
10462
+ },
10357
10463
  transport_options=transport_options,
10358
10464
  ),
10359
10465
  )
@@ -10423,8 +10529,6 @@ class Looker40SDK(api_methods.APIMethods):
10423
10529
  built_in: Optional[bool] = None,
10424
10530
  # Combine given search criteria in a boolean OR expression.
10425
10531
  filter_or: Optional[bool] = None,
10426
- # Search for Looker support roles.
10427
- is_support_role: Optional[bool] = None,
10428
10532
  transport_options: Optional[transport.TransportOptions] = None,
10429
10533
  ) -> Sequence[mdls.Role]:
10430
10534
  """Search Roles"""
@@ -10442,7 +10546,6 @@ class Looker40SDK(api_methods.APIMethods):
10442
10546
  "name": name,
10443
10547
  "built_in": built_in,
10444
10548
  "filter_or": filter_or,
10445
- "is_support_role": is_support_role,
10446
10549
  },
10447
10550
  transport_options=transport_options,
10448
10551
  ),
@@ -12008,13 +12111,13 @@ class Looker40SDK(api_methods.APIMethods):
12008
12111
  first_name: Optional[str] = None,
12009
12112
  # Match Last name.
12010
12113
  last_name: Optional[str] = None,
12011
- # Search for user accounts associated with Looker employees
12114
+ # Search for user accounts associated with Looker employees. Availability of this filter is limited to users with permission to view complete user details.
12012
12115
  verified_looker_employee: Optional[bool] = None,
12013
12116
  # Search for only embed users
12014
12117
  embed_user: Optional[bool] = None,
12015
- # Search for the user with this email address
12118
+ # Search for the user with this email address. Availability of this filter is limited to users with permission to view complete user details.
12016
12119
  email: Optional[str] = None,
12017
- # Search for disabled user accounts
12120
+ # Search for disabled user accounts. Availability of this filter is limited to users with permission to view complete user details.
12018
12121
  is_disabled: Optional[bool] = None,
12019
12122
  # Combine given search criteria in a boolean OR expression
12020
12123
  filter_or: Optional[bool] = None,
@@ -12022,6 +12125,10 @@ class Looker40SDK(api_methods.APIMethods):
12022
12125
  content_metadata_id: Optional[str] = None,
12023
12126
  # Search for users who are direct members of this group
12024
12127
  group_id: Optional[str] = None,
12128
+ # Search for users who can manage API3 credentials. This field may only be applicable for [Looker (Google Cloud core)](https://cloud.google.com/looker/docs/r/looker-core/overview). Availability of this filter is limited to users with permission to view complete user details. This is an experimental feature and may not yet be available on your instance.
12129
+ can_manage_api3_creds: Optional[bool] = None,
12130
+ # Search for service account users. Send true to get only service accounts, or false to get all other types of users. This field may only be applicable for [Looker (Google Cloud core)](https://cloud.google.com/looker/docs/r/looker-core/overview). Availability of this filter is limited to users with permission to view complete user details. This is an experimental feature and may not yet be available on your instance.
12131
+ is_service_account: Optional[bool] = None,
12025
12132
  transport_options: Optional[transport.TransportOptions] = None,
12026
12133
  ) -> Sequence[mdls.User]:
12027
12134
  """Search Users"""
@@ -12047,6 +12154,8 @@ class Looker40SDK(api_methods.APIMethods):
12047
12154
  "filter_or": filter_or,
12048
12155
  "content_metadata_id": content_metadata_id,
12049
12156
  "group_id": group_id,
12157
+ "can_manage_api3_creds": can_manage_api3_creds,
12158
+ "is_service_account": is_service_account,
12050
12159
  },
12051
12160
  transport_options=transport_options,
12052
12161
  ),
@@ -12658,6 +12767,37 @@ class Looker40SDK(api_methods.APIMethods):
12658
12767
  )
12659
12768
  return response
12660
12769
 
12770
+ # ### API login information for the specified user. This is for the newer API keys that can be added for any user.
12771
+ #
12772
+ # Calls to this endpoint may be denied by [Looker (Google Cloud core)](https://cloud.google.com/looker/docs/r/looker-core/overview).
12773
+ #
12774
+ # PATCH /users/{user_id}/credentials_api3/{credentials_api3_id} -> mdls.CredentialsApi3
12775
+ def update_user_credentials_api3(
12776
+ self,
12777
+ # Id of user
12778
+ user_id: str,
12779
+ # Id of API Credential
12780
+ credentials_api3_id: str,
12781
+ body: mdls.WriteCredentialsApi3,
12782
+ # Requested fields.
12783
+ fields: Optional[str] = None,
12784
+ transport_options: Optional[transport.TransportOptions] = None,
12785
+ ) -> mdls.CredentialsApi3:
12786
+ """Update API Credential"""
12787
+ user_id = self.encode_path_param(user_id)
12788
+ credentials_api3_id = self.encode_path_param(credentials_api3_id)
12789
+ response = cast(
12790
+ mdls.CredentialsApi3,
12791
+ self.patch(
12792
+ path=f"/users/{user_id}/credentials_api3/{credentials_api3_id}",
12793
+ structure=mdls.CredentialsApi3,
12794
+ query_params={"fields": fields},
12795
+ body=body,
12796
+ transport_options=transport_options,
12797
+ ),
12798
+ )
12799
+ return response
12800
+
12661
12801
  # ### API login information for the specified user. This is for the newer API keys that can be added for any user.
12662
12802
  #
12663
12803
  # Calls to this endpoint may be denied by [Looker (Google Cloud core)](https://cloud.google.com/looker/docs/r/looker-core/overview).
@@ -13233,6 +13373,61 @@ class Looker40SDK(api_methods.APIMethods):
13233
13373
  )
13234
13374
  return response
13235
13375
 
13376
+ # ### Create a service account with the specified information. This action is restricted to Looker admins.
13377
+ #
13378
+ # Calls to this endpoint may only be available for [Looker (Google Cloud core)](https://cloud.google.com/looker/docs/r/looker-core/overview).
13379
+ #
13380
+ # POST /users/service_accounts -> mdls.ServiceAccount
13381
+ def create_service_account(
13382
+ self,
13383
+ body: mdls.WriteServiceAccount,
13384
+ # Requested fields.
13385
+ fields: Optional[str] = None,
13386
+ transport_options: Optional[transport.TransportOptions] = None,
13387
+ ) -> mdls.ServiceAccount:
13388
+ """Create Service Account"""
13389
+ response = cast(
13390
+ mdls.ServiceAccount,
13391
+ self.post(
13392
+ path="/users/service_accounts",
13393
+ structure=mdls.ServiceAccount,
13394
+ query_params={"fields": fields},
13395
+ body=body,
13396
+ transport_options=transport_options,
13397
+ ),
13398
+ )
13399
+ return response
13400
+
13401
+ # ### Update information for a specific service account. This action is restricted to Looker admins.
13402
+ #
13403
+ # This endpoint is exclusively for updating service accounts. To update a regular user, please use the `PATCH /api/3.x/users/:user_id` endpoint instead.
13404
+ #
13405
+ # Calls to this endpoint may only be available for [Looker (Google Cloud core)](https://cloud.google.com/looker/docs/r/looker-core/overview).
13406
+ #
13407
+ # PATCH /users/service_accounts/{user_id} -> mdls.ServiceAccount
13408
+ def update_service_account(
13409
+ self,
13410
+ # Id of service account
13411
+ user_id: str,
13412
+ body: mdls.WriteServiceAccount,
13413
+ # Requested fields.
13414
+ fields: Optional[str] = None,
13415
+ transport_options: Optional[transport.TransportOptions] = None,
13416
+ ) -> mdls.ServiceAccount:
13417
+ """Update Service Account"""
13418
+ user_id = self.encode_path_param(user_id)
13419
+ response = cast(
13420
+ mdls.ServiceAccount,
13421
+ self.patch(
13422
+ path=f"/users/service_accounts/{user_id}",
13423
+ structure=mdls.ServiceAccount,
13424
+ query_params={"fields": fields},
13425
+ body=body,
13426
+ transport_options=transport_options,
13427
+ ),
13428
+ )
13429
+ return response
13430
+
13236
13431
  # endregion
13237
13432
 
13238
13433
  # region UserAttribute: Manage User Attributes