From 304d0d0688349efad0499d37609605e14df7e97d Mon Sep 17 00:00:00 2001 From: "Dr. Strangelove" Date: Tue, 9 Nov 2021 20:04:42 -0500 Subject: [PATCH] feat: Looker 21.20 bindings (#899) * Updated packages for Looker 21.20 * fix: codgegen for python had a parameter called 'models' but also a variable called 'models'. The names interfered. Aliased the models namespace to mdls in methods.py. * docs: added note about linting to README * fix: alias models namespace to mdls so no conflict with parameter models * fix: look.id is now a string but tests were checking for integer * fix: fixed minor changes to specs * fix: add sdk-codegen/src tests into the mix --- .github/workflows/codegen-ci.yml | 2 +- README.md | 22 + csharp/rtl/Constants.cs | 2 +- csharp/sdk/3.1/methods.cs | 69 +- csharp/sdk/3.1/models.cs | 4 +- csharp/sdk/4.0/methods.cs | 132 +- csharp/sdk/4.0/models.cs | 87 +- go/sdk/v3/methods.go | 42 +- go/sdk/v3/models.go | 13 +- go/sdk/v4/methods.go | 95 +- go/sdk/v4/models.go | 81 +- kotlin/src/main/com/looker/sdk/4.0/methods.kt | 139 +- kotlin/src/main/com/looker/sdk/4.0/models.kt | 92 +- kotlin/src/main/com/looker/sdk/4.0/streams.kt | 135 +- kotlin/src/main/com/looker/sdk/Constants.kt | 2 +- kotlin/src/test/TestMethods.kt | 6 +- packages/hackathon/package.json | 16 +- packages/sdk-codegen/src/python.gen.spec.ts | 58 +- packages/sdk-codegen/src/python.gen.ts | 6 +- packages/sdk-codegen/src/sdkModels.spec.ts | 2 +- packages/sdk-codegen/src/specDiff.spec.ts | 2 +- packages/sdk/src/3.1/funcs.ts | 79 +- packages/sdk/src/3.1/methods.ts | 73 +- packages/sdk/src/3.1/methodsInterface.ts | 49 +- packages/sdk/src/3.1/models.ts | 24 +- packages/sdk/src/3.1/streams.ts | 85 +- packages/sdk/src/4.0/funcs.ts | 157 +- packages/sdk/src/4.0/methods.ts | 147 +- packages/sdk/src/4.0/methodsInterface.ts | 98 +- packages/sdk/src/4.0/models.ts | 144 +- packages/sdk/src/4.0/streams.ts | 167 +- packages/sdk/src/constants.ts | 2 +- python/looker_sdk/sdk/api31/methods.py | 2584 +++++++------- python/looker_sdk/sdk/api31/models.py | 4 +- python/looker_sdk/sdk/api40/methods.py | 2955 +++++++++-------- python/looker_sdk/sdk/api40/models.py | 195 +- python/looker_sdk/sdk/constants.py | 2 +- python/tests/integration/test_methods.py | 10 +- spec/Looker.3.1.json | 67 +- spec/Looker.3.1.oas.json | 85 +- spec/Looker.4.0.json | 367 +- spec/Looker.4.0.oas.json | 437 ++- swift/looker/rtl/constants.swift | 2 +- swift/looker/sdk/methods.swift | 161 +- swift/looker/sdk/models.swift | 381 ++- swift/looker/sdk/streams.swift | 157 +- yarn.lock | 6 +- 47 files changed, 5842 insertions(+), 3603 deletions(-) diff --git a/.github/workflows/codegen-ci.yml b/.github/workflows/codegen-ci.yml index 14085f995..e19f4cfdd 100644 --- a/.github/workflows/codegen-ci.yml +++ b/.github/workflows/codegen-ci.yml @@ -84,7 +84,7 @@ jobs: ${{ github.workspace }}/.github/scripts/wait_for_looker.sh - name: Run unit tests - run: yarn jest "packages/sdk-codegen(-utils|-scripts)/src" --reporters=default --reporters=jest-junit + run: yarn jest "packages/sdk-codegen(|-utils|-scripts)/src" --reporters=default --reporters=jest-junit - name: Delete looker.ini mock run: rm looker.ini diff --git a/README.md b/README.md index 350ca2fce..2dcdca0fc 100644 --- a/README.md +++ b/README.md @@ -190,6 +190,28 @@ yarn run to see the list of all scripts that can be run by the code generator. +After generation, the generated code might not conform with the code standards. +Changes cannot be commited until they pass the lint tests. +This can be checked with the following: +```sh +yarn lint +``` + +For a faster run, only the modified files can be checked with any of these +commands: +```sh +yarn lint-changed +yarn lint -q +yarn lint --quick +``` + +Fixes can automagically be applied with one of the following: +```sh +yarn lint-changed-fix +yarn lint -q -f +yarn lint --quick --fix +``` + ## SDK Examples The [examples directory](/examples) contains code snippets and projects written using the Looker language SDKs. You may find useful code in that repository. and are also welcome to contribute additional examples. diff --git a/csharp/rtl/Constants.cs b/csharp/rtl/Constants.cs index 36c3dfa58..90125ee1c 100644 --- a/csharp/rtl/Constants.cs +++ b/csharp/rtl/Constants.cs @@ -61,7 +61,7 @@ public struct Constants public const string DefaultApiVersion = "4.0"; public const string AgentPrefix = "CS-SDK"; - public const string LookerVersion = "21.18"; + public const string LookerVersion = "21.20"; public const string Bearer = "Bearer"; public const string LookerAppiId = "x-looker-appid"; diff --git a/csharp/sdk/3.1/methods.cs b/csharp/sdk/3.1/methods.cs index ac73c555a..1cd79dce0 100644 --- a/csharp/sdk/3.1/methods.cs +++ b/csharp/sdk/3.1/methods.cs @@ -21,7 +21,7 @@ /// SOFTWARE. /// -/// 376 API methods +/// 378 API methods #nullable enable using System; @@ -2447,6 +2447,52 @@ public async Task> update_datagroup( #endregion Datagroup: Manage Datagroups + #region DerivedTable: View Derived Table graphs + + /// ### Discover information about derived tables + /// + /// GET /derived_table/graph/model/{model} -> DependencyGraph + /// + /// DependencyGraph Derived Table (application/json) + /// + /// The name of the Lookml model. + /// The format of the graph. Valid values are [dot]. Default is `dot` + /// Color denoting the build status of the graph. Grey = not built, green = built, yellow = building, red = error. + public async Task> graph_derived_tables_for_model( + string model, + string? format = null, + string? color = null, + ITransportSettings? options = null) +{ + model = SdkUtils.EncodeParam(model); + return await AuthRequest(HttpMethod.Get, $"/derived_table/graph/model/{model}", new Values { + { "format", format }, + { "color", color }},null,options); + } + + /// ### Get the subgraph representing this derived table and its dependencies. + /// + /// GET /derived_table/graph/view/{view} -> DependencyGraph + /// + /// DependencyGraph Graph of the derived table component, represented in the DOT language. (application/json) + /// + /// The derived table's view name. + /// The models where this derived table is defined. + /// The model directory to look in, either `dev` or `production`. + public async Task> graph_derived_tables_for_view( + string view, + string? models = null, + string? workspace = null, + ITransportSettings? options = null) +{ + view = SdkUtils.EncodeParam(view); + return await AuthRequest(HttpMethod.Get, $"/derived_table/graph/view/{view}", new Values { + { "models", models }, + { "workspace", workspace }},null,options); + } + + #endregion DerivedTable: View Derived Table graphs + #region Folder: Manage Folders /// Search for folders by creator id, parent id, name, etc @@ -3834,27 +3880,6 @@ public async Task> run_look( #region LookmlModel: Manage LookML Models - /// ### Discover information about derived tables - /// - /// GET /derived_table/graph/model/{model} -> DependencyGraph - /// - /// DependencyGraph Derived Table (application/json) - /// - /// The name of the Lookml model. - /// The format of the graph. Valid values are [dot]. Default is `dot` - /// Color denoting the build status of the graph. Grey = not built, green = built, yellow = building, red = error. - public async Task> graph_derived_tables_for_model( - string model, - string? format = null, - string? color = null, - ITransportSettings? options = null) -{ - model = SdkUtils.EncodeParam(model); - return await AuthRequest(HttpMethod.Get, $"/derived_table/graph/model/{model}", new Values { - { "format", format }, - { "color", color }},null,options); - } - /// ### Get information about all lookml models. /// /// GET /lookml_models -> LookmlModel[] diff --git a/csharp/sdk/3.1/models.cs b/csharp/sdk/3.1/models.cs index 1f3a32d91..d4a31735e 100644 --- a/csharp/sdk/3.1/models.cs +++ b/csharp/sdk/3.1/models.cs @@ -745,7 +745,7 @@ public class Dashboard : SdkModel /// The preferred route for viewing this dashboard (ie: dashboards or dashboards-next) public string? preferred_viewer { get; set; } = null; public SpaceBase? space { get; set; } - /// Enables alerts to keep in sync with dashboard filter changes - only available in Enhanced Alerts (beta) + /// Enables alerts to keep in sync with dashboard filter changes public bool? alert_sync_with_dashboard_filter_enabled { get; set; } = null; /// Background color public string? background_color { get; set; } = null; @@ -4532,7 +4532,7 @@ public class WriteDashboard : SdkModel /// id, content_metadata_id, created_at, creator_id, child_count, external_id, is_embed, is_embed_shared_root, is_embed_users_root, is_personal, is_personal_descendant, is_shared_root, is_users_root, can /// public WriteSpaceBase? space { get; set; } - /// Enables alerts to keep in sync with dashboard filter changes - only available in Enhanced Alerts (beta) + /// Enables alerts to keep in sync with dashboard filter changes public bool? alert_sync_with_dashboard_filter_enabled { get; set; } = null; /// Background color public string? background_color { get; set; } = null; diff --git a/csharp/sdk/4.0/methods.cs b/csharp/sdk/4.0/methods.cs index d8aa24495..fd515f378 100644 --- a/csharp/sdk/4.0/methods.cs +++ b/csharp/sdk/4.0/methods.cs @@ -21,7 +21,7 @@ /// SOFTWARE. /// -/// 425 API methods +/// 429 API methods #nullable enable using System; @@ -306,6 +306,35 @@ public async Task> logout( #region Auth: Manage User Authentication Configuration + /// ### Create an embed secret using the specified information. + /// + /// The value of the `secret` field will be set by Looker and returned. + /// + /// POST /embed_config/secrets -> EmbedSecret + /// + /// EmbedSecret embed secret (application/json) + /// + public async Task> create_embed_secret( + WriteEmbedSecret? body, + ITransportSettings? options = null) +{ + return await AuthRequest(HttpMethod.Post, "/embed_config/secrets", null,body,options); + } + + /// ### Delete an embed secret. + /// + /// DELETE /embed_config/secrets/{embed_secret_id} -> string + /// + /// string Successfully deleted. (application/json) + /// + /// Id of Embed Secret + public async Task> delete_embed_secret( + long embed_secret_id, + ITransportSettings? options = null) +{ + return await AuthRequest(HttpMethod.Delete, $"/embed_config/secrets/{embed_secret_id}", null,null,options); + } + /// ### Create SSO Embed URL /// /// Creates an SSO embed URL and cryptographically signs it with an embed secret. @@ -3582,6 +3611,52 @@ public async Task> update_datagroup( #endregion Datagroup: Manage Datagroups + #region DerivedTable: View Derived Table graphs + + /// ### Discover information about derived tables + /// + /// GET /derived_table/graph/model/{model} -> DependencyGraph + /// + /// DependencyGraph Derived Table (application/json) + /// + /// The name of the Lookml model. + /// The format of the graph. Valid values are [dot]. Default is `dot` + /// Color denoting the build status of the graph. Grey = not built, green = built, yellow = building, red = error. + public async Task> graph_derived_tables_for_model( + string model, + string? format = null, + string? color = null, + ITransportSettings? options = null) +{ + model = SdkUtils.EncodeParam(model); + return await AuthRequest(HttpMethod.Get, $"/derived_table/graph/model/{model}", new Values { + { "format", format }, + { "color", color }},null,options); + } + + /// ### Get the subgraph representing this derived table and its dependencies. + /// + /// GET /derived_table/graph/view/{view} -> DependencyGraph + /// + /// DependencyGraph Graph of the derived table component, represented in the DOT language. (application/json) + /// + /// The derived table's view name. + /// The models where this derived table is defined. + /// The model directory to look in, either `dev` or `production`. + public async Task> graph_derived_tables_for_view( + string view, + string? models = null, + string? workspace = null, + ITransportSettings? options = null) +{ + view = SdkUtils.EncodeParam(view); + return await AuthRequest(HttpMethod.Get, $"/derived_table/graph/view/{view}", new Values { + { "models", models }, + { "workspace", workspace }},null,options); + } + + #endregion DerivedTable: View Derived Table graphs + #region Folder: Manage Folders /// Search for folders by creator id, parent id, name, etc @@ -4636,10 +4711,11 @@ public async Task> search_looks( /// Id of look /// Requested fields. public async Task> look( - long look_id, + string look_id, string? fields = null, ITransportSettings? options = null) { + look_id = SdkUtils.EncodeParam(look_id); return await AuthRequest(HttpMethod.Get, $"/looks/{look_id}", new Values { { "fields", fields }},null,options); } @@ -4672,11 +4748,12 @@ public async Task> look( /// Id of look /// Requested fields. public async Task> update_look( - long look_id, + string look_id, WriteLookWithQuery body, string? fields = null, ITransportSettings? options = null) { + look_id = SdkUtils.EncodeParam(look_id); return await AuthRequest(HttpMethod.Patch, $"/looks/{look_id}", new Values { { "fields", fields }},body,options); } @@ -4695,9 +4772,10 @@ public async Task> update_look( /// /// Id of look public async Task> delete_look( - long look_id, + string look_id, ITransportSettings? options = null) { + look_id = SdkUtils.EncodeParam(look_id); return await AuthRequest(HttpMethod.Delete, $"/looks/{look_id}", null,null,options); } @@ -4746,7 +4824,7 @@ public async Task> delete_look( /// Rebuild PDTS used in query. /// Perform table calculations on query results public async Task> run_look( - long look_id, + string look_id, string result_format, long? limit = null, bool? apply_formatting = null, @@ -4762,6 +4840,7 @@ public async Task> run_look( bool? server_table_calcs = null, ITransportSettings? options = null) where TSuccess : class { + look_id = SdkUtils.EncodeParam(look_id); result_format = SdkUtils.EncodeParam(result_format); return await AuthRequest(HttpMethod.Get, $"/looks/{look_id}/run/{result_format}", new Values { { "limit", limit }, @@ -4793,10 +4872,11 @@ public async Task> run_look( /// Look id to copy. /// Folder id to copy to. public async Task> copy_look( - long look_id, + string look_id, string? folder_id = null, ITransportSettings? options = null) { + look_id = SdkUtils.EncodeParam(look_id); return await AuthRequest(HttpMethod.Post, $"/looks/{look_id}/copy", new Values { { "folder_id", folder_id }},null,options); } @@ -4815,10 +4895,11 @@ public async Task> copy_look( /// Look id to move. /// Folder id to move to. public async Task> move_look( - long look_id, + string look_id, string folder_id, ITransportSettings? options = null) { + look_id = SdkUtils.EncodeParam(look_id); return await AuthRequest(HttpMethod.Patch, $"/looks/{look_id}/move", new Values { { "folder_id", folder_id }},null,options); } @@ -4827,27 +4908,6 @@ public async Task> move_look( #region LookmlModel: Manage LookML Models - /// ### Discover information about derived tables - /// - /// GET /derived_table/graph/model/{model} -> DependencyGraph - /// - /// DependencyGraph Derived Table (application/json) - /// - /// The name of the Lookml model. - /// The format of the graph. Valid values are [dot]. Default is `dot` - /// Color denoting the build status of the graph. Grey = not built, green = built, yellow = building, red = error. - public async Task> graph_derived_tables_for_model( - string model, - string? format = null, - string? color = null, - ITransportSettings? options = null) -{ - model = SdkUtils.EncodeParam(model); - return await AuthRequest(HttpMethod.Get, $"/derived_table/graph/model/{model}", new Values { - { "format", format }, - { "color", color }},null,options); - } - /// ### Get information about all lookml models. /// /// GET /lookml_models -> LookmlModel[] @@ -6187,6 +6247,7 @@ public async Task> create_query( /// Prefix to use for drill links (url encoded). /// Rebuild PDTS used in query. /// Perform table calculations on query results + /// Specifies the source of this call. public async Task> run_query( long query_id, string result_format, @@ -6202,6 +6263,7 @@ public async Task> run_query( string? path_prefix = null, bool? rebuild_pdts = null, bool? server_table_calcs = null, + string? source = null, ITransportSettings? options = null) where TSuccess : class { result_format = SdkUtils.EncodeParam(result_format); @@ -6217,7 +6279,8 @@ public async Task> run_query( { "cache_only", cache_only }, { "path_prefix", path_prefix }, { "rebuild_pdts", rebuild_pdts }, - { "server_table_calcs", server_table_calcs }},null,options); + { "server_table_calcs", server_table_calcs }, + { "source", source }},null,options); } /// ### Run the query that is specified inline in the posted body. @@ -8707,20 +8770,19 @@ public async Task> all_user_credential /// ### API 3 login information for the specified user. This is for the newer API keys that can be added for any user. /// - /// POST /users/{user_id}/credentials_api3 -> CredentialsApi3 + /// POST /users/{user_id}/credentials_api3 -> CreateCredentialsApi3 /// - /// CredentialsApi3 API 3 Credential (application/json) + /// CreateCredentialsApi3 API 3 Credential (application/json) /// /// id of user /// Requested fields. - public async Task> create_user_credentials_api3( + public async Task> create_user_credentials_api3( long user_id, - CredentialsApi3? body, string? fields = null, ITransportSettings? options = null) { - return await AuthRequest(HttpMethod.Post, $"/users/{user_id}/credentials_api3", new Values { - { "fields", fields }},body,options); + return await AuthRequest(HttpMethod.Post, $"/users/{user_id}/credentials_api3", new Values { + { "fields", fields }},null,options); } /// ### Embed login information for the specified user. diff --git a/csharp/sdk/4.0/models.cs b/csharp/sdk/4.0/models.cs index 81c7c1f35..ab6c9da3f 100644 --- a/csharp/sdk/4.0/models.cs +++ b/csharp/sdk/4.0/models.cs @@ -21,7 +21,7 @@ /// SOFTWARE. /// -/// 298 API models: 221 Spec, 0 Request, 57 Write, 20 Enum +/// 301 API models: 223 Spec, 0 Request, 58 Write, 20 Enum #nullable enable using System; @@ -291,7 +291,7 @@ public class BoardItem : SdkModel /// The container folder name of the content (read-only) public string? location { get; set; } = null; /// Look to base this item on - public long? look_id { get; set; } = null; + public string? look_id { get; set; } = null; /// LookML Dashboard to base this item on public string? lookml_dashboard_id { get; set; } = null; /// An arbitrary integer representing the sort order within the section @@ -460,7 +460,7 @@ public class ContentFavorite : SdkModel /// Content Metadata Id associated with this ContentFavorite public long? content_metadata_id { get; set; } = null; /// Id of a look (read-only) - public long? look_id { get; set; } = null; + public string? look_id { get; set; } = null; /// Id of a dashboard (read-only) public long? dashboard_id { get; set; } = null; public LookBasic? look { get; set; } @@ -482,7 +482,7 @@ public class ContentMeta : SdkModel /// Id of associated dashboard when content_type is "dashboard" (read-only) public string? dashboard_id { get; set; } = null; /// Id of associated look when content_type is "look" (read-only) - public long? look_id { get; set; } = null; + public string? look_id { get; set; } = null; /// Id of associated folder when content_type is "space" (read-only) public string? folder_id { get; set; } = null; /// Content Type ("dashboard", "look", or "folder") (read-only) @@ -637,7 +637,7 @@ public class ContentValidationFolder : SdkModel public class ContentValidationLook : SdkModel { /// Unique Id (read-only) - public long? id { get; set; } = null; + public string? id { get; set; } = null; /// Look Title public string? title { get; set; } = null; /// Short Url (read-only) @@ -668,7 +668,7 @@ public class ContentValidationScheduledPlan : SdkModel /// Name of this scheduled plan public string? name { get; set; } = null; /// Id of a look - public long? look_id { get; set; } = null; + public string? look_id { get; set; } = null; /// Unique Id (read-only) public long? id { get; set; } = null; } @@ -696,7 +696,7 @@ public class ContentView : SdkModel /// Unique Id (read-only) public long? id { get; set; } = null; /// Id of viewed Look (read-only) - public long? look_id { get; set; } = null; + public string? look_id { get; set; } = null; /// Id of the viewed Dashboard (read-only) public long? dashboard_id { get; set; } = null; /// Name or title of underlying content (read-only) @@ -748,6 +748,26 @@ public class CreateCostEstimate : SdkModel public string? sql { get; set; } = null; } +public class CreateCredentialsApi3 : SdkModel +{ + /// Operations the current user is able to perform on this object (read-only) + public StringDictionary? can { get; set; } = null; + /// Unique Id (read-only) + public long? id { get; set; } = null; + /// API key client_id (read-only) + public string? client_id { get; set; } = null; + /// Timestamp for the creation of this credential (read-only) + public string? created_at { get; set; } = null; + /// Has this credential been disabled? (read-only) + public bool? is_disabled { get; set; } = null; + /// Short name for the type of this kind of credential (read-only) + public string? type { get; set; } = null; + /// API key client_secret (read-only) + public string? client_secret { get; set; } = null; + /// Link to get this item (read-only) + public string? url { get; set; } = null; +} + public class CreateDashboardFilter : SdkModel { /// Unique Id (read-only) @@ -835,12 +855,11 @@ public class CreateQueryTask : SdkModel /// Create the task but defer execution public bool? deferred { get; set; } = null; /// Id of look associated with query. - public long? look_id { get; set; } = null; + public string? look_id { get; set; } = null; /// Id of dashboard associated with query. public string? dashboard_id { get; set; } = null; } -/// WARNING: no writeable properties found for POST, PUT, or PATCH public class CredentialsApi3 : SdkModel { /// Operations the current user is able to perform on this object (read-only) @@ -1096,7 +1115,7 @@ public class Dashboard : SdkModel public string? slug { get; set; } = null; /// The preferred route for viewing this dashboard (ie: dashboards or dashboards-next) public string? preferred_viewer { get; set; } = null; - /// Enables alerts to keep in sync with dashboard filter changes - only available in Enhanced Alerts (beta) + /// Enables alerts to keep in sync with dashboard filter changes public bool? alert_sync_with_dashboard_filter_enabled { get; set; } = null; /// Background color public string? background_color { get; set; } = null; @@ -1750,6 +1769,22 @@ public class EmbedParams : SdkModel public bool? force_logout_login { get; set; } = null; } +public class EmbedSecret : SdkModel +{ + /// Signing algorithm to use with this secret. Either `hmac/sha-256`(default) or `hmac/sha-1` + public string? algorithm { get; set; } = null; + /// When secret was created (read-only) + public string? created_at { get; set; } = null; + /// Is this secret currently enabled + public bool? enabled { get; set; } = null; + /// Unique Id (read-only) + public long? id { get; set; } = null; + /// Secret for use with SSO embedding (read-only) + public string? secret { get; set; } = null; + /// Id of user who created this secret (read-only) + public long? user_id { get; set; } = null; +} + public class EmbedSsoParams : SdkModel { /// The complete URL of the Looker UI page to display in the embed context. For example, to display the dashboard with id 34, `target_url` would look like: `https://mycompany.looker.com:9999/dashboards/34`. `target_uri` MUST contain a scheme (HTTPS), domain name, and URL path. Port must be included if it is required to reach the Looker server from browser clients. If the Looker instance is behind a load balancer or other proxy, `target_uri` must be the public-facing domain name and port required to reach the Looker instance, not the actual internal network machine name of the Looker instance. @@ -2101,7 +2136,7 @@ public class HomepageItem : SdkModel /// The container folder name of the content (read-only) public string? location { get; set; } = null; /// Look to base this item on - public long? look_id { get; set; } = null; + public string? look_id { get; set; } = null; /// LookML Dashboard to base this item on public string? lookml_dashboard_id { get; set; } = null; /// An arbitrary integer representing the sort order within the section @@ -2558,7 +2593,7 @@ public class Look : SdkModel /// Id of content metadata (read-only) public long? content_metadata_id { get; set; } = null; /// Unique Id (read-only) - public long? id { get; set; } = null; + public string? id { get; set; } = null; /// Look Title public string? title { get; set; } = null; /// User Id @@ -3067,7 +3102,7 @@ public class LookWithDashboards : SdkModel /// Id of content metadata (read-only) public long? content_metadata_id { get; set; } = null; /// Unique Id (read-only) - public long? id { get; set; } = null; + public string? id { get; set; } = null; /// Look Title public string? title { get; set; } = null; /// User Id @@ -3131,7 +3166,7 @@ public class LookWithQuery : SdkModel /// Id of content metadata (read-only) public long? content_metadata_id { get; set; } = null; /// Unique Id (read-only) - public long? id { get; set; } = null; + public string? id { get; set; } = null; /// Look Title public string? title { get; set; } = null; /// User Id @@ -3775,7 +3810,7 @@ public class QueryTask : SdkModel /// Source of the results of the query. (read-only) public string? result_source { get; set; } = null; /// Id of look associated with query. - public long? look_id { get; set; } = null; + public string? look_id { get; set; } = null; /// Id of dashboard associated with query. public string? dashboard_id { get; set; } = null; /// The data format of the query results. (read-only) @@ -3801,7 +3836,7 @@ public class RenderTask : SdkModel /// Id of this render task (read-only) public string? id { get; set; } = null; /// Id of look to render (read-only) - public long? look_id { get; set; } = null; + public string? look_id { get; set; } = null; /// Id of lookml dashboard to render (read-only) public string? lookml_dashboard_id { get; set; } = null; /// Id of query to render (read-only) @@ -4147,7 +4182,7 @@ public class ScheduledPlan : SdkModel /// Whether the ScheduledPlan is enabled public bool? enabled { get; set; } = null; /// Id of a look - public long? look_id { get; set; } = null; + public string? look_id { get; set; } = null; /// Id of a dashboard public long? dashboard_id { get; set; } = null; /// Id of a LookML dashboard @@ -5022,7 +5057,7 @@ public class WriteBoardItem : SdkModel /// Associated Board Section public long? board_section_id { get; set; } = null; /// Look to base this item on - public long? look_id { get; set; } = null; + public string? look_id { get; set; } = null; /// LookML Dashboard to base this item on public string? lookml_dashboard_id { get; set; } = null; /// An arbitrary integer representing the sort order within the section @@ -5148,7 +5183,7 @@ public class WriteCreateQueryTask : SdkModel /// Create the task but defer execution public bool? deferred { get; set; } = null; /// Id of look associated with query. - public long? look_id { get; set; } = null; + public string? look_id { get; set; } = null; /// Id of dashboard associated with query. public string? dashboard_id { get; set; } = null; } @@ -5186,7 +5221,7 @@ public class WriteDashboard : SdkModel public string? slug { get; set; } = null; /// The preferred route for viewing this dashboard (ie: dashboards or dashboards-next) public string? preferred_viewer { get; set; } = null; - /// Enables alerts to keep in sync with dashboard filter changes - only available in Enhanced Alerts (beta) + /// Enables alerts to keep in sync with dashboard filter changes public bool? alert_sync_with_dashboard_filter_enabled { get; set; } = null; /// Background color public string? background_color { get; set; } = null; @@ -5452,6 +5487,16 @@ public class WriteDBConnectionOverride : SdkModel public string? after_connect_statements { get; set; } = null; } +/// Dynamic writeable type for EmbedSecret removes: +/// created_at, id, secret, user_id +public class WriteEmbedSecret : SdkModel +{ + /// Signing algorithm to use with this secret. Either `hmac/sha-256`(default) or `hmac/sha-1` + public string? algorithm { get; set; } = null; + /// Is this secret currently enabled + public bool? enabled { get; set; } = null; +} + /// Dynamic writeable type for ExternalOauthApplication removes: /// can, id, created_at public class WriteExternalOauthApplication : SdkModel @@ -5993,7 +6038,7 @@ public class WriteScheduledPlan : SdkModel /// Whether the ScheduledPlan is enabled public bool? enabled { get; set; } = null; /// Id of a look - public long? look_id { get; set; } = null; + public string? look_id { get; set; } = null; /// Id of a dashboard public long? dashboard_id { get; set; } = null; /// Id of a LookML dashboard diff --git a/go/sdk/v3/methods.go b/go/sdk/v3/methods.go index ff8b40a8c..32a2e4351 100644 --- a/go/sdk/v3/methods.go +++ b/go/sdk/v3/methods.go @@ -26,7 +26,7 @@ SOFTWARE. /* -376 API methods +378 API methods */ @@ -2005,6 +2005,34 @@ func (l *LookerSDK) UpdateDatagroup( // endregion Datagroup: Manage Datagroups + // region DerivedTable: View Derived Table graphs + +// ### Discover information about derived tables +// +// GET /derived_table/graph/model/{model} -> DependencyGraph +func (l *LookerSDK) GraphDerivedTablesForModel(request RequestGraphDerivedTablesForModel, + options *rtl.ApiSettings) (DependencyGraph, error) { + request.Model = url.PathEscape(request.Model) + var result DependencyGraph + err := l.session.Do(&result, "GET", "/3.1", fmt.Sprintf("/derived_table/graph/model/%v", request.Model), map[string]interface{}{"format": request.Format, "color": request.Color}, nil, options) + return result, err + +} + +// ### Get the subgraph representing this derived table and its dependencies. +// +// GET /derived_table/graph/view/{view} -> DependencyGraph +func (l *LookerSDK) GraphDerivedTablesForView(request RequestGraphDerivedTablesForView, + options *rtl.ApiSettings) (DependencyGraph, error) { + request.View = url.PathEscape(request.View) + var result DependencyGraph + err := l.session.Do(&result, "GET", "/3.1", fmt.Sprintf("/derived_table/graph/view/%v", request.View), map[string]interface{}{"models": request.Models, "workspace": request.Workspace}, nil, options) + return result, err + +} + + // endregion DerivedTable: View Derived Table graphs + // region Folder: Manage Folders // Search for folders by creator id, parent id, name, etc @@ -2943,18 +2971,6 @@ func (l *LookerSDK) RunLook(request RequestRunLook, // region LookmlModel: Manage LookML Models -// ### Discover information about derived tables -// -// GET /derived_table/graph/model/{model} -> DependencyGraph -func (l *LookerSDK) GraphDerivedTablesForModel(request RequestGraphDerivedTablesForModel, - options *rtl.ApiSettings) (DependencyGraph, error) { - request.Model = url.PathEscape(request.Model) - var result DependencyGraph - err := l.session.Do(&result, "GET", "/3.1", fmt.Sprintf("/derived_table/graph/model/%v", request.Model), map[string]interface{}{"format": request.Format, "color": request.Color}, nil, options) - return result, err - -} - // ### Get information about all lookml models. // // GET /lookml_models -> []LookmlModel diff --git a/go/sdk/v3/models.go b/go/sdk/v3/models.go index f6fdb7838..075ae1223 100644 --- a/go/sdk/v3/models.go +++ b/go/sdk/v3/models.go @@ -26,7 +26,7 @@ SOFTWARE. /* -302 API models: 188 Spec, 47 Request, 51 Write, 16 Enum +303 API models: 188 Spec, 48 Request, 51 Write, 16 Enum */ @@ -482,7 +482,7 @@ type Dashboard struct { Slug *string `json:"slug,omitempty"` // Content Metadata Slug PreferredViewer *string `json:"preferred_viewer,omitempty"` // The preferred route for viewing this dashboard (ie: dashboards or dashboards-next) Space *SpaceBase `json:"space,omitempty"` - AlertSyncWithDashboardFilterEnabled *bool `json:"alert_sync_with_dashboard_filter_enabled,omitempty"` // Enables alerts to keep in sync with dashboard filter changes - only available in Enhanced Alerts (beta) + AlertSyncWithDashboardFilterEnabled *bool `json:"alert_sync_with_dashboard_filter_enabled,omitempty"` // Enables alerts to keep in sync with dashboard filter changes BackgroundColor *string `json:"background_color,omitempty"` // Background color CreatedAt *time.Time `json:"created_at,omitempty"` // Time that the Dashboard was created. CrossfilterEnabled *bool `json:"crossfilter_enabled,omitempty"` // Enables crossfiltering in dashboards - only available in dashboards-next (beta) @@ -2185,6 +2185,13 @@ type RequestGraphDerivedTablesForModel struct { Color *string `json:"color,omitempty"` // Color denoting the build status of the graph. Grey = not built, green = built, yellow = building, red = error. } +// Dynamically generated request type for graph_derived_tables_for_view +type RequestGraphDerivedTablesForView struct { + View string `json:"view"` // The derived table's view name. + Models *string `json:"models,omitempty"` // The models where this derived table is defined. + Workspace *string `json:"workspace,omitempty"` // The model directory to look in, either `dev` or `production`. +} + // Dynamically generated request type for login type RequestLogin struct { ClientId *string `json:"client_id,omitempty"` // client_id part of API3 Key. @@ -3240,7 +3247,7 @@ type WriteDashboard struct { PreferredViewer *string `json:"preferred_viewer,omitempty"` // The preferred route for viewing this dashboard (ie: dashboards or dashboards-next) Space *WriteSpaceBase `json:"space,omitempty"` // Dynamic writeable type for SpaceBase removes: // id, content_metadata_id, created_at, creator_id, child_count, external_id, is_embed, is_embed_shared_root, is_embed_users_root, is_personal, is_personal_descendant, is_shared_root, is_users_root, can - AlertSyncWithDashboardFilterEnabled *bool `json:"alert_sync_with_dashboard_filter_enabled,omitempty"` // Enables alerts to keep in sync with dashboard filter changes - only available in Enhanced Alerts (beta) + AlertSyncWithDashboardFilterEnabled *bool `json:"alert_sync_with_dashboard_filter_enabled,omitempty"` // Enables alerts to keep in sync with dashboard filter changes BackgroundColor *string `json:"background_color,omitempty"` // Background color CrossfilterEnabled *bool `json:"crossfilter_enabled,omitempty"` // Enables crossfiltering in dashboards - only available in dashboards-next (beta) Deleted *bool `json:"deleted,omitempty"` // Whether or not a dashboard is 'soft' deleted. diff --git a/go/sdk/v4/methods.go b/go/sdk/v4/methods.go index dccef862f..cb608ecd7 100644 --- a/go/sdk/v4/methods.go +++ b/go/sdk/v4/methods.go @@ -26,7 +26,7 @@ SOFTWARE. /* -425 API methods +429 API methods */ @@ -260,6 +260,32 @@ func (l *LookerSDK) Logout( // region Auth: Manage User Authentication Configuration +// ### Create an embed secret using the specified information. +// +// The value of the `secret` field will be set by Looker and returned. +// +// POST /embed_config/secrets -> EmbedSecret +func (l *LookerSDK) CreateEmbedSecret( + body WriteEmbedSecret, + options *rtl.ApiSettings) (EmbedSecret, error) { + var result EmbedSecret + err := l.session.Do(&result, "POST", "/4.0", "/embed_config/secrets", nil, body, options) + return result, err + +} + +// ### Delete an embed secret. +// +// DELETE /embed_config/secrets/{embed_secret_id} -> string +func (l *LookerSDK) DeleteEmbedSecret( + embedSecretId int64, + options *rtl.ApiSettings) (string, error) { + var result string + err := l.session.Do(&result, "DELETE", "/4.0", fmt.Sprintf("/embed_config/secrets/%v", embedSecretId), nil, nil, options) + return result, err + +} + // ### Create SSO Embed URL // // Creates an SSO embed URL and cryptographically signs it with an embed secret. @@ -2893,6 +2919,34 @@ func (l *LookerSDK) UpdateDatagroup( // endregion Datagroup: Manage Datagroups + // region DerivedTable: View Derived Table graphs + +// ### Discover information about derived tables +// +// GET /derived_table/graph/model/{model} -> DependencyGraph +func (l *LookerSDK) GraphDerivedTablesForModel(request RequestGraphDerivedTablesForModel, + options *rtl.ApiSettings) (DependencyGraph, error) { + request.Model = url.PathEscape(request.Model) + var result DependencyGraph + err := l.session.Do(&result, "GET", "/4.0", fmt.Sprintf("/derived_table/graph/model/%v", request.Model), map[string]interface{}{"format": request.Format, "color": request.Color}, nil, options) + return result, err + +} + +// ### Get the subgraph representing this derived table and its dependencies. +// +// GET /derived_table/graph/view/{view} -> DependencyGraph +func (l *LookerSDK) GraphDerivedTablesForView(request RequestGraphDerivedTablesForView, + options *rtl.ApiSettings) (DependencyGraph, error) { + request.View = url.PathEscape(request.View) + var result DependencyGraph + err := l.session.Do(&result, "GET", "/4.0", fmt.Sprintf("/derived_table/graph/view/%v", request.View), map[string]interface{}{"models": request.Models, "workspace": request.Workspace}, nil, options) + return result, err + +} + + // endregion DerivedTable: View Derived Table graphs + // region Folder: Manage Folders // Search for folders by creator id, parent id, name, etc @@ -3583,9 +3637,10 @@ func (l *LookerSDK) SearchLooks(request RequestSearchLooks, // // GET /looks/{look_id} -> LookWithQuery func (l *LookerSDK) Look( - lookId int64, + lookId string, fields string, options *rtl.ApiSettings) (LookWithQuery, error) { + lookId = url.PathEscape(lookId) var result LookWithQuery err := l.session.Do(&result, "GET", "/4.0", fmt.Sprintf("/looks/%v", lookId), map[string]interface{}{"fields": fields}, nil, options) return result, err @@ -3615,10 +3670,11 @@ func (l *LookerSDK) Look( // // PATCH /looks/{look_id} -> LookWithQuery func (l *LookerSDK) UpdateLook( - lookId int64, + lookId string, body WriteLookWithQuery, fields string, options *rtl.ApiSettings) (LookWithQuery, error) { + lookId = url.PathEscape(lookId) var result LookWithQuery err := l.session.Do(&result, "PATCH", "/4.0", fmt.Sprintf("/looks/%v", lookId), map[string]interface{}{"fields": fields}, body, options) return result, err @@ -3635,8 +3691,9 @@ func (l *LookerSDK) UpdateLook( // // DELETE /looks/{look_id} -> string func (l *LookerSDK) DeleteLook( - lookId int64, + lookId string, options *rtl.ApiSettings) (string, error) { + lookId = url.PathEscape(lookId) var result string err := l.session.Do(&result, "DELETE", "/4.0", fmt.Sprintf("/looks/%v", lookId), nil, nil, options) return result, err @@ -3667,6 +3724,7 @@ func (l *LookerSDK) DeleteLook( // **Note**: Binary content may be returned by this method. func (l *LookerSDK) RunLook(request RequestRunLook, options *rtl.ApiSettings) (string, error) { + request.LookId = url.PathEscape(request.LookId) request.ResultFormat = url.PathEscape(request.ResultFormat) var result string err := l.session.Do(&result, "GET", "/4.0", fmt.Sprintf("/looks/%v/run/%v", request.LookId, request.ResultFormat), map[string]interface{}{"limit": request.Limit, "apply_formatting": request.ApplyFormatting, "apply_vis": request.ApplyVis, "cache": request.Cache, "image_width": request.ImageWidth, "image_height": request.ImageHeight, "generate_drill_links": request.GenerateDrillLinks, "force_production": request.ForceProduction, "cache_only": request.CacheOnly, "path_prefix": request.PathPrefix, "rebuild_pdts": request.RebuildPdts, "server_table_calcs": request.ServerTableCalcs}, nil, options) @@ -3684,9 +3742,10 @@ func (l *LookerSDK) RunLook(request RequestRunLook, // // POST /looks/{look_id}/copy -> LookWithQuery func (l *LookerSDK) CopyLook( - lookId int64, + lookId string, folderId string, options *rtl.ApiSettings) (LookWithQuery, error) { + lookId = url.PathEscape(lookId) var result LookWithQuery err := l.session.Do(&result, "POST", "/4.0", fmt.Sprintf("/looks/%v/copy", lookId), map[string]interface{}{"folder_id": folderId}, nil, options) return result, err @@ -3702,9 +3761,10 @@ func (l *LookerSDK) CopyLook( // // PATCH /looks/{look_id}/move -> LookWithQuery func (l *LookerSDK) MoveLook( - lookId int64, + lookId string, folderId string, options *rtl.ApiSettings) (LookWithQuery, error) { + lookId = url.PathEscape(lookId) var result LookWithQuery err := l.session.Do(&result, "PATCH", "/4.0", fmt.Sprintf("/looks/%v/move", lookId), map[string]interface{}{"folder_id": folderId}, nil, options) return result, err @@ -3715,18 +3775,6 @@ func (l *LookerSDK) MoveLook( // region LookmlModel: Manage LookML Models -// ### Discover information about derived tables -// -// GET /derived_table/graph/model/{model} -> DependencyGraph -func (l *LookerSDK) GraphDerivedTablesForModel(request RequestGraphDerivedTablesForModel, - options *rtl.ApiSettings) (DependencyGraph, error) { - request.Model = url.PathEscape(request.Model) - var result DependencyGraph - err := l.session.Do(&result, "GET", "/4.0", fmt.Sprintf("/derived_table/graph/model/%v", request.Model), map[string]interface{}{"format": request.Format, "color": request.Color}, nil, options) - return result, err - -} - // ### Get information about all lookml models. // // GET /lookml_models -> []LookmlModel @@ -4730,7 +4778,7 @@ func (l *LookerSDK) RunQuery(request RequestRunQuery, options *rtl.ApiSettings) (string, error) { request.ResultFormat = url.PathEscape(request.ResultFormat) var result string - err := l.session.Do(&result, "GET", "/4.0", fmt.Sprintf("/queries/%v/run/%v", request.QueryId, request.ResultFormat), map[string]interface{}{"limit": request.Limit, "apply_formatting": request.ApplyFormatting, "apply_vis": request.ApplyVis, "cache": request.Cache, "image_width": request.ImageWidth, "image_height": request.ImageHeight, "generate_drill_links": request.GenerateDrillLinks, "force_production": request.ForceProduction, "cache_only": request.CacheOnly, "path_prefix": request.PathPrefix, "rebuild_pdts": request.RebuildPdts, "server_table_calcs": request.ServerTableCalcs}, nil, options) + err := l.session.Do(&result, "GET", "/4.0", fmt.Sprintf("/queries/%v/run/%v", request.QueryId, request.ResultFormat), map[string]interface{}{"limit": request.Limit, "apply_formatting": request.ApplyFormatting, "apply_vis": request.ApplyVis, "cache": request.Cache, "image_width": request.ImageWidth, "image_height": request.ImageHeight, "generate_drill_links": request.GenerateDrillLinks, "force_production": request.ForceProduction, "cache_only": request.CacheOnly, "path_prefix": request.PathPrefix, "rebuild_pdts": request.RebuildPdts, "server_table_calcs": request.ServerTableCalcs, "source": request.Source}, nil, options) return result, err } @@ -6587,14 +6635,13 @@ func (l *LookerSDK) AllUserCredentialsApi3s( // ### API 3 login information for the specified user. This is for the newer API keys that can be added for any user. // -// POST /users/{user_id}/credentials_api3 -> CredentialsApi3 +// POST /users/{user_id}/credentials_api3 -> CreateCredentialsApi3 func (l *LookerSDK) CreateUserCredentialsApi3( userId int64, - body CredentialsApi3, fields string, - options *rtl.ApiSettings) (CredentialsApi3, error) { - var result CredentialsApi3 - err := l.session.Do(&result, "POST", "/4.0", fmt.Sprintf("/users/%v/credentials_api3", userId), map[string]interface{}{"fields": fields}, body, options) + options *rtl.ApiSettings) (CreateCredentialsApi3, error) { + var result CreateCredentialsApi3 + err := l.session.Do(&result, "POST", "/4.0", fmt.Sprintf("/users/%v/credentials_api3", userId), map[string]interface{}{"fields": fields}, nil, options) return result, err } diff --git a/go/sdk/v4/models.go b/go/sdk/v4/models.go index 4c50db685..5c531224a 100644 --- a/go/sdk/v4/models.go +++ b/go/sdk/v4/models.go @@ -26,7 +26,7 @@ SOFTWARE. /* -352 API models: 221 Spec, 54 Request, 57 Write, 20 Enum +356 API models: 223 Spec, 55 Request, 58 Write, 20 Enum */ @@ -192,7 +192,7 @@ type BoardItem struct { Id *int64 `json:"id,omitempty"` // Unique Id ImageUrl *string `json:"image_url,omitempty"` // The actual image_url for display Location *string `json:"location,omitempty"` // The container folder name of the content - LookId *int64 `json:"look_id,omitempty"` // Look to base this item on + LookId *string `json:"look_id,omitempty"` // Look to base this item on LookmlDashboardId *string `json:"lookml_dashboard_id,omitempty"` // LookML Dashboard to base this item on Order *int64 `json:"order,omitempty"` // An arbitrary integer representing the sort order within the section Title *string `json:"title,omitempty"` // The actual title for display @@ -291,7 +291,7 @@ type ContentFavorite struct { Id *int64 `json:"id,omitempty"` // Unique Id UserId *int64 `json:"user_id,omitempty"` // User Id which owns this ContentFavorite ContentMetadataId *int64 `json:"content_metadata_id,omitempty"` // Content Metadata Id associated with this ContentFavorite - LookId *int64 `json:"look_id,omitempty"` // Id of a look + LookId *string `json:"look_id,omitempty"` // Id of a look DashboardId *int64 `json:"dashboard_id,omitempty"` // Id of a dashboard Look *LookBasic `json:"look,omitempty"` Dashboard *DashboardBase `json:"dashboard,omitempty"` @@ -305,7 +305,7 @@ type ContentMeta struct { Name *string `json:"name,omitempty"` // Name or title of underlying content ParentId *int64 `json:"parent_id,omitempty"` // Id of Parent Content DashboardId *string `json:"dashboard_id,omitempty"` // Id of associated dashboard when content_type is "dashboard" - LookId *int64 `json:"look_id,omitempty"` // Id of associated look when content_type is "look" + LookId *string `json:"look_id,omitempty"` // Id of associated look when content_type is "look" FolderId *string `json:"folder_id,omitempty"` // Id of associated folder when content_type is "space" ContentType *string `json:"content_type,omitempty"` // Content Type ("dashboard", "look", or "folder") Inherits *bool `json:"inherits,omitempty"` // Whether content inherits its access levels from parent @@ -400,7 +400,7 @@ type ContentValidationFolder struct { type ContentValidationLook struct { - Id *int64 `json:"id,omitempty"` // Unique Id + Id *string `json:"id,omitempty"` // Unique Id Title *string `json:"title,omitempty"` // Look Title ShortUrl *string `json:"short_url,omitempty"` // Short Url Folder *ContentValidationFolder `json:"folder,omitempty"` @@ -422,7 +422,7 @@ type ContentValidationLookMLDashboardElement struct { type ContentValidationScheduledPlan struct { Name *string `json:"name,omitempty"` // Name of this scheduled plan - LookId *int64 `json:"look_id,omitempty"` // Id of a look + LookId *string `json:"look_id,omitempty"` // Id of a look Id *int64 `json:"id,omitempty"` // Unique Id } @@ -444,7 +444,7 @@ type ContentValidatorError struct { type ContentView struct { Can *map[string]bool `json:"can,omitempty"` // Operations the current user is able to perform on this object Id *int64 `json:"id,omitempty"` // Unique Id - LookId *int64 `json:"look_id,omitempty"` // Id of viewed Look + LookId *string `json:"look_id,omitempty"` // Id of viewed Look DashboardId *int64 `json:"dashboard_id,omitempty"` // Id of the viewed Dashboard Title *string `json:"title,omitempty"` // Name or title of underlying content ContentMetadataId *int64 `json:"content_metadata_id,omitempty"` // Content metadata id of the Look or Dashboard @@ -478,6 +478,18 @@ type CreateCostEstimate struct { } +type CreateCredentialsApi3 struct { + Can *map[string]bool `json:"can,omitempty"` // Operations the current user is able to perform on this object + Id *int64 `json:"id,omitempty"` // Unique Id + ClientId *string `json:"client_id,omitempty"` // API key client_id + CreatedAt *string `json:"created_at,omitempty"` // Timestamp for the creation of this credential + IsDisabled *bool `json:"is_disabled,omitempty"` // Has this credential been disabled? + Type *string `json:"type,omitempty"` // Short name for the type of this kind of credential + ClientSecret *string `json:"client_secret,omitempty"` // API key client_secret + Url *string `json:"url,omitempty"` // Link to get this item +} + + type CreateDashboardFilter struct { Id *string `json:"id,omitempty"` // Unique Id DashboardId string `json:"dashboard_id"` // Id of Dashboard @@ -536,11 +548,11 @@ type CreateQueryTask struct { ResultFormat ResultFormat `json:"result_format"` // Desired async query result format. Valid values are: "inline_json", "json", "json_detail", "json_fe", "csv", "html", "md", "txt", "xlsx", "gsxml". Source *string `json:"source,omitempty"` // Source of query task Deferred *bool `json:"deferred,omitempty"` // Create the task but defer execution - LookId *int64 `json:"look_id,omitempty"` // Id of look associated with query. + LookId *string `json:"look_id,omitempty"` // Id of look associated with query. DashboardId *string `json:"dashboard_id,omitempty"` // Id of dashboard associated with query. } -// WARNING: no writeable properties found for POST, PUT, or PATCH + type CredentialsApi3 struct { Can *map[string]bool `json:"can,omitempty"` // Operations the current user is able to perform on this object Id *int64 `json:"id,omitempty"` // Unique Id @@ -691,7 +703,7 @@ type Dashboard struct { UserId *int64 `json:"user_id,omitempty"` // Id of User Slug *string `json:"slug,omitempty"` // Content Metadata Slug PreferredViewer *string `json:"preferred_viewer,omitempty"` // The preferred route for viewing this dashboard (ie: dashboards or dashboards-next) - AlertSyncWithDashboardFilterEnabled *bool `json:"alert_sync_with_dashboard_filter_enabled,omitempty"` // Enables alerts to keep in sync with dashboard filter changes - only available in Enhanced Alerts (beta) + AlertSyncWithDashboardFilterEnabled *bool `json:"alert_sync_with_dashboard_filter_enabled,omitempty"` // Enables alerts to keep in sync with dashboard filter changes BackgroundColor *string `json:"background_color,omitempty"` // Background color CreatedAt *time.Time `json:"created_at,omitempty"` // Time that the Dashboard was created. CrossfilterEnabled *bool `json:"crossfilter_enabled,omitempty"` // Enables crossfiltering in dashboards - only available in dashboards-next (beta) @@ -1083,6 +1095,16 @@ type EmbedParams struct { } +type EmbedSecret struct { + Algorithm *string `json:"algorithm,omitempty"` // Signing algorithm to use with this secret. Either `hmac/sha-256`(default) or `hmac/sha-1` + CreatedAt *string `json:"created_at,omitempty"` // When secret was created + Enabled *bool `json:"enabled,omitempty"` // Is this secret currently enabled + Id *int64 `json:"id,omitempty"` // Unique Id + Secret *string `json:"secret,omitempty"` // Secret for use with SSO embedding + UserId *int64 `json:"user_id,omitempty"` // Id of user who created this secret +} + + type EmbedSsoParams struct { TargetUrl string `json:"target_url"` // The complete URL of the Looker UI page to display in the embed context. For example, to display the dashboard with id 34, `target_url` would look like: `https://mycompany.looker.com:9999/dashboards/34`. `target_uri` MUST contain a scheme (HTTPS), domain name, and URL path. Port must be included if it is required to reach the Looker server from browser clients. If the Looker instance is behind a load balancer or other proxy, `target_uri` must be the public-facing domain name and port required to reach the Looker instance, not the actual internal network machine name of the Looker instance. SessionLength *int64 `json:"session_length,omitempty"` // Number of seconds the SSO embed session will be valid after the embed session is started. Defaults to 300 seconds. Maximum session length accepted is 2592000 seconds (30 days). @@ -1288,7 +1310,7 @@ type HomepageItem struct { Id *int64 `json:"id,omitempty"` // Unique Id ImageUrl *string `json:"image_url,omitempty"` // The actual image_url for display Location *string `json:"location,omitempty"` // The container folder name of the content - LookId *int64 `json:"look_id,omitempty"` // Look to base this item on + LookId *string `json:"look_id,omitempty"` // Look to base this item on LookmlDashboardId *string `json:"lookml_dashboard_id,omitempty"` // LookML Dashboard to base this item on Order *int64 `json:"order,omitempty"` // An arbitrary integer representing the sort order within the section SectionFetchTime *float32 `json:"section_fetch_time,omitempty"` // Number of seconds it took to fetch the section this item is in @@ -1560,7 +1582,7 @@ type LocalizationSettings struct { type Look struct { Can *map[string]bool `json:"can,omitempty"` // Operations the current user is able to perform on this object ContentMetadataId *int64 `json:"content_metadata_id,omitempty"` // Id of content metadata - Id *int64 `json:"id,omitempty"` // Unique Id + Id *string `json:"id,omitempty"` // Unique Id Title *string `json:"title,omitempty"` // Look Title UserId *int64 `json:"user_id,omitempty"` // User Id ContentFavoriteId *int64 `json:"content_favorite_id,omitempty"` // Content Favorite Id @@ -1860,7 +1882,7 @@ type LookModel struct { type LookWithDashboards struct { Can *map[string]bool `json:"can,omitempty"` // Operations the current user is able to perform on this object ContentMetadataId *int64 `json:"content_metadata_id,omitempty"` // Id of content metadata - Id *int64 `json:"id,omitempty"` // Unique Id + Id *string `json:"id,omitempty"` // Unique Id Title *string `json:"title,omitempty"` // Look Title UserId *int64 `json:"user_id,omitempty"` // User Id ContentFavoriteId *int64 `json:"content_favorite_id,omitempty"` // Content Favorite Id @@ -1895,7 +1917,7 @@ type LookWithDashboards struct { type LookWithQuery struct { Can *map[string]bool `json:"can,omitempty"` // Operations the current user is able to perform on this object ContentMetadataId *int64 `json:"content_metadata_id,omitempty"` // Id of content metadata - Id *int64 `json:"id,omitempty"` // Unique Id + Id *string `json:"id,omitempty"` // Unique Id Title *string `json:"title,omitempty"` // Look Title UserId *int64 `json:"user_id,omitempty"` // User Id ContentFavoriteId *int64 `json:"content_favorite_id,omitempty"` // Content Favorite Id @@ -2276,7 +2298,7 @@ type QueryTask struct { Runtime *float32 `json:"runtime,omitempty"` // Runtime of prior queries. RebuildPdts *bool `json:"rebuild_pdts,omitempty"` // Rebuild PDTS used in query. ResultSource *string `json:"result_source,omitempty"` // Source of the results of the query. - LookId *int64 `json:"look_id,omitempty"` // Id of look associated with query. + LookId *string `json:"look_id,omitempty"` // Id of look associated with query. DashboardId *string `json:"dashboard_id,omitempty"` // Id of dashboard associated with query. ResultFormat *string `json:"result_format,omitempty"` // The data format of the query results. } @@ -2291,7 +2313,7 @@ type RenderTask struct { FinalizedAt *string `json:"finalized_at,omitempty"` // Date/Time render task was completed Height *int64 `json:"height,omitempty"` // Output height in pixels. Flowed layouts may ignore this value. Id *string `json:"id,omitempty"` // Id of this render task - LookId *int64 `json:"look_id,omitempty"` // Id of look to render + LookId *string `json:"look_id,omitempty"` // Id of look to render LookmlDashboardId *string `json:"lookml_dashboard_id,omitempty"` // Id of lookml dashboard to render QueryId *int64 `json:"query_id,omitempty"` // Id of query to render DashboardElementId *string `json:"dashboard_element_id,omitempty"` // Id of dashboard element to render: UDD dashboard element would be numeric and LookML dashboard element would be model_name::dashboard_title::lookml_link_id @@ -2521,6 +2543,13 @@ type RequestGraphDerivedTablesForModel struct { Color *string `json:"color,omitempty"` // Color denoting the build status of the graph. Grey = not built, green = built, yellow = building, red = error. } +// Dynamically generated request type for graph_derived_tables_for_view +type RequestGraphDerivedTablesForView struct { + View string `json:"view"` // The derived table's view name. + Models *string `json:"models,omitempty"` // The models where this derived table is defined. + Workspace *string `json:"workspace,omitempty"` // The model directory to look in, either `dev` or `production`. +} + // Dynamically generated request type for login type RequestLogin struct { ClientId *string `json:"client_id,omitempty"` // client_id part of API3 Key. @@ -2571,7 +2600,7 @@ type RequestRunInlineQuery struct { // Dynamically generated request type for run_look type RequestRunLook struct { - LookId int64 `json:"look_id"` // Id of look + LookId string `json:"look_id"` // Id of look ResultFormat string `json:"result_format"` // Format of result Limit *int64 `json:"limit,omitempty"` // Row limit (may override the limit in the saved query). ApplyFormatting *bool `json:"apply_formatting,omitempty"` // Apply model-specified formatting to each result. @@ -2611,6 +2640,7 @@ type RequestRunQuery struct { PathPrefix *string `json:"path_prefix,omitempty"` // Prefix to use for drill links (url encoded). RebuildPdts *bool `json:"rebuild_pdts,omitempty"` // Rebuild PDTS used in query. ServerTableCalcs *bool `json:"server_table_calcs,omitempty"` // Perform table calculations on query results + Source *string `json:"source,omitempty"` // Specifies the source of this call. } // Dynamically generated request type for scheduled_plans_for_dashboard @@ -3091,7 +3121,7 @@ type ScheduledPlan struct { UserId *int64 `json:"user_id,omitempty"` // User Id which owns this scheduled plan RunAsRecipient *bool `json:"run_as_recipient,omitempty"` // Whether schedule is run as recipient (only applicable for email recipients) Enabled *bool `json:"enabled,omitempty"` // Whether the ScheduledPlan is enabled - LookId *int64 `json:"look_id,omitempty"` // Id of a look + LookId *string `json:"look_id,omitempty"` // Id of a look DashboardId *int64 `json:"dashboard_id,omitempty"` // Id of a dashboard LookmlDashboardId *string `json:"lookml_dashboard_id,omitempty"` // Id of a LookML dashboard FiltersString *string `json:"filters_string,omitempty"` // Query string to run look or dashboard with @@ -3612,7 +3642,7 @@ type WriteBoardItem struct { CustomUrl *string `json:"custom_url,omitempty"` // Custom url entered by the user, if present DashboardId *int64 `json:"dashboard_id,omitempty"` // Dashboard to base this item on BoardSectionId *int64 `json:"board_section_id,omitempty"` // Associated Board Section - LookId *int64 `json:"look_id,omitempty"` // Look to base this item on + LookId *string `json:"look_id,omitempty"` // Look to base this item on LookmlDashboardId *string `json:"lookml_dashboard_id,omitempty"` // LookML Dashboard to base this item on Order *int64 `json:"order,omitempty"` // An arbitrary integer representing the sort order within the section } @@ -3687,7 +3717,7 @@ type WriteCreateQueryTask struct { ResultFormat ResultFormat `json:"result_format"` // Desired async query result format. Valid values are: "inline_json", "json", "json_detail", "json_fe", "csv", "html", "md", "txt", "xlsx", "gsxml". Source *string `json:"source,omitempty"` // Source of query task Deferred *bool `json:"deferred,omitempty"` // Create the task but defer execution - LookId *int64 `json:"look_id,omitempty"` // Id of look associated with query. + LookId *string `json:"look_id,omitempty"` // Id of look associated with query. DashboardId *string `json:"dashboard_id,omitempty"` // Id of dashboard associated with query. } @@ -3710,7 +3740,7 @@ type WriteDashboard struct { Title *string `json:"title,omitempty"` // Dashboard Title Slug *string `json:"slug,omitempty"` // Content Metadata Slug PreferredViewer *string `json:"preferred_viewer,omitempty"` // The preferred route for viewing this dashboard (ie: dashboards or dashboards-next) - AlertSyncWithDashboardFilterEnabled *bool `json:"alert_sync_with_dashboard_filter_enabled,omitempty"` // Enables alerts to keep in sync with dashboard filter changes - only available in Enhanced Alerts (beta) + AlertSyncWithDashboardFilterEnabled *bool `json:"alert_sync_with_dashboard_filter_enabled,omitempty"` // Enables alerts to keep in sync with dashboard filter changes BackgroundColor *string `json:"background_color,omitempty"` // Background color CrossfilterEnabled *bool `json:"crossfilter_enabled,omitempty"` // Enables crossfiltering in dashboards - only available in dashboards-next (beta) Deleted *bool `json:"deleted,omitempty"` // Whether or not a dashboard is 'soft' deleted. @@ -3858,6 +3888,13 @@ type WriteDBConnectionOverride struct { AfterConnectStatements *string `json:"after_connect_statements,omitempty"` // SQL statements (semicolon separated) to issue after connecting to the database. Requires `custom_after_connect_statements` license feature } +// Dynamic writeable type for EmbedSecret removes: +// created_at, id, secret, user_id +type WriteEmbedSecret struct { + Algorithm *string `json:"algorithm,omitempty"` // Signing algorithm to use with this secret. Either `hmac/sha-256`(default) or `hmac/sha-1` + Enabled *bool `json:"enabled,omitempty"` // Is this secret currently enabled +} + // Dynamic writeable type for ExternalOauthApplication removes: // can, id, created_at type WriteExternalOauthApplication struct { @@ -4177,7 +4214,7 @@ type WriteScheduledPlan struct { UserId *int64 `json:"user_id,omitempty"` // User Id which owns this scheduled plan RunAsRecipient *bool `json:"run_as_recipient,omitempty"` // Whether schedule is run as recipient (only applicable for email recipients) Enabled *bool `json:"enabled,omitempty"` // Whether the ScheduledPlan is enabled - LookId *int64 `json:"look_id,omitempty"` // Id of a look + LookId *string `json:"look_id,omitempty"` // Id of a look DashboardId *int64 `json:"dashboard_id,omitempty"` // Id of a dashboard LookmlDashboardId *string `json:"lookml_dashboard_id,omitempty"` // Id of a LookML dashboard FiltersString *string `json:"filters_string,omitempty"` // Query string to run look or dashboard with diff --git a/kotlin/src/main/com/looker/sdk/4.0/methods.kt b/kotlin/src/main/com/looker/sdk/4.0/methods.kt index d97db47ba..7e4baa8ec 100644 --- a/kotlin/src/main/com/looker/sdk/4.0/methods.kt +++ b/kotlin/src/main/com/looker/sdk/4.0/methods.kt @@ -25,7 +25,7 @@ */ /** - * 425 API methods + * 429 API methods */ @@ -316,6 +316,37 @@ class LookerSDK(authSession: AuthSession) : APIMethods(authSession) { //region Auth: Manage User Authentication Configuration + /** + * ### Create an embed secret using the specified information. + * + * The value of the `secret` field will be set by Looker and returned. + * + * @param {WriteEmbedSecret} body + * + * POST /embed_config/secrets -> EmbedSecret + */ + @JvmOverloads fun create_embed_secret( + body: WriteEmbedSecret? = null + ) : SDKResponse { + return this.post("/embed_config/secrets", mapOf(), body) + } + + + /** + * ### Delete an embed secret. + * + * @param {Long} embed_secret_id Id of Embed Secret + * + * DELETE /embed_config/secrets/{embed_secret_id} -> String + */ + fun delete_embed_secret( + embed_secret_id: Long + ) : SDKResponse { + val path_embed_secret_id = encodeParam(embed_secret_id) + return this.delete("/embed_config/secrets/${path_embed_secret_id}", mapOf()) + } + + /** * ### Create SSO Embed URL * @@ -3668,6 +3699,52 @@ class LookerSDK(authSession: AuthSession) : APIMethods(authSession) { //endregion Datagroup: Manage Datagroups + //region DerivedTable: View Derived Table graphs + + + /** + * ### Discover information about derived tables + * + * @param {String} model The name of the Lookml model. + * @param {String} format The format of the graph. Valid values are [dot]. Default is `dot` + * @param {String} color Color denoting the build status of the graph. Grey = not built, green = built, yellow = building, red = error. + * + * GET /derived_table/graph/model/{model} -> DependencyGraph + */ + @JvmOverloads fun graph_derived_tables_for_model( + model: String, + format: String? = null, + color: String? = null + ) : SDKResponse { + val path_model = encodeParam(model) + return this.get("/derived_table/graph/model/${path_model}", + mapOf("format" to format, + "color" to color)) + } + + + /** + * ### Get the subgraph representing this derived table and its dependencies. + * + * @param {String} view The derived table's view name. + * @param {String} models The models where this derived table is defined. + * @param {String} workspace The model directory to look in, either `dev` or `production`. + * + * GET /derived_table/graph/view/{view} -> DependencyGraph + */ + @JvmOverloads fun graph_derived_tables_for_view( + view: String, + models: String? = null, + workspace: String? = null + ) : SDKResponse { + val path_view = encodeParam(view) + return this.get("/derived_table/graph/view/${path_view}", + mapOf("models" to models, + "workspace" to workspace)) + } + + //endregion DerivedTable: View Derived Table graphs + //region Folder: Manage Folders @@ -4748,13 +4825,13 @@ class LookerSDK(authSession: AuthSession) : APIMethods(authSession) { * * Returns detailed information about a Look and its associated Query. * - * @param {Long} look_id Id of look + * @param {String} look_id Id of look * @param {String} fields Requested fields. * * GET /looks/{look_id} -> LookWithQuery */ @JvmOverloads fun look( - look_id: Long, + look_id: String, fields: String? = null ) : SDKResponse { val path_look_id = encodeParam(look_id) @@ -4785,14 +4862,14 @@ class LookerSDK(authSession: AuthSession) : APIMethods(authSession) { * NOTE: [delete_look()](#!/Look/delete_look) performs a "hard delete" - the look data is removed from the Looker * database and destroyed. There is no "undo" for `delete_look()`. * - * @param {Long} look_id Id of look + * @param {String} look_id Id of look * @param {WriteLookWithQuery} body * @param {String} fields Requested fields. * * PATCH /looks/{look_id} -> LookWithQuery */ @JvmOverloads fun update_look( - look_id: Long, + look_id: String, body: WriteLookWithQuery, fields: String? = null ) : SDKResponse { @@ -4811,12 +4888,12 @@ class LookerSDK(authSession: AuthSession) : APIMethods(authSession) { * * For information about soft-delete (which can be undone) see [update_look()](#!/Look/update_look). * - * @param {Long} look_id Id of look + * @param {String} look_id Id of look * * DELETE /looks/{look_id} -> String */ fun delete_look( - look_id: Long + look_id: String ) : SDKResponse { val path_look_id = encodeParam(look_id) return this.delete("/looks/${path_look_id}", mapOf()) @@ -4843,7 +4920,7 @@ class LookerSDK(authSession: AuthSession) : APIMethods(authSession) { * | png | A PNG image of the visualization of the query * | jpg | A JPG image of the visualization of the query * - * @param {Long} look_id Id of look + * @param {String} look_id Id of look * @param {String} result_format Format of result * @param {Long} limit Row limit (may override the limit in the saved query). * @param {Boolean} apply_formatting Apply model-specified formatting to each result. @@ -4863,7 +4940,7 @@ class LookerSDK(authSession: AuthSession) : APIMethods(authSession) { * **Note**: Binary content may be returned by this method. */ @JvmOverloads fun run_look( - look_id: Long, + look_id: String, result_format: String, limit: Long? = null, apply_formatting: Boolean? = null, @@ -4905,13 +4982,13 @@ class LookerSDK(authSession: AuthSession) : APIMethods(authSession) { * * `look_id` and `folder_id` must already exist, and `folder_id` must be different from the current `folder_id` of the dashboard. * - * @param {Long} look_id Look id to copy. + * @param {String} look_id Look id to copy. * @param {String} folder_id Folder id to copy to. * * POST /looks/{look_id}/copy -> LookWithQuery */ @JvmOverloads fun copy_look( - look_id: Long, + look_id: String, folder_id: String? = null ) : SDKResponse { val path_look_id = encodeParam(look_id) @@ -4928,13 +5005,13 @@ class LookerSDK(authSession: AuthSession) : APIMethods(authSession) { * `look_id` and `folder_id` are required. * `look_id` and `folder_id` must already exist, and `folder_id` must be different from the current `folder_id` of the dashboard. * - * @param {Long} look_id Look id to move. + * @param {String} look_id Look id to move. * @param {String} folder_id Folder id to move to. * * PATCH /looks/{look_id}/move -> LookWithQuery */ fun move_look( - look_id: Long, + look_id: String, folder_id: String ) : SDKResponse { val path_look_id = encodeParam(look_id) @@ -4947,27 +5024,6 @@ class LookerSDK(authSession: AuthSession) : APIMethods(authSession) { //region LookmlModel: Manage LookML Models - /** - * ### Discover information about derived tables - * - * @param {String} model The name of the Lookml model. - * @param {String} format The format of the graph. Valid values are [dot]. Default is `dot` - * @param {String} color Color denoting the build status of the graph. Grey = not built, green = built, yellow = building, red = error. - * - * GET /derived_table/graph/model/{model} -> DependencyGraph - */ - @JvmOverloads fun graph_derived_tables_for_model( - model: String, - format: String? = null, - color: String? = null - ) : SDKResponse { - val path_model = encodeParam(model) - return this.get("/derived_table/graph/model/${path_model}", - mapOf("format" to format, - "color" to color)) - } - - /** * ### Get information about all lookml models. * @@ -6283,6 +6339,7 @@ class LookerSDK(authSession: AuthSession) : APIMethods(authSession) { * @param {String} path_prefix Prefix to use for drill links (url encoded). * @param {Boolean} rebuild_pdts Rebuild PDTS used in query. * @param {Boolean} server_table_calcs Perform table calculations on query results + * @param {String} source Specifies the source of this call. * * GET /queries/{query_id}/run/{result_format} -> String * @@ -6302,7 +6359,8 @@ class LookerSDK(authSession: AuthSession) : APIMethods(authSession) { cache_only: Boolean? = null, path_prefix: String? = null, rebuild_pdts: Boolean? = null, - server_table_calcs: Boolean? = null + server_table_calcs: Boolean? = null, + source: String? = null ) : SDKResponse { val path_query_id = encodeParam(query_id) val path_result_format = encodeParam(result_format) @@ -6318,7 +6376,8 @@ class LookerSDK(authSession: AuthSession) : APIMethods(authSession) { "cache_only" to cache_only, "path_prefix" to path_prefix, "rebuild_pdts" to rebuild_pdts, - "server_table_calcs" to server_table_calcs)) + "server_table_calcs" to server_table_calcs, + "source" to source)) } @@ -8861,19 +8920,17 @@ class LookerSDK(authSession: AuthSession) : APIMethods(authSession) { * ### API 3 login information for the specified user. This is for the newer API keys that can be added for any user. * * @param {Long} user_id id of user - * @param {CredentialsApi3} body * @param {String} fields Requested fields. * - * POST /users/{user_id}/credentials_api3 -> CredentialsApi3 + * POST /users/{user_id}/credentials_api3 -> CreateCredentialsApi3 */ @JvmOverloads fun create_user_credentials_api3( user_id: Long, - body: CredentialsApi3? = null, fields: String? = null ) : SDKResponse { val path_user_id = encodeParam(user_id) - return this.post("/users/${path_user_id}/credentials_api3", - mapOf("fields" to fields), body) + return this.post("/users/${path_user_id}/credentials_api3", + mapOf("fields" to fields)) } diff --git a/kotlin/src/main/com/looker/sdk/4.0/models.kt b/kotlin/src/main/com/looker/sdk/4.0/models.kt index 54c0630e7..576afe925 100644 --- a/kotlin/src/main/com/looker/sdk/4.0/models.kt +++ b/kotlin/src/main/com/looker/sdk/4.0/models.kt @@ -25,7 +25,7 @@ */ /** - * 298 API models: 221 Spec, 0 Request, 57 Write, 20 Enum + * 301 API models: 223 Spec, 0 Request, 58 Write, 20 Enum */ @@ -307,7 +307,7 @@ data class BoardItem ( var id: Long? = null, var image_url: String? = null, var location: String? = null, - var look_id: Long? = null, + var look_id: String? = null, var lookml_dashboard_id: String? = null, var order: Long? = null, var title: String? = null, @@ -471,7 +471,7 @@ data class ContentFavorite ( var id: Long? = null, var user_id: Long? = null, var content_metadata_id: Long? = null, - var look_id: Long? = null, + var look_id: String? = null, var dashboard_id: Long? = null, var look: LookBasic? = null, var dashboard: DashboardBase? = null, @@ -497,7 +497,7 @@ data class ContentMeta ( var name: String? = null, var parent_id: Long? = null, var dashboard_id: String? = null, - var look_id: Long? = null, + var look_id: String? = null, var folder_id: String? = null, var content_type: String? = null, var inherits: Boolean? = null, @@ -660,7 +660,7 @@ data class ContentValidationFolder ( * @property folder */ data class ContentValidationLook ( - var id: Long? = null, + var id: String? = null, var title: String? = null, var short_url: String? = null, var folder: ContentValidationFolder? = null @@ -693,7 +693,7 @@ data class ContentValidationLookMLDashboardElement ( */ data class ContentValidationScheduledPlan ( var name: String? = null, - var look_id: Long? = null, + var look_id: String? = null, var id: Long? = null ) : Serializable @@ -739,7 +739,7 @@ data class ContentValidatorError ( data class ContentView ( var can: Map? = null, var id: Long? = null, - var look_id: Long? = null, + var look_id: String? = null, var dashboard_id: Long? = null, var title: String? = null, var content_metadata_id: Long? = null, @@ -786,6 +786,27 @@ data class CreateCostEstimate ( var sql: String? = null ) : Serializable +/** + * @property can Operations the current user is able to perform on this object (read-only) + * @property id Unique Id (read-only) + * @property client_id API key client_id (read-only) + * @property created_at Timestamp for the creation of this credential (read-only) + * @property is_disabled Has this credential been disabled? (read-only) + * @property type Short name for the type of this kind of credential (read-only) + * @property client_secret API key client_secret (read-only) + * @property url Link to get this item (read-only) + */ +data class CreateCredentialsApi3 ( + var can: Map? = null, + var id: Long? = null, + var client_id: String? = null, + var created_at: String? = null, + var is_disabled: Boolean? = null, + var type: String? = null, + var client_secret: String? = null, + var url: String? = null +) : Serializable + /** * @property id Unique Id (read-only) * @property dashboard_id Id of Dashboard @@ -887,13 +908,11 @@ data class CreateQueryTask ( var result_format: ResultFormat, var source: String? = null, var deferred: Boolean? = null, - var look_id: Long? = null, + var look_id: String? = null, var dashboard_id: String? = null ) : Serializable /** - * WARNING: no writeable properties found for POST, PUT, or PATCH - * * @property can Operations the current user is able to perform on this object (read-only) * @property id Unique Id (read-only) * @property client_id API key client_id (read-only) @@ -1145,7 +1164,7 @@ data class CustomWelcomeEmail ( * @property user_id Id of User (read-only) * @property slug Content Metadata Slug * @property preferred_viewer The preferred route for viewing this dashboard (ie: dashboards or dashboards-next) - * @property alert_sync_with_dashboard_filter_enabled Enables alerts to keep in sync with dashboard filter changes - only available in Enhanced Alerts (beta) + * @property alert_sync_with_dashboard_filter_enabled Enables alerts to keep in sync with dashboard filter changes * @property background_color Background color * @property created_at Time that the Dashboard was created. (read-only) * @property crossfilter_enabled Enables crossfiltering in dashboards - only available in dashboards-next (beta) @@ -1853,6 +1872,23 @@ data class EmbedParams ( var force_logout_login: Boolean? = null ) : Serializable +/** + * @property algorithm Signing algorithm to use with this secret. Either `hmac/sha-256`(default) or `hmac/sha-1` + * @property created_at When secret was created (read-only) + * @property enabled Is this secret currently enabled + * @property id Unique Id (read-only) + * @property secret Secret for use with SSO embedding (read-only) + * @property user_id Id of user who created this secret (read-only) + */ +data class EmbedSecret ( + var algorithm: String? = null, + var created_at: String? = null, + var enabled: Boolean? = null, + var id: Long? = null, + var secret: String? = null, + var user_id: Long? = null +) : Serializable + /** * @property target_url The complete URL of the Looker UI page to display in the embed context. For example, to display the dashboard with id 34, `target_url` would look like: `https://mycompany.looker.com:9999/dashboards/34`. `target_uri` MUST contain a scheme (HTTPS), domain name, and URL path. Port must be included if it is required to reach the Looker server from browser clients. If the Looker instance is behind a load balancer or other proxy, `target_uri` must be the public-facing domain name and port required to reach the Looker instance, not the actual internal network machine name of the Looker instance. * @property session_length Number of seconds the SSO embed session will be valid after the embed session is started. Defaults to 300 seconds. Maximum session length accepted is 2592000 seconds (30 days). @@ -2230,7 +2266,7 @@ data class HomepageItem ( var id: Long? = null, var image_url: String? = null, var location: String? = null, - var look_id: Long? = null, + var look_id: String? = null, var lookml_dashboard_id: String? = null, var order: Long? = null, var section_fetch_time: Float? = null, @@ -2725,7 +2761,7 @@ data class LocalizationSettings ( data class Look ( var can: Map? = null, var content_metadata_id: Long? = null, - var id: Long? = null, + var id: String? = null, var title: String? = null, var user_id: Long? = null, var content_favorite_id: Long? = null, @@ -3257,7 +3293,7 @@ data class LookModel ( data class LookWithDashboards ( var can: Map? = null, var content_metadata_id: Long? = null, - var id: Long? = null, + var id: String? = null, var title: String? = null, var user_id: Long? = null, var content_favorite_id: Long? = null, @@ -3325,7 +3361,7 @@ data class LookWithDashboards ( data class LookWithQuery ( var can: Map? = null, var content_metadata_id: Long? = null, - var id: Long? = null, + var id: String? = null, var title: String? = null, var user_id: Long? = null, var content_favorite_id: Long? = null, @@ -3963,7 +3999,7 @@ data class QueryTask ( var runtime: Float? = null, var rebuild_pdts: Boolean? = null, var result_source: String? = null, - var look_id: Long? = null, + var look_id: String? = null, var dashboard_id: String? = null, var result_format: String? = null ) : Serializable @@ -3999,7 +4035,7 @@ data class RenderTask ( var finalized_at: String? = null, var height: Long? = null, var id: String? = null, - var look_id: Long? = null, + var look_id: String? = null, var lookml_dashboard_id: String? = null, var query_id: Long? = null, var dashboard_element_id: String? = null, @@ -4377,7 +4413,7 @@ data class ScheduledPlan ( var user_id: Long? = null, var run_as_recipient: Boolean? = null, var enabled: Boolean? = null, - var look_id: Long? = null, + var look_id: String? = null, var dashboard_id: Long? = null, var lookml_dashboard_id: String? = null, var filters_string: String? = null, @@ -5250,7 +5286,7 @@ data class WriteBoardItem ( var custom_url: String? = null, var dashboard_id: Long? = null, var board_section_id: Long? = null, - var look_id: Long? = null, + var look_id: String? = null, var lookml_dashboard_id: String? = null, var order: Long? = null ) : Serializable @@ -5383,7 +5419,7 @@ data class WriteCreateQueryTask ( var result_format: ResultFormat, var source: String? = null, var deferred: Boolean? = null, - var look_id: Long? = null, + var look_id: String? = null, var dashboard_id: String? = null ) : Serializable @@ -5412,7 +5448,7 @@ data class WriteCredentialsEmail ( * @property title Dashboard Title * @property slug Content Metadata Slug * @property preferred_viewer The preferred route for viewing this dashboard (ie: dashboards or dashboards-next) - * @property alert_sync_with_dashboard_filter_enabled Enables alerts to keep in sync with dashboard filter changes - only available in Enhanced Alerts (beta) + * @property alert_sync_with_dashboard_filter_enabled Enables alerts to keep in sync with dashboard filter changes * @property background_color Background color * @property crossfilter_enabled Enables crossfiltering in dashboards - only available in dashboards-next (beta) * @property deleted Whether or not a dashboard is 'soft' deleted. @@ -5695,6 +5731,18 @@ data class WriteDBConnectionOverride ( var after_connect_statements: String? = null ) : Serializable +/** + * Dynamic writeable type for EmbedSecret removes: + * created_at, id, secret, user_id + * + * @property algorithm Signing algorithm to use with this secret. Either `hmac/sha-256`(default) or `hmac/sha-1` + * @property enabled Is this secret currently enabled + */ +data class WriteEmbedSecret ( + var algorithm: String? = null, + var enabled: Boolean? = null +) : Serializable + /** * Dynamic writeable type for ExternalOauthApplication removes: * can, id, created_at @@ -6300,7 +6348,7 @@ data class WriteScheduledPlan ( var user_id: Long? = null, var run_as_recipient: Boolean? = null, var enabled: Boolean? = null, - var look_id: Long? = null, + var look_id: String? = null, var dashboard_id: Long? = null, var lookml_dashboard_id: String? = null, var filters_string: String? = null, diff --git a/kotlin/src/main/com/looker/sdk/4.0/streams.kt b/kotlin/src/main/com/looker/sdk/4.0/streams.kt index 8afb7d730..c6371c407 100644 --- a/kotlin/src/main/com/looker/sdk/4.0/streams.kt +++ b/kotlin/src/main/com/looker/sdk/4.0/streams.kt @@ -25,7 +25,7 @@ */ /** - * 425 API methods + * 429 API methods */ @@ -315,6 +315,37 @@ class LookerSDKStream(authSession: AuthSession) : APIMethods(authSession) { //region Auth: Manage User Authentication Configuration + /** + * ### Create an embed secret using the specified information. + * + * The value of the `secret` field will be set by Looker and returned. + * + * @param {WriteEmbedSecret} body + * + * POST /embed_config/secrets -> ByteArray + */ + @JvmOverloads fun create_embed_secret( + body: WriteEmbedSecret? = null + ) : SDKResponse { + return this.post("/embed_config/secrets", mapOf(), body) + } + + + /** + * ### Delete an embed secret. + * + * @param {Long} embed_secret_id Id of Embed Secret + * + * DELETE /embed_config/secrets/{embed_secret_id} -> ByteArray + */ + fun delete_embed_secret( + embed_secret_id: Long + ) : SDKResponse { + val path_embed_secret_id = encodeParam(embed_secret_id) + return this.delete("/embed_config/secrets/${path_embed_secret_id}", mapOf()) + } + + /** * ### Create SSO Embed URL * @@ -3667,6 +3698,52 @@ class LookerSDKStream(authSession: AuthSession) : APIMethods(authSession) { //endregion Datagroup: Manage Datagroups + //region DerivedTable: View Derived Table graphs + + + /** + * ### Discover information about derived tables + * + * @param {String} model The name of the Lookml model. + * @param {String} format The format of the graph. Valid values are [dot]. Default is `dot` + * @param {String} color Color denoting the build status of the graph. Grey = not built, green = built, yellow = building, red = error. + * + * GET /derived_table/graph/model/{model} -> ByteArray + */ + @JvmOverloads fun graph_derived_tables_for_model( + model: String, + format: String? = null, + color: String? = null + ) : SDKResponse { + val path_model = encodeParam(model) + return this.get("/derived_table/graph/model/${path_model}", + mapOf("format" to format, + "color" to color)) + } + + + /** + * ### Get the subgraph representing this derived table and its dependencies. + * + * @param {String} view The derived table's view name. + * @param {String} models The models where this derived table is defined. + * @param {String} workspace The model directory to look in, either `dev` or `production`. + * + * GET /derived_table/graph/view/{view} -> ByteArray + */ + @JvmOverloads fun graph_derived_tables_for_view( + view: String, + models: String? = null, + workspace: String? = null + ) : SDKResponse { + val path_view = encodeParam(view) + return this.get("/derived_table/graph/view/${path_view}", + mapOf("models" to models, + "workspace" to workspace)) + } + + //endregion DerivedTable: View Derived Table graphs + //region Folder: Manage Folders @@ -4747,13 +4824,13 @@ class LookerSDKStream(authSession: AuthSession) : APIMethods(authSession) { * * Returns detailed information about a Look and its associated Query. * - * @param {Long} look_id Id of look + * @param {String} look_id Id of look * @param {String} fields Requested fields. * * GET /looks/{look_id} -> ByteArray */ @JvmOverloads fun look( - look_id: Long, + look_id: String, fields: String? = null ) : SDKResponse { val path_look_id = encodeParam(look_id) @@ -4784,14 +4861,14 @@ class LookerSDKStream(authSession: AuthSession) : APIMethods(authSession) { * NOTE: [delete_look()](#!/Look/delete_look) performs a "hard delete" - the look data is removed from the Looker * database and destroyed. There is no "undo" for `delete_look()`. * - * @param {Long} look_id Id of look + * @param {String} look_id Id of look * @param {WriteLookWithQuery} body * @param {String} fields Requested fields. * * PATCH /looks/{look_id} -> ByteArray */ @JvmOverloads fun update_look( - look_id: Long, + look_id: String, body: WriteLookWithQuery, fields: String? = null ) : SDKResponse { @@ -4810,12 +4887,12 @@ class LookerSDKStream(authSession: AuthSession) : APIMethods(authSession) { * * For information about soft-delete (which can be undone) see [update_look()](#!/Look/update_look). * - * @param {Long} look_id Id of look + * @param {String} look_id Id of look * * DELETE /looks/{look_id} -> ByteArray */ fun delete_look( - look_id: Long + look_id: String ) : SDKResponse { val path_look_id = encodeParam(look_id) return this.delete("/looks/${path_look_id}", mapOf()) @@ -4842,7 +4919,7 @@ class LookerSDKStream(authSession: AuthSession) : APIMethods(authSession) { * | png | A PNG image of the visualization of the query * | jpg | A JPG image of the visualization of the query * - * @param {Long} look_id Id of look + * @param {String} look_id Id of look * @param {String} result_format Format of result * @param {Long} limit Row limit (may override the limit in the saved query). * @param {Boolean} apply_formatting Apply model-specified formatting to each result. @@ -4862,7 +4939,7 @@ class LookerSDKStream(authSession: AuthSession) : APIMethods(authSession) { * **Note**: Binary content may be returned by this method. */ @JvmOverloads fun run_look( - look_id: Long, + look_id: String, result_format: String, limit: Long? = null, apply_formatting: Boolean? = null, @@ -4904,13 +4981,13 @@ class LookerSDKStream(authSession: AuthSession) : APIMethods(authSession) { * * `look_id` and `folder_id` must already exist, and `folder_id` must be different from the current `folder_id` of the dashboard. * - * @param {Long} look_id Look id to copy. + * @param {String} look_id Look id to copy. * @param {String} folder_id Folder id to copy to. * * POST /looks/{look_id}/copy -> ByteArray */ @JvmOverloads fun copy_look( - look_id: Long, + look_id: String, folder_id: String? = null ) : SDKResponse { val path_look_id = encodeParam(look_id) @@ -4927,13 +5004,13 @@ class LookerSDKStream(authSession: AuthSession) : APIMethods(authSession) { * `look_id` and `folder_id` are required. * `look_id` and `folder_id` must already exist, and `folder_id` must be different from the current `folder_id` of the dashboard. * - * @param {Long} look_id Look id to move. + * @param {String} look_id Look id to move. * @param {String} folder_id Folder id to move to. * * PATCH /looks/{look_id}/move -> ByteArray */ fun move_look( - look_id: Long, + look_id: String, folder_id: String ) : SDKResponse { val path_look_id = encodeParam(look_id) @@ -4946,27 +5023,6 @@ class LookerSDKStream(authSession: AuthSession) : APIMethods(authSession) { //region LookmlModel: Manage LookML Models - /** - * ### Discover information about derived tables - * - * @param {String} model The name of the Lookml model. - * @param {String} format The format of the graph. Valid values are [dot]. Default is `dot` - * @param {String} color Color denoting the build status of the graph. Grey = not built, green = built, yellow = building, red = error. - * - * GET /derived_table/graph/model/{model} -> ByteArray - */ - @JvmOverloads fun graph_derived_tables_for_model( - model: String, - format: String? = null, - color: String? = null - ) : SDKResponse { - val path_model = encodeParam(model) - return this.get("/derived_table/graph/model/${path_model}", - mapOf("format" to format, - "color" to color)) - } - - /** * ### Get information about all lookml models. * @@ -6282,6 +6338,7 @@ class LookerSDKStream(authSession: AuthSession) : APIMethods(authSession) { * @param {String} path_prefix Prefix to use for drill links (url encoded). * @param {Boolean} rebuild_pdts Rebuild PDTS used in query. * @param {Boolean} server_table_calcs Perform table calculations on query results + * @param {String} source Specifies the source of this call. * * GET /queries/{query_id}/run/{result_format} -> ByteArray * @@ -6301,7 +6358,8 @@ class LookerSDKStream(authSession: AuthSession) : APIMethods(authSession) { cache_only: Boolean? = null, path_prefix: String? = null, rebuild_pdts: Boolean? = null, - server_table_calcs: Boolean? = null + server_table_calcs: Boolean? = null, + source: String? = null ) : SDKResponse { val path_query_id = encodeParam(query_id) val path_result_format = encodeParam(result_format) @@ -6317,7 +6375,8 @@ class LookerSDKStream(authSession: AuthSession) : APIMethods(authSession) { "cache_only" to cache_only, "path_prefix" to path_prefix, "rebuild_pdts" to rebuild_pdts, - "server_table_calcs" to server_table_calcs)) + "server_table_calcs" to server_table_calcs, + "source" to source)) } @@ -8860,19 +8919,17 @@ class LookerSDKStream(authSession: AuthSession) : APIMethods(authSession) { * ### API 3 login information for the specified user. This is for the newer API keys that can be added for any user. * * @param {Long} user_id id of user - * @param {CredentialsApi3} body * @param {String} fields Requested fields. * * POST /users/{user_id}/credentials_api3 -> ByteArray */ @JvmOverloads fun create_user_credentials_api3( user_id: Long, - body: CredentialsApi3? = null, fields: String? = null ) : SDKResponse { val path_user_id = encodeParam(user_id) return this.post("/users/${path_user_id}/credentials_api3", - mapOf("fields" to fields), body) + mapOf("fields" to fields)) } diff --git a/kotlin/src/main/com/looker/sdk/Constants.kt b/kotlin/src/main/com/looker/sdk/Constants.kt index 838dbb452..a5080c08e 100644 --- a/kotlin/src/main/com/looker/sdk/Constants.kt +++ b/kotlin/src/main/com/looker/sdk/Constants.kt @@ -28,7 +28,7 @@ package com.looker.sdk const val ENVIRONMENT_PREFIX = "LOOKERSDK" const val SDK_TAG = "KT-SDK" -const val LOOKER_VERSION = "21.18" +const val LOOKER_VERSION = "21.20" const val API_VERSION = "4.0" const val AGENT_TAG = "$SDK_TAG $LOOKER_VERSION" const val LOOKER_APPID = "x-looker-appid" diff --git a/kotlin/src/test/TestMethods.kt b/kotlin/src/test/TestMethods.kt index 4fb81e9ea..54201104d 100644 --- a/kotlin/src/test/TestMethods.kt +++ b/kotlin/src/test/TestMethods.kt @@ -175,7 +175,7 @@ class TestMethods { sdk.create_scheduled_plan( WriteScheduledPlan( name = scheduleName, - look_id = look.id!!.toLong(), + look_id = look.id!!, require_change = false, require_no_results = false, require_results = true, @@ -404,7 +404,7 @@ class TestMethods { @Test fun testAllLooks() { prepLook() - testAll( + testAll( { sdk.all_looks() }, { item -> item.id!! }, { id, fields -> sdk.look(id, fields) } @@ -528,7 +528,7 @@ class TestMethods { @Test fun testErrorHandling() { try { - sdk.ok>(sdk.look(-1)) + sdk.ok>(sdk.look("-1")) assertTrue(false, "We shouldn't get here") } catch (e: java.lang.Error) { assertTrue(e.toString().contains("GET /looks/-1")) diff --git a/packages/hackathon/package.json b/packages/hackathon/package.json index 474071f48..e0a4e5174 100644 --- a/packages/hackathon/package.json +++ b/packages/hackathon/package.json @@ -34,18 +34,20 @@ "watch": "yarn lerna exec --scope @looker/wholly-sheet --stream 'BABEL_ENV=build babel src --root-mode upward --out-dir lib/esm --source-maps --extensions .ts,.tsx --no-comments --watch'" }, "dependencies": { - "@looker/extension-utils": "^0.1.0", - "@looker/sdk": "^21.18.1", - "@looker/sdk-rtl": "^21.1.1", "@looker/code-editor": "^0.1.13", - "@looker/wholly-sheet": "^0.5.19", "@looker/components": "^2.8.1", - "@looker/icons": "^1.5.3", "@looker/extension-sdk": "^21.18.1", "@looker/extension-sdk-react": "^21.18.1", + "@looker/extension-utils": "^0.1.0", + "@looker/icons": "^1.5.3", + "@looker/sdk": "^21.18.1", + "@looker/sdk-rtl": "^21.1.1", + "@looker/wholly-sheet": "^0.5.19", "@styled-icons/material": "^10.28.0", "@styled-icons/material-outlined": "^10.28.0", "@styled-icons/material-rounded": "^10.28.0", + "date-fns": "^2.25.0", + "date-fns-tz": "^1.1.6", "lodash": "^4.17.20", "papaparse": "^5.3.1", "react": "^16.13.1", @@ -56,9 +58,7 @@ "redux": "^4.0.5", "redux-saga": "^1.1.3", "styled-components": "^5.2.1", - "styled-system": "^5.1.2", - "date-fns": "^2.25.0", - "date-fns-tz": "^1.1.6" + "styled-system": "^5.1.2" }, "devDependencies": { "@looker/components-test-utils": "^1.5.5", diff --git a/packages/sdk-codegen/src/python.gen.spec.ts b/packages/sdk-codegen/src/python.gen.spec.ts index 5436a588a..cf97c1ef8 100644 --- a/packages/sdk-codegen/src/python.gen.spec.ts +++ b/packages/sdk-codegen/src/python.gen.spec.ts @@ -77,7 +77,7 @@ import datetime from typing import Any, MutableMapping, Optional, Sequence, Union, cast import warnings -from . import models +from . import models as mdls from looker_sdk.rtl import api_methods from looker_sdk.rtl import transport @@ -190,7 +190,7 @@ sr.converter.register_structure_hook( const args = gen.httpArgs('', method) const expected = ` path=f"/groups/{group_id}/groups", - structure=models.Group, + structure=mdls.Group, body=body, transport_options=transport_options`.replace(/^\n/, '') expect(args).toEqual(expected) @@ -200,7 +200,7 @@ sr.converter.register_structure_hook( const args = gen.httpArgs('', method) const expected = ` path="/queries", - structure=models.Query, + structure=mdls.Query, query_params={"fields": fields}, body=body, transport_options=transport_options`.replace(/^\n/, '') @@ -211,7 +211,7 @@ sr.converter.register_structure_hook( const args = gen.httpArgs('', method) const expected = ` path="/dashboards", - structure=models.Dashboard, + structure=mdls.Dashboard, body=body, transport_options=transport_options`.replace(/^\n/, '') expect(args).toEqual(expected) @@ -223,11 +223,11 @@ sr.converter.register_structure_hook( const method = apiTestModel.methods.all_datagroups const expected = `# ### Get information about all datagroups. # -# GET /datagroups -> Sequence[models.Datagroup] +# GET /datagroups -> Sequence[mdls.Datagroup] def all_datagroups( self, transport_options: Optional[transport.TransportOptions] = None, -) -> Sequence[models.Datagroup]: +) -> Sequence[mdls.Datagroup]: ` const actual = gen.methodSignature('', method) expect(actual).toEqual(expected) @@ -243,15 +243,15 @@ def all_datagroups( # # Unsupported tests in the request will be ignored. # -# PUT /connections/{connection_name}/test -> Sequence[models.DBConnectionTestResult] +# PUT /connections/{connection_name}/test -> Sequence[mdls.DBConnectionTestResult] def test_connection( self, # Name of connection connection_name: str, # Array of names of tests to run - tests: Optional[models.DelimSequence[str]] = None, + tests: Optional[mdls.DelimSequence[str]] = None, transport_options: Optional[transport.TransportOptions] = None, -) -> Sequence[models.DBConnectionTestResult]: +) -> Sequence[mdls.DBConnectionTestResult]: ` const actual = gen.methodSignature('', method) expect(actual).toEqual(expected) @@ -396,10 +396,10 @@ result_format = self.encode_path_param(result_format) const method = apiTestModel.methods.add_group_group const expected = ` response = cast( - models.Group, + mdls.Group, self.post( path=f"/groups/{group_id}/groups", - structure=models.Group, + structure=mdls.Group, body=body, transport_options=transport_options ) @@ -427,10 +427,10 @@ return response`.replace(/^\n/, '') const method = apiTestModel.methods.active_themes const expected = ` response = cast( - Sequence[models.Theme], + Sequence[mdls.Theme], self.get( path="/themes/active", - structure=Sequence[models.Theme], + structure=Sequence[mdls.Theme], query_params={"name": name, "ts": ts, "fields": fields}, transport_options=transport_options ) @@ -444,10 +444,10 @@ return response`.replace(/^\n/, '') const expected = ` warnings.warn("login_user behavior changed significantly in 21.4.0. See https://git.io/JOtH1") response = cast( - models.AccessToken, + mdls.AccessToken, self.post( path=f"/login/{user_id}", - structure=models.AccessToken, + structure=mdls.AccessToken, query_params={"associative": associative}, transport_options=transport_options ) @@ -917,10 +917,10 @@ class MergeFields(model.Model): const actual = gen.makeTheCall(method, inputs) const expected = `response = sdk.update_look( look_id=17, - body=models.WriteLookWithQuery( + body=mdls.WriteLookWithQuery( title="test title", description="gen test", - query=models.WriteQuery( + query=mdls.WriteQuery( model="the_look", view="users", total=true @@ -940,9 +940,9 @@ class MergeFields(model.Model): const method = apiTestModel.methods.create_query_task const actual = gen.makeTheCall(method, inputs) const expected = `response = sdk.create_query_task( - body=models.WriteCreateQueryTask( + body=mdls.WriteCreateQueryTask( query_id=1, - result_format=models.ResultFormat.csv + result_format=mdls.ResultFormat.csv ))` expect(actual).toEqual(expected) }) @@ -954,7 +954,7 @@ class MergeFields(model.Model): const method = apiTestModel.methods.all_users const actual = gen.makeTheCall(method, inputs) const expected = `response = sdk.all_users( - ids=models.DelimSequence([1,2,3]))` + ids=mdls.DelimSequence([1,2,3]))` expect(actual).toEqual(expected) }) @@ -965,7 +965,7 @@ class MergeFields(model.Model): const method = apiTestModel.methods.all_users const actual = gen.makeTheCall(method, inputs) const expected = `response = sdk.all_users( - ids=models.DelimSequence([1,2,3]))` + ids=mdls.DelimSequence([1,2,3]))` expect(actual).toEqual(expected) }) @@ -1001,7 +1001,7 @@ class MergeFields(model.Model): const method = apiTestModel.methods.create_merge_query const actual = gen.makeTheCall(method, inputs) const expected = `response = sdk.create_merge_query( - body=models.WriteMergeQuery( + body=mdls.WriteMergeQuery( column_limit="5", pivots=[ "one", @@ -1010,9 +1010,9 @@ class MergeFields(model.Model): ], sorts=["a"], source_queries=[ - models.MergeQuerySourceQuery( + mdls.MergeQuerySourceQuery( merge_fields=[ - models.MergeFields( + mdls.MergeFields( field_name="merge_1", source_field_name="source_1" ) @@ -1020,9 +1020,9 @@ class MergeFields(model.Model): name="first query", query_id=1 ), - models.MergeQuerySourceQuery( + mdls.MergeQuerySourceQuery( merge_fields=[ - models.MergeFields( + mdls.MergeFields( field_name="merge_2", source_field_name="source_2" ) @@ -1045,7 +1045,7 @@ class MergeFields(model.Model): const inputs = { body: query } const method = apiTestModel.methods.create_sql_query const expected = `response = sdk.create_sql_query( - body=models.SqlQueryCreate( + body=mdls.SqlQueryCreate( connection_name="looker", model_name="the_look", vis_config={ @@ -1122,9 +1122,9 @@ class MergeFields(model.Model): } const type = apiTestModel.types.MergeQuerySourceQuery expect(type).toBeDefined() - const expected = `models.MergeQuerySourceQuery( + const expected = `mdls.MergeQuerySourceQuery( merge_fields=[ - models.MergeFields( + mdls.MergeFields( field_name="merge_1", source_field_name="source_1" ) diff --git a/packages/sdk-codegen/src/python.gen.ts b/packages/sdk-codegen/src/python.gen.ts index 5c9df3deb..41ca42f9e 100644 --- a/packages/sdk-codegen/src/python.gen.ts +++ b/packages/sdk-codegen/src/python.gen.ts @@ -110,7 +110,7 @@ import datetime from typing import Any, MutableMapping, Optional, Sequence, Union, cast import warnings -from . import models +from . import models as mdls from ${this.packagePath}.rtl import api_methods from ${this.packagePath}.rtl import transport @@ -505,7 +505,7 @@ ${this.hooks.join('\n')} } // when format is "methods" that means we're in the methods.py module - // and we need to reference the type by the `models.` package name + // and we need to reference the type by the `mdls.` package name prefixModelsNamespace( name: string, format: 'models' | 'methods', @@ -515,7 +515,7 @@ ${this.hooks.join('\n')} // need to quote this forwardRef name = forwardRef ? `"${name}"` : name } else if (format === 'methods') { - name = `models.${name}` + name = `mdls.${name}` } return name } diff --git a/packages/sdk-codegen/src/sdkModels.spec.ts b/packages/sdk-codegen/src/sdkModels.spec.ts index e02db99ab..3be053d6f 100644 --- a/packages/sdk-codegen/src/sdkModels.spec.ts +++ b/packages/sdk-codegen/src/sdkModels.spec.ts @@ -73,7 +73,7 @@ describe('sdkModels', () => { const api4 = readFileSync(rootFile('spec/Looker.4.0.oas.json'), 'utf-8') const api = ApiModel.fromString(api4) const actual = Object.keys(api.typeTags) - expect(actual).toHaveLength(29) + expect(actual).toHaveLength(30) }) describe('ordering', () => { diff --git a/packages/sdk-codegen/src/specDiff.spec.ts b/packages/sdk-codegen/src/specDiff.spec.ts index 3edb37693..d6708ff26 100644 --- a/packages/sdk-codegen/src/specDiff.spec.ts +++ b/packages/sdk-codegen/src/specDiff.spec.ts @@ -236,7 +236,7 @@ describe('spec differ', () => { expect(actual).toHaveLength(1) expect(actual[0].diffCount).toEqual({ added: 0, - changed: 2, + changed: 3, removed: 3, }) }) diff --git a/packages/sdk/src/3.1/funcs.ts b/packages/sdk/src/3.1/funcs.ts index 59db74d7e..0158661ba 100644 --- a/packages/sdk/src/3.1/funcs.ts +++ b/packages/sdk/src/3.1/funcs.ts @@ -25,7 +25,7 @@ */ /** - * 376 API methods + * 378 API methods */ import type { @@ -147,6 +147,7 @@ import type { IRequestFolderChildren, IRequestFolderChildrenSearch, IRequestGraphDerivedTablesForModel, + IRequestGraphDerivedTablesForView, IRequestLogin, IRequestRoleUsers, IRequestRunGitConnectionTest, @@ -3590,6 +3591,58 @@ export const update_datagroup = async ( //#endregion Datagroup: Manage Datagroups +//#region DerivedTable: View Derived Table graphs + +/** + * ### Discover information about derived tables + * + * GET /derived_table/graph/model/{model} -> IDependencyGraph + * + * @param sdk IAPIMethods implementation + * @param request composed interface "IRequestGraphDerivedTablesForModel" for complex method parameters + * @param options one-time API call overrides + * + */ +export const graph_derived_tables_for_model = async ( + sdk: IAPIMethods, + request: IRequestGraphDerivedTablesForModel, + options?: Partial +): Promise> => { + request.model = encodeParam(request.model) + return sdk.get( + `/derived_table/graph/model/${request.model}`, + { format: request.format, color: request.color }, + null, + options + ) +} + +/** + * ### Get the subgraph representing this derived table and its dependencies. + * + * GET /derived_table/graph/view/{view} -> IDependencyGraph + * + * @param sdk IAPIMethods implementation + * @param request composed interface "IRequestGraphDerivedTablesForView" for complex method parameters + * @param options one-time API call overrides + * + */ +export const graph_derived_tables_for_view = async ( + sdk: IAPIMethods, + request: IRequestGraphDerivedTablesForView, + options?: Partial +): Promise> => { + request.view = encodeParam(request.view) + return sdk.get( + `/derived_table/graph/view/${request.view}`, + { models: request.models, workspace: request.workspace }, + null, + options + ) +} + +//#endregion DerivedTable: View Derived Table graphs + //#region Folder: Manage Folders /** @@ -5357,30 +5410,6 @@ export const run_look = async ( //#region LookmlModel: Manage LookML Models -/** - * ### Discover information about derived tables - * - * GET /derived_table/graph/model/{model} -> IDependencyGraph - * - * @param sdk IAPIMethods implementation - * @param request composed interface "IRequestGraphDerivedTablesForModel" for complex method parameters - * @param options one-time API call overrides - * - */ -export const graph_derived_tables_for_model = async ( - sdk: IAPIMethods, - request: IRequestGraphDerivedTablesForModel, - options?: Partial -): Promise> => { - request.model = encodeParam(request.model) - return sdk.get( - `/derived_table/graph/model/${request.model}`, - { format: request.format, color: request.color }, - null, - options - ) -} - /** * ### Get information about all lookml models. * diff --git a/packages/sdk/src/3.1/methods.ts b/packages/sdk/src/3.1/methods.ts index 4f04c9820..b8826c2d9 100644 --- a/packages/sdk/src/3.1/methods.ts +++ b/packages/sdk/src/3.1/methods.ts @@ -25,7 +25,7 @@ */ /** - * 376 API methods + * 378 API methods */ import type { @@ -145,6 +145,7 @@ import type { IRequestFolderChildren, IRequestFolderChildrenSearch, IRequestGraphDerivedTablesForModel, + IRequestGraphDerivedTablesForView, IRequestLogin, IRequestRoleUsers, IRequestRunGitConnectionTest, @@ -3356,6 +3357,54 @@ export class Looker31SDK extends APIMethods implements ILooker31SDK { //#endregion Datagroup: Manage Datagroups + //#region DerivedTable: View Derived Table graphs + + /** + * ### Discover information about derived tables + * + * GET /derived_table/graph/model/{model} -> IDependencyGraph + * + * @param request composed interface "IRequestGraphDerivedTablesForModel" for complex method parameters + * @param options one-time API call overrides + * + */ + async graph_derived_tables_for_model( + request: IRequestGraphDerivedTablesForModel, + options?: Partial + ): Promise> { + request.model = encodeParam(request.model) + return this.get( + `/derived_table/graph/model/${request.model}`, + { format: request.format, color: request.color }, + null, + options + ) + } + + /** + * ### Get the subgraph representing this derived table and its dependencies. + * + * GET /derived_table/graph/view/{view} -> IDependencyGraph + * + * @param request composed interface "IRequestGraphDerivedTablesForView" for complex method parameters + * @param options one-time API call overrides + * + */ + async graph_derived_tables_for_view( + request: IRequestGraphDerivedTablesForView, + options?: Partial + ): Promise> { + request.view = encodeParam(request.view) + return this.get( + `/derived_table/graph/view/${request.view}`, + { models: request.models, workspace: request.workspace }, + null, + options + ) + } + + //#endregion DerivedTable: View Derived Table graphs + //#region Folder: Manage Folders /** @@ -5012,28 +5061,6 @@ export class Looker31SDK extends APIMethods implements ILooker31SDK { //#region LookmlModel: Manage LookML Models - /** - * ### Discover information about derived tables - * - * GET /derived_table/graph/model/{model} -> IDependencyGraph - * - * @param request composed interface "IRequestGraphDerivedTablesForModel" for complex method parameters - * @param options one-time API call overrides - * - */ - async graph_derived_tables_for_model( - request: IRequestGraphDerivedTablesForModel, - options?: Partial - ): Promise> { - request.model = encodeParam(request.model) - return this.get( - `/derived_table/graph/model/${request.model}`, - { format: request.format, color: request.color }, - null, - options - ) - } - /** * ### Get information about all lookml models. * diff --git a/packages/sdk/src/3.1/methodsInterface.ts b/packages/sdk/src/3.1/methodsInterface.ts index 411acb2df..03b8d230f 100644 --- a/packages/sdk/src/3.1/methodsInterface.ts +++ b/packages/sdk/src/3.1/methodsInterface.ts @@ -25,7 +25,7 @@ */ /** - * 376 API methods + * 378 API methods */ import type { @@ -142,6 +142,7 @@ import type { IRequestFolderChildren, IRequestFolderChildrenSearch, IRequestGraphDerivedTablesForModel, + IRequestGraphDerivedTablesForView, IRequestLogin, IRequestRoleUsers, IRequestRunGitConnectionTest, @@ -2435,6 +2436,38 @@ export interface ILooker31SDK extends IAPIMethods { //#endregion Datagroup: Manage Datagroups + //#region DerivedTable: View Derived Table graphs + + /** + * ### Discover information about derived tables + * + * GET /derived_table/graph/model/{model} -> IDependencyGraph + * + * @param request composed interface "IRequestGraphDerivedTablesForModel" for complex method parameters + * @param options one-time API call overrides + * + */ + graph_derived_tables_for_model( + request: IRequestGraphDerivedTablesForModel, + options?: Partial + ): Promise> + + /** + * ### Get the subgraph representing this derived table and its dependencies. + * + * GET /derived_table/graph/view/{view} -> IDependencyGraph + * + * @param request composed interface "IRequestGraphDerivedTablesForView" for complex method parameters + * @param options one-time API call overrides + * + */ + graph_derived_tables_for_view( + request: IRequestGraphDerivedTablesForView, + options?: Partial + ): Promise> + + //#endregion DerivedTable: View Derived Table graphs + //#region Folder: Manage Folders /** @@ -3571,20 +3604,6 @@ export interface ILooker31SDK extends IAPIMethods { //#region LookmlModel: Manage LookML Models - /** - * ### Discover information about derived tables - * - * GET /derived_table/graph/model/{model} -> IDependencyGraph - * - * @param request composed interface "IRequestGraphDerivedTablesForModel" for complex method parameters - * @param options one-time API call overrides - * - */ - graph_derived_tables_for_model( - request: IRequestGraphDerivedTablesForModel, - options?: Partial - ): Promise> - /** * ### Get information about all lookml models. * diff --git a/packages/sdk/src/3.1/models.ts b/packages/sdk/src/3.1/models.ts index 6a894c0e3..0267a9117 100644 --- a/packages/sdk/src/3.1/models.ts +++ b/packages/sdk/src/3.1/models.ts @@ -25,7 +25,7 @@ */ /** - * 302 API models: 188 Spec, 47 Request, 51 Write, 16 Enum + * 303 API models: 188 Spec, 48 Request, 51 Write, 16 Enum */ import type { IDictionary, Url, DelimArray } from '@looker/sdk-rtl' @@ -1198,7 +1198,7 @@ export interface IDashboard { preferred_viewer?: string space?: ISpaceBase /** - * Enables alerts to keep in sync with dashboard filter changes - only available in Enhanced Alerts (beta) + * Enables alerts to keep in sync with dashboard filter changes */ alert_sync_with_dashboard_filter_enabled?: boolean /** @@ -6183,6 +6183,24 @@ export interface IRequestGraphDerivedTablesForModel { color?: string } +/** + * Dynamically generated request type for graph_derived_tables_for_view + */ +export interface IRequestGraphDerivedTablesForView { + /** + * The derived table's view name. + */ + view: string + /** + * The models where this derived table is defined. + */ + models?: string + /** + * The model directory to look in, either `dev` or `production`. + */ + workspace?: string +} + /** * Dynamically generated request type for login */ @@ -9257,7 +9275,7 @@ export interface IWriteDashboard { */ space?: IWriteSpaceBase /** - * Enables alerts to keep in sync with dashboard filter changes - only available in Enhanced Alerts (beta) + * Enables alerts to keep in sync with dashboard filter changes */ alert_sync_with_dashboard_filter_enabled?: boolean /** diff --git a/packages/sdk/src/3.1/streams.ts b/packages/sdk/src/3.1/streams.ts index a33927e63..449cc8014 100644 --- a/packages/sdk/src/3.1/streams.ts +++ b/packages/sdk/src/3.1/streams.ts @@ -25,7 +25,7 @@ */ /** - * 376 API methods + * 378 API methods */ import type { Readable } from 'readable-stream' @@ -144,6 +144,7 @@ import type { IRequestFolderChildren, IRequestFolderChildrenSearch, IRequestGraphDerivedTablesForModel, + IRequestGraphDerivedTablesForView, IRequestLogin, IRequestRoleUsers, IRequestRunGitConnectionTest, @@ -3865,6 +3866,62 @@ export class Looker31SDKStream extends APIMethods { //#endregion Datagroup: Manage Datagroups + //#region DerivedTable: View Derived Table graphs + + /** + * ### Discover information about derived tables + * + * GET /derived_table/graph/model/{model} -> IDependencyGraph + * + * @param callback streaming output function + * @param request composed interface "IRequestGraphDerivedTablesForModel" for complex method parameters + * @param options one-time API call overrides + * + */ + async graph_derived_tables_for_model( + callback: (readable: Readable) => Promise, + request: IRequestGraphDerivedTablesForModel, + options?: Partial + ) { + request.model = encodeParam(request.model) + return this.authStream( + callback, + 'GET', + `/derived_table/graph/model/${request.model}`, + { format: request.format, color: request.color }, + null, + options + ) + } + + /** + * ### Get the subgraph representing this derived table and its dependencies. + * + * GET /derived_table/graph/view/{view} -> IDependencyGraph + * + * @param callback streaming output function + * @param request composed interface "IRequestGraphDerivedTablesForView" for complex method parameters + * @param options one-time API call overrides + * + */ + async graph_derived_tables_for_view( + callback: (readable: Readable) => Promise, + request: IRequestGraphDerivedTablesForView, + options?: Partial + ) { + request.view = encodeParam(request.view) + return this.authStream( + callback, + 'GET', + `/derived_table/graph/view/${request.view}`, + { models: request.models, workspace: request.workspace }, + null, + options + ) + } + + //#endregion DerivedTable: View Derived Table graphs + //#region Folder: Manage Folders /** @@ -5780,32 +5837,6 @@ export class Looker31SDKStream extends APIMethods { //#region LookmlModel: Manage LookML Models - /** - * ### Discover information about derived tables - * - * GET /derived_table/graph/model/{model} -> IDependencyGraph - * - * @param callback streaming output function - * @param request composed interface "IRequestGraphDerivedTablesForModel" for complex method parameters - * @param options one-time API call overrides - * - */ - async graph_derived_tables_for_model( - callback: (readable: Readable) => Promise, - request: IRequestGraphDerivedTablesForModel, - options?: Partial - ) { - request.model = encodeParam(request.model) - return this.authStream( - callback, - 'GET', - `/derived_table/graph/model/${request.model}`, - { format: request.format, color: request.color }, - null, - options - ) - } - /** * ### Get information about all lookml models. * diff --git a/packages/sdk/src/4.0/funcs.ts b/packages/sdk/src/4.0/funcs.ts index 6c336ffbb..13bb812c6 100644 --- a/packages/sdk/src/4.0/funcs.ts +++ b/packages/sdk/src/4.0/funcs.ts @@ -25,7 +25,7 @@ */ /** - * 425 API methods + * 429 API methods */ import type { @@ -65,6 +65,7 @@ import type { IContentView, ICostEstimate, ICreateCostEstimate, + ICreateCredentialsApi3, ICreateEmbedUserRequest, ICreateFolder, ICreateOAuthApplicationUserStateRequest, @@ -99,6 +100,7 @@ import type { IDigestEmails, IDigestEmailSend, IEmbedParams, + IEmbedSecret, IEmbedSsoParams, IEmbedUrlResponse, IError, @@ -172,6 +174,7 @@ import type { IRequestFolderChildrenSearch, IRequestGetAllCommands, IRequestGraphDerivedTablesForModel, + IRequestGraphDerivedTablesForView, IRequestLogin, IRequestModelFieldnameSuggestions, IRequestRoleUsers, @@ -253,6 +256,7 @@ import type { IWriteDashboardLayoutComponent, IWriteDatagroup, IWriteDBConnection, + IWriteEmbedSecret, IWriteExternalOauthApplication, IWriteGitBranch, IWriteGroup, @@ -617,6 +621,54 @@ export const logout = async ( //#region Auth: Manage User Authentication Configuration +/** + * ### Create an embed secret using the specified information. + * + * The value of the `secret` field will be set by Looker and returned. + * + * POST /embed_config/secrets -> IEmbedSecret + * + * @param sdk IAPIMethods implementation + * @param body Partial + * @param options one-time API call overrides + * + */ +export const create_embed_secret = async ( + sdk: IAPIMethods, + body?: Partial, + options?: Partial +): Promise> => { + return sdk.post( + '/embed_config/secrets', + null, + body, + options + ) +} + +/** + * ### Delete an embed secret. + * + * DELETE /embed_config/secrets/{embed_secret_id} -> string + * + * @param sdk IAPIMethods implementation + * @param embed_secret_id Id of Embed Secret + * @param options one-time API call overrides + * + */ +export const delete_embed_secret = async ( + sdk: IAPIMethods, + embed_secret_id: number, + options?: Partial +): Promise> => { + return sdk.delete( + `/embed_config/secrets/${embed_secret_id}`, + null, + null, + options + ) +} + /** * ### Create SSO Embed URL * @@ -5191,6 +5243,58 @@ export const update_datagroup = async ( //#endregion Datagroup: Manage Datagroups +//#region DerivedTable: View Derived Table graphs + +/** + * ### Discover information about derived tables + * + * GET /derived_table/graph/model/{model} -> IDependencyGraph + * + * @param sdk IAPIMethods implementation + * @param request composed interface "IRequestGraphDerivedTablesForModel" for complex method parameters + * @param options one-time API call overrides + * + */ +export const graph_derived_tables_for_model = async ( + sdk: IAPIMethods, + request: IRequestGraphDerivedTablesForModel, + options?: Partial +): Promise> => { + request.model = encodeParam(request.model) + return sdk.get( + `/derived_table/graph/model/${request.model}`, + { format: request.format, color: request.color }, + null, + options + ) +} + +/** + * ### Get the subgraph representing this derived table and its dependencies. + * + * GET /derived_table/graph/view/{view} -> IDependencyGraph + * + * @param sdk IAPIMethods implementation + * @param request composed interface "IRequestGraphDerivedTablesForView" for complex method parameters + * @param options one-time API call overrides + * + */ +export const graph_derived_tables_for_view = async ( + sdk: IAPIMethods, + request: IRequestGraphDerivedTablesForView, + options?: Partial +): Promise> => { + request.view = encodeParam(request.view) + return sdk.get( + `/derived_table/graph/view/${request.view}`, + { models: request.models, workspace: request.workspace }, + null, + options + ) +} + +//#endregion DerivedTable: View Derived Table graphs + //#region Folder: Manage Folders /** @@ -6473,10 +6577,11 @@ export const search_looks = async ( */ export const look = async ( sdk: IAPIMethods, - look_id: number, + look_id: string, fields?: string, options?: Partial ): Promise> => { + look_id = encodeParam(look_id) return sdk.get( `/looks/${look_id}`, { fields }, @@ -6518,11 +6623,12 @@ export const look = async ( */ export const update_look = async ( sdk: IAPIMethods, - look_id: number, + look_id: string, body: Partial, fields?: string, options?: Partial ): Promise> => { + look_id = encodeParam(look_id) return sdk.patch( `/looks/${look_id}`, { fields }, @@ -6549,9 +6655,10 @@ export const update_look = async ( */ export const delete_look = async ( sdk: IAPIMethods, - look_id: number, + look_id: string, options?: Partial ): Promise> => { + look_id = encodeParam(look_id) return sdk.delete(`/looks/${look_id}`, null, null, options) } @@ -6590,6 +6697,7 @@ export const run_look = async ( request: IRequestRunLook, options?: Partial ): Promise> => { + request.look_id = encodeParam(request.look_id) request.result_format = encodeParam(request.result_format) return sdk.get( `/looks/${request.look_id}/run/${request.result_format}`, @@ -6631,10 +6739,11 @@ export const run_look = async ( */ export const copy_look = async ( sdk: IAPIMethods, - look_id: number, + look_id: string, folder_id?: string, options?: Partial ): Promise> => { + look_id = encodeParam(look_id) return sdk.post( `/looks/${look_id}/copy`, { folder_id }, @@ -6661,10 +6770,11 @@ export const copy_look = async ( */ export const move_look = async ( sdk: IAPIMethods, - look_id: number, + look_id: string, folder_id: string, options?: Partial ): Promise> => { + look_id = encodeParam(look_id) return sdk.patch( `/looks/${look_id}/move`, { folder_id }, @@ -6677,30 +6787,6 @@ export const move_look = async ( //#region LookmlModel: Manage LookML Models -/** - * ### Discover information about derived tables - * - * GET /derived_table/graph/model/{model} -> IDependencyGraph - * - * @param sdk IAPIMethods implementation - * @param request composed interface "IRequestGraphDerivedTablesForModel" for complex method parameters - * @param options one-time API call overrides - * - */ -export const graph_derived_tables_for_model = async ( - sdk: IAPIMethods, - request: IRequestGraphDerivedTablesForModel, - options?: Partial -): Promise> => { - request.model = encodeParam(request.model) - return sdk.get( - `/derived_table/graph/model/${request.model}`, - { format: request.format, color: request.color }, - null, - options - ) -} - /** * ### Get information about all lookml models. * @@ -8379,6 +8465,7 @@ export const run_query = async ( path_prefix: request.path_prefix, rebuild_pdts: request.rebuild_pdts, server_table_calcs: request.server_table_calcs, + source: request.source, }, null, options @@ -11372,11 +11459,10 @@ export const all_user_credentials_api3s = async ( /** * ### API 3 login information for the specified user. This is for the newer API keys that can be added for any user. * - * POST /users/{user_id}/credentials_api3 -> ICredentialsApi3 + * POST /users/{user_id}/credentials_api3 -> ICreateCredentialsApi3 * * @param sdk IAPIMethods implementation * @param user_id id of user - * @param body WARNING: no writeable properties found for POST, PUT, or PATCH * @param fields Requested fields. * @param options one-time API call overrides * @@ -11384,14 +11470,13 @@ export const all_user_credentials_api3s = async ( export const create_user_credentials_api3 = async ( sdk: IAPIMethods, user_id: number, - body?: Partial, fields?: string, options?: Partial -): Promise> => { - return sdk.post( +): Promise> => { + return sdk.post( `/users/${user_id}/credentials_api3`, { fields }, - body, + null, options ) } diff --git a/packages/sdk/src/4.0/methods.ts b/packages/sdk/src/4.0/methods.ts index 491317525..9ec8af150 100644 --- a/packages/sdk/src/4.0/methods.ts +++ b/packages/sdk/src/4.0/methods.ts @@ -25,7 +25,7 @@ */ /** - * 425 API methods + * 429 API methods */ import type { @@ -63,6 +63,7 @@ import type { IContentView, ICostEstimate, ICreateCostEstimate, + ICreateCredentialsApi3, ICreateEmbedUserRequest, ICreateFolder, ICreateOAuthApplicationUserStateRequest, @@ -97,6 +98,7 @@ import type { IDigestEmails, IDigestEmailSend, IEmbedParams, + IEmbedSecret, IEmbedSsoParams, IEmbedUrlResponse, IError, @@ -170,6 +172,7 @@ import type { IRequestFolderChildrenSearch, IRequestGetAllCommands, IRequestGraphDerivedTablesForModel, + IRequestGraphDerivedTablesForView, IRequestLogin, IRequestModelFieldnameSuggestions, IRequestRoleUsers, @@ -251,6 +254,7 @@ import type { IWriteDashboardLayoutComponent, IWriteDatagroup, IWriteDBConnection, + IWriteEmbedSecret, IWriteExternalOauthApplication, IWriteGitBranch, IWriteGroup, @@ -598,6 +602,50 @@ export class Looker40SDK extends APIMethods implements ILooker40SDK { //#region Auth: Manage User Authentication Configuration + /** + * ### Create an embed secret using the specified information. + * + * The value of the `secret` field will be set by Looker and returned. + * + * POST /embed_config/secrets -> IEmbedSecret + * + * @param body Partial + * @param options one-time API call overrides + * + */ + async create_embed_secret( + body?: Partial, + options?: Partial + ): Promise> { + return this.post( + '/embed_config/secrets', + null, + body, + options + ) + } + + /** + * ### Delete an embed secret. + * + * DELETE /embed_config/secrets/{embed_secret_id} -> string + * + * @param embed_secret_id Id of Embed Secret + * @param options one-time API call overrides + * + */ + async delete_embed_secret( + embed_secret_id: number, + options?: Partial + ): Promise> { + return this.delete( + `/embed_config/secrets/${embed_secret_id}`, + null, + null, + options + ) + } + /** * ### Create SSO Embed URL * @@ -4855,6 +4903,54 @@ export class Looker40SDK extends APIMethods implements ILooker40SDK { //#endregion Datagroup: Manage Datagroups + //#region DerivedTable: View Derived Table graphs + + /** + * ### Discover information about derived tables + * + * GET /derived_table/graph/model/{model} -> IDependencyGraph + * + * @param request composed interface "IRequestGraphDerivedTablesForModel" for complex method parameters + * @param options one-time API call overrides + * + */ + async graph_derived_tables_for_model( + request: IRequestGraphDerivedTablesForModel, + options?: Partial + ): Promise> { + request.model = encodeParam(request.model) + return this.get( + `/derived_table/graph/model/${request.model}`, + { format: request.format, color: request.color }, + null, + options + ) + } + + /** + * ### Get the subgraph representing this derived table and its dependencies. + * + * GET /derived_table/graph/view/{view} -> IDependencyGraph + * + * @param request composed interface "IRequestGraphDerivedTablesForView" for complex method parameters + * @param options one-time API call overrides + * + */ + async graph_derived_tables_for_view( + request: IRequestGraphDerivedTablesForView, + options?: Partial + ): Promise> { + request.view = encodeParam(request.view) + return this.get( + `/derived_table/graph/view/${request.view}`, + { models: request.models, workspace: request.workspace }, + null, + options + ) + } + + //#endregion DerivedTable: View Derived Table graphs + //#region Folder: Manage Folders /** @@ -6055,10 +6151,11 @@ export class Looker40SDK extends APIMethods implements ILooker40SDK { * */ async look( - look_id: number, + look_id: string, fields?: string, options?: Partial ): Promise> { + look_id = encodeParam(look_id) return this.get( `/looks/${look_id}`, { fields }, @@ -6098,11 +6195,12 @@ export class Looker40SDK extends APIMethods implements ILooker40SDK { * */ async update_look( - look_id: number, + look_id: string, body: Partial, fields?: string, options?: Partial ): Promise> { + look_id = encodeParam(look_id) return this.patch( `/looks/${look_id}`, { fields }, @@ -6127,9 +6225,10 @@ export class Looker40SDK extends APIMethods implements ILooker40SDK { * */ async delete_look( - look_id: number, + look_id: string, options?: Partial ): Promise> { + look_id = encodeParam(look_id) return this.delete(`/looks/${look_id}`, null, null, options) } @@ -6166,6 +6265,7 @@ export class Looker40SDK extends APIMethods implements ILooker40SDK { request: IRequestRunLook, options?: Partial ): Promise> { + request.look_id = encodeParam(request.look_id) request.result_format = encodeParam(request.result_format) return this.get( `/looks/${request.look_id}/run/${request.result_format}`, @@ -6205,10 +6305,11 @@ export class Looker40SDK extends APIMethods implements ILooker40SDK { * */ async copy_look( - look_id: number, + look_id: string, folder_id?: string, options?: Partial ): Promise> { + look_id = encodeParam(look_id) return this.post( `/looks/${look_id}/copy`, { folder_id }, @@ -6233,10 +6334,11 @@ export class Looker40SDK extends APIMethods implements ILooker40SDK { * */ async move_look( - look_id: number, + look_id: string, folder_id: string, options?: Partial ): Promise> { + look_id = encodeParam(look_id) return this.patch( `/looks/${look_id}/move`, { folder_id }, @@ -6249,28 +6351,6 @@ export class Looker40SDK extends APIMethods implements ILooker40SDK { //#region LookmlModel: Manage LookML Models - /** - * ### Discover information about derived tables - * - * GET /derived_table/graph/model/{model} -> IDependencyGraph - * - * @param request composed interface "IRequestGraphDerivedTablesForModel" for complex method parameters - * @param options one-time API call overrides - * - */ - async graph_derived_tables_for_model( - request: IRequestGraphDerivedTablesForModel, - options?: Partial - ): Promise> { - request.model = encodeParam(request.model) - return this.get( - `/derived_table/graph/model/${request.model}`, - { format: request.format, color: request.color }, - null, - options - ) - } - /** * ### Get information about all lookml models. * @@ -7847,6 +7927,7 @@ export class Looker40SDK extends APIMethods implements ILooker40SDK { path_prefix: request.path_prefix, rebuild_pdts: request.rebuild_pdts, server_table_calcs: request.server_table_calcs, + source: request.source, }, null, options @@ -10680,24 +10761,22 @@ export class Looker40SDK extends APIMethods implements ILooker40SDK { /** * ### API 3 login information for the specified user. This is for the newer API keys that can be added for any user. * - * POST /users/{user_id}/credentials_api3 -> ICredentialsApi3 + * POST /users/{user_id}/credentials_api3 -> ICreateCredentialsApi3 * * @param user_id id of user - * @param body WARNING: no writeable properties found for POST, PUT, or PATCH * @param fields Requested fields. * @param options one-time API call overrides * */ async create_user_credentials_api3( user_id: number, - body?: Partial, fields?: string, options?: Partial - ): Promise> { - return this.post( + ): Promise> { + return this.post( `/users/${user_id}/credentials_api3`, { fields }, - body, + null, options ) } diff --git a/packages/sdk/src/4.0/methodsInterface.ts b/packages/sdk/src/4.0/methodsInterface.ts index 740dd8c09..3471feb67 100644 --- a/packages/sdk/src/4.0/methodsInterface.ts +++ b/packages/sdk/src/4.0/methodsInterface.ts @@ -25,7 +25,7 @@ */ /** - * 425 API methods + * 429 API methods */ import type { @@ -60,6 +60,7 @@ import type { IContentView, ICostEstimate, ICreateCostEstimate, + ICreateCredentialsApi3, ICreateEmbedUserRequest, ICreateFolder, ICreateOAuthApplicationUserStateRequest, @@ -94,6 +95,7 @@ import type { IDigestEmails, IDigestEmailSend, IEmbedParams, + IEmbedSecret, IEmbedSsoParams, IEmbedUrlResponse, IError, @@ -167,6 +169,7 @@ import type { IRequestFolderChildrenSearch, IRequestGetAllCommands, IRequestGraphDerivedTablesForModel, + IRequestGraphDerivedTablesForView, IRequestLogin, IRequestModelFieldnameSuggestions, IRequestRoleUsers, @@ -248,6 +251,7 @@ import type { IWriteDashboardLayoutComponent, IWriteDatagroup, IWriteDBConnection, + IWriteEmbedSecret, IWriteExternalOauthApplication, IWriteGitBranch, IWriteGroup, @@ -519,6 +523,36 @@ export interface ILooker40SDK extends IAPIMethods { //#region Auth: Manage User Authentication Configuration + /** + * ### Create an embed secret using the specified information. + * + * The value of the `secret` field will be set by Looker and returned. + * + * POST /embed_config/secrets -> IEmbedSecret + * + * @param body Partial + * @param options one-time API call overrides + * + */ + create_embed_secret( + body?: Partial, + options?: Partial + ): Promise> + + /** + * ### Delete an embed secret. + * + * DELETE /embed_config/secrets/{embed_secret_id} -> string + * + * @param embed_secret_id Id of Embed Secret + * @param options one-time API call overrides + * + */ + delete_embed_secret( + embed_secret_id: number, + options?: Partial + ): Promise> + /** * ### Create SSO Embed URL * @@ -3503,6 +3537,38 @@ export interface ILooker40SDK extends IAPIMethods { //#endregion Datagroup: Manage Datagroups + //#region DerivedTable: View Derived Table graphs + + /** + * ### Discover information about derived tables + * + * GET /derived_table/graph/model/{model} -> IDependencyGraph + * + * @param request composed interface "IRequestGraphDerivedTablesForModel" for complex method parameters + * @param options one-time API call overrides + * + */ + graph_derived_tables_for_model( + request: IRequestGraphDerivedTablesForModel, + options?: Partial + ): Promise> + + /** + * ### Get the subgraph representing this derived table and its dependencies. + * + * GET /derived_table/graph/view/{view} -> IDependencyGraph + * + * @param request composed interface "IRequestGraphDerivedTablesForView" for complex method parameters + * @param options one-time API call overrides + * + */ + graph_derived_tables_for_view( + request: IRequestGraphDerivedTablesForView, + options?: Partial + ): Promise> + + //#endregion DerivedTable: View Derived Table graphs + //#region Folder: Manage Folders /** @@ -4313,7 +4379,7 @@ export interface ILooker40SDK extends IAPIMethods { * */ look( - look_id: number, + look_id: string, fields?: string, options?: Partial ): Promise> @@ -4349,7 +4415,7 @@ export interface ILooker40SDK extends IAPIMethods { * */ update_look( - look_id: number, + look_id: string, body: Partial, fields?: string, options?: Partial @@ -4371,7 +4437,7 @@ export interface ILooker40SDK extends IAPIMethods { * */ delete_look( - look_id: number, + look_id: string, options?: Partial ): Promise> @@ -4426,7 +4492,7 @@ export interface ILooker40SDK extends IAPIMethods { * */ copy_look( - look_id: number, + look_id: string, folder_id?: string, options?: Partial ): Promise> @@ -4447,7 +4513,7 @@ export interface ILooker40SDK extends IAPIMethods { * */ move_look( - look_id: number, + look_id: string, folder_id: string, options?: Partial ): Promise> @@ -4456,20 +4522,6 @@ export interface ILooker40SDK extends IAPIMethods { //#region LookmlModel: Manage LookML Models - /** - * ### Discover information about derived tables - * - * GET /derived_table/graph/model/{model} -> IDependencyGraph - * - * @param request composed interface "IRequestGraphDerivedTablesForModel" for complex method parameters - * @param options one-time API call overrides - * - */ - graph_derived_tables_for_model( - request: IRequestGraphDerivedTablesForModel, - options?: Partial - ): Promise> - /** * ### Get information about all lookml models. * @@ -7658,20 +7710,18 @@ export interface ILooker40SDK extends IAPIMethods { /** * ### API 3 login information for the specified user. This is for the newer API keys that can be added for any user. * - * POST /users/{user_id}/credentials_api3 -> ICredentialsApi3 + * POST /users/{user_id}/credentials_api3 -> ICreateCredentialsApi3 * * @param user_id id of user - * @param body WARNING: no writeable properties found for POST, PUT, or PATCH * @param fields Requested fields. * @param options one-time API call overrides * */ create_user_credentials_api3( user_id: number, - body?: Partial, fields?: string, options?: Partial - ): Promise> + ): Promise> /** * ### Embed login information for the specified user. diff --git a/packages/sdk/src/4.0/models.ts b/packages/sdk/src/4.0/models.ts index 582446be6..9db935762 100644 --- a/packages/sdk/src/4.0/models.ts +++ b/packages/sdk/src/4.0/models.ts @@ -25,7 +25,7 @@ */ /** - * 352 API models: 221 Spec, 54 Request, 57 Write, 20 Enum + * 356 API models: 223 Spec, 55 Request, 58 Write, 20 Enum */ import type { IDictionary, DelimArray } from '@looker/sdk-rtl' @@ -452,7 +452,7 @@ export interface IBoardItem { /** * Look to base this item on */ - look_id?: number + look_id?: string /** * LookML Dashboard to base this item on */ @@ -709,7 +709,7 @@ export interface IContentFavorite { /** * Id of a look (read-only) */ - look_id?: number + look_id?: string /** * Id of a dashboard (read-only) */ @@ -746,7 +746,7 @@ export interface IContentMeta { /** * Id of associated look when content_type is "look" (read-only) */ - look_id?: number + look_id?: string /** * Id of associated folder when content_type is "space" (read-only) */ @@ -1009,7 +1009,7 @@ export interface IContentValidationLook { /** * Unique Id (read-only) */ - id?: number + id?: string /** * Look Title */ @@ -1055,7 +1055,7 @@ export interface IContentValidationScheduledPlan { /** * Id of a look */ - look_id?: number + look_id?: string /** * Unique Id (read-only) */ @@ -1093,7 +1093,7 @@ export interface IContentView { /** * Id of viewed Look (read-only) */ - look_id?: number + look_id?: string /** * Id of the viewed Dashboard (read-only) */ @@ -1180,6 +1180,41 @@ export interface ICreateCostEstimate { sql?: string } +export interface ICreateCredentialsApi3 { + /** + * Operations the current user is able to perform on this object (read-only) + */ + can?: IDictionary + /** + * Unique Id (read-only) + */ + id?: number + /** + * API key client_id (read-only) + */ + client_id?: string + /** + * Timestamp for the creation of this credential (read-only) + */ + created_at?: string + /** + * Has this credential been disabled? (read-only) + */ + is_disabled?: boolean + /** + * Short name for the type of this kind of credential (read-only) + */ + type?: string + /** + * API key client_secret (read-only) + */ + client_secret?: string + /** + * Link to get this item (read-only) + */ + url?: string +} + export interface ICreateDashboardFilter { /** * Unique Id (read-only) @@ -1313,16 +1348,13 @@ export interface ICreateQueryTask { /** * Id of look associated with query. */ - look_id?: number + look_id?: string /** * Id of dashboard associated with query. */ dashboard_id?: string } -/** - * WARNING: no writeable properties found for POST, PUT, or PATCH - */ export interface ICredentialsApi3 { /** * Operations the current user is able to perform on this object (read-only) @@ -1775,7 +1807,7 @@ export interface IDashboard { */ preferred_viewer?: string /** - * Enables alerts to keep in sync with dashboard filter changes - only available in Enhanced Alerts (beta) + * Enables alerts to keep in sync with dashboard filter changes */ alert_sync_with_dashboard_filter_enabled?: boolean /** @@ -2902,6 +2934,33 @@ export interface IEmbedParams { force_logout_login?: boolean } +export interface IEmbedSecret { + /** + * Signing algorithm to use with this secret. Either `hmac/sha-256`(default) or `hmac/sha-1` + */ + algorithm?: string + /** + * When secret was created (read-only) + */ + created_at?: string + /** + * Is this secret currently enabled + */ + enabled?: boolean + /** + * Unique Id (read-only) + */ + id?: number + /** + * Secret for use with SSO embedding (read-only) + */ + secret?: string + /** + * Id of user who created this secret (read-only) + */ + user_id?: number +} + export interface IEmbedSsoParams { /** * The complete URL of the Looker UI page to display in the embed context. For example, to display the dashboard with id 34, `target_url` would look like: `https://mycompany.looker.com:9999/dashboards/34`. `target_uri` MUST contain a scheme (HTTPS), domain name, and URL path. Port must be included if it is required to reach the Looker server from browser clients. If the Looker instance is behind a load balancer or other proxy, `target_uri` must be the public-facing domain name and port required to reach the Looker instance, not the actual internal network machine name of the Looker instance. @@ -3509,7 +3568,7 @@ export interface IHomepageItem { /** * Look to base this item on */ - look_id?: number + look_id?: string /** * LookML Dashboard to base this item on */ @@ -4300,7 +4359,7 @@ export interface ILook { /** * Unique Id (read-only) */ - id?: number + id?: string /** * Look Title */ @@ -5186,7 +5245,7 @@ export interface ILookWithDashboards { /** * Unique Id (read-only) */ - id?: number + id?: string /** * Look Title */ @@ -5307,7 +5366,7 @@ export interface ILookWithQuery { /** * Unique Id (read-only) */ - id?: number + id?: string /** * Look Title */ @@ -6387,7 +6446,7 @@ export interface IQueryTask { /** * Id of look associated with query. */ - look_id?: number + look_id?: string /** * Id of dashboard associated with query. */ @@ -6434,7 +6493,7 @@ export interface IRenderTask { /** * Id of look to render (read-only) */ - look_id?: number + look_id?: string /** * Id of lookml dashboard to render (read-only) */ @@ -7092,6 +7151,24 @@ export interface IRequestGraphDerivedTablesForModel { color?: string } +/** + * Dynamically generated request type for graph_derived_tables_for_view + */ +export interface IRequestGraphDerivedTablesForView { + /** + * The derived table's view name. + */ + view: string + /** + * The models where this derived table is defined. + */ + models?: string + /** + * The model directory to look in, either `dev` or `production`. + */ + workspace?: string +} + /** * Dynamically generated request type for login */ @@ -7241,7 +7318,7 @@ export interface IRequestRunLook { /** * Id of look */ - look_id: number + look_id: string /** * Format of result */ @@ -7378,6 +7455,10 @@ export interface IRequestRunQuery { * Perform table calculations on query results */ server_table_calcs?: boolean + /** + * Specifies the source of this call. + */ + source?: string } /** @@ -8849,7 +8930,7 @@ export interface IScheduledPlan { /** * Id of a look */ - look_id?: number + look_id?: string /** * Id of a dashboard */ @@ -10254,7 +10335,7 @@ export interface IWriteBoardItem { /** * Look to base this item on */ - look_id?: number + look_id?: string /** * LookML Dashboard to base this item on */ @@ -10457,7 +10538,7 @@ export interface IWriteCreateQueryTask { /** * Id of look associated with query. */ - look_id?: number + look_id?: string /** * Id of dashboard associated with query. */ @@ -10518,7 +10599,7 @@ export interface IWriteDashboard { */ preferred_viewer?: string /** - * Enables alerts to keep in sync with dashboard filter changes - only available in Enhanced Alerts (beta) + * Enables alerts to keep in sync with dashboard filter changes */ alert_sync_with_dashboard_filter_enabled?: boolean /** @@ -10981,6 +11062,21 @@ export interface IWriteDBConnectionOverride { after_connect_statements?: string } +/** + * Dynamic writeable type for EmbedSecret removes: + * created_at, id, secret, user_id + */ +export interface IWriteEmbedSecret { + /** + * Signing algorithm to use with this secret. Either `hmac/sha-256`(default) or `hmac/sha-1` + */ + algorithm?: string + /** + * Is this secret currently enabled + */ + enabled?: boolean +} + /** * Dynamic writeable type for ExternalOauthApplication removes: * can, id, created_at @@ -11907,7 +12003,7 @@ export interface IWriteScheduledPlan { /** * Id of a look */ - look_id?: number + look_id?: string /** * Id of a dashboard */ diff --git a/packages/sdk/src/4.0/streams.ts b/packages/sdk/src/4.0/streams.ts index b0758d399..5aeb972b7 100644 --- a/packages/sdk/src/4.0/streams.ts +++ b/packages/sdk/src/4.0/streams.ts @@ -25,7 +25,7 @@ */ /** - * 425 API methods + * 429 API methods */ import type { Readable } from 'readable-stream' @@ -63,6 +63,7 @@ import type { IContentView, ICostEstimate, ICreateCostEstimate, + ICreateCredentialsApi3, ICreateEmbedUserRequest, ICreateFolder, ICreateOAuthApplicationUserStateRequest, @@ -97,6 +98,7 @@ import type { IDigestEmails, IDigestEmailSend, IEmbedParams, + IEmbedSecret, IEmbedSsoParams, IEmbedUrlResponse, IExternalOauthApplication, @@ -169,6 +171,7 @@ import type { IRequestFolderChildrenSearch, IRequestGetAllCommands, IRequestGraphDerivedTablesForModel, + IRequestGraphDerivedTablesForView, IRequestLogin, IRequestModelFieldnameSuggestions, IRequestRoleUsers, @@ -250,6 +253,7 @@ import type { IWriteDashboardLayoutComponent, IWriteDatagroup, IWriteDBConnection, + IWriteEmbedSecret, IWriteExternalOauthApplication, IWriteGitBranch, IWriteGroup, @@ -652,6 +656,58 @@ export class Looker40SDKStream extends APIMethods { //#region Auth: Manage User Authentication Configuration + /** + * ### Create an embed secret using the specified information. + * + * The value of the `secret` field will be set by Looker and returned. + * + * POST /embed_config/secrets -> IEmbedSecret + * + * @param callback streaming output function + * @param body Partial + * @param options one-time API call overrides + * + */ + async create_embed_secret( + callback: (readable: Readable) => Promise, + body?: Partial, + options?: Partial + ) { + return this.authStream( + callback, + 'POST', + '/embed_config/secrets', + null, + body, + options + ) + } + + /** + * ### Delete an embed secret. + * + * DELETE /embed_config/secrets/{embed_secret_id} -> string + * + * @param callback streaming output function + * @param embed_secret_id Id of Embed Secret + * @param options one-time API call overrides + * + */ + async delete_embed_secret( + callback: (readable: Readable) => Promise, + embed_secret_id: number, + options?: Partial + ) { + return this.authStream( + callback, + 'DELETE', + `/embed_config/secrets/${embed_secret_id}`, + null, + null, + options + ) + } + /** * ### Create SSO Embed URL * @@ -5600,6 +5656,62 @@ export class Looker40SDKStream extends APIMethods { //#endregion Datagroup: Manage Datagroups + //#region DerivedTable: View Derived Table graphs + + /** + * ### Discover information about derived tables + * + * GET /derived_table/graph/model/{model} -> IDependencyGraph + * + * @param callback streaming output function + * @param request composed interface "IRequestGraphDerivedTablesForModel" for complex method parameters + * @param options one-time API call overrides + * + */ + async graph_derived_tables_for_model( + callback: (readable: Readable) => Promise, + request: IRequestGraphDerivedTablesForModel, + options?: Partial + ) { + request.model = encodeParam(request.model) + return this.authStream( + callback, + 'GET', + `/derived_table/graph/model/${request.model}`, + { format: request.format, color: request.color }, + null, + options + ) + } + + /** + * ### Get the subgraph representing this derived table and its dependencies. + * + * GET /derived_table/graph/view/{view} -> IDependencyGraph + * + * @param callback streaming output function + * @param request composed interface "IRequestGraphDerivedTablesForView" for complex method parameters + * @param options one-time API call overrides + * + */ + async graph_derived_tables_for_view( + callback: (readable: Readable) => Promise, + request: IRequestGraphDerivedTablesForView, + options?: Partial + ) { + request.view = encodeParam(request.view) + return this.authStream( + callback, + 'GET', + `/derived_table/graph/view/${request.view}`, + { models: request.models, workspace: request.workspace }, + null, + options + ) + } + + //#endregion DerivedTable: View Derived Table graphs + //#region Folder: Manage Folders /** @@ -6984,10 +7096,11 @@ export class Looker40SDKStream extends APIMethods { */ async look( callback: (readable: Readable) => Promise, - look_id: number, + look_id: string, fields?: string, options?: Partial ) { + look_id = encodeParam(look_id) return this.authStream( callback, 'GET', @@ -7031,11 +7144,12 @@ export class Looker40SDKStream extends APIMethods { */ async update_look( callback: (readable: Readable) => Promise, - look_id: number, + look_id: string, body: Partial, fields?: string, options?: Partial ) { + look_id = encodeParam(look_id) return this.authStream( callback, 'PATCH', @@ -7064,9 +7178,10 @@ export class Looker40SDKStream extends APIMethods { */ async delete_look( callback: (readable: Readable) => Promise, - look_id: number, + look_id: string, options?: Partial ) { + look_id = encodeParam(look_id) return this.authStream( callback, 'DELETE', @@ -7112,6 +7227,7 @@ export class Looker40SDKStream extends APIMethods { request: IRequestRunLook, options?: Partial ) { + request.look_id = encodeParam(request.look_id) request.result_format = encodeParam(request.result_format) return this.authStream( callback, @@ -7155,10 +7271,11 @@ export class Looker40SDKStream extends APIMethods { */ async copy_look( callback: (readable: Readable) => Promise, - look_id: number, + look_id: string, folder_id?: string, options?: Partial ) { + look_id = encodeParam(look_id) return this.authStream( callback, 'POST', @@ -7187,10 +7304,11 @@ export class Looker40SDKStream extends APIMethods { */ async move_look( callback: (readable: Readable) => Promise, - look_id: number, + look_id: string, folder_id: string, options?: Partial ) { + look_id = encodeParam(look_id) return this.authStream( callback, 'PATCH', @@ -7205,32 +7323,6 @@ export class Looker40SDKStream extends APIMethods { //#region LookmlModel: Manage LookML Models - /** - * ### Discover information about derived tables - * - * GET /derived_table/graph/model/{model} -> IDependencyGraph - * - * @param callback streaming output function - * @param request composed interface "IRequestGraphDerivedTablesForModel" for complex method parameters - * @param options one-time API call overrides - * - */ - async graph_derived_tables_for_model( - callback: (readable: Readable) => Promise, - request: IRequestGraphDerivedTablesForModel, - options?: Partial - ) { - request.model = encodeParam(request.model) - return this.authStream( - callback, - 'GET', - `/derived_table/graph/model/${request.model}`, - { format: request.format, color: request.color }, - null, - options - ) - } - /** * ### Get information about all lookml models. * @@ -9028,6 +9120,7 @@ export class Looker40SDKStream extends APIMethods { path_prefix: request.path_prefix, rebuild_pdts: request.rebuild_pdts, server_table_calcs: request.server_table_calcs, + source: request.source, }, null, options @@ -12261,28 +12354,26 @@ export class Looker40SDKStream extends APIMethods { /** * ### API 3 login information for the specified user. This is for the newer API keys that can be added for any user. * - * POST /users/{user_id}/credentials_api3 -> ICredentialsApi3 + * POST /users/{user_id}/credentials_api3 -> ICreateCredentialsApi3 * * @param callback streaming output function * @param user_id id of user - * @param body WARNING: no writeable properties found for POST, PUT, or PATCH * @param fields Requested fields. * @param options one-time API call overrides * */ async create_user_credentials_api3( - callback: (readable: Readable) => Promise, + callback: (readable: Readable) => Promise, user_id: number, - body?: Partial, fields?: string, options?: Partial ) { - return this.authStream( + return this.authStream( callback, 'POST', `/users/${user_id}/credentials_api3`, { fields }, - body, + null, options ) } diff --git a/packages/sdk/src/constants.ts b/packages/sdk/src/constants.ts index 866459776..0472066b9 100644 --- a/packages/sdk/src/constants.ts +++ b/packages/sdk/src/constants.ts @@ -24,5 +24,5 @@ */ -export const sdkVersion = '21.18' +export const sdkVersion = '21.20' export const environmentPrefix = 'LOOKERSDK' diff --git a/python/looker_sdk/sdk/api31/methods.py b/python/looker_sdk/sdk/api31/methods.py index ab3c983a1..4b3cbc094 100644 --- a/python/looker_sdk/sdk/api31/methods.py +++ b/python/looker_sdk/sdk/api31/methods.py @@ -21,7 +21,7 @@ # SOFTWARE. # -# 376 API methods +# 378 API methods # NOTE: Do not edit this file generated by Looker SDK Codegen for API 3.1 @@ -29,7 +29,7 @@ from typing import Any, MutableMapping, Optional, Sequence, Union, cast import warnings -from . import models +from . import models as mdls from looker_sdk.rtl import api_methods from looker_sdk.rtl import transport @@ -67,7 +67,7 @@ class Looker31SDK(api_methods.APIMethods): # # For more information and detailed examples of Looker API authorization, see [How to Authenticate to Looker API3](https://github.com/looker/looker-sdk-ruby/blob/master/authentication.md). # - # POST /login -> models.AccessToken + # POST /login -> mdls.AccessToken def login( self, # client_id part of API3 Key. @@ -75,13 +75,13 @@ def login( # client_secret part of API3 Key. client_secret: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.AccessToken: + ) -> mdls.AccessToken: """Login""" response = cast( - models.AccessToken, + mdls.AccessToken, self.post( path="/login", - structure=models.AccessToken, + structure=mdls.AccessToken, query_params={"client_id": client_id, "client_secret": client_secret}, transport_options=transport_options, ), @@ -105,7 +105,7 @@ def login( # # See 'login' for more detail on the access token and how to use it. # - # POST /login/{user_id} -> models.AccessToken + # POST /login/{user_id} -> mdls.AccessToken def login_user( self, # Id of user. @@ -113,16 +113,16 @@ def login_user( # When true (default), API calls using the returned access_token are attributed to the admin user who created the access_token. When false, API activity is attributed to the user the access_token runs as. False requires a looker license. associative: Optional[bool] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.AccessToken: + ) -> mdls.AccessToken: """Login user""" warnings.warn( "login_user behavior changed significantly in 21.4.0. See https://git.io/JOtH1" ) response = cast( - models.AccessToken, + mdls.AccessToken, self.post( path=f"/login/{user_id}", - structure=models.AccessToken, + structure=mdls.AccessToken, query_params={"associative": associative}, transport_options=transport_options, ), @@ -184,18 +184,18 @@ def logout( # it to disk, do not pass it to a third party, and only pass it through a secure HTTPS # encrypted transport. # - # POST /embed/sso_url -> models.EmbedUrlResponse + # POST /embed/sso_url -> mdls.EmbedUrlResponse def create_sso_embed_url( self, - body: models.EmbedSsoParams, + body: mdls.EmbedSsoParams, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.EmbedUrlResponse: + ) -> mdls.EmbedUrlResponse: """Create SSO Embed Url""" response = cast( - models.EmbedUrlResponse, + mdls.EmbedUrlResponse, self.post( path="/embed/sso_url", - structure=models.EmbedUrlResponse, + structure=mdls.EmbedUrlResponse, body=body, transport_options=transport_options, ), @@ -219,17 +219,17 @@ def create_sso_embed_url( # # See the [Looker LDAP docs](https://www.looker.com/docs/r/api/ldap_setup) for additional information. # - # GET /ldap_config -> models.LDAPConfig + # GET /ldap_config -> mdls.LDAPConfig def ldap_config( self, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.LDAPConfig: + ) -> mdls.LDAPConfig: """Get LDAP Configuration""" response = cast( - models.LDAPConfig, + mdls.LDAPConfig, self.get( path="/ldap_config", - structure=models.LDAPConfig, + structure=mdls.LDAPConfig, transport_options=transport_options, ), ) @@ -247,18 +247,18 @@ def ldap_config( # # See the [Looker LDAP docs](https://www.looker.com/docs/r/api/ldap_setup) for additional information. # - # PATCH /ldap_config -> models.LDAPConfig + # PATCH /ldap_config -> mdls.LDAPConfig def update_ldap_config( self, - body: models.WriteLDAPConfig, + body: mdls.WriteLDAPConfig, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.LDAPConfig: + ) -> mdls.LDAPConfig: """Update LDAP Configuration""" response = cast( - models.LDAPConfig, + mdls.LDAPConfig, self.patch( path="/ldap_config", - structure=models.LDAPConfig, + structure=mdls.LDAPConfig, body=body, transport_options=transport_options, ), @@ -284,18 +284,18 @@ def update_ldap_config( # # The active LDAP settings are not modified. # - # PUT /ldap_config/test_connection -> models.LDAPConfigTestResult + # PUT /ldap_config/test_connection -> mdls.LDAPConfigTestResult def test_ldap_config_connection( self, - body: models.WriteLDAPConfig, + body: mdls.WriteLDAPConfig, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.LDAPConfigTestResult: + ) -> mdls.LDAPConfigTestResult: """Test LDAP Connection""" response = cast( - models.LDAPConfigTestResult, + mdls.LDAPConfigTestResult, self.put( path="/ldap_config/test_connection", - structure=models.LDAPConfigTestResult, + structure=mdls.LDAPConfigTestResult, body=body, transport_options=transport_options, ), @@ -323,18 +323,18 @@ def test_ldap_config_connection( # # The active LDAP settings are not modified. # - # PUT /ldap_config/test_auth -> models.LDAPConfigTestResult + # PUT /ldap_config/test_auth -> mdls.LDAPConfigTestResult def test_ldap_config_auth( self, - body: models.WriteLDAPConfig, + body: mdls.WriteLDAPConfig, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.LDAPConfigTestResult: + ) -> mdls.LDAPConfigTestResult: """Test LDAP Auth""" response = cast( - models.LDAPConfigTestResult, + mdls.LDAPConfigTestResult, self.put( path="/ldap_config/test_auth", - structure=models.LDAPConfigTestResult, + structure=mdls.LDAPConfigTestResult, body=body, transport_options=transport_options, ), @@ -351,18 +351,18 @@ def test_ldap_config_auth( # # The active LDAP settings are not modified. # - # PUT /ldap_config/test_user_info -> models.LDAPConfigTestResult + # PUT /ldap_config/test_user_info -> mdls.LDAPConfigTestResult def test_ldap_config_user_info( self, - body: models.WriteLDAPConfig, + body: mdls.WriteLDAPConfig, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.LDAPConfigTestResult: + ) -> mdls.LDAPConfigTestResult: """Test LDAP User Info""" response = cast( - models.LDAPConfigTestResult, + mdls.LDAPConfigTestResult, self.put( path="/ldap_config/test_user_info", - structure=models.LDAPConfigTestResult, + structure=mdls.LDAPConfigTestResult, body=body, transport_options=transport_options, ), @@ -379,18 +379,18 @@ def test_ldap_config_user_info( # # The active LDAP settings are not modified. # - # PUT /ldap_config/test_user_auth -> models.LDAPConfigTestResult + # PUT /ldap_config/test_user_auth -> mdls.LDAPConfigTestResult def test_ldap_config_user_auth( self, - body: models.WriteLDAPConfig, + body: mdls.WriteLDAPConfig, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.LDAPConfigTestResult: + ) -> mdls.LDAPConfigTestResult: """Test LDAP User Auth""" response = cast( - models.LDAPConfigTestResult, + mdls.LDAPConfigTestResult, self.put( path="/ldap_config/test_user_auth", - structure=models.LDAPConfigTestResult, + structure=mdls.LDAPConfigTestResult, body=body, transport_options=transport_options, ), @@ -410,17 +410,17 @@ def test_ldap_config_user_auth( # # OIDC is enabled or disabled for Looker using the **enabled** field. # - # GET /oidc_config -> models.OIDCConfig + # GET /oidc_config -> mdls.OIDCConfig def oidc_config( self, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.OIDCConfig: + ) -> mdls.OIDCConfig: """Get OIDC Configuration""" response = cast( - models.OIDCConfig, + mdls.OIDCConfig, self.get( path="/oidc_config", - structure=models.OIDCConfig, + structure=mdls.OIDCConfig, transport_options=transport_options, ), ) @@ -436,18 +436,18 @@ def oidc_config( # # It is **highly** recommended that any OIDC setting changes be tested using the APIs below before being set globally. # - # PATCH /oidc_config -> models.OIDCConfig + # PATCH /oidc_config -> mdls.OIDCConfig def update_oidc_config( self, - body: models.WriteOIDCConfig, + body: mdls.WriteOIDCConfig, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.OIDCConfig: + ) -> mdls.OIDCConfig: """Update OIDC Configuration""" response = cast( - models.OIDCConfig, + mdls.OIDCConfig, self.patch( path="/oidc_config", - structure=models.OIDCConfig, + structure=mdls.OIDCConfig, body=body, transport_options=transport_options, ), @@ -456,20 +456,20 @@ def update_oidc_config( # ### Get a OIDC test configuration by test_slug. # - # GET /oidc_test_configs/{test_slug} -> models.OIDCConfig + # GET /oidc_test_configs/{test_slug} -> mdls.OIDCConfig def oidc_test_config( self, # Slug of test config test_slug: str, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.OIDCConfig: + ) -> mdls.OIDCConfig: """Get OIDC Test Configuration""" test_slug = self.encode_path_param(test_slug) response = cast( - models.OIDCConfig, + mdls.OIDCConfig, self.get( path=f"/oidc_test_configs/{test_slug}", - structure=models.OIDCConfig, + structure=mdls.OIDCConfig, transport_options=transport_options, ), ) @@ -498,18 +498,18 @@ def delete_oidc_test_config( # ### Create a OIDC test configuration. # - # POST /oidc_test_configs -> models.OIDCConfig + # POST /oidc_test_configs -> mdls.OIDCConfig def create_oidc_test_config( self, - body: models.WriteOIDCConfig, + body: mdls.WriteOIDCConfig, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.OIDCConfig: + ) -> mdls.OIDCConfig: """Create OIDC Test Configuration""" response = cast( - models.OIDCConfig, + mdls.OIDCConfig, self.post( path="/oidc_test_configs", - structure=models.OIDCConfig, + structure=mdls.OIDCConfig, body=body, transport_options=transport_options, ), @@ -518,17 +518,17 @@ def create_oidc_test_config( # ### Get password config. # - # GET /password_config -> models.PasswordConfig + # GET /password_config -> mdls.PasswordConfig def password_config( self, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.PasswordConfig: + ) -> mdls.PasswordConfig: """Get Password Config""" response = cast( - models.PasswordConfig, + mdls.PasswordConfig, self.get( path="/password_config", - structure=models.PasswordConfig, + structure=mdls.PasswordConfig, transport_options=transport_options, ), ) @@ -536,18 +536,18 @@ def password_config( # ### Update password config. # - # PATCH /password_config -> models.PasswordConfig + # PATCH /password_config -> mdls.PasswordConfig def update_password_config( self, - body: models.WritePasswordConfig, + body: mdls.WritePasswordConfig, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.PasswordConfig: + ) -> mdls.PasswordConfig: """Update Password Config""" response = cast( - models.PasswordConfig, + mdls.PasswordConfig, self.patch( path="/password_config", - structure=models.PasswordConfig, + structure=mdls.PasswordConfig, body=body, transport_options=transport_options, ), @@ -585,17 +585,17 @@ def force_password_reset_at_next_login_for_all_users( # # SAML is enabled or disabled for Looker using the **enabled** field. # - # GET /saml_config -> models.SamlConfig + # GET /saml_config -> mdls.SamlConfig def saml_config( self, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.SamlConfig: + ) -> mdls.SamlConfig: """Get SAML Configuration""" response = cast( - models.SamlConfig, + mdls.SamlConfig, self.get( path="/saml_config", - structure=models.SamlConfig, + structure=mdls.SamlConfig, transport_options=transport_options, ), ) @@ -611,18 +611,18 @@ def saml_config( # # It is **highly** recommended that any SAML setting changes be tested using the APIs below before being set globally. # - # PATCH /saml_config -> models.SamlConfig + # PATCH /saml_config -> mdls.SamlConfig def update_saml_config( self, - body: models.WriteSamlConfig, + body: mdls.WriteSamlConfig, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.SamlConfig: + ) -> mdls.SamlConfig: """Update SAML Configuration""" response = cast( - models.SamlConfig, + mdls.SamlConfig, self.patch( path="/saml_config", - structure=models.SamlConfig, + structure=mdls.SamlConfig, body=body, transport_options=transport_options, ), @@ -631,20 +631,20 @@ def update_saml_config( # ### Get a SAML test configuration by test_slug. # - # GET /saml_test_configs/{test_slug} -> models.SamlConfig + # GET /saml_test_configs/{test_slug} -> mdls.SamlConfig def saml_test_config( self, # Slug of test config test_slug: str, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.SamlConfig: + ) -> mdls.SamlConfig: """Get SAML Test Configuration""" test_slug = self.encode_path_param(test_slug) response = cast( - models.SamlConfig, + mdls.SamlConfig, self.get( path=f"/saml_test_configs/{test_slug}", - structure=models.SamlConfig, + structure=mdls.SamlConfig, transport_options=transport_options, ), ) @@ -673,18 +673,18 @@ def delete_saml_test_config( # ### Create a SAML test configuration. # - # POST /saml_test_configs -> models.SamlConfig + # POST /saml_test_configs -> mdls.SamlConfig def create_saml_test_config( self, - body: models.WriteSamlConfig, + body: mdls.WriteSamlConfig, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.SamlConfig: + ) -> mdls.SamlConfig: """Create SAML Test Configuration""" response = cast( - models.SamlConfig, + mdls.SamlConfig, self.post( path="/saml_test_configs", - structure=models.SamlConfig, + structure=mdls.SamlConfig, body=body, transport_options=transport_options, ), @@ -693,18 +693,18 @@ def create_saml_test_config( # ### Parse the given xml as a SAML IdP metadata document and return the result. # - # POST /parse_saml_idp_metadata -> models.SamlMetadataParseResult + # POST /parse_saml_idp_metadata -> mdls.SamlMetadataParseResult def parse_saml_idp_metadata( self, body: str, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.SamlMetadataParseResult: + ) -> mdls.SamlMetadataParseResult: """Parse SAML IdP XML""" response = cast( - models.SamlMetadataParseResult, + mdls.SamlMetadataParseResult, self.post( path="/parse_saml_idp_metadata", - structure=models.SamlMetadataParseResult, + structure=mdls.SamlMetadataParseResult, body=body, transport_options=transport_options, ), @@ -715,18 +715,18 @@ def parse_saml_idp_metadata( # Note that this requires that the url be public or at least at a location where the Looker instance # can fetch it without requiring any special authentication. # - # POST /fetch_and_parse_saml_idp_metadata -> models.SamlMetadataParseResult + # POST /fetch_and_parse_saml_idp_metadata -> mdls.SamlMetadataParseResult def fetch_and_parse_saml_idp_metadata( self, body: str, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.SamlMetadataParseResult: + ) -> mdls.SamlMetadataParseResult: """Parse SAML IdP Url""" response = cast( - models.SamlMetadataParseResult, + mdls.SamlMetadataParseResult, self.post( path="/fetch_and_parse_saml_idp_metadata", - structure=models.SamlMetadataParseResult, + structure=mdls.SamlMetadataParseResult, body=body, transport_options=transport_options, ), @@ -735,17 +735,17 @@ def fetch_and_parse_saml_idp_metadata( # ### Get session config. # - # GET /session_config -> models.SessionConfig + # GET /session_config -> mdls.SessionConfig def session_config( self, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.SessionConfig: + ) -> mdls.SessionConfig: """Get Session Config""" response = cast( - models.SessionConfig, + mdls.SessionConfig, self.get( path="/session_config", - structure=models.SessionConfig, + structure=mdls.SessionConfig, transport_options=transport_options, ), ) @@ -753,18 +753,18 @@ def session_config( # ### Update session config. # - # PATCH /session_config -> models.SessionConfig + # PATCH /session_config -> mdls.SessionConfig def update_session_config( self, - body: models.WriteSessionConfig, + body: mdls.WriteSessionConfig, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.SessionConfig: + ) -> mdls.SessionConfig: """Update Session Config""" response = cast( - models.SessionConfig, + mdls.SessionConfig, self.patch( path="/session_config", - structure=models.SessionConfig, + structure=mdls.SessionConfig, body=body, transport_options=transport_options, ), @@ -773,19 +773,19 @@ def update_session_config( # ### Get currently locked-out users. # - # GET /user_login_lockouts -> Sequence[models.UserLoginLockout] + # GET /user_login_lockouts -> Sequence[mdls.UserLoginLockout] def all_user_login_lockouts( self, # Include only these fields in the response fields: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> Sequence[models.UserLoginLockout]: + ) -> Sequence[mdls.UserLoginLockout]: """Get All User Login Lockouts""" response = cast( - Sequence[models.UserLoginLockout], + Sequence[mdls.UserLoginLockout], self.get( path="/user_login_lockouts", - structure=Sequence[models.UserLoginLockout], + structure=Sequence[mdls.UserLoginLockout], query_params={"fields": fields}, transport_options=transport_options, ), @@ -794,7 +794,7 @@ def all_user_login_lockouts( # ### Search currently locked-out users. # - # GET /user_login_lockouts/search -> Sequence[models.UserLoginLockout] + # GET /user_login_lockouts/search -> Sequence[mdls.UserLoginLockout] def search_user_login_lockouts( self, # Include only these fields in the response @@ -816,13 +816,13 @@ def search_user_login_lockouts( # Combine given search criteria in a boolean OR expression filter_or: Optional[bool] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> Sequence[models.UserLoginLockout]: + ) -> Sequence[mdls.UserLoginLockout]: """Search User Login Lockouts""" response = cast( - Sequence[models.UserLoginLockout], + Sequence[mdls.UserLoginLockout], self.get( path="/user_login_lockouts/search", - structure=Sequence[models.UserLoginLockout], + structure=Sequence[mdls.UserLoginLockout], query_params={ "fields": fields, "page": page, @@ -873,19 +873,19 @@ def delete_user_login_lockout( # # **Note**: Only an API user with the Admin role can call this endpoint. Unauthorized requests will return `Not Found` (404) errors. # - # GET /color_collections -> Sequence[models.ColorCollection] + # GET /color_collections -> Sequence[mdls.ColorCollection] def all_color_collections( self, # Requested fields. fields: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> Sequence[models.ColorCollection]: + ) -> Sequence[mdls.ColorCollection]: """Get all Color Collections""" response = cast( - Sequence[models.ColorCollection], + Sequence[mdls.ColorCollection], self.get( path="/color_collections", - structure=Sequence[models.ColorCollection], + structure=Sequence[mdls.ColorCollection], query_params={"fields": fields}, transport_options=transport_options, ), @@ -902,18 +902,18 @@ def all_color_collections( # # **Note**: Only an API user with the Admin role can call this endpoint. Unauthorized requests will return `Not Found` (404) errors. # - # POST /color_collections -> models.ColorCollection + # POST /color_collections -> mdls.ColorCollection def create_color_collection( self, - body: models.WriteColorCollection, + body: mdls.WriteColorCollection, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.ColorCollection: + ) -> mdls.ColorCollection: """Create ColorCollection""" response = cast( - models.ColorCollection, + mdls.ColorCollection, self.post( path="/color_collections", - structure=models.ColorCollection, + structure=mdls.ColorCollection, body=body, transport_options=transport_options, ), @@ -927,19 +927,19 @@ def create_color_collection( # # **Note**: Only an API user with the Admin role can call this endpoint. Unauthorized requests will return `Not Found` (404) errors. # - # GET /color_collections/custom -> Sequence[models.ColorCollection] + # GET /color_collections/custom -> Sequence[mdls.ColorCollection] def color_collections_custom( self, # Requested fields. fields: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> Sequence[models.ColorCollection]: + ) -> Sequence[mdls.ColorCollection]: """Get all Custom Color Collections""" response = cast( - Sequence[models.ColorCollection], + Sequence[mdls.ColorCollection], self.get( path="/color_collections/custom", - structure=Sequence[models.ColorCollection], + structure=Sequence[mdls.ColorCollection], query_params={"fields": fields}, transport_options=transport_options, ), @@ -953,19 +953,19 @@ def color_collections_custom( # # **Note**: Only an API user with the Admin role can call this endpoint. Unauthorized requests will return `Not Found` (404) errors. # - # GET /color_collections/standard -> Sequence[models.ColorCollection] + # GET /color_collections/standard -> Sequence[mdls.ColorCollection] def color_collections_standard( self, # Requested fields. fields: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> Sequence[models.ColorCollection]: + ) -> Sequence[mdls.ColorCollection]: """Get all Standard Color Collections""" response = cast( - Sequence[models.ColorCollection], + Sequence[mdls.ColorCollection], self.get( path="/color_collections/standard", - structure=Sequence[models.ColorCollection], + structure=Sequence[mdls.ColorCollection], query_params={"fields": fields}, transport_options=transport_options, ), @@ -978,17 +978,17 @@ def color_collections_standard( # # Set the default color collection with [ColorCollection](#!/ColorCollection/set_default_color_collection) # - # GET /color_collections/default -> models.ColorCollection + # GET /color_collections/default -> mdls.ColorCollection def default_color_collection( self, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.ColorCollection: + ) -> mdls.ColorCollection: """Get Default Color Collection""" response = cast( - models.ColorCollection, + mdls.ColorCollection, self.get( path="/color_collections/default", - structure=models.ColorCollection, + structure=mdls.ColorCollection, transport_options=transport_options, ), ) @@ -999,19 +999,19 @@ def default_color_collection( # Returns the new specified default Color Collection object. # **Note**: Only an API user with the Admin role can call this endpoint. Unauthorized requests will return `Not Found` (404) errors. # - # PUT /color_collections/default -> models.ColorCollection + # PUT /color_collections/default -> mdls.ColorCollection def set_default_color_collection( self, # ID of color collection to set as default collection_id: str, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.ColorCollection: + ) -> mdls.ColorCollection: """Set Default Color Collection""" response = cast( - models.ColorCollection, + mdls.ColorCollection, self.put( path="/color_collections/default", - structure=models.ColorCollection, + structure=mdls.ColorCollection, query_params={"collection_id": collection_id}, transport_options=transport_options, ), @@ -1029,7 +1029,7 @@ def set_default_color_collection( # # **Note**: Only an API user with the Admin role can call this endpoint. Unauthorized requests will return `Not Found` (404) errors. # - # GET /color_collections/{collection_id} -> models.ColorCollection + # GET /color_collections/{collection_id} -> mdls.ColorCollection def color_collection( self, # Id of Color Collection @@ -1037,14 +1037,14 @@ def color_collection( # Requested fields. fields: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.ColorCollection: + ) -> mdls.ColorCollection: """Get Color Collection by ID""" collection_id = self.encode_path_param(collection_id) response = cast( - models.ColorCollection, + mdls.ColorCollection, self.get( path=f"/color_collections/{collection_id}", - structure=models.ColorCollection, + structure=mdls.ColorCollection, query_params={"fields": fields}, transport_options=transport_options, ), @@ -1054,21 +1054,21 @@ def color_collection( # ### Update a custom color collection by id. # **Note**: Only an API user with the Admin role can call this endpoint. Unauthorized requests will return `Not Found` (404) errors. # - # PATCH /color_collections/{collection_id} -> models.ColorCollection + # PATCH /color_collections/{collection_id} -> mdls.ColorCollection def update_color_collection( self, # Id of Custom Color Collection collection_id: str, - body: models.WriteColorCollection, + body: mdls.WriteColorCollection, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.ColorCollection: + ) -> mdls.ColorCollection: """Update Custom Color collection""" collection_id = self.encode_path_param(collection_id) response = cast( - models.ColorCollection, + mdls.ColorCollection, self.patch( path=f"/color_collections/{collection_id}", - structure=models.ColorCollection, + structure=mdls.ColorCollection, body=body, transport_options=transport_options, ), @@ -1109,17 +1109,17 @@ def delete_color_collection( # ### WARNING: The Looker internal database backup function has been deprecated. # - # GET /backup_configuration -> models.BackupConfiguration + # GET /backup_configuration -> mdls.BackupConfiguration def backup_configuration( self, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.BackupConfiguration: + ) -> mdls.BackupConfiguration: """Get Backup Configuration""" response = cast( - models.BackupConfiguration, + mdls.BackupConfiguration, self.get( path="/backup_configuration", - structure=models.BackupConfiguration, + structure=mdls.BackupConfiguration, transport_options=transport_options, ), ) @@ -1127,18 +1127,18 @@ def backup_configuration( # ### WARNING: The Looker internal database backup function has been deprecated. # - # PATCH /backup_configuration -> models.BackupConfiguration + # PATCH /backup_configuration -> mdls.BackupConfiguration def update_backup_configuration( self, - body: models.WriteBackupConfiguration, + body: mdls.WriteBackupConfiguration, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.BackupConfiguration: + ) -> mdls.BackupConfiguration: """Update Backup Configuration""" response = cast( - models.BackupConfiguration, + mdls.BackupConfiguration, self.patch( path="/backup_configuration", - structure=models.BackupConfiguration, + structure=mdls.BackupConfiguration, body=body, transport_options=transport_options, ), @@ -1147,17 +1147,17 @@ def update_backup_configuration( # Get the current Cloud Storage Configuration. # - # GET /cloud_storage -> models.BackupConfiguration + # GET /cloud_storage -> mdls.BackupConfiguration def cloud_storage_configuration( self, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.BackupConfiguration: + ) -> mdls.BackupConfiguration: """Get Cloud Storage""" response = cast( - models.BackupConfiguration, + mdls.BackupConfiguration, self.get( path="/cloud_storage", - structure=models.BackupConfiguration, + structure=mdls.BackupConfiguration, transport_options=transport_options, ), ) @@ -1165,18 +1165,18 @@ def cloud_storage_configuration( # Update the current Cloud Storage Configuration. # - # PATCH /cloud_storage -> models.BackupConfiguration + # PATCH /cloud_storage -> mdls.BackupConfiguration def update_cloud_storage_configuration( self, - body: models.WriteBackupConfiguration, + body: mdls.WriteBackupConfiguration, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.BackupConfiguration: + ) -> mdls.BackupConfiguration: """Update Cloud Storage""" response = cast( - models.BackupConfiguration, + mdls.BackupConfiguration, self.patch( path="/cloud_storage", - structure=models.BackupConfiguration, + structure=mdls.BackupConfiguration, body=body, transport_options=transport_options, ), @@ -1185,17 +1185,17 @@ def update_cloud_storage_configuration( # ### Get the current status and content of custom welcome emails # - # GET /custom_welcome_email -> models.CustomWelcomeEmail + # GET /custom_welcome_email -> mdls.CustomWelcomeEmail def custom_welcome_email( self, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.CustomWelcomeEmail: + ) -> mdls.CustomWelcomeEmail: """Get Custom Welcome Email""" response = cast( - models.CustomWelcomeEmail, + mdls.CustomWelcomeEmail, self.get( path="/custom_welcome_email", - structure=models.CustomWelcomeEmail, + structure=mdls.CustomWelcomeEmail, transport_options=transport_options, ), ) @@ -1203,20 +1203,20 @@ def custom_welcome_email( # Update custom welcome email setting and values. Optionally send a test email with the new content to the currently logged in user. # - # PATCH /custom_welcome_email -> models.CustomWelcomeEmail + # PATCH /custom_welcome_email -> mdls.CustomWelcomeEmail def update_custom_welcome_email( self, - body: models.WriteCustomWelcomeEmail, + body: mdls.WriteCustomWelcomeEmail, # If true a test email with the content from the request will be sent to the current user after saving send_test_welcome_email: Optional[bool] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.CustomWelcomeEmail: + ) -> mdls.CustomWelcomeEmail: """Update Custom Welcome Email Content""" response = cast( - models.CustomWelcomeEmail, + mdls.CustomWelcomeEmail, self.patch( path="/custom_welcome_email", - structure=models.CustomWelcomeEmail, + structure=mdls.CustomWelcomeEmail, query_params={"send_test_welcome_email": send_test_welcome_email}, body=body, transport_options=transport_options, @@ -1226,18 +1226,18 @@ def update_custom_welcome_email( # Requests to this endpoint will send a welcome email with the custom content provided in the body to the currently logged in user. # - # PUT /custom_welcome_email_test -> models.WelcomeEmailTest + # PUT /custom_welcome_email_test -> mdls.WelcomeEmailTest def update_custom_welcome_email_test( self, - body: models.WelcomeEmailTest, + body: mdls.WelcomeEmailTest, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.WelcomeEmailTest: + ) -> mdls.WelcomeEmailTest: """Send a test welcome email to the currently logged in user with the supplied content""" response = cast( - models.WelcomeEmailTest, + mdls.WelcomeEmailTest, self.put( path="/custom_welcome_email_test", - structure=models.WelcomeEmailTest, + structure=mdls.WelcomeEmailTest, body=body, transport_options=transport_options, ), @@ -1246,17 +1246,17 @@ def update_custom_welcome_email_test( # ### Retrieve the value for whether or not digest emails is enabled # - # GET /digest_emails_enabled -> models.DigestEmails + # GET /digest_emails_enabled -> mdls.DigestEmails def digest_emails_enabled( self, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.DigestEmails: + ) -> mdls.DigestEmails: """Get Digest_emails""" response = cast( - models.DigestEmails, + mdls.DigestEmails, self.get( path="/digest_emails_enabled", - structure=models.DigestEmails, + structure=mdls.DigestEmails, transport_options=transport_options, ), ) @@ -1264,18 +1264,18 @@ def digest_emails_enabled( # ### Update the setting for enabling/disabling digest emails # - # PATCH /digest_emails_enabled -> models.DigestEmails + # PATCH /digest_emails_enabled -> mdls.DigestEmails def update_digest_emails_enabled( self, - body: models.DigestEmails, + body: mdls.DigestEmails, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.DigestEmails: + ) -> mdls.DigestEmails: """Update Digest_emails""" response = cast( - models.DigestEmails, + mdls.DigestEmails, self.patch( path="/digest_emails_enabled", - structure=models.DigestEmails, + structure=mdls.DigestEmails, body=body, transport_options=transport_options, ), @@ -1286,17 +1286,17 @@ def update_digest_emails_enabled( # any actual emails, it generates records containing content which may be of interest for users who have become inactive. # Emails will be sent at a later time from Looker's internal system if the Digest Emails feature is enabled in settings. # - # POST /digest_email_send -> models.DigestEmailSend + # POST /digest_email_send -> mdls.DigestEmailSend def create_digest_email_send( self, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.DigestEmailSend: + ) -> mdls.DigestEmailSend: """Deliver digest email contents""" response = cast( - models.DigestEmailSend, + mdls.DigestEmailSend, self.post( path="/digest_email_send", - structure=models.DigestEmailSend, + structure=mdls.DigestEmailSend, transport_options=transport_options, ), ) @@ -1304,17 +1304,17 @@ def create_digest_email_send( # ### Set the menu item name and content for internal help resources # - # GET /internal_help_resources_content -> models.InternalHelpResourcesContent + # GET /internal_help_resources_content -> mdls.InternalHelpResourcesContent def internal_help_resources_content( self, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.InternalHelpResourcesContent: + ) -> mdls.InternalHelpResourcesContent: """Get Internal Help Resources Content""" response = cast( - models.InternalHelpResourcesContent, + mdls.InternalHelpResourcesContent, self.get( path="/internal_help_resources_content", - structure=models.InternalHelpResourcesContent, + structure=mdls.InternalHelpResourcesContent, transport_options=transport_options, ), ) @@ -1322,18 +1322,18 @@ def internal_help_resources_content( # Update internal help resources content # - # PATCH /internal_help_resources_content -> models.InternalHelpResourcesContent + # PATCH /internal_help_resources_content -> mdls.InternalHelpResourcesContent def update_internal_help_resources_content( self, - body: models.WriteInternalHelpResourcesContent, + body: mdls.WriteInternalHelpResourcesContent, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.InternalHelpResourcesContent: + ) -> mdls.InternalHelpResourcesContent: """Update internal help resources content""" response = cast( - models.InternalHelpResourcesContent, + mdls.InternalHelpResourcesContent, self.patch( path="/internal_help_resources_content", - structure=models.InternalHelpResourcesContent, + structure=mdls.InternalHelpResourcesContent, body=body, transport_options=transport_options, ), @@ -1342,17 +1342,17 @@ def update_internal_help_resources_content( # ### Get and set the options for internal help resources # - # GET /internal_help_resources_enabled -> models.InternalHelpResources + # GET /internal_help_resources_enabled -> mdls.InternalHelpResources def internal_help_resources( self, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.InternalHelpResources: + ) -> mdls.InternalHelpResources: """Get Internal Help Resources""" response = cast( - models.InternalHelpResources, + mdls.InternalHelpResources, self.get( path="/internal_help_resources_enabled", - structure=models.InternalHelpResources, + structure=mdls.InternalHelpResources, transport_options=transport_options, ), ) @@ -1360,18 +1360,18 @@ def internal_help_resources( # Update internal help resources settings # - # PATCH /internal_help_resources -> models.InternalHelpResources + # PATCH /internal_help_resources -> mdls.InternalHelpResources def update_internal_help_resources( self, - body: models.WriteInternalHelpResources, + body: mdls.WriteInternalHelpResources, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.InternalHelpResources: + ) -> mdls.InternalHelpResources: """Update internal help resources configuration""" response = cast( - models.InternalHelpResources, + mdls.InternalHelpResources, self.patch( path="/internal_help_resources", - structure=models.InternalHelpResources, + structure=mdls.InternalHelpResources, body=body, transport_options=transport_options, ), @@ -1380,17 +1380,17 @@ def update_internal_help_resources( # ### Get all legacy features. # - # GET /legacy_features -> Sequence[models.LegacyFeature] + # GET /legacy_features -> Sequence[mdls.LegacyFeature] def all_legacy_features( self, transport_options: Optional[transport.TransportOptions] = None, - ) -> Sequence[models.LegacyFeature]: + ) -> Sequence[mdls.LegacyFeature]: """Get All Legacy Features""" response = cast( - Sequence[models.LegacyFeature], + Sequence[mdls.LegacyFeature], self.get( path="/legacy_features", - structure=Sequence[models.LegacyFeature], + structure=Sequence[mdls.LegacyFeature], transport_options=transport_options, ), ) @@ -1398,19 +1398,19 @@ def all_legacy_features( # ### Get information about the legacy feature with a specific id. # - # GET /legacy_features/{legacy_feature_id} -> models.LegacyFeature + # GET /legacy_features/{legacy_feature_id} -> mdls.LegacyFeature def legacy_feature( self, # id of legacy feature legacy_feature_id: int, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.LegacyFeature: + ) -> mdls.LegacyFeature: """Get Legacy Feature""" response = cast( - models.LegacyFeature, + mdls.LegacyFeature, self.get( path=f"/legacy_features/{legacy_feature_id}", - structure=models.LegacyFeature, + structure=mdls.LegacyFeature, transport_options=transport_options, ), ) @@ -1418,20 +1418,20 @@ def legacy_feature( # ### Update information about the legacy feature with a specific id. # - # PATCH /legacy_features/{legacy_feature_id} -> models.LegacyFeature + # PATCH /legacy_features/{legacy_feature_id} -> mdls.LegacyFeature def update_legacy_feature( self, # id of legacy feature legacy_feature_id: int, - body: models.WriteLegacyFeature, + body: mdls.WriteLegacyFeature, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.LegacyFeature: + ) -> mdls.LegacyFeature: """Update Legacy Feature""" response = cast( - models.LegacyFeature, + mdls.LegacyFeature, self.patch( path=f"/legacy_features/{legacy_feature_id}", - structure=models.LegacyFeature, + structure=mdls.LegacyFeature, body=body, transport_options=transport_options, ), @@ -1440,17 +1440,17 @@ def update_legacy_feature( # ### Get a list of locales that Looker supports. # - # GET /locales -> Sequence[models.Locale] + # GET /locales -> Sequence[mdls.Locale] def all_locales( self, transport_options: Optional[transport.TransportOptions] = None, - ) -> Sequence[models.Locale]: + ) -> Sequence[mdls.Locale]: """Get All Locales""" response = cast( - Sequence[models.Locale], + Sequence[mdls.Locale], self.get( path="/locales", - structure=Sequence[models.Locale], + structure=Sequence[mdls.Locale], transport_options=transport_options, ), ) @@ -1458,17 +1458,17 @@ def all_locales( # ### Get a list of timezones that Looker supports (e.g. useful for scheduling tasks). # - # GET /timezones -> Sequence[models.Timezone] + # GET /timezones -> Sequence[mdls.Timezone] def all_timezones( self, transport_options: Optional[transport.TransportOptions] = None, - ) -> Sequence[models.Timezone]: + ) -> Sequence[mdls.Timezone]: """Get All Timezones""" response = cast( - Sequence[models.Timezone], + Sequence[mdls.Timezone], self.get( path="/timezones", - structure=Sequence[models.Timezone], + structure=Sequence[mdls.Timezone], transport_options=transport_options, ), ) @@ -1476,19 +1476,19 @@ def all_timezones( # ### Get information about all API versions supported by this Looker instance. # - # GET /versions -> models.ApiVersion + # GET /versions -> mdls.ApiVersion def versions( self, # Requested fields. fields: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.ApiVersion: + ) -> mdls.ApiVersion: """Get ApiVersion""" response = cast( - models.ApiVersion, + mdls.ApiVersion, self.get( path="/versions", - structure=models.ApiVersion, + structure=mdls.ApiVersion, query_params={"fields": fields}, transport_options=transport_options, ), @@ -1498,19 +1498,19 @@ def versions( # ### This feature is enabled only by special license. # ### Gets the whitelabel configuration, which includes hiding documentation links, custom favicon uploading, etc. # - # GET /whitelabel_configuration -> models.WhitelabelConfiguration + # GET /whitelabel_configuration -> mdls.WhitelabelConfiguration def whitelabel_configuration( self, # Requested fields. fields: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.WhitelabelConfiguration: + ) -> mdls.WhitelabelConfiguration: """Get Whitelabel configuration""" response = cast( - models.WhitelabelConfiguration, + mdls.WhitelabelConfiguration, self.get( path="/whitelabel_configuration", - structure=models.WhitelabelConfiguration, + structure=mdls.WhitelabelConfiguration, query_params={"fields": fields}, transport_options=transport_options, ), @@ -1519,18 +1519,18 @@ def whitelabel_configuration( # ### Update the whitelabel configuration # - # PUT /whitelabel_configuration -> models.WhitelabelConfiguration + # PUT /whitelabel_configuration -> mdls.WhitelabelConfiguration def update_whitelabel_configuration( self, - body: models.WriteWhitelabelConfiguration, + body: mdls.WriteWhitelabelConfiguration, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.WhitelabelConfiguration: + ) -> mdls.WhitelabelConfiguration: """Update Whitelabel configuration""" response = cast( - models.WhitelabelConfiguration, + mdls.WhitelabelConfiguration, self.put( path="/whitelabel_configuration", - structure=models.WhitelabelConfiguration, + structure=mdls.WhitelabelConfiguration, body=body, transport_options=transport_options, ), @@ -1543,19 +1543,19 @@ def update_whitelabel_configuration( # ### Get information about all connections. # - # GET /connections -> Sequence[models.DBConnection] + # GET /connections -> Sequence[mdls.DBConnection] def all_connections( self, # Requested fields. fields: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> Sequence[models.DBConnection]: + ) -> Sequence[mdls.DBConnection]: """Get All Connections""" response = cast( - Sequence[models.DBConnection], + Sequence[mdls.DBConnection], self.get( path="/connections", - structure=Sequence[models.DBConnection], + structure=Sequence[mdls.DBConnection], query_params={"fields": fields}, transport_options=transport_options, ), @@ -1564,18 +1564,18 @@ def all_connections( # ### Create a connection using the specified configuration. # - # POST /connections -> models.DBConnection + # POST /connections -> mdls.DBConnection def create_connection( self, - body: models.WriteDBConnection, + body: mdls.WriteDBConnection, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.DBConnection: + ) -> mdls.DBConnection: """Create Connection""" response = cast( - models.DBConnection, + mdls.DBConnection, self.post( path="/connections", - structure=models.DBConnection, + structure=mdls.DBConnection, body=body, transport_options=transport_options, ), @@ -1584,7 +1584,7 @@ def create_connection( # ### Get information about a connection. # - # GET /connections/{connection_name} -> models.DBConnection + # GET /connections/{connection_name} -> mdls.DBConnection def connection( self, # Name of connection @@ -1592,14 +1592,14 @@ def connection( # Requested fields. fields: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.DBConnection: + ) -> mdls.DBConnection: """Get Connection""" connection_name = self.encode_path_param(connection_name) response = cast( - models.DBConnection, + mdls.DBConnection, self.get( path=f"/connections/{connection_name}", - structure=models.DBConnection, + structure=mdls.DBConnection, query_params={"fields": fields}, transport_options=transport_options, ), @@ -1608,21 +1608,21 @@ def connection( # ### Update a connection using the specified configuration. # - # PATCH /connections/{connection_name} -> models.DBConnection + # PATCH /connections/{connection_name} -> mdls.DBConnection def update_connection( self, # Name of connection connection_name: str, - body: models.WriteDBConnection, + body: mdls.WriteDBConnection, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.DBConnection: + ) -> mdls.DBConnection: """Update Connection""" connection_name = self.encode_path_param(connection_name) response = cast( - models.DBConnection, + mdls.DBConnection, self.patch( path=f"/connections/{connection_name}", - structure=models.DBConnection, + structure=mdls.DBConnection, body=body, transport_options=transport_options, ), @@ -1683,22 +1683,22 @@ def delete_connection_override( # # Unsupported tests in the request will be ignored. # - # PUT /connections/{connection_name}/test -> Sequence[models.DBConnectionTestResult] + # PUT /connections/{connection_name}/test -> Sequence[mdls.DBConnectionTestResult] def test_connection( self, # Name of connection connection_name: str, # Array of names of tests to run - tests: Optional[models.DelimSequence[str]] = None, + tests: Optional[mdls.DelimSequence[str]] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> Sequence[models.DBConnectionTestResult]: + ) -> Sequence[mdls.DBConnectionTestResult]: """Test Connection""" connection_name = self.encode_path_param(connection_name) response = cast( - Sequence[models.DBConnectionTestResult], + Sequence[mdls.DBConnectionTestResult], self.put( path=f"/connections/{connection_name}/test", - structure=Sequence[models.DBConnectionTestResult], + structure=Sequence[mdls.DBConnectionTestResult], query_params={"tests": tests}, transport_options=transport_options, ), @@ -1714,20 +1714,20 @@ def test_connection( # # Unsupported tests in the request will be ignored. # - # PUT /connections/test -> Sequence[models.DBConnectionTestResult] + # PUT /connections/test -> Sequence[mdls.DBConnectionTestResult] def test_connection_config( self, - body: models.WriteDBConnection, + body: mdls.WriteDBConnection, # Array of names of tests to run - tests: Optional[models.DelimSequence[str]] = None, + tests: Optional[mdls.DelimSequence[str]] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> Sequence[models.DBConnectionTestResult]: + ) -> Sequence[mdls.DBConnectionTestResult]: """Test Connection Configuration""" response = cast( - Sequence[models.DBConnectionTestResult], + Sequence[mdls.DBConnectionTestResult], self.put( path="/connections/test", - structure=Sequence[models.DBConnectionTestResult], + structure=Sequence[mdls.DBConnectionTestResult], query_params={"tests": tests}, body=body, transport_options=transport_options, @@ -1737,19 +1737,19 @@ def test_connection_config( # ### Get information about all dialects. # - # GET /dialect_info -> Sequence[models.DialectInfo] + # GET /dialect_info -> Sequence[mdls.DialectInfo] def all_dialect_infos( self, # Requested fields. fields: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> Sequence[models.DialectInfo]: + ) -> Sequence[mdls.DialectInfo]: """Get All Dialect Infos""" response = cast( - Sequence[models.DialectInfo], + Sequence[mdls.DialectInfo], self.get( path="/dialect_info", - structure=Sequence[models.DialectInfo], + structure=Sequence[mdls.DialectInfo], query_params={"fields": fields}, transport_options=transport_options, ), @@ -1783,7 +1783,7 @@ def all_dialect_infos( # # Boolean search params accept only "true" and "false" as values. # - # GET /content_favorite/search -> Sequence[models.ContentFavorite] + # GET /content_favorite/search -> Sequence[mdls.ContentFavorite] def search_content_favorites( self, # Match content favorite id(s) @@ -1807,13 +1807,13 @@ def search_content_favorites( # Combine given search criteria in a boolean OR expression filter_or: Optional[bool] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> Sequence[models.ContentFavorite]: + ) -> Sequence[mdls.ContentFavorite]: """Search Favorite Contents""" response = cast( - Sequence[models.ContentFavorite], + Sequence[mdls.ContentFavorite], self.get( path="/content_favorite/search", - structure=Sequence[models.ContentFavorite], + structure=Sequence[mdls.ContentFavorite], query_params={ "id": id, "user_id": user_id, @@ -1833,7 +1833,7 @@ def search_content_favorites( # ### Get favorite content by its id # - # GET /content_favorite/{content_favorite_id} -> models.ContentFavorite + # GET /content_favorite/{content_favorite_id} -> mdls.ContentFavorite def content_favorite( self, # Id of favorite content @@ -1841,13 +1841,13 @@ def content_favorite( # Requested fields. fields: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.ContentFavorite: + ) -> mdls.ContentFavorite: """Get Favorite Content""" response = cast( - models.ContentFavorite, + mdls.ContentFavorite, self.get( path=f"/content_favorite/{content_favorite_id}", - structure=models.ContentFavorite, + structure=mdls.ContentFavorite, query_params={"fields": fields}, transport_options=transport_options, ), @@ -1876,18 +1876,18 @@ def delete_content_favorite( # ### Create favorite content # - # POST /content_favorite -> models.ContentFavorite + # POST /content_favorite -> mdls.ContentFavorite def create_content_favorite( self, - body: models.WriteContentFavorite, + body: mdls.WriteContentFavorite, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.ContentFavorite: + ) -> mdls.ContentFavorite: """Create Favorite Content""" response = cast( - models.ContentFavorite, + mdls.ContentFavorite, self.post( path="/content_favorite", - structure=models.ContentFavorite, + structure=mdls.ContentFavorite, body=body, transport_options=transport_options, ), @@ -1896,7 +1896,7 @@ def create_content_favorite( # ### Get information about all content metadata in a space. # - # GET /content_metadata -> Sequence[models.ContentMeta] + # GET /content_metadata -> Sequence[mdls.ContentMeta] def all_content_metadatas( self, # Parent space of content. @@ -1904,13 +1904,13 @@ def all_content_metadatas( # Requested fields. fields: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> Sequence[models.ContentMeta]: + ) -> Sequence[mdls.ContentMeta]: """Get All Content Metadatas""" response = cast( - Sequence[models.ContentMeta], + Sequence[mdls.ContentMeta], self.get( path="/content_metadata", - structure=Sequence[models.ContentMeta], + structure=Sequence[mdls.ContentMeta], query_params={"parent_id": parent_id, "fields": fields}, transport_options=transport_options, ), @@ -1919,7 +1919,7 @@ def all_content_metadatas( # ### Get information about an individual content metadata record. # - # GET /content_metadata/{content_metadata_id} -> models.ContentMeta + # GET /content_metadata/{content_metadata_id} -> mdls.ContentMeta def content_metadata( self, # Id of content metadata @@ -1927,13 +1927,13 @@ def content_metadata( # Requested fields. fields: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.ContentMeta: + ) -> mdls.ContentMeta: """Get Content Metadata""" response = cast( - models.ContentMeta, + mdls.ContentMeta, self.get( path=f"/content_metadata/{content_metadata_id}", - structure=models.ContentMeta, + structure=mdls.ContentMeta, query_params={"fields": fields}, transport_options=transport_options, ), @@ -1942,20 +1942,20 @@ def content_metadata( # ### Move a piece of content. # - # PATCH /content_metadata/{content_metadata_id} -> models.ContentMeta + # PATCH /content_metadata/{content_metadata_id} -> mdls.ContentMeta def update_content_metadata( self, # Id of content metadata content_metadata_id: int, - body: models.WriteContentMeta, + body: mdls.WriteContentMeta, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.ContentMeta: + ) -> mdls.ContentMeta: """Update Content Metadata""" response = cast( - models.ContentMeta, + mdls.ContentMeta, self.patch( path=f"/content_metadata/{content_metadata_id}", - structure=models.ContentMeta, + structure=mdls.ContentMeta, body=body, transport_options=transport_options, ), @@ -1964,7 +1964,7 @@ def update_content_metadata( # ### All content metadata access records for a content metadata item. # - # GET /content_metadata_access -> Sequence[models.ContentMetaGroupUser] + # GET /content_metadata_access -> Sequence[mdls.ContentMetaGroupUser] def all_content_metadata_accesses( self, # Id of content metadata @@ -1972,13 +1972,13 @@ def all_content_metadata_accesses( # Requested fields. fields: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> Sequence[models.ContentMetaGroupUser]: + ) -> Sequence[mdls.ContentMetaGroupUser]: """Get All Content Metadata Accesses""" response = cast( - Sequence[models.ContentMetaGroupUser], + Sequence[mdls.ContentMetaGroupUser], self.get( path="/content_metadata_access", - structure=Sequence[models.ContentMetaGroupUser], + structure=Sequence[mdls.ContentMetaGroupUser], query_params={ "content_metadata_id": content_metadata_id, "fields": fields, @@ -1990,20 +1990,20 @@ def all_content_metadata_accesses( # ### Create content metadata access. # - # POST /content_metadata_access -> models.ContentMetaGroupUser + # POST /content_metadata_access -> mdls.ContentMetaGroupUser def create_content_metadata_access( self, - body: models.ContentMetaGroupUser, + body: mdls.ContentMetaGroupUser, # Optionally sends notification email when granting access to a board. send_boards_notification_email: Optional[bool] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.ContentMetaGroupUser: + ) -> mdls.ContentMetaGroupUser: """Create Content Metadata Access""" response = cast( - models.ContentMetaGroupUser, + mdls.ContentMetaGroupUser, self.post( path="/content_metadata_access", - structure=models.ContentMetaGroupUser, + structure=mdls.ContentMetaGroupUser, query_params={ "send_boards_notification_email": send_boards_notification_email }, @@ -2015,20 +2015,20 @@ def create_content_metadata_access( # ### Update type of access for content metadata. # - # PUT /content_metadata_access/{content_metadata_access_id} -> models.ContentMetaGroupUser + # PUT /content_metadata_access/{content_metadata_access_id} -> mdls.ContentMetaGroupUser def update_content_metadata_access( self, # Id of content metadata access content_metadata_access_id: int, - body: models.ContentMetaGroupUser, + body: mdls.ContentMetaGroupUser, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.ContentMetaGroupUser: + ) -> mdls.ContentMetaGroupUser: """Update Content Metadata Access""" response = cast( - models.ContentMetaGroupUser, + mdls.ContentMetaGroupUser, self.put( path=f"/content_metadata_access/{content_metadata_access_id}", - structure=models.ContentMetaGroupUser, + structure=mdls.ContentMetaGroupUser, body=body, transport_options=transport_options, ), @@ -2101,19 +2101,19 @@ def content_thumbnail( # Performs validation of all looks and dashboards # Returns a list of errors found as well as metadata about the content validation run. # - # GET /content_validation -> models.ContentValidation + # GET /content_validation -> mdls.ContentValidation def content_validation( self, # Requested fields. fields: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.ContentValidation: + ) -> mdls.ContentValidation: """Validate Content""" response = cast( - models.ContentValidation, + mdls.ContentValidation, self.get( path="/content_validation", - structure=models.ContentValidation, + structure=mdls.ContentValidation, query_params={"fields": fields}, transport_options=transport_options, ), @@ -2143,7 +2143,7 @@ def content_validation( # # Boolean search params accept only "true" and "false" as values. # - # GET /content_view/search -> Sequence[models.ContentView] + # GET /content_view/search -> Sequence[mdls.ContentView] def search_content_views( self, # Match view count @@ -2173,13 +2173,13 @@ def search_content_views( # Combine given search criteria in a boolean OR expression filter_or: Optional[bool] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> Sequence[models.ContentView]: + ) -> Sequence[mdls.ContentView]: """Search Content Views""" response = cast( - Sequence[models.ContentView], + Sequence[mdls.ContentView], self.get( path="/content_view/search", - structure=Sequence[models.ContentView], + structure=Sequence[mdls.ContentView], query_params={ "view_count": view_count, "group_id": group_id, @@ -2244,19 +2244,19 @@ def vector_thumbnail( # # Find **deleted dashboards** with [search_dashboards()](#!/Dashboard/search_dashboards) # - # GET /dashboards -> Sequence[models.DashboardBase] + # GET /dashboards -> Sequence[mdls.DashboardBase] def all_dashboards( self, # Requested fields. fields: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> Sequence[models.DashboardBase]: + ) -> Sequence[mdls.DashboardBase]: """Get All Dashboards""" response = cast( - Sequence[models.DashboardBase], + Sequence[mdls.DashboardBase], self.get( path="/dashboards", - structure=Sequence[models.DashboardBase], + structure=Sequence[mdls.DashboardBase], query_params={"fields": fields}, transport_options=transport_options, ), @@ -2278,18 +2278,18 @@ def all_dashboards( # # You can **permanently delete** an existing dashboard with [delete_dashboard()](#!/Dashboard/delete_dashboard) # - # POST /dashboards -> models.Dashboard + # POST /dashboards -> mdls.Dashboard def create_dashboard( self, - body: models.WriteDashboard, + body: mdls.WriteDashboard, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.Dashboard: + ) -> mdls.Dashboard: """Create Dashboard""" response = cast( - models.Dashboard, + mdls.Dashboard, self.post( path="/dashboards", - structure=models.Dashboard, + structure=mdls.Dashboard, body=body, transport_options=transport_options, ), @@ -2326,7 +2326,7 @@ def create_dashboard( # # Get a **single dashboard** by id with [dashboard()](#!/Dashboard/dashboard) # - # GET /dashboards/search -> Sequence[models.Dashboard] + # GET /dashboards/search -> Sequence[mdls.Dashboard] def search_dashboards( self, # Match dashboard id. @@ -2368,13 +2368,13 @@ def search_dashboards( # Combine given search criteria in a boolean OR expression filter_or: Optional[bool] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> Sequence[models.Dashboard]: + ) -> Sequence[mdls.Dashboard]: """Search Dashboards""" response = cast( - Sequence[models.Dashboard], + Sequence[mdls.Dashboard], self.get( path="/dashboards/search", - structure=Sequence[models.Dashboard], + structure=Sequence[mdls.Dashboard], query_params={ "id": id, "slug": slug, @@ -2414,26 +2414,26 @@ def search_dashboards( # **Sync** a linked UDD with [sync_lookml_dashboard()](#!/Dashboard/sync_lookml_dashboard) # **Unlink** a linked UDD by setting lookml_link_id to null with [update_dashboard()](#!/Dashboard/update_dashboard) # - # POST /dashboards/{lookml_dashboard_id}/import/{space_id} -> models.Dashboard + # POST /dashboards/{lookml_dashboard_id}/import/{space_id} -> mdls.Dashboard def import_lookml_dashboard( self, # Id of LookML dashboard lookml_dashboard_id: str, # Id of space to import the dashboard to space_id: str, - body: Optional[models.WriteDashboard] = None, + body: Optional[mdls.WriteDashboard] = None, # If true, and this dashboard is localized, export it with the raw keys, not localized. raw_locale: Optional[bool] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.Dashboard: + ) -> mdls.Dashboard: """Import LookML Dashboard""" lookml_dashboard_id = self.encode_path_param(lookml_dashboard_id) space_id = self.encode_path_param(space_id) response = cast( - models.Dashboard, + mdls.Dashboard, self.post( path=f"/dashboards/{lookml_dashboard_id}/import/{space_id}", - structure=models.Dashboard, + structure=mdls.Dashboard, query_params={"raw_locale": raw_locale}, body=body, transport_options=transport_options, @@ -2456,7 +2456,7 @@ def sync_lookml_dashboard( self, # Id of LookML dashboard, in the form 'model::dashboardname' lookml_dashboard_id: str, - body: models.WriteDashboard, + body: mdls.WriteDashboard, # If true, and this dashboard is localized, export it with the raw keys, not localized. raw_locale: Optional[bool] = None, transport_options: Optional[transport.TransportOptions] = None, @@ -2483,7 +2483,7 @@ def sync_lookml_dashboard( # # You can **Search** for dashboards with [search_dashboards()](#!/Dashboard/search_dashboards) # - # GET /dashboards/{dashboard_id} -> models.Dashboard + # GET /dashboards/{dashboard_id} -> mdls.Dashboard def dashboard( self, # Id of dashboard @@ -2491,14 +2491,14 @@ def dashboard( # Requested fields. fields: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.Dashboard: + ) -> mdls.Dashboard: """Get Dashboard""" dashboard_id = self.encode_path_param(dashboard_id) response = cast( - models.Dashboard, + mdls.Dashboard, self.get( path=f"/dashboards/{dashboard_id}", - structure=models.Dashboard, + structure=mdls.Dashboard, query_params={"fields": fields}, transport_options=transport_options, ), @@ -2516,21 +2516,21 @@ def dashboard( # If you receive a 422 error response when updating a dashboard, be sure to look at the # response body for information about exactly which fields are missing or contain invalid data. # - # PATCH /dashboards/{dashboard_id} -> models.Dashboard + # PATCH /dashboards/{dashboard_id} -> mdls.Dashboard def update_dashboard( self, # Id of dashboard dashboard_id: str, - body: models.WriteDashboard, + body: mdls.WriteDashboard, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.Dashboard: + ) -> mdls.Dashboard: """Update Dashboard""" dashboard_id = self.encode_path_param(dashboard_id) response = cast( - models.Dashboard, + mdls.Dashboard, self.patch( path=f"/dashboards/{dashboard_id}", - structure=models.Dashboard, + structure=mdls.Dashboard, body=body, transport_options=transport_options, ), @@ -2568,20 +2568,20 @@ def delete_dashboard( # # Returns a JSON object that contains the dashboard id and Aggregate Table lookml # - # GET /dashboards/aggregate_table_lookml/{dashboard_id} -> models.DashboardAggregateTableLookml + # GET /dashboards/aggregate_table_lookml/{dashboard_id} -> mdls.DashboardAggregateTableLookml def dashboard_aggregate_table_lookml( self, # Id of dashboard dashboard_id: str, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.DashboardAggregateTableLookml: + ) -> mdls.DashboardAggregateTableLookml: """Get Aggregate Table LookML for a dashboard""" dashboard_id = self.encode_path_param(dashboard_id) response = cast( - models.DashboardAggregateTableLookml, + mdls.DashboardAggregateTableLookml, self.get( path=f"/dashboards/aggregate_table_lookml/{dashboard_id}", - structure=models.DashboardAggregateTableLookml, + structure=mdls.DashboardAggregateTableLookml, transport_options=transport_options, ), ) @@ -2591,20 +2591,20 @@ def dashboard_aggregate_table_lookml( # # Returns a JSON object that contains the dashboard id and the full lookml # - # GET /dashboards/lookml/{dashboard_id} -> models.DashboardLookml + # GET /dashboards/lookml/{dashboard_id} -> mdls.DashboardLookml def dashboard_lookml( self, # Id of dashboard dashboard_id: str, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.DashboardLookml: + ) -> mdls.DashboardLookml: """Get lookml of a UDD""" dashboard_id = self.encode_path_param(dashboard_id) response = cast( - models.DashboardLookml, + mdls.DashboardLookml, self.get( path=f"/dashboards/lookml/{dashboard_id}", - structure=models.DashboardLookml, + structure=mdls.DashboardLookml, transport_options=transport_options, ), ) @@ -2635,7 +2635,7 @@ def dashboard_lookml( # # Boolean search params accept only "true" and "false" as values. # - # GET /dashboard_elements/search -> Sequence[models.DashboardElement] + # GET /dashboard_elements/search -> Sequence[mdls.DashboardElement] def search_dashboard_elements( self, # Select elements that refer to a given dashboard id @@ -2653,13 +2653,13 @@ def search_dashboard_elements( # Fields to sort by. Sortable fields: [:look_id, :dashboard_id, :deleted, :title] sorts: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> Sequence[models.DashboardElement]: + ) -> Sequence[mdls.DashboardElement]: """Search Dashboard Elements""" response = cast( - Sequence[models.DashboardElement], + Sequence[mdls.DashboardElement], self.get( path="/dashboard_elements/search", - structure=Sequence[models.DashboardElement], + structure=Sequence[mdls.DashboardElement], query_params={ "dashboard_id": dashboard_id, "look_id": look_id, @@ -2676,7 +2676,7 @@ def search_dashboard_elements( # ### Get information about the dashboard element with a specific id. # - # GET /dashboard_elements/{dashboard_element_id} -> models.DashboardElement + # GET /dashboard_elements/{dashboard_element_id} -> mdls.DashboardElement def dashboard_element( self, # Id of dashboard element @@ -2684,14 +2684,14 @@ def dashboard_element( # Requested fields. fields: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.DashboardElement: + ) -> mdls.DashboardElement: """Get DashboardElement""" dashboard_element_id = self.encode_path_param(dashboard_element_id) response = cast( - models.DashboardElement, + mdls.DashboardElement, self.get( path=f"/dashboard_elements/{dashboard_element_id}", - structure=models.DashboardElement, + structure=mdls.DashboardElement, query_params={"fields": fields}, transport_options=transport_options, ), @@ -2700,23 +2700,23 @@ def dashboard_element( # ### Update the dashboard element with a specific id. # - # PATCH /dashboard_elements/{dashboard_element_id} -> models.DashboardElement + # PATCH /dashboard_elements/{dashboard_element_id} -> mdls.DashboardElement def update_dashboard_element( self, # Id of dashboard element dashboard_element_id: str, - body: models.WriteDashboardElement, + body: mdls.WriteDashboardElement, # Requested fields. fields: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.DashboardElement: + ) -> mdls.DashboardElement: """Update DashboardElement""" dashboard_element_id = self.encode_path_param(dashboard_element_id) response = cast( - models.DashboardElement, + mdls.DashboardElement, self.patch( path=f"/dashboard_elements/{dashboard_element_id}", - structure=models.DashboardElement, + structure=mdls.DashboardElement, query_params={"fields": fields}, body=body, transport_options=transport_options, @@ -2747,7 +2747,7 @@ def delete_dashboard_element( # ### Get information about all the dashboard elements on a dashboard with a specific id. # - # GET /dashboards/{dashboard_id}/dashboard_elements -> Sequence[models.DashboardElement] + # GET /dashboards/{dashboard_id}/dashboard_elements -> Sequence[mdls.DashboardElement] def dashboard_dashboard_elements( self, # Id of dashboard @@ -2755,14 +2755,14 @@ def dashboard_dashboard_elements( # Requested fields. fields: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> Sequence[models.DashboardElement]: + ) -> Sequence[mdls.DashboardElement]: """Get All DashboardElements""" dashboard_id = self.encode_path_param(dashboard_id) response = cast( - Sequence[models.DashboardElement], + Sequence[mdls.DashboardElement], self.get( path=f"/dashboards/{dashboard_id}/dashboard_elements", - structure=Sequence[models.DashboardElement], + structure=Sequence[mdls.DashboardElement], query_params={"fields": fields}, transport_options=transport_options, ), @@ -2771,20 +2771,20 @@ def dashboard_dashboard_elements( # ### Create a dashboard element on the dashboard with a specific id. # - # POST /dashboard_elements -> models.DashboardElement + # POST /dashboard_elements -> mdls.DashboardElement def create_dashboard_element( self, - body: models.WriteDashboardElement, + body: mdls.WriteDashboardElement, # Requested fields. fields: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.DashboardElement: + ) -> mdls.DashboardElement: """Create DashboardElement""" response = cast( - models.DashboardElement, + mdls.DashboardElement, self.post( path="/dashboard_elements", - structure=models.DashboardElement, + structure=mdls.DashboardElement, query_params={"fields": fields}, body=body, transport_options=transport_options, @@ -2794,7 +2794,7 @@ def create_dashboard_element( # ### Get information about the dashboard filters with a specific id. # - # GET /dashboard_filters/{dashboard_filter_id} -> models.DashboardFilter + # GET /dashboard_filters/{dashboard_filter_id} -> mdls.DashboardFilter def dashboard_filter( self, # Id of dashboard filters @@ -2802,14 +2802,14 @@ def dashboard_filter( # Requested fields. fields: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.DashboardFilter: + ) -> mdls.DashboardFilter: """Get Dashboard Filter""" dashboard_filter_id = self.encode_path_param(dashboard_filter_id) response = cast( - models.DashboardFilter, + mdls.DashboardFilter, self.get( path=f"/dashboard_filters/{dashboard_filter_id}", - structure=models.DashboardFilter, + structure=mdls.DashboardFilter, query_params={"fields": fields}, transport_options=transport_options, ), @@ -2818,23 +2818,23 @@ def dashboard_filter( # ### Update the dashboard filter with a specific id. # - # PATCH /dashboard_filters/{dashboard_filter_id} -> models.DashboardFilter + # PATCH /dashboard_filters/{dashboard_filter_id} -> mdls.DashboardFilter def update_dashboard_filter( self, # Id of dashboard filter dashboard_filter_id: str, - body: models.WriteDashboardFilter, + body: mdls.WriteDashboardFilter, # Requested fields. fields: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.DashboardFilter: + ) -> mdls.DashboardFilter: """Update Dashboard Filter""" dashboard_filter_id = self.encode_path_param(dashboard_filter_id) response = cast( - models.DashboardFilter, + mdls.DashboardFilter, self.patch( path=f"/dashboard_filters/{dashboard_filter_id}", - structure=models.DashboardFilter, + structure=mdls.DashboardFilter, query_params={"fields": fields}, body=body, transport_options=transport_options, @@ -2865,7 +2865,7 @@ def delete_dashboard_filter( # ### Get information about all the dashboard filters on a dashboard with a specific id. # - # GET /dashboards/{dashboard_id}/dashboard_filters -> Sequence[models.DashboardFilter] + # GET /dashboards/{dashboard_id}/dashboard_filters -> Sequence[mdls.DashboardFilter] def dashboard_dashboard_filters( self, # Id of dashboard @@ -2873,14 +2873,14 @@ def dashboard_dashboard_filters( # Requested fields. fields: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> Sequence[models.DashboardFilter]: + ) -> Sequence[mdls.DashboardFilter]: """Get All Dashboard Filters""" dashboard_id = self.encode_path_param(dashboard_id) response = cast( - Sequence[models.DashboardFilter], + Sequence[mdls.DashboardFilter], self.get( path=f"/dashboards/{dashboard_id}/dashboard_filters", - structure=Sequence[models.DashboardFilter], + structure=Sequence[mdls.DashboardFilter], query_params={"fields": fields}, transport_options=transport_options, ), @@ -2889,20 +2889,20 @@ def dashboard_dashboard_filters( # ### Create a dashboard filter on the dashboard with a specific id. # - # POST /dashboard_filters -> models.DashboardFilter + # POST /dashboard_filters -> mdls.DashboardFilter def create_dashboard_filter( self, - body: models.WriteCreateDashboardFilter, + body: mdls.WriteCreateDashboardFilter, # Requested fields fields: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.DashboardFilter: + ) -> mdls.DashboardFilter: """Create Dashboard Filter""" response = cast( - models.DashboardFilter, + mdls.DashboardFilter, self.post( path="/dashboard_filters", - structure=models.DashboardFilter, + structure=mdls.DashboardFilter, query_params={"fields": fields}, body=body, transport_options=transport_options, @@ -2912,7 +2912,7 @@ def create_dashboard_filter( # ### Get information about the dashboard elements with a specific id. # - # GET /dashboard_layout_components/{dashboard_layout_component_id} -> models.DashboardLayoutComponent + # GET /dashboard_layout_components/{dashboard_layout_component_id} -> mdls.DashboardLayoutComponent def dashboard_layout_component( self, # Id of dashboard layout component @@ -2920,16 +2920,16 @@ def dashboard_layout_component( # Requested fields. fields: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.DashboardLayoutComponent: + ) -> mdls.DashboardLayoutComponent: """Get DashboardLayoutComponent""" dashboard_layout_component_id = self.encode_path_param( dashboard_layout_component_id ) response = cast( - models.DashboardLayoutComponent, + mdls.DashboardLayoutComponent, self.get( path=f"/dashboard_layout_components/{dashboard_layout_component_id}", - structure=models.DashboardLayoutComponent, + structure=mdls.DashboardLayoutComponent, query_params={"fields": fields}, transport_options=transport_options, ), @@ -2938,25 +2938,25 @@ def dashboard_layout_component( # ### Update the dashboard element with a specific id. # - # PATCH /dashboard_layout_components/{dashboard_layout_component_id} -> models.DashboardLayoutComponent + # PATCH /dashboard_layout_components/{dashboard_layout_component_id} -> mdls.DashboardLayoutComponent def update_dashboard_layout_component( self, # Id of dashboard layout component dashboard_layout_component_id: str, - body: models.WriteDashboardLayoutComponent, + body: mdls.WriteDashboardLayoutComponent, # Requested fields. fields: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.DashboardLayoutComponent: + ) -> mdls.DashboardLayoutComponent: """Update DashboardLayoutComponent""" dashboard_layout_component_id = self.encode_path_param( dashboard_layout_component_id ) response = cast( - models.DashboardLayoutComponent, + mdls.DashboardLayoutComponent, self.patch( path=f"/dashboard_layout_components/{dashboard_layout_component_id}", - structure=models.DashboardLayoutComponent, + structure=mdls.DashboardLayoutComponent, query_params={"fields": fields}, body=body, transport_options=transport_options, @@ -2966,7 +2966,7 @@ def update_dashboard_layout_component( # ### Get information about all the dashboard layout components for a dashboard layout with a specific id. # - # GET /dashboard_layouts/{dashboard_layout_id}/dashboard_layout_components -> Sequence[models.DashboardLayoutComponent] + # GET /dashboard_layouts/{dashboard_layout_id}/dashboard_layout_components -> Sequence[mdls.DashboardLayoutComponent] def dashboard_layout_dashboard_layout_components( self, # Id of dashboard layout component @@ -2974,14 +2974,14 @@ def dashboard_layout_dashboard_layout_components( # Requested fields. fields: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> Sequence[models.DashboardLayoutComponent]: + ) -> Sequence[mdls.DashboardLayoutComponent]: """Get All DashboardLayoutComponents""" dashboard_layout_id = self.encode_path_param(dashboard_layout_id) response = cast( - Sequence[models.DashboardLayoutComponent], + Sequence[mdls.DashboardLayoutComponent], self.get( path=f"/dashboard_layouts/{dashboard_layout_id}/dashboard_layout_components", - structure=Sequence[models.DashboardLayoutComponent], + structure=Sequence[mdls.DashboardLayoutComponent], query_params={"fields": fields}, transport_options=transport_options, ), @@ -2990,7 +2990,7 @@ def dashboard_layout_dashboard_layout_components( # ### Get information about the dashboard layouts with a specific id. # - # GET /dashboard_layouts/{dashboard_layout_id} -> models.DashboardLayout + # GET /dashboard_layouts/{dashboard_layout_id} -> mdls.DashboardLayout def dashboard_layout( self, # Id of dashboard layouts @@ -2998,14 +2998,14 @@ def dashboard_layout( # Requested fields. fields: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.DashboardLayout: + ) -> mdls.DashboardLayout: """Get DashboardLayout""" dashboard_layout_id = self.encode_path_param(dashboard_layout_id) response = cast( - models.DashboardLayout, + mdls.DashboardLayout, self.get( path=f"/dashboard_layouts/{dashboard_layout_id}", - structure=models.DashboardLayout, + structure=mdls.DashboardLayout, query_params={"fields": fields}, transport_options=transport_options, ), @@ -3014,23 +3014,23 @@ def dashboard_layout( # ### Update the dashboard layout with a specific id. # - # PATCH /dashboard_layouts/{dashboard_layout_id} -> models.DashboardLayout + # PATCH /dashboard_layouts/{dashboard_layout_id} -> mdls.DashboardLayout def update_dashboard_layout( self, # Id of dashboard layout dashboard_layout_id: str, - body: models.WriteDashboardLayout, + body: mdls.WriteDashboardLayout, # Requested fields. fields: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.DashboardLayout: + ) -> mdls.DashboardLayout: """Update DashboardLayout""" dashboard_layout_id = self.encode_path_param(dashboard_layout_id) response = cast( - models.DashboardLayout, + mdls.DashboardLayout, self.patch( path=f"/dashboard_layouts/{dashboard_layout_id}", - structure=models.DashboardLayout, + structure=mdls.DashboardLayout, query_params={"fields": fields}, body=body, transport_options=transport_options, @@ -3061,7 +3061,7 @@ def delete_dashboard_layout( # ### Get information about all the dashboard elements on a dashboard with a specific id. # - # GET /dashboards/{dashboard_id}/dashboard_layouts -> Sequence[models.DashboardLayout] + # GET /dashboards/{dashboard_id}/dashboard_layouts -> Sequence[mdls.DashboardLayout] def dashboard_dashboard_layouts( self, # Id of dashboard @@ -3069,14 +3069,14 @@ def dashboard_dashboard_layouts( # Requested fields. fields: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> Sequence[models.DashboardLayout]: + ) -> Sequence[mdls.DashboardLayout]: """Get All DashboardLayouts""" dashboard_id = self.encode_path_param(dashboard_id) response = cast( - Sequence[models.DashboardLayout], + Sequence[mdls.DashboardLayout], self.get( path=f"/dashboards/{dashboard_id}/dashboard_layouts", - structure=Sequence[models.DashboardLayout], + structure=Sequence[mdls.DashboardLayout], query_params={"fields": fields}, transport_options=transport_options, ), @@ -3085,20 +3085,20 @@ def dashboard_dashboard_layouts( # ### Create a dashboard layout on the dashboard with a specific id. # - # POST /dashboard_layouts -> models.DashboardLayout + # POST /dashboard_layouts -> mdls.DashboardLayout def create_dashboard_layout( self, - body: models.WriteDashboardLayout, + body: mdls.WriteDashboardLayout, # Requested fields. fields: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.DashboardLayout: + ) -> mdls.DashboardLayout: """Create DashboardLayout""" response = cast( - models.DashboardLayout, + mdls.DashboardLayout, self.post( path="/dashboard_layouts", - structure=models.DashboardLayout, + structure=mdls.DashboardLayout, query_params={"fields": fields}, body=body, transport_options=transport_options, @@ -3112,18 +3112,18 @@ def create_dashboard_layout( # Perform a data action. The data action object can be obtained from query results, and used to perform an arbitrary action. # - # POST /data_actions -> models.DataActionResponse + # POST /data_actions -> mdls.DataActionResponse def perform_data_action( self, - body: models.DataActionRequest, + body: mdls.DataActionRequest, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.DataActionResponse: + ) -> mdls.DataActionResponse: """Send a Data Action""" response = cast( - models.DataActionResponse, + mdls.DataActionResponse, self.post( path="/data_actions", - structure=models.DataActionResponse, + structure=mdls.DataActionResponse, body=body, transport_options=transport_options, ), @@ -3132,18 +3132,18 @@ def perform_data_action( # For some data actions, the remote server may supply a form requesting further user input. This endpoint takes a data action, asks the remote server to generate a form for it, and returns that form to you for presentation to the user. # - # POST /data_actions/form -> models.DataActionForm + # POST /data_actions/form -> mdls.DataActionForm def fetch_remote_data_action_form( self, body: MutableMapping[str, Any], transport_options: Optional[transport.TransportOptions] = None, - ) -> models.DataActionForm: + ) -> mdls.DataActionForm: """Fetch Remote Data Action Form""" response = cast( - models.DataActionForm, + mdls.DataActionForm, self.post( path="/data_actions/form", - structure=models.DataActionForm, + structure=mdls.DataActionForm, body=body, transport_options=transport_options, ), @@ -3156,17 +3156,17 @@ def fetch_remote_data_action_form( # ### Get information about all datagroups. # - # GET /datagroups -> Sequence[models.Datagroup] + # GET /datagroups -> Sequence[mdls.Datagroup] def all_datagroups( self, transport_options: Optional[transport.TransportOptions] = None, - ) -> Sequence[models.Datagroup]: + ) -> Sequence[mdls.Datagroup]: """Get All Datagroups""" response = cast( - Sequence[models.Datagroup], + Sequence[mdls.Datagroup], self.get( path="/datagroups", - structure=Sequence[models.Datagroup], + structure=Sequence[mdls.Datagroup], transport_options=transport_options, ), ) @@ -3174,20 +3174,20 @@ def all_datagroups( # ### Get information about a datagroup. # - # GET /datagroups/{datagroup_id} -> models.Datagroup + # GET /datagroups/{datagroup_id} -> mdls.Datagroup def datagroup( self, # ID of datagroup. datagroup_id: str, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.Datagroup: + ) -> mdls.Datagroup: """Get Datagroup""" datagroup_id = self.encode_path_param(datagroup_id) response = cast( - models.Datagroup, + mdls.Datagroup, self.get( path=f"/datagroups/{datagroup_id}", - structure=models.Datagroup, + structure=mdls.Datagroup, transport_options=transport_options, ), ) @@ -3195,21 +3195,21 @@ def datagroup( # ### Update a datagroup using the specified params. # - # PATCH /datagroups/{datagroup_id} -> models.Datagroup + # PATCH /datagroups/{datagroup_id} -> mdls.Datagroup def update_datagroup( self, # ID of datagroup. datagroup_id: str, - body: models.WriteDatagroup, + body: mdls.WriteDatagroup, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.Datagroup: + ) -> mdls.Datagroup: """Update Datagroup""" datagroup_id = self.encode_path_param(datagroup_id) response = cast( - models.Datagroup, + mdls.Datagroup, self.patch( path=f"/datagroups/{datagroup_id}", - structure=models.Datagroup, + structure=mdls.Datagroup, body=body, transport_options=transport_options, ), @@ -3218,11 +3218,67 @@ def update_datagroup( # endregion + # region DerivedTable: View Derived Table graphs + + # ### Discover information about derived tables + # + # GET /derived_table/graph/model/{model} -> mdls.DependencyGraph + def graph_derived_tables_for_model( + self, + # The name of the Lookml model. + model: str, + # The format of the graph. Valid values are [dot]. Default is `dot` + format: Optional[str] = None, + # Color denoting the build status of the graph. Grey = not built, green = built, yellow = building, red = error. + color: Optional[str] = None, + transport_options: Optional[transport.TransportOptions] = None, + ) -> mdls.DependencyGraph: + """Get Derived Table graph for model""" + model = self.encode_path_param(model) + response = cast( + mdls.DependencyGraph, + self.get( + path=f"/derived_table/graph/model/{model}", + structure=mdls.DependencyGraph, + query_params={"format": format, "color": color}, + transport_options=transport_options, + ), + ) + return response + + # ### Get the subgraph representing this derived table and its dependencies. + # + # GET /derived_table/graph/view/{view} -> mdls.DependencyGraph + def graph_derived_tables_for_view( + self, + # The derived table's view name. + view: str, + # The models where this derived table is defined. + models: Optional[str] = None, + # The model directory to look in, either `dev` or `production`. + workspace: Optional[str] = None, + transport_options: Optional[transport.TransportOptions] = None, + ) -> mdls.DependencyGraph: + """Get subgraph of derived table and dependencies""" + view = self.encode_path_param(view) + response = cast( + mdls.DependencyGraph, + self.get( + path=f"/derived_table/graph/view/{view}", + structure=mdls.DependencyGraph, + query_params={"models": models, "workspace": workspace}, + transport_options=transport_options, + ), + ) + return response + + # endregion + # region Folder: Manage Folders # Search for folders by creator id, parent id, name, etc # - # GET /folders/search -> Sequence[models.Folder] + # GET /folders/search -> Sequence[mdls.Folder] def search_folders( self, # Requested fields. @@ -3250,13 +3306,13 @@ def search_folders( # Match is shared root is_shared_root: Optional[bool] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> Sequence[models.Folder]: + ) -> Sequence[mdls.Folder]: """Search Folders""" response = cast( - Sequence[models.Folder], + Sequence[mdls.Folder], self.get( path="/folders/search", - structure=Sequence[models.Folder], + structure=Sequence[mdls.Folder], query_params={ "fields": fields, "page": page, @@ -3278,7 +3334,7 @@ def search_folders( # ### Get information about the folder with a specific id. # - # GET /folders/{folder_id} -> models.Folder + # GET /folders/{folder_id} -> mdls.Folder def folder( self, # Id of folder @@ -3286,14 +3342,14 @@ def folder( # Requested fields. fields: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.Folder: + ) -> mdls.Folder: """Get Folder""" folder_id = self.encode_path_param(folder_id) response = cast( - models.Folder, + mdls.Folder, self.get( path=f"/folders/{folder_id}", - structure=models.Folder, + structure=mdls.Folder, query_params={"fields": fields}, transport_options=transport_options, ), @@ -3302,21 +3358,21 @@ def folder( # ### Update the folder with a specific id. # - # PATCH /folders/{folder_id} -> models.Folder + # PATCH /folders/{folder_id} -> mdls.Folder def update_folder( self, # Id of folder folder_id: str, - body: models.UpdateFolder, + body: mdls.UpdateFolder, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.Folder: + ) -> mdls.Folder: """Update Folder""" folder_id = self.encode_path_param(folder_id) response = cast( - models.Folder, + mdls.Folder, self.patch( path=f"/folders/{folder_id}", - structure=models.Folder, + structure=mdls.Folder, body=body, transport_options=transport_options, ), @@ -3350,19 +3406,19 @@ def delete_folder( # In API 3.x, this will not return empty personal folders, unless they belong to the calling user. # In API 4.0+, all personal folders will be returned. # - # GET /folders -> Sequence[models.Folder] + # GET /folders -> Sequence[mdls.Folder] def all_folders( self, # Requested fields. fields: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> Sequence[models.Folder]: + ) -> Sequence[mdls.Folder]: """Get All Folders""" response = cast( - Sequence[models.Folder], + Sequence[mdls.Folder], self.get( path="/folders", - structure=Sequence[models.Folder], + structure=Sequence[mdls.Folder], query_params={"fields": fields}, transport_options=transport_options, ), @@ -3374,18 +3430,18 @@ def all_folders( # Caller must have permission to edit the parent folder and to create folders, otherwise the request # returns 404 Not Found. # - # POST /folders -> models.Folder + # POST /folders -> mdls.Folder def create_folder( self, - body: models.CreateFolder, + body: mdls.CreateFolder, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.Folder: + ) -> mdls.Folder: """Create Folder""" response = cast( - models.Folder, + mdls.Folder, self.post( path="/folders", - structure=models.Folder, + structure=mdls.Folder, body=body, transport_options=transport_options, ), @@ -3394,7 +3450,7 @@ def create_folder( # ### Get the children of a folder. # - # GET /folders/{folder_id}/children -> Sequence[models.Folder] + # GET /folders/{folder_id}/children -> Sequence[mdls.Folder] def folder_children( self, # Id of folder @@ -3408,14 +3464,14 @@ def folder_children( # Fields to sort by. sorts: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> Sequence[models.Folder]: + ) -> Sequence[mdls.Folder]: """Get Folder Children""" folder_id = self.encode_path_param(folder_id) response = cast( - Sequence[models.Folder], + Sequence[mdls.Folder], self.get( path=f"/folders/{folder_id}/children", - structure=Sequence[models.Folder], + structure=Sequence[mdls.Folder], query_params={ "fields": fields, "page": page, @@ -3429,7 +3485,7 @@ def folder_children( # ### Search the children of a folder # - # GET /folders/{folder_id}/children/search -> Sequence[models.Folder] + # GET /folders/{folder_id}/children/search -> Sequence[mdls.Folder] def folder_children_search( self, # Id of folder @@ -3441,14 +3497,14 @@ def folder_children_search( # Match folder name. name: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> Sequence[models.Folder]: + ) -> Sequence[mdls.Folder]: """Search Folder Children""" folder_id = self.encode_path_param(folder_id) response = cast( - Sequence[models.Folder], + Sequence[mdls.Folder], self.get( path=f"/folders/{folder_id}/children/search", - structure=Sequence[models.Folder], + structure=Sequence[mdls.Folder], query_params={"fields": fields, "sorts": sorts, "name": name}, transport_options=transport_options, ), @@ -3457,7 +3513,7 @@ def folder_children_search( # ### Get the parent of a folder # - # GET /folders/{folder_id}/parent -> models.Folder + # GET /folders/{folder_id}/parent -> mdls.Folder def folder_parent( self, # Id of folder @@ -3465,14 +3521,14 @@ def folder_parent( # Requested fields. fields: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.Folder: + ) -> mdls.Folder: """Get Folder Parent""" folder_id = self.encode_path_param(folder_id) response = cast( - models.Folder, + mdls.Folder, self.get( path=f"/folders/{folder_id}/parent", - structure=models.Folder, + structure=mdls.Folder, query_params={"fields": fields}, transport_options=transport_options, ), @@ -3481,7 +3537,7 @@ def folder_parent( # ### Get the ancestors of a folder # - # GET /folders/{folder_id}/ancestors -> Sequence[models.Folder] + # GET /folders/{folder_id}/ancestors -> Sequence[mdls.Folder] def folder_ancestors( self, # Id of folder @@ -3489,14 +3545,14 @@ def folder_ancestors( # Requested fields. fields: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> Sequence[models.Folder]: + ) -> Sequence[mdls.Folder]: """Get Folder Ancestors""" folder_id = self.encode_path_param(folder_id) response = cast( - Sequence[models.Folder], + Sequence[mdls.Folder], self.get( path=f"/folders/{folder_id}/ancestors", - structure=Sequence[models.Folder], + structure=Sequence[mdls.Folder], query_params={"fields": fields}, transport_options=transport_options, ), @@ -3507,7 +3563,7 @@ def folder_ancestors( # In API 3.x, this will return all looks in a folder, including looks in the trash. # In API 4.0+, all looks in a folder will be returned, excluding looks in the trash. # - # GET /folders/{folder_id}/looks -> Sequence[models.LookWithQuery] + # GET /folders/{folder_id}/looks -> Sequence[mdls.LookWithQuery] def folder_looks( self, # Id of folder @@ -3515,14 +3571,14 @@ def folder_looks( # Requested fields. fields: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> Sequence[models.LookWithQuery]: + ) -> Sequence[mdls.LookWithQuery]: """Get Folder Looks""" folder_id = self.encode_path_param(folder_id) response = cast( - Sequence[models.LookWithQuery], + Sequence[mdls.LookWithQuery], self.get( path=f"/folders/{folder_id}/looks", - structure=Sequence[models.LookWithQuery], + structure=Sequence[mdls.LookWithQuery], query_params={"fields": fields}, transport_options=transport_options, ), @@ -3531,7 +3587,7 @@ def folder_looks( # ### Get the dashboards in a folder # - # GET /folders/{folder_id}/dashboards -> Sequence[models.Dashboard] + # GET /folders/{folder_id}/dashboards -> Sequence[mdls.Dashboard] def folder_dashboards( self, # Id of folder @@ -3539,14 +3595,14 @@ def folder_dashboards( # Requested fields. fields: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> Sequence[models.Dashboard]: + ) -> Sequence[mdls.Dashboard]: """Get Folder Dashboards""" folder_id = self.encode_path_param(folder_id) response = cast( - Sequence[models.Dashboard], + Sequence[mdls.Dashboard], self.get( path=f"/folders/{folder_id}/dashboards", - structure=Sequence[models.Dashboard], + structure=Sequence[mdls.Dashboard], query_params={"fields": fields}, transport_options=transport_options, ), @@ -3559,7 +3615,7 @@ def folder_dashboards( # ### Get information about all groups. # - # GET /groups -> Sequence[models.Group] + # GET /groups -> Sequence[mdls.Group] def all_groups( self, # Requested fields. @@ -3571,19 +3627,19 @@ def all_groups( # Fields to sort by. sorts: Optional[str] = None, # Optional of ids to get specific groups. - ids: Optional[models.DelimSequence[int]] = None, + ids: Optional[mdls.DelimSequence[int]] = None, # Id of content metadata to which groups must have access. content_metadata_id: Optional[int] = None, # Select only groups that either can/cannot be given access to content. can_add_to_content_metadata: Optional[bool] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> Sequence[models.Group]: + ) -> Sequence[mdls.Group]: """Get All Groups""" response = cast( - Sequence[models.Group], + Sequence[mdls.Group], self.get( path="/groups", - structure=Sequence[models.Group], + structure=Sequence[mdls.Group], query_params={ "fields": fields, "page": page, @@ -3600,20 +3656,20 @@ def all_groups( # ### Creates a new group (admin only). # - # POST /groups -> models.Group + # POST /groups -> mdls.Group def create_group( self, - body: models.WriteGroup, + body: mdls.WriteGroup, # Requested fields. fields: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.Group: + ) -> mdls.Group: """Create Group""" response = cast( - models.Group, + mdls.Group, self.post( path="/groups", - structure=models.Group, + structure=mdls.Group, query_params={"fields": fields}, body=body, transport_options=transport_options, @@ -3646,7 +3702,7 @@ def create_group( # # Boolean search params accept only "true" and "false" as values. # - # GET /groups/search -> Sequence[models.Group] + # GET /groups/search -> Sequence[mdls.Group] def search_groups( self, # Requested fields. @@ -3670,13 +3726,13 @@ def search_groups( # Match group externally_orphaned. externally_orphaned: Optional[bool] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> Sequence[models.Group]: + ) -> Sequence[mdls.Group]: """Search Groups""" response = cast( - Sequence[models.Group], + Sequence[mdls.Group], self.get( path="/groups/search", - structure=Sequence[models.Group], + structure=Sequence[mdls.Group], query_params={ "fields": fields, "limit": limit, @@ -3696,7 +3752,7 @@ def search_groups( # ### Get information about a group. # - # GET /groups/{group_id} -> models.Group + # GET /groups/{group_id} -> mdls.Group def group( self, # Id of group @@ -3704,13 +3760,13 @@ def group( # Requested fields. fields: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.Group: + ) -> mdls.Group: """Get Group""" response = cast( - models.Group, + mdls.Group, self.get( path=f"/groups/{group_id}", - structure=models.Group, + structure=mdls.Group, query_params={"fields": fields}, transport_options=transport_options, ), @@ -3719,22 +3775,22 @@ def group( # ### Updates the a group (admin only). # - # PATCH /groups/{group_id} -> models.Group + # PATCH /groups/{group_id} -> mdls.Group def update_group( self, # Id of group group_id: int, - body: models.WriteGroup, + body: mdls.WriteGroup, # Requested fields. fields: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.Group: + ) -> mdls.Group: """Update Group""" response = cast( - models.Group, + mdls.Group, self.patch( path=f"/groups/{group_id}", - structure=models.Group, + structure=mdls.Group, query_params={"fields": fields}, body=body, transport_options=transport_options, @@ -3764,7 +3820,7 @@ def delete_group( # ### Get information about all the groups in a group # - # GET /groups/{group_id}/groups -> Sequence[models.Group] + # GET /groups/{group_id}/groups -> Sequence[mdls.Group] def all_group_groups( self, # Id of group @@ -3772,13 +3828,13 @@ def all_group_groups( # Requested fields. fields: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> Sequence[models.Group]: + ) -> Sequence[mdls.Group]: """Get All Groups in Group""" response = cast( - Sequence[models.Group], + Sequence[mdls.Group], self.get( path=f"/groups/{group_id}/groups", - structure=Sequence[models.Group], + structure=Sequence[mdls.Group], query_params={"fields": fields}, transport_options=transport_options, ), @@ -3787,20 +3843,20 @@ def all_group_groups( # ### Adds a new group to a group. # - # POST /groups/{group_id}/groups -> models.Group + # POST /groups/{group_id}/groups -> mdls.Group def add_group_group( self, # Id of group group_id: int, - body: models.GroupIdForGroupInclusion, + body: mdls.GroupIdForGroupInclusion, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.Group: + ) -> mdls.Group: """Add a Group to Group""" response = cast( - models.Group, + mdls.Group, self.post( path=f"/groups/{group_id}/groups", - structure=models.Group, + structure=mdls.Group, body=body, transport_options=transport_options, ), @@ -3809,7 +3865,7 @@ def add_group_group( # ### Get information about all the users directly included in a group. # - # GET /groups/{group_id}/users -> Sequence[models.User] + # GET /groups/{group_id}/users -> Sequence[mdls.User] def all_group_users( self, # Id of group @@ -3823,13 +3879,13 @@ def all_group_users( # Fields to sort by. sorts: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> Sequence[models.User]: + ) -> Sequence[mdls.User]: """Get All Users in Group""" response = cast( - Sequence[models.User], + Sequence[mdls.User], self.get( path=f"/groups/{group_id}/users", - structure=Sequence[models.User], + structure=Sequence[mdls.User], query_params={ "fields": fields, "page": page, @@ -3843,20 +3899,20 @@ def all_group_users( # ### Adds a new user to a group. # - # POST /groups/{group_id}/users -> models.User + # POST /groups/{group_id}/users -> mdls.User def add_group_user( self, # Id of group group_id: int, - body: models.GroupIdForGroupUserInclusion, + body: mdls.GroupIdForGroupUserInclusion, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.User: + ) -> mdls.User: """Add a User to Group""" response = cast( - models.User, + mdls.User, self.post( path=f"/groups/{group_id}/users", - structure=models.User, + structure=mdls.User, body=body, transport_options=transport_options, ), @@ -3911,22 +3967,22 @@ def delete_group_from_group( # # For information about how user attribute values are calculated, see [Set User Attribute Group Values](#!/UserAttribute/set_user_attribute_group_values). # - # PATCH /groups/{group_id}/attribute_values/{user_attribute_id} -> models.UserAttributeGroupValue + # PATCH /groups/{group_id}/attribute_values/{user_attribute_id} -> mdls.UserAttributeGroupValue def update_user_attribute_group_value( self, # Id of group group_id: int, # Id of user attribute user_attribute_id: int, - body: models.UserAttributeGroupValue, + body: mdls.UserAttributeGroupValue, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.UserAttributeGroupValue: + ) -> mdls.UserAttributeGroupValue: """Set User Attribute Group Value""" response = cast( - models.UserAttributeGroupValue, + mdls.UserAttributeGroupValue, self.patch( path=f"/groups/{group_id}/attribute_values/{user_attribute_id}", - structure=models.UserAttributeGroupValue, + structure=mdls.UserAttributeGroupValue, body=body, transport_options=transport_options, ), @@ -3961,19 +4017,19 @@ def delete_user_attribute_group_value( # ### Get information about all homepages. # - # GET /homepages -> Sequence[models.Homepage] + # GET /homepages -> Sequence[mdls.Homepage] def all_homepages( self, # Requested fields. fields: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> Sequence[models.Homepage]: + ) -> Sequence[mdls.Homepage]: """Get All Homepages""" response = cast( - Sequence[models.Homepage], + Sequence[mdls.Homepage], self.get( path="/homepages", - structure=Sequence[models.Homepage], + structure=Sequence[mdls.Homepage], query_params={"fields": fields}, transport_options=transport_options, ), @@ -3982,20 +4038,20 @@ def all_homepages( # ### Create a new homepage. # - # POST /homepages -> models.Homepage + # POST /homepages -> mdls.Homepage def create_homepage( self, - body: models.WriteHomepage, + body: mdls.WriteHomepage, # Requested fields. fields: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.Homepage: + ) -> mdls.Homepage: """Create Homepage""" response = cast( - models.Homepage, + mdls.Homepage, self.post( path="/homepages", - structure=models.Homepage, + structure=mdls.Homepage, query_params={"fields": fields}, body=body, transport_options=transport_options, @@ -4026,7 +4082,7 @@ def create_homepage( # # Boolean search params accept only "true" and "false" as values. # - # GET /homepages/search -> Sequence[models.Homepage] + # GET /homepages/search -> Sequence[mdls.Homepage] def search_homepages( self, # Matches homepage title. @@ -4056,13 +4112,13 @@ def search_homepages( # Combine given search criteria in a boolean OR expression filter_or: Optional[bool] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> Sequence[models.Homepage]: + ) -> Sequence[mdls.Homepage]: """Search Homepages""" response = cast( - Sequence[models.Homepage], + Sequence[mdls.Homepage], self.get( path="/homepages/search", - structure=Sequence[models.Homepage], + structure=Sequence[mdls.Homepage], query_params={ "title": title, "created_at": created_at, @@ -4085,7 +4141,7 @@ def search_homepages( # ### Get information about a homepage. # - # GET /homepages/{homepage_id} -> models.Homepage + # GET /homepages/{homepage_id} -> mdls.Homepage def homepage( self, # Id of homepage @@ -4093,13 +4149,13 @@ def homepage( # Requested fields. fields: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.Homepage: + ) -> mdls.Homepage: """Get Homepage""" response = cast( - models.Homepage, + mdls.Homepage, self.get( path=f"/homepages/{homepage_id}", - structure=models.Homepage, + structure=mdls.Homepage, query_params={"fields": fields}, transport_options=transport_options, ), @@ -4108,22 +4164,22 @@ def homepage( # ### Update a homepage definition. # - # PATCH /homepages/{homepage_id} -> models.Homepage + # PATCH /homepages/{homepage_id} -> mdls.Homepage def update_homepage( self, # Id of homepage homepage_id: int, - body: models.WriteHomepage, + body: mdls.WriteHomepage, # Requested fields. fields: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.Homepage: + ) -> mdls.Homepage: """Update Homepage""" response = cast( - models.Homepage, + mdls.Homepage, self.patch( path=f"/homepages/{homepage_id}", - structure=models.Homepage, + structure=mdls.Homepage, query_params={"fields": fields}, body=body, transport_options=transport_options, @@ -4153,7 +4209,7 @@ def delete_homepage( # ### Get information about all homepage items. # - # GET /homepage_items -> Sequence[models.HomepageItem] + # GET /homepage_items -> Sequence[mdls.HomepageItem] def all_homepage_items( self, # Requested fields. @@ -4163,13 +4219,13 @@ def all_homepage_items( # Filter to a specific homepage section homepage_section_id: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> Sequence[models.HomepageItem]: + ) -> Sequence[mdls.HomepageItem]: """Get All Homepage Items""" response = cast( - Sequence[models.HomepageItem], + Sequence[mdls.HomepageItem], self.get( path="/homepage_items", - structure=Sequence[models.HomepageItem], + structure=Sequence[mdls.HomepageItem], query_params={ "fields": fields, "sorts": sorts, @@ -4182,20 +4238,20 @@ def all_homepage_items( # ### Create a new homepage item. # - # POST /homepage_items -> models.HomepageItem + # POST /homepage_items -> mdls.HomepageItem def create_homepage_item( self, - body: models.WriteHomepageItem, + body: mdls.WriteHomepageItem, # Requested fields. fields: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.HomepageItem: + ) -> mdls.HomepageItem: """Create Homepage Item""" response = cast( - models.HomepageItem, + mdls.HomepageItem, self.post( path="/homepage_items", - structure=models.HomepageItem, + structure=mdls.HomepageItem, query_params={"fields": fields}, body=body, transport_options=transport_options, @@ -4205,7 +4261,7 @@ def create_homepage_item( # ### Get information about a homepage item. # - # GET /homepage_items/{homepage_item_id} -> models.HomepageItem + # GET /homepage_items/{homepage_item_id} -> mdls.HomepageItem def homepage_item( self, # Id of homepage item @@ -4213,13 +4269,13 @@ def homepage_item( # Requested fields. fields: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.HomepageItem: + ) -> mdls.HomepageItem: """Get Homepage Item""" response = cast( - models.HomepageItem, + mdls.HomepageItem, self.get( path=f"/homepage_items/{homepage_item_id}", - structure=models.HomepageItem, + structure=mdls.HomepageItem, query_params={"fields": fields}, transport_options=transport_options, ), @@ -4228,22 +4284,22 @@ def homepage_item( # ### Update a homepage item definition. # - # PATCH /homepage_items/{homepage_item_id} -> models.HomepageItem + # PATCH /homepage_items/{homepage_item_id} -> mdls.HomepageItem def update_homepage_item( self, # Id of homepage item homepage_item_id: int, - body: models.WriteHomepageItem, + body: mdls.WriteHomepageItem, # Requested fields. fields: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.HomepageItem: + ) -> mdls.HomepageItem: """Update Homepage Item""" response = cast( - models.HomepageItem, + mdls.HomepageItem, self.patch( path=f"/homepage_items/{homepage_item_id}", - structure=models.HomepageItem, + structure=mdls.HomepageItem, query_params={"fields": fields}, body=body, transport_options=transport_options, @@ -4273,7 +4329,7 @@ def delete_homepage_item( # ### Get information about all homepage sections. # - # GET /homepage_sections -> Sequence[models.HomepageSection] + # GET /homepage_sections -> Sequence[mdls.HomepageSection] def all_homepage_sections( self, # Requested fields. @@ -4281,13 +4337,13 @@ def all_homepage_sections( # Fields to sort by. sorts: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> Sequence[models.HomepageSection]: + ) -> Sequence[mdls.HomepageSection]: """Get All Homepage sections""" response = cast( - Sequence[models.HomepageSection], + Sequence[mdls.HomepageSection], self.get( path="/homepage_sections", - structure=Sequence[models.HomepageSection], + structure=Sequence[mdls.HomepageSection], query_params={"fields": fields, "sorts": sorts}, transport_options=transport_options, ), @@ -4296,20 +4352,20 @@ def all_homepage_sections( # ### Create a new homepage section. # - # POST /homepage_sections -> models.HomepageSection + # POST /homepage_sections -> mdls.HomepageSection def create_homepage_section( self, - body: models.WriteHomepageSection, + body: mdls.WriteHomepageSection, # Requested fields. fields: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.HomepageSection: + ) -> mdls.HomepageSection: """Create Homepage section""" response = cast( - models.HomepageSection, + mdls.HomepageSection, self.post( path="/homepage_sections", - structure=models.HomepageSection, + structure=mdls.HomepageSection, query_params={"fields": fields}, body=body, transport_options=transport_options, @@ -4319,7 +4375,7 @@ def create_homepage_section( # ### Get information about a homepage section. # - # GET /homepage_sections/{homepage_section_id} -> models.HomepageSection + # GET /homepage_sections/{homepage_section_id} -> mdls.HomepageSection def homepage_section( self, # Id of homepage section @@ -4327,13 +4383,13 @@ def homepage_section( # Requested fields. fields: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.HomepageSection: + ) -> mdls.HomepageSection: """Get Homepage section""" response = cast( - models.HomepageSection, + mdls.HomepageSection, self.get( path=f"/homepage_sections/{homepage_section_id}", - structure=models.HomepageSection, + structure=mdls.HomepageSection, query_params={"fields": fields}, transport_options=transport_options, ), @@ -4342,22 +4398,22 @@ def homepage_section( # ### Update a homepage section definition. # - # PATCH /homepage_sections/{homepage_section_id} -> models.HomepageSection + # PATCH /homepage_sections/{homepage_section_id} -> mdls.HomepageSection def update_homepage_section( self, # Id of homepage section homepage_section_id: int, - body: models.WriteHomepageSection, + body: mdls.WriteHomepageSection, # Requested fields. fields: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.HomepageSection: + ) -> mdls.HomepageSection: """Update Homepage section""" response = cast( - models.HomepageSection, + mdls.HomepageSection, self.patch( path=f"/homepage_sections/{homepage_section_id}", - structure=models.HomepageSection, + structure=mdls.HomepageSection, query_params={"fields": fields}, body=body, transport_options=transport_options, @@ -4387,19 +4443,19 @@ def delete_homepage_section( # ### Get information about the primary homepage's sections. # - # GET /primary_homepage_sections -> Sequence[models.HomepageSection] + # GET /primary_homepage_sections -> Sequence[mdls.HomepageSection] def all_primary_homepage_sections( self, # Requested fields. fields: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> Sequence[models.HomepageSection]: + ) -> Sequence[mdls.HomepageSection]: """Get All Primary homepage sections""" response = cast( - Sequence[models.HomepageSection], + Sequence[mdls.HomepageSection], self.get( path="/primary_homepage_sections", - structure=Sequence[models.HomepageSection], + structure=Sequence[mdls.HomepageSection], query_params={"fields": fields}, transport_options=transport_options, ), @@ -4412,19 +4468,19 @@ def all_primary_homepage_sections( # ### Get information about all Integration Hubs. # - # GET /integration_hubs -> Sequence[models.IntegrationHub] + # GET /integration_hubs -> Sequence[mdls.IntegrationHub] def all_integration_hubs( self, # Requested fields. fields: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> Sequence[models.IntegrationHub]: + ) -> Sequence[mdls.IntegrationHub]: """Get All Integration Hubs""" response = cast( - Sequence[models.IntegrationHub], + Sequence[mdls.IntegrationHub], self.get( path="/integration_hubs", - structure=Sequence[models.IntegrationHub], + structure=Sequence[mdls.IntegrationHub], query_params={"fields": fields}, transport_options=transport_options, ), @@ -4435,20 +4491,20 @@ def all_integration_hubs( # # This API is rate limited to prevent it from being used for SSRF attacks # - # POST /integration_hubs -> models.IntegrationHub + # POST /integration_hubs -> mdls.IntegrationHub def create_integration_hub( self, - body: models.WriteIntegrationHub, + body: mdls.WriteIntegrationHub, # Requested fields. fields: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.IntegrationHub: + ) -> mdls.IntegrationHub: """Create Integration Hub""" response = cast( - models.IntegrationHub, + mdls.IntegrationHub, self.post( path="/integration_hubs", - structure=models.IntegrationHub, + structure=mdls.IntegrationHub, query_params={"fields": fields}, body=body, transport_options=transport_options, @@ -4458,7 +4514,7 @@ def create_integration_hub( # ### Get information about a Integration Hub. # - # GET /integration_hubs/{integration_hub_id} -> models.IntegrationHub + # GET /integration_hubs/{integration_hub_id} -> mdls.IntegrationHub def integration_hub( self, # Id of Integration Hub @@ -4466,13 +4522,13 @@ def integration_hub( # Requested fields. fields: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.IntegrationHub: + ) -> mdls.IntegrationHub: """Get Integration Hub""" response = cast( - models.IntegrationHub, + mdls.IntegrationHub, self.get( path=f"/integration_hubs/{integration_hub_id}", - structure=models.IntegrationHub, + structure=mdls.IntegrationHub, query_params={"fields": fields}, transport_options=transport_options, ), @@ -4483,22 +4539,22 @@ def integration_hub( # # This API is rate limited to prevent it from being used for SSRF attacks # - # PATCH /integration_hubs/{integration_hub_id} -> models.IntegrationHub + # PATCH /integration_hubs/{integration_hub_id} -> mdls.IntegrationHub def update_integration_hub( self, # Id of Integration Hub integration_hub_id: int, - body: models.WriteIntegrationHub, + body: mdls.WriteIntegrationHub, # Requested fields. fields: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.IntegrationHub: + ) -> mdls.IntegrationHub: """Update Integration Hub""" response = cast( - models.IntegrationHub, + mdls.IntegrationHub, self.patch( path=f"/integration_hubs/{integration_hub_id}", - structure=models.IntegrationHub, + structure=mdls.IntegrationHub, query_params={"fields": fields}, body=body, transport_options=transport_options, @@ -4528,19 +4584,19 @@ def delete_integration_hub( # 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. # - # POST /integration_hubs/{integration_hub_id}/accept_legal_agreement -> models.IntegrationHub + # POST /integration_hubs/{integration_hub_id}/accept_legal_agreement -> mdls.IntegrationHub def accept_integration_hub_legal_agreement( self, # Id of integration_hub integration_hub_id: int, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.IntegrationHub: + ) -> mdls.IntegrationHub: """Accept Integration Hub Legal Agreement""" response = cast( - models.IntegrationHub, + mdls.IntegrationHub, self.post( path=f"/integration_hubs/{integration_hub_id}/accept_legal_agreement", - structure=models.IntegrationHub, + structure=mdls.IntegrationHub, transport_options=transport_options, ), ) @@ -4548,7 +4604,7 @@ def accept_integration_hub_legal_agreement( # ### Get information about all Integrations. # - # GET /integrations -> Sequence[models.Integration] + # GET /integrations -> Sequence[mdls.Integration] def all_integrations( self, # Requested fields. @@ -4556,13 +4612,13 @@ def all_integrations( # Filter to a specific provider integration_hub_id: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> Sequence[models.Integration]: + ) -> Sequence[mdls.Integration]: """Get All Integrations""" response = cast( - Sequence[models.Integration], + Sequence[mdls.Integration], self.get( path="/integrations", - structure=Sequence[models.Integration], + structure=Sequence[mdls.Integration], query_params={ "fields": fields, "integration_hub_id": integration_hub_id, @@ -4574,7 +4630,7 @@ def all_integrations( # ### Get information about a Integration. # - # GET /integrations/{integration_id} -> models.Integration + # GET /integrations/{integration_id} -> mdls.Integration def integration( self, # Id of integration @@ -4582,14 +4638,14 @@ def integration( # Requested fields. fields: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.Integration: + ) -> mdls.Integration: """Get Integration""" integration_id = self.encode_path_param(integration_id) response = cast( - models.Integration, + mdls.Integration, self.get( path=f"/integrations/{integration_id}", - structure=models.Integration, + structure=mdls.Integration, query_params={"fields": fields}, transport_options=transport_options, ), @@ -4598,23 +4654,23 @@ def integration( # ### Update parameters on a Integration. # - # PATCH /integrations/{integration_id} -> models.Integration + # PATCH /integrations/{integration_id} -> mdls.Integration def update_integration( self, # Id of integration integration_id: str, - body: models.WriteIntegration, + body: mdls.WriteIntegration, # Requested fields. fields: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.Integration: + ) -> mdls.Integration: """Update Integration""" integration_id = self.encode_path_param(integration_id) response = cast( - models.Integration, + mdls.Integration, self.patch( path=f"/integrations/{integration_id}", - structure=models.Integration, + structure=mdls.Integration, query_params={"fields": fields}, body=body, transport_options=transport_options, @@ -4624,21 +4680,21 @@ def update_integration( # Returns the Integration form for presentation to the user. # - # POST /integrations/{integration_id}/form -> models.DataActionForm + # POST /integrations/{integration_id}/form -> mdls.DataActionForm def fetch_integration_form( self, # Id of integration integration_id: str, body: Optional[MutableMapping[str, Any]] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.DataActionForm: + ) -> mdls.DataActionForm: """Fetch Remote Integration Form""" integration_id = self.encode_path_param(integration_id) response = cast( - models.DataActionForm, + mdls.DataActionForm, self.post( path=f"/integrations/{integration_id}/form", - structure=models.DataActionForm, + structure=mdls.DataActionForm, body=body, transport_options=transport_options, ), @@ -4647,20 +4703,20 @@ def fetch_integration_form( # Tests the integration to make sure all the settings are working. # - # POST /integrations/{integration_id}/test -> models.IntegrationTestResult + # POST /integrations/{integration_id}/test -> mdls.IntegrationTestResult def test_integration( self, # Id of integration integration_id: str, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.IntegrationTestResult: + ) -> mdls.IntegrationTestResult: """Test integration""" integration_id = self.encode_path_param(integration_id) response = cast( - models.IntegrationTestResult, + mdls.IntegrationTestResult, self.post( path=f"/integrations/{integration_id}/test", - structure=models.IntegrationTestResult, + structure=mdls.IntegrationTestResult, transport_options=transport_options, ), ) @@ -4678,19 +4734,19 @@ def test_integration( # # Find **soft-deleted looks** with [search_looks()](#!/Look/search_looks) # - # GET /looks -> Sequence[models.Look] + # GET /looks -> Sequence[mdls.Look] def all_looks( self, # Requested fields. fields: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> Sequence[models.Look]: + ) -> Sequence[mdls.Look]: """Get All Looks""" response = cast( - Sequence[models.Look], + Sequence[mdls.Look], self.get( path="/looks", - structure=Sequence[models.Look], + structure=Sequence[mdls.Look], query_params={"fields": fields}, transport_options=transport_options, ), @@ -4705,20 +4761,20 @@ def all_looks( # To place the look into a particular space, assign the space's id to the `space_id` property # in the call to `create_look()`. # - # POST /looks -> models.LookWithQuery + # POST /looks -> mdls.LookWithQuery def create_look( self, - body: models.WriteLookWithQuery, + body: mdls.WriteLookWithQuery, # Requested fields. fields: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.LookWithQuery: + ) -> mdls.LookWithQuery: """Create Look""" response = cast( - models.LookWithQuery, + mdls.LookWithQuery, self.post( path="/looks", - structure=models.LookWithQuery, + structure=mdls.LookWithQuery, query_params={"fields": fields}, body=body, transport_options=transport_options, @@ -4754,7 +4810,7 @@ def create_look( # # Get a **single look** by id with [look(id)](#!/Look/look) # - # GET /looks/search -> Sequence[models.Look] + # GET /looks/search -> Sequence[mdls.Look] def search_looks( self, # Match look id. @@ -4792,13 +4848,13 @@ def search_looks( # Combine given search criteria in a boolean OR expression filter_or: Optional[bool] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> Sequence[models.Look]: + ) -> Sequence[mdls.Look]: """Search Looks""" response = cast( - Sequence[models.Look], + Sequence[mdls.Look], self.get( path="/looks/search", - structure=Sequence[models.Look], + structure=Sequence[mdls.Look], query_params={ "id": id, "title": title, @@ -4827,7 +4883,7 @@ def search_looks( # # Returns detailed information about a Look and its associated Query. # - # GET /looks/{look_id} -> models.LookWithQuery + # GET /looks/{look_id} -> mdls.LookWithQuery def look( self, # Id of look @@ -4835,13 +4891,13 @@ def look( # Requested fields. fields: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.LookWithQuery: + ) -> mdls.LookWithQuery: """Get Look""" response = cast( - models.LookWithQuery, + mdls.LookWithQuery, self.get( path=f"/looks/{look_id}", - structure=models.LookWithQuery, + structure=mdls.LookWithQuery, query_params={"fields": fields}, transport_options=transport_options, ), @@ -4869,22 +4925,22 @@ def look( # NOTE: [delete_look()](#!/Look/delete_look) performs a "hard delete" - the look data is removed from the Looker # database and destroyed. There is no "undo" for `delete_look()`. # - # PATCH /looks/{look_id} -> models.LookWithQuery + # PATCH /looks/{look_id} -> mdls.LookWithQuery def update_look( self, # Id of look look_id: int, - body: models.WriteLookWithQuery, + body: mdls.WriteLookWithQuery, # Requested fields. fields: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.LookWithQuery: + ) -> mdls.LookWithQuery: """Update Look""" response = cast( - models.LookWithQuery, + mdls.LookWithQuery, self.patch( path=f"/looks/{look_id}", - structure=models.LookWithQuery, + structure=mdls.LookWithQuery, query_params={"fields": fields}, body=body, transport_options=transport_options, @@ -5000,47 +5056,21 @@ def run_look( # region LookmlModel: Manage LookML Models - # ### Discover information about derived tables - # - # GET /derived_table/graph/model/{model} -> models.DependencyGraph - def graph_derived_tables_for_model( - self, - # The name of the Lookml model. - model: str, - # The format of the graph. Valid values are [dot]. Default is `dot` - format: Optional[str] = None, - # Color denoting the build status of the graph. Grey = not built, green = built, yellow = building, red = error. - color: Optional[str] = None, - transport_options: Optional[transport.TransportOptions] = None, - ) -> models.DependencyGraph: - """Get Derived Table""" - model = self.encode_path_param(model) - response = cast( - models.DependencyGraph, - self.get( - path=f"/derived_table/graph/model/{model}", - structure=models.DependencyGraph, - query_params={"format": format, "color": color}, - transport_options=transport_options, - ), - ) - return response - # ### Get information about all lookml models. # - # GET /lookml_models -> Sequence[models.LookmlModel] + # GET /lookml_models -> Sequence[mdls.LookmlModel] def all_lookml_models( self, # Requested fields. fields: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> Sequence[models.LookmlModel]: + ) -> Sequence[mdls.LookmlModel]: """Get All LookML Models""" response = cast( - Sequence[models.LookmlModel], + Sequence[mdls.LookmlModel], self.get( path="/lookml_models", - structure=Sequence[models.LookmlModel], + structure=Sequence[mdls.LookmlModel], query_params={"fields": fields}, transport_options=transport_options, ), @@ -5049,18 +5079,18 @@ def all_lookml_models( # ### Create a lookml model using the specified configuration. # - # POST /lookml_models -> models.LookmlModel + # POST /lookml_models -> mdls.LookmlModel def create_lookml_model( self, - body: models.WriteLookmlModel, + body: mdls.WriteLookmlModel, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.LookmlModel: + ) -> mdls.LookmlModel: """Create LookML Model""" response = cast( - models.LookmlModel, + mdls.LookmlModel, self.post( path="/lookml_models", - structure=models.LookmlModel, + structure=mdls.LookmlModel, body=body, transport_options=transport_options, ), @@ -5069,7 +5099,7 @@ def create_lookml_model( # ### Get information about a lookml model. # - # GET /lookml_models/{lookml_model_name} -> models.LookmlModel + # GET /lookml_models/{lookml_model_name} -> mdls.LookmlModel def lookml_model( self, # Name of lookml model. @@ -5077,14 +5107,14 @@ def lookml_model( # Requested fields. fields: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.LookmlModel: + ) -> mdls.LookmlModel: """Get LookML Model""" lookml_model_name = self.encode_path_param(lookml_model_name) response = cast( - models.LookmlModel, + mdls.LookmlModel, self.get( path=f"/lookml_models/{lookml_model_name}", - structure=models.LookmlModel, + structure=mdls.LookmlModel, query_params={"fields": fields}, transport_options=transport_options, ), @@ -5093,21 +5123,21 @@ def lookml_model( # ### Update a lookml model using the specified configuration. # - # PATCH /lookml_models/{lookml_model_name} -> models.LookmlModel + # PATCH /lookml_models/{lookml_model_name} -> mdls.LookmlModel def update_lookml_model( self, # Name of lookml model. lookml_model_name: str, - body: models.WriteLookmlModel, + body: mdls.WriteLookmlModel, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.LookmlModel: + ) -> mdls.LookmlModel: """Update LookML Model""" lookml_model_name = self.encode_path_param(lookml_model_name) response = cast( - models.LookmlModel, + mdls.LookmlModel, self.patch( path=f"/lookml_models/{lookml_model_name}", - structure=models.LookmlModel, + structure=mdls.LookmlModel, body=body, transport_options=transport_options, ), @@ -5137,7 +5167,7 @@ def delete_lookml_model( # ### Get information about a lookml model explore. # - # GET /lookml_models/{lookml_model_name}/explores/{explore_name} -> models.LookmlModelExplore + # GET /lookml_models/{lookml_model_name}/explores/{explore_name} -> mdls.LookmlModelExplore def lookml_model_explore( self, # Name of lookml model. @@ -5147,15 +5177,15 @@ def lookml_model_explore( # Requested fields. fields: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.LookmlModelExplore: + ) -> mdls.LookmlModelExplore: """Get LookML Model Explore""" lookml_model_name = self.encode_path_param(lookml_model_name) explore_name = self.encode_path_param(explore_name) response = cast( - models.LookmlModelExplore, + mdls.LookmlModelExplore, self.get( path=f"/lookml_models/{lookml_model_name}/explores/{explore_name}", - structure=models.LookmlModelExplore, + structure=mdls.LookmlModelExplore, query_params={"fields": fields}, transport_options=transport_options, ), @@ -5170,20 +5200,20 @@ def lookml_model_explore( # # Returns a list of git branches in the project repository # - # GET /projects/{project_id}/git_branches -> Sequence[models.GitBranch] + # GET /projects/{project_id}/git_branches -> Sequence[mdls.GitBranch] def all_git_branches( self, # Project Id project_id: str, transport_options: Optional[transport.TransportOptions] = None, - ) -> Sequence[models.GitBranch]: + ) -> Sequence[mdls.GitBranch]: """Get All Git Branches""" project_id = self.encode_path_param(project_id) response = cast( - Sequence[models.GitBranch], + Sequence[mdls.GitBranch], self.get( path=f"/projects/{project_id}/git_branches", - structure=Sequence[models.GitBranch], + structure=Sequence[mdls.GitBranch], transport_options=transport_options, ), ) @@ -5193,20 +5223,20 @@ def all_git_branches( # # Returns the git branch currently checked out in the given project repository # - # GET /projects/{project_id}/git_branch -> models.GitBranch + # GET /projects/{project_id}/git_branch -> mdls.GitBranch def git_branch( self, # Project Id project_id: str, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.GitBranch: + ) -> mdls.GitBranch: """Get Active Git Branch""" project_id = self.encode_path_param(project_id) response = cast( - models.GitBranch, + mdls.GitBranch, self.get( path=f"/projects/{project_id}/git_branch", - structure=models.GitBranch, + structure=mdls.GitBranch, transport_options=transport_options, ), ) @@ -5222,21 +5252,21 @@ def git_branch( # Optionally specify a branch name, tag name or commit SHA to which the branch should be reset. # **DANGER** hard reset will be force pushed to the remote. Unsaved changes and commits may be permanently lost. # - # PUT /projects/{project_id}/git_branch -> models.GitBranch + # PUT /projects/{project_id}/git_branch -> mdls.GitBranch def update_git_branch( self, # Project Id project_id: str, - body: models.WriteGitBranch, + body: mdls.WriteGitBranch, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.GitBranch: + ) -> mdls.GitBranch: """Update Project Git Branch""" project_id = self.encode_path_param(project_id) response = cast( - models.GitBranch, + mdls.GitBranch, self.put( path=f"/projects/{project_id}/git_branch", - structure=models.GitBranch, + structure=mdls.GitBranch, body=body, transport_options=transport_options, ), @@ -5252,21 +5282,21 @@ def update_git_branch( # Optionally specify a branch name, tag name or commit SHA as the start point in the ref field. # If no ref is specified, HEAD of the current branch will be used as the start point for the new branch. # - # POST /projects/{project_id}/git_branch -> models.GitBranch + # POST /projects/{project_id}/git_branch -> mdls.GitBranch def create_git_branch( self, # Project Id project_id: str, - body: models.WriteGitBranch, + body: mdls.WriteGitBranch, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.GitBranch: + ) -> mdls.GitBranch: """Checkout New Git Branch""" project_id = self.encode_path_param(project_id) response = cast( - models.GitBranch, + mdls.GitBranch, self.post( path=f"/projects/{project_id}/git_branch", - structure=models.GitBranch, + structure=mdls.GitBranch, body=body, transport_options=transport_options, ), @@ -5277,7 +5307,7 @@ def create_git_branch( # # Returns the git branch specified in branch_name path param if it exists in the given project repository # - # GET /projects/{project_id}/git_branch/{branch_name} -> models.GitBranch + # GET /projects/{project_id}/git_branch/{branch_name} -> mdls.GitBranch def find_git_branch( self, # Project Id @@ -5285,15 +5315,15 @@ def find_git_branch( # Branch Name branch_name: str, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.GitBranch: + ) -> mdls.GitBranch: """Find a Git Branch""" project_id = self.encode_path_param(project_id) branch_name = self.encode_path_param(branch_name) response = cast( - models.GitBranch, + mdls.GitBranch, self.get( path=f"/projects/{project_id}/git_branch/{branch_name}", - structure=models.GitBranch, + structure=mdls.GitBranch, transport_options=transport_options, ), ) @@ -5441,19 +5471,19 @@ def reset_project_to_remote( # # Returns all projects visible to the current user # - # GET /projects -> Sequence[models.Project] + # GET /projects -> Sequence[mdls.Project] def all_projects( self, # Requested fields fields: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> Sequence[models.Project]: + ) -> Sequence[mdls.Project]: """Get All Projects""" response = cast( - Sequence[models.Project], + Sequence[mdls.Project], self.get( path="/projects", - structure=Sequence[models.Project], + structure=Sequence[mdls.Project], query_params={"fields": fields}, transport_options=transport_options, ), @@ -5468,18 +5498,18 @@ def all_projects( # `name` is required. # `git_remote_url` is not allowed. To configure Git for the newly created project, follow the instructions in `update_project`. # - # POST /projects -> models.Project + # POST /projects -> mdls.Project def create_project( self, - body: models.WriteProject, + body: mdls.WriteProject, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.Project: + ) -> mdls.Project: """Create Project""" response = cast( - models.Project, + mdls.Project, self.post( path="/projects", - structure=models.Project, + structure=mdls.Project, body=body, transport_options=transport_options, ), @@ -5490,7 +5520,7 @@ def create_project( # # Returns the project with the given project id # - # GET /projects/{project_id} -> models.Project + # GET /projects/{project_id} -> mdls.Project def project( self, # Project Id @@ -5498,14 +5528,14 @@ def project( # Requested fields fields: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.Project: + ) -> mdls.Project: """Get Project""" project_id = self.encode_path_param(project_id) response = cast( - models.Project, + mdls.Project, self.get( path=f"/projects/{project_id}", - structure=models.Project, + structure=mdls.Project, query_params={"fields": fields}, transport_options=transport_options, ), @@ -5535,23 +5565,23 @@ def project( # 1. Call `update_session` to select the 'dev' workspace. # 1. Call `update_project` setting `git_remote_url` to null and `git_service_name` to "bare". # - # PATCH /projects/{project_id} -> models.Project + # PATCH /projects/{project_id} -> mdls.Project def update_project( self, # Project Id project_id: str, - body: models.WriteProject, + body: mdls.WriteProject, # Requested fields fields: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.Project: + ) -> mdls.Project: """Update Project""" project_id = self.encode_path_param(project_id) response = cast( - models.Project, + mdls.Project, self.patch( path=f"/projects/{project_id}", - structure=models.Project, + structure=mdls.Project, query_params={"fields": fields}, body=body, transport_options=transport_options, @@ -5563,20 +5593,20 @@ def update_project( # # Returns the project with the given project id # - # GET /projects/{project_id}/manifest -> models.Manifest + # GET /projects/{project_id}/manifest -> mdls.Manifest def manifest( self, # Project Id project_id: str, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.Manifest: + ) -> mdls.Manifest: """Get Manifest""" project_id = self.encode_path_param(project_id) response = cast( - models.Manifest, + mdls.Manifest, self.get( path=f"/projects/{project_id}/manifest", - structure=models.Manifest, + structure=mdls.Manifest, transport_options=transport_options, ), ) @@ -5647,7 +5677,7 @@ def create_git_deploy_key( # the cached validation results were computed. The cached validation results may no longer # reflect the current state of the project. # - # GET /projects/{project_id}/validate -> models.ProjectValidationCache + # GET /projects/{project_id}/validate -> mdls.ProjectValidationCache def project_validation_results( self, # Project Id @@ -5655,14 +5685,14 @@ def project_validation_results( # Requested fields fields: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.ProjectValidationCache: + ) -> mdls.ProjectValidationCache: """Cached Project Validation Results""" project_id = self.encode_path_param(project_id) response = cast( - models.ProjectValidationCache, + mdls.ProjectValidationCache, self.get( path=f"/projects/{project_id}/validate", - structure=models.ProjectValidationCache, + structure=mdls.ProjectValidationCache, query_params={"fields": fields}, transport_options=transport_options, ), @@ -5679,7 +5709,7 @@ def project_validation_results( # when you really want to recompute project validation. To quickly display the results of # the most recent project validation (without recomputing), use `project_validation_results(project_id)` # - # POST /projects/{project_id}/validate -> models.ProjectValidation + # POST /projects/{project_id}/validate -> mdls.ProjectValidation def validate_project( self, # Project Id @@ -5687,14 +5717,14 @@ def validate_project( # Requested fields fields: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.ProjectValidation: + ) -> mdls.ProjectValidation: """Validate Project""" project_id = self.encode_path_param(project_id) response = cast( - models.ProjectValidation, + mdls.ProjectValidation, self.post( path=f"/projects/{project_id}/validate", - structure=models.ProjectValidation, + structure=mdls.ProjectValidation, query_params={"fields": fields}, transport_options=transport_options, ), @@ -5705,7 +5735,7 @@ def validate_project( # # Returns information about the state of the project files in the currently selected workspace # - # GET /projects/{project_id}/current_workspace -> models.ProjectWorkspace + # GET /projects/{project_id}/current_workspace -> mdls.ProjectWorkspace def project_workspace( self, # Project Id @@ -5713,14 +5743,14 @@ def project_workspace( # Requested fields fields: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.ProjectWorkspace: + ) -> mdls.ProjectWorkspace: """Get Project Workspace""" project_id = self.encode_path_param(project_id) response = cast( - models.ProjectWorkspace, + mdls.ProjectWorkspace, self.get( path=f"/projects/{project_id}/current_workspace", - structure=models.ProjectWorkspace, + structure=mdls.ProjectWorkspace, query_params={"fields": fields}, transport_options=transport_options, ), @@ -5731,7 +5761,7 @@ def project_workspace( # # Returns a list of the files in the project # - # GET /projects/{project_id}/files -> Sequence[models.ProjectFile] + # GET /projects/{project_id}/files -> Sequence[mdls.ProjectFile] def all_project_files( self, # Project Id @@ -5739,14 +5769,14 @@ def all_project_files( # Requested fields fields: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> Sequence[models.ProjectFile]: + ) -> Sequence[mdls.ProjectFile]: """Get All Project Files""" project_id = self.encode_path_param(project_id) response = cast( - Sequence[models.ProjectFile], + Sequence[mdls.ProjectFile], self.get( path=f"/projects/{project_id}/files", - structure=Sequence[models.ProjectFile], + structure=Sequence[mdls.ProjectFile], query_params={"fields": fields}, transport_options=transport_options, ), @@ -5757,7 +5787,7 @@ def all_project_files( # # Returns information about a file in the project # - # GET /projects/{project_id}/files/file -> models.ProjectFile + # GET /projects/{project_id}/files/file -> mdls.ProjectFile def project_file( self, # Project Id @@ -5767,14 +5797,14 @@ def project_file( # Requested fields fields: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.ProjectFile: + ) -> mdls.ProjectFile: """Get Project File""" project_id = self.encode_path_param(project_id) response = cast( - models.ProjectFile, + mdls.ProjectFile, self.get( path=f"/projects/{project_id}/files/file", - structure=models.ProjectFile, + structure=mdls.ProjectFile, query_params={"file_id": file_id, "fields": fields}, transport_options=transport_options, ), @@ -5792,7 +5822,7 @@ def project_file( # # For example, a late-stage test for write access is meaningless if connecting to the git server (an early test) is failing. # - # GET /projects/{project_id}/git_connection_tests -> Sequence[models.GitConnectionTest] + # GET /projects/{project_id}/git_connection_tests -> Sequence[mdls.GitConnectionTest] def all_git_connection_tests( self, # Project Id @@ -5800,14 +5830,14 @@ def all_git_connection_tests( # (Optional: leave blank for root project) The remote url for remote dependency to test. remote_url: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> Sequence[models.GitConnectionTest]: + ) -> Sequence[mdls.GitConnectionTest]: """Get All Git Connection Tests""" project_id = self.encode_path_param(project_id) response = cast( - Sequence[models.GitConnectionTest], + Sequence[mdls.GitConnectionTest], self.get( path=f"/projects/{project_id}/git_connection_tests", - structure=Sequence[models.GitConnectionTest], + structure=Sequence[mdls.GitConnectionTest], query_params={"remote_url": remote_url}, transport_options=transport_options, ), @@ -5822,7 +5852,7 @@ def all_git_connection_tests( # # Tests should be run in the order they are returned by [Get All Git Connection Tests](#!/Project/all_git_connection_tests). # - # GET /projects/{project_id}/git_connection_tests/{test_id} -> models.GitConnectionTestResult + # GET /projects/{project_id}/git_connection_tests/{test_id} -> mdls.GitConnectionTestResult def run_git_connection_test( self, # Project Id @@ -5834,15 +5864,15 @@ def run_git_connection_test( # (Optional: leave blank for dev credentials) Whether to use git production credentials. use_production: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.GitConnectionTestResult: + ) -> mdls.GitConnectionTestResult: """Run Git Connection Test""" project_id = self.encode_path_param(project_id) test_id = self.encode_path_param(test_id) response = cast( - models.GitConnectionTestResult, + mdls.GitConnectionTestResult, self.get( path=f"/projects/{project_id}/git_connection_tests/{test_id}", - structure=models.GitConnectionTestResult, + structure=mdls.GitConnectionTestResult, query_params={ "remote_url": remote_url, "use_production": use_production, @@ -5858,7 +5888,7 @@ def run_git_connection_test( # optionally filtered by the file id. # Call [Run LookML Test](#!/Project/run_lookml_test) to execute tests. # - # GET /projects/{project_id}/lookml_tests -> Sequence[models.LookmlTest] + # GET /projects/{project_id}/lookml_tests -> Sequence[mdls.LookmlTest] def all_lookml_tests( self, # Project Id @@ -5866,14 +5896,14 @@ def all_lookml_tests( # File Id file_id: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> Sequence[models.LookmlTest]: + ) -> Sequence[mdls.LookmlTest]: """Get All LookML Tests""" project_id = self.encode_path_param(project_id) response = cast( - Sequence[models.LookmlTest], + Sequence[mdls.LookmlTest], self.get( path=f"/projects/{project_id}/lookml_tests", - structure=Sequence[models.LookmlTest], + structure=Sequence[mdls.LookmlTest], query_params={"file_id": file_id}, transport_options=transport_options, ), @@ -5884,7 +5914,7 @@ def all_lookml_tests( # # Runs all tests in the project, optionally filtered by file, test, and/or model. # - # GET /projects/{project_id}/lookml_tests/run -> Sequence[models.LookmlTestResult] + # GET /projects/{project_id}/lookml_tests/run -> Sequence[mdls.LookmlTestResult] def run_lookml_test( self, # Project Id @@ -5896,14 +5926,14 @@ def run_lookml_test( # Model Name model: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> Sequence[models.LookmlTestResult]: + ) -> Sequence[mdls.LookmlTestResult]: """Run LookML Test""" project_id = self.encode_path_param(project_id) response = cast( - Sequence[models.LookmlTestResult], + Sequence[mdls.LookmlTestResult], self.get( path=f"/projects/{project_id}/lookml_tests/run", - structure=Sequence[models.LookmlTestResult], + structure=Sequence[mdls.LookmlTestResult], query_params={"file_id": file_id, "test": test, "model": model}, transport_options=transport_options, ), @@ -5914,12 +5944,12 @@ def run_lookml_test( # # This is an internal-only, undocumented route. # - # POST /projects/{project_id}/tag -> models.Project + # POST /projects/{project_id}/tag -> mdls.Project def tag_ref( self, # Project Id project_id: str, - body: models.WriteProject, + body: mdls.WriteProject, # (Optional): Commit Sha to Tag commit_sha: Optional[str] = None, # Tag Name @@ -5927,14 +5957,14 @@ def tag_ref( # (Optional): Tag Message tag_message: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.Project: + ) -> mdls.Project: """Tag Ref""" project_id = self.encode_path_param(project_id) response = cast( - models.Project, + mdls.Project, self.post( path=f"/projects/{project_id}/tag", - structure=models.Project, + structure=mdls.Project, query_params={ "commit_sha": commit_sha, "tag_name": tag_name, @@ -5953,24 +5983,24 @@ def tag_ref( # `root_project_id` is required. # `credential_id` is required. # - # PUT /projects/{root_project_id}/credential/{credential_id} -> models.RepositoryCredential + # PUT /projects/{root_project_id}/credential/{credential_id} -> mdls.RepositoryCredential def update_repository_credential( self, # Root Project Id root_project_id: str, # Credential Id credential_id: str, - body: models.WriteRepositoryCredential, + body: mdls.WriteRepositoryCredential, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.RepositoryCredential: + ) -> mdls.RepositoryCredential: """Create Repository Credential""" root_project_id = self.encode_path_param(root_project_id) credential_id = self.encode_path_param(credential_id) response = cast( - models.RepositoryCredential, + mdls.RepositoryCredential, self.put( path=f"/projects/{root_project_id}/credential/{credential_id}", - structure=models.RepositoryCredential, + structure=mdls.RepositoryCredential, body=body, transport_options=transport_options, ), @@ -6010,20 +6040,20 @@ def delete_repository_credential( # # `root_project_id` is required. # - # GET /projects/{root_project_id}/credentials -> Sequence[models.RepositoryCredential] + # GET /projects/{root_project_id}/credentials -> Sequence[mdls.RepositoryCredential] def get_all_repository_credentials( self, # Root Project Id root_project_id: str, transport_options: Optional[transport.TransportOptions] = None, - ) -> Sequence[models.RepositoryCredential]: + ) -> Sequence[mdls.RepositoryCredential]: """Get All Repository Credentials""" root_project_id = self.encode_path_param(root_project_id) response = cast( - Sequence[models.RepositoryCredential], + Sequence[mdls.RepositoryCredential], self.get( path=f"/projects/{root_project_id}/credentials", - structure=Sequence[models.RepositoryCredential], + structure=Sequence[mdls.RepositoryCredential], transport_options=transport_options, ), ) @@ -6040,10 +6070,10 @@ def get_all_repository_credentials( # Use [query_task(query_task_id)](#!/Query/query_task) to check the execution status of the query task. # After the query task status reaches "Complete", use [query_task_results(query_task_id)](#!/Query/query_task_results) to fetch the results of the query. # - # POST /query_tasks -> models.QueryTask + # POST /query_tasks -> mdls.QueryTask def create_query_task( self, - body: models.WriteCreateQueryTask, + body: mdls.WriteCreateQueryTask, # Row limit (may override the limit in the saved query). limit: Optional[int] = None, # Apply model-specified formatting to each result. @@ -6071,13 +6101,13 @@ def create_query_task( # Requested fields fields: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.QueryTask: + ) -> mdls.QueryTask: """Run Query Async""" response = cast( - models.QueryTask, + mdls.QueryTask, self.post( path="/query_tasks", - structure=models.QueryTask, + structure=mdls.QueryTask, query_params={ "limit": limit, "apply_formatting": apply_formatting, @@ -6111,7 +6141,7 @@ def create_query_task( def query_task_multi_results( self, # List of Query Task IDs - query_task_ids: models.DelimSequence[str], + query_task_ids: mdls.DelimSequence[str], transport_options: Optional[transport.TransportOptions] = None, ) -> MutableMapping[str, Any]: """Get Multiple Async Query Results""" @@ -6134,7 +6164,7 @@ def query_task_multi_results( # # Use [create_query_task()](#!/Query/create_query_task) to create an async query task. # - # GET /query_tasks/{query_task_id} -> models.QueryTask + # GET /query_tasks/{query_task_id} -> mdls.QueryTask def query_task( self, # ID of the Query Task @@ -6142,14 +6172,14 @@ def query_task( # Requested fields. fields: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.QueryTask: + ) -> mdls.QueryTask: """Get Async Query Info""" query_task_id = self.encode_path_param(query_task_id) response = cast( - models.QueryTask, + mdls.QueryTask, self.get( path=f"/query_tasks/{query_task_id}", - structure=models.QueryTask, + structure=mdls.QueryTask, query_params={"fields": fields}, transport_options=transport_options, ), @@ -6217,7 +6247,7 @@ def query_task_results( # builds queries and visualizations and are not generally useful for API use. They are not required when # creating new queries and can usually just be ignored. # - # GET /queries/{query_id} -> models.Query + # GET /queries/{query_id} -> mdls.Query def query( self, # Id of query @@ -6225,13 +6255,13 @@ def query( # Requested fields. fields: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.Query: + ) -> mdls.Query: """Get Query""" response = cast( - models.Query, + mdls.Query, self.get( path=f"/queries/{query_id}", - structure=models.Query, + structure=mdls.Query, query_params={"fields": fields}, transport_options=transport_options, ), @@ -6256,7 +6286,7 @@ def query( # 'https://looker.yourcompany/explore/ecommerce/orders?qid=aogBgL6o3cKK1jN3RoZl5s'. In this case # 'aogBgL6o3cKK1jN3RoZl5s' is the slug. # - # GET /queries/slug/{slug} -> models.Query + # GET /queries/slug/{slug} -> mdls.Query def query_for_slug( self, # Slug of query @@ -6264,14 +6294,14 @@ def query_for_slug( # Requested fields. fields: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.Query: + ) -> mdls.Query: """Get Query for Slug""" slug = self.encode_path_param(slug) response = cast( - models.Query, + mdls.Query, self.get( path=f"/queries/slug/{slug}", - structure=models.Query, + structure=mdls.Query, query_params={"fields": fields}, transport_options=transport_options, ), @@ -6287,20 +6317,20 @@ def query_for_slug( # # The query parameters are passed as json in the body of the request. # - # POST /queries -> models.Query + # POST /queries -> mdls.Query def create_query( self, - body: models.WriteQuery, + body: mdls.WriteQuery, # Requested fields. fields: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.Query: + ) -> mdls.Query: """Create Query""" response = cast( - models.Query, + mdls.Query, self.post( path="/queries", - structure=models.Query, + structure=mdls.Query, query_params={"fields": fields}, body=body, transport_options=transport_options, @@ -6445,7 +6475,7 @@ def run_inline_query( self, # Format of result result_format: str, - body: models.WriteQuery, + body: mdls.WriteQuery, # Row limit (may override the limit in the saved query). limit: Optional[int] = None, # Apply model-specified formatting to each result. @@ -6581,7 +6611,7 @@ def run_url_encoded_query( # # Returns a merge query object given its id. # - # GET /merge_queries/{merge_query_id} -> models.MergeQuery + # GET /merge_queries/{merge_query_id} -> mdls.MergeQuery def merge_query( self, # Merge Query Id @@ -6589,14 +6619,14 @@ def merge_query( # Requested fields fields: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.MergeQuery: + ) -> mdls.MergeQuery: """Get Merge Query""" merge_query_id = self.encode_path_param(merge_query_id) response = cast( - models.MergeQuery, + mdls.MergeQuery, self.get( path=f"/merge_queries/{merge_query_id}", - structure=models.MergeQuery, + structure=mdls.MergeQuery, query_params={"fields": fields}, transport_options=transport_options, ), @@ -6621,20 +6651,20 @@ def merge_query( # the existing merge query will be returned instead of creating a duplicate. Conversely, any # change to the contents of a merge query will produce a new object with a new id. # - # POST /merge_queries -> models.MergeQuery + # POST /merge_queries -> mdls.MergeQuery def create_merge_query( self, - body: Optional[models.WriteMergeQuery] = None, + body: Optional[mdls.WriteMergeQuery] = None, # Requested fields fields: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.MergeQuery: + ) -> mdls.MergeQuery: """Create Merge Query""" response = cast( - models.MergeQuery, + mdls.MergeQuery, self.post( path="/merge_queries", - structure=models.MergeQuery, + structure=mdls.MergeQuery, query_params={"fields": fields}, body=body, transport_options=transport_options, @@ -6644,17 +6674,17 @@ def create_merge_query( # Get information about all running queries. # - # GET /running_queries -> Sequence[models.RunningQueries] + # GET /running_queries -> Sequence[mdls.RunningQueries] def all_running_queries( self, transport_options: Optional[transport.TransportOptions] = None, - ) -> Sequence[models.RunningQueries]: + ) -> Sequence[mdls.RunningQueries]: """Get All Running Queries""" response = cast( - Sequence[models.RunningQueries], + Sequence[mdls.RunningQueries], self.get( path="/running_queries", - structure=Sequence[models.RunningQueries], + structure=Sequence[mdls.RunningQueries], transport_options=transport_options, ), ) @@ -6683,20 +6713,20 @@ def kill_query( # Get a SQL Runner query. # - # GET /sql_queries/{slug} -> models.SqlQuery + # GET /sql_queries/{slug} -> mdls.SqlQuery def sql_query( self, # slug of query slug: str, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.SqlQuery: + ) -> mdls.SqlQuery: """Get SQL Runner Query""" slug = self.encode_path_param(slug) response = cast( - models.SqlQuery, + mdls.SqlQuery, self.get( path=f"/sql_queries/{slug}", - structure=models.SqlQuery, + structure=mdls.SqlQuery, transport_options=transport_options, ), ) @@ -6706,18 +6736,18 @@ def sql_query( # # Either the `connection_name` or `model_name` parameter MUST be provided. # - # POST /sql_queries -> models.SqlQuery + # POST /sql_queries -> mdls.SqlQuery def create_sql_query( self, - body: models.SqlQueryCreate, + body: mdls.SqlQueryCreate, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.SqlQuery: + ) -> mdls.SqlQuery: """Create SQL Runner Query""" response = cast( - models.SqlQuery, + mdls.SqlQuery, self.post( path="/sql_queries", - structure=models.SqlQuery, + structure=mdls.SqlQuery, body=body, transport_options=transport_options, ), @@ -6763,14 +6793,14 @@ def run_sql_query( # To check the status of a render task, pass the render_task.id to [Get Render Task](#!/RenderTask/get_render_task). # Once the render task is complete, you can download the resulting document or image using [Get Render Task Results](#!/RenderTask/get_render_task_results). # - # POST /render_tasks/lookml_dashboards/{dashboard_id}/{result_format} -> models.RenderTask + # POST /render_tasks/lookml_dashboards/{dashboard_id}/{result_format} -> mdls.RenderTask def create_lookml_dashboard_render_task( self, # Id of lookml dashboard to render dashboard_id: str, # Output type: pdf, png, or jpg result_format: str, - body: models.CreateDashboardRenderTask, + body: mdls.CreateDashboardRenderTask, # Output width in pixels width: int, # Output height in pixels @@ -6782,15 +6812,15 @@ def create_lookml_dashboard_render_task( # Whether to render pdf in landscape pdf_landscape: Optional[bool] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.RenderTask: + ) -> mdls.RenderTask: """Create Lookml Dashboard Render Task""" dashboard_id = self.encode_path_param(dashboard_id) result_format = self.encode_path_param(result_format) response = cast( - models.RenderTask, + mdls.RenderTask, self.post( path=f"/render_tasks/lookml_dashboards/{dashboard_id}/{result_format}", - structure=models.RenderTask, + structure=mdls.RenderTask, query_params={ "width": width, "height": height, @@ -6810,7 +6840,7 @@ def create_lookml_dashboard_render_task( # To check the status of a render task, pass the render_task.id to [Get Render Task](#!/RenderTask/get_render_task). # Once the render task is complete, you can download the resulting document or image using [Get Render Task Results](#!/RenderTask/get_render_task_results). # - # POST /render_tasks/looks/{look_id}/{result_format} -> models.RenderTask + # POST /render_tasks/looks/{look_id}/{result_format} -> mdls.RenderTask def create_look_render_task( self, # Id of look to render @@ -6824,14 +6854,14 @@ def create_look_render_task( # Requested fields. fields: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.RenderTask: + ) -> mdls.RenderTask: """Create Look Render Task""" result_format = self.encode_path_param(result_format) response = cast( - models.RenderTask, + mdls.RenderTask, self.post( path=f"/render_tasks/looks/{look_id}/{result_format}", - structure=models.RenderTask, + structure=mdls.RenderTask, query_params={"width": width, "height": height, "fields": fields}, transport_options=transport_options, ), @@ -6844,7 +6874,7 @@ def create_look_render_task( # To check the status of a render task, pass the render_task.id to [Get Render Task](#!/RenderTask/get_render_task). # Once the render task is complete, you can download the resulting document or image using [Get Render Task Results](#!/RenderTask/get_render_task_results). # - # POST /render_tasks/queries/{query_id}/{result_format} -> models.RenderTask + # POST /render_tasks/queries/{query_id}/{result_format} -> mdls.RenderTask def create_query_render_task( self, # Id of the query to render @@ -6858,14 +6888,14 @@ def create_query_render_task( # Requested fields. fields: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.RenderTask: + ) -> mdls.RenderTask: """Create Query Render Task""" result_format = self.encode_path_param(result_format) response = cast( - models.RenderTask, + mdls.RenderTask, self.post( path=f"/render_tasks/queries/{query_id}/{result_format}", - structure=models.RenderTask, + structure=mdls.RenderTask, query_params={"width": width, "height": height, "fields": fields}, transport_options=transport_options, ), @@ -6878,14 +6908,14 @@ def create_query_render_task( # To check the status of a render task, pass the render_task.id to [Get Render Task](#!/RenderTask/get_render_task). # Once the render task is complete, you can download the resulting document or image using [Get Render Task Results](#!/RenderTask/get_render_task_results). # - # POST /render_tasks/dashboards/{dashboard_id}/{result_format} -> models.RenderTask + # POST /render_tasks/dashboards/{dashboard_id}/{result_format} -> mdls.RenderTask def create_dashboard_render_task( self, # Id of dashboard to render dashboard_id: int, # Output type: pdf, png, or jpg result_format: str, - body: models.CreateDashboardRenderTask, + body: mdls.CreateDashboardRenderTask, # Output width in pixels width: int, # Output height in pixels @@ -6897,14 +6927,14 @@ def create_dashboard_render_task( # Whether to render pdf in landscape paper orientation pdf_landscape: Optional[bool] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.RenderTask: + ) -> mdls.RenderTask: """Create Dashboard Render Task""" result_format = self.encode_path_param(result_format) response = cast( - models.RenderTask, + mdls.RenderTask, self.post( path=f"/render_tasks/dashboards/{dashboard_id}/{result_format}", - structure=models.RenderTask, + structure=mdls.RenderTask, query_params={ "width": width, "height": height, @@ -6924,7 +6954,7 @@ def create_dashboard_render_task( # To check the status of a render task, pass the render_task.id to [Get Render Task](#!/RenderTask/get_render_task). # Once the render task is complete, you can download the resulting document or image using [Get Render Task Results](#!/RenderTask/get_render_task_results). # - # GET /render_tasks/{render_task_id} -> models.RenderTask + # GET /render_tasks/{render_task_id} -> mdls.RenderTask def render_task( self, # Id of render task @@ -6932,14 +6962,14 @@ def render_task( # Requested fields. fields: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.RenderTask: + ) -> mdls.RenderTask: """Get Render Task""" render_task_id = self.encode_path_param(render_task_id) response = cast( - models.RenderTask, + mdls.RenderTask, self.get( path=f"/render_tasks/{render_task_id}", - structure=models.RenderTask, + structure=mdls.RenderTask, query_params={"fields": fields}, transport_options=transport_options, ), @@ -7010,7 +7040,7 @@ def render_task_results( # # Boolean search params accept only "true" and "false" as values. # - # GET /model_sets/search -> Sequence[models.ModelSet] + # GET /model_sets/search -> Sequence[mdls.ModelSet] def search_model_sets( self, # Requested fields. @@ -7032,13 +7062,13 @@ def search_model_sets( # Combine given search criteria in a boolean OR expression. filter_or: Optional[bool] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> Sequence[models.ModelSet]: + ) -> Sequence[mdls.ModelSet]: """Search Model Sets""" response = cast( - Sequence[models.ModelSet], + Sequence[mdls.ModelSet], self.get( path="/model_sets/search", - structure=Sequence[models.ModelSet], + structure=Sequence[mdls.ModelSet], query_params={ "fields": fields, "limit": limit, @@ -7057,7 +7087,7 @@ def search_model_sets( # ### Get information about the model set with a specific id. # - # GET /model_sets/{model_set_id} -> models.ModelSet + # GET /model_sets/{model_set_id} -> mdls.ModelSet def model_set( self, # Id of model set @@ -7065,13 +7095,13 @@ def model_set( # Requested fields. fields: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.ModelSet: + ) -> mdls.ModelSet: """Get Model Set""" response = cast( - models.ModelSet, + mdls.ModelSet, self.get( path=f"/model_sets/{model_set_id}", - structure=models.ModelSet, + structure=mdls.ModelSet, query_params={"fields": fields}, transport_options=transport_options, ), @@ -7080,20 +7110,20 @@ def model_set( # ### Update information about the model set with a specific id. # - # PATCH /model_sets/{model_set_id} -> models.ModelSet + # PATCH /model_sets/{model_set_id} -> mdls.ModelSet def update_model_set( self, # id of model set model_set_id: int, - body: models.WriteModelSet, + body: mdls.WriteModelSet, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.ModelSet: + ) -> mdls.ModelSet: """Update Model Set""" response = cast( - models.ModelSet, + mdls.ModelSet, self.patch( path=f"/model_sets/{model_set_id}", - structure=models.ModelSet, + structure=mdls.ModelSet, body=body, transport_options=transport_options, ), @@ -7122,19 +7152,19 @@ def delete_model_set( # ### Get information about all model sets. # - # GET /model_sets -> Sequence[models.ModelSet] + # GET /model_sets -> Sequence[mdls.ModelSet] def all_model_sets( self, # Requested fields. fields: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> Sequence[models.ModelSet]: + ) -> Sequence[mdls.ModelSet]: """Get All Model Sets""" response = cast( - Sequence[models.ModelSet], + Sequence[mdls.ModelSet], self.get( path="/model_sets", - structure=Sequence[models.ModelSet], + structure=Sequence[mdls.ModelSet], query_params={"fields": fields}, transport_options=transport_options, ), @@ -7143,18 +7173,18 @@ def all_model_sets( # ### Create a model set with the specified information. Model sets are used by Roles. # - # POST /model_sets -> models.ModelSet + # POST /model_sets -> mdls.ModelSet def create_model_set( self, - body: models.WriteModelSet, + body: mdls.WriteModelSet, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.ModelSet: + ) -> mdls.ModelSet: """Create Model Set""" response = cast( - models.ModelSet, + mdls.ModelSet, self.post( path="/model_sets", - structure=models.ModelSet, + structure=mdls.ModelSet, body=body, transport_options=transport_options, ), @@ -7163,17 +7193,17 @@ def create_model_set( # ### Get all supported permissions. # - # GET /permissions -> Sequence[models.Permission] + # GET /permissions -> Sequence[mdls.Permission] def all_permissions( self, transport_options: Optional[transport.TransportOptions] = None, - ) -> Sequence[models.Permission]: + ) -> Sequence[mdls.Permission]: """Get All Permissions""" response = cast( - Sequence[models.Permission], + Sequence[mdls.Permission], self.get( path="/permissions", - structure=Sequence[models.Permission], + structure=Sequence[mdls.Permission], transport_options=transport_options, ), ) @@ -7202,7 +7232,7 @@ def all_permissions( # # Boolean search params accept only "true" and "false" as values. # - # GET /permission_sets/search -> Sequence[models.PermissionSet] + # GET /permission_sets/search -> Sequence[mdls.PermissionSet] def search_permission_sets( self, # Requested fields. @@ -7224,13 +7254,13 @@ def search_permission_sets( # Combine given search criteria in a boolean OR expression. filter_or: Optional[bool] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> Sequence[models.PermissionSet]: + ) -> Sequence[mdls.PermissionSet]: """Search Permission Sets""" response = cast( - Sequence[models.PermissionSet], + Sequence[mdls.PermissionSet], self.get( path="/permission_sets/search", - structure=Sequence[models.PermissionSet], + structure=Sequence[mdls.PermissionSet], query_params={ "fields": fields, "limit": limit, @@ -7249,7 +7279,7 @@ def search_permission_sets( # ### Get information about the permission set with a specific id. # - # GET /permission_sets/{permission_set_id} -> models.PermissionSet + # GET /permission_sets/{permission_set_id} -> mdls.PermissionSet def permission_set( self, # Id of permission set @@ -7257,13 +7287,13 @@ def permission_set( # Requested fields. fields: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.PermissionSet: + ) -> mdls.PermissionSet: """Get Permission Set""" response = cast( - models.PermissionSet, + mdls.PermissionSet, self.get( path=f"/permission_sets/{permission_set_id}", - structure=models.PermissionSet, + structure=mdls.PermissionSet, query_params={"fields": fields}, transport_options=transport_options, ), @@ -7272,20 +7302,20 @@ def permission_set( # ### Update information about the permission set with a specific id. # - # PATCH /permission_sets/{permission_set_id} -> models.PermissionSet + # PATCH /permission_sets/{permission_set_id} -> mdls.PermissionSet def update_permission_set( self, # id of permission set permission_set_id: int, - body: models.WritePermissionSet, + body: mdls.WritePermissionSet, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.PermissionSet: + ) -> mdls.PermissionSet: """Update Permission Set""" response = cast( - models.PermissionSet, + mdls.PermissionSet, self.patch( path=f"/permission_sets/{permission_set_id}", - structure=models.PermissionSet, + structure=mdls.PermissionSet, body=body, transport_options=transport_options, ), @@ -7314,19 +7344,19 @@ def delete_permission_set( # ### Get information about all permission sets. # - # GET /permission_sets -> Sequence[models.PermissionSet] + # GET /permission_sets -> Sequence[mdls.PermissionSet] def all_permission_sets( self, # Requested fields. fields: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> Sequence[models.PermissionSet]: + ) -> Sequence[mdls.PermissionSet]: """Get All Permission Sets""" response = cast( - Sequence[models.PermissionSet], + Sequence[mdls.PermissionSet], self.get( path="/permission_sets", - structure=Sequence[models.PermissionSet], + structure=Sequence[mdls.PermissionSet], query_params={"fields": fields}, transport_options=transport_options, ), @@ -7335,18 +7365,18 @@ def all_permission_sets( # ### Create a permission set with the specified information. Permission sets are used by Roles. # - # POST /permission_sets -> models.PermissionSet + # POST /permission_sets -> mdls.PermissionSet def create_permission_set( self, - body: models.WritePermissionSet, + body: mdls.WritePermissionSet, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.PermissionSet: + ) -> mdls.PermissionSet: """Create Permission Set""" response = cast( - models.PermissionSet, + mdls.PermissionSet, self.post( path="/permission_sets", - structure=models.PermissionSet, + structure=mdls.PermissionSet, body=body, transport_options=transport_options, ), @@ -7355,21 +7385,21 @@ def create_permission_set( # ### Get information about all roles. # - # GET /roles -> Sequence[models.Role] + # GET /roles -> Sequence[mdls.Role] def all_roles( self, # Requested fields. fields: Optional[str] = None, # Optional list of ids to get specific roles. - ids: Optional[models.DelimSequence[int]] = None, + ids: Optional[mdls.DelimSequence[int]] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> Sequence[models.Role]: + ) -> Sequence[mdls.Role]: """Get All Roles""" response = cast( - Sequence[models.Role], + Sequence[mdls.Role], self.get( path="/roles", - structure=Sequence[models.Role], + structure=Sequence[mdls.Role], query_params={"fields": fields, "ids": ids}, transport_options=transport_options, ), @@ -7378,18 +7408,18 @@ def all_roles( # ### Create a role with the specified information. # - # POST /roles -> models.Role + # POST /roles -> mdls.Role def create_role( self, - body: models.WriteRole, + body: mdls.WriteRole, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.Role: + ) -> mdls.Role: """Create Role""" response = cast( - models.Role, + mdls.Role, self.post( path="/roles", - structure=models.Role, + structure=mdls.Role, body=body, transport_options=transport_options, ), @@ -7421,7 +7451,7 @@ def create_role( # # Boolean search params accept only "true" and "false" as values. # - # GET /roles/search -> Sequence[models.Role] + # GET /roles/search -> Sequence[mdls.Role] def search_roles( self, # Requested fields. @@ -7441,13 +7471,13 @@ def search_roles( # Combine given search criteria in a boolean OR expression. filter_or: Optional[bool] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> Sequence[models.Role]: + ) -> Sequence[mdls.Role]: """Search Roles""" response = cast( - Sequence[models.Role], + Sequence[mdls.Role], self.get( path="/roles/search", - structure=Sequence[models.Role], + structure=Sequence[mdls.Role], query_params={ "fields": fields, "limit": limit, @@ -7465,19 +7495,19 @@ def search_roles( # ### Get information about the role with a specific id. # - # GET /roles/{role_id} -> models.Role + # GET /roles/{role_id} -> mdls.Role def role( self, # id of role role_id: int, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.Role: + ) -> mdls.Role: """Get Role""" response = cast( - models.Role, + mdls.Role, self.get( path=f"/roles/{role_id}", - structure=models.Role, + structure=mdls.Role, transport_options=transport_options, ), ) @@ -7485,20 +7515,20 @@ def role( # ### Update information about the role with a specific id. # - # PATCH /roles/{role_id} -> models.Role + # PATCH /roles/{role_id} -> mdls.Role def update_role( self, # id of role role_id: int, - body: models.WriteRole, + body: mdls.WriteRole, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.Role: + ) -> mdls.Role: """Update Role""" response = cast( - models.Role, + mdls.Role, self.patch( path=f"/roles/{role_id}", - structure=models.Role, + structure=mdls.Role, body=body, transport_options=transport_options, ), @@ -7527,7 +7557,7 @@ def delete_role( # ### Get information about all the groups with the role that has a specific id. # - # GET /roles/{role_id}/groups -> Sequence[models.Group] + # GET /roles/{role_id}/groups -> Sequence[mdls.Group] def role_groups( self, # id of role @@ -7535,13 +7565,13 @@ def role_groups( # Requested fields. fields: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> Sequence[models.Group]: + ) -> Sequence[mdls.Group]: """Get Role Groups""" response = cast( - Sequence[models.Group], + Sequence[mdls.Group], self.get( path=f"/roles/{role_id}/groups", - structure=Sequence[models.Group], + structure=Sequence[mdls.Group], query_params={"fields": fields}, transport_options=transport_options, ), @@ -7550,20 +7580,20 @@ def role_groups( # ### Set all groups for a role, removing all existing group associations from that role. # - # PUT /roles/{role_id}/groups -> Sequence[models.Group] + # PUT /roles/{role_id}/groups -> Sequence[mdls.Group] def set_role_groups( self, # Id of Role role_id: int, body: Sequence[int], transport_options: Optional[transport.TransportOptions] = None, - ) -> Sequence[models.Group]: + ) -> Sequence[mdls.Group]: """Update Role Groups""" response = cast( - Sequence[models.Group], + Sequence[mdls.Group], self.put( path=f"/roles/{role_id}/groups", - structure=Sequence[models.Group], + structure=Sequence[mdls.Group], body=body, transport_options=transport_options, ), @@ -7572,7 +7602,7 @@ def set_role_groups( # ### Get information about all the users with the role that has a specific id. # - # GET /roles/{role_id}/users -> Sequence[models.User] + # GET /roles/{role_id}/users -> Sequence[mdls.User] def role_users( self, # id of user @@ -7582,13 +7612,13 @@ def role_users( # Get only users associated directly with the role: exclude those only associated through groups. direct_association_only: Optional[bool] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> Sequence[models.User]: + ) -> Sequence[mdls.User]: """Get Role Users""" response = cast( - Sequence[models.User], + Sequence[mdls.User], self.get( path=f"/roles/{role_id}/users", - structure=Sequence[models.User], + structure=Sequence[mdls.User], query_params={ "fields": fields, "direct_association_only": direct_association_only, @@ -7600,20 +7630,20 @@ def role_users( # ### Set all the users of the role with a specific id. # - # PUT /roles/{role_id}/users -> Sequence[models.User] + # PUT /roles/{role_id}/users -> Sequence[mdls.User] def set_role_users( self, # id of role role_id: int, body: Sequence[int], transport_options: Optional[transport.TransportOptions] = None, - ) -> Sequence[models.User]: + ) -> Sequence[mdls.User]: """Update Role Users""" response = cast( - Sequence[models.User], + Sequence[mdls.User], self.put( path=f"/roles/{role_id}/users", - structure=Sequence[models.User], + structure=Sequence[mdls.User], body=body, transport_options=transport_options, ), @@ -7628,7 +7658,7 @@ def set_role_users( # # Returns scheduled plans owned by the caller for a given space id. # - # GET /scheduled_plans/space/{space_id} -> Sequence[models.ScheduledPlan] + # GET /scheduled_plans/space/{space_id} -> Sequence[mdls.ScheduledPlan] def scheduled_plans_for_space( self, # Space Id @@ -7636,13 +7666,13 @@ def scheduled_plans_for_space( # Requested fields. fields: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> Sequence[models.ScheduledPlan]: + ) -> Sequence[mdls.ScheduledPlan]: """Scheduled Plans for Space""" response = cast( - Sequence[models.ScheduledPlan], + Sequence[mdls.ScheduledPlan], self.get( path=f"/scheduled_plans/space/{space_id}", - structure=Sequence[models.ScheduledPlan], + structure=Sequence[mdls.ScheduledPlan], query_params={"fields": fields}, transport_options=transport_options, ), @@ -7653,7 +7683,7 @@ def scheduled_plans_for_space( # # Admins can fetch information about other users' Scheduled Plans. # - # GET /scheduled_plans/{scheduled_plan_id} -> models.ScheduledPlan + # GET /scheduled_plans/{scheduled_plan_id} -> mdls.ScheduledPlan def scheduled_plan( self, # Scheduled Plan Id @@ -7661,13 +7691,13 @@ def scheduled_plan( # Requested fields. fields: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.ScheduledPlan: + ) -> mdls.ScheduledPlan: """Get Scheduled Plan""" response = cast( - models.ScheduledPlan, + mdls.ScheduledPlan, self.get( path=f"/scheduled_plans/{scheduled_plan_id}", - structure=models.ScheduledPlan, + structure=mdls.ScheduledPlan, query_params={"fields": fields}, transport_options=transport_options, ), @@ -7717,20 +7747,20 @@ def scheduled_plan( # # Valid formats vary by destination type and source object. `wysiwyg_pdf` is only valid for dashboards, for example. # - # PATCH /scheduled_plans/{scheduled_plan_id} -> models.ScheduledPlan + # PATCH /scheduled_plans/{scheduled_plan_id} -> mdls.ScheduledPlan def update_scheduled_plan( self, # Scheduled Plan Id scheduled_plan_id: int, - body: models.WriteScheduledPlan, + body: mdls.WriteScheduledPlan, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.ScheduledPlan: + ) -> mdls.ScheduledPlan: """Update Scheduled Plan""" response = cast( - models.ScheduledPlan, + mdls.ScheduledPlan, self.patch( path=f"/scheduled_plans/{scheduled_plan_id}", - structure=models.ScheduledPlan, + structure=mdls.ScheduledPlan, body=body, transport_options=transport_options, ), @@ -7773,7 +7803,7 @@ def delete_scheduled_plan( # # The caller must have `see_schedules` permission to see other users' scheduled plans. # - # GET /scheduled_plans -> Sequence[models.ScheduledPlan] + # GET /scheduled_plans -> Sequence[mdls.ScheduledPlan] def all_scheduled_plans( self, # Return scheduled plans belonging to this user_id. If not provided, returns scheduled plans owned by the caller. @@ -7783,13 +7813,13 @@ def all_scheduled_plans( # Return scheduled plans belonging to all users (caller needs see_schedules permission) all_users: Optional[bool] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> Sequence[models.ScheduledPlan]: + ) -> Sequence[mdls.ScheduledPlan]: """Get All Scheduled Plans""" response = cast( - Sequence[models.ScheduledPlan], + Sequence[mdls.ScheduledPlan], self.get( path="/scheduled_plans", - structure=Sequence[models.ScheduledPlan], + structure=Sequence[mdls.ScheduledPlan], query_params={ "user_id": user_id, "fields": fields, @@ -7859,18 +7889,18 @@ def all_scheduled_plans( # # Valid formats vary by destination type and source object. `wysiwyg_pdf` is only valid for dashboards, for example. # - # POST /scheduled_plans -> models.ScheduledPlan + # POST /scheduled_plans -> mdls.ScheduledPlan def create_scheduled_plan( self, - body: models.WriteScheduledPlan, + body: mdls.WriteScheduledPlan, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.ScheduledPlan: + ) -> mdls.ScheduledPlan: """Create Scheduled Plan""" response = cast( - models.ScheduledPlan, + mdls.ScheduledPlan, self.post( path="/scheduled_plans", - structure=models.ScheduledPlan, + structure=mdls.ScheduledPlan, body=body, transport_options=transport_options, ), @@ -7915,18 +7945,18 @@ def create_scheduled_plan( # # Valid formats vary by destination type and source object. `wysiwyg_pdf` is only valid for dashboards, for example. # - # POST /scheduled_plans/run_once -> models.ScheduledPlan + # POST /scheduled_plans/run_once -> mdls.ScheduledPlan def scheduled_plan_run_once( self, - body: models.WriteScheduledPlan, + body: mdls.WriteScheduledPlan, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.ScheduledPlan: + ) -> mdls.ScheduledPlan: """Run Scheduled Plan Once""" response = cast( - models.ScheduledPlan, + mdls.ScheduledPlan, self.post( path="/scheduled_plans/run_once", - structure=models.ScheduledPlan, + structure=mdls.ScheduledPlan, body=body, transport_options=transport_options, ), @@ -7945,7 +7975,7 @@ def scheduled_plan_run_once( # # The caller must have `see_schedules` permission to see other users' scheduled plans. # - # GET /scheduled_plans/look/{look_id} -> Sequence[models.ScheduledPlan] + # GET /scheduled_plans/look/{look_id} -> Sequence[mdls.ScheduledPlan] def scheduled_plans_for_look( self, # Look Id @@ -7957,13 +7987,13 @@ def scheduled_plans_for_look( # Return scheduled plans belonging to all users for the look all_users: Optional[bool] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> Sequence[models.ScheduledPlan]: + ) -> Sequence[mdls.ScheduledPlan]: """Scheduled Plans for Look""" response = cast( - Sequence[models.ScheduledPlan], + Sequence[mdls.ScheduledPlan], self.get( path=f"/scheduled_plans/look/{look_id}", - structure=Sequence[models.ScheduledPlan], + structure=Sequence[mdls.ScheduledPlan], query_params={ "user_id": user_id, "fields": fields, @@ -7986,7 +8016,7 @@ def scheduled_plans_for_look( # # The caller must have `see_schedules` permission to see other users' scheduled plans. # - # GET /scheduled_plans/dashboard/{dashboard_id} -> Sequence[models.ScheduledPlan] + # GET /scheduled_plans/dashboard/{dashboard_id} -> Sequence[mdls.ScheduledPlan] def scheduled_plans_for_dashboard( self, # Dashboard Id @@ -7998,13 +8028,13 @@ def scheduled_plans_for_dashboard( # Requested fields. fields: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> Sequence[models.ScheduledPlan]: + ) -> Sequence[mdls.ScheduledPlan]: """Scheduled Plans for Dashboard""" response = cast( - Sequence[models.ScheduledPlan], + Sequence[mdls.ScheduledPlan], self.get( path=f"/scheduled_plans/dashboard/{dashboard_id}", - structure=Sequence[models.ScheduledPlan], + structure=Sequence[mdls.ScheduledPlan], query_params={ "user_id": user_id, "all_users": all_users, @@ -8027,7 +8057,7 @@ def scheduled_plans_for_dashboard( # # The caller must have `see_schedules` permission to see other users' scheduled plans. # - # GET /scheduled_plans/lookml_dashboard/{lookml_dashboard_id} -> Sequence[models.ScheduledPlan] + # GET /scheduled_plans/lookml_dashboard/{lookml_dashboard_id} -> Sequence[mdls.ScheduledPlan] def scheduled_plans_for_lookml_dashboard( self, # LookML Dashboard Id @@ -8039,14 +8069,14 @@ def scheduled_plans_for_lookml_dashboard( # Return scheduled plans belonging to all users for the dashboard all_users: Optional[bool] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> Sequence[models.ScheduledPlan]: + ) -> Sequence[mdls.ScheduledPlan]: """Scheduled Plans for LookML Dashboard""" lookml_dashboard_id = self.encode_path_param(lookml_dashboard_id) response = cast( - Sequence[models.ScheduledPlan], + Sequence[mdls.ScheduledPlan], self.get( path=f"/scheduled_plans/lookml_dashboard/{lookml_dashboard_id}", - structure=Sequence[models.ScheduledPlan], + structure=Sequence[mdls.ScheduledPlan], query_params={ "user_id": user_id, "fields": fields, @@ -8105,20 +8135,20 @@ def scheduled_plans_for_lookml_dashboard( # # This API is rate limited to prevent it from being used for relay spam or DoS attacks # - # POST /scheduled_plans/{scheduled_plan_id}/run_once -> models.ScheduledPlan + # POST /scheduled_plans/{scheduled_plan_id}/run_once -> mdls.ScheduledPlan def scheduled_plan_run_once_by_id( self, # Id of schedule plan to copy and run scheduled_plan_id: int, - body: Optional[models.WriteScheduledPlan] = None, + body: Optional[mdls.WriteScheduledPlan] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.ScheduledPlan: + ) -> mdls.ScheduledPlan: """Run Scheduled Plan Once by Id""" response = cast( - models.ScheduledPlan, + mdls.ScheduledPlan, self.post( path=f"/scheduled_plans/{scheduled_plan_id}/run_once", - structure=models.ScheduledPlan, + structure=mdls.ScheduledPlan, body=body, transport_options=transport_options, ), @@ -8133,17 +8163,17 @@ def scheduled_plan_run_once_by_id( # # Returns information about the current API session, such as which workspace is selected for the session. # - # GET /session -> models.ApiSession + # GET /session -> mdls.ApiSession def session( self, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.ApiSession: + ) -> mdls.ApiSession: """Get Session""" response = cast( - models.ApiSession, + mdls.ApiSession, self.get( path="/session", - structure=models.ApiSession, + structure=mdls.ApiSession, transport_options=transport_options, ), ) @@ -8170,18 +8200,18 @@ def session( # If your Looker API client application needs to work in a dev workspace across multiple # API sessions, be sure to select the dev workspace after each login. # - # PATCH /session -> models.ApiSession + # PATCH /session -> mdls.ApiSession def update_session( self, - body: models.WriteApiSession, + body: mdls.WriteApiSession, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.ApiSession: + ) -> mdls.ApiSession: """Update Session""" response = cast( - models.ApiSession, + mdls.ApiSession, self.patch( path="/session", - structure=models.ApiSession, + structure=mdls.ApiSession, body=body, transport_options=transport_options, ), @@ -8222,7 +8252,7 @@ def update_session( # # Get a **single space** by id with [Space](#!/Space/space) # - # GET /spaces/search -> Sequence[models.Space] + # GET /spaces/search -> Sequence[mdls.Space] def search_spaces( self, # Requested fields. @@ -8250,13 +8280,13 @@ def search_spaces( # Match is shared root is_shared_root: Optional[bool] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> Sequence[models.Space]: + ) -> Sequence[mdls.Space]: """Search Spaces""" response = cast( - Sequence[models.Space], + Sequence[mdls.Space], self.get( path="/spaces/search", - structure=Sequence[models.Space], + structure=Sequence[mdls.Space], query_params={ "fields": fields, "page": page, @@ -8278,7 +8308,7 @@ def search_spaces( # ### Get information about the space with a specific id. # - # GET /spaces/{space_id} -> models.Space + # GET /spaces/{space_id} -> mdls.Space def space( self, # Id of space @@ -8286,14 +8316,14 @@ def space( # Requested fields. fields: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.Space: + ) -> mdls.Space: """Get Space""" space_id = self.encode_path_param(space_id) response = cast( - models.Space, + mdls.Space, self.get( path=f"/spaces/{space_id}", - structure=models.Space, + structure=mdls.Space, query_params={"fields": fields}, transport_options=transport_options, ), @@ -8302,21 +8332,21 @@ def space( # ### Update the space with a specific id. # - # PATCH /spaces/{space_id} -> models.Space + # PATCH /spaces/{space_id} -> mdls.Space def update_space( self, # Id of space space_id: str, - body: models.UpdateSpace, + body: mdls.UpdateSpace, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.Space: + ) -> mdls.Space: """Update Space""" space_id = self.encode_path_param(space_id) response = cast( - models.Space, + mdls.Space, self.patch( path=f"/spaces/{space_id}", - structure=models.Space, + structure=mdls.Space, body=body, transport_options=transport_options, ), @@ -8350,19 +8380,19 @@ def delete_space( # In API 3.x, this will not return empty personal spaces, unless they belong to the calling user. # In API 4.0+, all personal spaces will be returned. # - # GET /spaces -> Sequence[models.SpaceBase] + # GET /spaces -> Sequence[mdls.SpaceBase] def all_spaces( self, # Requested fields. fields: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> Sequence[models.SpaceBase]: + ) -> Sequence[mdls.SpaceBase]: """Get All Spaces""" response = cast( - Sequence[models.SpaceBase], + Sequence[mdls.SpaceBase], self.get( path="/spaces", - structure=Sequence[models.SpaceBase], + structure=Sequence[mdls.SpaceBase], query_params={"fields": fields}, transport_options=transport_options, ), @@ -8374,18 +8404,18 @@ def all_spaces( # Caller must have permission to edit the parent space and to create spaces, otherwise the request # returns 404 Not Found. # - # POST /spaces -> models.Space + # POST /spaces -> mdls.Space def create_space( self, - body: models.CreateSpace, + body: mdls.CreateSpace, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.Space: + ) -> mdls.Space: """Create Space""" response = cast( - models.Space, + mdls.Space, self.post( path="/spaces", - structure=models.Space, + structure=mdls.Space, body=body, transport_options=transport_options, ), @@ -8394,7 +8424,7 @@ def create_space( # ### Get the children of a space. # - # GET /spaces/{space_id}/children -> Sequence[models.Space] + # GET /spaces/{space_id}/children -> Sequence[mdls.Space] def space_children( self, # Id of space @@ -8408,14 +8438,14 @@ def space_children( # Fields to sort by. sorts: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> Sequence[models.Space]: + ) -> Sequence[mdls.Space]: """Get Space Children""" space_id = self.encode_path_param(space_id) response = cast( - Sequence[models.Space], + Sequence[mdls.Space], self.get( path=f"/spaces/{space_id}/children", - structure=Sequence[models.Space], + structure=Sequence[mdls.Space], query_params={ "fields": fields, "page": page, @@ -8429,7 +8459,7 @@ def space_children( # ### Search the children of a space # - # GET /spaces/{space_id}/children/search -> Sequence[models.Space] + # GET /spaces/{space_id}/children/search -> Sequence[mdls.Space] def space_children_search( self, # Id of space @@ -8441,14 +8471,14 @@ def space_children_search( # Match Space name. name: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> Sequence[models.Space]: + ) -> Sequence[mdls.Space]: """Search Space Children""" space_id = self.encode_path_param(space_id) response = cast( - Sequence[models.Space], + Sequence[mdls.Space], self.get( path=f"/spaces/{space_id}/children/search", - structure=Sequence[models.Space], + structure=Sequence[mdls.Space], query_params={"fields": fields, "sorts": sorts, "name": name}, transport_options=transport_options, ), @@ -8457,7 +8487,7 @@ def space_children_search( # ### Get the parent of a space # - # GET /spaces/{space_id}/parent -> models.Space + # GET /spaces/{space_id}/parent -> mdls.Space def space_parent( self, # Id of space @@ -8465,14 +8495,14 @@ def space_parent( # Requested fields. fields: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.Space: + ) -> mdls.Space: """Get Space Parent""" space_id = self.encode_path_param(space_id) response = cast( - models.Space, + mdls.Space, self.get( path=f"/spaces/{space_id}/parent", - structure=models.Space, + structure=mdls.Space, query_params={"fields": fields}, transport_options=transport_options, ), @@ -8481,7 +8511,7 @@ def space_parent( # ### Get the ancestors of a space # - # GET /spaces/{space_id}/ancestors -> Sequence[models.Space] + # GET /spaces/{space_id}/ancestors -> Sequence[mdls.Space] def space_ancestors( self, # Id of space @@ -8489,14 +8519,14 @@ def space_ancestors( # Requested fields. fields: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> Sequence[models.Space]: + ) -> Sequence[mdls.Space]: """Get Space Ancestors""" space_id = self.encode_path_param(space_id) response = cast( - Sequence[models.Space], + Sequence[mdls.Space], self.get( path=f"/spaces/{space_id}/ancestors", - structure=Sequence[models.Space], + structure=Sequence[mdls.Space], query_params={"fields": fields}, transport_options=transport_options, ), @@ -8507,7 +8537,7 @@ def space_ancestors( # In API 3.x, this will return all looks in a space, including looks in the trash. # In API 4.0+, all looks in a space will be returned, excluding looks in the trash. # - # GET /spaces/{space_id}/looks -> Sequence[models.LookWithQuery] + # GET /spaces/{space_id}/looks -> Sequence[mdls.LookWithQuery] def space_looks( self, # Id of space @@ -8515,14 +8545,14 @@ def space_looks( # Requested fields. fields: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> Sequence[models.LookWithQuery]: + ) -> Sequence[mdls.LookWithQuery]: """Get Space Looks""" space_id = self.encode_path_param(space_id) response = cast( - Sequence[models.LookWithQuery], + Sequence[mdls.LookWithQuery], self.get( path=f"/spaces/{space_id}/looks", - structure=Sequence[models.LookWithQuery], + structure=Sequence[mdls.LookWithQuery], query_params={"fields": fields}, transport_options=transport_options, ), @@ -8531,7 +8561,7 @@ def space_looks( # ### Get the dashboards in a space # - # GET /spaces/{space_id}/dashboards -> Sequence[models.Dashboard] + # GET /spaces/{space_id}/dashboards -> Sequence[mdls.Dashboard] def space_dashboards( self, # Id of space @@ -8539,14 +8569,14 @@ def space_dashboards( # Requested fields. fields: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> Sequence[models.Dashboard]: + ) -> Sequence[mdls.Dashboard]: """Get Space Dashboards""" space_id = self.encode_path_param(space_id) response = cast( - Sequence[models.Dashboard], + Sequence[mdls.Dashboard], self.get( path=f"/spaces/{space_id}/dashboards", - structure=Sequence[models.Dashboard], + structure=Sequence[mdls.Dashboard], query_params={"fields": fields}, transport_options=transport_options, ), @@ -8565,19 +8595,19 @@ def space_dashboards( # # **Note**: Custom themes needs to be enabled by Looker. Unless custom themes are enabled, only the automatically generated default theme can be used. Please contact your Account Manager or help.looker.com to update your license for this feature. # - # GET /themes -> Sequence[models.Theme] + # GET /themes -> Sequence[mdls.Theme] def all_themes( self, # Requested fields. fields: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> Sequence[models.Theme]: + ) -> Sequence[mdls.Theme]: """Get All Themes""" response = cast( - Sequence[models.Theme], + Sequence[mdls.Theme], self.get( path="/themes", - structure=Sequence[models.Theme], + structure=Sequence[mdls.Theme], query_params={"fields": fields}, transport_options=transport_options, ), @@ -8600,18 +8630,18 @@ def all_themes( # # **Note**: Custom themes needs to be enabled by Looker. Unless custom themes are enabled, only the automatically generated default theme can be used. Please contact your Account Manager or help.looker.com to update your license for this feature. # - # POST /themes -> models.Theme + # POST /themes -> mdls.Theme def create_theme( self, - body: models.WriteTheme, + body: mdls.WriteTheme, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.Theme: + ) -> mdls.Theme: """Create Theme""" response = cast( - models.Theme, + mdls.Theme, self.post( path="/themes", - structure=models.Theme, + structure=mdls.Theme, body=body, transport_options=transport_options, ), @@ -8657,7 +8687,7 @@ def create_theme( # # **Note**: Custom themes needs to be enabled by Looker. Unless custom themes are enabled, only the automatically generated default theme can be used. Please contact your Account Manager or help.looker.com to update your license for this feature. # - # GET /themes/search -> Sequence[models.Theme] + # GET /themes/search -> Sequence[mdls.Theme] def search_themes( self, # Match theme id. @@ -8679,13 +8709,13 @@ def search_themes( # Combine given search criteria in a boolean OR expression filter_or: Optional[bool] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> Sequence[models.Theme]: + ) -> Sequence[mdls.Theme]: """Search Themes""" response = cast( - Sequence[models.Theme], + Sequence[mdls.Theme], self.get( path="/themes/search", - structure=Sequence[models.Theme], + structure=Sequence[mdls.Theme], query_params={ "id": id, "name": name, @@ -8710,19 +8740,19 @@ def search_themes( # # The optional `ts` parameter can specify a different timestamp than "now." If specified, it returns the default theme at the time indicated. # - # GET /themes/default -> models.Theme + # GET /themes/default -> mdls.Theme def default_theme( self, # Timestamp representing the target datetime for the active period. Defaults to 'now' ts: Optional[datetime.datetime] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.Theme: + ) -> mdls.Theme: """Get Default Theme""" response = cast( - models.Theme, + mdls.Theme, self.get( path="/themes/default", - structure=models.Theme, + structure=mdls.Theme, query_params={"ts": ts}, transport_options=transport_options, ), @@ -8741,19 +8771,19 @@ def default_theme( # # **Note**: Custom themes needs to be enabled by Looker. Unless custom themes are enabled, only the automatically generated default theme can be used. Please contact your Account Manager or help.looker.com to update your license for this feature. # - # PUT /themes/default -> models.Theme + # PUT /themes/default -> mdls.Theme def set_default_theme( self, # Name of theme to set as default name: str, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.Theme: + ) -> mdls.Theme: """Set Default Theme""" response = cast( - models.Theme, + mdls.Theme, self.put( path="/themes/default", - structure=models.Theme, + structure=mdls.Theme, query_params={"name": name}, transport_options=transport_options, ), @@ -8770,7 +8800,7 @@ def set_default_theme( # # **Note**: Custom themes needs to be enabled by Looker. Unless custom themes are enabled, only the automatically generated default theme can be used. Please contact your Account Manager or help.looker.com to update your license for this feature. # - # GET /themes/active -> Sequence[models.Theme] + # GET /themes/active -> Sequence[mdls.Theme] def active_themes( self, # Name of theme @@ -8780,13 +8810,13 @@ def active_themes( # Requested fields. fields: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> Sequence[models.Theme]: + ) -> Sequence[mdls.Theme]: """Get Active Themes""" response = cast( - Sequence[models.Theme], + Sequence[mdls.Theme], self.get( path="/themes/active", - structure=Sequence[models.Theme], + structure=Sequence[mdls.Theme], query_params={"name": name, "ts": ts, "fields": fields}, transport_options=transport_options, ), @@ -8800,7 +8830,7 @@ def active_themes( # # **Note**: Custom themes needs to be enabled by Looker. Unless custom themes are enabled, only the automatically generated default theme can be used. Please contact your Account Manager or help.looker.com to update your license for this feature. # - # GET /themes/theme_or_default -> models.Theme + # GET /themes/theme_or_default -> mdls.Theme def theme_or_default( self, # Name of theme @@ -8808,13 +8838,13 @@ def theme_or_default( # Timestamp representing the target datetime for the active period. Defaults to 'now' ts: Optional[datetime.datetime] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.Theme: + ) -> mdls.Theme: """Get Theme or Default""" response = cast( - models.Theme, + mdls.Theme, self.get( path="/themes/theme_or_default", - structure=models.Theme, + structure=mdls.Theme, query_params={"name": name, "ts": ts}, transport_options=transport_options, ), @@ -8829,18 +8859,18 @@ def theme_or_default( # # **Note**: Custom themes needs to be enabled by Looker. Unless custom themes are enabled, only the automatically generated default theme can be used. Please contact your Account Manager or help.looker.com to update your license for this feature. # - # POST /themes/validate -> models.ValidationError + # POST /themes/validate -> mdls.ValidationError def validate_theme( self, - body: models.WriteTheme, + body: mdls.WriteTheme, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.ValidationError: + ) -> mdls.ValidationError: """Validate Theme""" response = cast( - models.ValidationError, + mdls.ValidationError, self.post( path="/themes/validate", - structure=models.ValidationError, + structure=mdls.ValidationError, body=body, transport_options=transport_options, ), @@ -8853,7 +8883,7 @@ def validate_theme( # # **Note**: Custom themes needs to be enabled by Looker. Unless custom themes are enabled, only the automatically generated default theme can be used. Please contact your Account Manager or help.looker.com to update your license for this feature. # - # GET /themes/{theme_id} -> models.Theme + # GET /themes/{theme_id} -> mdls.Theme def theme( self, # Id of theme @@ -8861,14 +8891,14 @@ def theme( # Requested fields. fields: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.Theme: + ) -> mdls.Theme: """Get Theme""" theme_id = self.encode_path_param(theme_id) response = cast( - models.Theme, + mdls.Theme, self.get( path=f"/themes/{theme_id}", - structure=models.Theme, + structure=mdls.Theme, query_params={"fields": fields}, transport_options=transport_options, ), @@ -8879,21 +8909,21 @@ def theme( # # **Note**: Custom themes needs to be enabled by Looker. Unless custom themes are enabled, only the automatically generated default theme can be used. Please contact your Account Manager or help.looker.com to update your license for this feature. # - # PATCH /themes/{theme_id} -> models.Theme + # PATCH /themes/{theme_id} -> mdls.Theme def update_theme( self, # Id of theme theme_id: str, - body: models.WriteTheme, + body: mdls.WriteTheme, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.Theme: + ) -> mdls.Theme: """Update Theme""" theme_id = self.encode_path_param(theme_id) response = cast( - models.Theme, + mdls.Theme, self.patch( path=f"/themes/{theme_id}", - structure=models.Theme, + structure=mdls.Theme, body=body, transport_options=transport_options, ), @@ -8935,19 +8965,19 @@ def delete_theme( # ### Get information about the current user; i.e. the user account currently calling the API. # - # GET /user -> models.User + # GET /user -> mdls.User def me( self, # Requested fields. fields: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.User: + ) -> mdls.User: """Get Current User""" response = cast( - models.User, + mdls.User, self.get( path="/user", - structure=models.User, + structure=mdls.User, query_params={"fields": fields}, transport_options=transport_options, ), @@ -8956,7 +8986,7 @@ def me( # ### Get information about all users. # - # GET /users -> Sequence[models.User] + # GET /users -> Sequence[mdls.User] def all_users( self, # Requested fields. @@ -8968,15 +8998,15 @@ def all_users( # Fields to sort by. sorts: Optional[str] = None, # Optional list of ids to get specific users. - ids: Optional[models.DelimSequence[int]] = None, + ids: Optional[mdls.DelimSequence[int]] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> Sequence[models.User]: + ) -> Sequence[mdls.User]: """Get All Users""" response = cast( - Sequence[models.User], + Sequence[mdls.User], self.get( path="/users", - structure=Sequence[models.User], + structure=Sequence[mdls.User], query_params={ "fields": fields, "page": page, @@ -8991,20 +9021,20 @@ def all_users( # ### Create a user with the specified information. # - # POST /users -> models.User + # POST /users -> mdls.User def create_user( self, - body: Optional[models.WriteUser] = None, + body: Optional[mdls.WriteUser] = None, # Requested fields. fields: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.User: + ) -> mdls.User: """Create User""" response = cast( - models.User, + mdls.User, self.post( path="/users", - structure=models.User, + structure=mdls.User, query_params={"fields": fields}, body=body, transport_options=transport_options, @@ -9043,7 +9073,7 @@ def create_user( # names of other users but no details; normal users in a closed system can only see # names of other users who are members of the same group as the user. # - # GET /users/search -> Sequence[models.User] + # GET /users/search -> Sequence[mdls.User] def search_users( self, # Include only these fields in the response @@ -9075,13 +9105,13 @@ def search_users( # Search for users who are direct members of this group group_id: Optional[int] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> Sequence[models.User]: + ) -> Sequence[mdls.User]: """Search Users""" response = cast( - Sequence[models.User], + Sequence[mdls.User], self.get( path="/users/search", - structure=Sequence[models.User], + structure=Sequence[mdls.User], query_params={ "fields": fields, "page": page, @@ -9110,7 +9140,7 @@ def search_users( # # Any additional search params will be combined into a logical AND expression. # - # GET /users/search/names/{pattern} -> Sequence[models.User] + # GET /users/search/names/{pattern} -> Sequence[mdls.User] def search_users_names( self, # Pattern to match @@ -9136,14 +9166,14 @@ def search_users_names( # Include or exclude disabled accounts in the results is_disabled: Optional[bool] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> Sequence[models.User]: + ) -> Sequence[mdls.User]: """Search User Names""" pattern = self.encode_path_param(pattern) response = cast( - Sequence[models.User], + Sequence[mdls.User], self.get( path=f"/users/search/names/{pattern}", - structure=Sequence[models.User], + structure=Sequence[mdls.User], query_params={ "fields": fields, "page": page, @@ -9167,7 +9197,7 @@ def search_users_names( # be returned. Otherwise, a minimal 'public' variant of the user information will be returned. This contains # The user name and avatar url, but no sensitive information. # - # GET /users/{user_id} -> models.User + # GET /users/{user_id} -> mdls.User def user( self, # Id of user @@ -9175,13 +9205,13 @@ def user( # Requested fields. fields: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.User: + ) -> mdls.User: """Get User by Id""" response = cast( - models.User, + mdls.User, self.get( path=f"/users/{user_id}", - structure=models.User, + structure=mdls.User, query_params={"fields": fields}, transport_options=transport_options, ), @@ -9190,22 +9220,22 @@ def user( # ### Update information about the user with a specific id. # - # PATCH /users/{user_id} -> models.User + # PATCH /users/{user_id} -> mdls.User def update_user( self, # Id of user user_id: int, - body: models.WriteUser, + body: mdls.WriteUser, # Requested fields. fields: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.User: + ) -> mdls.User: """Update User""" response = cast( - models.User, + mdls.User, self.patch( path=f"/users/{user_id}", - structure=models.User, + structure=mdls.User, query_params={"fields": fields}, body=body, transport_options=transport_options, @@ -9264,7 +9294,7 @@ def delete_user( # # **NOTE**: The 'api' credential type was only used with the legacy Looker query API and is no longer supported. The credential type for API you are currently looking at is 'api3'. # - # GET /users/credential/{credential_type}/{credential_id} -> models.User + # GET /users/credential/{credential_type}/{credential_id} -> mdls.User def user_for_credential( self, # Type name of credential @@ -9274,15 +9304,15 @@ def user_for_credential( # Requested fields. fields: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.User: + ) -> mdls.User: """Get User by Credential Id""" credential_type = self.encode_path_param(credential_type) credential_id = self.encode_path_param(credential_id) response = cast( - models.User, + mdls.User, self.get( path=f"/users/credential/{credential_type}/{credential_id}", - structure=models.User, + structure=mdls.User, query_params={"fields": fields}, transport_options=transport_options, ), @@ -9291,7 +9321,7 @@ def user_for_credential( # ### Email/password login information for the specified user. # - # GET /users/{user_id}/credentials_email -> models.CredentialsEmail + # GET /users/{user_id}/credentials_email -> mdls.CredentialsEmail def user_credentials_email( self, # id of user @@ -9299,13 +9329,13 @@ def user_credentials_email( # Requested fields. fields: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.CredentialsEmail: + ) -> mdls.CredentialsEmail: """Get Email/Password Credential""" response = cast( - models.CredentialsEmail, + mdls.CredentialsEmail, self.get( path=f"/users/{user_id}/credentials_email", - structure=models.CredentialsEmail, + structure=mdls.CredentialsEmail, query_params={"fields": fields}, transport_options=transport_options, ), @@ -9314,22 +9344,22 @@ def user_credentials_email( # ### Email/password login information for the specified user. # - # POST /users/{user_id}/credentials_email -> models.CredentialsEmail + # POST /users/{user_id}/credentials_email -> mdls.CredentialsEmail def create_user_credentials_email( self, # id of user user_id: int, - body: models.WriteCredentialsEmail, + body: mdls.WriteCredentialsEmail, # Requested fields. fields: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.CredentialsEmail: + ) -> mdls.CredentialsEmail: """Create Email/Password Credential""" response = cast( - models.CredentialsEmail, + mdls.CredentialsEmail, self.post( path=f"/users/{user_id}/credentials_email", - structure=models.CredentialsEmail, + structure=mdls.CredentialsEmail, query_params={"fields": fields}, body=body, transport_options=transport_options, @@ -9339,22 +9369,22 @@ def create_user_credentials_email( # ### Email/password login information for the specified user. # - # PATCH /users/{user_id}/credentials_email -> models.CredentialsEmail + # PATCH /users/{user_id}/credentials_email -> mdls.CredentialsEmail def update_user_credentials_email( self, # id of user user_id: int, - body: models.WriteCredentialsEmail, + body: mdls.WriteCredentialsEmail, # Requested fields. fields: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.CredentialsEmail: + ) -> mdls.CredentialsEmail: """Update Email/Password Credential""" response = cast( - models.CredentialsEmail, + mdls.CredentialsEmail, self.patch( path=f"/users/{user_id}/credentials_email", - structure=models.CredentialsEmail, + structure=mdls.CredentialsEmail, query_params={"fields": fields}, body=body, transport_options=transport_options, @@ -9384,7 +9414,7 @@ def delete_user_credentials_email( # ### Two-factor login information for the specified user. # - # GET /users/{user_id}/credentials_totp -> models.CredentialsTotp + # GET /users/{user_id}/credentials_totp -> mdls.CredentialsTotp def user_credentials_totp( self, # id of user @@ -9392,13 +9422,13 @@ def user_credentials_totp( # Requested fields. fields: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.CredentialsTotp: + ) -> mdls.CredentialsTotp: """Get Two-Factor Credential""" response = cast( - models.CredentialsTotp, + mdls.CredentialsTotp, self.get( path=f"/users/{user_id}/credentials_totp", - structure=models.CredentialsTotp, + structure=mdls.CredentialsTotp, query_params={"fields": fields}, transport_options=transport_options, ), @@ -9407,22 +9437,22 @@ def user_credentials_totp( # ### Two-factor login information for the specified user. # - # POST /users/{user_id}/credentials_totp -> models.CredentialsTotp + # POST /users/{user_id}/credentials_totp -> mdls.CredentialsTotp def create_user_credentials_totp( self, # id of user user_id: int, - body: Optional[models.CredentialsTotp] = None, + body: Optional[mdls.CredentialsTotp] = None, # Requested fields. fields: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.CredentialsTotp: + ) -> mdls.CredentialsTotp: """Create Two-Factor Credential""" response = cast( - models.CredentialsTotp, + mdls.CredentialsTotp, self.post( path=f"/users/{user_id}/credentials_totp", - structure=models.CredentialsTotp, + structure=mdls.CredentialsTotp, query_params={"fields": fields}, body=body, transport_options=transport_options, @@ -9452,7 +9482,7 @@ def delete_user_credentials_totp( # ### LDAP login information for the specified user. # - # GET /users/{user_id}/credentials_ldap -> models.CredentialsLDAP + # GET /users/{user_id}/credentials_ldap -> mdls.CredentialsLDAP def user_credentials_ldap( self, # id of user @@ -9460,13 +9490,13 @@ def user_credentials_ldap( # Requested fields. fields: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.CredentialsLDAP: + ) -> mdls.CredentialsLDAP: """Get LDAP Credential""" response = cast( - models.CredentialsLDAP, + mdls.CredentialsLDAP, self.get( path=f"/users/{user_id}/credentials_ldap", - structure=models.CredentialsLDAP, + structure=mdls.CredentialsLDAP, query_params={"fields": fields}, transport_options=transport_options, ), @@ -9495,7 +9525,7 @@ def delete_user_credentials_ldap( # ### Google authentication login information for the specified user. # - # GET /users/{user_id}/credentials_google -> models.CredentialsGoogle + # GET /users/{user_id}/credentials_google -> mdls.CredentialsGoogle def user_credentials_google( self, # id of user @@ -9503,13 +9533,13 @@ def user_credentials_google( # Requested fields. fields: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.CredentialsGoogle: + ) -> mdls.CredentialsGoogle: """Get Google Auth Credential""" response = cast( - models.CredentialsGoogle, + mdls.CredentialsGoogle, self.get( path=f"/users/{user_id}/credentials_google", - structure=models.CredentialsGoogle, + structure=mdls.CredentialsGoogle, query_params={"fields": fields}, transport_options=transport_options, ), @@ -9538,7 +9568,7 @@ def delete_user_credentials_google( # ### Saml authentication login information for the specified user. # - # GET /users/{user_id}/credentials_saml -> models.CredentialsSaml + # GET /users/{user_id}/credentials_saml -> mdls.CredentialsSaml def user_credentials_saml( self, # id of user @@ -9546,13 +9576,13 @@ def user_credentials_saml( # Requested fields. fields: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.CredentialsSaml: + ) -> mdls.CredentialsSaml: """Get Saml Auth Credential""" response = cast( - models.CredentialsSaml, + mdls.CredentialsSaml, self.get( path=f"/users/{user_id}/credentials_saml", - structure=models.CredentialsSaml, + structure=mdls.CredentialsSaml, query_params={"fields": fields}, transport_options=transport_options, ), @@ -9581,7 +9611,7 @@ def delete_user_credentials_saml( # ### OpenID Connect (OIDC) authentication login information for the specified user. # - # GET /users/{user_id}/credentials_oidc -> models.CredentialsOIDC + # GET /users/{user_id}/credentials_oidc -> mdls.CredentialsOIDC def user_credentials_oidc( self, # id of user @@ -9589,13 +9619,13 @@ def user_credentials_oidc( # Requested fields. fields: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.CredentialsOIDC: + ) -> mdls.CredentialsOIDC: """Get OIDC Auth Credential""" response = cast( - models.CredentialsOIDC, + mdls.CredentialsOIDC, self.get( path=f"/users/{user_id}/credentials_oidc", - structure=models.CredentialsOIDC, + structure=mdls.CredentialsOIDC, query_params={"fields": fields}, transport_options=transport_options, ), @@ -9624,7 +9654,7 @@ def delete_user_credentials_oidc( # ### API 3 login information for the specified user. This is for the newer API keys that can be added for any user. # - # GET /users/{user_id}/credentials_api3/{credentials_api3_id} -> models.CredentialsApi3 + # GET /users/{user_id}/credentials_api3/{credentials_api3_id} -> mdls.CredentialsApi3 def user_credentials_api3( self, # Id of user @@ -9634,13 +9664,13 @@ def user_credentials_api3( # Requested fields. fields: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.CredentialsApi3: + ) -> mdls.CredentialsApi3: """Get API 3 Credential""" response = cast( - models.CredentialsApi3, + mdls.CredentialsApi3, self.get( path=f"/users/{user_id}/credentials_api3/{credentials_api3_id}", - structure=models.CredentialsApi3, + structure=mdls.CredentialsApi3, query_params={"fields": fields}, transport_options=transport_options, ), @@ -9671,7 +9701,7 @@ def delete_user_credentials_api3( # ### API 3 login information for the specified user. This is for the newer API keys that can be added for any user. # - # GET /users/{user_id}/credentials_api3 -> Sequence[models.CredentialsApi3] + # GET /users/{user_id}/credentials_api3 -> Sequence[mdls.CredentialsApi3] def all_user_credentials_api3s( self, # id of user @@ -9679,13 +9709,13 @@ def all_user_credentials_api3s( # Requested fields. fields: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> Sequence[models.CredentialsApi3]: + ) -> Sequence[mdls.CredentialsApi3]: """Get All API 3 Credentials""" response = cast( - Sequence[models.CredentialsApi3], + Sequence[mdls.CredentialsApi3], self.get( path=f"/users/{user_id}/credentials_api3", - structure=Sequence[models.CredentialsApi3], + structure=Sequence[mdls.CredentialsApi3], query_params={"fields": fields}, transport_options=transport_options, ), @@ -9694,22 +9724,22 @@ def all_user_credentials_api3s( # ### API 3 login information for the specified user. This is for the newer API keys that can be added for any user. # - # POST /users/{user_id}/credentials_api3 -> models.CredentialsApi3 + # POST /users/{user_id}/credentials_api3 -> mdls.CredentialsApi3 def create_user_credentials_api3( self, # id of user user_id: int, - body: Optional[models.CredentialsApi3] = None, + body: Optional[mdls.CredentialsApi3] = None, # Requested fields. fields: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.CredentialsApi3: + ) -> mdls.CredentialsApi3: """Create API 3 Credential""" response = cast( - models.CredentialsApi3, + mdls.CredentialsApi3, self.post( path=f"/users/{user_id}/credentials_api3", - structure=models.CredentialsApi3, + structure=mdls.CredentialsApi3, query_params={"fields": fields}, body=body, transport_options=transport_options, @@ -9719,7 +9749,7 @@ def create_user_credentials_api3( # ### Embed login information for the specified user. # - # GET /users/{user_id}/credentials_embed/{credentials_embed_id} -> models.CredentialsEmbed + # GET /users/{user_id}/credentials_embed/{credentials_embed_id} -> mdls.CredentialsEmbed def user_credentials_embed( self, # Id of user @@ -9729,13 +9759,13 @@ def user_credentials_embed( # Requested fields. fields: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.CredentialsEmbed: + ) -> mdls.CredentialsEmbed: """Get Embedding Credential""" response = cast( - models.CredentialsEmbed, + mdls.CredentialsEmbed, self.get( path=f"/users/{user_id}/credentials_embed/{credentials_embed_id}", - structure=models.CredentialsEmbed, + structure=mdls.CredentialsEmbed, query_params={"fields": fields}, transport_options=transport_options, ), @@ -9766,7 +9796,7 @@ def delete_user_credentials_embed( # ### Embed login information for the specified user. # - # GET /users/{user_id}/credentials_embed -> Sequence[models.CredentialsEmbed] + # GET /users/{user_id}/credentials_embed -> Sequence[mdls.CredentialsEmbed] def all_user_credentials_embeds( self, # id of user @@ -9774,13 +9804,13 @@ def all_user_credentials_embeds( # Requested fields. fields: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> Sequence[models.CredentialsEmbed]: + ) -> Sequence[mdls.CredentialsEmbed]: """Get All Embedding Credentials""" response = cast( - Sequence[models.CredentialsEmbed], + Sequence[mdls.CredentialsEmbed], self.get( path=f"/users/{user_id}/credentials_embed", - structure=Sequence[models.CredentialsEmbed], + structure=Sequence[mdls.CredentialsEmbed], query_params={"fields": fields}, transport_options=transport_options, ), @@ -9789,7 +9819,7 @@ def all_user_credentials_embeds( # ### Looker Openid login information for the specified user. Used by Looker Analysts. # - # GET /users/{user_id}/credentials_looker_openid -> models.CredentialsLookerOpenid + # GET /users/{user_id}/credentials_looker_openid -> mdls.CredentialsLookerOpenid def user_credentials_looker_openid( self, # id of user @@ -9797,13 +9827,13 @@ def user_credentials_looker_openid( # Requested fields. fields: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.CredentialsLookerOpenid: + ) -> mdls.CredentialsLookerOpenid: """Get Looker OpenId Credential""" response = cast( - models.CredentialsLookerOpenid, + mdls.CredentialsLookerOpenid, self.get( path=f"/users/{user_id}/credentials_looker_openid", - structure=models.CredentialsLookerOpenid, + structure=mdls.CredentialsLookerOpenid, query_params={"fields": fields}, transport_options=transport_options, ), @@ -9832,7 +9862,7 @@ def delete_user_credentials_looker_openid( # ### Web login session for the specified user. # - # GET /users/{user_id}/sessions/{session_id} -> models.Session + # GET /users/{user_id}/sessions/{session_id} -> mdls.Session def user_session( self, # Id of user @@ -9842,13 +9872,13 @@ def user_session( # Requested fields. fields: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.Session: + ) -> mdls.Session: """Get Web Login Session""" response = cast( - models.Session, + mdls.Session, self.get( path=f"/users/{user_id}/sessions/{session_id}", - structure=models.Session, + structure=mdls.Session, query_params={"fields": fields}, transport_options=transport_options, ), @@ -9879,7 +9909,7 @@ def delete_user_session( # ### Web login session for the specified user. # - # GET /users/{user_id}/sessions -> Sequence[models.Session] + # GET /users/{user_id}/sessions -> Sequence[mdls.Session] def all_user_sessions( self, # id of user @@ -9887,13 +9917,13 @@ def all_user_sessions( # Requested fields. fields: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> Sequence[models.Session]: + ) -> Sequence[mdls.Session]: """Get All Web Login Sessions""" response = cast( - Sequence[models.Session], + Sequence[mdls.Session], self.get( path=f"/users/{user_id}/sessions", - structure=Sequence[models.Session], + structure=Sequence[mdls.Session], query_params={"fields": fields}, transport_options=transport_options, ), @@ -9910,7 +9940,7 @@ def all_user_sessions( # The expire period is always 60 minutes when expires is enabled. # This method can be called with an empty body. # - # POST /users/{user_id}/credentials_email/password_reset -> models.CredentialsEmail + # POST /users/{user_id}/credentials_email/password_reset -> mdls.CredentialsEmail def create_user_credentials_email_password_reset( self, # Id of user @@ -9920,13 +9950,13 @@ def create_user_credentials_email_password_reset( # Requested fields. fields: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.CredentialsEmail: + ) -> mdls.CredentialsEmail: """Create Password Reset Token""" response = cast( - models.CredentialsEmail, + mdls.CredentialsEmail, self.post( path=f"/users/{user_id}/credentials_email/password_reset", - structure=models.CredentialsEmail, + structure=mdls.CredentialsEmail, query_params={"expires": expires, "fields": fields}, transport_options=transport_options, ), @@ -9935,7 +9965,7 @@ def create_user_credentials_email_password_reset( # ### Get information about roles of a given user # - # GET /users/{user_id}/roles -> Sequence[models.Role] + # GET /users/{user_id}/roles -> Sequence[mdls.Role] def user_roles( self, # id of user @@ -9945,13 +9975,13 @@ def user_roles( # Get only roles associated directly with the user: exclude those only associated through groups. direct_association_only: Optional[bool] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> Sequence[models.Role]: + ) -> Sequence[mdls.Role]: """Get User Roles""" response = cast( - Sequence[models.Role], + Sequence[mdls.Role], self.get( path=f"/users/{user_id}/roles", - structure=Sequence[models.Role], + structure=Sequence[mdls.Role], query_params={ "fields": fields, "direct_association_only": direct_association_only, @@ -9963,7 +9993,7 @@ def user_roles( # ### Set roles of the user with a specific id. # - # PUT /users/{user_id}/roles -> Sequence[models.Role] + # PUT /users/{user_id}/roles -> Sequence[mdls.Role] def set_user_roles( self, # id of user @@ -9972,13 +10002,13 @@ def set_user_roles( # Requested fields. fields: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> Sequence[models.Role]: + ) -> Sequence[mdls.Role]: """Set User Roles""" response = cast( - Sequence[models.Role], + Sequence[mdls.Role], self.put( path=f"/users/{user_id}/roles", - structure=Sequence[models.Role], + structure=Sequence[mdls.Role], query_params={"fields": fields}, body=body, transport_options=transport_options, @@ -10003,7 +10033,7 @@ def set_user_roles( # # The value of all hidden user attributes will be blank. # - # GET /users/{user_id}/attribute_values -> Sequence[models.UserAttributeWithValue] + # GET /users/{user_id}/attribute_values -> Sequence[mdls.UserAttributeWithValue] def user_attribute_user_values( self, # Id of user @@ -10011,19 +10041,19 @@ def user_attribute_user_values( # Requested fields. fields: Optional[str] = None, # Specific user attributes to request. Omit or leave blank to request all user attributes. - user_attribute_ids: Optional[models.DelimSequence[int]] = None, + user_attribute_ids: Optional[mdls.DelimSequence[int]] = None, # If true, returns all values in the search path instead of just the first value found. Useful for debugging group precedence. all_values: Optional[bool] = None, # If true, returns an empty record for each requested attribute that has no user, group, or default value. include_unset: Optional[bool] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> Sequence[models.UserAttributeWithValue]: + ) -> Sequence[mdls.UserAttributeWithValue]: """Get User Attribute Values""" response = cast( - Sequence[models.UserAttributeWithValue], + Sequence[mdls.UserAttributeWithValue], self.get( path=f"/users/{user_id}/attribute_values", - structure=Sequence[models.UserAttributeWithValue], + structure=Sequence[mdls.UserAttributeWithValue], query_params={ "fields": fields, "user_attribute_ids": user_attribute_ids, @@ -10039,22 +10069,22 @@ def user_attribute_user_values( # # Per-user user attribute values take precedence over group or default values. # - # PATCH /users/{user_id}/attribute_values/{user_attribute_id} -> models.UserAttributeWithValue + # PATCH /users/{user_id}/attribute_values/{user_attribute_id} -> mdls.UserAttributeWithValue def set_user_attribute_user_value( self, # Id of user user_id: int, # Id of user attribute user_attribute_id: int, - body: models.WriteUserAttributeWithValue, + body: mdls.WriteUserAttributeWithValue, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.UserAttributeWithValue: + ) -> mdls.UserAttributeWithValue: """Set User Attribute User Value""" response = cast( - models.UserAttributeWithValue, + mdls.UserAttributeWithValue, self.patch( path=f"/users/{user_id}/attribute_values/{user_attribute_id}", - structure=models.UserAttributeWithValue, + structure=mdls.UserAttributeWithValue, body=body, transport_options=transport_options, ), @@ -10094,7 +10124,7 @@ def delete_user_attribute_user_value( # ### Get information about all user attributes. # - # GET /user_attributes -> Sequence[models.UserAttribute] + # GET /user_attributes -> Sequence[mdls.UserAttribute] def all_user_attributes( self, # Requested fields. @@ -10102,13 +10132,13 @@ def all_user_attributes( # Fields to order the results by. Sortable fields include: name, label sorts: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> Sequence[models.UserAttribute]: + ) -> Sequence[mdls.UserAttribute]: """Get All User Attributes""" response = cast( - Sequence[models.UserAttribute], + Sequence[mdls.UserAttribute], self.get( path="/user_attributes", - structure=Sequence[models.UserAttribute], + structure=Sequence[mdls.UserAttribute], query_params={"fields": fields, "sorts": sorts}, transport_options=transport_options, ), @@ -10126,20 +10156,20 @@ def all_user_attributes( # Attempting to create a new user attribute with a name or label that duplicates an existing # user attribute will fail with a 422 error. # - # POST /user_attributes -> models.UserAttribute + # POST /user_attributes -> mdls.UserAttribute def create_user_attribute( self, - body: models.WriteUserAttribute, + body: mdls.WriteUserAttribute, # Requested fields. fields: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.UserAttribute: + ) -> mdls.UserAttribute: """Create User Attribute""" response = cast( - models.UserAttribute, + mdls.UserAttribute, self.post( path="/user_attributes", - structure=models.UserAttribute, + structure=mdls.UserAttribute, query_params={"fields": fields}, body=body, transport_options=transport_options, @@ -10149,7 +10179,7 @@ def create_user_attribute( # ### Get information about a user attribute. # - # GET /user_attributes/{user_attribute_id} -> models.UserAttribute + # GET /user_attributes/{user_attribute_id} -> mdls.UserAttribute def user_attribute( self, # Id of user attribute @@ -10157,13 +10187,13 @@ def user_attribute( # Requested fields. fields: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.UserAttribute: + ) -> mdls.UserAttribute: """Get User Attribute""" response = cast( - models.UserAttribute, + mdls.UserAttribute, self.get( path=f"/user_attributes/{user_attribute_id}", - structure=models.UserAttribute, + structure=mdls.UserAttribute, query_params={"fields": fields}, transport_options=transport_options, ), @@ -10172,22 +10202,22 @@ def user_attribute( # ### Update a user attribute definition. # - # PATCH /user_attributes/{user_attribute_id} -> models.UserAttribute + # PATCH /user_attributes/{user_attribute_id} -> mdls.UserAttribute def update_user_attribute( self, # Id of user attribute user_attribute_id: int, - body: models.WriteUserAttribute, + body: mdls.WriteUserAttribute, # Requested fields. fields: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.UserAttribute: + ) -> mdls.UserAttribute: """Update User Attribute""" response = cast( - models.UserAttribute, + mdls.UserAttribute, self.patch( path=f"/user_attributes/{user_attribute_id}", - structure=models.UserAttribute, + structure=mdls.UserAttribute, query_params={"fields": fields}, body=body, transport_options=transport_options, @@ -10223,7 +10253,7 @@ def delete_user_attribute( # # Results will only include groups that the caller's user account has permission to see. # - # GET /user_attributes/{user_attribute_id}/group_values -> Sequence[models.UserAttributeGroupValue] + # GET /user_attributes/{user_attribute_id}/group_values -> Sequence[mdls.UserAttributeGroupValue] def all_user_attribute_group_values( self, # Id of user attribute @@ -10231,13 +10261,13 @@ def all_user_attribute_group_values( # Requested fields. fields: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> Sequence[models.UserAttributeGroupValue]: + ) -> Sequence[mdls.UserAttributeGroupValue]: """Get User Attribute Group Values""" response = cast( - Sequence[models.UserAttributeGroupValue], + Sequence[mdls.UserAttributeGroupValue], self.get( path=f"/user_attributes/{user_attribute_id}/group_values", - structure=Sequence[models.UserAttributeGroupValue], + structure=Sequence[mdls.UserAttributeGroupValue], query_params={"fields": fields}, transport_options=transport_options, ), @@ -10265,20 +10295,20 @@ def all_user_attribute_group_values( # To set a user attribute value for a single user, see [Set User Attribute User Value](#!/User/set_user_attribute_user_value). # To set a user attribute value for all members of a group, see [Set User Attribute Group Value](#!/Group/update_user_attribute_group_value). # - # POST /user_attributes/{user_attribute_id}/group_values -> Sequence[models.UserAttributeGroupValue] + # POST /user_attributes/{user_attribute_id}/group_values -> Sequence[mdls.UserAttributeGroupValue] def set_user_attribute_group_values( self, # Id of user attribute user_attribute_id: int, - body: Sequence[models.UserAttributeGroupValue], + body: Sequence[mdls.UserAttributeGroupValue], transport_options: Optional[transport.TransportOptions] = None, - ) -> Sequence[models.UserAttributeGroupValue]: + ) -> Sequence[mdls.UserAttributeGroupValue]: """Set User Attribute Group Values""" response = cast( - Sequence[models.UserAttributeGroupValue], + Sequence[mdls.UserAttributeGroupValue], self.post( path=f"/user_attributes/{user_attribute_id}/group_values", - structure=Sequence[models.UserAttributeGroupValue], + structure=Sequence[mdls.UserAttributeGroupValue], body=body, transport_options=transport_options, ), @@ -10293,17 +10323,17 @@ def set_user_attribute_group_values( # # Returns all workspaces available to the calling user. # - # GET /workspaces -> Sequence[models.Workspace] + # GET /workspaces -> Sequence[mdls.Workspace] def all_workspaces( self, transport_options: Optional[transport.TransportOptions] = None, - ) -> Sequence[models.Workspace]: + ) -> Sequence[mdls.Workspace]: """Get All Workspaces""" response = cast( - Sequence[models.Workspace], + Sequence[mdls.Workspace], self.get( path="/workspaces", - structure=Sequence[models.Workspace], + structure=Sequence[mdls.Workspace], transport_options=transport_options, ), ) @@ -10339,20 +10369,20 @@ def all_workspaces( # reside in a special user-specific directory on the Looker server and will still be there when you login in again # later and use update_session(workspace_id: "dev") to select the dev workspace for the new API session. # - # GET /workspaces/{workspace_id} -> models.Workspace + # GET /workspaces/{workspace_id} -> mdls.Workspace def workspace( self, # Id of the workspace workspace_id: str, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.Workspace: + ) -> mdls.Workspace: """Get Workspace""" workspace_id = self.encode_path_param(workspace_id) response = cast( - models.Workspace, + mdls.Workspace, self.get( path=f"/workspaces/{workspace_id}", - structure=models.Workspace, + structure=mdls.Workspace, transport_options=transport_options, ), ) diff --git a/python/looker_sdk/sdk/api31/models.py b/python/looker_sdk/sdk/api31/models.py index 974c00785..db0140fb8 100644 --- a/python/looker_sdk/sdk/api31/models.py +++ b/python/looker_sdk/sdk/api31/models.py @@ -1609,7 +1609,7 @@ class Dashboard(model.Model): slug: Content Metadata Slug preferred_viewer: The preferred route for viewing this dashboard (ie: dashboards or dashboards-next) space: - alert_sync_with_dashboard_filter_enabled: Enables alerts to keep in sync with dashboard filter changes - only available in Enhanced Alerts (beta) + alert_sync_with_dashboard_filter_enabled: Enables alerts to keep in sync with dashboard filter changes background_color: Background color created_at: Time that the Dashboard was created. crossfilter_enabled: Enables crossfiltering in dashboards - only available in dashboards-next (beta) @@ -9804,7 +9804,7 @@ class WriteDashboard(model.Model): preferred_viewer: The preferred route for viewing this dashboard (ie: dashboards or dashboards-next) space: Dynamic writeable type for SpaceBase removes: id, content_metadata_id, created_at, creator_id, child_count, external_id, is_embed, is_embed_shared_root, is_embed_users_root, is_personal, is_personal_descendant, is_shared_root, is_users_root, can - alert_sync_with_dashboard_filter_enabled: Enables alerts to keep in sync with dashboard filter changes - only available in Enhanced Alerts (beta) + alert_sync_with_dashboard_filter_enabled: Enables alerts to keep in sync with dashboard filter changes background_color: Background color crossfilter_enabled: Enables crossfiltering in dashboards - only available in dashboards-next (beta) deleted: Whether or not a dashboard is 'soft' deleted. diff --git a/python/looker_sdk/sdk/api40/methods.py b/python/looker_sdk/sdk/api40/methods.py index 9cff31808..4701e0d7e 100644 --- a/python/looker_sdk/sdk/api40/methods.py +++ b/python/looker_sdk/sdk/api40/methods.py @@ -21,7 +21,7 @@ # SOFTWARE. # -# 425 API methods +# 429 API methods # NOTE: Do not edit this file generated by Looker SDK Codegen for API 4.0 @@ -29,7 +29,7 @@ from typing import Any, MutableMapping, Optional, Sequence, Union, cast import warnings -from . import models +from . import models as mdls from looker_sdk.rtl import api_methods from looker_sdk.rtl import transport @@ -40,7 +40,7 @@ class Looker40SDK(api_methods.APIMethods): # ### Search Alerts # - # GET /alerts/search -> Sequence[models.Alert] + # GET /alerts/search -> Sequence[mdls.Alert] def search_alerts( self, # (Optional) Number of results to return (used with `offset`). @@ -64,13 +64,13 @@ def search_alerts( # (Admin only) (Optional) Filter for all owners. all_owners: Optional[bool] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> Sequence[models.Alert]: + ) -> Sequence[mdls.Alert]: """Search Alerts""" response = cast( - Sequence[models.Alert], + Sequence[mdls.Alert], self.get( path="/alerts/search", - structure=Sequence[models.Alert], + structure=Sequence[mdls.Alert], query_params={ "limit": limit, "offset": offset, @@ -90,19 +90,19 @@ def search_alerts( # ### Get an alert by a given alert ID # - # GET /alerts/{alert_id} -> models.Alert + # GET /alerts/{alert_id} -> mdls.Alert def get_alert( self, # ID of an alert alert_id: int, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.Alert: + ) -> mdls.Alert: """Get an alert""" response = cast( - models.Alert, + mdls.Alert, self.get( path=f"/alerts/{alert_id}", - structure=models.Alert, + structure=mdls.Alert, transport_options=transport_options, ), ) @@ -112,20 +112,20 @@ def get_alert( # # Required fields: `owner_id`, `field`, `destinations`, `comparison_type`, `threshold`, `cron` # # # - # PUT /alerts/{alert_id} -> models.Alert + # PUT /alerts/{alert_id} -> mdls.Alert def update_alert( self, # ID of an alert alert_id: int, - body: models.WriteAlert, + body: mdls.WriteAlert, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.Alert: + ) -> mdls.Alert: """Update an alert""" response = cast( - models.Alert, + mdls.Alert, self.put( path=f"/alerts/{alert_id}", - structure=models.Alert, + structure=mdls.Alert, body=body, transport_options=transport_options, ), @@ -136,20 +136,20 @@ def update_alert( # # Available fields: `owner_id`, `is_disabled`, `disabled_reason`, `is_public`, `threshold` # # # - # PATCH /alerts/{alert_id} -> models.Alert + # PATCH /alerts/{alert_id} -> mdls.Alert def update_alert_field( self, # ID of an alert alert_id: int, - body: models.AlertPatch, + body: mdls.AlertPatch, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.Alert: + ) -> mdls.Alert: """Update select fields on an alert""" response = cast( - models.Alert, + mdls.Alert, self.patch( path=f"/alerts/{alert_id}", - structure=models.Alert, + structure=mdls.Alert, body=body, transport_options=transport_options, ), @@ -212,18 +212,18 @@ def delete_alert( # } # ``` # - # POST /alerts -> models.Alert + # POST /alerts -> mdls.Alert def create_alert( self, - body: models.WriteAlert, + body: mdls.WriteAlert, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.Alert: + ) -> mdls.Alert: """Create an alert""" response = cast( - models.Alert, + mdls.Alert, self.post( path="/alerts", - structure=models.Alert, + structure=mdls.Alert, body=body, transport_options=transport_options, ), @@ -286,7 +286,7 @@ def enqueue_alert( # # For more information and detailed examples of Looker API authorization, see [How to Authenticate to Looker API3](https://github.com/looker/looker-sdk-ruby/blob/master/authentication.md). # - # POST /login -> models.AccessToken + # POST /login -> mdls.AccessToken def login( self, # client_id part of API3 Key. @@ -294,13 +294,13 @@ def login( # client_secret part of API3 Key. client_secret: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.AccessToken: + ) -> mdls.AccessToken: """Login""" response = cast( - models.AccessToken, + mdls.AccessToken, self.post( path="/login", - structure=models.AccessToken, + structure=mdls.AccessToken, query_params={"client_id": client_id, "client_secret": client_secret}, transport_options=transport_options, ), @@ -324,7 +324,7 @@ def login( # # See 'login' for more detail on the access token and how to use it. # - # POST /login/{user_id} -> models.AccessToken + # POST /login/{user_id} -> mdls.AccessToken def login_user( self, # Id of user. @@ -332,16 +332,16 @@ def login_user( # When true (default), API calls using the returned access_token are attributed to the admin user who created the access_token. When false, API activity is attributed to the user the access_token runs as. False requires a looker license. associative: Optional[bool] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.AccessToken: + ) -> mdls.AccessToken: """Login user""" warnings.warn( "login_user behavior changed significantly in 21.4.0. See https://git.io/JOtH1" ) response = cast( - models.AccessToken, + mdls.AccessToken, self.post( path=f"/login/{user_id}", - structure=models.AccessToken, + structure=mdls.AccessToken, query_params={"associative": associative}, transport_options=transport_options, ), @@ -368,6 +368,48 @@ def logout( # region Auth: Manage User Authentication Configuration + # ### Create an embed secret using the specified information. + # + # The value of the `secret` field will be set by Looker and returned. + # + # POST /embed_config/secrets -> mdls.EmbedSecret + def create_embed_secret( + self, + body: Optional[mdls.WriteEmbedSecret] = None, + transport_options: Optional[transport.TransportOptions] = None, + ) -> mdls.EmbedSecret: + """Create Embed Secret""" + response = cast( + mdls.EmbedSecret, + self.post( + path="/embed_config/secrets", + structure=mdls.EmbedSecret, + body=body, + transport_options=transport_options, + ), + ) + return response + + # ### Delete an embed secret. + # + # DELETE /embed_config/secrets/{embed_secret_id} -> str + def delete_embed_secret( + self, + # Id of Embed Secret + embed_secret_id: int, + transport_options: Optional[transport.TransportOptions] = None, + ) -> str: + """Delete Embed Secret""" + response = cast( + str, + self.delete( + path=f"/embed_config/secrets/{embed_secret_id}", + structure=str, + transport_options=transport_options, + ), + ) + return response + # ### Create SSO Embed URL # # Creates an SSO embed URL and cryptographically signs it with an embed secret. @@ -403,18 +445,18 @@ def logout( # it to disk, do not pass it to a third party, and only pass it through a secure HTTPS # encrypted transport. # - # POST /embed/sso_url -> models.EmbedUrlResponse + # POST /embed/sso_url -> mdls.EmbedUrlResponse def create_sso_embed_url( self, - body: models.EmbedSsoParams, + body: mdls.EmbedSsoParams, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.EmbedUrlResponse: + ) -> mdls.EmbedUrlResponse: """Create SSO Embed Url""" response = cast( - models.EmbedUrlResponse, + mdls.EmbedUrlResponse, self.post( path="/embed/sso_url", - structure=models.EmbedUrlResponse, + structure=mdls.EmbedUrlResponse, body=body, transport_options=transport_options, ), @@ -447,18 +489,18 @@ def create_sso_embed_url( # it to disk, do not pass it to a third party, and only pass it through a secure HTTPS # encrypted transport. # - # POST /embed/token_url/me -> models.EmbedUrlResponse + # POST /embed/token_url/me -> mdls.EmbedUrlResponse def create_embed_url_as_me( self, - body: models.EmbedParams, + body: mdls.EmbedParams, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.EmbedUrlResponse: + ) -> mdls.EmbedUrlResponse: """Create Embed URL""" response = cast( - models.EmbedUrlResponse, + mdls.EmbedUrlResponse, self.post( path="/embed/token_url/me", - structure=models.EmbedUrlResponse, + structure=mdls.EmbedUrlResponse, body=body, transport_options=transport_options, ), @@ -482,17 +524,17 @@ def create_embed_url_as_me( # # See the [Looker LDAP docs](https://www.looker.com/docs/r/api/ldap_setup) for additional information. # - # GET /ldap_config -> models.LDAPConfig + # GET /ldap_config -> mdls.LDAPConfig def ldap_config( self, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.LDAPConfig: + ) -> mdls.LDAPConfig: """Get LDAP Configuration""" response = cast( - models.LDAPConfig, + mdls.LDAPConfig, self.get( path="/ldap_config", - structure=models.LDAPConfig, + structure=mdls.LDAPConfig, transport_options=transport_options, ), ) @@ -510,18 +552,18 @@ def ldap_config( # # See the [Looker LDAP docs](https://www.looker.com/docs/r/api/ldap_setup) for additional information. # - # PATCH /ldap_config -> models.LDAPConfig + # PATCH /ldap_config -> mdls.LDAPConfig def update_ldap_config( self, - body: models.WriteLDAPConfig, + body: mdls.WriteLDAPConfig, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.LDAPConfig: + ) -> mdls.LDAPConfig: """Update LDAP Configuration""" response = cast( - models.LDAPConfig, + mdls.LDAPConfig, self.patch( path="/ldap_config", - structure=models.LDAPConfig, + structure=mdls.LDAPConfig, body=body, transport_options=transport_options, ), @@ -547,18 +589,18 @@ def update_ldap_config( # # The active LDAP settings are not modified. # - # PUT /ldap_config/test_connection -> models.LDAPConfigTestResult + # PUT /ldap_config/test_connection -> mdls.LDAPConfigTestResult def test_ldap_config_connection( self, - body: models.WriteLDAPConfig, + body: mdls.WriteLDAPConfig, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.LDAPConfigTestResult: + ) -> mdls.LDAPConfigTestResult: """Test LDAP Connection""" response = cast( - models.LDAPConfigTestResult, + mdls.LDAPConfigTestResult, self.put( path="/ldap_config/test_connection", - structure=models.LDAPConfigTestResult, + structure=mdls.LDAPConfigTestResult, body=body, transport_options=transport_options, ), @@ -586,18 +628,18 @@ def test_ldap_config_connection( # # The active LDAP settings are not modified. # - # PUT /ldap_config/test_auth -> models.LDAPConfigTestResult + # PUT /ldap_config/test_auth -> mdls.LDAPConfigTestResult def test_ldap_config_auth( self, - body: models.WriteLDAPConfig, + body: mdls.WriteLDAPConfig, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.LDAPConfigTestResult: + ) -> mdls.LDAPConfigTestResult: """Test LDAP Auth""" response = cast( - models.LDAPConfigTestResult, + mdls.LDAPConfigTestResult, self.put( path="/ldap_config/test_auth", - structure=models.LDAPConfigTestResult, + structure=mdls.LDAPConfigTestResult, body=body, transport_options=transport_options, ), @@ -614,18 +656,18 @@ def test_ldap_config_auth( # # The active LDAP settings are not modified. # - # PUT /ldap_config/test_user_info -> models.LDAPConfigTestResult + # PUT /ldap_config/test_user_info -> mdls.LDAPConfigTestResult def test_ldap_config_user_info( self, - body: models.WriteLDAPConfig, + body: mdls.WriteLDAPConfig, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.LDAPConfigTestResult: + ) -> mdls.LDAPConfigTestResult: """Test LDAP User Info""" response = cast( - models.LDAPConfigTestResult, + mdls.LDAPConfigTestResult, self.put( path="/ldap_config/test_user_info", - structure=models.LDAPConfigTestResult, + structure=mdls.LDAPConfigTestResult, body=body, transport_options=transport_options, ), @@ -642,18 +684,18 @@ def test_ldap_config_user_info( # # The active LDAP settings are not modified. # - # PUT /ldap_config/test_user_auth -> models.LDAPConfigTestResult + # PUT /ldap_config/test_user_auth -> mdls.LDAPConfigTestResult def test_ldap_config_user_auth( self, - body: models.WriteLDAPConfig, + body: mdls.WriteLDAPConfig, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.LDAPConfigTestResult: + ) -> mdls.LDAPConfigTestResult: """Test LDAP User Auth""" response = cast( - models.LDAPConfigTestResult, + mdls.LDAPConfigTestResult, self.put( path="/ldap_config/test_user_auth", - structure=models.LDAPConfigTestResult, + structure=mdls.LDAPConfigTestResult, body=body, transport_options=transport_options, ), @@ -668,19 +710,19 @@ def test_ldap_config_user_auth( # Results are filtered to include only the apps that the caller (current user) # has permission to see. # - # GET /oauth_client_apps -> Sequence[models.OauthClientApp] + # GET /oauth_client_apps -> Sequence[mdls.OauthClientApp] def all_oauth_client_apps( self, # Requested fields. fields: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> Sequence[models.OauthClientApp]: + ) -> Sequence[mdls.OauthClientApp]: """Get All OAuth Client Apps""" response = cast( - Sequence[models.OauthClientApp], + Sequence[mdls.OauthClientApp], self.get( path="/oauth_client_apps", - structure=Sequence[models.OauthClientApp], + structure=Sequence[mdls.OauthClientApp], query_params={"fields": fields}, transport_options=transport_options, ), @@ -691,7 +733,7 @@ def all_oauth_client_apps( # # Returns the registered app client with matching client_guid. # - # GET /oauth_client_apps/{client_guid} -> models.OauthClientApp + # GET /oauth_client_apps/{client_guid} -> mdls.OauthClientApp def oauth_client_app( self, # The unique id of this application @@ -699,14 +741,14 @@ def oauth_client_app( # Requested fields. fields: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.OauthClientApp: + ) -> mdls.OauthClientApp: """Get OAuth Client App""" client_guid = self.encode_path_param(client_guid) response = cast( - models.OauthClientApp, + mdls.OauthClientApp, self.get( path=f"/oauth_client_apps/{client_guid}", - structure=models.OauthClientApp, + structure=mdls.OauthClientApp, query_params={"fields": fields}, transport_options=transport_options, ), @@ -720,23 +762,23 @@ def oauth_client_app( # in OAuth login requests. If the client_guid and redirect_uri parameters in the login request do not match # the app details registered with the Looker instance, the request is assumed to be a forgery and is rejected. # - # POST /oauth_client_apps/{client_guid} -> models.OauthClientApp + # POST /oauth_client_apps/{client_guid} -> mdls.OauthClientApp def register_oauth_client_app( self, # The unique id of this application client_guid: str, - body: models.WriteOauthClientApp, + body: mdls.WriteOauthClientApp, # Requested fields. fields: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.OauthClientApp: + ) -> mdls.OauthClientApp: """Register OAuth App""" client_guid = self.encode_path_param(client_guid) response = cast( - models.OauthClientApp, + mdls.OauthClientApp, self.post( path=f"/oauth_client_apps/{client_guid}", - structure=models.OauthClientApp, + structure=mdls.OauthClientApp, query_params={"fields": fields}, body=body, transport_options=transport_options, @@ -748,23 +790,23 @@ def register_oauth_client_app( # # Modifies the details a previously registered OAuth2 login client app. # - # PATCH /oauth_client_apps/{client_guid} -> models.OauthClientApp + # PATCH /oauth_client_apps/{client_guid} -> mdls.OauthClientApp def update_oauth_client_app( self, # The unique id of this application client_guid: str, - body: models.WriteOauthClientApp, + body: mdls.WriteOauthClientApp, # Requested fields. fields: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.OauthClientApp: + ) -> mdls.OauthClientApp: """Update OAuth App""" client_guid = self.encode_path_param(client_guid) response = cast( - models.OauthClientApp, + mdls.OauthClientApp, self.patch( path=f"/oauth_client_apps/{client_guid}", - structure=models.OauthClientApp, + structure=mdls.OauthClientApp, query_params={"fields": fields}, body=body, transport_options=transport_options, @@ -902,17 +944,17 @@ def deactivate_app_user( # # OIDC is enabled or disabled for Looker using the **enabled** field. # - # GET /oidc_config -> models.OIDCConfig + # GET /oidc_config -> mdls.OIDCConfig def oidc_config( self, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.OIDCConfig: + ) -> mdls.OIDCConfig: """Get OIDC Configuration""" response = cast( - models.OIDCConfig, + mdls.OIDCConfig, self.get( path="/oidc_config", - structure=models.OIDCConfig, + structure=mdls.OIDCConfig, transport_options=transport_options, ), ) @@ -928,18 +970,18 @@ def oidc_config( # # It is **highly** recommended that any OIDC setting changes be tested using the APIs below before being set globally. # - # PATCH /oidc_config -> models.OIDCConfig + # PATCH /oidc_config -> mdls.OIDCConfig def update_oidc_config( self, - body: models.WriteOIDCConfig, + body: mdls.WriteOIDCConfig, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.OIDCConfig: + ) -> mdls.OIDCConfig: """Update OIDC Configuration""" response = cast( - models.OIDCConfig, + mdls.OIDCConfig, self.patch( path="/oidc_config", - structure=models.OIDCConfig, + structure=mdls.OIDCConfig, body=body, transport_options=transport_options, ), @@ -948,20 +990,20 @@ def update_oidc_config( # ### Get a OIDC test configuration by test_slug. # - # GET /oidc_test_configs/{test_slug} -> models.OIDCConfig + # GET /oidc_test_configs/{test_slug} -> mdls.OIDCConfig def oidc_test_config( self, # Slug of test config test_slug: str, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.OIDCConfig: + ) -> mdls.OIDCConfig: """Get OIDC Test Configuration""" test_slug = self.encode_path_param(test_slug) response = cast( - models.OIDCConfig, + mdls.OIDCConfig, self.get( path=f"/oidc_test_configs/{test_slug}", - structure=models.OIDCConfig, + structure=mdls.OIDCConfig, transport_options=transport_options, ), ) @@ -990,18 +1032,18 @@ def delete_oidc_test_config( # ### Create a OIDC test configuration. # - # POST /oidc_test_configs -> models.OIDCConfig + # POST /oidc_test_configs -> mdls.OIDCConfig def create_oidc_test_config( self, - body: models.WriteOIDCConfig, + body: mdls.WriteOIDCConfig, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.OIDCConfig: + ) -> mdls.OIDCConfig: """Create OIDC Test Configuration""" response = cast( - models.OIDCConfig, + mdls.OIDCConfig, self.post( path="/oidc_test_configs", - structure=models.OIDCConfig, + structure=mdls.OIDCConfig, body=body, transport_options=transport_options, ), @@ -1010,17 +1052,17 @@ def create_oidc_test_config( # ### Get password config. # - # GET /password_config -> models.PasswordConfig + # GET /password_config -> mdls.PasswordConfig def password_config( self, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.PasswordConfig: + ) -> mdls.PasswordConfig: """Get Password Config""" response = cast( - models.PasswordConfig, + mdls.PasswordConfig, self.get( path="/password_config", - structure=models.PasswordConfig, + structure=mdls.PasswordConfig, transport_options=transport_options, ), ) @@ -1028,18 +1070,18 @@ def password_config( # ### Update password config. # - # PATCH /password_config -> models.PasswordConfig + # PATCH /password_config -> mdls.PasswordConfig def update_password_config( self, - body: models.WritePasswordConfig, + body: mdls.WritePasswordConfig, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.PasswordConfig: + ) -> mdls.PasswordConfig: """Update Password Config""" response = cast( - models.PasswordConfig, + mdls.PasswordConfig, self.patch( path="/password_config", - structure=models.PasswordConfig, + structure=mdls.PasswordConfig, body=body, transport_options=transport_options, ), @@ -1077,17 +1119,17 @@ def force_password_reset_at_next_login_for_all_users( # # SAML is enabled or disabled for Looker using the **enabled** field. # - # GET /saml_config -> models.SamlConfig + # GET /saml_config -> mdls.SamlConfig def saml_config( self, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.SamlConfig: + ) -> mdls.SamlConfig: """Get SAML Configuration""" response = cast( - models.SamlConfig, + mdls.SamlConfig, self.get( path="/saml_config", - structure=models.SamlConfig, + structure=mdls.SamlConfig, transport_options=transport_options, ), ) @@ -1103,18 +1145,18 @@ def saml_config( # # It is **highly** recommended that any SAML setting changes be tested using the APIs below before being set globally. # - # PATCH /saml_config -> models.SamlConfig + # PATCH /saml_config -> mdls.SamlConfig def update_saml_config( self, - body: models.WriteSamlConfig, + body: mdls.WriteSamlConfig, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.SamlConfig: + ) -> mdls.SamlConfig: """Update SAML Configuration""" response = cast( - models.SamlConfig, + mdls.SamlConfig, self.patch( path="/saml_config", - structure=models.SamlConfig, + structure=mdls.SamlConfig, body=body, transport_options=transport_options, ), @@ -1123,20 +1165,20 @@ def update_saml_config( # ### Get a SAML test configuration by test_slug. # - # GET /saml_test_configs/{test_slug} -> models.SamlConfig + # GET /saml_test_configs/{test_slug} -> mdls.SamlConfig def saml_test_config( self, # Slug of test config test_slug: str, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.SamlConfig: + ) -> mdls.SamlConfig: """Get SAML Test Configuration""" test_slug = self.encode_path_param(test_slug) response = cast( - models.SamlConfig, + mdls.SamlConfig, self.get( path=f"/saml_test_configs/{test_slug}", - structure=models.SamlConfig, + structure=mdls.SamlConfig, transport_options=transport_options, ), ) @@ -1165,18 +1207,18 @@ def delete_saml_test_config( # ### Create a SAML test configuration. # - # POST /saml_test_configs -> models.SamlConfig + # POST /saml_test_configs -> mdls.SamlConfig def create_saml_test_config( self, - body: models.WriteSamlConfig, + body: mdls.WriteSamlConfig, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.SamlConfig: + ) -> mdls.SamlConfig: """Create SAML Test Configuration""" response = cast( - models.SamlConfig, + mdls.SamlConfig, self.post( path="/saml_test_configs", - structure=models.SamlConfig, + structure=mdls.SamlConfig, body=body, transport_options=transport_options, ), @@ -1185,18 +1227,18 @@ def create_saml_test_config( # ### Parse the given xml as a SAML IdP metadata document and return the result. # - # POST /parse_saml_idp_metadata -> models.SamlMetadataParseResult + # POST /parse_saml_idp_metadata -> mdls.SamlMetadataParseResult def parse_saml_idp_metadata( self, body: str, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.SamlMetadataParseResult: + ) -> mdls.SamlMetadataParseResult: """Parse SAML IdP XML""" response = cast( - models.SamlMetadataParseResult, + mdls.SamlMetadataParseResult, self.post( path="/parse_saml_idp_metadata", - structure=models.SamlMetadataParseResult, + structure=mdls.SamlMetadataParseResult, body=body, transport_options=transport_options, ), @@ -1207,18 +1249,18 @@ def parse_saml_idp_metadata( # Note that this requires that the url be public or at least at a location where the Looker instance # can fetch it without requiring any special authentication. # - # POST /fetch_and_parse_saml_idp_metadata -> models.SamlMetadataParseResult + # POST /fetch_and_parse_saml_idp_metadata -> mdls.SamlMetadataParseResult def fetch_and_parse_saml_idp_metadata( self, body: str, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.SamlMetadataParseResult: + ) -> mdls.SamlMetadataParseResult: """Parse SAML IdP Url""" response = cast( - models.SamlMetadataParseResult, + mdls.SamlMetadataParseResult, self.post( path="/fetch_and_parse_saml_idp_metadata", - structure=models.SamlMetadataParseResult, + structure=mdls.SamlMetadataParseResult, body=body, transport_options=transport_options, ), @@ -1227,17 +1269,17 @@ def fetch_and_parse_saml_idp_metadata( # ### Get session config. # - # GET /session_config -> models.SessionConfig + # GET /session_config -> mdls.SessionConfig def session_config( self, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.SessionConfig: + ) -> mdls.SessionConfig: """Get Session Config""" response = cast( - models.SessionConfig, + mdls.SessionConfig, self.get( path="/session_config", - structure=models.SessionConfig, + structure=mdls.SessionConfig, transport_options=transport_options, ), ) @@ -1245,18 +1287,18 @@ def session_config( # ### Update session config. # - # PATCH /session_config -> models.SessionConfig + # PATCH /session_config -> mdls.SessionConfig def update_session_config( self, - body: models.WriteSessionConfig, + body: mdls.WriteSessionConfig, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.SessionConfig: + ) -> mdls.SessionConfig: """Update Session Config""" response = cast( - models.SessionConfig, + mdls.SessionConfig, self.patch( path="/session_config", - structure=models.SessionConfig, + structure=mdls.SessionConfig, body=body, transport_options=transport_options, ), @@ -1265,19 +1307,19 @@ def update_session_config( # ### Get currently locked-out users. # - # GET /user_login_lockouts -> Sequence[models.UserLoginLockout] + # GET /user_login_lockouts -> Sequence[mdls.UserLoginLockout] def all_user_login_lockouts( self, # Include only these fields in the response fields: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> Sequence[models.UserLoginLockout]: + ) -> Sequence[mdls.UserLoginLockout]: """Get All User Login Lockouts""" response = cast( - Sequence[models.UserLoginLockout], + Sequence[mdls.UserLoginLockout], self.get( path="/user_login_lockouts", - structure=Sequence[models.UserLoginLockout], + structure=Sequence[mdls.UserLoginLockout], query_params={"fields": fields}, transport_options=transport_options, ), @@ -1286,7 +1328,7 @@ def all_user_login_lockouts( # ### Search currently locked-out users. # - # GET /user_login_lockouts/search -> Sequence[models.UserLoginLockout] + # GET /user_login_lockouts/search -> Sequence[mdls.UserLoginLockout] def search_user_login_lockouts( self, # Include only these fields in the response @@ -1308,13 +1350,13 @@ def search_user_login_lockouts( # Combine given search criteria in a boolean OR expression filter_or: Optional[bool] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> Sequence[models.UserLoginLockout]: + ) -> Sequence[mdls.UserLoginLockout]: """Search User Login Lockouts""" response = cast( - Sequence[models.UserLoginLockout], + Sequence[mdls.UserLoginLockout], self.get( path="/user_login_lockouts/search", - structure=Sequence[models.UserLoginLockout], + structure=Sequence[mdls.UserLoginLockout], query_params={ "fields": fields, "page": page, @@ -1358,19 +1400,19 @@ def delete_user_login_lockout( # ### Get information about all boards. # - # GET /boards -> Sequence[models.Board] + # GET /boards -> Sequence[mdls.Board] def all_boards( self, # Requested fields. fields: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> Sequence[models.Board]: + ) -> Sequence[mdls.Board]: """Get All Boards""" response = cast( - Sequence[models.Board], + Sequence[mdls.Board], self.get( path="/boards", - structure=Sequence[models.Board], + structure=Sequence[mdls.Board], query_params={"fields": fields}, transport_options=transport_options, ), @@ -1379,20 +1421,20 @@ def all_boards( # ### Create a new board. # - # POST /boards -> models.Board + # POST /boards -> mdls.Board def create_board( self, - body: models.WriteBoard, + body: mdls.WriteBoard, # Requested fields. fields: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.Board: + ) -> mdls.Board: """Create Board""" response = cast( - models.Board, + mdls.Board, self.post( path="/boards", - structure=models.Board, + structure=mdls.Board, query_params={"fields": fields}, body=body, transport_options=transport_options, @@ -1423,7 +1465,7 @@ def create_board( # # Boolean search params accept only "true" and "false" as values. # - # GET /boards/search -> Sequence[models.Board] + # GET /boards/search -> Sequence[mdls.Board] def search_boards( self, # Matches board title. @@ -1453,13 +1495,13 @@ def search_boards( # Combine given search criteria in a boolean OR expression filter_or: Optional[bool] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> Sequence[models.Board]: + ) -> Sequence[mdls.Board]: """Search Boards""" response = cast( - Sequence[models.Board], + Sequence[mdls.Board], self.get( path="/boards/search", - structure=Sequence[models.Board], + structure=Sequence[mdls.Board], query_params={ "title": title, "created_at": created_at, @@ -1482,7 +1524,7 @@ def search_boards( # ### Get information about a board. # - # GET /boards/{board_id} -> models.Board + # GET /boards/{board_id} -> mdls.Board def board( self, # Id of board @@ -1490,13 +1532,13 @@ def board( # Requested fields. fields: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.Board: + ) -> mdls.Board: """Get Board""" response = cast( - models.Board, + mdls.Board, self.get( path=f"/boards/{board_id}", - structure=models.Board, + structure=mdls.Board, query_params={"fields": fields}, transport_options=transport_options, ), @@ -1505,22 +1547,22 @@ def board( # ### Update a board definition. # - # PATCH /boards/{board_id} -> models.Board + # PATCH /boards/{board_id} -> mdls.Board def update_board( self, # Id of board board_id: int, - body: models.WriteBoard, + body: mdls.WriteBoard, # Requested fields. fields: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.Board: + ) -> mdls.Board: """Update Board""" response = cast( - models.Board, + mdls.Board, self.patch( path=f"/boards/{board_id}", - structure=models.Board, + structure=mdls.Board, query_params={"fields": fields}, body=body, transport_options=transport_options, @@ -1550,7 +1592,7 @@ def delete_board( # ### Get information about all board items. # - # GET /board_items -> Sequence[models.BoardItem] + # GET /board_items -> Sequence[mdls.BoardItem] def all_board_items( self, # Requested fields. @@ -1560,13 +1602,13 @@ def all_board_items( # Filter to a specific board section board_section_id: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> Sequence[models.BoardItem]: + ) -> Sequence[mdls.BoardItem]: """Get All Board Items""" response = cast( - Sequence[models.BoardItem], + Sequence[mdls.BoardItem], self.get( path="/board_items", - structure=Sequence[models.BoardItem], + structure=Sequence[mdls.BoardItem], query_params={ "fields": fields, "sorts": sorts, @@ -1579,20 +1621,20 @@ def all_board_items( # ### Create a new board item. # - # POST /board_items -> models.BoardItem + # POST /board_items -> mdls.BoardItem def create_board_item( self, - body: models.WriteBoardItem, + body: mdls.WriteBoardItem, # Requested fields. fields: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.BoardItem: + ) -> mdls.BoardItem: """Create Board Item""" response = cast( - models.BoardItem, + mdls.BoardItem, self.post( path="/board_items", - structure=models.BoardItem, + structure=mdls.BoardItem, query_params={"fields": fields}, body=body, transport_options=transport_options, @@ -1602,7 +1644,7 @@ def create_board_item( # ### Get information about a board item. # - # GET /board_items/{board_item_id} -> models.BoardItem + # GET /board_items/{board_item_id} -> mdls.BoardItem def board_item( self, # Id of board item @@ -1610,13 +1652,13 @@ def board_item( # Requested fields. fields: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.BoardItem: + ) -> mdls.BoardItem: """Get Board Item""" response = cast( - models.BoardItem, + mdls.BoardItem, self.get( path=f"/board_items/{board_item_id}", - structure=models.BoardItem, + structure=mdls.BoardItem, query_params={"fields": fields}, transport_options=transport_options, ), @@ -1625,22 +1667,22 @@ def board_item( # ### Update a board item definition. # - # PATCH /board_items/{board_item_id} -> models.BoardItem + # PATCH /board_items/{board_item_id} -> mdls.BoardItem def update_board_item( self, # Id of board item board_item_id: int, - body: models.WriteBoardItem, + body: mdls.WriteBoardItem, # Requested fields. fields: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.BoardItem: + ) -> mdls.BoardItem: """Update Board Item""" response = cast( - models.BoardItem, + mdls.BoardItem, self.patch( path=f"/board_items/{board_item_id}", - structure=models.BoardItem, + structure=mdls.BoardItem, query_params={"fields": fields}, body=body, transport_options=transport_options, @@ -1670,7 +1712,7 @@ def delete_board_item( # ### Get information about all board sections. # - # GET /board_sections -> Sequence[models.BoardSection] + # GET /board_sections -> Sequence[mdls.BoardSection] def all_board_sections( self, # Requested fields. @@ -1678,13 +1720,13 @@ def all_board_sections( # Fields to sort by. sorts: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> Sequence[models.BoardSection]: + ) -> Sequence[mdls.BoardSection]: """Get All Board sections""" response = cast( - Sequence[models.BoardSection], + Sequence[mdls.BoardSection], self.get( path="/board_sections", - structure=Sequence[models.BoardSection], + structure=Sequence[mdls.BoardSection], query_params={"fields": fields, "sorts": sorts}, transport_options=transport_options, ), @@ -1693,20 +1735,20 @@ def all_board_sections( # ### Create a new board section. # - # POST /board_sections -> models.BoardSection + # POST /board_sections -> mdls.BoardSection def create_board_section( self, - body: models.WriteBoardSection, + body: mdls.WriteBoardSection, # Requested fields. fields: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.BoardSection: + ) -> mdls.BoardSection: """Create Board section""" response = cast( - models.BoardSection, + mdls.BoardSection, self.post( path="/board_sections", - structure=models.BoardSection, + structure=mdls.BoardSection, query_params={"fields": fields}, body=body, transport_options=transport_options, @@ -1716,7 +1758,7 @@ def create_board_section( # ### Get information about a board section. # - # GET /board_sections/{board_section_id} -> models.BoardSection + # GET /board_sections/{board_section_id} -> mdls.BoardSection def board_section( self, # Id of board section @@ -1724,13 +1766,13 @@ def board_section( # Requested fields. fields: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.BoardSection: + ) -> mdls.BoardSection: """Get Board section""" response = cast( - models.BoardSection, + mdls.BoardSection, self.get( path=f"/board_sections/{board_section_id}", - structure=models.BoardSection, + structure=mdls.BoardSection, query_params={"fields": fields}, transport_options=transport_options, ), @@ -1739,22 +1781,22 @@ def board_section( # ### Update a board section definition. # - # PATCH /board_sections/{board_section_id} -> models.BoardSection + # PATCH /board_sections/{board_section_id} -> mdls.BoardSection def update_board_section( self, # Id of board section board_section_id: int, - body: models.WriteBoardSection, + body: mdls.WriteBoardSection, # Requested fields. fields: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.BoardSection: + ) -> mdls.BoardSection: """Update Board section""" response = cast( - models.BoardSection, + mdls.BoardSection, self.patch( path=f"/board_sections/{board_section_id}", - structure=models.BoardSection, + structure=mdls.BoardSection, query_params={"fields": fields}, body=body, transport_options=transport_options, @@ -1795,19 +1837,19 @@ def delete_board_section( # # **Note**: Only an API user with the Admin role can call this endpoint. Unauthorized requests will return `Not Found` (404) errors. # - # GET /color_collections -> Sequence[models.ColorCollection] + # GET /color_collections -> Sequence[mdls.ColorCollection] def all_color_collections( self, # Requested fields. fields: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> Sequence[models.ColorCollection]: + ) -> Sequence[mdls.ColorCollection]: """Get all Color Collections""" response = cast( - Sequence[models.ColorCollection], + Sequence[mdls.ColorCollection], self.get( path="/color_collections", - structure=Sequence[models.ColorCollection], + structure=Sequence[mdls.ColorCollection], query_params={"fields": fields}, transport_options=transport_options, ), @@ -1824,18 +1866,18 @@ def all_color_collections( # # **Note**: Only an API user with the Admin role can call this endpoint. Unauthorized requests will return `Not Found` (404) errors. # - # POST /color_collections -> models.ColorCollection + # POST /color_collections -> mdls.ColorCollection def create_color_collection( self, - body: models.WriteColorCollection, + body: mdls.WriteColorCollection, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.ColorCollection: + ) -> mdls.ColorCollection: """Create ColorCollection""" response = cast( - models.ColorCollection, + mdls.ColorCollection, self.post( path="/color_collections", - structure=models.ColorCollection, + structure=mdls.ColorCollection, body=body, transport_options=transport_options, ), @@ -1849,19 +1891,19 @@ def create_color_collection( # # **Note**: Only an API user with the Admin role can call this endpoint. Unauthorized requests will return `Not Found` (404) errors. # - # GET /color_collections/custom -> Sequence[models.ColorCollection] + # GET /color_collections/custom -> Sequence[mdls.ColorCollection] def color_collections_custom( self, # Requested fields. fields: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> Sequence[models.ColorCollection]: + ) -> Sequence[mdls.ColorCollection]: """Get all Custom Color Collections""" response = cast( - Sequence[models.ColorCollection], + Sequence[mdls.ColorCollection], self.get( path="/color_collections/custom", - structure=Sequence[models.ColorCollection], + structure=Sequence[mdls.ColorCollection], query_params={"fields": fields}, transport_options=transport_options, ), @@ -1875,19 +1917,19 @@ def color_collections_custom( # # **Note**: Only an API user with the Admin role can call this endpoint. Unauthorized requests will return `Not Found` (404) errors. # - # GET /color_collections/standard -> Sequence[models.ColorCollection] + # GET /color_collections/standard -> Sequence[mdls.ColorCollection] def color_collections_standard( self, # Requested fields. fields: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> Sequence[models.ColorCollection]: + ) -> Sequence[mdls.ColorCollection]: """Get all Standard Color Collections""" response = cast( - Sequence[models.ColorCollection], + Sequence[mdls.ColorCollection], self.get( path="/color_collections/standard", - structure=Sequence[models.ColorCollection], + structure=Sequence[mdls.ColorCollection], query_params={"fields": fields}, transport_options=transport_options, ), @@ -1900,17 +1942,17 @@ def color_collections_standard( # # Set the default color collection with [ColorCollection](#!/ColorCollection/set_default_color_collection) # - # GET /color_collections/default -> models.ColorCollection + # GET /color_collections/default -> mdls.ColorCollection def default_color_collection( self, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.ColorCollection: + ) -> mdls.ColorCollection: """Get Default Color Collection""" response = cast( - models.ColorCollection, + mdls.ColorCollection, self.get( path="/color_collections/default", - structure=models.ColorCollection, + structure=mdls.ColorCollection, transport_options=transport_options, ), ) @@ -1921,19 +1963,19 @@ def default_color_collection( # Returns the new specified default Color Collection object. # **Note**: Only an API user with the Admin role can call this endpoint. Unauthorized requests will return `Not Found` (404) errors. # - # PUT /color_collections/default -> models.ColorCollection + # PUT /color_collections/default -> mdls.ColorCollection def set_default_color_collection( self, # ID of color collection to set as default collection_id: str, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.ColorCollection: + ) -> mdls.ColorCollection: """Set Default Color Collection""" response = cast( - models.ColorCollection, + mdls.ColorCollection, self.put( path="/color_collections/default", - structure=models.ColorCollection, + structure=mdls.ColorCollection, query_params={"collection_id": collection_id}, transport_options=transport_options, ), @@ -1951,7 +1993,7 @@ def set_default_color_collection( # # **Note**: Only an API user with the Admin role can call this endpoint. Unauthorized requests will return `Not Found` (404) errors. # - # GET /color_collections/{collection_id} -> models.ColorCollection + # GET /color_collections/{collection_id} -> mdls.ColorCollection def color_collection( self, # Id of Color Collection @@ -1959,14 +2001,14 @@ def color_collection( # Requested fields. fields: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.ColorCollection: + ) -> mdls.ColorCollection: """Get Color Collection by ID""" collection_id = self.encode_path_param(collection_id) response = cast( - models.ColorCollection, + mdls.ColorCollection, self.get( path=f"/color_collections/{collection_id}", - structure=models.ColorCollection, + structure=mdls.ColorCollection, query_params={"fields": fields}, transport_options=transport_options, ), @@ -1976,21 +2018,21 @@ def color_collection( # ### Update a custom color collection by id. # **Note**: Only an API user with the Admin role can call this endpoint. Unauthorized requests will return `Not Found` (404) errors. # - # PATCH /color_collections/{collection_id} -> models.ColorCollection + # PATCH /color_collections/{collection_id} -> mdls.ColorCollection def update_color_collection( self, # Id of Custom Color Collection collection_id: str, - body: models.WriteColorCollection, + body: mdls.WriteColorCollection, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.ColorCollection: + ) -> mdls.ColorCollection: """Update Custom Color collection""" collection_id = self.encode_path_param(collection_id) response = cast( - models.ColorCollection, + mdls.ColorCollection, self.patch( path=f"/color_collections/{collection_id}", - structure=models.ColorCollection, + structure=mdls.ColorCollection, body=body, transport_options=transport_options, ), @@ -2031,7 +2073,7 @@ def delete_color_collection( # ### Get All Commands. # - # GET /commands -> Sequence[models.Command] + # GET /commands -> Sequence[mdls.Command] def get_all_commands( self, # Id of the associated content. This must be accompanied with content_type. @@ -2041,13 +2083,13 @@ def get_all_commands( # Number of results to return. limit: Optional[int] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> Sequence[models.Command]: + ) -> Sequence[mdls.Command]: """Get All Commands""" response = cast( - Sequence[models.Command], + Sequence[mdls.Command], self.get( path="/commands", - structure=Sequence[models.Command], + structure=Sequence[mdls.Command], query_params={ "content_id": content_id, "content_type": content_type, @@ -2063,18 +2105,18 @@ def get_all_commands( # # `linked_content_type` must be one of ["dashboard", "lookml_dashboard"] # # # - # POST /commands -> models.Command + # POST /commands -> mdls.Command def create_command( self, - body: models.WriteCommand, + body: mdls.WriteCommand, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.Command: + ) -> mdls.Command: """Create a custom command""" response = cast( - models.Command, + mdls.Command, self.post( path="/commands", - structure=models.Command, + structure=mdls.Command, body=body, transport_options=transport_options, ), @@ -2085,20 +2127,20 @@ def create_command( # # Optional fields: ['name', 'description'] # # # - # PATCH /commands/{command_id} -> models.Command + # PATCH /commands/{command_id} -> mdls.Command def update_command( self, # ID of a command command_id: int, - body: models.UpdateCommand, + body: mdls.UpdateCommand, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.Command: + ) -> mdls.Command: """Update a custom command""" response = cast( - models.Command, + mdls.Command, self.patch( path=f"/commands/{command_id}", - structure=models.Command, + structure=mdls.Command, body=body, transport_options=transport_options, ), @@ -2131,17 +2173,17 @@ def delete_command( # Get the current Cloud Storage Configuration. # - # GET /cloud_storage -> models.BackupConfiguration + # GET /cloud_storage -> mdls.BackupConfiguration def cloud_storage_configuration( self, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.BackupConfiguration: + ) -> mdls.BackupConfiguration: """Get Cloud Storage""" response = cast( - models.BackupConfiguration, + mdls.BackupConfiguration, self.get( path="/cloud_storage", - structure=models.BackupConfiguration, + structure=mdls.BackupConfiguration, transport_options=transport_options, ), ) @@ -2149,18 +2191,18 @@ def cloud_storage_configuration( # Update the current Cloud Storage Configuration. # - # PATCH /cloud_storage -> models.BackupConfiguration + # PATCH /cloud_storage -> mdls.BackupConfiguration def update_cloud_storage_configuration( self, - body: models.WriteBackupConfiguration, + body: mdls.WriteBackupConfiguration, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.BackupConfiguration: + ) -> mdls.BackupConfiguration: """Update Cloud Storage""" response = cast( - models.BackupConfiguration, + mdls.BackupConfiguration, self.patch( path="/cloud_storage", - structure=models.BackupConfiguration, + structure=mdls.BackupConfiguration, body=body, transport_options=transport_options, ), @@ -2169,17 +2211,17 @@ def update_cloud_storage_configuration( # ### Get the current status and content of custom welcome emails # - # GET /custom_welcome_email -> models.CustomWelcomeEmail + # GET /custom_welcome_email -> mdls.CustomWelcomeEmail def custom_welcome_email( self, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.CustomWelcomeEmail: + ) -> mdls.CustomWelcomeEmail: """Get Custom Welcome Email""" response = cast( - models.CustomWelcomeEmail, + mdls.CustomWelcomeEmail, self.get( path="/custom_welcome_email", - structure=models.CustomWelcomeEmail, + structure=mdls.CustomWelcomeEmail, transport_options=transport_options, ), ) @@ -2187,20 +2229,20 @@ def custom_welcome_email( # Update custom welcome email setting and values. Optionally send a test email with the new content to the currently logged in user. # - # PATCH /custom_welcome_email -> models.CustomWelcomeEmail + # PATCH /custom_welcome_email -> mdls.CustomWelcomeEmail def update_custom_welcome_email( self, - body: models.CustomWelcomeEmail, + body: mdls.CustomWelcomeEmail, # If true a test email with the content from the request will be sent to the current user after saving send_test_welcome_email: Optional[bool] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.CustomWelcomeEmail: + ) -> mdls.CustomWelcomeEmail: """Update Custom Welcome Email Content""" response = cast( - models.CustomWelcomeEmail, + mdls.CustomWelcomeEmail, self.patch( path="/custom_welcome_email", - structure=models.CustomWelcomeEmail, + structure=mdls.CustomWelcomeEmail, query_params={"send_test_welcome_email": send_test_welcome_email}, body=body, transport_options=transport_options, @@ -2210,18 +2252,18 @@ def update_custom_welcome_email( # Requests to this endpoint will send a welcome email with the custom content provided in the body to the currently logged in user. # - # PUT /custom_welcome_email_test -> models.WelcomeEmailTest + # PUT /custom_welcome_email_test -> mdls.WelcomeEmailTest def update_custom_welcome_email_test( self, - body: models.WelcomeEmailTest, + body: mdls.WelcomeEmailTest, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.WelcomeEmailTest: + ) -> mdls.WelcomeEmailTest: """Send a test welcome email to the currently logged in user with the supplied content""" response = cast( - models.WelcomeEmailTest, + mdls.WelcomeEmailTest, self.put( path="/custom_welcome_email_test", - structure=models.WelcomeEmailTest, + structure=mdls.WelcomeEmailTest, body=body, transport_options=transport_options, ), @@ -2230,17 +2272,17 @@ def update_custom_welcome_email_test( # ### Retrieve the value for whether or not digest emails is enabled # - # GET /digest_emails_enabled -> models.DigestEmails + # GET /digest_emails_enabled -> mdls.DigestEmails def digest_emails_enabled( self, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.DigestEmails: + ) -> mdls.DigestEmails: """Get Digest_emails""" response = cast( - models.DigestEmails, + mdls.DigestEmails, self.get( path="/digest_emails_enabled", - structure=models.DigestEmails, + structure=mdls.DigestEmails, transport_options=transport_options, ), ) @@ -2248,18 +2290,18 @@ def digest_emails_enabled( # ### Update the setting for enabling/disabling digest emails # - # PATCH /digest_emails_enabled -> models.DigestEmails + # PATCH /digest_emails_enabled -> mdls.DigestEmails def update_digest_emails_enabled( self, - body: models.DigestEmails, + body: mdls.DigestEmails, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.DigestEmails: + ) -> mdls.DigestEmails: """Update Digest_emails""" response = cast( - models.DigestEmails, + mdls.DigestEmails, self.patch( path="/digest_emails_enabled", - structure=models.DigestEmails, + structure=mdls.DigestEmails, body=body, transport_options=transport_options, ), @@ -2270,17 +2312,17 @@ def update_digest_emails_enabled( # any actual emails, it generates records containing content which may be of interest for users who have become inactive. # Emails will be sent at a later time from Looker's internal system if the Digest Emails feature is enabled in settings. # - # POST /digest_email_send -> models.DigestEmailSend + # POST /digest_email_send -> mdls.DigestEmailSend def create_digest_email_send( self, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.DigestEmailSend: + ) -> mdls.DigestEmailSend: """Deliver digest email contents""" response = cast( - models.DigestEmailSend, + mdls.DigestEmailSend, self.post( path="/digest_email_send", - structure=models.DigestEmailSend, + structure=mdls.DigestEmailSend, transport_options=transport_options, ), ) @@ -2288,17 +2330,17 @@ def create_digest_email_send( # ### Set the menu item name and content for internal help resources # - # GET /internal_help_resources_content -> models.InternalHelpResourcesContent + # GET /internal_help_resources_content -> mdls.InternalHelpResourcesContent def internal_help_resources_content( self, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.InternalHelpResourcesContent: + ) -> mdls.InternalHelpResourcesContent: """Get Internal Help Resources Content""" response = cast( - models.InternalHelpResourcesContent, + mdls.InternalHelpResourcesContent, self.get( path="/internal_help_resources_content", - structure=models.InternalHelpResourcesContent, + structure=mdls.InternalHelpResourcesContent, transport_options=transport_options, ), ) @@ -2306,18 +2348,18 @@ def internal_help_resources_content( # Update internal help resources content # - # PATCH /internal_help_resources_content -> models.InternalHelpResourcesContent + # PATCH /internal_help_resources_content -> mdls.InternalHelpResourcesContent def update_internal_help_resources_content( self, - body: models.WriteInternalHelpResourcesContent, + body: mdls.WriteInternalHelpResourcesContent, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.InternalHelpResourcesContent: + ) -> mdls.InternalHelpResourcesContent: """Update internal help resources content""" response = cast( - models.InternalHelpResourcesContent, + mdls.InternalHelpResourcesContent, self.patch( path="/internal_help_resources_content", - structure=models.InternalHelpResourcesContent, + structure=mdls.InternalHelpResourcesContent, body=body, transport_options=transport_options, ), @@ -2326,17 +2368,17 @@ def update_internal_help_resources_content( # ### Get and set the options for internal help resources # - # GET /internal_help_resources_enabled -> models.InternalHelpResources + # GET /internal_help_resources_enabled -> mdls.InternalHelpResources def internal_help_resources( self, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.InternalHelpResources: + ) -> mdls.InternalHelpResources: """Get Internal Help Resources""" response = cast( - models.InternalHelpResources, + mdls.InternalHelpResources, self.get( path="/internal_help_resources_enabled", - structure=models.InternalHelpResources, + structure=mdls.InternalHelpResources, transport_options=transport_options, ), ) @@ -2344,18 +2386,18 @@ def internal_help_resources( # Update internal help resources settings # - # PATCH /internal_help_resources -> models.InternalHelpResources + # PATCH /internal_help_resources -> mdls.InternalHelpResources def update_internal_help_resources( self, - body: models.WriteInternalHelpResources, + body: mdls.WriteInternalHelpResources, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.InternalHelpResources: + ) -> mdls.InternalHelpResources: """Update internal help resources configuration""" response = cast( - models.InternalHelpResources, + mdls.InternalHelpResources, self.patch( path="/internal_help_resources", - structure=models.InternalHelpResources, + structure=mdls.InternalHelpResources, body=body, transport_options=transport_options, ), @@ -2364,17 +2406,17 @@ def update_internal_help_resources( # ### Get all legacy features. # - # GET /legacy_features -> Sequence[models.LegacyFeature] + # GET /legacy_features -> Sequence[mdls.LegacyFeature] def all_legacy_features( self, transport_options: Optional[transport.TransportOptions] = None, - ) -> Sequence[models.LegacyFeature]: + ) -> Sequence[mdls.LegacyFeature]: """Get All Legacy Features""" response = cast( - Sequence[models.LegacyFeature], + Sequence[mdls.LegacyFeature], self.get( path="/legacy_features", - structure=Sequence[models.LegacyFeature], + structure=Sequence[mdls.LegacyFeature], transport_options=transport_options, ), ) @@ -2382,20 +2424,20 @@ def all_legacy_features( # ### Get information about the legacy feature with a specific id. # - # GET /legacy_features/{legacy_feature_id} -> models.LegacyFeature + # GET /legacy_features/{legacy_feature_id} -> mdls.LegacyFeature def legacy_feature( self, # id of legacy feature legacy_feature_id: str, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.LegacyFeature: + ) -> mdls.LegacyFeature: """Get Legacy Feature""" legacy_feature_id = self.encode_path_param(legacy_feature_id) response = cast( - models.LegacyFeature, + mdls.LegacyFeature, self.get( path=f"/legacy_features/{legacy_feature_id}", - structure=models.LegacyFeature, + structure=mdls.LegacyFeature, transport_options=transport_options, ), ) @@ -2403,21 +2445,21 @@ def legacy_feature( # ### Update information about the legacy feature with a specific id. # - # PATCH /legacy_features/{legacy_feature_id} -> models.LegacyFeature + # PATCH /legacy_features/{legacy_feature_id} -> mdls.LegacyFeature def update_legacy_feature( self, # id of legacy feature legacy_feature_id: str, - body: models.WriteLegacyFeature, + body: mdls.WriteLegacyFeature, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.LegacyFeature: + ) -> mdls.LegacyFeature: """Update Legacy Feature""" legacy_feature_id = self.encode_path_param(legacy_feature_id) response = cast( - models.LegacyFeature, + mdls.LegacyFeature, self.patch( path=f"/legacy_features/{legacy_feature_id}", - structure=models.LegacyFeature, + structure=mdls.LegacyFeature, body=body, transport_options=transport_options, ), @@ -2426,17 +2468,17 @@ def update_legacy_feature( # ### Get a list of locales that Looker supports. # - # GET /locales -> Sequence[models.Locale] + # GET /locales -> Sequence[mdls.Locale] def all_locales( self, transport_options: Optional[transport.TransportOptions] = None, - ) -> Sequence[models.Locale]: + ) -> Sequence[mdls.Locale]: """Get All Locales""" response = cast( - Sequence[models.Locale], + Sequence[mdls.Locale], self.get( path="/locales", - structure=Sequence[models.Locale], + structure=Sequence[mdls.Locale], transport_options=transport_options, ), ) @@ -2444,17 +2486,17 @@ def all_locales( # ### Get all mobile settings. # - # GET /mobile/settings -> models.MobileSettings + # GET /mobile/settings -> mdls.MobileSettings def mobile_settings( self, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.MobileSettings: + ) -> mdls.MobileSettings: """Get Mobile_Settings""" response = cast( - models.MobileSettings, + mdls.MobileSettings, self.get( path="/mobile/settings", - structure=models.MobileSettings, + structure=mdls.MobileSettings, transport_options=transport_options, ), ) @@ -2469,19 +2511,19 @@ def mobile_settings( # - whitelabel_configuration # - custom_welcome_email # - # GET /setting -> models.Setting + # GET /setting -> mdls.Setting def get_setting( self, # Requested fields fields: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.Setting: + ) -> mdls.Setting: """Get Setting""" response = cast( - models.Setting, + mdls.Setting, self.get( path="/setting", - structure=models.Setting, + structure=mdls.Setting, query_params={"fields": fields}, transport_options=transport_options, ), @@ -2499,20 +2541,20 @@ def get_setting( # # See the `Setting` type for more information on the specific values that can be configured. # - # PATCH /setting -> models.Setting + # PATCH /setting -> mdls.Setting def set_setting( self, - body: models.WriteSetting, + body: mdls.WriteSetting, # Requested fields fields: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.Setting: + ) -> mdls.Setting: """Set Setting""" response = cast( - models.Setting, + mdls.Setting, self.patch( path="/setting", - structure=models.Setting, + structure=mdls.Setting, query_params={"fields": fields}, body=body, transport_options=transport_options, @@ -2522,17 +2564,17 @@ def set_setting( # ### Get a list of timezones that Looker supports (e.g. useful for scheduling tasks). # - # GET /timezones -> Sequence[models.Timezone] + # GET /timezones -> Sequence[mdls.Timezone] def all_timezones( self, transport_options: Optional[transport.TransportOptions] = None, - ) -> Sequence[models.Timezone]: + ) -> Sequence[mdls.Timezone]: """Get All Timezones""" response = cast( - Sequence[models.Timezone], + Sequence[mdls.Timezone], self.get( path="/timezones", - structure=Sequence[models.Timezone], + structure=Sequence[mdls.Timezone], transport_options=transport_options, ), ) @@ -2540,19 +2582,19 @@ def all_timezones( # ### Get information about all API versions supported by this Looker instance. # - # GET /versions -> models.ApiVersion + # GET /versions -> mdls.ApiVersion def versions( self, # Requested fields. fields: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.ApiVersion: + ) -> mdls.ApiVersion: """Get ApiVersion""" response = cast( - models.ApiVersion, + mdls.ApiVersion, self.get( path="/versions", - structure=models.ApiVersion, + structure=mdls.ApiVersion, query_params={"fields": fields}, transport_options=transport_options, ), @@ -2588,19 +2630,19 @@ def api_spec( # ### This feature is enabled only by special license. # ### Gets the whitelabel configuration, which includes hiding documentation links, custom favicon uploading, etc. # - # GET /whitelabel_configuration -> models.WhitelabelConfiguration + # GET /whitelabel_configuration -> mdls.WhitelabelConfiguration def whitelabel_configuration( self, # Requested fields. fields: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.WhitelabelConfiguration: + ) -> mdls.WhitelabelConfiguration: """Get Whitelabel configuration""" response = cast( - models.WhitelabelConfiguration, + mdls.WhitelabelConfiguration, self.get( path="/whitelabel_configuration", - structure=models.WhitelabelConfiguration, + structure=mdls.WhitelabelConfiguration, query_params={"fields": fields}, transport_options=transport_options, ), @@ -2609,18 +2651,18 @@ def whitelabel_configuration( # ### Update the whitelabel configuration # - # PUT /whitelabel_configuration -> models.WhitelabelConfiguration + # PUT /whitelabel_configuration -> mdls.WhitelabelConfiguration def update_whitelabel_configuration( self, - body: models.WriteWhitelabelConfiguration, + body: mdls.WriteWhitelabelConfiguration, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.WhitelabelConfiguration: + ) -> mdls.WhitelabelConfiguration: """Update Whitelabel configuration""" response = cast( - models.WhitelabelConfiguration, + mdls.WhitelabelConfiguration, self.put( path="/whitelabel_configuration", - structure=models.WhitelabelConfiguration, + structure=mdls.WhitelabelConfiguration, body=body, transport_options=transport_options, ), @@ -2633,19 +2675,19 @@ def update_whitelabel_configuration( # ### Get information about all connections. # - # GET /connections -> Sequence[models.DBConnection] + # GET /connections -> Sequence[mdls.DBConnection] def all_connections( self, # Requested fields. fields: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> Sequence[models.DBConnection]: + ) -> Sequence[mdls.DBConnection]: """Get All Connections""" response = cast( - Sequence[models.DBConnection], + Sequence[mdls.DBConnection], self.get( path="/connections", - structure=Sequence[models.DBConnection], + structure=Sequence[mdls.DBConnection], query_params={"fields": fields}, transport_options=transport_options, ), @@ -2654,18 +2696,18 @@ def all_connections( # ### Create a connection using the specified configuration. # - # POST /connections -> models.DBConnection + # POST /connections -> mdls.DBConnection def create_connection( self, - body: models.WriteDBConnection, + body: mdls.WriteDBConnection, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.DBConnection: + ) -> mdls.DBConnection: """Create Connection""" response = cast( - models.DBConnection, + mdls.DBConnection, self.post( path="/connections", - structure=models.DBConnection, + structure=mdls.DBConnection, body=body, transport_options=transport_options, ), @@ -2674,7 +2716,7 @@ def create_connection( # ### Get information about a connection. # - # GET /connections/{connection_name} -> models.DBConnection + # GET /connections/{connection_name} -> mdls.DBConnection def connection( self, # Name of connection @@ -2682,14 +2724,14 @@ def connection( # Requested fields. fields: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.DBConnection: + ) -> mdls.DBConnection: """Get Connection""" connection_name = self.encode_path_param(connection_name) response = cast( - models.DBConnection, + mdls.DBConnection, self.get( path=f"/connections/{connection_name}", - structure=models.DBConnection, + structure=mdls.DBConnection, query_params={"fields": fields}, transport_options=transport_options, ), @@ -2698,21 +2740,21 @@ def connection( # ### Update a connection using the specified configuration. # - # PATCH /connections/{connection_name} -> models.DBConnection + # PATCH /connections/{connection_name} -> mdls.DBConnection def update_connection( self, # Name of connection connection_name: str, - body: models.WriteDBConnection, + body: mdls.WriteDBConnection, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.DBConnection: + ) -> mdls.DBConnection: """Update Connection""" connection_name = self.encode_path_param(connection_name) response = cast( - models.DBConnection, + mdls.DBConnection, self.patch( path=f"/connections/{connection_name}", - structure=models.DBConnection, + structure=mdls.DBConnection, body=body, transport_options=transport_options, ), @@ -2773,22 +2815,22 @@ def delete_connection_override( # # Unsupported tests in the request will be ignored. # - # PUT /connections/{connection_name}/test -> Sequence[models.DBConnectionTestResult] + # PUT /connections/{connection_name}/test -> Sequence[mdls.DBConnectionTestResult] def test_connection( self, # Name of connection connection_name: str, # Array of names of tests to run - tests: Optional[models.DelimSequence[str]] = None, + tests: Optional[mdls.DelimSequence[str]] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> Sequence[models.DBConnectionTestResult]: + ) -> Sequence[mdls.DBConnectionTestResult]: """Test Connection""" connection_name = self.encode_path_param(connection_name) response = cast( - Sequence[models.DBConnectionTestResult], + Sequence[mdls.DBConnectionTestResult], self.put( path=f"/connections/{connection_name}/test", - structure=Sequence[models.DBConnectionTestResult], + structure=Sequence[mdls.DBConnectionTestResult], query_params={"tests": tests}, transport_options=transport_options, ), @@ -2804,20 +2846,20 @@ def test_connection( # # Unsupported tests in the request will be ignored. # - # PUT /connections/test -> Sequence[models.DBConnectionTestResult] + # PUT /connections/test -> Sequence[mdls.DBConnectionTestResult] def test_connection_config( self, - body: models.WriteDBConnection, + body: mdls.WriteDBConnection, # Array of names of tests to run - tests: Optional[models.DelimSequence[str]] = None, + tests: Optional[mdls.DelimSequence[str]] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> Sequence[models.DBConnectionTestResult]: + ) -> Sequence[mdls.DBConnectionTestResult]: """Test Connection Configuration""" response = cast( - Sequence[models.DBConnectionTestResult], + Sequence[mdls.DBConnectionTestResult], self.put( path="/connections/test", - structure=Sequence[models.DBConnectionTestResult], + structure=Sequence[mdls.DBConnectionTestResult], query_params={"tests": tests}, body=body, transport_options=transport_options, @@ -2827,19 +2869,19 @@ def test_connection_config( # ### Get information about all dialects. # - # GET /dialect_info -> Sequence[models.DialectInfo] + # GET /dialect_info -> Sequence[mdls.DialectInfo] def all_dialect_infos( self, # Requested fields. fields: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> Sequence[models.DialectInfo]: + ) -> Sequence[mdls.DialectInfo]: """Get All Dialect Infos""" response = cast( - Sequence[models.DialectInfo], + Sequence[mdls.DialectInfo], self.get( path="/dialect_info", - structure=Sequence[models.DialectInfo], + structure=Sequence[mdls.DialectInfo], query_params={"fields": fields}, transport_options=transport_options, ), @@ -2850,7 +2892,7 @@ def all_dialect_infos( # # This is an OAuth Application which Looker uses to access external systems. # - # GET /external_oauth_applications -> Sequence[models.ExternalOauthApplication] + # GET /external_oauth_applications -> Sequence[mdls.ExternalOauthApplication] def all_external_oauth_applications( self, # Application name @@ -2858,13 +2900,13 @@ def all_external_oauth_applications( # Application Client ID client_id: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> Sequence[models.ExternalOauthApplication]: + ) -> Sequence[mdls.ExternalOauthApplication]: """Get All External OAuth Applications""" response = cast( - Sequence[models.ExternalOauthApplication], + Sequence[mdls.ExternalOauthApplication], self.get( path="/external_oauth_applications", - structure=Sequence[models.ExternalOauthApplication], + structure=Sequence[mdls.ExternalOauthApplication], query_params={"name": name, "client_id": client_id}, transport_options=transport_options, ), @@ -2875,18 +2917,18 @@ def all_external_oauth_applications( # # This is an OAuth Application which Looker uses to access external systems. # - # POST /external_oauth_applications -> models.ExternalOauthApplication + # POST /external_oauth_applications -> mdls.ExternalOauthApplication def create_external_oauth_application( self, - body: models.WriteExternalOauthApplication, + body: mdls.WriteExternalOauthApplication, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.ExternalOauthApplication: + ) -> mdls.ExternalOauthApplication: """Create External OAuth Application""" response = cast( - models.ExternalOauthApplication, + mdls.ExternalOauthApplication, self.post( path="/external_oauth_applications", - structure=models.ExternalOauthApplication, + structure=mdls.ExternalOauthApplication, body=body, transport_options=transport_options, ), @@ -2895,18 +2937,18 @@ def create_external_oauth_application( # ### Create OAuth User state. # - # POST /external_oauth_applications/user_state -> models.CreateOAuthApplicationUserStateResponse + # POST /external_oauth_applications/user_state -> mdls.CreateOAuthApplicationUserStateResponse def create_oauth_application_user_state( self, - body: models.CreateOAuthApplicationUserStateRequest, + body: mdls.CreateOAuthApplicationUserStateRequest, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.CreateOAuthApplicationUserStateResponse: + ) -> mdls.CreateOAuthApplicationUserStateResponse: """Create Create OAuth user state.""" response = cast( - models.CreateOAuthApplicationUserStateResponse, + mdls.CreateOAuthApplicationUserStateResponse, self.post( path="/external_oauth_applications/user_state", - structure=models.CreateOAuthApplicationUserStateResponse, + structure=mdls.CreateOAuthApplicationUserStateResponse, body=body, transport_options=transport_options, ), @@ -2915,19 +2957,19 @@ def create_oauth_application_user_state( # ### Get information about all SSH Servers. # - # GET /ssh_servers -> Sequence[models.SshServer] + # GET /ssh_servers -> Sequence[mdls.SshServer] def all_ssh_servers( self, # Requested fields. fields: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> Sequence[models.SshServer]: + ) -> Sequence[mdls.SshServer]: """Get All SSH Servers""" response = cast( - Sequence[models.SshServer], + Sequence[mdls.SshServer], self.get( path="/ssh_servers", - structure=Sequence[models.SshServer], + structure=Sequence[mdls.SshServer], query_params={"fields": fields}, transport_options=transport_options, ), @@ -2936,18 +2978,18 @@ def all_ssh_servers( # ### Create an SSH Server. # - # POST /ssh_servers -> models.SshServer + # POST /ssh_servers -> mdls.SshServer def create_ssh_server( self, - body: models.WriteSshServer, + body: mdls.WriteSshServer, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.SshServer: + ) -> mdls.SshServer: """Create SSH Server""" response = cast( - models.SshServer, + mdls.SshServer, self.post( path="/ssh_servers", - structure=models.SshServer, + structure=mdls.SshServer, body=body, transport_options=transport_options, ), @@ -2956,20 +2998,20 @@ def create_ssh_server( # ### Get information about an SSH Server. # - # GET /ssh_server/{ssh_server_id} -> models.SshServer + # GET /ssh_server/{ssh_server_id} -> mdls.SshServer def ssh_server( self, # Id of SSH Server ssh_server_id: str, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.SshServer: + ) -> mdls.SshServer: """Get SSH Server""" ssh_server_id = self.encode_path_param(ssh_server_id) response = cast( - models.SshServer, + mdls.SshServer, self.get( path=f"/ssh_server/{ssh_server_id}", - structure=models.SshServer, + structure=mdls.SshServer, transport_options=transport_options, ), ) @@ -2977,21 +3019,21 @@ def ssh_server( # ### Update an SSH Server. # - # PATCH /ssh_server/{ssh_server_id} -> models.SshServer + # PATCH /ssh_server/{ssh_server_id} -> mdls.SshServer def update_ssh_server( self, # Id of SSH Server ssh_server_id: str, - body: models.WriteSshServer, + body: mdls.WriteSshServer, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.SshServer: + ) -> mdls.SshServer: """Update SSH Server""" ssh_server_id = self.encode_path_param(ssh_server_id) response = cast( - models.SshServer, + mdls.SshServer, self.patch( path=f"/ssh_server/{ssh_server_id}", - structure=models.SshServer, + structure=mdls.SshServer, body=body, transport_options=transport_options, ), @@ -3021,20 +3063,20 @@ def delete_ssh_server( # ### Test the SSH Server # - # GET /ssh_server/{ssh_server_id}/test -> models.SshServer + # GET /ssh_server/{ssh_server_id}/test -> mdls.SshServer def test_ssh_server( self, # Id of SSH Server ssh_server_id: str, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.SshServer: + ) -> mdls.SshServer: """Test SSH Server""" ssh_server_id = self.encode_path_param(ssh_server_id) response = cast( - models.SshServer, + mdls.SshServer, self.get( path=f"/ssh_server/{ssh_server_id}/test", - structure=models.SshServer, + structure=mdls.SshServer, transport_options=transport_options, ), ) @@ -3042,19 +3084,19 @@ def test_ssh_server( # ### Get information about all SSH Tunnels. # - # GET /ssh_tunnels -> Sequence[models.SshTunnel] + # GET /ssh_tunnels -> Sequence[mdls.SshTunnel] def all_ssh_tunnels( self, # Requested fields. fields: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> Sequence[models.SshTunnel]: + ) -> Sequence[mdls.SshTunnel]: """Get All SSH Tunnels""" response = cast( - Sequence[models.SshTunnel], + Sequence[mdls.SshTunnel], self.get( path="/ssh_tunnels", - structure=Sequence[models.SshTunnel], + structure=Sequence[mdls.SshTunnel], query_params={"fields": fields}, transport_options=transport_options, ), @@ -3063,18 +3105,18 @@ def all_ssh_tunnels( # ### Create an SSH Tunnel # - # POST /ssh_tunnels -> models.SshTunnel + # POST /ssh_tunnels -> mdls.SshTunnel def create_ssh_tunnel( self, - body: models.WriteSshTunnel, + body: mdls.WriteSshTunnel, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.SshTunnel: + ) -> mdls.SshTunnel: """Create SSH Tunnel""" response = cast( - models.SshTunnel, + mdls.SshTunnel, self.post( path="/ssh_tunnels", - structure=models.SshTunnel, + structure=mdls.SshTunnel, body=body, transport_options=transport_options, ), @@ -3083,20 +3125,20 @@ def create_ssh_tunnel( # ### Get information about an SSH Tunnel. # - # GET /ssh_tunnel/{ssh_tunnel_id} -> models.SshTunnel + # GET /ssh_tunnel/{ssh_tunnel_id} -> mdls.SshTunnel def ssh_tunnel( self, # Id of SSH Tunnel ssh_tunnel_id: str, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.SshTunnel: + ) -> mdls.SshTunnel: """Get SSH Tunnel""" ssh_tunnel_id = self.encode_path_param(ssh_tunnel_id) response = cast( - models.SshTunnel, + mdls.SshTunnel, self.get( path=f"/ssh_tunnel/{ssh_tunnel_id}", - structure=models.SshTunnel, + structure=mdls.SshTunnel, transport_options=transport_options, ), ) @@ -3104,21 +3146,21 @@ def ssh_tunnel( # ### Update an SSH Tunnel # - # PATCH /ssh_tunnel/{ssh_tunnel_id} -> models.SshTunnel + # PATCH /ssh_tunnel/{ssh_tunnel_id} -> mdls.SshTunnel def update_ssh_tunnel( self, # Id of SSH Tunnel ssh_tunnel_id: str, - body: models.WriteSshTunnel, + body: mdls.WriteSshTunnel, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.SshTunnel: + ) -> mdls.SshTunnel: """Update SSH Tunnel""" ssh_tunnel_id = self.encode_path_param(ssh_tunnel_id) response = cast( - models.SshTunnel, + mdls.SshTunnel, self.patch( path=f"/ssh_tunnel/{ssh_tunnel_id}", - structure=models.SshTunnel, + structure=mdls.SshTunnel, body=body, transport_options=transport_options, ), @@ -3148,20 +3190,20 @@ def delete_ssh_tunnel( # ### Test the SSH Tunnel # - # GET /ssh_tunnel/{ssh_tunnel_id}/test -> models.SshTunnel + # GET /ssh_tunnel/{ssh_tunnel_id}/test -> mdls.SshTunnel def test_ssh_tunnel( self, # Id of SSH Tunnel ssh_tunnel_id: str, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.SshTunnel: + ) -> mdls.SshTunnel: """Test SSH Tunnel""" ssh_tunnel_id = self.encode_path_param(ssh_tunnel_id) response = cast( - models.SshTunnel, + mdls.SshTunnel, self.get( path=f"/ssh_tunnel/{ssh_tunnel_id}/test", - structure=models.SshTunnel, + structure=mdls.SshTunnel, transport_options=transport_options, ), ) @@ -3171,17 +3213,17 @@ def test_ssh_tunnel( # # Get the public key created for this instance to identify itself to a remote SSH server. # - # GET /ssh_public_key -> models.SshPublicKey + # GET /ssh_public_key -> mdls.SshPublicKey def ssh_public_key( self, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.SshPublicKey: + ) -> mdls.SshPublicKey: """Get SSH Public Key""" response = cast( - models.SshPublicKey, + mdls.SshPublicKey, self.get( path="/ssh_public_key", - structure=models.SshPublicKey, + structure=mdls.SshPublicKey, transport_options=transport_options, ), ) @@ -3214,7 +3256,7 @@ def ssh_public_key( # # Boolean search params accept only "true" and "false" as values. # - # GET /content_favorite/search -> Sequence[models.ContentFavorite] + # GET /content_favorite/search -> Sequence[mdls.ContentFavorite] def search_content_favorites( self, # Match content favorite id(s) @@ -3240,13 +3282,13 @@ def search_content_favorites( # Combine given search criteria in a boolean OR expression filter_or: Optional[bool] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> Sequence[models.ContentFavorite]: + ) -> Sequence[mdls.ContentFavorite]: """Search Favorite Contents""" response = cast( - Sequence[models.ContentFavorite], + Sequence[mdls.ContentFavorite], self.get( path="/content_favorite/search", - structure=Sequence[models.ContentFavorite], + structure=Sequence[mdls.ContentFavorite], query_params={ "id": id, "user_id": user_id, @@ -3267,7 +3309,7 @@ def search_content_favorites( # ### Get favorite content by its id # - # GET /content_favorite/{content_favorite_id} -> models.ContentFavorite + # GET /content_favorite/{content_favorite_id} -> mdls.ContentFavorite def content_favorite( self, # Id of favorite content @@ -3275,13 +3317,13 @@ def content_favorite( # Requested fields. fields: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.ContentFavorite: + ) -> mdls.ContentFavorite: """Get Favorite Content""" response = cast( - models.ContentFavorite, + mdls.ContentFavorite, self.get( path=f"/content_favorite/{content_favorite_id}", - structure=models.ContentFavorite, + structure=mdls.ContentFavorite, query_params={"fields": fields}, transport_options=transport_options, ), @@ -3310,18 +3352,18 @@ def delete_content_favorite( # ### Create favorite content # - # POST /content_favorite -> models.ContentFavorite + # POST /content_favorite -> mdls.ContentFavorite def create_content_favorite( self, - body: models.WriteContentFavorite, + body: mdls.WriteContentFavorite, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.ContentFavorite: + ) -> mdls.ContentFavorite: """Create Favorite Content""" response = cast( - models.ContentFavorite, + mdls.ContentFavorite, self.post( path="/content_favorite", - structure=models.ContentFavorite, + structure=mdls.ContentFavorite, body=body, transport_options=transport_options, ), @@ -3330,7 +3372,7 @@ def create_content_favorite( # ### Get information about all content metadata in a space. # - # GET /content_metadata -> Sequence[models.ContentMeta] + # GET /content_metadata -> Sequence[mdls.ContentMeta] def all_content_metadatas( self, # Parent space of content. @@ -3338,13 +3380,13 @@ def all_content_metadatas( # Requested fields. fields: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> Sequence[models.ContentMeta]: + ) -> Sequence[mdls.ContentMeta]: """Get All Content Metadatas""" response = cast( - Sequence[models.ContentMeta], + Sequence[mdls.ContentMeta], self.get( path="/content_metadata", - structure=Sequence[models.ContentMeta], + structure=Sequence[mdls.ContentMeta], query_params={"parent_id": parent_id, "fields": fields}, transport_options=transport_options, ), @@ -3353,7 +3395,7 @@ def all_content_metadatas( # ### Get information about an individual content metadata record. # - # GET /content_metadata/{content_metadata_id} -> models.ContentMeta + # GET /content_metadata/{content_metadata_id} -> mdls.ContentMeta def content_metadata( self, # Id of content metadata @@ -3361,13 +3403,13 @@ def content_metadata( # Requested fields. fields: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.ContentMeta: + ) -> mdls.ContentMeta: """Get Content Metadata""" response = cast( - models.ContentMeta, + mdls.ContentMeta, self.get( path=f"/content_metadata/{content_metadata_id}", - structure=models.ContentMeta, + structure=mdls.ContentMeta, query_params={"fields": fields}, transport_options=transport_options, ), @@ -3376,20 +3418,20 @@ def content_metadata( # ### Move a piece of content. # - # PATCH /content_metadata/{content_metadata_id} -> models.ContentMeta + # PATCH /content_metadata/{content_metadata_id} -> mdls.ContentMeta def update_content_metadata( self, # Id of content metadata content_metadata_id: int, - body: models.WriteContentMeta, + body: mdls.WriteContentMeta, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.ContentMeta: + ) -> mdls.ContentMeta: """Update Content Metadata""" response = cast( - models.ContentMeta, + mdls.ContentMeta, self.patch( path=f"/content_metadata/{content_metadata_id}", - structure=models.ContentMeta, + structure=mdls.ContentMeta, body=body, transport_options=transport_options, ), @@ -3398,7 +3440,7 @@ def update_content_metadata( # ### All content metadata access records for a content metadata item. # - # GET /content_metadata_access -> Sequence[models.ContentMetaGroupUser] + # GET /content_metadata_access -> Sequence[mdls.ContentMetaGroupUser] def all_content_metadata_accesses( self, # Id of content metadata @@ -3406,13 +3448,13 @@ def all_content_metadata_accesses( # Requested fields. fields: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> Sequence[models.ContentMetaGroupUser]: + ) -> Sequence[mdls.ContentMetaGroupUser]: """Get All Content Metadata Accesses""" response = cast( - Sequence[models.ContentMetaGroupUser], + Sequence[mdls.ContentMetaGroupUser], self.get( path="/content_metadata_access", - structure=Sequence[models.ContentMetaGroupUser], + structure=Sequence[mdls.ContentMetaGroupUser], query_params={ "content_metadata_id": content_metadata_id, "fields": fields, @@ -3424,20 +3466,20 @@ def all_content_metadata_accesses( # ### Create content metadata access. # - # POST /content_metadata_access -> models.ContentMetaGroupUser + # POST /content_metadata_access -> mdls.ContentMetaGroupUser def create_content_metadata_access( self, - body: models.ContentMetaGroupUser, + body: mdls.ContentMetaGroupUser, # Optionally sends notification email when granting access to a board. send_boards_notification_email: Optional[bool] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.ContentMetaGroupUser: + ) -> mdls.ContentMetaGroupUser: """Create Content Metadata Access""" response = cast( - models.ContentMetaGroupUser, + mdls.ContentMetaGroupUser, self.post( path="/content_metadata_access", - structure=models.ContentMetaGroupUser, + structure=mdls.ContentMetaGroupUser, query_params={ "send_boards_notification_email": send_boards_notification_email }, @@ -3449,21 +3491,21 @@ def create_content_metadata_access( # ### Update type of access for content metadata. # - # PUT /content_metadata_access/{content_metadata_access_id} -> models.ContentMetaGroupUser + # PUT /content_metadata_access/{content_metadata_access_id} -> mdls.ContentMetaGroupUser def update_content_metadata_access( self, # Id of content metadata access content_metadata_access_id: str, - body: models.ContentMetaGroupUser, + body: mdls.ContentMetaGroupUser, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.ContentMetaGroupUser: + ) -> mdls.ContentMetaGroupUser: """Update Content Metadata Access""" content_metadata_access_id = self.encode_path_param(content_metadata_access_id) response = cast( - models.ContentMetaGroupUser, + mdls.ContentMetaGroupUser, self.put( path=f"/content_metadata_access/{content_metadata_access_id}", - structure=models.ContentMetaGroupUser, + structure=mdls.ContentMetaGroupUser, body=body, transport_options=transport_options, ), @@ -3536,19 +3578,19 @@ def content_thumbnail( # Performs validation of all looks and dashboards # Returns a list of errors found as well as metadata about the content validation run. # - # GET /content_validation -> models.ContentValidation + # GET /content_validation -> mdls.ContentValidation def content_validation( self, # Requested fields. fields: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.ContentValidation: + ) -> mdls.ContentValidation: """Validate Content""" response = cast( - models.ContentValidation, + mdls.ContentValidation, self.get( path="/content_validation", - structure=models.ContentValidation, + structure=mdls.ContentValidation, query_params={"fields": fields}, transport_options=transport_options, ), @@ -3578,7 +3620,7 @@ def content_validation( # # Boolean search params accept only "true" and "false" as values. # - # GET /content_view/search -> Sequence[models.ContentView] + # GET /content_view/search -> Sequence[mdls.ContentView] def search_content_views( self, # Match view count @@ -3608,13 +3650,13 @@ def search_content_views( # Combine given search criteria in a boolean OR expression filter_or: Optional[bool] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> Sequence[models.ContentView]: + ) -> Sequence[mdls.ContentView]: """Search Content Views""" response = cast( - Sequence[models.ContentView], + Sequence[mdls.ContentView], self.get( path="/content_view/search", - structure=Sequence[models.ContentView], + structure=Sequence[mdls.ContentView], query_params={ "view_count": view_count, "group_id": group_id, @@ -3679,19 +3721,19 @@ def vector_thumbnail( # # Find **deleted dashboards** with [search_dashboards()](#!/Dashboard/search_dashboards) # - # GET /dashboards -> Sequence[models.DashboardBase] + # GET /dashboards -> Sequence[mdls.DashboardBase] def all_dashboards( self, # Requested fields. fields: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> Sequence[models.DashboardBase]: + ) -> Sequence[mdls.DashboardBase]: """Get All Dashboards""" response = cast( - Sequence[models.DashboardBase], + Sequence[mdls.DashboardBase], self.get( path="/dashboards", - structure=Sequence[models.DashboardBase], + structure=Sequence[mdls.DashboardBase], query_params={"fields": fields}, transport_options=transport_options, ), @@ -3713,18 +3755,18 @@ def all_dashboards( # # You can **permanently delete** an existing dashboard with [delete_dashboard()](#!/Dashboard/delete_dashboard) # - # POST /dashboards -> models.Dashboard + # POST /dashboards -> mdls.Dashboard def create_dashboard( self, - body: models.WriteDashboard, + body: mdls.WriteDashboard, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.Dashboard: + ) -> mdls.Dashboard: """Create Dashboard""" response = cast( - models.Dashboard, + mdls.Dashboard, self.post( path="/dashboards", - structure=models.Dashboard, + structure=mdls.Dashboard, body=body, transport_options=transport_options, ), @@ -3761,7 +3803,7 @@ def create_dashboard( # # Get a **single dashboard** by id with [dashboard()](#!/Dashboard/dashboard) # - # GET /dashboards/search -> Sequence[models.Dashboard] + # GET /dashboards/search -> Sequence[mdls.Dashboard] def search_dashboards( self, # Match dashboard id. @@ -3803,13 +3845,13 @@ def search_dashboards( # Combine given search criteria in a boolean OR expression filter_or: Optional[bool] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> Sequence[models.Dashboard]: + ) -> Sequence[mdls.Dashboard]: """Search Dashboards""" response = cast( - Sequence[models.Dashboard], + Sequence[mdls.Dashboard], self.get( path="/dashboards/search", - structure=Sequence[models.Dashboard], + structure=Sequence[mdls.Dashboard], query_params={ "id": id, "slug": slug, @@ -3849,26 +3891,26 @@ def search_dashboards( # **Sync** a linked UDD with [sync_lookml_dashboard()](#!/Dashboard/sync_lookml_dashboard) # **Unlink** a linked UDD by setting lookml_link_id to null with [update_dashboard()](#!/Dashboard/update_dashboard) # - # POST /dashboards/{lookml_dashboard_id}/import/{space_id} -> models.Dashboard + # POST /dashboards/{lookml_dashboard_id}/import/{space_id} -> mdls.Dashboard def import_lookml_dashboard( self, # Id of LookML dashboard lookml_dashboard_id: str, # Id of space to import the dashboard to space_id: str, - body: Optional[models.WriteDashboard] = None, + body: Optional[mdls.WriteDashboard] = None, # If true, and this dashboard is localized, export it with the raw keys, not localized. raw_locale: Optional[bool] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.Dashboard: + ) -> mdls.Dashboard: """Import LookML Dashboard""" lookml_dashboard_id = self.encode_path_param(lookml_dashboard_id) space_id = self.encode_path_param(space_id) response = cast( - models.Dashboard, + mdls.Dashboard, self.post( path=f"/dashboards/{lookml_dashboard_id}/import/{space_id}", - structure=models.Dashboard, + structure=mdls.Dashboard, query_params={"raw_locale": raw_locale}, body=body, transport_options=transport_options, @@ -3891,7 +3933,7 @@ def sync_lookml_dashboard( self, # Id of LookML dashboard, in the form 'model::dashboardname' lookml_dashboard_id: str, - body: models.WriteDashboard, + body: mdls.WriteDashboard, # If true, and this dashboard is localized, export it with the raw keys, not localized. raw_locale: Optional[bool] = None, transport_options: Optional[transport.TransportOptions] = None, @@ -3918,7 +3960,7 @@ def sync_lookml_dashboard( # # You can **Search** for dashboards with [search_dashboards()](#!/Dashboard/search_dashboards) # - # GET /dashboards/{dashboard_id} -> models.Dashboard + # GET /dashboards/{dashboard_id} -> mdls.Dashboard def dashboard( self, # Id of dashboard @@ -3926,14 +3968,14 @@ def dashboard( # Requested fields. fields: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.Dashboard: + ) -> mdls.Dashboard: """Get Dashboard""" dashboard_id = self.encode_path_param(dashboard_id) response = cast( - models.Dashboard, + mdls.Dashboard, self.get( path=f"/dashboards/{dashboard_id}", - structure=models.Dashboard, + structure=mdls.Dashboard, query_params={"fields": fields}, transport_options=transport_options, ), @@ -3951,21 +3993,21 @@ def dashboard( # If you receive a 422 error response when updating a dashboard, be sure to look at the # response body for information about exactly which fields are missing or contain invalid data. # - # PATCH /dashboards/{dashboard_id} -> models.Dashboard + # PATCH /dashboards/{dashboard_id} -> mdls.Dashboard def update_dashboard( self, # Id of dashboard dashboard_id: str, - body: models.WriteDashboard, + body: mdls.WriteDashboard, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.Dashboard: + ) -> mdls.Dashboard: """Update Dashboard""" dashboard_id = self.encode_path_param(dashboard_id) response = cast( - models.Dashboard, + mdls.Dashboard, self.patch( path=f"/dashboards/{dashboard_id}", - structure=models.Dashboard, + structure=mdls.Dashboard, body=body, transport_options=transport_options, ), @@ -4003,20 +4045,20 @@ def delete_dashboard( # # Returns a JSON object that contains the dashboard id and Aggregate Table lookml # - # GET /dashboards/aggregate_table_lookml/{dashboard_id} -> models.DashboardAggregateTableLookml + # GET /dashboards/aggregate_table_lookml/{dashboard_id} -> mdls.DashboardAggregateTableLookml def dashboard_aggregate_table_lookml( self, # Id of dashboard dashboard_id: str, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.DashboardAggregateTableLookml: + ) -> mdls.DashboardAggregateTableLookml: """Get Aggregate Table LookML for a dashboard""" dashboard_id = self.encode_path_param(dashboard_id) response = cast( - models.DashboardAggregateTableLookml, + mdls.DashboardAggregateTableLookml, self.get( path=f"/dashboards/aggregate_table_lookml/{dashboard_id}", - structure=models.DashboardAggregateTableLookml, + structure=mdls.DashboardAggregateTableLookml, transport_options=transport_options, ), ) @@ -4026,20 +4068,20 @@ def dashboard_aggregate_table_lookml( # # Returns a JSON object that contains the dashboard id and the full lookml # - # GET /dashboards/lookml/{dashboard_id} -> models.DashboardLookml + # GET /dashboards/lookml/{dashboard_id} -> mdls.DashboardLookml def dashboard_lookml( self, # Id of dashboard dashboard_id: str, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.DashboardLookml: + ) -> mdls.DashboardLookml: """Get lookml of a UDD""" dashboard_id = self.encode_path_param(dashboard_id) response = cast( - models.DashboardLookml, + mdls.DashboardLookml, self.get( path=f"/dashboards/lookml/{dashboard_id}", - structure=models.DashboardLookml, + structure=mdls.DashboardLookml, transport_options=transport_options, ), ) @@ -4052,7 +4094,7 @@ def dashboard_lookml( # `dashboard_id` and `folder_id` are required. # `dashboard_id` and `folder_id` must already exist, and `folder_id` must be different from the current `folder_id` of the dashboard. # - # PATCH /dashboards/{dashboard_id}/move -> models.Dashboard + # PATCH /dashboards/{dashboard_id}/move -> mdls.Dashboard def move_dashboard( self, # Dashboard id to move. @@ -4060,14 +4102,14 @@ def move_dashboard( # Folder id to move to. folder_id: str, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.Dashboard: + ) -> mdls.Dashboard: """Move Dashboard""" dashboard_id = self.encode_path_param(dashboard_id) response = cast( - models.Dashboard, + mdls.Dashboard, self.patch( path=f"/dashboards/{dashboard_id}/move", - structure=models.Dashboard, + structure=mdls.Dashboard, query_params={"folder_id": folder_id}, transport_options=transport_options, ), @@ -4084,7 +4126,7 @@ def move_dashboard( # If a dashboard with the same title already exists in the target folder, the copy will have '(copy)' # or '(copy <# of copies>)' appended. # - # POST /dashboards/{dashboard_id}/copy -> models.Dashboard + # POST /dashboards/{dashboard_id}/copy -> mdls.Dashboard def copy_dashboard( self, # Dashboard id to copy. @@ -4092,14 +4134,14 @@ def copy_dashboard( # Folder id to copy to. folder_id: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.Dashboard: + ) -> mdls.Dashboard: """Copy Dashboard""" dashboard_id = self.encode_path_param(dashboard_id) response = cast( - models.Dashboard, + mdls.Dashboard, self.post( path=f"/dashboards/{dashboard_id}/copy", - structure=models.Dashboard, + structure=mdls.Dashboard, query_params={"folder_id": folder_id}, transport_options=transport_options, ), @@ -4131,7 +4173,7 @@ def copy_dashboard( # # Boolean search params accept only "true" and "false" as values. # - # GET /dashboard_elements/search -> Sequence[models.DashboardElement] + # GET /dashboard_elements/search -> Sequence[mdls.DashboardElement] def search_dashboard_elements( self, # Select elements that refer to a given dashboard id @@ -4149,13 +4191,13 @@ def search_dashboard_elements( # Fields to sort by. Sortable fields: [:look_id, :dashboard_id, :deleted, :title] sorts: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> Sequence[models.DashboardElement]: + ) -> Sequence[mdls.DashboardElement]: """Search Dashboard Elements""" response = cast( - Sequence[models.DashboardElement], + Sequence[mdls.DashboardElement], self.get( path="/dashboard_elements/search", - structure=Sequence[models.DashboardElement], + structure=Sequence[mdls.DashboardElement], query_params={ "dashboard_id": dashboard_id, "look_id": look_id, @@ -4172,7 +4214,7 @@ def search_dashboard_elements( # ### Get information about the dashboard element with a specific id. # - # GET /dashboard_elements/{dashboard_element_id} -> models.DashboardElement + # GET /dashboard_elements/{dashboard_element_id} -> mdls.DashboardElement def dashboard_element( self, # Id of dashboard element @@ -4180,14 +4222,14 @@ def dashboard_element( # Requested fields. fields: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.DashboardElement: + ) -> mdls.DashboardElement: """Get DashboardElement""" dashboard_element_id = self.encode_path_param(dashboard_element_id) response = cast( - models.DashboardElement, + mdls.DashboardElement, self.get( path=f"/dashboard_elements/{dashboard_element_id}", - structure=models.DashboardElement, + structure=mdls.DashboardElement, query_params={"fields": fields}, transport_options=transport_options, ), @@ -4196,23 +4238,23 @@ def dashboard_element( # ### Update the dashboard element with a specific id. # - # PATCH /dashboard_elements/{dashboard_element_id} -> models.DashboardElement + # PATCH /dashboard_elements/{dashboard_element_id} -> mdls.DashboardElement def update_dashboard_element( self, # Id of dashboard element dashboard_element_id: str, - body: models.WriteDashboardElement, + body: mdls.WriteDashboardElement, # Requested fields. fields: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.DashboardElement: + ) -> mdls.DashboardElement: """Update DashboardElement""" dashboard_element_id = self.encode_path_param(dashboard_element_id) response = cast( - models.DashboardElement, + mdls.DashboardElement, self.patch( path=f"/dashboard_elements/{dashboard_element_id}", - structure=models.DashboardElement, + structure=mdls.DashboardElement, query_params={"fields": fields}, body=body, transport_options=transport_options, @@ -4243,7 +4285,7 @@ def delete_dashboard_element( # ### Get information about all the dashboard elements on a dashboard with a specific id. # - # GET /dashboards/{dashboard_id}/dashboard_elements -> Sequence[models.DashboardElement] + # GET /dashboards/{dashboard_id}/dashboard_elements -> Sequence[mdls.DashboardElement] def dashboard_dashboard_elements( self, # Id of dashboard @@ -4251,14 +4293,14 @@ def dashboard_dashboard_elements( # Requested fields. fields: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> Sequence[models.DashboardElement]: + ) -> Sequence[mdls.DashboardElement]: """Get All DashboardElements""" dashboard_id = self.encode_path_param(dashboard_id) response = cast( - Sequence[models.DashboardElement], + Sequence[mdls.DashboardElement], self.get( path=f"/dashboards/{dashboard_id}/dashboard_elements", - structure=Sequence[models.DashboardElement], + structure=Sequence[mdls.DashboardElement], query_params={"fields": fields}, transport_options=transport_options, ), @@ -4267,20 +4309,20 @@ def dashboard_dashboard_elements( # ### Create a dashboard element on the dashboard with a specific id. # - # POST /dashboard_elements -> models.DashboardElement + # POST /dashboard_elements -> mdls.DashboardElement def create_dashboard_element( self, - body: models.WriteDashboardElement, + body: mdls.WriteDashboardElement, # Requested fields. fields: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.DashboardElement: + ) -> mdls.DashboardElement: """Create DashboardElement""" response = cast( - models.DashboardElement, + mdls.DashboardElement, self.post( path="/dashboard_elements", - structure=models.DashboardElement, + structure=mdls.DashboardElement, query_params={"fields": fields}, body=body, transport_options=transport_options, @@ -4290,7 +4332,7 @@ def create_dashboard_element( # ### Get information about the dashboard filters with a specific id. # - # GET /dashboard_filters/{dashboard_filter_id} -> models.DashboardFilter + # GET /dashboard_filters/{dashboard_filter_id} -> mdls.DashboardFilter def dashboard_filter( self, # Id of dashboard filters @@ -4298,14 +4340,14 @@ def dashboard_filter( # Requested fields. fields: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.DashboardFilter: + ) -> mdls.DashboardFilter: """Get Dashboard Filter""" dashboard_filter_id = self.encode_path_param(dashboard_filter_id) response = cast( - models.DashboardFilter, + mdls.DashboardFilter, self.get( path=f"/dashboard_filters/{dashboard_filter_id}", - structure=models.DashboardFilter, + structure=mdls.DashboardFilter, query_params={"fields": fields}, transport_options=transport_options, ), @@ -4314,23 +4356,23 @@ def dashboard_filter( # ### Update the dashboard filter with a specific id. # - # PATCH /dashboard_filters/{dashboard_filter_id} -> models.DashboardFilter + # PATCH /dashboard_filters/{dashboard_filter_id} -> mdls.DashboardFilter def update_dashboard_filter( self, # Id of dashboard filter dashboard_filter_id: str, - body: models.WriteDashboardFilter, + body: mdls.WriteDashboardFilter, # Requested fields. fields: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.DashboardFilter: + ) -> mdls.DashboardFilter: """Update Dashboard Filter""" dashboard_filter_id = self.encode_path_param(dashboard_filter_id) response = cast( - models.DashboardFilter, + mdls.DashboardFilter, self.patch( path=f"/dashboard_filters/{dashboard_filter_id}", - structure=models.DashboardFilter, + structure=mdls.DashboardFilter, query_params={"fields": fields}, body=body, transport_options=transport_options, @@ -4361,7 +4403,7 @@ def delete_dashboard_filter( # ### Get information about all the dashboard filters on a dashboard with a specific id. # - # GET /dashboards/{dashboard_id}/dashboard_filters -> Sequence[models.DashboardFilter] + # GET /dashboards/{dashboard_id}/dashboard_filters -> Sequence[mdls.DashboardFilter] def dashboard_dashboard_filters( self, # Id of dashboard @@ -4369,14 +4411,14 @@ def dashboard_dashboard_filters( # Requested fields. fields: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> Sequence[models.DashboardFilter]: + ) -> Sequence[mdls.DashboardFilter]: """Get All Dashboard Filters""" dashboard_id = self.encode_path_param(dashboard_id) response = cast( - Sequence[models.DashboardFilter], + Sequence[mdls.DashboardFilter], self.get( path=f"/dashboards/{dashboard_id}/dashboard_filters", - structure=Sequence[models.DashboardFilter], + structure=Sequence[mdls.DashboardFilter], query_params={"fields": fields}, transport_options=transport_options, ), @@ -4385,20 +4427,20 @@ def dashboard_dashboard_filters( # ### Create a dashboard filter on the dashboard with a specific id. # - # POST /dashboard_filters -> models.DashboardFilter + # POST /dashboard_filters -> mdls.DashboardFilter def create_dashboard_filter( self, - body: models.WriteCreateDashboardFilter, + body: mdls.WriteCreateDashboardFilter, # Requested fields fields: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.DashboardFilter: + ) -> mdls.DashboardFilter: """Create Dashboard Filter""" response = cast( - models.DashboardFilter, + mdls.DashboardFilter, self.post( path="/dashboard_filters", - structure=models.DashboardFilter, + structure=mdls.DashboardFilter, query_params={"fields": fields}, body=body, transport_options=transport_options, @@ -4408,7 +4450,7 @@ def create_dashboard_filter( # ### Get information about the dashboard elements with a specific id. # - # GET /dashboard_layout_components/{dashboard_layout_component_id} -> models.DashboardLayoutComponent + # GET /dashboard_layout_components/{dashboard_layout_component_id} -> mdls.DashboardLayoutComponent def dashboard_layout_component( self, # Id of dashboard layout component @@ -4416,16 +4458,16 @@ def dashboard_layout_component( # Requested fields. fields: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.DashboardLayoutComponent: + ) -> mdls.DashboardLayoutComponent: """Get DashboardLayoutComponent""" dashboard_layout_component_id = self.encode_path_param( dashboard_layout_component_id ) response = cast( - models.DashboardLayoutComponent, + mdls.DashboardLayoutComponent, self.get( path=f"/dashboard_layout_components/{dashboard_layout_component_id}", - structure=models.DashboardLayoutComponent, + structure=mdls.DashboardLayoutComponent, query_params={"fields": fields}, transport_options=transport_options, ), @@ -4434,25 +4476,25 @@ def dashboard_layout_component( # ### Update the dashboard element with a specific id. # - # PATCH /dashboard_layout_components/{dashboard_layout_component_id} -> models.DashboardLayoutComponent + # PATCH /dashboard_layout_components/{dashboard_layout_component_id} -> mdls.DashboardLayoutComponent def update_dashboard_layout_component( self, # Id of dashboard layout component dashboard_layout_component_id: str, - body: models.WriteDashboardLayoutComponent, + body: mdls.WriteDashboardLayoutComponent, # Requested fields. fields: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.DashboardLayoutComponent: + ) -> mdls.DashboardLayoutComponent: """Update DashboardLayoutComponent""" dashboard_layout_component_id = self.encode_path_param( dashboard_layout_component_id ) response = cast( - models.DashboardLayoutComponent, + mdls.DashboardLayoutComponent, self.patch( path=f"/dashboard_layout_components/{dashboard_layout_component_id}", - structure=models.DashboardLayoutComponent, + structure=mdls.DashboardLayoutComponent, query_params={"fields": fields}, body=body, transport_options=transport_options, @@ -4462,7 +4504,7 @@ def update_dashboard_layout_component( # ### Get information about all the dashboard layout components for a dashboard layout with a specific id. # - # GET /dashboard_layouts/{dashboard_layout_id}/dashboard_layout_components -> Sequence[models.DashboardLayoutComponent] + # GET /dashboard_layouts/{dashboard_layout_id}/dashboard_layout_components -> Sequence[mdls.DashboardLayoutComponent] def dashboard_layout_dashboard_layout_components( self, # Id of dashboard layout component @@ -4470,14 +4512,14 @@ def dashboard_layout_dashboard_layout_components( # Requested fields. fields: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> Sequence[models.DashboardLayoutComponent]: + ) -> Sequence[mdls.DashboardLayoutComponent]: """Get All DashboardLayoutComponents""" dashboard_layout_id = self.encode_path_param(dashboard_layout_id) response = cast( - Sequence[models.DashboardLayoutComponent], + Sequence[mdls.DashboardLayoutComponent], self.get( path=f"/dashboard_layouts/{dashboard_layout_id}/dashboard_layout_components", - structure=Sequence[models.DashboardLayoutComponent], + structure=Sequence[mdls.DashboardLayoutComponent], query_params={"fields": fields}, transport_options=transport_options, ), @@ -4486,7 +4528,7 @@ def dashboard_layout_dashboard_layout_components( # ### Get information about the dashboard layouts with a specific id. # - # GET /dashboard_layouts/{dashboard_layout_id} -> models.DashboardLayout + # GET /dashboard_layouts/{dashboard_layout_id} -> mdls.DashboardLayout def dashboard_layout( self, # Id of dashboard layouts @@ -4494,14 +4536,14 @@ def dashboard_layout( # Requested fields. fields: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.DashboardLayout: + ) -> mdls.DashboardLayout: """Get DashboardLayout""" dashboard_layout_id = self.encode_path_param(dashboard_layout_id) response = cast( - models.DashboardLayout, + mdls.DashboardLayout, self.get( path=f"/dashboard_layouts/{dashboard_layout_id}", - structure=models.DashboardLayout, + structure=mdls.DashboardLayout, query_params={"fields": fields}, transport_options=transport_options, ), @@ -4510,23 +4552,23 @@ def dashboard_layout( # ### Update the dashboard layout with a specific id. # - # PATCH /dashboard_layouts/{dashboard_layout_id} -> models.DashboardLayout + # PATCH /dashboard_layouts/{dashboard_layout_id} -> mdls.DashboardLayout def update_dashboard_layout( self, # Id of dashboard layout dashboard_layout_id: str, - body: models.WriteDashboardLayout, + body: mdls.WriteDashboardLayout, # Requested fields. fields: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.DashboardLayout: + ) -> mdls.DashboardLayout: """Update DashboardLayout""" dashboard_layout_id = self.encode_path_param(dashboard_layout_id) response = cast( - models.DashboardLayout, + mdls.DashboardLayout, self.patch( path=f"/dashboard_layouts/{dashboard_layout_id}", - structure=models.DashboardLayout, + structure=mdls.DashboardLayout, query_params={"fields": fields}, body=body, transport_options=transport_options, @@ -4557,7 +4599,7 @@ def delete_dashboard_layout( # ### Get information about all the dashboard elements on a dashboard with a specific id. # - # GET /dashboards/{dashboard_id}/dashboard_layouts -> Sequence[models.DashboardLayout] + # GET /dashboards/{dashboard_id}/dashboard_layouts -> Sequence[mdls.DashboardLayout] def dashboard_dashboard_layouts( self, # Id of dashboard @@ -4565,14 +4607,14 @@ def dashboard_dashboard_layouts( # Requested fields. fields: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> Sequence[models.DashboardLayout]: + ) -> Sequence[mdls.DashboardLayout]: """Get All DashboardLayouts""" dashboard_id = self.encode_path_param(dashboard_id) response = cast( - Sequence[models.DashboardLayout], + Sequence[mdls.DashboardLayout], self.get( path=f"/dashboards/{dashboard_id}/dashboard_layouts", - structure=Sequence[models.DashboardLayout], + structure=Sequence[mdls.DashboardLayout], query_params={"fields": fields}, transport_options=transport_options, ), @@ -4581,20 +4623,20 @@ def dashboard_dashboard_layouts( # ### Create a dashboard layout on the dashboard with a specific id. # - # POST /dashboard_layouts -> models.DashboardLayout + # POST /dashboard_layouts -> mdls.DashboardLayout def create_dashboard_layout( self, - body: models.WriteDashboardLayout, + body: mdls.WriteDashboardLayout, # Requested fields. fields: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.DashboardLayout: + ) -> mdls.DashboardLayout: """Create DashboardLayout""" response = cast( - models.DashboardLayout, + mdls.DashboardLayout, self.post( path="/dashboard_layouts", - structure=models.DashboardLayout, + structure=mdls.DashboardLayout, query_params={"fields": fields}, body=body, transport_options=transport_options, @@ -4608,18 +4650,18 @@ def create_dashboard_layout( # Perform a data action. The data action object can be obtained from query results, and used to perform an arbitrary action. # - # POST /data_actions -> models.DataActionResponse + # POST /data_actions -> mdls.DataActionResponse def perform_data_action( self, - body: models.DataActionRequest, + body: mdls.DataActionRequest, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.DataActionResponse: + ) -> mdls.DataActionResponse: """Send a Data Action""" response = cast( - models.DataActionResponse, + mdls.DataActionResponse, self.post( path="/data_actions", - structure=models.DataActionResponse, + structure=mdls.DataActionResponse, body=body, transport_options=transport_options, ), @@ -4628,18 +4670,18 @@ def perform_data_action( # For some data actions, the remote server may supply a form requesting further user input. This endpoint takes a data action, asks the remote server to generate a form for it, and returns that form to you for presentation to the user. # - # POST /data_actions/form -> models.DataActionForm + # POST /data_actions/form -> mdls.DataActionForm def fetch_remote_data_action_form( self, body: MutableMapping[str, Any], transport_options: Optional[transport.TransportOptions] = None, - ) -> models.DataActionForm: + ) -> mdls.DataActionForm: """Fetch Remote Data Action Form""" response = cast( - models.DataActionForm, + mdls.DataActionForm, self.post( path="/data_actions/form", - structure=models.DataActionForm, + structure=mdls.DataActionForm, body=body, transport_options=transport_options, ), @@ -4652,17 +4694,17 @@ def fetch_remote_data_action_form( # ### Get information about all datagroups. # - # GET /datagroups -> Sequence[models.Datagroup] + # GET /datagroups -> Sequence[mdls.Datagroup] def all_datagroups( self, transport_options: Optional[transport.TransportOptions] = None, - ) -> Sequence[models.Datagroup]: + ) -> Sequence[mdls.Datagroup]: """Get All Datagroups""" response = cast( - Sequence[models.Datagroup], + Sequence[mdls.Datagroup], self.get( path="/datagroups", - structure=Sequence[models.Datagroup], + structure=Sequence[mdls.Datagroup], transport_options=transport_options, ), ) @@ -4670,19 +4712,19 @@ def all_datagroups( # ### Get information about a datagroup. # - # GET /datagroups/{datagroup_id} -> models.Datagroup + # GET /datagroups/{datagroup_id} -> mdls.Datagroup def datagroup( self, # ID of datagroup. datagroup_id: int, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.Datagroup: + ) -> mdls.Datagroup: """Get Datagroup""" response = cast( - models.Datagroup, + mdls.Datagroup, self.get( path=f"/datagroups/{datagroup_id}", - structure=models.Datagroup, + structure=mdls.Datagroup, transport_options=transport_options, ), ) @@ -4690,20 +4732,20 @@ def datagroup( # ### Update a datagroup using the specified params. # - # PATCH /datagroups/{datagroup_id} -> models.Datagroup + # PATCH /datagroups/{datagroup_id} -> mdls.Datagroup def update_datagroup( self, # ID of datagroup. datagroup_id: int, - body: models.WriteDatagroup, + body: mdls.WriteDatagroup, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.Datagroup: + ) -> mdls.Datagroup: """Update Datagroup""" response = cast( - models.Datagroup, + mdls.Datagroup, self.patch( path=f"/datagroups/{datagroup_id}", - structure=models.Datagroup, + structure=mdls.Datagroup, body=body, transport_options=transport_options, ), @@ -4712,11 +4754,67 @@ def update_datagroup( # endregion + # region DerivedTable: View Derived Table graphs + + # ### Discover information about derived tables + # + # GET /derived_table/graph/model/{model} -> mdls.DependencyGraph + def graph_derived_tables_for_model( + self, + # The name of the Lookml model. + model: str, + # The format of the graph. Valid values are [dot]. Default is `dot` + format: Optional[str] = None, + # Color denoting the build status of the graph. Grey = not built, green = built, yellow = building, red = error. + color: Optional[str] = None, + transport_options: Optional[transport.TransportOptions] = None, + ) -> mdls.DependencyGraph: + """Get Derived Table graph for model""" + model = self.encode_path_param(model) + response = cast( + mdls.DependencyGraph, + self.get( + path=f"/derived_table/graph/model/{model}", + structure=mdls.DependencyGraph, + query_params={"format": format, "color": color}, + transport_options=transport_options, + ), + ) + return response + + # ### Get the subgraph representing this derived table and its dependencies. + # + # GET /derived_table/graph/view/{view} -> mdls.DependencyGraph + def graph_derived_tables_for_view( + self, + # The derived table's view name. + view: str, + # The models where this derived table is defined. + models: Optional[str] = None, + # The model directory to look in, either `dev` or `production`. + workspace: Optional[str] = None, + transport_options: Optional[transport.TransportOptions] = None, + ) -> mdls.DependencyGraph: + """Get subgraph of derived table and dependencies""" + view = self.encode_path_param(view) + response = cast( + mdls.DependencyGraph, + self.get( + path=f"/derived_table/graph/view/{view}", + structure=mdls.DependencyGraph, + query_params={"models": models, "workspace": workspace}, + transport_options=transport_options, + ), + ) + return response + + # endregion + # region Folder: Manage Folders # Search for folders by creator id, parent id, name, etc # - # GET /folders/search -> Sequence[models.Folder] + # GET /folders/search -> Sequence[mdls.Folder] def search_folders( self, # Requested fields. @@ -4744,13 +4842,13 @@ def search_folders( # Match is shared root is_shared_root: Optional[bool] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> Sequence[models.Folder]: + ) -> Sequence[mdls.Folder]: """Search Folders""" response = cast( - Sequence[models.Folder], + Sequence[mdls.Folder], self.get( path="/folders/search", - structure=Sequence[models.Folder], + structure=Sequence[mdls.Folder], query_params={ "fields": fields, "page": page, @@ -4772,7 +4870,7 @@ def search_folders( # ### Get information about the folder with a specific id. # - # GET /folders/{folder_id} -> models.Folder + # GET /folders/{folder_id} -> mdls.Folder def folder( self, # Id of folder @@ -4780,14 +4878,14 @@ def folder( # Requested fields. fields: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.Folder: + ) -> mdls.Folder: """Get Folder""" folder_id = self.encode_path_param(folder_id) response = cast( - models.Folder, + mdls.Folder, self.get( path=f"/folders/{folder_id}", - structure=models.Folder, + structure=mdls.Folder, query_params={"fields": fields}, transport_options=transport_options, ), @@ -4796,21 +4894,21 @@ def folder( # ### Update the folder with a specific id. # - # PATCH /folders/{folder_id} -> models.Folder + # PATCH /folders/{folder_id} -> mdls.Folder def update_folder( self, # Id of folder folder_id: str, - body: models.UpdateFolder, + body: mdls.UpdateFolder, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.Folder: + ) -> mdls.Folder: """Update Folder""" folder_id = self.encode_path_param(folder_id) response = cast( - models.Folder, + mdls.Folder, self.patch( path=f"/folders/{folder_id}", - structure=models.Folder, + structure=mdls.Folder, body=body, transport_options=transport_options, ), @@ -4844,19 +4942,19 @@ def delete_folder( # In API 3.x, this will not return empty personal folders, unless they belong to the calling user. # In API 4.0+, all personal folders will be returned. # - # GET /folders -> Sequence[models.Folder] + # GET /folders -> Sequence[mdls.Folder] def all_folders( self, # Requested fields. fields: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> Sequence[models.Folder]: + ) -> Sequence[mdls.Folder]: """Get All Folders""" response = cast( - Sequence[models.Folder], + Sequence[mdls.Folder], self.get( path="/folders", - structure=Sequence[models.Folder], + structure=Sequence[mdls.Folder], query_params={"fields": fields}, transport_options=transport_options, ), @@ -4868,18 +4966,18 @@ def all_folders( # Caller must have permission to edit the parent folder and to create folders, otherwise the request # returns 404 Not Found. # - # POST /folders -> models.Folder + # POST /folders -> mdls.Folder def create_folder( self, - body: models.CreateFolder, + body: mdls.CreateFolder, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.Folder: + ) -> mdls.Folder: """Create Folder""" response = cast( - models.Folder, + mdls.Folder, self.post( path="/folders", - structure=models.Folder, + structure=mdls.Folder, body=body, transport_options=transport_options, ), @@ -4888,7 +4986,7 @@ def create_folder( # ### Get the children of a folder. # - # GET /folders/{folder_id}/children -> Sequence[models.Folder] + # GET /folders/{folder_id}/children -> Sequence[mdls.Folder] def folder_children( self, # Id of folder @@ -4902,14 +5000,14 @@ def folder_children( # Fields to sort by. sorts: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> Sequence[models.Folder]: + ) -> Sequence[mdls.Folder]: """Get Folder Children""" folder_id = self.encode_path_param(folder_id) response = cast( - Sequence[models.Folder], + Sequence[mdls.Folder], self.get( path=f"/folders/{folder_id}/children", - structure=Sequence[models.Folder], + structure=Sequence[mdls.Folder], query_params={ "fields": fields, "page": page, @@ -4923,7 +5021,7 @@ def folder_children( # ### Search the children of a folder # - # GET /folders/{folder_id}/children/search -> Sequence[models.Folder] + # GET /folders/{folder_id}/children/search -> Sequence[mdls.Folder] def folder_children_search( self, # Id of folder @@ -4935,14 +5033,14 @@ def folder_children_search( # Match folder name. name: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> Sequence[models.Folder]: + ) -> Sequence[mdls.Folder]: """Search Folder Children""" folder_id = self.encode_path_param(folder_id) response = cast( - Sequence[models.Folder], + Sequence[mdls.Folder], self.get( path=f"/folders/{folder_id}/children/search", - structure=Sequence[models.Folder], + structure=Sequence[mdls.Folder], query_params={"fields": fields, "sorts": sorts, "name": name}, transport_options=transport_options, ), @@ -4951,7 +5049,7 @@ def folder_children_search( # ### Get the parent of a folder # - # GET /folders/{folder_id}/parent -> models.Folder + # GET /folders/{folder_id}/parent -> mdls.Folder def folder_parent( self, # Id of folder @@ -4959,14 +5057,14 @@ def folder_parent( # Requested fields. fields: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.Folder: + ) -> mdls.Folder: """Get Folder Parent""" folder_id = self.encode_path_param(folder_id) response = cast( - models.Folder, + mdls.Folder, self.get( path=f"/folders/{folder_id}/parent", - structure=models.Folder, + structure=mdls.Folder, query_params={"fields": fields}, transport_options=transport_options, ), @@ -4975,7 +5073,7 @@ def folder_parent( # ### Get the ancestors of a folder # - # GET /folders/{folder_id}/ancestors -> Sequence[models.Folder] + # GET /folders/{folder_id}/ancestors -> Sequence[mdls.Folder] def folder_ancestors( self, # Id of folder @@ -4983,14 +5081,14 @@ def folder_ancestors( # Requested fields. fields: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> Sequence[models.Folder]: + ) -> Sequence[mdls.Folder]: """Get Folder Ancestors""" folder_id = self.encode_path_param(folder_id) response = cast( - Sequence[models.Folder], + Sequence[mdls.Folder], self.get( path=f"/folders/{folder_id}/ancestors", - structure=Sequence[models.Folder], + structure=Sequence[mdls.Folder], query_params={"fields": fields}, transport_options=transport_options, ), @@ -5001,7 +5099,7 @@ def folder_ancestors( # In API 3.x, this will return all looks in a folder, including looks in the trash. # In API 4.0+, all looks in a folder will be returned, excluding looks in the trash. # - # GET /folders/{folder_id}/looks -> Sequence[models.LookWithQuery] + # GET /folders/{folder_id}/looks -> Sequence[mdls.LookWithQuery] def folder_looks( self, # Id of folder @@ -5009,14 +5107,14 @@ def folder_looks( # Requested fields. fields: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> Sequence[models.LookWithQuery]: + ) -> Sequence[mdls.LookWithQuery]: """Get Folder Looks""" folder_id = self.encode_path_param(folder_id) response = cast( - Sequence[models.LookWithQuery], + Sequence[mdls.LookWithQuery], self.get( path=f"/folders/{folder_id}/looks", - structure=Sequence[models.LookWithQuery], + structure=Sequence[mdls.LookWithQuery], query_params={"fields": fields}, transport_options=transport_options, ), @@ -5025,7 +5123,7 @@ def folder_looks( # ### Get the dashboards in a folder # - # GET /folders/{folder_id}/dashboards -> Sequence[models.Dashboard] + # GET /folders/{folder_id}/dashboards -> Sequence[mdls.Dashboard] def folder_dashboards( self, # Id of folder @@ -5033,14 +5131,14 @@ def folder_dashboards( # Requested fields. fields: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> Sequence[models.Dashboard]: + ) -> Sequence[mdls.Dashboard]: """Get Folder Dashboards""" folder_id = self.encode_path_param(folder_id) response = cast( - Sequence[models.Dashboard], + Sequence[mdls.Dashboard], self.get( path=f"/folders/{folder_id}/dashboards", - structure=Sequence[models.Dashboard], + structure=Sequence[mdls.Dashboard], query_params={"fields": fields}, transport_options=transport_options, ), @@ -5053,7 +5151,7 @@ def folder_dashboards( # ### Get information about all groups. # - # GET /groups -> Sequence[models.Group] + # GET /groups -> Sequence[mdls.Group] def all_groups( self, # Requested fields. @@ -5065,19 +5163,19 @@ def all_groups( # Fields to sort by. sorts: Optional[str] = None, # Optional of ids to get specific groups. - ids: Optional[models.DelimSequence[int]] = None, + ids: Optional[mdls.DelimSequence[int]] = None, # Id of content metadata to which groups must have access. content_metadata_id: Optional[int] = None, # Select only groups that either can/cannot be given access to content. can_add_to_content_metadata: Optional[bool] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> Sequence[models.Group]: + ) -> Sequence[mdls.Group]: """Get All Groups""" response = cast( - Sequence[models.Group], + Sequence[mdls.Group], self.get( path="/groups", - structure=Sequence[models.Group], + structure=Sequence[mdls.Group], query_params={ "fields": fields, "page": page, @@ -5094,20 +5192,20 @@ def all_groups( # ### Creates a new group (admin only). # - # POST /groups -> models.Group + # POST /groups -> mdls.Group def create_group( self, - body: models.WriteGroup, + body: mdls.WriteGroup, # Requested fields. fields: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.Group: + ) -> mdls.Group: """Create Group""" response = cast( - models.Group, + mdls.Group, self.post( path="/groups", - structure=models.Group, + structure=mdls.Group, query_params={"fields": fields}, body=body, transport_options=transport_options, @@ -5140,7 +5238,7 @@ def create_group( # # Boolean search params accept only "true" and "false" as values. # - # GET /groups/search -> Sequence[models.Group] + # GET /groups/search -> Sequence[mdls.Group] def search_groups( self, # Requested fields. @@ -5164,13 +5262,13 @@ def search_groups( # Match group externally_orphaned. externally_orphaned: Optional[bool] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> Sequence[models.Group]: + ) -> Sequence[mdls.Group]: """Search Groups""" response = cast( - Sequence[models.Group], + Sequence[mdls.Group], self.get( path="/groups/search", - structure=Sequence[models.Group], + structure=Sequence[mdls.Group], query_params={ "fields": fields, "limit": limit, @@ -5213,7 +5311,7 @@ def search_groups( # # Boolean search params accept only "true" and "false" as values. # - # GET /groups/search/with_roles -> Sequence[models.GroupSearch] + # GET /groups/search/with_roles -> Sequence[mdls.GroupSearch] def search_groups_with_roles( self, # Requested fields. @@ -5237,13 +5335,13 @@ def search_groups_with_roles( # Match group externally_orphaned. externally_orphaned: Optional[bool] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> Sequence[models.GroupSearch]: + ) -> Sequence[mdls.GroupSearch]: """Search Groups with Roles""" response = cast( - Sequence[models.GroupSearch], + Sequence[mdls.GroupSearch], self.get( path="/groups/search/with_roles", - structure=Sequence[models.GroupSearch], + structure=Sequence[mdls.GroupSearch], query_params={ "fields": fields, "limit": limit, @@ -5287,7 +5385,7 @@ def search_groups_with_roles( # # Boolean search params accept only "true" and "false" as values. # - # GET /groups/search/with_hierarchy -> Sequence[models.GroupHierarchy] + # GET /groups/search/with_hierarchy -> Sequence[mdls.GroupHierarchy] def search_groups_with_hierarchy( self, # Requested fields. @@ -5311,13 +5409,13 @@ def search_groups_with_hierarchy( # Match group externally_orphaned. externally_orphaned: Optional[bool] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> Sequence[models.GroupHierarchy]: + ) -> Sequence[mdls.GroupHierarchy]: """Search Groups with Hierarchy""" response = cast( - Sequence[models.GroupHierarchy], + Sequence[mdls.GroupHierarchy], self.get( path="/groups/search/with_hierarchy", - structure=Sequence[models.GroupHierarchy], + structure=Sequence[mdls.GroupHierarchy], query_params={ "fields": fields, "limit": limit, @@ -5337,7 +5435,7 @@ def search_groups_with_hierarchy( # ### Get information about a group. # - # GET /groups/{group_id} -> models.Group + # GET /groups/{group_id} -> mdls.Group def group( self, # Id of group @@ -5345,13 +5443,13 @@ def group( # Requested fields. fields: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.Group: + ) -> mdls.Group: """Get Group""" response = cast( - models.Group, + mdls.Group, self.get( path=f"/groups/{group_id}", - structure=models.Group, + structure=mdls.Group, query_params={"fields": fields}, transport_options=transport_options, ), @@ -5360,22 +5458,22 @@ def group( # ### Updates the a group (admin only). # - # PATCH /groups/{group_id} -> models.Group + # PATCH /groups/{group_id} -> mdls.Group def update_group( self, # Id of group group_id: int, - body: models.WriteGroup, + body: mdls.WriteGroup, # Requested fields. fields: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.Group: + ) -> mdls.Group: """Update Group""" response = cast( - models.Group, + mdls.Group, self.patch( path=f"/groups/{group_id}", - structure=models.Group, + structure=mdls.Group, query_params={"fields": fields}, body=body, transport_options=transport_options, @@ -5405,7 +5503,7 @@ def delete_group( # ### Get information about all the groups in a group # - # GET /groups/{group_id}/groups -> Sequence[models.Group] + # GET /groups/{group_id}/groups -> Sequence[mdls.Group] def all_group_groups( self, # Id of group @@ -5413,13 +5511,13 @@ def all_group_groups( # Requested fields. fields: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> Sequence[models.Group]: + ) -> Sequence[mdls.Group]: """Get All Groups in Group""" response = cast( - Sequence[models.Group], + Sequence[mdls.Group], self.get( path=f"/groups/{group_id}/groups", - structure=Sequence[models.Group], + structure=Sequence[mdls.Group], query_params={"fields": fields}, transport_options=transport_options, ), @@ -5428,20 +5526,20 @@ def all_group_groups( # ### Adds a new group to a group. # - # POST /groups/{group_id}/groups -> models.Group + # POST /groups/{group_id}/groups -> mdls.Group def add_group_group( self, # Id of group group_id: int, - body: models.GroupIdForGroupInclusion, + body: mdls.GroupIdForGroupInclusion, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.Group: + ) -> mdls.Group: """Add a Group to Group""" response = cast( - models.Group, + mdls.Group, self.post( path=f"/groups/{group_id}/groups", - structure=models.Group, + structure=mdls.Group, body=body, transport_options=transport_options, ), @@ -5450,7 +5548,7 @@ def add_group_group( # ### Get information about all the users directly included in a group. # - # GET /groups/{group_id}/users -> Sequence[models.User] + # GET /groups/{group_id}/users -> Sequence[mdls.User] def all_group_users( self, # Id of group @@ -5464,13 +5562,13 @@ def all_group_users( # Fields to sort by. sorts: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> Sequence[models.User]: + ) -> Sequence[mdls.User]: """Get All Users in Group""" response = cast( - Sequence[models.User], + Sequence[mdls.User], self.get( path=f"/groups/{group_id}/users", - structure=Sequence[models.User], + structure=Sequence[mdls.User], query_params={ "fields": fields, "page": page, @@ -5484,20 +5582,20 @@ def all_group_users( # ### Adds a new user to a group. # - # POST /groups/{group_id}/users -> models.User + # POST /groups/{group_id}/users -> mdls.User def add_group_user( self, # Id of group group_id: int, - body: models.GroupIdForGroupUserInclusion, + body: mdls.GroupIdForGroupUserInclusion, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.User: + ) -> mdls.User: """Add a User to Group""" response = cast( - models.User, + mdls.User, self.post( path=f"/groups/{group_id}/users", - structure=models.User, + structure=mdls.User, body=body, transport_options=transport_options, ), @@ -5552,22 +5650,22 @@ def delete_group_from_group( # # For information about how user attribute values are calculated, see [Set User Attribute Group Values](#!/UserAttribute/set_user_attribute_group_values). # - # PATCH /groups/{group_id}/attribute_values/{user_attribute_id} -> models.UserAttributeGroupValue + # PATCH /groups/{group_id}/attribute_values/{user_attribute_id} -> mdls.UserAttributeGroupValue def update_user_attribute_group_value( self, # Id of group group_id: int, # Id of user attribute user_attribute_id: int, - body: models.UserAttributeGroupValue, + body: mdls.UserAttributeGroupValue, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.UserAttributeGroupValue: + ) -> mdls.UserAttributeGroupValue: """Set User Attribute Group Value""" response = cast( - models.UserAttributeGroupValue, + mdls.UserAttributeGroupValue, self.patch( path=f"/groups/{group_id}/attribute_values/{user_attribute_id}", - structure=models.UserAttributeGroupValue, + structure=mdls.UserAttributeGroupValue, body=body, transport_options=transport_options, ), @@ -5602,19 +5700,19 @@ def delete_user_attribute_group_value( # ### Get information about the primary homepage's sections. # - # GET /primary_homepage_sections -> Sequence[models.HomepageSection] + # GET /primary_homepage_sections -> Sequence[mdls.HomepageSection] def all_primary_homepage_sections( self, # Requested fields. fields: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> Sequence[models.HomepageSection]: + ) -> Sequence[mdls.HomepageSection]: """Get All Primary homepage sections""" response = cast( - Sequence[models.HomepageSection], + Sequence[mdls.HomepageSection], self.get( path="/primary_homepage_sections", - structure=Sequence[models.HomepageSection], + structure=Sequence[mdls.HomepageSection], query_params={"fields": fields}, transport_options=transport_options, ), @@ -5627,19 +5725,19 @@ def all_primary_homepage_sections( # ### Get information about all Integration Hubs. # - # GET /integration_hubs -> Sequence[models.IntegrationHub] + # GET /integration_hubs -> Sequence[mdls.IntegrationHub] def all_integration_hubs( self, # Requested fields. fields: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> Sequence[models.IntegrationHub]: + ) -> Sequence[mdls.IntegrationHub]: """Get All Integration Hubs""" response = cast( - Sequence[models.IntegrationHub], + Sequence[mdls.IntegrationHub], self.get( path="/integration_hubs", - structure=Sequence[models.IntegrationHub], + structure=Sequence[mdls.IntegrationHub], query_params={"fields": fields}, transport_options=transport_options, ), @@ -5650,20 +5748,20 @@ def all_integration_hubs( # # This API is rate limited to prevent it from being used for SSRF attacks # - # POST /integration_hubs -> models.IntegrationHub + # POST /integration_hubs -> mdls.IntegrationHub def create_integration_hub( self, - body: models.WriteIntegrationHub, + body: mdls.WriteIntegrationHub, # Requested fields. fields: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.IntegrationHub: + ) -> mdls.IntegrationHub: """Create Integration Hub""" response = cast( - models.IntegrationHub, + mdls.IntegrationHub, self.post( path="/integration_hubs", - structure=models.IntegrationHub, + structure=mdls.IntegrationHub, query_params={"fields": fields}, body=body, transport_options=transport_options, @@ -5673,7 +5771,7 @@ def create_integration_hub( # ### Get information about a Integration Hub. # - # GET /integration_hubs/{integration_hub_id} -> models.IntegrationHub + # GET /integration_hubs/{integration_hub_id} -> mdls.IntegrationHub def integration_hub( self, # Id of Integration Hub @@ -5681,13 +5779,13 @@ def integration_hub( # Requested fields. fields: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.IntegrationHub: + ) -> mdls.IntegrationHub: """Get Integration Hub""" response = cast( - models.IntegrationHub, + mdls.IntegrationHub, self.get( path=f"/integration_hubs/{integration_hub_id}", - structure=models.IntegrationHub, + structure=mdls.IntegrationHub, query_params={"fields": fields}, transport_options=transport_options, ), @@ -5698,22 +5796,22 @@ def integration_hub( # # This API is rate limited to prevent it from being used for SSRF attacks # - # PATCH /integration_hubs/{integration_hub_id} -> models.IntegrationHub + # PATCH /integration_hubs/{integration_hub_id} -> mdls.IntegrationHub def update_integration_hub( self, # Id of Integration Hub integration_hub_id: int, - body: models.WriteIntegrationHub, + body: mdls.WriteIntegrationHub, # Requested fields. fields: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.IntegrationHub: + ) -> mdls.IntegrationHub: """Update Integration Hub""" response = cast( - models.IntegrationHub, + mdls.IntegrationHub, self.patch( path=f"/integration_hubs/{integration_hub_id}", - structure=models.IntegrationHub, + structure=mdls.IntegrationHub, query_params={"fields": fields}, body=body, transport_options=transport_options, @@ -5743,19 +5841,19 @@ def delete_integration_hub( # 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. # - # POST /integration_hubs/{integration_hub_id}/accept_legal_agreement -> models.IntegrationHub + # POST /integration_hubs/{integration_hub_id}/accept_legal_agreement -> mdls.IntegrationHub def accept_integration_hub_legal_agreement( self, # Id of integration_hub integration_hub_id: int, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.IntegrationHub: + ) -> mdls.IntegrationHub: """Accept Integration Hub Legal Agreement""" response = cast( - models.IntegrationHub, + mdls.IntegrationHub, self.post( path=f"/integration_hubs/{integration_hub_id}/accept_legal_agreement", - structure=models.IntegrationHub, + structure=mdls.IntegrationHub, transport_options=transport_options, ), ) @@ -5763,7 +5861,7 @@ def accept_integration_hub_legal_agreement( # ### Get information about all Integrations. # - # GET /integrations -> Sequence[models.Integration] + # GET /integrations -> Sequence[mdls.Integration] def all_integrations( self, # Requested fields. @@ -5771,13 +5869,13 @@ def all_integrations( # Filter to a specific provider integration_hub_id: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> Sequence[models.Integration]: + ) -> Sequence[mdls.Integration]: """Get All Integrations""" response = cast( - Sequence[models.Integration], + Sequence[mdls.Integration], self.get( path="/integrations", - structure=Sequence[models.Integration], + structure=Sequence[mdls.Integration], query_params={ "fields": fields, "integration_hub_id": integration_hub_id, @@ -5789,7 +5887,7 @@ def all_integrations( # ### Get information about a Integration. # - # GET /integrations/{integration_id} -> models.Integration + # GET /integrations/{integration_id} -> mdls.Integration def integration( self, # Id of integration @@ -5797,14 +5895,14 @@ def integration( # Requested fields. fields: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.Integration: + ) -> mdls.Integration: """Get Integration""" integration_id = self.encode_path_param(integration_id) response = cast( - models.Integration, + mdls.Integration, self.get( path=f"/integrations/{integration_id}", - structure=models.Integration, + structure=mdls.Integration, query_params={"fields": fields}, transport_options=transport_options, ), @@ -5813,23 +5911,23 @@ def integration( # ### Update parameters on a Integration. # - # PATCH /integrations/{integration_id} -> models.Integration + # PATCH /integrations/{integration_id} -> mdls.Integration def update_integration( self, # Id of integration integration_id: str, - body: models.WriteIntegration, + body: mdls.WriteIntegration, # Requested fields. fields: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.Integration: + ) -> mdls.Integration: """Update Integration""" integration_id = self.encode_path_param(integration_id) response = cast( - models.Integration, + mdls.Integration, self.patch( path=f"/integrations/{integration_id}", - structure=models.Integration, + structure=mdls.Integration, query_params={"fields": fields}, body=body, transport_options=transport_options, @@ -5839,21 +5937,21 @@ def update_integration( # Returns the Integration form for presentation to the user. # - # POST /integrations/{integration_id}/form -> models.DataActionForm + # POST /integrations/{integration_id}/form -> mdls.DataActionForm def fetch_integration_form( self, # Id of integration integration_id: str, body: Optional[MutableMapping[str, Any]] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.DataActionForm: + ) -> mdls.DataActionForm: """Fetch Remote Integration Form""" integration_id = self.encode_path_param(integration_id) response = cast( - models.DataActionForm, + mdls.DataActionForm, self.post( path=f"/integrations/{integration_id}/form", - structure=models.DataActionForm, + structure=mdls.DataActionForm, body=body, transport_options=transport_options, ), @@ -5862,20 +5960,20 @@ def fetch_integration_form( # Tests the integration to make sure all the settings are working. # - # POST /integrations/{integration_id}/test -> models.IntegrationTestResult + # POST /integrations/{integration_id}/test -> mdls.IntegrationTestResult def test_integration( self, # Id of integration integration_id: str, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.IntegrationTestResult: + ) -> mdls.IntegrationTestResult: """Test integration""" integration_id = self.encode_path_param(integration_id) response = cast( - models.IntegrationTestResult, + mdls.IntegrationTestResult, self.post( path=f"/integrations/{integration_id}/test", - structure=models.IntegrationTestResult, + structure=mdls.IntegrationTestResult, transport_options=transport_options, ), ) @@ -5893,19 +5991,19 @@ def test_integration( # # Find **soft-deleted looks** with [search_looks()](#!/Look/search_looks) # - # GET /looks -> Sequence[models.Look] + # GET /looks -> Sequence[mdls.Look] def all_looks( self, # Requested fields. fields: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> Sequence[models.Look]: + ) -> Sequence[mdls.Look]: """Get All Looks""" response = cast( - Sequence[models.Look], + Sequence[mdls.Look], self.get( path="/looks", - structure=Sequence[models.Look], + structure=Sequence[mdls.Look], query_params={"fields": fields}, transport_options=transport_options, ), @@ -5920,20 +6018,20 @@ def all_looks( # To place the look into a particular space, assign the space's id to the `space_id` property # in the call to `create_look()`. # - # POST /looks -> models.LookWithQuery + # POST /looks -> mdls.LookWithQuery def create_look( self, - body: models.WriteLookWithQuery, + body: mdls.WriteLookWithQuery, # Requested fields. fields: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.LookWithQuery: + ) -> mdls.LookWithQuery: """Create Look""" response = cast( - models.LookWithQuery, + mdls.LookWithQuery, self.post( path="/looks", - structure=models.LookWithQuery, + structure=mdls.LookWithQuery, query_params={"fields": fields}, body=body, transport_options=transport_options, @@ -5969,7 +6067,7 @@ def create_look( # # Get a **single look** by id with [look(id)](#!/Look/look) # - # GET /looks/search -> Sequence[models.Look] + # GET /looks/search -> Sequence[mdls.Look] def search_looks( self, # Match look id. @@ -6009,13 +6107,13 @@ def search_looks( # Combine given search criteria in a boolean OR expression filter_or: Optional[bool] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> Sequence[models.Look]: + ) -> Sequence[mdls.Look]: """Search Looks""" response = cast( - Sequence[models.Look], + Sequence[mdls.Look], self.get( path="/looks/search", - structure=Sequence[models.Look], + structure=Sequence[mdls.Look], query_params={ "id": id, "title": title, @@ -6045,21 +6143,22 @@ def search_looks( # # Returns detailed information about a Look and its associated Query. # - # GET /looks/{look_id} -> models.LookWithQuery + # GET /looks/{look_id} -> mdls.LookWithQuery def look( self, # Id of look - look_id: int, + look_id: str, # Requested fields. fields: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.LookWithQuery: + ) -> mdls.LookWithQuery: """Get Look""" + look_id = self.encode_path_param(look_id) response = cast( - models.LookWithQuery, + mdls.LookWithQuery, self.get( path=f"/looks/{look_id}", - structure=models.LookWithQuery, + structure=mdls.LookWithQuery, query_params={"fields": fields}, transport_options=transport_options, ), @@ -6087,22 +6186,23 @@ def look( # NOTE: [delete_look()](#!/Look/delete_look) performs a "hard delete" - the look data is removed from the Looker # database and destroyed. There is no "undo" for `delete_look()`. # - # PATCH /looks/{look_id} -> models.LookWithQuery + # PATCH /looks/{look_id} -> mdls.LookWithQuery def update_look( self, # Id of look - look_id: int, - body: models.WriteLookWithQuery, + look_id: str, + body: mdls.WriteLookWithQuery, # Requested fields. fields: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.LookWithQuery: + ) -> mdls.LookWithQuery: """Update Look""" + look_id = self.encode_path_param(look_id) response = cast( - models.LookWithQuery, + mdls.LookWithQuery, self.patch( path=f"/looks/{look_id}", - structure=models.LookWithQuery, + structure=mdls.LookWithQuery, query_params={"fields": fields}, body=body, transport_options=transport_options, @@ -6122,10 +6222,11 @@ def update_look( def delete_look( self, # Id of look - look_id: int, + look_id: str, transport_options: Optional[transport.TransportOptions] = None, ) -> str: """Delete Look""" + look_id = self.encode_path_param(look_id) response = cast( str, self.delete( @@ -6159,7 +6260,7 @@ def delete_look( def run_look( self, # Id of look - look_id: int, + look_id: str, # Format of result result_format: str, # Row limit (may override the limit in the saved query). @@ -6189,6 +6290,7 @@ def run_look( transport_options: Optional[transport.TransportOptions] = None, ) -> Union[str, bytes]: """Run Look""" + look_id = self.encode_path_param(look_id) result_format = self.encode_path_param(result_format) response = cast( Union[str, bytes], @@ -6222,21 +6324,22 @@ def run_look( # # `look_id` and `folder_id` must already exist, and `folder_id` must be different from the current `folder_id` of the dashboard. # - # POST /looks/{look_id}/copy -> models.LookWithQuery + # POST /looks/{look_id}/copy -> mdls.LookWithQuery def copy_look( self, # Look id to copy. - look_id: int, + look_id: str, # Folder id to copy to. folder_id: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.LookWithQuery: + ) -> mdls.LookWithQuery: """Copy Look""" + look_id = self.encode_path_param(look_id) response = cast( - models.LookWithQuery, + mdls.LookWithQuery, self.post( path=f"/looks/{look_id}/copy", - structure=models.LookWithQuery, + structure=mdls.LookWithQuery, query_params={"folder_id": folder_id}, transport_options=transport_options, ), @@ -6250,21 +6353,22 @@ def copy_look( # `look_id` and `folder_id` are required. # `look_id` and `folder_id` must already exist, and `folder_id` must be different from the current `folder_id` of the dashboard. # - # PATCH /looks/{look_id}/move -> models.LookWithQuery + # PATCH /looks/{look_id}/move -> mdls.LookWithQuery def move_look( self, # Look id to move. - look_id: int, + look_id: str, # Folder id to move to. folder_id: str, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.LookWithQuery: + ) -> mdls.LookWithQuery: """Move Look""" + look_id = self.encode_path_param(look_id) response = cast( - models.LookWithQuery, + mdls.LookWithQuery, self.patch( path=f"/looks/{look_id}/move", - structure=models.LookWithQuery, + structure=mdls.LookWithQuery, query_params={"folder_id": folder_id}, transport_options=transport_options, ), @@ -6275,35 +6379,9 @@ def move_look( # region LookmlModel: Manage LookML Models - # ### Discover information about derived tables - # - # GET /derived_table/graph/model/{model} -> models.DependencyGraph - def graph_derived_tables_for_model( - self, - # The name of the Lookml model. - model: str, - # The format of the graph. Valid values are [dot]. Default is `dot` - format: Optional[str] = None, - # Color denoting the build status of the graph. Grey = not built, green = built, yellow = building, red = error. - color: Optional[str] = None, - transport_options: Optional[transport.TransportOptions] = None, - ) -> models.DependencyGraph: - """Get Derived Table""" - model = self.encode_path_param(model) - response = cast( - models.DependencyGraph, - self.get( - path=f"/derived_table/graph/model/{model}", - structure=models.DependencyGraph, - query_params={"format": format, "color": color}, - transport_options=transport_options, - ), - ) - return response - # ### Get information about all lookml models. # - # GET /lookml_models -> Sequence[models.LookmlModel] + # GET /lookml_models -> Sequence[mdls.LookmlModel] def all_lookml_models( self, # Requested fields. @@ -6313,13 +6391,13 @@ def all_lookml_models( # Number of results to skip before returning any. (Defaults to 0 if not set when limit is used) offset: Optional[int] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> Sequence[models.LookmlModel]: + ) -> Sequence[mdls.LookmlModel]: """Get All LookML Models""" response = cast( - Sequence[models.LookmlModel], + Sequence[mdls.LookmlModel], self.get( path="/lookml_models", - structure=Sequence[models.LookmlModel], + structure=Sequence[mdls.LookmlModel], query_params={"fields": fields, "limit": limit, "offset": offset}, transport_options=transport_options, ), @@ -6328,18 +6406,18 @@ def all_lookml_models( # ### Create a lookml model using the specified configuration. # - # POST /lookml_models -> models.LookmlModel + # POST /lookml_models -> mdls.LookmlModel def create_lookml_model( self, - body: models.WriteLookmlModel, + body: mdls.WriteLookmlModel, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.LookmlModel: + ) -> mdls.LookmlModel: """Create LookML Model""" response = cast( - models.LookmlModel, + mdls.LookmlModel, self.post( path="/lookml_models", - structure=models.LookmlModel, + structure=mdls.LookmlModel, body=body, transport_options=transport_options, ), @@ -6348,7 +6426,7 @@ def create_lookml_model( # ### Get information about a lookml model. # - # GET /lookml_models/{lookml_model_name} -> models.LookmlModel + # GET /lookml_models/{lookml_model_name} -> mdls.LookmlModel def lookml_model( self, # Name of lookml model. @@ -6356,14 +6434,14 @@ def lookml_model( # Requested fields. fields: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.LookmlModel: + ) -> mdls.LookmlModel: """Get LookML Model""" lookml_model_name = self.encode_path_param(lookml_model_name) response = cast( - models.LookmlModel, + mdls.LookmlModel, self.get( path=f"/lookml_models/{lookml_model_name}", - structure=models.LookmlModel, + structure=mdls.LookmlModel, query_params={"fields": fields}, transport_options=transport_options, ), @@ -6372,21 +6450,21 @@ def lookml_model( # ### Update a lookml model using the specified configuration. # - # PATCH /lookml_models/{lookml_model_name} -> models.LookmlModel + # PATCH /lookml_models/{lookml_model_name} -> mdls.LookmlModel def update_lookml_model( self, # Name of lookml model. lookml_model_name: str, - body: models.WriteLookmlModel, + body: mdls.WriteLookmlModel, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.LookmlModel: + ) -> mdls.LookmlModel: """Update LookML Model""" lookml_model_name = self.encode_path_param(lookml_model_name) response = cast( - models.LookmlModel, + mdls.LookmlModel, self.patch( path=f"/lookml_models/{lookml_model_name}", - structure=models.LookmlModel, + structure=mdls.LookmlModel, body=body, transport_options=transport_options, ), @@ -6416,7 +6494,7 @@ def delete_lookml_model( # ### Get information about a lookml model explore. # - # GET /lookml_models/{lookml_model_name}/explores/{explore_name} -> models.LookmlModelExplore + # GET /lookml_models/{lookml_model_name}/explores/{explore_name} -> mdls.LookmlModelExplore def lookml_model_explore( self, # Name of lookml model. @@ -6426,15 +6504,15 @@ def lookml_model_explore( # Requested fields. fields: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.LookmlModelExplore: + ) -> mdls.LookmlModelExplore: """Get LookML Model Explore""" lookml_model_name = self.encode_path_param(lookml_model_name) explore_name = self.encode_path_param(explore_name) response = cast( - models.LookmlModelExplore, + mdls.LookmlModelExplore, self.get( path=f"/lookml_models/{lookml_model_name}/explores/{explore_name}", - structure=models.LookmlModelExplore, + structure=mdls.LookmlModelExplore, query_params={"fields": fields}, transport_options=transport_options, ), @@ -6447,7 +6525,7 @@ def lookml_model_explore( # ### Field name suggestions for a model and view # - # GET /models/{model_name}/views/{view_name}/fields/{field_name}/suggestions -> models.ModelFieldSuggestions + # GET /models/{model_name}/views/{view_name}/fields/{field_name}/suggestions -> mdls.ModelFieldSuggestions def model_fieldname_suggestions( self, # Name of model @@ -6461,16 +6539,16 @@ def model_fieldname_suggestions( # Suggestion filters filters: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.ModelFieldSuggestions: + ) -> mdls.ModelFieldSuggestions: """Model field name suggestions""" model_name = self.encode_path_param(model_name) view_name = self.encode_path_param(view_name) field_name = self.encode_path_param(field_name) response = cast( - models.ModelFieldSuggestions, + mdls.ModelFieldSuggestions, self.get( path=f"/models/{model_name}/views/{view_name}/fields/{field_name}/suggestions", - structure=models.ModelFieldSuggestions, + structure=mdls.ModelFieldSuggestions, query_params={"term": term, "filters": filters}, transport_options=transport_options, ), @@ -6479,20 +6557,20 @@ def model_fieldname_suggestions( # ### Get a single model # - # GET /models/{model_name} -> models.Model + # GET /models/{model_name} -> mdls.Model def get_model( self, # Name of model model_name: str, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.Model: + ) -> mdls.Model: """Get a single model""" model_name = self.encode_path_param(model_name) response = cast( - models.Model, + mdls.Model, self.get( path=f"/models/{model_name}", - structure=models.Model, + structure=mdls.Model, transport_options=transport_options, ), ) @@ -6531,7 +6609,7 @@ def connection_databases( # # Returns a list of feature names with `true` (available) or `false` (not available) # - # GET /connections/{connection_name}/features -> models.ConnectionFeatures + # GET /connections/{connection_name}/features -> mdls.ConnectionFeatures def connection_features( self, # Name of connection @@ -6539,14 +6617,14 @@ def connection_features( # Requested fields. fields: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.ConnectionFeatures: + ) -> mdls.ConnectionFeatures: """Metadata features supported by this connection""" connection_name = self.encode_path_param(connection_name) response = cast( - models.ConnectionFeatures, + mdls.ConnectionFeatures, self.get( path=f"/connections/{connection_name}/features", - structure=models.ConnectionFeatures, + structure=mdls.ConnectionFeatures, query_params={"fields": fields}, transport_options=transport_options, ), @@ -6555,7 +6633,7 @@ def connection_features( # ### Get the list of schemas and tables for a connection # - # GET /connections/{connection_name}/schemas -> Sequence[models.Schema] + # GET /connections/{connection_name}/schemas -> Sequence[mdls.Schema] def connection_schemas( self, # Name of connection @@ -6567,14 +6645,14 @@ def connection_schemas( # Requested fields. fields: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> Sequence[models.Schema]: + ) -> Sequence[mdls.Schema]: """Get schemas for a connection""" connection_name = self.encode_path_param(connection_name) response = cast( - Sequence[models.Schema], + Sequence[mdls.Schema], self.get( path=f"/connections/{connection_name}/schemas", - structure=Sequence[models.Schema], + structure=Sequence[mdls.Schema], query_params={"database": database, "cache": cache, "fields": fields}, transport_options=transport_options, ), @@ -6588,7 +6666,7 @@ def connection_schemas( # # For dialects that do **not** support multiple databases, **do not use** the database parameter # - # GET /connections/{connection_name}/tables -> Sequence[models.SchemaTables] + # GET /connections/{connection_name}/tables -> Sequence[mdls.SchemaTables] def connection_tables( self, # Name of connection @@ -6602,14 +6680,14 @@ def connection_tables( # Requested fields. fields: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> Sequence[models.SchemaTables]: + ) -> Sequence[mdls.SchemaTables]: """Get tables for a connection""" connection_name = self.encode_path_param(connection_name) response = cast( - Sequence[models.SchemaTables], + Sequence[mdls.SchemaTables], self.get( path=f"/connections/{connection_name}/tables", - structure=Sequence[models.SchemaTables], + structure=Sequence[mdls.SchemaTables], query_params={ "database": database, "schema_name": schema_name, @@ -6623,7 +6701,7 @@ def connection_tables( # ### Get the columns (and therefore also the tables) in a specific schema # - # GET /connections/{connection_name}/columns -> Sequence[models.SchemaColumns] + # GET /connections/{connection_name}/columns -> Sequence[mdls.SchemaColumns] def connection_columns( self, # Name of connection @@ -6641,14 +6719,14 @@ def connection_columns( # Requested fields. fields: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> Sequence[models.SchemaColumns]: + ) -> Sequence[mdls.SchemaColumns]: """Get columns for a connection""" connection_name = self.encode_path_param(connection_name) response = cast( - Sequence[models.SchemaColumns], + Sequence[mdls.SchemaColumns], self.get( path=f"/connections/{connection_name}/columns", - structure=Sequence[models.SchemaColumns], + structure=Sequence[mdls.SchemaColumns], query_params={ "database": database, "schema_name": schema_name, @@ -6666,7 +6744,7 @@ def connection_columns( # # **Note**: `column_name` must be a valid column name. It is not a search pattern. # - # GET /connections/{connection_name}/search_columns -> Sequence[models.ColumnSearch] + # GET /connections/{connection_name}/search_columns -> Sequence[mdls.ColumnSearch] def connection_search_columns( self, # Name of connection @@ -6676,14 +6754,14 @@ def connection_search_columns( # Requested fields. fields: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> Sequence[models.ColumnSearch]: + ) -> Sequence[mdls.ColumnSearch]: """Search a connection for columns""" connection_name = self.encode_path_param(connection_name) response = cast( - Sequence[models.ColumnSearch], + Sequence[mdls.ColumnSearch], self.get( path=f"/connections/{connection_name}/search_columns", - structure=Sequence[models.ColumnSearch], + structure=Sequence[mdls.ColumnSearch], query_params={"column_name": column_name, "fields": fields}, transport_options=transport_options, ), @@ -6696,23 +6774,23 @@ def connection_search_columns( # # **Note**: If the connection's dialect has no support for cost estimates, an error will be returned # - # POST /connections/{connection_name}/cost_estimate -> models.CostEstimate + # POST /connections/{connection_name}/cost_estimate -> mdls.CostEstimate def connection_cost_estimate( self, # Name of connection connection_name: str, - body: models.CreateCostEstimate, + body: mdls.CreateCostEstimate, # Requested fields. fields: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.CostEstimate: + ) -> mdls.CostEstimate: """Estimate costs for a connection""" connection_name = self.encode_path_param(connection_name) response = cast( - models.CostEstimate, + mdls.CostEstimate, self.post( path=f"/connections/{connection_name}/cost_estimate", - structure=models.CostEstimate, + structure=mdls.CostEstimate, query_params={"fields": fields}, body=body, transport_options=transport_options, @@ -6758,20 +6836,20 @@ def lock_all( # # Returns a list of git branches in the project repository # - # GET /projects/{project_id}/git_branches -> Sequence[models.GitBranch] + # GET /projects/{project_id}/git_branches -> Sequence[mdls.GitBranch] def all_git_branches( self, # Project Id project_id: str, transport_options: Optional[transport.TransportOptions] = None, - ) -> Sequence[models.GitBranch]: + ) -> Sequence[mdls.GitBranch]: """Get All Git Branches""" project_id = self.encode_path_param(project_id) response = cast( - Sequence[models.GitBranch], + Sequence[mdls.GitBranch], self.get( path=f"/projects/{project_id}/git_branches", - structure=Sequence[models.GitBranch], + structure=Sequence[mdls.GitBranch], transport_options=transport_options, ), ) @@ -6781,20 +6859,20 @@ def all_git_branches( # # Returns the git branch currently checked out in the given project repository # - # GET /projects/{project_id}/git_branch -> models.GitBranch + # GET /projects/{project_id}/git_branch -> mdls.GitBranch def git_branch( self, # Project Id project_id: str, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.GitBranch: + ) -> mdls.GitBranch: """Get Active Git Branch""" project_id = self.encode_path_param(project_id) response = cast( - models.GitBranch, + mdls.GitBranch, self.get( path=f"/projects/{project_id}/git_branch", - structure=models.GitBranch, + structure=mdls.GitBranch, transport_options=transport_options, ), ) @@ -6810,21 +6888,21 @@ def git_branch( # Optionally specify a branch name, tag name or commit SHA to which the branch should be reset. # **DANGER** hard reset will be force pushed to the remote. Unsaved changes and commits may be permanently lost. # - # PUT /projects/{project_id}/git_branch -> models.GitBranch + # PUT /projects/{project_id}/git_branch -> mdls.GitBranch def update_git_branch( self, # Project Id project_id: str, - body: models.WriteGitBranch, + body: mdls.WriteGitBranch, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.GitBranch: + ) -> mdls.GitBranch: """Update Project Git Branch""" project_id = self.encode_path_param(project_id) response = cast( - models.GitBranch, + mdls.GitBranch, self.put( path=f"/projects/{project_id}/git_branch", - structure=models.GitBranch, + structure=mdls.GitBranch, body=body, transport_options=transport_options, ), @@ -6840,21 +6918,21 @@ def update_git_branch( # Optionally specify a branch name, tag name or commit SHA as the start point in the ref field. # If no ref is specified, HEAD of the current branch will be used as the start point for the new branch. # - # POST /projects/{project_id}/git_branch -> models.GitBranch + # POST /projects/{project_id}/git_branch -> mdls.GitBranch def create_git_branch( self, # Project Id project_id: str, - body: models.WriteGitBranch, + body: mdls.WriteGitBranch, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.GitBranch: + ) -> mdls.GitBranch: """Checkout New Git Branch""" project_id = self.encode_path_param(project_id) response = cast( - models.GitBranch, + mdls.GitBranch, self.post( path=f"/projects/{project_id}/git_branch", - structure=models.GitBranch, + structure=mdls.GitBranch, body=body, transport_options=transport_options, ), @@ -6865,7 +6943,7 @@ def create_git_branch( # # Returns the git branch specified in branch_name path param if it exists in the given project repository # - # GET /projects/{project_id}/git_branch/{branch_name} -> models.GitBranch + # GET /projects/{project_id}/git_branch/{branch_name} -> mdls.GitBranch def find_git_branch( self, # Project Id @@ -6873,15 +6951,15 @@ def find_git_branch( # Branch Name branch_name: str, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.GitBranch: + ) -> mdls.GitBranch: """Find a Git Branch""" project_id = self.encode_path_param(project_id) branch_name = self.encode_path_param(branch_name) response = cast( - models.GitBranch, + mdls.GitBranch, self.get( path=f"/projects/{project_id}/git_branch/{branch_name}", - structure=models.GitBranch, + structure=mdls.GitBranch, transport_options=transport_options, ), ) @@ -7029,19 +7107,19 @@ def reset_project_to_remote( # # Returns all projects visible to the current user # - # GET /projects -> Sequence[models.Project] + # GET /projects -> Sequence[mdls.Project] def all_projects( self, # Requested fields fields: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> Sequence[models.Project]: + ) -> Sequence[mdls.Project]: """Get All Projects""" response = cast( - Sequence[models.Project], + Sequence[mdls.Project], self.get( path="/projects", - structure=Sequence[models.Project], + structure=Sequence[mdls.Project], query_params={"fields": fields}, transport_options=transport_options, ), @@ -7056,18 +7134,18 @@ def all_projects( # `name` is required. # `git_remote_url` is not allowed. To configure Git for the newly created project, follow the instructions in `update_project`. # - # POST /projects -> models.Project + # POST /projects -> mdls.Project def create_project( self, - body: models.WriteProject, + body: mdls.WriteProject, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.Project: + ) -> mdls.Project: """Create Project""" response = cast( - models.Project, + mdls.Project, self.post( path="/projects", - structure=models.Project, + structure=mdls.Project, body=body, transport_options=transport_options, ), @@ -7078,7 +7156,7 @@ def create_project( # # Returns the project with the given project id # - # GET /projects/{project_id} -> models.Project + # GET /projects/{project_id} -> mdls.Project def project( self, # Project Id @@ -7086,14 +7164,14 @@ def project( # Requested fields fields: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.Project: + ) -> mdls.Project: """Get Project""" project_id = self.encode_path_param(project_id) response = cast( - models.Project, + mdls.Project, self.get( path=f"/projects/{project_id}", - structure=models.Project, + structure=mdls.Project, query_params={"fields": fields}, transport_options=transport_options, ), @@ -7123,23 +7201,23 @@ def project( # 1. Call `update_session` to select the 'dev' workspace. # 1. Call `update_project` setting `git_remote_url` to null and `git_service_name` to "bare". # - # PATCH /projects/{project_id} -> models.Project + # PATCH /projects/{project_id} -> mdls.Project def update_project( self, # Project Id project_id: str, - body: models.WriteProject, + body: mdls.WriteProject, # Requested fields fields: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.Project: + ) -> mdls.Project: """Update Project""" project_id = self.encode_path_param(project_id) response = cast( - models.Project, + mdls.Project, self.patch( path=f"/projects/{project_id}", - structure=models.Project, + structure=mdls.Project, query_params={"fields": fields}, body=body, transport_options=transport_options, @@ -7151,20 +7229,20 @@ def update_project( # # Returns the project with the given project id # - # GET /projects/{project_id}/manifest -> models.Manifest + # GET /projects/{project_id}/manifest -> mdls.Manifest def manifest( self, # Project Id project_id: str, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.Manifest: + ) -> mdls.Manifest: """Get Manifest""" project_id = self.encode_path_param(project_id) response = cast( - models.Manifest, + mdls.Manifest, self.get( path=f"/projects/{project_id}/manifest", - structure=models.Manifest, + structure=mdls.Manifest, transport_options=transport_options, ), ) @@ -7235,7 +7313,7 @@ def create_git_deploy_key( # the cached validation results were computed. The cached validation results may no longer # reflect the current state of the project. # - # GET /projects/{project_id}/validate -> models.ProjectValidationCache + # GET /projects/{project_id}/validate -> mdls.ProjectValidationCache def project_validation_results( self, # Project Id @@ -7243,14 +7321,14 @@ def project_validation_results( # Requested fields fields: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.ProjectValidationCache: + ) -> mdls.ProjectValidationCache: """Cached Project Validation Results""" project_id = self.encode_path_param(project_id) response = cast( - models.ProjectValidationCache, + mdls.ProjectValidationCache, self.get( path=f"/projects/{project_id}/validate", - structure=models.ProjectValidationCache, + structure=mdls.ProjectValidationCache, query_params={"fields": fields}, transport_options=transport_options, ), @@ -7267,7 +7345,7 @@ def project_validation_results( # when you really want to recompute project validation. To quickly display the results of # the most recent project validation (without recomputing), use `project_validation_results(project_id)` # - # POST /projects/{project_id}/validate -> models.ProjectValidation + # POST /projects/{project_id}/validate -> mdls.ProjectValidation def validate_project( self, # Project Id @@ -7275,14 +7353,14 @@ def validate_project( # Requested fields fields: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.ProjectValidation: + ) -> mdls.ProjectValidation: """Validate Project""" project_id = self.encode_path_param(project_id) response = cast( - models.ProjectValidation, + mdls.ProjectValidation, self.post( path=f"/projects/{project_id}/validate", - structure=models.ProjectValidation, + structure=mdls.ProjectValidation, query_params={"fields": fields}, transport_options=transport_options, ), @@ -7293,7 +7371,7 @@ def validate_project( # # Returns information about the state of the project files in the currently selected workspace # - # GET /projects/{project_id}/current_workspace -> models.ProjectWorkspace + # GET /projects/{project_id}/current_workspace -> mdls.ProjectWorkspace def project_workspace( self, # Project Id @@ -7301,14 +7379,14 @@ def project_workspace( # Requested fields fields: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.ProjectWorkspace: + ) -> mdls.ProjectWorkspace: """Get Project Workspace""" project_id = self.encode_path_param(project_id) response = cast( - models.ProjectWorkspace, + mdls.ProjectWorkspace, self.get( path=f"/projects/{project_id}/current_workspace", - structure=models.ProjectWorkspace, + structure=mdls.ProjectWorkspace, query_params={"fields": fields}, transport_options=transport_options, ), @@ -7319,7 +7397,7 @@ def project_workspace( # # Returns a list of the files in the project # - # GET /projects/{project_id}/files -> Sequence[models.ProjectFile] + # GET /projects/{project_id}/files -> Sequence[mdls.ProjectFile] def all_project_files( self, # Project Id @@ -7327,14 +7405,14 @@ def all_project_files( # Requested fields fields: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> Sequence[models.ProjectFile]: + ) -> Sequence[mdls.ProjectFile]: """Get All Project Files""" project_id = self.encode_path_param(project_id) response = cast( - Sequence[models.ProjectFile], + Sequence[mdls.ProjectFile], self.get( path=f"/projects/{project_id}/files", - structure=Sequence[models.ProjectFile], + structure=Sequence[mdls.ProjectFile], query_params={"fields": fields}, transport_options=transport_options, ), @@ -7345,7 +7423,7 @@ def all_project_files( # # Returns information about a file in the project # - # GET /projects/{project_id}/files/file -> models.ProjectFile + # GET /projects/{project_id}/files/file -> mdls.ProjectFile def project_file( self, # Project Id @@ -7355,14 +7433,14 @@ def project_file( # Requested fields fields: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.ProjectFile: + ) -> mdls.ProjectFile: """Get Project File""" project_id = self.encode_path_param(project_id) response = cast( - models.ProjectFile, + mdls.ProjectFile, self.get( path=f"/projects/{project_id}/files/file", - structure=models.ProjectFile, + structure=mdls.ProjectFile, query_params={"file_id": file_id, "fields": fields}, transport_options=transport_options, ), @@ -7380,7 +7458,7 @@ def project_file( # # For example, a late-stage test for write access is meaningless if connecting to the git server (an early test) is failing. # - # GET /projects/{project_id}/git_connection_tests -> Sequence[models.GitConnectionTest] + # GET /projects/{project_id}/git_connection_tests -> Sequence[mdls.GitConnectionTest] def all_git_connection_tests( self, # Project Id @@ -7388,14 +7466,14 @@ def all_git_connection_tests( # (Optional: leave blank for root project) The remote url for remote dependency to test. remote_url: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> Sequence[models.GitConnectionTest]: + ) -> Sequence[mdls.GitConnectionTest]: """Get All Git Connection Tests""" project_id = self.encode_path_param(project_id) response = cast( - Sequence[models.GitConnectionTest], + Sequence[mdls.GitConnectionTest], self.get( path=f"/projects/{project_id}/git_connection_tests", - structure=Sequence[models.GitConnectionTest], + structure=Sequence[mdls.GitConnectionTest], query_params={"remote_url": remote_url}, transport_options=transport_options, ), @@ -7410,7 +7488,7 @@ def all_git_connection_tests( # # Tests should be run in the order they are returned by [Get All Git Connection Tests](#!/Project/all_git_connection_tests). # - # GET /projects/{project_id}/git_connection_tests/{test_id} -> models.GitConnectionTestResult + # GET /projects/{project_id}/git_connection_tests/{test_id} -> mdls.GitConnectionTestResult def run_git_connection_test( self, # Project Id @@ -7422,15 +7500,15 @@ def run_git_connection_test( # (Optional: leave blank for dev credentials) Whether to use git production credentials. use_production: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.GitConnectionTestResult: + ) -> mdls.GitConnectionTestResult: """Run Git Connection Test""" project_id = self.encode_path_param(project_id) test_id = self.encode_path_param(test_id) response = cast( - models.GitConnectionTestResult, + mdls.GitConnectionTestResult, self.get( path=f"/projects/{project_id}/git_connection_tests/{test_id}", - structure=models.GitConnectionTestResult, + structure=mdls.GitConnectionTestResult, query_params={ "remote_url": remote_url, "use_production": use_production, @@ -7446,7 +7524,7 @@ def run_git_connection_test( # optionally filtered by the file id. # Call [Run LookML Test](#!/Project/run_lookml_test) to execute tests. # - # GET /projects/{project_id}/lookml_tests -> Sequence[models.LookmlTest] + # GET /projects/{project_id}/lookml_tests -> Sequence[mdls.LookmlTest] def all_lookml_tests( self, # Project Id @@ -7454,14 +7532,14 @@ def all_lookml_tests( # File Id file_id: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> Sequence[models.LookmlTest]: + ) -> Sequence[mdls.LookmlTest]: """Get All LookML Tests""" project_id = self.encode_path_param(project_id) response = cast( - Sequence[models.LookmlTest], + Sequence[mdls.LookmlTest], self.get( path=f"/projects/{project_id}/lookml_tests", - structure=Sequence[models.LookmlTest], + structure=Sequence[mdls.LookmlTest], query_params={"file_id": file_id}, transport_options=transport_options, ), @@ -7472,7 +7550,7 @@ def all_lookml_tests( # # Runs all tests in the project, optionally filtered by file, test, and/or model. # - # GET /projects/{project_id}/lookml_tests/run -> Sequence[models.LookmlTestResult] + # GET /projects/{project_id}/lookml_tests/run -> Sequence[mdls.LookmlTestResult] def run_lookml_test( self, # Project Id @@ -7484,14 +7562,14 @@ def run_lookml_test( # Model Name model: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> Sequence[models.LookmlTestResult]: + ) -> Sequence[mdls.LookmlTestResult]: """Run LookML Test""" project_id = self.encode_path_param(project_id) response = cast( - Sequence[models.LookmlTestResult], + Sequence[mdls.LookmlTestResult], self.get( path=f"/projects/{project_id}/lookml_tests/run", - structure=Sequence[models.LookmlTestResult], + structure=Sequence[mdls.LookmlTestResult], query_params={"file_id": file_id, "test": test, "model": model}, transport_options=transport_options, ), @@ -7502,12 +7580,12 @@ def run_lookml_test( # # This is an internal-only, undocumented route. # - # POST /projects/{project_id}/tag -> models.Project + # POST /projects/{project_id}/tag -> mdls.Project def tag_ref( self, # Project Id project_id: str, - body: models.WriteProject, + body: mdls.WriteProject, # (Optional): Commit Sha to Tag commit_sha: Optional[str] = None, # Tag Name @@ -7515,14 +7593,14 @@ def tag_ref( # (Optional): Tag Message tag_message: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.Project: + ) -> mdls.Project: """Tag Ref""" project_id = self.encode_path_param(project_id) response = cast( - models.Project, + mdls.Project, self.post( path=f"/projects/{project_id}/tag", - structure=models.Project, + structure=mdls.Project, query_params={ "commit_sha": commit_sha, "tag_name": tag_name, @@ -7541,24 +7619,24 @@ def tag_ref( # `root_project_id` is required. # `credential_id` is required. # - # PUT /projects/{root_project_id}/credential/{credential_id} -> models.RepositoryCredential + # PUT /projects/{root_project_id}/credential/{credential_id} -> mdls.RepositoryCredential def update_repository_credential( self, # Root Project Id root_project_id: str, # Credential Id credential_id: str, - body: models.WriteRepositoryCredential, + body: mdls.WriteRepositoryCredential, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.RepositoryCredential: + ) -> mdls.RepositoryCredential: """Create Repository Credential""" root_project_id = self.encode_path_param(root_project_id) credential_id = self.encode_path_param(credential_id) response = cast( - models.RepositoryCredential, + mdls.RepositoryCredential, self.put( path=f"/projects/{root_project_id}/credential/{credential_id}", - structure=models.RepositoryCredential, + structure=mdls.RepositoryCredential, body=body, transport_options=transport_options, ), @@ -7598,20 +7676,20 @@ def delete_repository_credential( # # `root_project_id` is required. # - # GET /projects/{root_project_id}/credentials -> Sequence[models.RepositoryCredential] + # GET /projects/{root_project_id}/credentials -> Sequence[mdls.RepositoryCredential] def get_all_repository_credentials( self, # Root Project Id root_project_id: str, transport_options: Optional[transport.TransportOptions] = None, - ) -> Sequence[models.RepositoryCredential]: + ) -> Sequence[mdls.RepositoryCredential]: """Get All Repository Credentials""" root_project_id = self.encode_path_param(root_project_id) response = cast( - Sequence[models.RepositoryCredential], + Sequence[mdls.RepositoryCredential], self.get( path=f"/projects/{root_project_id}/credentials", - structure=Sequence[models.RepositoryCredential], + structure=Sequence[mdls.RepositoryCredential], transport_options=transport_options, ), ) @@ -7628,10 +7706,10 @@ def get_all_repository_credentials( # Use [query_task(query_task_id)](#!/Query/query_task) to check the execution status of the query task. # After the query task status reaches "Complete", use [query_task_results(query_task_id)](#!/Query/query_task_results) to fetch the results of the query. # - # POST /query_tasks -> models.QueryTask + # POST /query_tasks -> mdls.QueryTask def create_query_task( self, - body: models.WriteCreateQueryTask, + body: mdls.WriteCreateQueryTask, # Row limit (may override the limit in the saved query). limit: Optional[int] = None, # Apply model-specified formatting to each result. @@ -7659,13 +7737,13 @@ def create_query_task( # Requested fields fields: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.QueryTask: + ) -> mdls.QueryTask: """Run Query Async""" response = cast( - models.QueryTask, + mdls.QueryTask, self.post( path="/query_tasks", - structure=models.QueryTask, + structure=mdls.QueryTask, query_params={ "limit": limit, "apply_formatting": apply_formatting, @@ -7699,7 +7777,7 @@ def create_query_task( def query_task_multi_results( self, # List of Query Task IDs - query_task_ids: models.DelimSequence[str], + query_task_ids: mdls.DelimSequence[str], transport_options: Optional[transport.TransportOptions] = None, ) -> MutableMapping[str, Any]: """Get Multiple Async Query Results""" @@ -7722,7 +7800,7 @@ def query_task_multi_results( # # Use [create_query_task()](#!/Query/create_query_task) to create an async query task. # - # GET /query_tasks/{query_task_id} -> models.QueryTask + # GET /query_tasks/{query_task_id} -> mdls.QueryTask def query_task( self, # ID of the Query Task @@ -7730,14 +7808,14 @@ def query_task( # Requested fields. fields: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.QueryTask: + ) -> mdls.QueryTask: """Get Async Query Info""" query_task_id = self.encode_path_param(query_task_id) response = cast( - models.QueryTask, + mdls.QueryTask, self.get( path=f"/query_tasks/{query_task_id}", - structure=models.QueryTask, + structure=mdls.QueryTask, query_params={"fields": fields}, transport_options=transport_options, ), @@ -7805,7 +7883,7 @@ def query_task_results( # builds queries and visualizations and are not generally useful for API use. They are not required when # creating new queries and can usually just be ignored. # - # GET /queries/{query_id} -> models.Query + # GET /queries/{query_id} -> mdls.Query def query( self, # Id of query @@ -7813,13 +7891,13 @@ def query( # Requested fields. fields: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.Query: + ) -> mdls.Query: """Get Query""" response = cast( - models.Query, + mdls.Query, self.get( path=f"/queries/{query_id}", - structure=models.Query, + structure=mdls.Query, query_params={"fields": fields}, transport_options=transport_options, ), @@ -7844,7 +7922,7 @@ def query( # 'https://looker.yourcompany/explore/ecommerce/orders?qid=aogBgL6o3cKK1jN3RoZl5s'. In this case # 'aogBgL6o3cKK1jN3RoZl5s' is the slug. # - # GET /queries/slug/{slug} -> models.Query + # GET /queries/slug/{slug} -> mdls.Query def query_for_slug( self, # Slug of query @@ -7852,14 +7930,14 @@ def query_for_slug( # Requested fields. fields: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.Query: + ) -> mdls.Query: """Get Query for Slug""" slug = self.encode_path_param(slug) response = cast( - models.Query, + mdls.Query, self.get( path=f"/queries/slug/{slug}", - structure=models.Query, + structure=mdls.Query, query_params={"fields": fields}, transport_options=transport_options, ), @@ -7875,20 +7953,20 @@ def query_for_slug( # # The query parameters are passed as json in the body of the request. # - # POST /queries -> models.Query + # POST /queries -> mdls.Query def create_query( self, - body: models.WriteQuery, + body: mdls.WriteQuery, # Requested fields. fields: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.Query: + ) -> mdls.Query: """Create Query""" response = cast( - models.Query, + mdls.Query, self.post( path="/queries", - structure=models.Query, + structure=mdls.Query, query_params={"fields": fields}, body=body, transport_options=transport_options, @@ -7949,6 +8027,8 @@ def run_query( rebuild_pdts: Optional[bool] = None, # Perform table calculations on query results server_table_calcs: Optional[bool] = None, + # Specifies the source of this call. + source: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, ) -> Union[str, bytes]: """Run Query""" @@ -7971,6 +8051,7 @@ def run_query( "path_prefix": path_prefix, "rebuild_pdts": rebuild_pdts, "server_table_calcs": server_table_calcs, + "source": source, }, transport_options=transport_options, ), @@ -8033,7 +8114,7 @@ def run_inline_query( self, # Format of result result_format: str, - body: models.WriteQuery, + body: mdls.WriteQuery, # Row limit (may override the limit in the saved query). limit: Optional[int] = None, # Apply model-specified formatting to each result. @@ -8169,7 +8250,7 @@ def run_url_encoded_query( # # Returns a merge query object given its id. # - # GET /merge_queries/{merge_query_id} -> models.MergeQuery + # GET /merge_queries/{merge_query_id} -> mdls.MergeQuery def merge_query( self, # Merge Query Id @@ -8177,14 +8258,14 @@ def merge_query( # Requested fields fields: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.MergeQuery: + ) -> mdls.MergeQuery: """Get Merge Query""" merge_query_id = self.encode_path_param(merge_query_id) response = cast( - models.MergeQuery, + mdls.MergeQuery, self.get( path=f"/merge_queries/{merge_query_id}", - structure=models.MergeQuery, + structure=mdls.MergeQuery, query_params={"fields": fields}, transport_options=transport_options, ), @@ -8209,20 +8290,20 @@ def merge_query( # the existing merge query will be returned instead of creating a duplicate. Conversely, any # change to the contents of a merge query will produce a new object with a new id. # - # POST /merge_queries -> models.MergeQuery + # POST /merge_queries -> mdls.MergeQuery def create_merge_query( self, - body: Optional[models.WriteMergeQuery] = None, + body: Optional[mdls.WriteMergeQuery] = None, # Requested fields fields: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.MergeQuery: + ) -> mdls.MergeQuery: """Create Merge Query""" response = cast( - models.MergeQuery, + mdls.MergeQuery, self.post( path="/merge_queries", - structure=models.MergeQuery, + structure=mdls.MergeQuery, query_params={"fields": fields}, body=body, transport_options=transport_options, @@ -8232,17 +8313,17 @@ def create_merge_query( # Get information about all running queries. # - # GET /running_queries -> Sequence[models.RunningQueries] + # GET /running_queries -> Sequence[mdls.RunningQueries] def all_running_queries( self, transport_options: Optional[transport.TransportOptions] = None, - ) -> Sequence[models.RunningQueries]: + ) -> Sequence[mdls.RunningQueries]: """Get All Running Queries""" response = cast( - Sequence[models.RunningQueries], + Sequence[mdls.RunningQueries], self.get( path="/running_queries", - structure=Sequence[models.RunningQueries], + structure=Sequence[mdls.RunningQueries], transport_options=transport_options, ), ) @@ -8271,20 +8352,20 @@ def kill_query( # Get a SQL Runner query. # - # GET /sql_queries/{slug} -> models.SqlQuery + # GET /sql_queries/{slug} -> mdls.SqlQuery def sql_query( self, # slug of query slug: str, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.SqlQuery: + ) -> mdls.SqlQuery: """Get SQL Runner Query""" slug = self.encode_path_param(slug) response = cast( - models.SqlQuery, + mdls.SqlQuery, self.get( path=f"/sql_queries/{slug}", - structure=models.SqlQuery, + structure=mdls.SqlQuery, transport_options=transport_options, ), ) @@ -8294,18 +8375,18 @@ def sql_query( # # Either the `connection_name` or `model_name` parameter MUST be provided. # - # POST /sql_queries -> models.SqlQuery + # POST /sql_queries -> mdls.SqlQuery def create_sql_query( self, - body: models.SqlQueryCreate, + body: mdls.SqlQueryCreate, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.SqlQuery: + ) -> mdls.SqlQuery: """Create SQL Runner Query""" response = cast( - models.SqlQuery, + mdls.SqlQuery, self.post( path="/sql_queries", - structure=models.SqlQuery, + structure=mdls.SqlQuery, body=body, transport_options=transport_options, ), @@ -8349,7 +8430,7 @@ def run_sql_query( # To check the status of a render task, pass the render_task.id to [Get Render Task](#!/RenderTask/get_render_task). # Once the render task is complete, you can download the resulting document or image using [Get Render Task Results](#!/RenderTask/get_render_task_results). # - # POST /render_tasks/looks/{look_id}/{result_format} -> models.RenderTask + # POST /render_tasks/looks/{look_id}/{result_format} -> mdls.RenderTask def create_look_render_task( self, # Id of look to render @@ -8363,14 +8444,14 @@ def create_look_render_task( # Requested fields. fields: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.RenderTask: + ) -> mdls.RenderTask: """Create Look Render Task""" result_format = self.encode_path_param(result_format) response = cast( - models.RenderTask, + mdls.RenderTask, self.post( path=f"/render_tasks/looks/{look_id}/{result_format}", - structure=models.RenderTask, + structure=mdls.RenderTask, query_params={"width": width, "height": height, "fields": fields}, transport_options=transport_options, ), @@ -8383,7 +8464,7 @@ def create_look_render_task( # To check the status of a render task, pass the render_task.id to [Get Render Task](#!/RenderTask/get_render_task). # Once the render task is complete, you can download the resulting document or image using [Get Render Task Results](#!/RenderTask/get_render_task_results). # - # POST /render_tasks/queries/{query_id}/{result_format} -> models.RenderTask + # POST /render_tasks/queries/{query_id}/{result_format} -> mdls.RenderTask def create_query_render_task( self, # Id of the query to render @@ -8397,14 +8478,14 @@ def create_query_render_task( # Requested fields. fields: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.RenderTask: + ) -> mdls.RenderTask: """Create Query Render Task""" result_format = self.encode_path_param(result_format) response = cast( - models.RenderTask, + mdls.RenderTask, self.post( path=f"/render_tasks/queries/{query_id}/{result_format}", - structure=models.RenderTask, + structure=mdls.RenderTask, query_params={"width": width, "height": height, "fields": fields}, transport_options=transport_options, ), @@ -8417,14 +8498,14 @@ def create_query_render_task( # To check the status of a render task, pass the render_task.id to [Get Render Task](#!/RenderTask/get_render_task). # Once the render task is complete, you can download the resulting document or image using [Get Render Task Results](#!/RenderTask/get_render_task_results). # - # POST /render_tasks/dashboards/{dashboard_id}/{result_format} -> models.RenderTask + # POST /render_tasks/dashboards/{dashboard_id}/{result_format} -> mdls.RenderTask def create_dashboard_render_task( self, # Id of dashboard to render. The ID can be a LookML dashboard also. dashboard_id: str, # Output type: pdf, png, or jpg result_format: str, - body: models.CreateDashboardRenderTask, + body: mdls.CreateDashboardRenderTask, # Output width in pixels width: int, # Output height in pixels @@ -8438,15 +8519,15 @@ def create_dashboard_render_task( # Whether or not to expand table vis to full length long_tables: Optional[bool] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.RenderTask: + ) -> mdls.RenderTask: """Create Dashboard Render Task""" dashboard_id = self.encode_path_param(dashboard_id) result_format = self.encode_path_param(result_format) response = cast( - models.RenderTask, + mdls.RenderTask, self.post( path=f"/render_tasks/dashboards/{dashboard_id}/{result_format}", - structure=models.RenderTask, + structure=mdls.RenderTask, query_params={ "width": width, "height": height, @@ -8467,7 +8548,7 @@ def create_dashboard_render_task( # To check the status of a render task, pass the render_task.id to [Get Render Task](#!/RenderTask/get_render_task). # Once the render task is complete, you can download the resulting document or image using [Get Render Task Results](#!/RenderTask/get_render_task_results). # - # GET /render_tasks/{render_task_id} -> models.RenderTask + # GET /render_tasks/{render_task_id} -> mdls.RenderTask def render_task( self, # Id of render task @@ -8475,14 +8556,14 @@ def render_task( # Requested fields. fields: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.RenderTask: + ) -> mdls.RenderTask: """Get Render Task""" render_task_id = self.encode_path_param(render_task_id) response = cast( - models.RenderTask, + mdls.RenderTask, self.get( path=f"/render_tasks/{render_task_id}", - structure=models.RenderTask, + structure=mdls.RenderTask, query_params={"fields": fields}, transport_options=transport_options, ), @@ -8553,7 +8634,7 @@ def render_task_results( # # Boolean search params accept only "true" and "false" as values. # - # GET /model_sets/search -> Sequence[models.ModelSet] + # GET /model_sets/search -> Sequence[mdls.ModelSet] def search_model_sets( self, # Requested fields. @@ -8575,13 +8656,13 @@ def search_model_sets( # Combine given search criteria in a boolean OR expression. filter_or: Optional[bool] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> Sequence[models.ModelSet]: + ) -> Sequence[mdls.ModelSet]: """Search Model Sets""" response = cast( - Sequence[models.ModelSet], + Sequence[mdls.ModelSet], self.get( path="/model_sets/search", - structure=Sequence[models.ModelSet], + structure=Sequence[mdls.ModelSet], query_params={ "fields": fields, "limit": limit, @@ -8600,7 +8681,7 @@ def search_model_sets( # ### Get information about the model set with a specific id. # - # GET /model_sets/{model_set_id} -> models.ModelSet + # GET /model_sets/{model_set_id} -> mdls.ModelSet def model_set( self, # Id of model set @@ -8608,13 +8689,13 @@ def model_set( # Requested fields. fields: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.ModelSet: + ) -> mdls.ModelSet: """Get Model Set""" response = cast( - models.ModelSet, + mdls.ModelSet, self.get( path=f"/model_sets/{model_set_id}", - structure=models.ModelSet, + structure=mdls.ModelSet, query_params={"fields": fields}, transport_options=transport_options, ), @@ -8623,20 +8704,20 @@ def model_set( # ### Update information about the model set with a specific id. # - # PATCH /model_sets/{model_set_id} -> models.ModelSet + # PATCH /model_sets/{model_set_id} -> mdls.ModelSet def update_model_set( self, # id of model set model_set_id: int, - body: models.WriteModelSet, + body: mdls.WriteModelSet, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.ModelSet: + ) -> mdls.ModelSet: """Update Model Set""" response = cast( - models.ModelSet, + mdls.ModelSet, self.patch( path=f"/model_sets/{model_set_id}", - structure=models.ModelSet, + structure=mdls.ModelSet, body=body, transport_options=transport_options, ), @@ -8665,19 +8746,19 @@ def delete_model_set( # ### Get information about all model sets. # - # GET /model_sets -> Sequence[models.ModelSet] + # GET /model_sets -> Sequence[mdls.ModelSet] def all_model_sets( self, # Requested fields. fields: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> Sequence[models.ModelSet]: + ) -> Sequence[mdls.ModelSet]: """Get All Model Sets""" response = cast( - Sequence[models.ModelSet], + Sequence[mdls.ModelSet], self.get( path="/model_sets", - structure=Sequence[models.ModelSet], + structure=Sequence[mdls.ModelSet], query_params={"fields": fields}, transport_options=transport_options, ), @@ -8686,18 +8767,18 @@ def all_model_sets( # ### Create a model set with the specified information. Model sets are used by Roles. # - # POST /model_sets -> models.ModelSet + # POST /model_sets -> mdls.ModelSet def create_model_set( self, - body: models.WriteModelSet, + body: mdls.WriteModelSet, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.ModelSet: + ) -> mdls.ModelSet: """Create Model Set""" response = cast( - models.ModelSet, + mdls.ModelSet, self.post( path="/model_sets", - structure=models.ModelSet, + structure=mdls.ModelSet, body=body, transport_options=transport_options, ), @@ -8706,17 +8787,17 @@ def create_model_set( # ### Get all supported permissions. # - # GET /permissions -> Sequence[models.Permission] + # GET /permissions -> Sequence[mdls.Permission] def all_permissions( self, transport_options: Optional[transport.TransportOptions] = None, - ) -> Sequence[models.Permission]: + ) -> Sequence[mdls.Permission]: """Get All Permissions""" response = cast( - Sequence[models.Permission], + Sequence[mdls.Permission], self.get( path="/permissions", - structure=Sequence[models.Permission], + structure=Sequence[mdls.Permission], transport_options=transport_options, ), ) @@ -8745,7 +8826,7 @@ def all_permissions( # # Boolean search params accept only "true" and "false" as values. # - # GET /permission_sets/search -> Sequence[models.PermissionSet] + # GET /permission_sets/search -> Sequence[mdls.PermissionSet] def search_permission_sets( self, # Requested fields. @@ -8767,13 +8848,13 @@ def search_permission_sets( # Combine given search criteria in a boolean OR expression. filter_or: Optional[bool] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> Sequence[models.PermissionSet]: + ) -> Sequence[mdls.PermissionSet]: """Search Permission Sets""" response = cast( - Sequence[models.PermissionSet], + Sequence[mdls.PermissionSet], self.get( path="/permission_sets/search", - structure=Sequence[models.PermissionSet], + structure=Sequence[mdls.PermissionSet], query_params={ "fields": fields, "limit": limit, @@ -8792,7 +8873,7 @@ def search_permission_sets( # ### Get information about the permission set with a specific id. # - # GET /permission_sets/{permission_set_id} -> models.PermissionSet + # GET /permission_sets/{permission_set_id} -> mdls.PermissionSet def permission_set( self, # Id of permission set @@ -8800,13 +8881,13 @@ def permission_set( # Requested fields. fields: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.PermissionSet: + ) -> mdls.PermissionSet: """Get Permission Set""" response = cast( - models.PermissionSet, + mdls.PermissionSet, self.get( path=f"/permission_sets/{permission_set_id}", - structure=models.PermissionSet, + structure=mdls.PermissionSet, query_params={"fields": fields}, transport_options=transport_options, ), @@ -8815,20 +8896,20 @@ def permission_set( # ### Update information about the permission set with a specific id. # - # PATCH /permission_sets/{permission_set_id} -> models.PermissionSet + # PATCH /permission_sets/{permission_set_id} -> mdls.PermissionSet def update_permission_set( self, # id of permission set permission_set_id: int, - body: models.WritePermissionSet, + body: mdls.WritePermissionSet, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.PermissionSet: + ) -> mdls.PermissionSet: """Update Permission Set""" response = cast( - models.PermissionSet, + mdls.PermissionSet, self.patch( path=f"/permission_sets/{permission_set_id}", - structure=models.PermissionSet, + structure=mdls.PermissionSet, body=body, transport_options=transport_options, ), @@ -8857,19 +8938,19 @@ def delete_permission_set( # ### Get information about all permission sets. # - # GET /permission_sets -> Sequence[models.PermissionSet] + # GET /permission_sets -> Sequence[mdls.PermissionSet] def all_permission_sets( self, # Requested fields. fields: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> Sequence[models.PermissionSet]: + ) -> Sequence[mdls.PermissionSet]: """Get All Permission Sets""" response = cast( - Sequence[models.PermissionSet], + Sequence[mdls.PermissionSet], self.get( path="/permission_sets", - structure=Sequence[models.PermissionSet], + structure=Sequence[mdls.PermissionSet], query_params={"fields": fields}, transport_options=transport_options, ), @@ -8878,18 +8959,18 @@ def all_permission_sets( # ### Create a permission set with the specified information. Permission sets are used by Roles. # - # POST /permission_sets -> models.PermissionSet + # POST /permission_sets -> mdls.PermissionSet def create_permission_set( self, - body: models.WritePermissionSet, + body: mdls.WritePermissionSet, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.PermissionSet: + ) -> mdls.PermissionSet: """Create Permission Set""" response = cast( - models.PermissionSet, + mdls.PermissionSet, self.post( path="/permission_sets", - structure=models.PermissionSet, + structure=mdls.PermissionSet, body=body, transport_options=transport_options, ), @@ -8898,21 +8979,21 @@ def create_permission_set( # ### Get information about all roles. # - # GET /roles -> Sequence[models.Role] + # GET /roles -> Sequence[mdls.Role] def all_roles( self, # Requested fields. fields: Optional[str] = None, # Optional list of ids to get specific roles. - ids: Optional[models.DelimSequence[int]] = None, + ids: Optional[mdls.DelimSequence[int]] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> Sequence[models.Role]: + ) -> Sequence[mdls.Role]: """Get All Roles""" response = cast( - Sequence[models.Role], + Sequence[mdls.Role], self.get( path="/roles", - structure=Sequence[models.Role], + structure=Sequence[mdls.Role], query_params={"fields": fields, "ids": ids}, transport_options=transport_options, ), @@ -8921,18 +9002,18 @@ def all_roles( # ### Create a role with the specified information. # - # POST /roles -> models.Role + # POST /roles -> mdls.Role def create_role( self, - body: models.WriteRole, + body: mdls.WriteRole, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.Role: + ) -> mdls.Role: """Create Role""" response = cast( - models.Role, + mdls.Role, self.post( path="/roles", - structure=models.Role, + structure=mdls.Role, body=body, transport_options=transport_options, ), @@ -8964,7 +9045,7 @@ def create_role( # # Boolean search params accept only "true" and "false" as values. # - # GET /roles/search -> Sequence[models.Role] + # GET /roles/search -> Sequence[mdls.Role] def search_roles( self, # Requested fields. @@ -8984,13 +9065,13 @@ def search_roles( # Combine given search criteria in a boolean OR expression. filter_or: Optional[bool] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> Sequence[models.Role]: + ) -> Sequence[mdls.Role]: """Search Roles""" response = cast( - Sequence[models.Role], + Sequence[mdls.Role], self.get( path="/roles/search", - structure=Sequence[models.Role], + structure=Sequence[mdls.Role], query_params={ "fields": fields, "limit": limit, @@ -9032,7 +9113,7 @@ def search_roles( # # Boolean search params accept only "true" and "false" as values. # - # GET /roles/search/with_user_count -> Sequence[models.RoleSearch] + # GET /roles/search/with_user_count -> Sequence[mdls.RoleSearch] def search_roles_with_user_count( self, # Requested fields. @@ -9052,13 +9133,13 @@ def search_roles_with_user_count( # Combine given search criteria in a boolean OR expression. filter_or: Optional[bool] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> Sequence[models.RoleSearch]: + ) -> Sequence[mdls.RoleSearch]: """Search Roles with User Count""" response = cast( - Sequence[models.RoleSearch], + Sequence[mdls.RoleSearch], self.get( path="/roles/search/with_user_count", - structure=Sequence[models.RoleSearch], + structure=Sequence[mdls.RoleSearch], query_params={ "fields": fields, "limit": limit, @@ -9076,19 +9157,19 @@ def search_roles_with_user_count( # ### Get information about the role with a specific id. # - # GET /roles/{role_id} -> models.Role + # GET /roles/{role_id} -> mdls.Role def role( self, # id of role role_id: int, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.Role: + ) -> mdls.Role: """Get Role""" response = cast( - models.Role, + mdls.Role, self.get( path=f"/roles/{role_id}", - structure=models.Role, + structure=mdls.Role, transport_options=transport_options, ), ) @@ -9096,20 +9177,20 @@ def role( # ### Update information about the role with a specific id. # - # PATCH /roles/{role_id} -> models.Role + # PATCH /roles/{role_id} -> mdls.Role def update_role( self, # id of role role_id: int, - body: models.WriteRole, + body: mdls.WriteRole, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.Role: + ) -> mdls.Role: """Update Role""" response = cast( - models.Role, + mdls.Role, self.patch( path=f"/roles/{role_id}", - structure=models.Role, + structure=mdls.Role, body=body, transport_options=transport_options, ), @@ -9138,7 +9219,7 @@ def delete_role( # ### Get information about all the groups with the role that has a specific id. # - # GET /roles/{role_id}/groups -> Sequence[models.Group] + # GET /roles/{role_id}/groups -> Sequence[mdls.Group] def role_groups( self, # id of role @@ -9146,13 +9227,13 @@ def role_groups( # Requested fields. fields: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> Sequence[models.Group]: + ) -> Sequence[mdls.Group]: """Get Role Groups""" response = cast( - Sequence[models.Group], + Sequence[mdls.Group], self.get( path=f"/roles/{role_id}/groups", - structure=Sequence[models.Group], + structure=Sequence[mdls.Group], query_params={"fields": fields}, transport_options=transport_options, ), @@ -9161,20 +9242,20 @@ def role_groups( # ### Set all groups for a role, removing all existing group associations from that role. # - # PUT /roles/{role_id}/groups -> Sequence[models.Group] + # PUT /roles/{role_id}/groups -> Sequence[mdls.Group] def set_role_groups( self, # Id of Role role_id: int, body: Sequence[int], transport_options: Optional[transport.TransportOptions] = None, - ) -> Sequence[models.Group]: + ) -> Sequence[mdls.Group]: """Update Role Groups""" response = cast( - Sequence[models.Group], + Sequence[mdls.Group], self.put( path=f"/roles/{role_id}/groups", - structure=Sequence[models.Group], + structure=Sequence[mdls.Group], body=body, transport_options=transport_options, ), @@ -9183,7 +9264,7 @@ def set_role_groups( # ### Get information about all the users with the role that has a specific id. # - # GET /roles/{role_id}/users -> Sequence[models.User] + # GET /roles/{role_id}/users -> Sequence[mdls.User] def role_users( self, # id of user @@ -9193,13 +9274,13 @@ def role_users( # Get only users associated directly with the role: exclude those only associated through groups. direct_association_only: Optional[bool] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> Sequence[models.User]: + ) -> Sequence[mdls.User]: """Get Role Users""" response = cast( - Sequence[models.User], + Sequence[mdls.User], self.get( path=f"/roles/{role_id}/users", - structure=Sequence[models.User], + structure=Sequence[mdls.User], query_params={ "fields": fields, "direct_association_only": direct_association_only, @@ -9211,20 +9292,20 @@ def role_users( # ### Set all the users of the role with a specific id. # - # PUT /roles/{role_id}/users -> Sequence[models.User] + # PUT /roles/{role_id}/users -> Sequence[mdls.User] def set_role_users( self, # id of role role_id: int, body: Sequence[int], transport_options: Optional[transport.TransportOptions] = None, - ) -> Sequence[models.User]: + ) -> Sequence[mdls.User]: """Update Role Users""" response = cast( - Sequence[models.User], + Sequence[mdls.User], self.put( path=f"/roles/{role_id}/users", - structure=Sequence[models.User], + structure=Sequence[mdls.User], body=body, transport_options=transport_options, ), @@ -9239,7 +9320,7 @@ def set_role_users( # # Returns scheduled plans owned by the caller for a given space id. # - # GET /scheduled_plans/space/{space_id} -> Sequence[models.ScheduledPlan] + # GET /scheduled_plans/space/{space_id} -> Sequence[mdls.ScheduledPlan] def scheduled_plans_for_space( self, # Space Id @@ -9247,13 +9328,13 @@ def scheduled_plans_for_space( # Requested fields. fields: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> Sequence[models.ScheduledPlan]: + ) -> Sequence[mdls.ScheduledPlan]: """Scheduled Plans for Space""" response = cast( - Sequence[models.ScheduledPlan], + Sequence[mdls.ScheduledPlan], self.get( path=f"/scheduled_plans/space/{space_id}", - structure=Sequence[models.ScheduledPlan], + structure=Sequence[mdls.ScheduledPlan], query_params={"fields": fields}, transport_options=transport_options, ), @@ -9264,7 +9345,7 @@ def scheduled_plans_for_space( # # Admins can fetch information about other users' Scheduled Plans. # - # GET /scheduled_plans/{scheduled_plan_id} -> models.ScheduledPlan + # GET /scheduled_plans/{scheduled_plan_id} -> mdls.ScheduledPlan def scheduled_plan( self, # Scheduled Plan Id @@ -9272,13 +9353,13 @@ def scheduled_plan( # Requested fields. fields: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.ScheduledPlan: + ) -> mdls.ScheduledPlan: """Get Scheduled Plan""" response = cast( - models.ScheduledPlan, + mdls.ScheduledPlan, self.get( path=f"/scheduled_plans/{scheduled_plan_id}", - structure=models.ScheduledPlan, + structure=mdls.ScheduledPlan, query_params={"fields": fields}, transport_options=transport_options, ), @@ -9328,20 +9409,20 @@ def scheduled_plan( # # Valid formats vary by destination type and source object. `wysiwyg_pdf` is only valid for dashboards, for example. # - # PATCH /scheduled_plans/{scheduled_plan_id} -> models.ScheduledPlan + # PATCH /scheduled_plans/{scheduled_plan_id} -> mdls.ScheduledPlan def update_scheduled_plan( self, # Scheduled Plan Id scheduled_plan_id: int, - body: models.WriteScheduledPlan, + body: mdls.WriteScheduledPlan, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.ScheduledPlan: + ) -> mdls.ScheduledPlan: """Update Scheduled Plan""" response = cast( - models.ScheduledPlan, + mdls.ScheduledPlan, self.patch( path=f"/scheduled_plans/{scheduled_plan_id}", - structure=models.ScheduledPlan, + structure=mdls.ScheduledPlan, body=body, transport_options=transport_options, ), @@ -9384,7 +9465,7 @@ def delete_scheduled_plan( # # The caller must have `see_schedules` permission to see other users' scheduled plans. # - # GET /scheduled_plans -> Sequence[models.ScheduledPlan] + # GET /scheduled_plans -> Sequence[mdls.ScheduledPlan] def all_scheduled_plans( self, # Return scheduled plans belonging to this user_id. If not provided, returns scheduled plans owned by the caller. @@ -9394,13 +9475,13 @@ def all_scheduled_plans( # Return scheduled plans belonging to all users (caller needs see_schedules permission) all_users: Optional[bool] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> Sequence[models.ScheduledPlan]: + ) -> Sequence[mdls.ScheduledPlan]: """Get All Scheduled Plans""" response = cast( - Sequence[models.ScheduledPlan], + Sequence[mdls.ScheduledPlan], self.get( path="/scheduled_plans", - structure=Sequence[models.ScheduledPlan], + structure=Sequence[mdls.ScheduledPlan], query_params={ "user_id": user_id, "fields": fields, @@ -9470,18 +9551,18 @@ def all_scheduled_plans( # # Valid formats vary by destination type and source object. `wysiwyg_pdf` is only valid for dashboards, for example. # - # POST /scheduled_plans -> models.ScheduledPlan + # POST /scheduled_plans -> mdls.ScheduledPlan def create_scheduled_plan( self, - body: models.WriteScheduledPlan, + body: mdls.WriteScheduledPlan, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.ScheduledPlan: + ) -> mdls.ScheduledPlan: """Create Scheduled Plan""" response = cast( - models.ScheduledPlan, + mdls.ScheduledPlan, self.post( path="/scheduled_plans", - structure=models.ScheduledPlan, + structure=mdls.ScheduledPlan, body=body, transport_options=transport_options, ), @@ -9526,18 +9607,18 @@ def create_scheduled_plan( # # Valid formats vary by destination type and source object. `wysiwyg_pdf` is only valid for dashboards, for example. # - # POST /scheduled_plans/run_once -> models.ScheduledPlan + # POST /scheduled_plans/run_once -> mdls.ScheduledPlan def scheduled_plan_run_once( self, - body: models.WriteScheduledPlan, + body: mdls.WriteScheduledPlan, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.ScheduledPlan: + ) -> mdls.ScheduledPlan: """Run Scheduled Plan Once""" response = cast( - models.ScheduledPlan, + mdls.ScheduledPlan, self.post( path="/scheduled_plans/run_once", - structure=models.ScheduledPlan, + structure=mdls.ScheduledPlan, body=body, transport_options=transport_options, ), @@ -9556,7 +9637,7 @@ def scheduled_plan_run_once( # # The caller must have `see_schedules` permission to see other users' scheduled plans. # - # GET /scheduled_plans/look/{look_id} -> Sequence[models.ScheduledPlan] + # GET /scheduled_plans/look/{look_id} -> Sequence[mdls.ScheduledPlan] def scheduled_plans_for_look( self, # Look Id @@ -9568,13 +9649,13 @@ def scheduled_plans_for_look( # Return scheduled plans belonging to all users for the look all_users: Optional[bool] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> Sequence[models.ScheduledPlan]: + ) -> Sequence[mdls.ScheduledPlan]: """Scheduled Plans for Look""" response = cast( - Sequence[models.ScheduledPlan], + Sequence[mdls.ScheduledPlan], self.get( path=f"/scheduled_plans/look/{look_id}", - structure=Sequence[models.ScheduledPlan], + structure=Sequence[mdls.ScheduledPlan], query_params={ "user_id": user_id, "fields": fields, @@ -9597,7 +9678,7 @@ def scheduled_plans_for_look( # # The caller must have `see_schedules` permission to see other users' scheduled plans. # - # GET /scheduled_plans/dashboard/{dashboard_id} -> Sequence[models.ScheduledPlan] + # GET /scheduled_plans/dashboard/{dashboard_id} -> Sequence[mdls.ScheduledPlan] def scheduled_plans_for_dashboard( self, # Dashboard Id @@ -9609,13 +9690,13 @@ def scheduled_plans_for_dashboard( # Requested fields. fields: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> Sequence[models.ScheduledPlan]: + ) -> Sequence[mdls.ScheduledPlan]: """Scheduled Plans for Dashboard""" response = cast( - Sequence[models.ScheduledPlan], + Sequence[mdls.ScheduledPlan], self.get( path=f"/scheduled_plans/dashboard/{dashboard_id}", - structure=Sequence[models.ScheduledPlan], + structure=Sequence[mdls.ScheduledPlan], query_params={ "user_id": user_id, "all_users": all_users, @@ -9638,7 +9719,7 @@ def scheduled_plans_for_dashboard( # # The caller must have `see_schedules` permission to see other users' scheduled plans. # - # GET /scheduled_plans/lookml_dashboard/{lookml_dashboard_id} -> Sequence[models.ScheduledPlan] + # GET /scheduled_plans/lookml_dashboard/{lookml_dashboard_id} -> Sequence[mdls.ScheduledPlan] def scheduled_plans_for_lookml_dashboard( self, # LookML Dashboard Id @@ -9650,14 +9731,14 @@ def scheduled_plans_for_lookml_dashboard( # Return scheduled plans belonging to all users for the dashboard all_users: Optional[bool] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> Sequence[models.ScheduledPlan]: + ) -> Sequence[mdls.ScheduledPlan]: """Scheduled Plans for LookML Dashboard""" lookml_dashboard_id = self.encode_path_param(lookml_dashboard_id) response = cast( - Sequence[models.ScheduledPlan], + Sequence[mdls.ScheduledPlan], self.get( path=f"/scheduled_plans/lookml_dashboard/{lookml_dashboard_id}", - structure=Sequence[models.ScheduledPlan], + structure=Sequence[mdls.ScheduledPlan], query_params={ "user_id": user_id, "fields": fields, @@ -9716,20 +9797,20 @@ def scheduled_plans_for_lookml_dashboard( # # This API is rate limited to prevent it from being used for relay spam or DoS attacks # - # POST /scheduled_plans/{scheduled_plan_id}/run_once -> models.ScheduledPlan + # POST /scheduled_plans/{scheduled_plan_id}/run_once -> mdls.ScheduledPlan def scheduled_plan_run_once_by_id( self, # Id of schedule plan to copy and run scheduled_plan_id: int, - body: Optional[models.WriteScheduledPlan] = None, + body: Optional[mdls.WriteScheduledPlan] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.ScheduledPlan: + ) -> mdls.ScheduledPlan: """Run Scheduled Plan Once by Id""" response = cast( - models.ScheduledPlan, + mdls.ScheduledPlan, self.post( path=f"/scheduled_plans/{scheduled_plan_id}/run_once", - structure=models.ScheduledPlan, + structure=mdls.ScheduledPlan, body=body, transport_options=transport_options, ), @@ -9744,17 +9825,17 @@ def scheduled_plan_run_once_by_id( # # Returns information about the current API session, such as which workspace is selected for the session. # - # GET /session -> models.ApiSession + # GET /session -> mdls.ApiSession def session( self, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.ApiSession: + ) -> mdls.ApiSession: """Get Session""" response = cast( - models.ApiSession, + mdls.ApiSession, self.get( path="/session", - structure=models.ApiSession, + structure=mdls.ApiSession, transport_options=transport_options, ), ) @@ -9781,18 +9862,18 @@ def session( # If your Looker API client application needs to work in a dev workspace across multiple # API sessions, be sure to select the dev workspace after each login. # - # PATCH /session -> models.ApiSession + # PATCH /session -> mdls.ApiSession def update_session( self, - body: models.WriteApiSession, + body: mdls.WriteApiSession, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.ApiSession: + ) -> mdls.ApiSession: """Update Session""" response = cast( - models.ApiSession, + mdls.ApiSession, self.patch( path="/session", - structure=models.ApiSession, + structure=mdls.ApiSession, body=body, transport_options=transport_options, ), @@ -9811,19 +9892,19 @@ def update_session( # # **Note**: Custom themes needs to be enabled by Looker. Unless custom themes are enabled, only the automatically generated default theme can be used. Please contact your Account Manager or help.looker.com to update your license for this feature. # - # GET /themes -> Sequence[models.Theme] + # GET /themes -> Sequence[mdls.Theme] def all_themes( self, # Requested fields. fields: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> Sequence[models.Theme]: + ) -> Sequence[mdls.Theme]: """Get All Themes""" response = cast( - Sequence[models.Theme], + Sequence[mdls.Theme], self.get( path="/themes", - structure=Sequence[models.Theme], + structure=Sequence[mdls.Theme], query_params={"fields": fields}, transport_options=transport_options, ), @@ -9846,18 +9927,18 @@ def all_themes( # # **Note**: Custom themes needs to be enabled by Looker. Unless custom themes are enabled, only the automatically generated default theme can be used. Please contact your Account Manager or help.looker.com to update your license for this feature. # - # POST /themes -> models.Theme + # POST /themes -> mdls.Theme def create_theme( self, - body: models.WriteTheme, + body: mdls.WriteTheme, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.Theme: + ) -> mdls.Theme: """Create Theme""" response = cast( - models.Theme, + mdls.Theme, self.post( path="/themes", - structure=models.Theme, + structure=mdls.Theme, body=body, transport_options=transport_options, ), @@ -9903,7 +9984,7 @@ def create_theme( # # **Note**: Custom themes needs to be enabled by Looker. Unless custom themes are enabled, only the automatically generated default theme can be used. Please contact your Account Manager or help.looker.com to update your license for this feature. # - # GET /themes/search -> Sequence[models.Theme] + # GET /themes/search -> Sequence[mdls.Theme] def search_themes( self, # Match theme id. @@ -9925,13 +10006,13 @@ def search_themes( # Combine given search criteria in a boolean OR expression filter_or: Optional[bool] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> Sequence[models.Theme]: + ) -> Sequence[mdls.Theme]: """Search Themes""" response = cast( - Sequence[models.Theme], + Sequence[mdls.Theme], self.get( path="/themes/search", - structure=Sequence[models.Theme], + structure=Sequence[mdls.Theme], query_params={ "id": id, "name": name, @@ -9956,19 +10037,19 @@ def search_themes( # # The optional `ts` parameter can specify a different timestamp than "now." If specified, it returns the default theme at the time indicated. # - # GET /themes/default -> models.Theme + # GET /themes/default -> mdls.Theme def default_theme( self, # Timestamp representing the target datetime for the active period. Defaults to 'now' ts: Optional[datetime.datetime] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.Theme: + ) -> mdls.Theme: """Get Default Theme""" response = cast( - models.Theme, + mdls.Theme, self.get( path="/themes/default", - structure=models.Theme, + structure=mdls.Theme, query_params={"ts": ts}, transport_options=transport_options, ), @@ -9987,19 +10068,19 @@ def default_theme( # # **Note**: Custom themes needs to be enabled by Looker. Unless custom themes are enabled, only the automatically generated default theme can be used. Please contact your Account Manager or help.looker.com to update your license for this feature. # - # PUT /themes/default -> models.Theme + # PUT /themes/default -> mdls.Theme def set_default_theme( self, # Name of theme to set as default name: str, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.Theme: + ) -> mdls.Theme: """Set Default Theme""" response = cast( - models.Theme, + mdls.Theme, self.put( path="/themes/default", - structure=models.Theme, + structure=mdls.Theme, query_params={"name": name}, transport_options=transport_options, ), @@ -10016,7 +10097,7 @@ def set_default_theme( # # **Note**: Custom themes needs to be enabled by Looker. Unless custom themes are enabled, only the automatically generated default theme can be used. Please contact your Account Manager or help.looker.com to update your license for this feature. # - # GET /themes/active -> Sequence[models.Theme] + # GET /themes/active -> Sequence[mdls.Theme] def active_themes( self, # Name of theme @@ -10026,13 +10107,13 @@ def active_themes( # Requested fields. fields: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> Sequence[models.Theme]: + ) -> Sequence[mdls.Theme]: """Get Active Themes""" response = cast( - Sequence[models.Theme], + Sequence[mdls.Theme], self.get( path="/themes/active", - structure=Sequence[models.Theme], + structure=Sequence[mdls.Theme], query_params={"name": name, "ts": ts, "fields": fields}, transport_options=transport_options, ), @@ -10046,7 +10127,7 @@ def active_themes( # # **Note**: Custom themes needs to be enabled by Looker. Unless custom themes are enabled, only the automatically generated default theme can be used. Please contact your Account Manager or help.looker.com to update your license for this feature. # - # GET /themes/theme_or_default -> models.Theme + # GET /themes/theme_or_default -> mdls.Theme def theme_or_default( self, # Name of theme @@ -10054,13 +10135,13 @@ def theme_or_default( # Timestamp representing the target datetime for the active period. Defaults to 'now' ts: Optional[datetime.datetime] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.Theme: + ) -> mdls.Theme: """Get Theme or Default""" response = cast( - models.Theme, + mdls.Theme, self.get( path="/themes/theme_or_default", - structure=models.Theme, + structure=mdls.Theme, query_params={"name": name, "ts": ts}, transport_options=transport_options, ), @@ -10075,18 +10156,18 @@ def theme_or_default( # # **Note**: Custom themes needs to be enabled by Looker. Unless custom themes are enabled, only the automatically generated default theme can be used. Please contact your Account Manager or help.looker.com to update your license for this feature. # - # POST /themes/validate -> models.ValidationError + # POST /themes/validate -> mdls.ValidationError def validate_theme( self, - body: models.WriteTheme, + body: mdls.WriteTheme, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.ValidationError: + ) -> mdls.ValidationError: """Validate Theme""" response = cast( - models.ValidationError, + mdls.ValidationError, self.post( path="/themes/validate", - structure=models.ValidationError, + structure=mdls.ValidationError, body=body, transport_options=transport_options, ), @@ -10099,7 +10180,7 @@ def validate_theme( # # **Note**: Custom themes needs to be enabled by Looker. Unless custom themes are enabled, only the automatically generated default theme can be used. Please contact your Account Manager or help.looker.com to update your license for this feature. # - # GET /themes/{theme_id} -> models.Theme + # GET /themes/{theme_id} -> mdls.Theme def theme( self, # Id of theme @@ -10107,13 +10188,13 @@ def theme( # Requested fields. fields: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.Theme: + ) -> mdls.Theme: """Get Theme""" response = cast( - models.Theme, + mdls.Theme, self.get( path=f"/themes/{theme_id}", - structure=models.Theme, + structure=mdls.Theme, query_params={"fields": fields}, transport_options=transport_options, ), @@ -10124,20 +10205,20 @@ def theme( # # **Note**: Custom themes needs to be enabled by Looker. Unless custom themes are enabled, only the automatically generated default theme can be used. Please contact your Account Manager or help.looker.com to update your license for this feature. # - # PATCH /themes/{theme_id} -> models.Theme + # PATCH /themes/{theme_id} -> mdls.Theme def update_theme( self, # Id of theme theme_id: int, - body: models.WriteTheme, + body: mdls.WriteTheme, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.Theme: + ) -> mdls.Theme: """Update Theme""" response = cast( - models.Theme, + mdls.Theme, self.patch( path=f"/themes/{theme_id}", - structure=models.Theme, + structure=mdls.Theme, body=body, transport_options=transport_options, ), @@ -10202,7 +10283,7 @@ def delete_theme( # # Boolean search params accept only "true" and "false" as values. # - # GET /credentials_email/search -> Sequence[models.CredentialsEmailSearch] + # GET /credentials_email/search -> Sequence[mdls.CredentialsEmailSearch] def search_credentials_email( self, # Requested fields. @@ -10222,13 +10303,13 @@ def search_credentials_email( # Combine given search criteria in a boolean OR expression. filter_or: Optional[bool] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> Sequence[models.CredentialsEmailSearch]: + ) -> Sequence[mdls.CredentialsEmailSearch]: """Search CredentialsEmail""" response = cast( - Sequence[models.CredentialsEmailSearch], + Sequence[mdls.CredentialsEmailSearch], self.get( path="/credentials_email/search", - structure=Sequence[models.CredentialsEmailSearch], + structure=Sequence[mdls.CredentialsEmailSearch], query_params={ "fields": fields, "limit": limit, @@ -10246,19 +10327,19 @@ def search_credentials_email( # ### Get information about the current user; i.e. the user account currently calling the API. # - # GET /user -> models.User + # GET /user -> mdls.User def me( self, # Requested fields. fields: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.User: + ) -> mdls.User: """Get Current User""" response = cast( - models.User, + mdls.User, self.get( path="/user", - structure=models.User, + structure=mdls.User, query_params={"fields": fields}, transport_options=transport_options, ), @@ -10267,7 +10348,7 @@ def me( # ### Get information about all users. # - # GET /users -> Sequence[models.User] + # GET /users -> Sequence[mdls.User] def all_users( self, # Requested fields. @@ -10283,15 +10364,15 @@ def all_users( # Fields to sort by. sorts: Optional[str] = None, # Optional list of ids to get specific users. - ids: Optional[models.DelimSequence[int]] = None, + ids: Optional[mdls.DelimSequence[int]] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> Sequence[models.User]: + ) -> Sequence[mdls.User]: """Get All Users""" response = cast( - Sequence[models.User], + Sequence[mdls.User], self.get( path="/users", - structure=Sequence[models.User], + structure=Sequence[mdls.User], query_params={ "fields": fields, "page": page, @@ -10308,20 +10389,20 @@ def all_users( # ### Create a user with the specified information. # - # POST /users -> models.User + # POST /users -> mdls.User def create_user( self, - body: Optional[models.WriteUser] = None, + body: Optional[mdls.WriteUser] = None, # Requested fields. fields: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.User: + ) -> mdls.User: """Create User""" response = cast( - models.User, + mdls.User, self.post( path="/users", - structure=models.User, + structure=mdls.User, query_params={"fields": fields}, body=body, transport_options=transport_options, @@ -10360,7 +10441,7 @@ def create_user( # names of other users but no details; normal users in a closed system can only see # names of other users who are members of the same group as the user. # - # GET /users/search -> Sequence[models.User] + # GET /users/search -> Sequence[mdls.User] def search_users( self, # Include only these fields in the response @@ -10396,13 +10477,13 @@ def search_users( # Search for users who are direct members of this group group_id: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> Sequence[models.User]: + ) -> Sequence[mdls.User]: """Search Users""" response = cast( - Sequence[models.User], + Sequence[mdls.User], self.get( path="/users/search", - structure=Sequence[models.User], + structure=Sequence[mdls.User], query_params={ "fields": fields, "page": page, @@ -10433,7 +10514,7 @@ def search_users( # # Any additional search params will be combined into a logical AND expression. # - # GET /users/search/names/{pattern} -> Sequence[models.User] + # GET /users/search/names/{pattern} -> Sequence[mdls.User] def search_users_names( self, # Pattern to match @@ -10463,14 +10544,14 @@ def search_users_names( # Include or exclude disabled accounts in the results is_disabled: Optional[bool] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> Sequence[models.User]: + ) -> Sequence[mdls.User]: """Search User Names""" pattern = self.encode_path_param(pattern) response = cast( - Sequence[models.User], + Sequence[mdls.User], self.get( path=f"/users/search/names/{pattern}", - structure=Sequence[models.User], + structure=Sequence[mdls.User], query_params={ "fields": fields, "page": page, @@ -10496,7 +10577,7 @@ def search_users_names( # be returned. Otherwise, a minimal 'public' variant of the user information will be returned. This contains # The user name and avatar url, but no sensitive information. # - # GET /users/{user_id} -> models.User + # GET /users/{user_id} -> mdls.User def user( self, # Id of user @@ -10504,13 +10585,13 @@ def user( # Requested fields. fields: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.User: + ) -> mdls.User: """Get User by Id""" response = cast( - models.User, + mdls.User, self.get( path=f"/users/{user_id}", - structure=models.User, + structure=mdls.User, query_params={"fields": fields}, transport_options=transport_options, ), @@ -10519,22 +10600,22 @@ def user( # ### Update information about the user with a specific id. # - # PATCH /users/{user_id} -> models.User + # PATCH /users/{user_id} -> mdls.User def update_user( self, # Id of user user_id: int, - body: models.WriteUser, + body: mdls.WriteUser, # Requested fields. fields: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.User: + ) -> mdls.User: """Update User""" response = cast( - models.User, + mdls.User, self.patch( path=f"/users/{user_id}", - structure=models.User, + structure=mdls.User, query_params={"fields": fields}, body=body, transport_options=transport_options, @@ -10593,7 +10674,7 @@ def delete_user( # # **NOTE**: The 'api' credential type was only used with the legacy Looker query API and is no longer supported. The credential type for API you are currently looking at is 'api3'. # - # GET /users/credential/{credential_type}/{credential_id} -> models.User + # GET /users/credential/{credential_type}/{credential_id} -> mdls.User def user_for_credential( self, # Type name of credential @@ -10603,15 +10684,15 @@ def user_for_credential( # Requested fields. fields: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.User: + ) -> mdls.User: """Get User by Credential Id""" credential_type = self.encode_path_param(credential_type) credential_id = self.encode_path_param(credential_id) response = cast( - models.User, + mdls.User, self.get( path=f"/users/credential/{credential_type}/{credential_id}", - structure=models.User, + structure=mdls.User, query_params={"fields": fields}, transport_options=transport_options, ), @@ -10620,7 +10701,7 @@ def user_for_credential( # ### Email/password login information for the specified user. # - # GET /users/{user_id}/credentials_email -> models.CredentialsEmail + # GET /users/{user_id}/credentials_email -> mdls.CredentialsEmail def user_credentials_email( self, # id of user @@ -10628,13 +10709,13 @@ def user_credentials_email( # Requested fields. fields: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.CredentialsEmail: + ) -> mdls.CredentialsEmail: """Get Email/Password Credential""" response = cast( - models.CredentialsEmail, + mdls.CredentialsEmail, self.get( path=f"/users/{user_id}/credentials_email", - structure=models.CredentialsEmail, + structure=mdls.CredentialsEmail, query_params={"fields": fields}, transport_options=transport_options, ), @@ -10643,22 +10724,22 @@ def user_credentials_email( # ### Email/password login information for the specified user. # - # POST /users/{user_id}/credentials_email -> models.CredentialsEmail + # POST /users/{user_id}/credentials_email -> mdls.CredentialsEmail def create_user_credentials_email( self, # id of user user_id: int, - body: models.WriteCredentialsEmail, + body: mdls.WriteCredentialsEmail, # Requested fields. fields: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.CredentialsEmail: + ) -> mdls.CredentialsEmail: """Create Email/Password Credential""" response = cast( - models.CredentialsEmail, + mdls.CredentialsEmail, self.post( path=f"/users/{user_id}/credentials_email", - structure=models.CredentialsEmail, + structure=mdls.CredentialsEmail, query_params={"fields": fields}, body=body, transport_options=transport_options, @@ -10668,22 +10749,22 @@ def create_user_credentials_email( # ### Email/password login information for the specified user. # - # PATCH /users/{user_id}/credentials_email -> models.CredentialsEmail + # PATCH /users/{user_id}/credentials_email -> mdls.CredentialsEmail def update_user_credentials_email( self, # id of user user_id: int, - body: models.WriteCredentialsEmail, + body: mdls.WriteCredentialsEmail, # Requested fields. fields: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.CredentialsEmail: + ) -> mdls.CredentialsEmail: """Update Email/Password Credential""" response = cast( - models.CredentialsEmail, + mdls.CredentialsEmail, self.patch( path=f"/users/{user_id}/credentials_email", - structure=models.CredentialsEmail, + structure=mdls.CredentialsEmail, query_params={"fields": fields}, body=body, transport_options=transport_options, @@ -10713,7 +10794,7 @@ def delete_user_credentials_email( # ### Two-factor login information for the specified user. # - # GET /users/{user_id}/credentials_totp -> models.CredentialsTotp + # GET /users/{user_id}/credentials_totp -> mdls.CredentialsTotp def user_credentials_totp( self, # id of user @@ -10721,13 +10802,13 @@ def user_credentials_totp( # Requested fields. fields: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.CredentialsTotp: + ) -> mdls.CredentialsTotp: """Get Two-Factor Credential""" response = cast( - models.CredentialsTotp, + mdls.CredentialsTotp, self.get( path=f"/users/{user_id}/credentials_totp", - structure=models.CredentialsTotp, + structure=mdls.CredentialsTotp, query_params={"fields": fields}, transport_options=transport_options, ), @@ -10736,22 +10817,22 @@ def user_credentials_totp( # ### Two-factor login information for the specified user. # - # POST /users/{user_id}/credentials_totp -> models.CredentialsTotp + # POST /users/{user_id}/credentials_totp -> mdls.CredentialsTotp def create_user_credentials_totp( self, # id of user user_id: int, - body: Optional[models.CredentialsTotp] = None, + body: Optional[mdls.CredentialsTotp] = None, # Requested fields. fields: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.CredentialsTotp: + ) -> mdls.CredentialsTotp: """Create Two-Factor Credential""" response = cast( - models.CredentialsTotp, + mdls.CredentialsTotp, self.post( path=f"/users/{user_id}/credentials_totp", - structure=models.CredentialsTotp, + structure=mdls.CredentialsTotp, query_params={"fields": fields}, body=body, transport_options=transport_options, @@ -10781,7 +10862,7 @@ def delete_user_credentials_totp( # ### LDAP login information for the specified user. # - # GET /users/{user_id}/credentials_ldap -> models.CredentialsLDAP + # GET /users/{user_id}/credentials_ldap -> mdls.CredentialsLDAP def user_credentials_ldap( self, # id of user @@ -10789,13 +10870,13 @@ def user_credentials_ldap( # Requested fields. fields: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.CredentialsLDAP: + ) -> mdls.CredentialsLDAP: """Get LDAP Credential""" response = cast( - models.CredentialsLDAP, + mdls.CredentialsLDAP, self.get( path=f"/users/{user_id}/credentials_ldap", - structure=models.CredentialsLDAP, + structure=mdls.CredentialsLDAP, query_params={"fields": fields}, transport_options=transport_options, ), @@ -10824,7 +10905,7 @@ def delete_user_credentials_ldap( # ### Google authentication login information for the specified user. # - # GET /users/{user_id}/credentials_google -> models.CredentialsGoogle + # GET /users/{user_id}/credentials_google -> mdls.CredentialsGoogle def user_credentials_google( self, # id of user @@ -10832,13 +10913,13 @@ def user_credentials_google( # Requested fields. fields: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.CredentialsGoogle: + ) -> mdls.CredentialsGoogle: """Get Google Auth Credential""" response = cast( - models.CredentialsGoogle, + mdls.CredentialsGoogle, self.get( path=f"/users/{user_id}/credentials_google", - structure=models.CredentialsGoogle, + structure=mdls.CredentialsGoogle, query_params={"fields": fields}, transport_options=transport_options, ), @@ -10867,7 +10948,7 @@ def delete_user_credentials_google( # ### Saml authentication login information for the specified user. # - # GET /users/{user_id}/credentials_saml -> models.CredentialsSaml + # GET /users/{user_id}/credentials_saml -> mdls.CredentialsSaml def user_credentials_saml( self, # id of user @@ -10875,13 +10956,13 @@ def user_credentials_saml( # Requested fields. fields: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.CredentialsSaml: + ) -> mdls.CredentialsSaml: """Get Saml Auth Credential""" response = cast( - models.CredentialsSaml, + mdls.CredentialsSaml, self.get( path=f"/users/{user_id}/credentials_saml", - structure=models.CredentialsSaml, + structure=mdls.CredentialsSaml, query_params={"fields": fields}, transport_options=transport_options, ), @@ -10910,7 +10991,7 @@ def delete_user_credentials_saml( # ### OpenID Connect (OIDC) authentication login information for the specified user. # - # GET /users/{user_id}/credentials_oidc -> models.CredentialsOIDC + # GET /users/{user_id}/credentials_oidc -> mdls.CredentialsOIDC def user_credentials_oidc( self, # id of user @@ -10918,13 +10999,13 @@ def user_credentials_oidc( # Requested fields. fields: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.CredentialsOIDC: + ) -> mdls.CredentialsOIDC: """Get OIDC Auth Credential""" response = cast( - models.CredentialsOIDC, + mdls.CredentialsOIDC, self.get( path=f"/users/{user_id}/credentials_oidc", - structure=models.CredentialsOIDC, + structure=mdls.CredentialsOIDC, query_params={"fields": fields}, transport_options=transport_options, ), @@ -10953,7 +11034,7 @@ def delete_user_credentials_oidc( # ### API 3 login information for the specified user. This is for the newer API keys that can be added for any user. # - # GET /users/{user_id}/credentials_api3/{credentials_api3_id} -> models.CredentialsApi3 + # GET /users/{user_id}/credentials_api3/{credentials_api3_id} -> mdls.CredentialsApi3 def user_credentials_api3( self, # Id of user @@ -10963,13 +11044,13 @@ def user_credentials_api3( # Requested fields. fields: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.CredentialsApi3: + ) -> mdls.CredentialsApi3: """Get API 3 Credential""" response = cast( - models.CredentialsApi3, + mdls.CredentialsApi3, self.get( path=f"/users/{user_id}/credentials_api3/{credentials_api3_id}", - structure=models.CredentialsApi3, + structure=mdls.CredentialsApi3, query_params={"fields": fields}, transport_options=transport_options, ), @@ -11000,7 +11081,7 @@ def delete_user_credentials_api3( # ### API 3 login information for the specified user. This is for the newer API keys that can be added for any user. # - # GET /users/{user_id}/credentials_api3 -> Sequence[models.CredentialsApi3] + # GET /users/{user_id}/credentials_api3 -> Sequence[mdls.CredentialsApi3] def all_user_credentials_api3s( self, # id of user @@ -11008,13 +11089,13 @@ def all_user_credentials_api3s( # Requested fields. fields: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> Sequence[models.CredentialsApi3]: + ) -> Sequence[mdls.CredentialsApi3]: """Get All API 3 Credentials""" response = cast( - Sequence[models.CredentialsApi3], + Sequence[mdls.CredentialsApi3], self.get( path=f"/users/{user_id}/credentials_api3", - structure=Sequence[models.CredentialsApi3], + structure=Sequence[mdls.CredentialsApi3], query_params={"fields": fields}, transport_options=transport_options, ), @@ -11023,24 +11104,22 @@ def all_user_credentials_api3s( # ### API 3 login information for the specified user. This is for the newer API keys that can be added for any user. # - # POST /users/{user_id}/credentials_api3 -> models.CredentialsApi3 + # POST /users/{user_id}/credentials_api3 -> mdls.CreateCredentialsApi3 def create_user_credentials_api3( self, # id of user user_id: int, - body: Optional[models.CredentialsApi3] = None, # Requested fields. fields: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.CredentialsApi3: + ) -> mdls.CreateCredentialsApi3: """Create API 3 Credential""" response = cast( - models.CredentialsApi3, + mdls.CreateCredentialsApi3, self.post( path=f"/users/{user_id}/credentials_api3", - structure=models.CredentialsApi3, + structure=mdls.CreateCredentialsApi3, query_params={"fields": fields}, - body=body, transport_options=transport_options, ), ) @@ -11048,7 +11127,7 @@ def create_user_credentials_api3( # ### Embed login information for the specified user. # - # GET /users/{user_id}/credentials_embed/{credentials_embed_id} -> models.CredentialsEmbed + # GET /users/{user_id}/credentials_embed/{credentials_embed_id} -> mdls.CredentialsEmbed def user_credentials_embed( self, # Id of user @@ -11058,13 +11137,13 @@ def user_credentials_embed( # Requested fields. fields: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.CredentialsEmbed: + ) -> mdls.CredentialsEmbed: """Get Embedding Credential""" response = cast( - models.CredentialsEmbed, + mdls.CredentialsEmbed, self.get( path=f"/users/{user_id}/credentials_embed/{credentials_embed_id}", - structure=models.CredentialsEmbed, + structure=mdls.CredentialsEmbed, query_params={"fields": fields}, transport_options=transport_options, ), @@ -11095,7 +11174,7 @@ def delete_user_credentials_embed( # ### Embed login information for the specified user. # - # GET /users/{user_id}/credentials_embed -> Sequence[models.CredentialsEmbed] + # GET /users/{user_id}/credentials_embed -> Sequence[mdls.CredentialsEmbed] def all_user_credentials_embeds( self, # id of user @@ -11103,13 +11182,13 @@ def all_user_credentials_embeds( # Requested fields. fields: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> Sequence[models.CredentialsEmbed]: + ) -> Sequence[mdls.CredentialsEmbed]: """Get All Embedding Credentials""" response = cast( - Sequence[models.CredentialsEmbed], + Sequence[mdls.CredentialsEmbed], self.get( path=f"/users/{user_id}/credentials_embed", - structure=Sequence[models.CredentialsEmbed], + structure=Sequence[mdls.CredentialsEmbed], query_params={"fields": fields}, transport_options=transport_options, ), @@ -11118,7 +11197,7 @@ def all_user_credentials_embeds( # ### Looker Openid login information for the specified user. Used by Looker Analysts. # - # GET /users/{user_id}/credentials_looker_openid -> models.CredentialsLookerOpenid + # GET /users/{user_id}/credentials_looker_openid -> mdls.CredentialsLookerOpenid def user_credentials_looker_openid( self, # id of user @@ -11126,13 +11205,13 @@ def user_credentials_looker_openid( # Requested fields. fields: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.CredentialsLookerOpenid: + ) -> mdls.CredentialsLookerOpenid: """Get Looker OpenId Credential""" response = cast( - models.CredentialsLookerOpenid, + mdls.CredentialsLookerOpenid, self.get( path=f"/users/{user_id}/credentials_looker_openid", - structure=models.CredentialsLookerOpenid, + structure=mdls.CredentialsLookerOpenid, query_params={"fields": fields}, transport_options=transport_options, ), @@ -11161,7 +11240,7 @@ def delete_user_credentials_looker_openid( # ### Web login session for the specified user. # - # GET /users/{user_id}/sessions/{session_id} -> models.Session + # GET /users/{user_id}/sessions/{session_id} -> mdls.Session def user_session( self, # Id of user @@ -11171,13 +11250,13 @@ def user_session( # Requested fields. fields: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.Session: + ) -> mdls.Session: """Get Web Login Session""" response = cast( - models.Session, + mdls.Session, self.get( path=f"/users/{user_id}/sessions/{session_id}", - structure=models.Session, + structure=mdls.Session, query_params={"fields": fields}, transport_options=transport_options, ), @@ -11208,7 +11287,7 @@ def delete_user_session( # ### Web login session for the specified user. # - # GET /users/{user_id}/sessions -> Sequence[models.Session] + # GET /users/{user_id}/sessions -> Sequence[mdls.Session] def all_user_sessions( self, # id of user @@ -11216,13 +11295,13 @@ def all_user_sessions( # Requested fields. fields: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> Sequence[models.Session]: + ) -> Sequence[mdls.Session]: """Get All Web Login Sessions""" response = cast( - Sequence[models.Session], + Sequence[mdls.Session], self.get( path=f"/users/{user_id}/sessions", - structure=Sequence[models.Session], + structure=Sequence[mdls.Session], query_params={"fields": fields}, transport_options=transport_options, ), @@ -11239,7 +11318,7 @@ def all_user_sessions( # The expire period is always 60 minutes when expires is enabled. # This method can be called with an empty body. # - # POST /users/{user_id}/credentials_email/password_reset -> models.CredentialsEmail + # POST /users/{user_id}/credentials_email/password_reset -> mdls.CredentialsEmail def create_user_credentials_email_password_reset( self, # Id of user @@ -11249,13 +11328,13 @@ def create_user_credentials_email_password_reset( # Requested fields. fields: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.CredentialsEmail: + ) -> mdls.CredentialsEmail: """Create Password Reset Token""" response = cast( - models.CredentialsEmail, + mdls.CredentialsEmail, self.post( path=f"/users/{user_id}/credentials_email/password_reset", - structure=models.CredentialsEmail, + structure=mdls.CredentialsEmail, query_params={"expires": expires, "fields": fields}, transport_options=transport_options, ), @@ -11264,7 +11343,7 @@ def create_user_credentials_email_password_reset( # ### Get information about roles of a given user # - # GET /users/{user_id}/roles -> Sequence[models.Role] + # GET /users/{user_id}/roles -> Sequence[mdls.Role] def user_roles( self, # id of user @@ -11274,13 +11353,13 @@ def user_roles( # Get only roles associated directly with the user: exclude those only associated through groups. direct_association_only: Optional[bool] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> Sequence[models.Role]: + ) -> Sequence[mdls.Role]: """Get User Roles""" response = cast( - Sequence[models.Role], + Sequence[mdls.Role], self.get( path=f"/users/{user_id}/roles", - structure=Sequence[models.Role], + structure=Sequence[mdls.Role], query_params={ "fields": fields, "direct_association_only": direct_association_only, @@ -11292,7 +11371,7 @@ def user_roles( # ### Set roles of the user with a specific id. # - # PUT /users/{user_id}/roles -> Sequence[models.Role] + # PUT /users/{user_id}/roles -> Sequence[mdls.Role] def set_user_roles( self, # id of user @@ -11301,13 +11380,13 @@ def set_user_roles( # Requested fields. fields: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> Sequence[models.Role]: + ) -> Sequence[mdls.Role]: """Set User Roles""" response = cast( - Sequence[models.Role], + Sequence[mdls.Role], self.put( path=f"/users/{user_id}/roles", - structure=Sequence[models.Role], + structure=Sequence[mdls.Role], query_params={"fields": fields}, body=body, transport_options=transport_options, @@ -11332,7 +11411,7 @@ def set_user_roles( # # The value of all hidden user attributes will be blank. # - # GET /users/{user_id}/attribute_values -> Sequence[models.UserAttributeWithValue] + # GET /users/{user_id}/attribute_values -> Sequence[mdls.UserAttributeWithValue] def user_attribute_user_values( self, # Id of user @@ -11340,19 +11419,19 @@ def user_attribute_user_values( # Requested fields. fields: Optional[str] = None, # Specific user attributes to request. Omit or leave blank to request all user attributes. - user_attribute_ids: Optional[models.DelimSequence[int]] = None, + user_attribute_ids: Optional[mdls.DelimSequence[int]] = None, # If true, returns all values in the search path instead of just the first value found. Useful for debugging group precedence. all_values: Optional[bool] = None, # If true, returns an empty record for each requested attribute that has no user, group, or default value. include_unset: Optional[bool] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> Sequence[models.UserAttributeWithValue]: + ) -> Sequence[mdls.UserAttributeWithValue]: """Get User Attribute Values""" response = cast( - Sequence[models.UserAttributeWithValue], + Sequence[mdls.UserAttributeWithValue], self.get( path=f"/users/{user_id}/attribute_values", - structure=Sequence[models.UserAttributeWithValue], + structure=Sequence[mdls.UserAttributeWithValue], query_params={ "fields": fields, "user_attribute_ids": user_attribute_ids, @@ -11368,22 +11447,22 @@ def user_attribute_user_values( # # Per-user user attribute values take precedence over group or default values. # - # PATCH /users/{user_id}/attribute_values/{user_attribute_id} -> models.UserAttributeWithValue + # PATCH /users/{user_id}/attribute_values/{user_attribute_id} -> mdls.UserAttributeWithValue def set_user_attribute_user_value( self, # Id of user user_id: int, # Id of user attribute user_attribute_id: int, - body: models.WriteUserAttributeWithValue, + body: mdls.WriteUserAttributeWithValue, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.UserAttributeWithValue: + ) -> mdls.UserAttributeWithValue: """Set User Attribute User Value""" response = cast( - models.UserAttributeWithValue, + mdls.UserAttributeWithValue, self.patch( path=f"/users/{user_id}/attribute_values/{user_attribute_id}", - structure=models.UserAttributeWithValue, + structure=mdls.UserAttributeWithValue, body=body, transport_options=transport_options, ), @@ -11425,7 +11504,7 @@ def delete_user_attribute_user_value( # Password reset URLs will expire in 60 minutes. # This method can be called with an empty body. # - # POST /users/{user_id}/credentials_email/send_password_reset -> models.CredentialsEmail + # POST /users/{user_id}/credentials_email/send_password_reset -> mdls.CredentialsEmail def send_user_credentials_email_password_reset( self, # Id of user @@ -11433,13 +11512,13 @@ def send_user_credentials_email_password_reset( # Requested fields. fields: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.CredentialsEmail: + ) -> mdls.CredentialsEmail: """Send Password Reset Token""" response = cast( - models.CredentialsEmail, + mdls.CredentialsEmail, self.post( path=f"/users/{user_id}/credentials_email/send_password_reset", - structure=models.CredentialsEmail, + structure=mdls.CredentialsEmail, query_params={"fields": fields}, transport_options=transport_options, ), @@ -11453,22 +11532,22 @@ def send_user_credentials_email_password_reset( # the value supplied in the 'email' body param. # The user's 'is_disabled' status must be true. # - # POST /users/{user_id}/update_emails -> models.User + # POST /users/{user_id}/update_emails -> mdls.User def wipeout_user_emails( self, # Id of user user_id: int, - body: models.UserEmailOnly, + body: mdls.UserEmailOnly, # Requested fields. fields: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.User: + ) -> mdls.User: """Wipeout User Emails""" response = cast( - models.User, + mdls.User, self.post( path=f"/users/{user_id}/update_emails", - structure=models.User, + structure=mdls.User, query_params={"fields": fields}, body=body, transport_options=transport_options, @@ -11478,18 +11557,18 @@ def wipeout_user_emails( # Create an embed user from an external user ID # - # POST /users/embed_user -> models.UserPublic + # POST /users/embed_user -> mdls.UserPublic def create_embed_user( self, - body: models.CreateEmbedUserRequest, + body: mdls.CreateEmbedUserRequest, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.UserPublic: + ) -> mdls.UserPublic: """Create an embed user from an external user ID""" response = cast( - models.UserPublic, + mdls.UserPublic, self.post( path="/users/embed_user", - structure=models.UserPublic, + structure=mdls.UserPublic, body=body, transport_options=transport_options, ), @@ -11502,7 +11581,7 @@ def create_embed_user( # ### Get information about all user attributes. # - # GET /user_attributes -> Sequence[models.UserAttribute] + # GET /user_attributes -> Sequence[mdls.UserAttribute] def all_user_attributes( self, # Requested fields. @@ -11510,13 +11589,13 @@ def all_user_attributes( # Fields to order the results by. Sortable fields include: name, label sorts: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> Sequence[models.UserAttribute]: + ) -> Sequence[mdls.UserAttribute]: """Get All User Attributes""" response = cast( - Sequence[models.UserAttribute], + Sequence[mdls.UserAttribute], self.get( path="/user_attributes", - structure=Sequence[models.UserAttribute], + structure=Sequence[mdls.UserAttribute], query_params={"fields": fields, "sorts": sorts}, transport_options=transport_options, ), @@ -11534,20 +11613,20 @@ def all_user_attributes( # Attempting to create a new user attribute with a name or label that duplicates an existing # user attribute will fail with a 422 error. # - # POST /user_attributes -> models.UserAttribute + # POST /user_attributes -> mdls.UserAttribute def create_user_attribute( self, - body: models.WriteUserAttribute, + body: mdls.WriteUserAttribute, # Requested fields. fields: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.UserAttribute: + ) -> mdls.UserAttribute: """Create User Attribute""" response = cast( - models.UserAttribute, + mdls.UserAttribute, self.post( path="/user_attributes", - structure=models.UserAttribute, + structure=mdls.UserAttribute, query_params={"fields": fields}, body=body, transport_options=transport_options, @@ -11557,7 +11636,7 @@ def create_user_attribute( # ### Get information about a user attribute. # - # GET /user_attributes/{user_attribute_id} -> models.UserAttribute + # GET /user_attributes/{user_attribute_id} -> mdls.UserAttribute def user_attribute( self, # Id of user attribute @@ -11565,13 +11644,13 @@ def user_attribute( # Requested fields. fields: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.UserAttribute: + ) -> mdls.UserAttribute: """Get User Attribute""" response = cast( - models.UserAttribute, + mdls.UserAttribute, self.get( path=f"/user_attributes/{user_attribute_id}", - structure=models.UserAttribute, + structure=mdls.UserAttribute, query_params={"fields": fields}, transport_options=transport_options, ), @@ -11580,22 +11659,22 @@ def user_attribute( # ### Update a user attribute definition. # - # PATCH /user_attributes/{user_attribute_id} -> models.UserAttribute + # PATCH /user_attributes/{user_attribute_id} -> mdls.UserAttribute def update_user_attribute( self, # Id of user attribute user_attribute_id: int, - body: models.WriteUserAttribute, + body: mdls.WriteUserAttribute, # Requested fields. fields: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.UserAttribute: + ) -> mdls.UserAttribute: """Update User Attribute""" response = cast( - models.UserAttribute, + mdls.UserAttribute, self.patch( path=f"/user_attributes/{user_attribute_id}", - structure=models.UserAttribute, + structure=mdls.UserAttribute, query_params={"fields": fields}, body=body, transport_options=transport_options, @@ -11631,7 +11710,7 @@ def delete_user_attribute( # # Results will only include groups that the caller's user account has permission to see. # - # GET /user_attributes/{user_attribute_id}/group_values -> Sequence[models.UserAttributeGroupValue] + # GET /user_attributes/{user_attribute_id}/group_values -> Sequence[mdls.UserAttributeGroupValue] def all_user_attribute_group_values( self, # Id of user attribute @@ -11639,13 +11718,13 @@ def all_user_attribute_group_values( # Requested fields. fields: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> Sequence[models.UserAttributeGroupValue]: + ) -> Sequence[mdls.UserAttributeGroupValue]: """Get User Attribute Group Values""" response = cast( - Sequence[models.UserAttributeGroupValue], + Sequence[mdls.UserAttributeGroupValue], self.get( path=f"/user_attributes/{user_attribute_id}/group_values", - structure=Sequence[models.UserAttributeGroupValue], + structure=Sequence[mdls.UserAttributeGroupValue], query_params={"fields": fields}, transport_options=transport_options, ), @@ -11673,20 +11752,20 @@ def all_user_attribute_group_values( # To set a user attribute value for a single user, see [Set User Attribute User Value](#!/User/set_user_attribute_user_value). # To set a user attribute value for all members of a group, see [Set User Attribute Group Value](#!/Group/update_user_attribute_group_value). # - # POST /user_attributes/{user_attribute_id}/group_values -> Sequence[models.UserAttributeGroupValue] + # POST /user_attributes/{user_attribute_id}/group_values -> Sequence[mdls.UserAttributeGroupValue] def set_user_attribute_group_values( self, # Id of user attribute user_attribute_id: int, - body: Sequence[models.UserAttributeGroupValue], + body: Sequence[mdls.UserAttributeGroupValue], transport_options: Optional[transport.TransportOptions] = None, - ) -> Sequence[models.UserAttributeGroupValue]: + ) -> Sequence[mdls.UserAttributeGroupValue]: """Set User Attribute Group Values""" response = cast( - Sequence[models.UserAttributeGroupValue], + Sequence[mdls.UserAttributeGroupValue], self.post( path=f"/user_attributes/{user_attribute_id}/group_values", - structure=Sequence[models.UserAttributeGroupValue], + structure=Sequence[mdls.UserAttributeGroupValue], body=body, transport_options=transport_options, ), @@ -11701,17 +11780,17 @@ def set_user_attribute_group_values( # # Returns all workspaces available to the calling user. # - # GET /workspaces -> Sequence[models.Workspace] + # GET /workspaces -> Sequence[mdls.Workspace] def all_workspaces( self, transport_options: Optional[transport.TransportOptions] = None, - ) -> Sequence[models.Workspace]: + ) -> Sequence[mdls.Workspace]: """Get All Workspaces""" response = cast( - Sequence[models.Workspace], + Sequence[mdls.Workspace], self.get( path="/workspaces", - structure=Sequence[models.Workspace], + structure=Sequence[mdls.Workspace], transport_options=transport_options, ), ) @@ -11747,20 +11826,20 @@ def all_workspaces( # reside in a special user-specific directory on the Looker server and will still be there when you login in again # later and use update_session(workspace_id: "dev") to select the dev workspace for the new API session. # - # GET /workspaces/{workspace_id} -> models.Workspace + # GET /workspaces/{workspace_id} -> mdls.Workspace def workspace( self, # Id of the workspace workspace_id: str, transport_options: Optional[transport.TransportOptions] = None, - ) -> models.Workspace: + ) -> mdls.Workspace: """Get Workspace""" workspace_id = self.encode_path_param(workspace_id) response = cast( - models.Workspace, + mdls.Workspace, self.get( path=f"/workspaces/{workspace_id}", - structure=models.Workspace, + structure=mdls.Workspace, transport_options=transport_options, ), ) diff --git a/python/looker_sdk/sdk/api40/models.py b/python/looker_sdk/sdk/api40/models.py index b814cb5e2..a7129f889 100644 --- a/python/looker_sdk/sdk/api40/models.py +++ b/python/looker_sdk/sdk/api40/models.py @@ -21,7 +21,7 @@ # SOFTWARE. # -# 298 API models: 221 Spec, 0 Request, 57 Write, 20 Enum +# 301 API models: 223 Spec, 0 Request, 58 Write, 20 Enum # NOTE: Do not edit this file generated by Looker SDK Codegen for API 4.0 @@ -614,7 +614,7 @@ class BoardItem(model.Model): id: Optional[int] = None image_url: Optional[str] = None location: Optional[str] = None - look_id: Optional[int] = None + look_id: Optional[str] = None lookml_dashboard_id: Optional[str] = None order: Optional[int] = None title: Optional[str] = None @@ -639,7 +639,7 @@ def __init__( id: Optional[int] = None, image_url: Optional[str] = None, location: Optional[str] = None, - look_id: Optional[int] = None, + look_id: Optional[str] = None, lookml_dashboard_id: Optional[str] = None, order: Optional[int] = None, title: Optional[str] = None, @@ -973,7 +973,7 @@ class ContentFavorite(model.Model): id: Optional[int] = None user_id: Optional[int] = None content_metadata_id: Optional[int] = None - look_id: Optional[int] = None + look_id: Optional[str] = None dashboard_id: Optional[int] = None look: Optional["LookBasic"] = None dashboard: Optional["DashboardBase"] = None @@ -985,7 +985,7 @@ def __init__( id: Optional[int] = None, user_id: Optional[int] = None, content_metadata_id: Optional[int] = None, - look_id: Optional[int] = None, + look_id: Optional[str] = None, dashboard_id: Optional[int] = None, look: Optional["LookBasic"] = None, dashboard: Optional["DashboardBase"] = None, @@ -1023,7 +1023,7 @@ class ContentMeta(model.Model): name: Optional[str] = None parent_id: Optional[int] = None dashboard_id: Optional[str] = None - look_id: Optional[int] = None + look_id: Optional[str] = None folder_id: Optional[str] = None content_type: Optional[str] = None inherits: Optional[bool] = None @@ -1038,7 +1038,7 @@ def __init__( name: Optional[str] = None, parent_id: Optional[int] = None, dashboard_id: Optional[str] = None, - look_id: Optional[int] = None, + look_id: Optional[str] = None, folder_id: Optional[str] = None, content_type: Optional[str] = None, inherits: Optional[bool] = None, @@ -1381,7 +1381,7 @@ class ContentValidationLook(model.Model): folder: """ - id: Optional[int] = None + id: Optional[str] = None title: Optional[str] = None short_url: Optional[str] = None folder: Optional["ContentValidationFolder"] = None @@ -1389,7 +1389,7 @@ class ContentValidationLook(model.Model): def __init__( self, *, - id: Optional[int] = None, + id: Optional[str] = None, title: Optional[str] = None, short_url: Optional[str] = None, folder: Optional["ContentValidationFolder"] = None @@ -1453,14 +1453,14 @@ class ContentValidationScheduledPlan(model.Model): """ name: Optional[str] = None - look_id: Optional[int] = None + look_id: Optional[str] = None id: Optional[int] = None def __init__( self, *, name: Optional[str] = None, - look_id: Optional[int] = None, + look_id: Optional[str] = None, id: Optional[int] = None ): self.name = name @@ -1543,7 +1543,7 @@ class ContentView(model.Model): can: Optional[MutableMapping[str, bool]] = None id: Optional[int] = None - look_id: Optional[int] = None + look_id: Optional[str] = None dashboard_id: Optional[int] = None title: Optional[str] = None content_metadata_id: Optional[int] = None @@ -1559,7 +1559,7 @@ def __init__( *, can: Optional[MutableMapping[str, bool]] = None, id: Optional[int] = None, - look_id: Optional[int] = None, + look_id: Optional[str] = None, dashboard_id: Optional[int] = None, title: Optional[str] = None, content_metadata_id: Optional[int] = None, @@ -1657,6 +1657,51 @@ def __init__(self, *, sql: Optional[str] = None): self.sql = sql +@attr.s(auto_attribs=True, init=False) +class CreateCredentialsApi3(model.Model): + """ + Attributes: + can: Operations the current user is able to perform on this object + id: Unique Id + client_id: API key client_id + created_at: Timestamp for the creation of this credential + is_disabled: Has this credential been disabled? + type: Short name for the type of this kind of credential + client_secret: API key client_secret + url: Link to get this item + """ + + can: Optional[MutableMapping[str, bool]] = None + id: Optional[int] = None + client_id: Optional[str] = None + created_at: Optional[str] = None + is_disabled: Optional[bool] = None + type: Optional[str] = None + client_secret: Optional[str] = None + url: Optional[str] = None + + def __init__( + self, + *, + can: Optional[MutableMapping[str, bool]] = None, + id: Optional[int] = None, + client_id: Optional[str] = None, + created_at: Optional[str] = None, + is_disabled: Optional[bool] = None, + type: Optional[str] = None, + client_secret: Optional[str] = None, + url: Optional[str] = None + ): + self.can = can + self.id = id + self.client_id = client_id + self.created_at = created_at + self.is_disabled = is_disabled + self.type = type + self.client_secret = client_secret + self.url = url + + @attr.s(auto_attribs=True, init=False) class CreateDashboardFilter(model.Model): """ @@ -1851,7 +1896,7 @@ class CreateQueryTask(model.Model): can: Optional[MutableMapping[str, bool]] = None source: Optional[str] = None deferred: Optional[bool] = None - look_id: Optional[int] = None + look_id: Optional[str] = None dashboard_id: Optional[str] = None __annotations__ = { "query_id": int, @@ -1859,7 +1904,7 @@ class CreateQueryTask(model.Model): "can": Optional[MutableMapping[str, bool]], "source": Optional[str], "deferred": Optional[bool], - "look_id": Optional[int], + "look_id": Optional[str], "dashboard_id": Optional[str], } @@ -1871,7 +1916,7 @@ def __init__( can: Optional[MutableMapping[str, bool]] = None, source: Optional[str] = None, deferred: Optional[bool] = None, - look_id: Optional[int] = None, + look_id: Optional[str] = None, dashboard_id: Optional[str] = None ): self.query_id = query_id @@ -1886,8 +1931,6 @@ def __init__( @attr.s(auto_attribs=True, init=False) class CredentialsApi3(model.Model): """ - WARNING: no writeable properties found for POST, PUT, or PATCH - Attributes: can: Operations the current user is able to perform on this object id: Unique Id @@ -2406,7 +2449,7 @@ class Dashboard(model.Model): user_id: Id of User slug: Content Metadata Slug preferred_viewer: The preferred route for viewing this dashboard (ie: dashboards or dashboards-next) - alert_sync_with_dashboard_filter_enabled: Enables alerts to keep in sync with dashboard filter changes - only available in Enhanced Alerts (beta) + alert_sync_with_dashboard_filter_enabled: Enables alerts to keep in sync with dashboard filter changes background_color: Background color created_at: Time that the Dashboard was created. crossfilter_enabled: Enables crossfiltering in dashboards - only available in dashboards-next (beta) @@ -3902,6 +3945,43 @@ def __init__( self.force_logout_login = force_logout_login +@attr.s(auto_attribs=True, init=False) +class EmbedSecret(model.Model): + """ + Attributes: + algorithm: Signing algorithm to use with this secret. Either `hmac/sha-256`(default) or `hmac/sha-1` + created_at: When secret was created + enabled: Is this secret currently enabled + id: Unique Id + secret: Secret for use with SSO embedding + user_id: Id of user who created this secret + """ + + algorithm: Optional[str] = None + created_at: Optional[str] = None + enabled: Optional[bool] = None + id: Optional[int] = None + secret: Optional[str] = None + user_id: Optional[int] = None + + def __init__( + self, + *, + algorithm: Optional[str] = None, + created_at: Optional[str] = None, + enabled: Optional[bool] = None, + id: Optional[int] = None, + secret: Optional[str] = None, + user_id: Optional[int] = None + ): + self.algorithm = algorithm + self.created_at = created_at + self.enabled = enabled + self.id = id + self.secret = secret + self.user_id = user_id + + @attr.s(auto_attribs=True, init=False) class EmbedSsoParams(model.Model): """ @@ -4633,7 +4713,7 @@ class HomepageItem(model.Model): id: Optional[int] = None image_url: Optional[str] = None location: Optional[str] = None - look_id: Optional[int] = None + look_id: Optional[str] = None lookml_dashboard_id: Optional[str] = None order: Optional[int] = None section_fetch_time: Optional[float] = None @@ -4665,7 +4745,7 @@ def __init__( id: Optional[int] = None, image_url: Optional[str] = None, location: Optional[str] = None, - look_id: Optional[int] = None, + look_id: Optional[str] = None, lookml_dashboard_id: Optional[str] = None, order: Optional[int] = None, section_fetch_time: Optional[float] = None, @@ -5701,7 +5781,7 @@ class Look(model.Model): can: Optional[MutableMapping[str, bool]] = None content_metadata_id: Optional[int] = None - id: Optional[int] = None + id: Optional[str] = None title: Optional[str] = None user_id: Optional[int] = None content_favorite_id: Optional[int] = None @@ -5735,7 +5815,7 @@ def __init__( *, can: Optional[MutableMapping[str, bool]] = None, content_metadata_id: Optional[int] = None, - id: Optional[int] = None, + id: Optional[str] = None, title: Optional[str] = None, user_id: Optional[int] = None, content_favorite_id: Optional[int] = None, @@ -6797,7 +6877,7 @@ class LookWithDashboards(model.Model): can: Optional[MutableMapping[str, bool]] = None content_metadata_id: Optional[int] = None - id: Optional[int] = None + id: Optional[str] = None title: Optional[str] = None user_id: Optional[int] = None content_favorite_id: Optional[int] = None @@ -6832,7 +6912,7 @@ def __init__( *, can: Optional[MutableMapping[str, bool]] = None, content_metadata_id: Optional[int] = None, - id: Optional[int] = None, + id: Optional[str] = None, title: Optional[str] = None, user_id: Optional[int] = None, content_favorite_id: Optional[int] = None, @@ -6935,7 +7015,7 @@ class LookWithQuery(model.Model): can: Optional[MutableMapping[str, bool]] = None content_metadata_id: Optional[int] = None - id: Optional[int] = None + id: Optional[str] = None title: Optional[str] = None user_id: Optional[int] = None content_favorite_id: Optional[int] = None @@ -6971,7 +7051,7 @@ def __init__( *, can: Optional[MutableMapping[str, bool]] = None, content_metadata_id: Optional[int] = None, - id: Optional[int] = None, + id: Optional[str] = None, title: Optional[str] = None, user_id: Optional[int] = None, content_favorite_id: Optional[int] = None, @@ -8275,7 +8355,7 @@ class QueryTask(model.Model): runtime: Optional[float] = None rebuild_pdts: Optional[bool] = None result_source: Optional[str] = None - look_id: Optional[int] = None + look_id: Optional[str] = None dashboard_id: Optional[str] = None result_format: Optional[str] = None @@ -8298,7 +8378,7 @@ def __init__( runtime: Optional[float] = None, rebuild_pdts: Optional[bool] = None, result_source: Optional[str] = None, - look_id: Optional[int] = None, + look_id: Optional[str] = None, dashboard_id: Optional[str] = None, result_format: Optional[str] = None ): @@ -8357,7 +8437,7 @@ class RenderTask(model.Model): finalized_at: Optional[str] = None height: Optional[int] = None id: Optional[str] = None - look_id: Optional[int] = None + look_id: Optional[str] = None lookml_dashboard_id: Optional[str] = None query_id: Optional[int] = None dashboard_element_id: Optional[str] = None @@ -8381,7 +8461,7 @@ def __init__( finalized_at: Optional[str] = None, height: Optional[int] = None, id: Optional[str] = None, - look_id: Optional[int] = None, + look_id: Optional[str] = None, lookml_dashboard_id: Optional[str] = None, query_id: Optional[int] = None, dashboard_element_id: Optional[str] = None, @@ -9136,7 +9216,7 @@ class ScheduledPlan(model.Model): user_id: Optional[int] = None run_as_recipient: Optional[bool] = None enabled: Optional[bool] = None - look_id: Optional[int] = None + look_id: Optional[str] = None dashboard_id: Optional[int] = None lookml_dashboard_id: Optional[str] = None filters_string: Optional[str] = None @@ -9174,7 +9254,7 @@ def __init__( user_id: Optional[int] = None, run_as_recipient: Optional[bool] = None, enabled: Optional[bool] = None, - look_id: Optional[int] = None, + look_id: Optional[str] = None, dashboard_id: Optional[int] = None, lookml_dashboard_id: Optional[str] = None, filters_string: Optional[str] = None, @@ -10971,7 +11051,7 @@ class WriteBoardItem(model.Model): custom_url: Optional[str] = None dashboard_id: Optional[int] = None board_section_id: Optional[int] = None - look_id: Optional[int] = None + look_id: Optional[str] = None lookml_dashboard_id: Optional[str] = None order: Optional[int] = None @@ -10983,7 +11063,7 @@ def __init__( custom_url: Optional[str] = None, dashboard_id: Optional[int] = None, board_section_id: Optional[int] = None, - look_id: Optional[int] = None, + look_id: Optional[str] = None, lookml_dashboard_id: Optional[str] = None, order: Optional[int] = None ): @@ -11234,14 +11314,14 @@ class WriteCreateQueryTask(model.Model): result_format: "ResultFormat" source: Optional[str] = None deferred: Optional[bool] = None - look_id: Optional[int] = None + look_id: Optional[str] = None dashboard_id: Optional[str] = None __annotations__ = { "query_id": int, "result_format": ForwardRef("ResultFormat"), "source": Optional[str], "deferred": Optional[bool], - "look_id": Optional[int], + "look_id": Optional[str], "dashboard_id": Optional[str], } @@ -11252,7 +11332,7 @@ def __init__( result_format: "ResultFormat", source: Optional[str] = None, deferred: Optional[bool] = None, - look_id: Optional[int] = None, + look_id: Optional[str] = None, dashboard_id: Optional[str] = None ): self.query_id = query_id @@ -11303,7 +11383,7 @@ class WriteDashboard(model.Model): title: Dashboard Title slug: Content Metadata Slug preferred_viewer: The preferred route for viewing this dashboard (ie: dashboards or dashboards-next) - alert_sync_with_dashboard_filter_enabled: Enables alerts to keep in sync with dashboard filter changes - only available in Enhanced Alerts (beta) + alert_sync_with_dashboard_filter_enabled: Enables alerts to keep in sync with dashboard filter changes background_color: Background color crossfilter_enabled: Enables crossfiltering in dashboards - only available in dashboards-next (beta) deleted: Whether or not a dashboard is 'soft' deleted. @@ -11870,6 +11950,27 @@ def __init__( self.after_connect_statements = after_connect_statements +@attr.s(auto_attribs=True, init=False) +class WriteEmbedSecret(model.Model): + """ + Dynamic writeable type for EmbedSecret removes: + created_at, id, secret, user_id + + Attributes: + algorithm: Signing algorithm to use with this secret. Either `hmac/sha-256`(default) or `hmac/sha-1` + enabled: Is this secret currently enabled + """ + + algorithm: Optional[str] = None + enabled: Optional[bool] = None + + def __init__( + self, *, algorithm: Optional[str] = None, enabled: Optional[bool] = None + ): + self.algorithm = algorithm + self.enabled = enabled + + @attr.s(auto_attribs=True, init=False) class WriteExternalOauthApplication(model.Model): """ @@ -13007,7 +13108,7 @@ class WriteScheduledPlan(model.Model): user_id: Optional[int] = None run_as_recipient: Optional[bool] = None enabled: Optional[bool] = None - look_id: Optional[int] = None + look_id: Optional[str] = None dashboard_id: Optional[int] = None lookml_dashboard_id: Optional[str] = None filters_string: Optional[str] = None @@ -13037,7 +13138,7 @@ def __init__( user_id: Optional[int] = None, run_as_recipient: Optional[bool] = None, enabled: Optional[bool] = None, - look_id: Optional[int] = None, + look_id: Optional[str] = None, dashboard_id: Optional[int] = None, lookml_dashboard_id: Optional[str] = None, filters_string: Optional[str] = None, @@ -13615,6 +13716,10 @@ def __init__( ForwardRef("CreateCostEstimate"), # type: ignore forward_ref_structure_hook, # type:ignore ) +sr.converter40.register_structure_hook( + ForwardRef("CreateCredentialsApi3"), # type: ignore + forward_ref_structure_hook, # type:ignore +) sr.converter40.register_structure_hook( ForwardRef("CreateDashboardFilter"), # type: ignore forward_ref_structure_hook, # type:ignore @@ -13811,6 +13916,10 @@ def __init__( ForwardRef("EmbedParams"), # type: ignore forward_ref_structure_hook, # type:ignore ) +sr.converter40.register_structure_hook( + ForwardRef("EmbedSecret"), # type: ignore + forward_ref_structure_hook, # type:ignore +) sr.converter40.register_structure_hook( ForwardRef("EmbedSsoParams"), # type: ignore forward_ref_structure_hook, # type:ignore @@ -14503,6 +14612,10 @@ def __init__( ForwardRef("WriteDBConnectionOverride"), # type: ignore forward_ref_structure_hook, # type:ignore ) +sr.converter40.register_structure_hook( + ForwardRef("WriteEmbedSecret"), # type: ignore + forward_ref_structure_hook, # type:ignore +) sr.converter40.register_structure_hook( ForwardRef("WriteExternalOauthApplication"), # type: ignore forward_ref_structure_hook, # type:ignore diff --git a/python/looker_sdk/sdk/constants.py b/python/looker_sdk/sdk/constants.py index 24015929e..d70981037 100644 --- a/python/looker_sdk/sdk/constants.py +++ b/python/looker_sdk/sdk/constants.py @@ -20,5 +20,5 @@ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN # THE SOFTWARE. -sdk_version = "21.18" +sdk_version = "21.20" environment_prefix = "LOOKERSDK" diff --git a/python/tests/integration/test_methods.py b/python/tests/integration/test_methods.py index bd687ff41..e3ce34e7e 100644 --- a/python/tests/integration/test_methods.py +++ b/python/tests/integration/test_methods.py @@ -373,7 +373,7 @@ def test_crud_look(sdk: mtds.Looker40SDK, looks): assert look.user_id == l.get("user_id") or sdk.me().id # Update - assert isinstance(look.id, int) + assert isinstance(look.id, str) updated_look = sdk.update_look(look.id, ml.WriteLookWithQuery(deleted=True)) assert updated_look.deleted assert updated_look.title == look.title @@ -457,8 +457,8 @@ def test_search_looks_title_fields_filter(sdk: mtds.Looker40SDK): assert isinstance(search_results, list) assert len(search_results) > 0 look = search_results[0] - assert isinstance(look.id, int) - assert look.id > 0 + assert isinstance(look.id, str) + assert look.id != "0" assert "SDK" in look.title assert look.description is None @@ -473,8 +473,8 @@ def test_search_look_and_run(sdk: mtds.Looker40SDK): assert isinstance(search_results, list) assert len(search_results) > 0 look = search_results[0] - assert isinstance(look.id, int) - assert look.id > 0 + assert isinstance(look.id, str) + assert look.id != "0" assert "SDK" in look.title assert look.description is None actual = sdk.run_look(look_id=look.id, result_format="csv") diff --git a/spec/Looker.3.1.json b/spec/Looker.3.1.json index 1c0ba79cb..e43ee0c78 100644 --- a/spec/Looker.3.1.json +++ b/spec/Looker.3.1.json @@ -2,7 +2,7 @@ "swagger": "2.0", "info": { "version": "3.1.0", - "x-looker-release-version": "21.18.0", + "x-looker-release-version": "21.20.2", "title": "Looker API 3.1 Reference", "description": "### Authorization\n\nThe classic method of API authorization uses Looker **API3** credentials for authorization and access control.\nLooker admins can create API3 credentials on Looker's **Admin/Users** page.\n\nAPI 4.0 adds additional ways to authenticate API requests, including OAuth and CORS requests.\n\nFor details, see [Looker API Authorization](https://looker.com/docs/r/api/authorization).\n\n\n### API Explorer\n\nThe API Explorer is a Looker-provided utility with many new and unique features for learning and using the Looker API and SDKs.\nIt is a replacement for the 'api-docs' page currently provided on Looker instances.\n\nFor details, see the [API Explorer documentation](https://looker.com/docs/r/api/explorer).\n\n\n### Looker Language SDKs\n\nThe Looker API is a RESTful system that should be usable by any programming language capable of making\nHTTPS requests. SDKs for a variety of programming languages are also provided to streamline using the API. Looker\nhas an OpenSource [sdk-codegen project](https://github.com/looker-open-source/sdk-codegen) that provides several\nlanguage SDKs. Language SDKs generated by `sdk-codegen` have an Authentication manager that can automatically\nauthenticate API requests when needed.\n\nFor details on available Looker SDKs, see [Looker API Client SDKs](https://looker.com/docs/r/api/client_sdks).\n\n\n### API Versioning\n\nFuture releases of Looker expand the latest API version release-by-release to securely expose more and more of the core\npower of the Looker platform to API client applications. API endpoints marked as \"beta\" may receive breaking changes without\nwarning (but we will try to avoid doing that). Stable (non-beta) API endpoints should not receive breaking\nchanges in future releases.\n\nFor details, see [Looker API Versioning](https://looker.com/docs/r/api/versioning).\n\n\n### Try It Out!\n\nThis section describes the existing 'api-docs' page available on Looker instances. We recommend using the\n[API Explorer](https://looker.com/docs/r/api/explorer) instead.\n\nThe 'api-docs' page served by the Looker instance includes 'Try It Out!' buttons for each API method. After logging\nin with API3 credentials, you can use the \"Try It Out!\" buttons to call the API directly from the documentation\npage to interactively explore API features and responses.\n\n**NOTE**! With great power comes great responsibility: The \"Try It Out!\" button makes API calls to your live Looker\ninstance. Be especially careful with destructive API operations such as `delete_user` or similar.\nThere is no \"undo\" for API operations. (API Explorer's \"Run It\" feature requires a check mark before running\nAPI operations that can change data.)\n\n\n### In This Release\n\nThe following are a few examples of noteworthy items that have changed between API 3.0 and API 3.1.\nFor more comprehensive coverage of API changes, please see the release notes for your Looker release.\n\n### Examples of new things added in API 3.1 (compared to API 3.0):\n\n* [Dashboard construction](#!/3.1/Dashboard/) APIs\n* [Themes](#!/3.1/Theme/) and [custom color collections](#!/3.1/ColorCollection) APIs\n* Create and run [SQL Runner](#!/3.1/Query/run_sql_query) queries\n* Create and run [merged results](#!/3.1/Query/create_merge_query) queries\n* Create and modify [dashboard filters](#!/3.1/Dashboard/create_dashboard_filter)\n* Create and modify [password requirements](#!/3.1/Auth/password_config)\n\n### Deprecated in API 3.0\n\nThe following functions and properties have been deprecated in API 3.0. They continue to exist and work in API 3.0\nfor the next several Looker releases but they have not been carried forward to API 3.1:\n\n* Dashboard Prefetch functions\n* User access_filter functions\n* User API 1.0 credentials functions\n* Space.is_root and Space.is_user_root properties. Use Space.is_shared_root and Space.is_users_root instead.\n\n### Semantic changes in API 3.1:\n\n* [all_looks()](#!/3.1/Look/all_looks) no longer includes soft-deleted looks, matching [all_dashboards()](#!/3.1/Dashboard/all_dashboards) behavior.\nYou can find soft-deleted looks using [search_looks()](#!/3.1/Look/search_looks) with the `deleted` param set to True.\n* [all_spaces()](#!/3.1/Space/all_spaces) no longer includes duplicate items\n* [search_users()](#!/3.1/User/search_users) no longer accepts Y,y,1,0,N,n for Boolean params, only \"true\" and \"false\".\n* For greater client and network compatibility, [render_task_results](#!/3.1/RenderTask/render_task_results) now returns\nHTTP status **202 Accepted** instead of HTTP status **102 Processing**\n* [all_running_queries()](#!/3.1/Query/all_running_queries) and [kill_query](#!/3.1/Query/kill_query) functions have moved into the [Query](#!/3.1/Query/) function group.\n\nThe API Explorer can be used to [interactively compare](https://looker.com/docs/r/api/explorer#comparing_api_versions) the differences between API 3.1 and 4.0.\n\n\n### API and SDK Support Policies\n\nLooker API versions and language SDKs have varying support levels. Please read the API and SDK\n[support policies](https://looker.com/docs/r/api/support-policy) for more information.\n\n\n", "contact": { @@ -62,6 +62,10 @@ "name": "Datagroup", "description": "Manage Datagroups" }, + { + "name": "DerivedTable", + "description": "View Derived Table graphs" + }, { "name": "Folder", "description": "Manage Folders" @@ -5270,10 +5274,10 @@ "/derived_table/graph/model/{model}": { "get": { "tags": [ - "LookmlModel" + "DerivedTable" ], "operationId": "graph_derived_tables_for_model", - "summary": "Get Derived Table", + "summary": "Get Derived Table graph for model", "description": "### Discover information about derived tables\n", "parameters": [ { @@ -5322,6 +5326,61 @@ "x-looker-activity-type": "non_query" } }, + "/derived_table/graph/view/{view}": { + "get": { + "tags": [ + "DerivedTable" + ], + "operationId": "graph_derived_tables_for_view", + "summary": "Get subgraph of derived table and dependencies", + "description": "### Get the subgraph representing this derived table and its dependencies.\n", + "parameters": [ + { + "name": "view", + "in": "path", + "description": "The derived table's view name.", + "required": true, + "type": "string" + }, + { + "name": "models", + "in": "query", + "description": "The models where this derived table is defined.", + "required": false, + "type": "string" + }, + { + "name": "workspace", + "in": "query", + "description": "The model directory to look in, either `dev` or `production`.", + "required": false, + "type": "string" + } + ], + "responses": { + "200": { + "description": "Graph of the derived table component, represented in the DOT language.", + "schema": { + "$ref": "#/definitions/DependencyGraph" + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/Error" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/Error" + } + } + }, + "x-looker-status": "beta", + "x-looker-activity-type": "non_query" + } + }, "/dialect_info": { "get": { "tags": [ @@ -23493,7 +23552,7 @@ }, "alert_sync_with_dashboard_filter_enabled": { "type": "boolean", - "description": "Enables alerts to keep in sync with dashboard filter changes - only available in Enhanced Alerts (beta)", + "description": "Enables alerts to keep in sync with dashboard filter changes", "x-looker-nullable": false }, "background_color": { diff --git a/spec/Looker.3.1.oas.json b/spec/Looker.3.1.oas.json index 50bef79b1..622bc1a14 100644 --- a/spec/Looker.3.1.oas.json +++ b/spec/Looker.3.1.oas.json @@ -2,7 +2,7 @@ "openapi": "3.0.0", "info": { "version": "3.1.0", - "x-looker-release-version": "21.18.0", + "x-looker-release-version": "21.20.2", "title": "Looker API 3.1 Reference", "description": "### Authorization\n\nThe classic method of API authorization uses Looker **API3** credentials for authorization and access control.\nLooker admins can create API3 credentials on Looker's **Admin/Users** page.\n\nAPI 4.0 adds additional ways to authenticate API requests, including OAuth and CORS requests.\n\nFor details, see [Looker API Authorization](https://looker.com/docs/r/api/authorization).\n\n\n### API Explorer\n\nThe API Explorer is a Looker-provided utility with many new and unique features for learning and using the Looker API and SDKs.\nIt is a replacement for the 'api-docs' page currently provided on Looker instances.\n\nFor details, see the [API Explorer documentation](https://looker.com/docs/r/api/explorer).\n\n\n### Looker Language SDKs\n\nThe Looker API is a RESTful system that should be usable by any programming language capable of making\nHTTPS requests. SDKs for a variety of programming languages are also provided to streamline using the API. Looker\nhas an OpenSource [sdk-codegen project](https://github.com/looker-open-source/sdk-codegen) that provides several\nlanguage SDKs. Language SDKs generated by `sdk-codegen` have an Authentication manager that can automatically\nauthenticate API requests when needed.\n\nFor details on available Looker SDKs, see [Looker API Client SDKs](https://looker.com/docs/r/api/client_sdks).\n\n\n### API Versioning\n\nFuture releases of Looker expand the latest API version release-by-release to securely expose more and more of the core\npower of the Looker platform to API client applications. API endpoints marked as \"beta\" may receive breaking changes without\nwarning (but we will try to avoid doing that). Stable (non-beta) API endpoints should not receive breaking\nchanges in future releases.\n\nFor details, see [Looker API Versioning](https://looker.com/docs/r/api/versioning).\n\n\n### Try It Out!\n\nThis section describes the existing 'api-docs' page available on Looker instances. We recommend using the\n[API Explorer](https://looker.com/docs/r/api/explorer) instead.\n\nThe 'api-docs' page served by the Looker instance includes 'Try It Out!' buttons for each API method. After logging\nin with API3 credentials, you can use the \"Try It Out!\" buttons to call the API directly from the documentation\npage to interactively explore API features and responses.\n\n**NOTE**! With great power comes great responsibility: The \"Try It Out!\" button makes API calls to your live Looker\ninstance. Be especially careful with destructive API operations such as `delete_user` or similar.\nThere is no \"undo\" for API operations. (API Explorer's \"Run It\" feature requires a check mark before running\nAPI operations that can change data.)\n\n\n### In This Release\n\nThe following are a few examples of noteworthy items that have changed between API 3.0 and API 3.1.\nFor more comprehensive coverage of API changes, please see the release notes for your Looker release.\n\n### Examples of new things added in API 3.1 (compared to API 3.0):\n\n* [Dashboard construction](#!/3.1/Dashboard/) APIs\n* [Themes](#!/3.1/Theme/) and [custom color collections](#!/3.1/ColorCollection) APIs\n* Create and run [SQL Runner](#!/3.1/Query/run_sql_query) queries\n* Create and run [merged results](#!/3.1/Query/create_merge_query) queries\n* Create and modify [dashboard filters](#!/3.1/Dashboard/create_dashboard_filter)\n* Create and modify [password requirements](#!/3.1/Auth/password_config)\n\n### Deprecated in API 3.0\n\nThe following functions and properties have been deprecated in API 3.0. They continue to exist and work in API 3.0\nfor the next several Looker releases but they have not been carried forward to API 3.1:\n\n* Dashboard Prefetch functions\n* User access_filter functions\n* User API 1.0 credentials functions\n* Space.is_root and Space.is_user_root properties. Use Space.is_shared_root and Space.is_users_root instead.\n\n### Semantic changes in API 3.1:\n\n* [all_looks()](#!/3.1/Look/all_looks) no longer includes soft-deleted looks, matching [all_dashboards()](#!/3.1/Dashboard/all_dashboards) behavior.\nYou can find soft-deleted looks using [search_looks()](#!/3.1/Look/search_looks) with the `deleted` param set to True.\n* [all_spaces()](#!/3.1/Space/all_spaces) no longer includes duplicate items\n* [search_users()](#!/3.1/User/search_users) no longer accepts Y,y,1,0,N,n for Boolean params, only \"true\" and \"false\".\n* For greater client and network compatibility, [render_task_results](#!/3.1/RenderTask/render_task_results) now returns\nHTTP status **202 Accepted** instead of HTTP status **102 Processing**\n* [all_running_queries()](#!/3.1/Query/all_running_queries) and [kill_query](#!/3.1/Query/kill_query) functions have moved into the [Query](#!/3.1/Query/) function group.\n\nThe API Explorer can be used to [interactively compare](https://looker.com/docs/r/api/explorer#comparing_api_versions) the differences between API 3.1 and 4.0.\n\n\n### API and SDK Support Policies\n\nLooker API versions and language SDKs have varying support levels. Please read the API and SDK\n[support policies](https://looker.com/docs/r/api/support-policy) for more information.\n\n\n", "contact": { @@ -51,6 +51,10 @@ "name": "Datagroup", "description": "Manage Datagroups" }, + { + "name": "DerivedTable", + "description": "View Derived Table graphs" + }, { "name": "Folder", "description": "Manage Folders" @@ -7307,10 +7311,10 @@ "/derived_table/graph/model/{model}": { "get": { "tags": [ - "LookmlModel" + "DerivedTable" ], "operationId": "graph_derived_tables_for_model", - "summary": "Get Derived Table", + "summary": "Get Derived Table graph for model", "description": "### Discover information about derived tables\n", "parameters": [ { @@ -7377,6 +7381,79 @@ "x-looker-activity-type": "non_query" } }, + "/derived_table/graph/view/{view}": { + "get": { + "tags": [ + "DerivedTable" + ], + "operationId": "graph_derived_tables_for_view", + "summary": "Get subgraph of derived table and dependencies", + "description": "### Get the subgraph representing this derived table and its dependencies.\n", + "parameters": [ + { + "name": "view", + "in": "path", + "description": "The derived table's view name.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "models", + "in": "query", + "description": "The models where this derived table is defined.", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "workspace", + "in": "query", + "description": "The model directory to look in, either `dev` or `production`.", + "required": false, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Graph of the derived table component, represented in the DOT language.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DependencyGraph" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "x-looker-status": "beta", + "x-looker-activity-type": "non_query" + } + }, "/dialect_info": { "get": { "tags": [ @@ -30892,7 +30969,7 @@ }, "alert_sync_with_dashboard_filter_enabled": { "type": "boolean", - "description": "Enables alerts to keep in sync with dashboard filter changes - only available in Enhanced Alerts (beta)", + "description": "Enables alerts to keep in sync with dashboard filter changes", "nullable": false }, "background_color": { diff --git a/spec/Looker.4.0.json b/spec/Looker.4.0.json index 922e9b9f2..4de8e5458 100644 --- a/spec/Looker.4.0.json +++ b/spec/Looker.4.0.json @@ -1,8 +1,8 @@ { "swagger": "2.0", "info": { - "version": "4.0.21.18", - "x-looker-release-version": "21.18.0", + "version": "4.0.21.20", + "x-looker-release-version": "21.20.2", "title": "Looker API 4.0 (Beta) Reference", "description": "\nWelcome to the future! API 4.0 co-exists with APIs 3.1 and 3.0. (3.0 should no longer be used.)\nThe \"beta\" tag means updates for API 4.0 may include breaking changes, but as always we will work to minimize them.\n\n### Authorization\n\nThe classic method of API authorization uses Looker **API3** credentials for authorization and access control.\nLooker admins can create API3 credentials on Looker's **Admin/Users** page.\n\nAPI 4.0 adds additional ways to authenticate API requests, including OAuth and CORS requests.\n\nFor details, see [Looker API Authorization](https://looker.com/docs/r/api/authorization).\n\n\n### API Explorer\n\nThe API Explorer is a Looker-provided utility with many new and unique features for learning and using the Looker API and SDKs.\nIt is a replacement for the 'api-docs' page currently provided on Looker instances.\n\nFor details, see the [API Explorer documentation](https://looker.com/docs/r/api/explorer).\n\n\n### Looker Language SDKs\n\nThe Looker API is a RESTful system that should be usable by any programming language capable of making\nHTTPS requests. SDKs for a variety of programming languages are also provided to streamline using the API. Looker\nhas an OpenSource [sdk-codegen project](https://github.com/looker-open-source/sdk-codegen) that provides several\nlanguage SDKs. Language SDKs generated by `sdk-codegen` have an Authentication manager that can automatically\nauthenticate API requests when needed.\n\nFor details on available Looker SDKs, see [Looker API Client SDKs](https://looker.com/docs/r/api/client_sdks).\n\n\n### API Versioning\n\nFuture releases of Looker expand the latest API version release-by-release to securely expose more and more of the core\npower of the Looker platform to API client applications. API endpoints marked as \"beta\" may receive breaking changes without\nwarning (but we will try to avoid doing that). Stable (non-beta) API endpoints should not receive breaking\nchanges in future releases.\n\nFor details, see [Looker API Versioning](https://looker.com/docs/r/api/versioning).\n\n\n### In This Release\n\nAPI 4.0 version was introduced so we can make adjustments to API functions, parameters, and response types to\nfix bugs and inconsistencies. These changes fall outside the bounds of non-breaking additive changes we can\nmake to our stable API 3.1.\n\nOne benefit of these type adjustments in API 4.0 is dramatically better support for strongly\ntyped languages like TypeScript, Kotlin, Swift, Go, C#, and more.\n\nWhile API 3.1 is still the de-facto Looker API (\"current\", \"stable\", \"default\", etc), the bulk\nof our development activity has shifted to API 4.0, where all new features are added.\n\nThe API Explorer can be used to [interactively compare](https://looker.com/docs/r/api/explorer#comparing_api_versions) the differences between API 3.1 and 4.0.\n\n\n### API and SDK Support Policies\n\nLooker API versions and language SDKs have varying support levels. Please read the API and SDK\n[support policies](https://looker.com/docs/r/api/support-policy) for more information.\n\n\n", "contact": { @@ -74,6 +74,10 @@ "name": "Datagroup", "description": "Manage Datagroups" }, + { + "name": "DerivedTable", + "description": "View Derived Table graphs" + }, { "name": "Folder", "description": "Manage Folders" @@ -728,6 +732,13 @@ "description": "Perform table calculations on query results", "required": false, "type": "boolean" + }, + { + "name": "source", + "in": "query", + "description": "Specifies the source of this call.", + "required": false, + "type": "string" } ], "responses": { @@ -1573,10 +1584,17 @@ "schema": { "$ref": "#/definitions/Error" } + }, + "429": { + "description": "Too Many Requests", + "schema": { + "$ref": "#/definitions/Error" + } } }, "x-looker-status": "beta", - "x-looker-activity-type": "non_query" + "x-looker-activity-type": "non_query", + "x-looker-rate-limited": true } }, "/cloud_storage": { @@ -6187,10 +6205,10 @@ "/derived_table/graph/model/{model}": { "get": { "tags": [ - "LookmlModel" + "DerivedTable" ], "operationId": "graph_derived_tables_for_model", - "summary": "Get Derived Table", + "summary": "Get Derived Table graph for model", "description": "### Discover information about derived tables\n", "parameters": [ { @@ -6239,6 +6257,61 @@ "x-looker-activity-type": "non_query" } }, + "/derived_table/graph/view/{view}": { + "get": { + "tags": [ + "DerivedTable" + ], + "operationId": "graph_derived_tables_for_view", + "summary": "Get subgraph of derived table and dependencies", + "description": "### Get the subgraph representing this derived table and its dependencies.\n", + "parameters": [ + { + "name": "view", + "in": "path", + "description": "The derived table's view name.", + "required": true, + "type": "string" + }, + { + "name": "models", + "in": "query", + "description": "The models where this derived table is defined.", + "required": false, + "type": "string" + }, + { + "name": "workspace", + "in": "query", + "description": "The model directory to look in, either `dev` or `production`.", + "required": false, + "type": "string" + } + ], + "responses": { + "200": { + "description": "Graph of the derived table component, represented in the DOT language.", + "schema": { + "$ref": "#/definitions/DependencyGraph" + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/Error" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/Error" + } + } + }, + "x-looker-status": "beta", + "x-looker-activity-type": "non_query" + } + }, "/dialect_info": { "get": { "tags": [ @@ -6407,6 +6480,115 @@ "x-looker-rate-limited": true } }, + "/embed_config/secrets": { + "post": { + "tags": [ + "Auth" + ], + "operationId": "create_embed_secret", + "summary": "Create Embed Secret", + "description": "### Create an embed secret using the specified information.\n\nThe value of the `secret` field will be set by Looker and returned.\n", + "parameters": [ + { + "name": "body", + "in": "body", + "description": "embed secret", + "required": false, + "schema": { + "$ref": "#/definitions/EmbedSecret" + } + } + ], + "responses": { + "200": { + "description": "embed secret", + "schema": { + "$ref": "#/definitions/EmbedSecret" + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/Error" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/Error" + } + }, + "409": { + "description": "Resource Already Exists", + "schema": { + "$ref": "#/definitions/Error" + } + }, + "422": { + "description": "Validation Error", + "schema": { + "$ref": "#/definitions/ValidationError" + } + }, + "429": { + "description": "Too Many Requests", + "schema": { + "$ref": "#/definitions/Error" + } + } + }, + "x-looker-status": "beta", + "x-looker-activity-type": "non_query" + } + }, + "/embed_config/secrets/{embed_secret_id}": { + "delete": { + "tags": [ + "Auth" + ], + "operationId": "delete_embed_secret", + "summary": "Delete Embed Secret", + "description": "### Delete an embed secret.\n", + "parameters": [ + { + "name": "embed_secret_id", + "in": "path", + "description": "Id of Embed Secret", + "required": true, + "type": "integer", + "format": "int64" + } + ], + "responses": { + "204": { + "description": "Successfully deleted.", + "schema": { + "type": "string" + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/Error" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/Error" + } + }, + "429": { + "description": "Too Many Requests", + "schema": { + "$ref": "#/definitions/Error" + } + } + }, + "x-looker-status": "beta", + "x-looker-activity-type": "non_query" + } + }, "/embed/sso_url": { "post": { "tags": [ @@ -10638,8 +10820,7 @@ "in": "path", "description": "Id of look", "required": true, - "type": "integer", - "format": "int64" + "type": "string" }, { "name": "fields", @@ -10685,8 +10866,7 @@ "in": "path", "description": "Id of look", "required": true, - "type": "integer", - "format": "int64" + "type": "string" }, { "name": "body", @@ -10753,8 +10933,7 @@ "in": "path", "description": "Id of look", "required": true, - "type": "integer", - "format": "int64" + "type": "string" } ], "responses": { @@ -10807,8 +10986,7 @@ "in": "path", "description": "Id of look", "required": true, - "type": "integer", - "format": "int64" + "type": "string" }, { "name": "result_format", @@ -10955,8 +11133,7 @@ "in": "path", "description": "Look id to copy.", "required": true, - "type": "integer", - "format": "int64" + "type": "string" }, { "name": "folder_id", @@ -11028,8 +11205,7 @@ "in": "path", "description": "Look id to move.", "required": true, - "type": "integer", - "format": "int64" + "type": "string" }, { "name": "folder_id", @@ -21974,15 +22150,6 @@ "type": "integer", "format": "int64" }, - { - "name": "body", - "in": "body", - "description": "API 3 Credential", - "required": false, - "schema": { - "$ref": "#/definitions/CredentialsApi3" - } - }, { "name": "fields", "in": "query", @@ -21995,7 +22162,7 @@ "200": { "description": "API 3 Credential", "schema": { - "$ref": "#/definitions/CredentialsApi3" + "$ref": "#/definitions/CreateCredentialsApi3" } }, "400": { @@ -23641,8 +23808,7 @@ "x-looker-nullable": true }, "look_id": { - "type": "integer", - "format": "int64", + "type": "string", "description": "Look to base this item on", "x-looker-nullable": true }, @@ -24292,8 +24458,7 @@ "x-looker-nullable": true }, "look_id": { - "type": "integer", - "format": "int64", + "type": "string", "description": "Look to base this item on", "x-looker-nullable": true }, @@ -24698,8 +24863,7 @@ "x-looker-nullable": false }, "look_id": { - "type": "integer", - "format": "int64", + "type": "string", "readOnly": true, "description": "Id of a look", "x-looker-nullable": true @@ -24821,8 +24985,7 @@ "x-looker-nullable": true }, "look_id": { - "type": "integer", - "format": "int64", + "type": "string", "readOnly": true, "description": "Id of associated look when content_type is \"look\"", "x-looker-nullable": true @@ -25005,8 +25168,7 @@ "ContentValidationLook": { "properties": { "id": { - "type": "integer", - "format": "int64", + "type": "string", "readOnly": true, "description": "Unique Id", "x-looker-nullable": false @@ -25237,8 +25399,7 @@ "x-looker-nullable": true }, "look_id": { - "type": "integer", - "format": "int64", + "type": "string", "description": "Id of a look", "x-looker-nullable": true }, @@ -25337,8 +25498,7 @@ "x-looker-nullable": false }, "look_id": { - "type": "integer", - "format": "int64", + "type": "string", "readOnly": true, "description": "Id of viewed Look", "x-looker-nullable": true @@ -25530,6 +25690,64 @@ }, "x-looker-status": "stable" }, + "CreateCredentialsApi3": { + "properties": { + "can": { + "type": "object", + "additionalProperties": { + "type": "boolean" + }, + "readOnly": true, + "description": "Operations the current user is able to perform on this object", + "x-looker-nullable": false + }, + "id": { + "type": "integer", + "format": "int64", + "readOnly": true, + "description": "Unique Id", + "x-looker-nullable": false + }, + "client_id": { + "type": "string", + "readOnly": true, + "description": "API key client_id", + "x-looker-nullable": true + }, + "created_at": { + "type": "string", + "readOnly": true, + "description": "Timestamp for the creation of this credential", + "x-looker-nullable": true + }, + "is_disabled": { + "type": "boolean", + "readOnly": true, + "description": "Has this credential been disabled?", + "x-looker-nullable": false + }, + "type": { + "type": "string", + "readOnly": true, + "description": "Short name for the type of this kind of credential", + "x-looker-nullable": true + }, + "client_secret": { + "type": "string", + "readOnly": true, + "description": "API key client_secret", + "x-looker-nullable": true + }, + "url": { + "type": "string", + "format": "uri-reference", + "readOnly": true, + "description": "Link to get this item", + "x-looker-nullable": true + } + }, + "x-looker-status": "stable" + }, "CredentialsEmail": { "properties": { "can": { @@ -26795,7 +27013,7 @@ }, "alert_sync_with_dashboard_filter_enabled": { "type": "boolean", - "description": "Enables alerts to keep in sync with dashboard filter changes - only available in Enhanced Alerts (beta)", + "description": "Enables alerts to keep in sync with dashboard filter changes", "x-looker-nullable": false }, "background_color": { @@ -28005,6 +28223,47 @@ "target_url" ] }, + "EmbedSecret": { + "properties": { + "algorithm": { + "type": "string", + "description": "Signing algorithm to use with this secret. Either `hmac/sha-256`(default) or `hmac/sha-1`", + "x-looker-nullable": true + }, + "created_at": { + "type": "string", + "readOnly": true, + "description": "When secret was created", + "x-looker-nullable": true + }, + "enabled": { + "type": "boolean", + "description": "Is this secret currently enabled", + "x-looker-nullable": false + }, + "id": { + "type": "integer", + "format": "int64", + "readOnly": true, + "description": "Unique Id", + "x-looker-nullable": false + }, + "secret": { + "type": "string", + "readOnly": true, + "description": "Secret for use with SSO embedding", + "x-looker-nullable": true + }, + "user_id": { + "type": "integer", + "format": "int64", + "readOnly": true, + "description": "Id of user who created this secret", + "x-looker-nullable": true + } + }, + "x-looker-status": "beta" + }, "EmbedUrlResponse": { "properties": { "url": { @@ -29951,8 +30210,7 @@ "x-looker-nullable": true }, "id": { - "type": "integer", - "format": "int64", + "type": "string", "readOnly": true, "description": "Unique Id", "x-looker-nullable": false @@ -30145,8 +30403,7 @@ "x-looker-nullable": true }, "id": { - "type": "integer", - "format": "int64", + "type": "string", "readOnly": true, "description": "Unique Id", "x-looker-nullable": false @@ -30351,8 +30608,7 @@ "x-looker-nullable": true }, "id": { - "type": "integer", - "format": "int64", + "type": "string", "readOnly": true, "description": "Unique Id", "x-looker-nullable": false @@ -33245,8 +33501,7 @@ "x-looker-nullable": false }, "look_id": { - "type": "integer", - "format": "int64", + "type": "string", "description": "Id of look associated with query.", "x-looker-nullable": true }, @@ -33356,8 +33611,7 @@ "x-looker-nullable": true }, "look_id": { - "type": "integer", - "format": "int64", + "type": "string", "description": "Id of look associated with query.", "x-looker-nullable": true }, @@ -33431,8 +33685,7 @@ "x-looker-nullable": false }, "look_id": { - "type": "integer", - "format": "int64", + "type": "string", "readOnly": true, "description": "Id of look to render", "x-looker-nullable": true @@ -34468,8 +34721,7 @@ "x-looker-nullable": false }, "look_id": { - "type": "integer", - "format": "int64", + "type": "string", "description": "Id of a look", "x-looker-nullable": true }, @@ -34611,8 +34863,7 @@ "x-looker-nullable": false }, "look_id": { - "type": "integer", - "format": "int64", + "type": "string", "description": "Id of a look", "x-looker-nullable": true }, diff --git a/spec/Looker.4.0.oas.json b/spec/Looker.4.0.oas.json index 86c483457..bfd67c17d 100644 --- a/spec/Looker.4.0.oas.json +++ b/spec/Looker.4.0.oas.json @@ -1,8 +1,8 @@ { "openapi": "3.0.0", "info": { - "version": "4.0.21.18", - "x-looker-release-version": "21.18.0", + "version": "4.0.21.20", + "x-looker-release-version": "21.20.2", "title": "Looker API 4.0 (Beta) Reference", "description": "\nWelcome to the future! API 4.0 co-exists with APIs 3.1 and 3.0. (3.0 should no longer be used.)\nThe \"beta\" tag means updates for API 4.0 may include breaking changes, but as always we will work to minimize them.\n\n### Authorization\n\nThe classic method of API authorization uses Looker **API3** credentials for authorization and access control.\nLooker admins can create API3 credentials on Looker's **Admin/Users** page.\n\nAPI 4.0 adds additional ways to authenticate API requests, including OAuth and CORS requests.\n\nFor details, see [Looker API Authorization](https://looker.com/docs/r/api/authorization).\n\n\n### API Explorer\n\nThe API Explorer is a Looker-provided utility with many new and unique features for learning and using the Looker API and SDKs.\nIt is a replacement for the 'api-docs' page currently provided on Looker instances.\n\nFor details, see the [API Explorer documentation](https://looker.com/docs/r/api/explorer).\n\n\n### Looker Language SDKs\n\nThe Looker API is a RESTful system that should be usable by any programming language capable of making\nHTTPS requests. SDKs for a variety of programming languages are also provided to streamline using the API. Looker\nhas an OpenSource [sdk-codegen project](https://github.com/looker-open-source/sdk-codegen) that provides several\nlanguage SDKs. Language SDKs generated by `sdk-codegen` have an Authentication manager that can automatically\nauthenticate API requests when needed.\n\nFor details on available Looker SDKs, see [Looker API Client SDKs](https://looker.com/docs/r/api/client_sdks).\n\n\n### API Versioning\n\nFuture releases of Looker expand the latest API version release-by-release to securely expose more and more of the core\npower of the Looker platform to API client applications. API endpoints marked as \"beta\" may receive breaking changes without\nwarning (but we will try to avoid doing that). Stable (non-beta) API endpoints should not receive breaking\nchanges in future releases.\n\nFor details, see [Looker API Versioning](https://looker.com/docs/r/api/versioning).\n\n\n### In This Release\n\nAPI 4.0 version was introduced so we can make adjustments to API functions, parameters, and response types to\nfix bugs and inconsistencies. These changes fall outside the bounds of non-breaking additive changes we can\nmake to our stable API 3.1.\n\nOne benefit of these type adjustments in API 4.0 is dramatically better support for strongly\ntyped languages like TypeScript, Kotlin, Swift, Go, C#, and more.\n\nWhile API 3.1 is still the de-facto Looker API (\"current\", \"stable\", \"default\", etc), the bulk\nof our development activity has shifted to API 4.0, where all new features are added.\n\nThe API Explorer can be used to [interactively compare](https://looker.com/docs/r/api/explorer#comparing_api_versions) the differences between API 3.1 and 4.0.\n\n\n### API and SDK Support Policies\n\nLooker API versions and language SDKs have varying support levels. Please read the API and SDK\n[support policies](https://looker.com/docs/r/api/support-policy) for more information.\n\n\n", "contact": { @@ -63,6 +63,10 @@ "name": "Datagroup", "description": "Manage Datagroups" }, + { + "name": "DerivedTable", + "description": "View Derived Table graphs" + }, { "name": "Folder", "description": "Manage Folders" @@ -916,6 +920,15 @@ "schema": { "type": "boolean" } + }, + { + "name": "source", + "in": "query", + "description": "Specifies the source of this call.", + "required": false, + "schema": { + "type": "string" + } } ], "responses": { @@ -2273,10 +2286,21 @@ } } } + }, + "429": { + "description": "Too Many Requests", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } } }, "x-looker-status": "beta", - "x-looker-activity-type": "non_query" + "x-looker-activity-type": "non_query", + "x-looker-rate-limited": true } }, "/cloud_storage": { @@ -8562,10 +8586,10 @@ "/derived_table/graph/model/{model}": { "get": { "tags": [ - "LookmlModel" + "DerivedTable" ], "operationId": "graph_derived_tables_for_model", - "summary": "Get Derived Table", + "summary": "Get Derived Table graph for model", "description": "### Discover information about derived tables\n", "parameters": [ { @@ -8632,6 +8656,79 @@ "x-looker-activity-type": "non_query" } }, + "/derived_table/graph/view/{view}": { + "get": { + "tags": [ + "DerivedTable" + ], + "operationId": "graph_derived_tables_for_view", + "summary": "Get subgraph of derived table and dependencies", + "description": "### Get the subgraph representing this derived table and its dependencies.\n", + "parameters": [ + { + "name": "view", + "in": "path", + "description": "The derived table's view name.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "models", + "in": "query", + "description": "The models where this derived table is defined.", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "workspace", + "in": "query", + "description": "The model directory to look in, either `dev` or `production`.", + "required": false, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Graph of the derived table component, represented in the DOT language.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DependencyGraph" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "x-looker-status": "beta", + "x-looker-activity-type": "non_query" + } + }, "/dialect_info": { "get": { "tags": [ @@ -8862,6 +8959,157 @@ "x-looker-rate-limited": true } }, + "/embed_config/secrets": { + "post": { + "tags": [ + "Auth" + ], + "operationId": "create_embed_secret", + "summary": "Create Embed Secret", + "description": "### Create an embed secret using the specified information.\n\nThe value of the `secret` field will be set by Looker and returned.\n", + "responses": { + "200": { + "description": "embed secret", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EmbedSecret" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "409": { + "description": "Resource Already Exists", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ValidationError" + } + } + } + }, + "429": { + "description": "Too Many Requests", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "x-looker-status": "beta", + "x-looker-activity-type": "non_query", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EmbedSecret" + } + } + }, + "description": "embed secret", + "required": false + } + } + }, + "/embed_config/secrets/{embed_secret_id}": { + "delete": { + "tags": [ + "Auth" + ], + "operationId": "delete_embed_secret", + "summary": "Delete Embed Secret", + "description": "### Delete an embed secret.\n", + "parameters": [ + { + "name": "embed_secret_id", + "in": "path", + "description": "Id of Embed Secret", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "responses": { + "204": { + "description": "Successfully deleted.", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "429": { + "description": "Too Many Requests", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "x-looker-status": "beta", + "x-looker-activity-type": "non_query" + } + }, "/embed/sso_url": { "post": { "tags": [ @@ -14565,8 +14813,7 @@ "description": "Id of look", "required": true, "schema": { - "type": "integer", - "format": "int64" + "type": "string" } }, { @@ -14628,8 +14875,7 @@ "description": "Id of look", "required": true, "schema": { - "type": "integer", - "format": "int64" + "type": "string" } }, { @@ -14722,8 +14968,7 @@ "description": "Id of look", "required": true, "schema": { - "type": "integer", - "format": "int64" + "type": "string" } } ], @@ -14788,8 +15033,7 @@ "description": "Id of look", "required": true, "schema": { - "type": "integer", - "format": "int64" + "type": "string" } }, { @@ -15059,8 +15303,7 @@ "description": "Look id to copy.", "required": true, "schema": { - "type": "integer", - "format": "int64" + "type": "string" } }, { @@ -15164,8 +15407,7 @@ "description": "Look id to move.", "required": true, "schema": { - "type": "integer", - "format": "int64" + "type": "string" } }, { @@ -30081,7 +30323,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CredentialsApi3" + "$ref": "#/components/schemas/CreateCredentialsApi3" } } } @@ -30138,18 +30380,7 @@ } }, "x-looker-status": "stable", - "x-looker-activity-type": "non_query", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CredentialsApi3" - } - } - }, - "description": "API 3 Credential", - "required": false - } + "x-looker-activity-type": "non_query" } }, "/users/{user_id}/credentials_embed/{credentials_embed_id}": { @@ -32173,8 +32404,7 @@ "nullable": true }, "look_id": { - "type": "integer", - "format": "int64", + "type": "string", "description": "Look to base this item on", "nullable": true }, @@ -32819,8 +33049,7 @@ "nullable": true }, "look_id": { - "type": "integer", - "format": "int64", + "type": "string", "description": "Look to base this item on", "nullable": true }, @@ -33225,8 +33454,7 @@ "nullable": false }, "look_id": { - "type": "integer", - "format": "int64", + "type": "string", "readOnly": true, "description": "Id of a look", "nullable": true @@ -33342,8 +33570,7 @@ "nullable": true }, "look_id": { - "type": "integer", - "format": "int64", + "type": "string", "readOnly": true, "description": "Id of associated look when content_type is \"look\"", "nullable": true @@ -33510,8 +33737,7 @@ "ContentValidationLook": { "properties": { "id": { - "type": "integer", - "format": "int64", + "type": "string", "readOnly": true, "description": "Unique Id", "nullable": false @@ -33736,8 +33962,7 @@ "nullable": true }, "look_id": { - "type": "integer", - "format": "int64", + "type": "string", "description": "Id of a look", "nullable": true }, @@ -33836,8 +34061,7 @@ "nullable": false }, "look_id": { - "type": "integer", - "format": "int64", + "type": "string", "readOnly": true, "description": "Id of viewed Look", "nullable": true @@ -34029,6 +34253,64 @@ }, "x-looker-status": "stable" }, + "CreateCredentialsApi3": { + "properties": { + "can": { + "type": "object", + "additionalProperties": { + "type": "boolean" + }, + "readOnly": true, + "description": "Operations the current user is able to perform on this object", + "nullable": false + }, + "id": { + "type": "integer", + "format": "int64", + "readOnly": true, + "description": "Unique Id", + "nullable": false + }, + "client_id": { + "type": "string", + "readOnly": true, + "description": "API key client_id", + "nullable": true + }, + "created_at": { + "type": "string", + "readOnly": true, + "description": "Timestamp for the creation of this credential", + "nullable": true + }, + "is_disabled": { + "type": "boolean", + "readOnly": true, + "description": "Has this credential been disabled?", + "nullable": false + }, + "type": { + "type": "string", + "readOnly": true, + "description": "Short name for the type of this kind of credential", + "nullable": true + }, + "client_secret": { + "type": "string", + "readOnly": true, + "description": "API key client_secret", + "nullable": true + }, + "url": { + "type": "string", + "format": "uri-reference", + "readOnly": true, + "description": "Link to get this item", + "nullable": true + } + }, + "x-looker-status": "stable" + }, "CredentialsEmail": { "properties": { "can": { @@ -35280,7 +35562,7 @@ }, "alert_sync_with_dashboard_filter_enabled": { "type": "boolean", - "description": "Enables alerts to keep in sync with dashboard filter changes - only available in Enhanced Alerts (beta)", + "description": "Enables alerts to keep in sync with dashboard filter changes", "nullable": false }, "background_color": { @@ -36471,6 +36753,47 @@ "target_url" ] }, + "EmbedSecret": { + "properties": { + "algorithm": { + "type": "string", + "description": "Signing algorithm to use with this secret. Either `hmac/sha-256`(default) or `hmac/sha-1`", + "nullable": true + }, + "created_at": { + "type": "string", + "readOnly": true, + "description": "When secret was created", + "nullable": true + }, + "enabled": { + "type": "boolean", + "description": "Is this secret currently enabled", + "nullable": false + }, + "id": { + "type": "integer", + "format": "int64", + "readOnly": true, + "description": "Unique Id", + "nullable": false + }, + "secret": { + "type": "string", + "readOnly": true, + "description": "Secret for use with SSO embedding", + "nullable": true + }, + "user_id": { + "type": "integer", + "format": "int64", + "readOnly": true, + "description": "Id of user who created this secret", + "nullable": true + } + }, + "x-looker-status": "beta" + }, "EmbedUrlResponse": { "properties": { "url": { @@ -38414,8 +38737,7 @@ "nullable": true }, "id": { - "type": "integer", - "format": "int64", + "type": "string", "readOnly": true, "description": "Unique Id", "nullable": false @@ -38602,8 +38924,7 @@ "nullable": true }, "id": { - "type": "integer", - "format": "int64", + "type": "string", "readOnly": true, "description": "Unique Id", "nullable": false @@ -38799,8 +39120,7 @@ "nullable": true }, "id": { - "type": "integer", - "format": "int64", + "type": "string", "readOnly": true, "description": "Unique Id", "nullable": false @@ -41669,8 +41989,7 @@ "nullable": false }, "look_id": { - "type": "integer", - "format": "int64", + "type": "string", "description": "Id of look associated with query.", "nullable": true }, @@ -41777,8 +42096,7 @@ "nullable": true }, "look_id": { - "type": "integer", - "format": "int64", + "type": "string", "description": "Id of look associated with query.", "nullable": true }, @@ -41852,8 +42170,7 @@ "nullable": false }, "look_id": { - "type": "integer", - "format": "int64", + "type": "string", "readOnly": true, "description": "Id of look to render", "nullable": true @@ -42862,8 +43179,7 @@ "nullable": false }, "look_id": { - "type": "integer", - "format": "int64", + "type": "string", "description": "Id of a look", "nullable": true }, @@ -43005,8 +43321,7 @@ "nullable": false }, "look_id": { - "type": "integer", - "format": "int64", + "type": "string", "description": "Id of a look", "nullable": true }, diff --git a/swift/looker/rtl/constants.swift b/swift/looker/rtl/constants.swift index 6c3bd3ef5..23c8d7774 100644 --- a/swift/looker/rtl/constants.swift +++ b/swift/looker/rtl/constants.swift @@ -51,7 +51,7 @@ extension String { } public struct Constants { - public static let lookerVersion = "21.18" + public static let lookerVersion = "21.20" public static let apiVersion = "4.0" public static let defaultApiVersion = "4.0" // Swift requires API 4.0 public static let sdkVersion = #"\#(apiVersion).\#(lookerVersion)"# diff --git a/swift/looker/sdk/methods.swift b/swift/looker/sdk/methods.swift index b5d59fde3..9c48d0330 100644 --- a/swift/looker/sdk/methods.swift +++ b/swift/looker/sdk/methods.swift @@ -25,7 +25,7 @@ */ /** - * 425 API methods + * 429 API methods */ @@ -350,6 +350,41 @@ open class LookerSDK: APIMethods { // MARK Auth: Manage User Authentication Configuration + /** + * ### Create an embed secret using the specified information. + * + * The value of the `secret` field will be set by Looker and returned. + * + * POST /embed_config/secrets -> EmbedSecret + */ + public func create_embed_secret( + /** + * @param {WriteEmbedSecret} body + */ + body: WriteEmbedSecret?, + options: ITransportSettings? = nil + ) -> SDKResponse { + let result: SDKResponse = self.post("/embed_config/secrets", nil, try! self.encode(body), options) + return result + } + + /** + * ### Delete an embed secret. + * + * DELETE /embed_config/secrets/{embed_secret_id} -> String + */ + public func delete_embed_secret( + /** + * @param {Int64} embed_secret_id Id of Embed Secret + */ + _ embed_secret_id: Int64, + options: ITransportSettings? = nil + ) -> SDKResponse { + let path_embed_secret_id = encodeParam(embed_secret_id) + let result: SDKResponse = self.delete("/embed_config/secrets/\(path_embed_secret_id)", nil, nil, options) + return result + } + /** * ### Create SSO Embed URL * @@ -4218,6 +4253,62 @@ open class LookerSDK: APIMethods { + // MARK DerivedTable: View Derived Table graphs + + /** + * ### Discover information about derived tables + * + * GET /derived_table/graph/model/{model} -> DependencyGraph + */ + public func graph_derived_tables_for_model( + /** + * @param {String} model The name of the Lookml model. + */ + _ model: String, + /** + * @param {String} format The format of the graph. Valid values are [dot]. Default is `dot` + */ + format: String? = nil, + /** + * @param {String} color Color denoting the build status of the graph. Grey = not built, green = built, yellow = building, red = error. + */ + color: String? = nil, + options: ITransportSettings? = nil + ) -> SDKResponse { + let path_model = encodeParam(model) + let result: SDKResponse = self.get("/derived_table/graph/model/\(path_model)", + ["format": format, "color": color], nil, options) + return result + } + + /** + * ### Get the subgraph representing this derived table and its dependencies. + * + * GET /derived_table/graph/view/{view} -> DependencyGraph + */ + public func graph_derived_tables_for_view( + /** + * @param {String} view The derived table's view name. + */ + _ view: String, + /** + * @param {String} models The models where this derived table is defined. + */ + models: String? = nil, + /** + * @param {String} workspace The model directory to look in, either `dev` or `production`. + */ + workspace: String? = nil, + options: ITransportSettings? = nil + ) -> SDKResponse { + let path_view = encodeParam(view) + let result: SDKResponse = self.get("/derived_table/graph/view/\(path_view)", + ["models": models, "workspace": workspace], nil, options) + return result + } + + + // MARK Folder: Manage Folders /** @@ -5517,9 +5608,9 @@ open class LookerSDK: APIMethods { */ public func look( /** - * @param {Int64} look_id Id of look + * @param {String} look_id Id of look */ - _ look_id: Int64, + _ look_id: String, /** * @param {String} fields Requested fields. */ @@ -5558,9 +5649,9 @@ open class LookerSDK: APIMethods { */ public func update_look( /** - * @param {Int64} look_id Id of look + * @param {String} look_id Id of look */ - _ look_id: Int64, + _ look_id: String, /** * @param {WriteLookWithQuery} body */ @@ -5590,9 +5681,9 @@ open class LookerSDK: APIMethods { */ public func delete_look( /** - * @param {Int64} look_id Id of look + * @param {String} look_id Id of look */ - _ look_id: Int64, + _ look_id: String, options: ITransportSettings? = nil ) -> SDKResponse { let path_look_id = encodeParam(look_id) @@ -5626,9 +5717,9 @@ open class LookerSDK: APIMethods { */ public func run_look( /** - * @param {Int64} look_id Id of look + * @param {String} look_id Id of look */ - _ look_id: Int64, + _ look_id: String, /** * @param {String} result_format Format of result */ @@ -5703,9 +5794,9 @@ open class LookerSDK: APIMethods { */ public func copy_look( /** - * @param {Int64} look_id Look id to copy. + * @param {String} look_id Look id to copy. */ - _ look_id: Int64, + _ look_id: String, /** * @param {String} folder_id Folder id to copy to. */ @@ -5730,9 +5821,9 @@ open class LookerSDK: APIMethods { */ public func move_look( /** - * @param {Int64} look_id Look id to move. + * @param {String} look_id Look id to move. */ - _ look_id: Int64, + _ look_id: String, /** * @param {String} folder_id Folder id to move to. */ @@ -5749,32 +5840,6 @@ open class LookerSDK: APIMethods { // MARK LookmlModel: Manage LookML Models - /** - * ### Discover information about derived tables - * - * GET /derived_table/graph/model/{model} -> DependencyGraph - */ - public func graph_derived_tables_for_model( - /** - * @param {String} model The name of the Lookml model. - */ - _ model: String, - /** - * @param {String} format The format of the graph. Valid values are [dot]. Default is `dot` - */ - format: String? = nil, - /** - * @param {String} color Color denoting the build status of the graph. Grey = not built, green = built, yellow = building, red = error. - */ - color: String? = nil, - options: ITransportSettings? = nil - ) -> SDKResponse { - let path_model = encodeParam(model) - let result: SDKResponse = self.get("/derived_table/graph/model/\(path_model)", - ["format": format, "color": color], nil, options) - return result - } - /** * ### Get information about all lookml models. * @@ -7362,12 +7427,16 @@ open class LookerSDK: APIMethods { * @param {Bool} server_table_calcs Perform table calculations on query results */ server_table_calcs: Bool? = nil, + /** + * @param {String} source Specifies the source of this call. + */ + source: String? = nil, options: ITransportSettings? = nil ) -> SDKResponse { let path_query_id = encodeParam(query_id) let path_result_format = encodeParam(result_format) let result: SDKResponse = self.get("/queries/\(path_query_id)/run/\(path_result_format)", - ["limit": limit, "apply_formatting": apply_formatting as Any?, "apply_vis": apply_vis as Any?, "cache": cache as Any?, "image_width": image_width, "image_height": image_height, "generate_drill_links": generate_drill_links as Any?, "force_production": force_production as Any?, "cache_only": cache_only as Any?, "path_prefix": path_prefix, "rebuild_pdts": rebuild_pdts as Any?, "server_table_calcs": server_table_calcs as Any?], nil, options) + ["limit": limit, "apply_formatting": apply_formatting as Any?, "apply_vis": apply_vis as Any?, "cache": cache as Any?, "image_width": image_width, "image_height": image_height, "generate_drill_links": generate_drill_links as Any?, "force_production": force_production as Any?, "cache_only": cache_only as Any?, "path_prefix": path_prefix, "rebuild_pdts": rebuild_pdts as Any?, "server_table_calcs": server_table_calcs as Any?, "source": source], nil, options) return result } @@ -10308,26 +10377,22 @@ open class LookerSDK: APIMethods { /** * ### API 3 login information for the specified user. This is for the newer API keys that can be added for any user. * - * POST /users/{user_id}/credentials_api3 -> CredentialsApi3 + * POST /users/{user_id}/credentials_api3 -> CreateCredentialsApi3 */ public func create_user_credentials_api3( /** * @param {Int64} user_id id of user */ _ user_id: Int64, - /** - * @param {CredentialsApi3} body - */ - body: CredentialsApi3?, /** * @param {String} fields Requested fields. */ fields: String? = nil, options: ITransportSettings? = nil - ) -> SDKResponse { + ) -> SDKResponse { let path_user_id = encodeParam(user_id) - let result: SDKResponse = self.post("/users/\(path_user_id)/credentials_api3", - ["fields": fields], try! self.encode(body), options) + let result: SDKResponse = self.post("/users/\(path_user_id)/credentials_api3", + ["fields": fields], nil, options) return result } diff --git a/swift/looker/sdk/models.swift b/swift/looker/sdk/models.swift index 3a8815636..97be9e6e6 100644 --- a/swift/looker/sdk/models.swift +++ b/swift/looker/sdk/models.swift @@ -25,7 +25,7 @@ */ /** - * 298 API models: 221 Spec, 0 Request, 57 Write, 20 Enum + * 301 API models: 223 Spec, 0 Request, 58 Write, 20 Enum */ @@ -694,7 +694,7 @@ public struct BoardItem: SDKModel { case id case image_url case location - case look_id + case _look_id = "look_id" case _lookml_dashboard_id = "lookml_dashboard_id" case order case title @@ -776,10 +776,14 @@ public struct BoardItem: SDKModel { */ public var location: String? + private var _look_id: AnyString? /** * Look to base this item on */ - public var look_id: Int64? + public var look_id: String? { + get { _look_id?.value } + set { _look_id = newValue.map(AnyString.init) } + } private var _lookml_dashboard_id: AnyString? /** @@ -810,7 +814,7 @@ public struct BoardItem: SDKModel { */ public var view_count: Int64? - public init(can: StringDictionary? = nil, content_created_by: String? = nil, content_favorite_id: Int64? = nil, content_metadata_id: Int64? = nil, content_updated_at: String? = nil, custom_description: String? = nil, custom_title: String? = nil, custom_url: String? = nil, dashboard_id: Int64? = nil, description: String? = nil, favorite_count: Int64? = nil, board_section_id: Int64? = nil, id: Int64? = nil, image_url: String? = nil, location: String? = nil, look_id: Int64? = nil, lookml_dashboard_id: String? = nil, order: Int64? = nil, title: String? = nil, url: String? = nil, view_count: Int64? = nil) { + public init(can: StringDictionary? = nil, content_created_by: String? = nil, content_favorite_id: Int64? = nil, content_metadata_id: Int64? = nil, content_updated_at: String? = nil, custom_description: String? = nil, custom_title: String? = nil, custom_url: String? = nil, dashboard_id: Int64? = nil, description: String? = nil, favorite_count: Int64? = nil, board_section_id: Int64? = nil, id: Int64? = nil, image_url: String? = nil, location: String? = nil, look_id: String? = nil, lookml_dashboard_id: String? = nil, order: Int64? = nil, title: String? = nil, url: String? = nil, view_count: Int64? = nil) { self.can = can self.content_created_by = content_created_by self.content_favorite_id = content_favorite_id @@ -826,7 +830,7 @@ public struct BoardItem: SDKModel { self.id = id self.image_url = image_url self.location = location - self.look_id = look_id + self._look_id = look_id.map(AnyString.init) self._lookml_dashboard_id = lookml_dashboard_id.map(AnyString.init) self.order = order self.title = title @@ -1186,6 +1190,17 @@ public struct ConnectionFeatures: SDKModel { } public struct ContentFavorite: SDKModel { + + private enum CodingKeys : String, CodingKey { + case id + case user_id + case content_metadata_id + case _look_id = "look_id" + case dashboard_id + case look + case dashboard + case board_id + } /** * Unique Id (read-only) */ @@ -1201,10 +1216,14 @@ public struct ContentFavorite: SDKModel { */ public var content_metadata_id: Int64? + private var _look_id: AnyString? /** * Id of a look (read-only) */ - public var look_id: Int64? + public var look_id: String? { + get { _look_id?.value } + set { _look_id = newValue.map(AnyString.init) } + } /** * Id of a dashboard (read-only) @@ -1220,11 +1239,11 @@ public struct ContentFavorite: SDKModel { */ public var board_id: Int64? - public init(id: Int64? = nil, user_id: Int64? = nil, content_metadata_id: Int64? = nil, look_id: Int64? = nil, dashboard_id: Int64? = nil, look: LookBasic? = nil, dashboard: DashboardBase? = nil, board_id: Int64? = nil) { + public init(id: Int64? = nil, user_id: Int64? = nil, content_metadata_id: Int64? = nil, look_id: String? = nil, dashboard_id: Int64? = nil, look: LookBasic? = nil, dashboard: DashboardBase? = nil, board_id: Int64? = nil) { self.id = id self.user_id = user_id self.content_metadata_id = content_metadata_id - self.look_id = look_id + self._look_id = look_id.map(AnyString.init) self.dashboard_id = dashboard_id self.look = look self.dashboard = dashboard @@ -1241,7 +1260,7 @@ public struct ContentMeta: SDKModel { case name case parent_id case _dashboard_id = "dashboard_id" - case look_id + case _look_id = "look_id" case _folder_id = "folder_id" case content_type case inherits @@ -1277,10 +1296,14 @@ public struct ContentMeta: SDKModel { set { _dashboard_id = newValue.map(AnyString.init) } } + private var _look_id: AnyString? /** * Id of associated look when content_type is "look" (read-only) */ - public var look_id: Int64? + public var look_id: String? { + get { _look_id?.value } + set { _look_id = newValue.map(AnyString.init) } + } private var _folder_id: AnyString? /** @@ -1311,13 +1334,13 @@ public struct ContentMeta: SDKModel { */ public var slug: String? - public init(can: StringDictionary? = nil, id: Int64? = nil, name: String? = nil, parent_id: Int64? = nil, dashboard_id: String? = nil, look_id: Int64? = nil, folder_id: String? = nil, content_type: String? = nil, inherits: Bool? = nil, inheriting_id: Int64? = nil, slug: String? = nil) { + public init(can: StringDictionary? = nil, id: Int64? = nil, name: String? = nil, parent_id: Int64? = nil, dashboard_id: String? = nil, look_id: String? = nil, folder_id: String? = nil, content_type: String? = nil, inherits: Bool? = nil, inheriting_id: Int64? = nil, slug: String? = nil) { self.can = can self.id = id self.name = name self.parent_id = parent_id self._dashboard_id = dashboard_id.map(AnyString.init) - self.look_id = look_id + self._look_id = look_id.map(AnyString.init) self._folder_id = folder_id.map(AnyString.init) self.content_type = content_type self.inherits = inherits @@ -1800,10 +1823,21 @@ public struct ContentValidationFolder: SDKModel { } public struct ContentValidationLook: SDKModel { + + private enum CodingKeys : String, CodingKey { + case _id = "id" + case title + case short_url + case folder + } + private var _id: AnyString? /** * Unique Id (read-only) */ - public var id: Int64? + public var id: String? { + get { _id?.value } + set { _id = newValue.map(AnyString.init) } + } /** * Look Title @@ -1817,8 +1851,8 @@ public struct ContentValidationLook: SDKModel { public var folder: ContentValidationFolder? - public init(id: Int64? = nil, title: String? = nil, short_url: String? = nil, folder: ContentValidationFolder? = nil) { - self.id = id + public init(id: String? = nil, title: String? = nil, short_url: String? = nil, folder: ContentValidationFolder? = nil) { + self._id = id.map(AnyString.init) self.title = title self.short_url = short_url self.folder = folder @@ -1892,24 +1926,34 @@ public struct ContentValidationLookMLDashboardElement: SDKModel { } public struct ContentValidationScheduledPlan: SDKModel { + + private enum CodingKeys : String, CodingKey { + case name + case _look_id = "look_id" + case id + } /** * Name of this scheduled plan */ public var name: String? + private var _look_id: AnyString? /** * Id of a look */ - public var look_id: Int64? + public var look_id: String? { + get { _look_id?.value } + set { _look_id = newValue.map(AnyString.init) } + } /** * Unique Id (read-only) */ public var id: Int64? - public init(name: String? = nil, look_id: Int64? = nil, id: Int64? = nil) { + public init(name: String? = nil, look_id: String? = nil, id: Int64? = nil) { self.name = name - self.look_id = look_id + self._look_id = look_id.map(AnyString.init) self.id = id } @@ -1975,6 +2019,21 @@ public struct ContentValidatorError: SDKModel { } public struct ContentView: SDKModel { + + private enum CodingKeys : String, CodingKey { + case can + case id + case _look_id = "look_id" + case dashboard_id + case title + case content_metadata_id + case user_id + case group_id + case view_count + case favorite_count + case last_viewed_at + case start_of_week_date + } /** * Operations the current user is able to perform on this object (read-only) */ @@ -1985,10 +2044,14 @@ public struct ContentView: SDKModel { */ public var id: Int64? + private var _look_id: AnyString? /** * Id of viewed Look (read-only) */ - public var look_id: Int64? + public var look_id: String? { + get { _look_id?.value } + set { _look_id = newValue.map(AnyString.init) } + } /** * Id of the viewed Dashboard (read-only) @@ -2035,10 +2098,10 @@ public struct ContentView: SDKModel { */ public var start_of_week_date: String? - public init(can: StringDictionary? = nil, id: Int64? = nil, look_id: Int64? = nil, dashboard_id: Int64? = nil, title: String? = nil, content_metadata_id: Int64? = nil, user_id: Int64? = nil, group_id: Int64? = nil, view_count: Int64? = nil, favorite_count: Int64? = nil, last_viewed_at: String? = nil, start_of_week_date: String? = nil) { + public init(can: StringDictionary? = nil, id: Int64? = nil, look_id: String? = nil, dashboard_id: Int64? = nil, title: String? = nil, content_metadata_id: Int64? = nil, user_id: Int64? = nil, group_id: Int64? = nil, view_count: Int64? = nil, favorite_count: Int64? = nil, last_viewed_at: String? = nil, start_of_week_date: String? = nil) { self.can = can self.id = id - self.look_id = look_id + self._look_id = look_id.map(AnyString.init) self.dashboard_id = dashboard_id self.title = title self.content_metadata_id = content_metadata_id @@ -2138,6 +2201,75 @@ public struct CreateCostEstimate: SDKModel { } +public struct CreateCredentialsApi3: SDKModel { + + private enum CodingKeys : String, CodingKey { + case can + case id + case _client_id = "client_id" + case created_at + case is_disabled + case type + case client_secret + case url + } + /** + * Operations the current user is able to perform on this object (read-only) + */ + public var can: StringDictionary? + + /** + * Unique Id (read-only) + */ + public var id: Int64? + + private var _client_id: AnyString? + /** + * API key client_id (read-only) + */ + public var client_id: String? { + get { _client_id?.value } + set { _client_id = newValue.map(AnyString.init) } + } + + /** + * Timestamp for the creation of this credential (read-only) + */ + public var created_at: String? + + /** + * Has this credential been disabled? (read-only) + */ + public var is_disabled: Bool? + + /** + * Short name for the type of this kind of credential (read-only) + */ + public var type: String? + + /** + * API key client_secret (read-only) + */ + public var client_secret: String? + + /** + * Link to get this item (read-only) + */ + public var url: String? + + public init(can: StringDictionary? = nil, id: Int64? = nil, client_id: String? = nil, created_at: String? = nil, is_disabled: Bool? = nil, type: String? = nil, client_secret: String? = nil, url: String? = nil) { + self.can = can + self.id = id + self._client_id = client_id.map(AnyString.init) + self.created_at = created_at + self.is_disabled = is_disabled + self.type = type + self.client_secret = client_secret + self.url = url + } + +} + public struct CreateDashboardFilter: SDKModel { private enum CodingKeys : String, CodingKey { @@ -2409,7 +2541,7 @@ public struct CreateQueryTask: SDKModel { case result_format case source case deferred - case look_id + case _look_id = "look_id" case _dashboard_id = "dashboard_id" } /** @@ -2437,10 +2569,14 @@ public struct CreateQueryTask: SDKModel { */ public var deferred: Bool? + private var _look_id: AnyString? /** * Id of look associated with query. */ - public var look_id: Int64? + public var look_id: String? { + get { _look_id?.value } + set { _look_id = newValue.map(AnyString.init) } + } private var _dashboard_id: AnyString? /** @@ -2451,25 +2587,22 @@ public struct CreateQueryTask: SDKModel { set { _dashboard_id = newValue.map(AnyString.init) } } - public init(can: StringDictionary? = nil, query_id: Int64, result_format: ResultFormat, source: String? = nil, deferred: Bool? = nil, look_id: Int64? = nil, dashboard_id: String? = nil) { + public init(can: StringDictionary? = nil, query_id: Int64, result_format: ResultFormat, source: String? = nil, deferred: Bool? = nil, look_id: String? = nil, dashboard_id: String? = nil) { self.can = can self.query_id = query_id self.result_format = result_format self.source = source self.deferred = deferred - self.look_id = look_id + self._look_id = look_id.map(AnyString.init) self._dashboard_id = dashboard_id.map(AnyString.init) } - public init(can: StringDictionary? = nil, _ query_id: Int64, _ result_format: ResultFormat, source: String? = nil, deferred: Bool? = nil, look_id: Int64? = nil, dashboard_id: String? = nil) { + public init(can: StringDictionary? = nil, _ query_id: Int64, _ result_format: ResultFormat, source: String? = nil, deferred: Bool? = nil, look_id: String? = nil, dashboard_id: String? = nil) { self.init(can: can, query_id: query_id, result_format: result_format, source: source, deferred: deferred, look_id: look_id, dashboard_id: dashboard_id) } } -/** - * WARNING: no writeable properties found for POST, PUT, or PATCH - */ public struct CredentialsApi3: SDKModel { private enum CodingKeys : String, CodingKey { @@ -3299,7 +3432,7 @@ public struct Dashboard: SDKModel { public var preferred_viewer: String? /** - * Enables alerts to keep in sync with dashboard filter changes - only available in Enhanced Alerts (beta) + * Enables alerts to keep in sync with dashboard filter changes */ public var alert_sync_with_dashboard_filter_enabled: Bool? @@ -5325,6 +5458,48 @@ public struct EmbedParams: SDKModel { } +public struct EmbedSecret: SDKModel { + /** + * Signing algorithm to use with this secret. Either `hmac/sha-256`(default) or `hmac/sha-1` + */ + public var algorithm: String? + + /** + * When secret was created (read-only) + */ + public var created_at: String? + + /** + * Is this secret currently enabled + */ + public var enabled: Bool? + + /** + * Unique Id (read-only) + */ + public var id: Int64? + + /** + * Secret for use with SSO embedding (read-only) + */ + public var secret: String? + + /** + * Id of user who created this secret (read-only) + */ + public var user_id: Int64? + + public init(algorithm: String? = nil, created_at: String? = nil, enabled: Bool? = nil, id: Int64? = nil, secret: String? = nil, user_id: Int64? = nil) { + self.algorithm = algorithm + self.created_at = created_at + self.enabled = enabled + self.id = id + self.secret = secret + self.user_id = user_id + } + +} + public struct EmbedSsoParams: SDKModel { private enum CodingKeys : String, CodingKey { @@ -6349,7 +6524,7 @@ public struct HomepageItem: SDKModel { case id case image_url case location - case look_id + case _look_id = "look_id" case _lookml_dashboard_id = "lookml_dashboard_id" case order case section_fetch_time @@ -6446,10 +6621,14 @@ public struct HomepageItem: SDKModel { */ public var location: String? + private var _look_id: AnyString? /** * Look to base this item on */ - public var look_id: Int64? + public var look_id: String? { + get { _look_id?.value } + set { _look_id = newValue.map(AnyString.init) } + } private var _lookml_dashboard_id: AnyString? /** @@ -6505,7 +6684,7 @@ public struct HomepageItem: SDKModel { */ public var view_count: Int64? - public init(can: StringDictionary? = nil, content_created_by: String? = nil, content_favorite_id: Int64? = nil, content_metadata_id: Int64? = nil, content_updated_at: String? = nil, custom_description: String? = nil, custom_image_data_base64: String? = nil, custom_image_url: String? = nil, custom_title: String? = nil, custom_url: String? = nil, dashboard_id: Int64? = nil, description: String? = nil, favorite_count: Int64? = nil, homepage_section_id: Int64? = nil, id: Int64? = nil, image_url: String? = nil, location: String? = nil, look_id: Int64? = nil, lookml_dashboard_id: String? = nil, order: Int64? = nil, section_fetch_time: Float? = nil, title: String? = nil, url: String? = nil, use_custom_description: Bool? = nil, use_custom_image: Bool? = nil, use_custom_title: Bool? = nil, use_custom_url: Bool? = nil, view_count: Int64? = nil) { + public init(can: StringDictionary? = nil, content_created_by: String? = nil, content_favorite_id: Int64? = nil, content_metadata_id: Int64? = nil, content_updated_at: String? = nil, custom_description: String? = nil, custom_image_data_base64: String? = nil, custom_image_url: String? = nil, custom_title: String? = nil, custom_url: String? = nil, dashboard_id: Int64? = nil, description: String? = nil, favorite_count: Int64? = nil, homepage_section_id: Int64? = nil, id: Int64? = nil, image_url: String? = nil, location: String? = nil, look_id: String? = nil, lookml_dashboard_id: String? = nil, order: Int64? = nil, section_fetch_time: Float? = nil, title: String? = nil, url: String? = nil, use_custom_description: Bool? = nil, use_custom_image: Bool? = nil, use_custom_title: Bool? = nil, use_custom_url: Bool? = nil, view_count: Int64? = nil) { self.can = can self.content_created_by = content_created_by self.content_favorite_id = content_favorite_id @@ -6523,7 +6702,7 @@ public struct HomepageItem: SDKModel { self.id = id self.image_url = image_url self.location = location - self.look_id = look_id + self._look_id = look_id.map(AnyString.init) self._lookml_dashboard_id = lookml_dashboard_id.map(AnyString.init) self.order = order self.section_fetch_time = section_fetch_time @@ -7782,7 +7961,7 @@ public struct Look: SDKModel { private enum CodingKeys : String, CodingKey { case can case content_metadata_id - case id + case _id = "id" case title case user_id case content_favorite_id @@ -7821,10 +8000,14 @@ public struct Look: SDKModel { */ public var content_metadata_id: Int64? + private var _id: AnyString? /** * Unique Id (read-only) */ - public var id: Int64? + public var id: String? { + get { _id?.value } + set { _id = newValue.map(AnyString.init) } + } /** * Look Title @@ -7959,10 +8142,10 @@ public struct Look: SDKModel { */ public var view_count: Int64? - public init(can: StringDictionary? = nil, content_metadata_id: Int64? = nil, id: Int64? = nil, title: String? = nil, user_id: Int64? = nil, content_favorite_id: Int64? = nil, created_at: Date? = nil, deleted: Bool? = nil, deleted_at: Date? = nil, deleter_id: Int64? = nil, description: String? = nil, embed_url: String? = nil, excel_file_url: String? = nil, favorite_count: Int64? = nil, google_spreadsheet_formula: String? = nil, image_embed_url: String? = nil, is_run_on_load: Bool? = nil, last_accessed_at: Date? = nil, last_updater_id: Int64? = nil, last_viewed_at: Date? = nil, model: LookModel? = nil, `public`: Bool? = nil, public_slug: String? = nil, public_url: String? = nil, query_id: Int64? = nil, short_url: String? = nil, folder: FolderBase? = nil, folder_id: String? = nil, updated_at: Date? = nil, view_count: Int64? = nil) { + public init(can: StringDictionary? = nil, content_metadata_id: Int64? = nil, id: String? = nil, title: String? = nil, user_id: Int64? = nil, content_favorite_id: Int64? = nil, created_at: Date? = nil, deleted: Bool? = nil, deleted_at: Date? = nil, deleter_id: Int64? = nil, description: String? = nil, embed_url: String? = nil, excel_file_url: String? = nil, favorite_count: Int64? = nil, google_spreadsheet_formula: String? = nil, image_embed_url: String? = nil, is_run_on_load: Bool? = nil, last_accessed_at: Date? = nil, last_updater_id: Int64? = nil, last_viewed_at: Date? = nil, model: LookModel? = nil, `public`: Bool? = nil, public_slug: String? = nil, public_url: String? = nil, query_id: Int64? = nil, short_url: String? = nil, folder: FolderBase? = nil, folder_id: String? = nil, updated_at: Date? = nil, view_count: Int64? = nil) { self.can = can self.content_metadata_id = content_metadata_id - self.id = id + self._id = id.map(AnyString.init) self.title = title self.user_id = user_id self.content_favorite_id = content_favorite_id @@ -9244,7 +9427,7 @@ public struct LookWithDashboards: SDKModel { private enum CodingKeys : String, CodingKey { case can case content_metadata_id - case id + case _id = "id" case title case user_id case content_favorite_id @@ -9284,10 +9467,14 @@ public struct LookWithDashboards: SDKModel { */ public var content_metadata_id: Int64? + private var _id: AnyString? /** * Unique Id (read-only) */ - public var id: Int64? + public var id: String? { + get { _id?.value } + set { _id = newValue.map(AnyString.init) } + } /** * Look Title @@ -9427,10 +9614,10 @@ public struct LookWithDashboards: SDKModel { */ public var dashboards: [DashboardBase]? - public init(can: StringDictionary? = nil, content_metadata_id: Int64? = nil, id: Int64? = nil, title: String? = nil, user_id: Int64? = nil, content_favorite_id: Int64? = nil, created_at: Date? = nil, deleted: Bool? = nil, deleted_at: Date? = nil, deleter_id: Int64? = nil, description: String? = nil, embed_url: String? = nil, excel_file_url: String? = nil, favorite_count: Int64? = nil, google_spreadsheet_formula: String? = nil, image_embed_url: String? = nil, is_run_on_load: Bool? = nil, last_accessed_at: Date? = nil, last_updater_id: Int64? = nil, last_viewed_at: Date? = nil, model: LookModel? = nil, `public`: Bool? = nil, public_slug: String? = nil, public_url: String? = nil, query_id: Int64? = nil, short_url: String? = nil, folder: FolderBase? = nil, folder_id: String? = nil, updated_at: Date? = nil, view_count: Int64? = nil, dashboards: [DashboardBase]? = nil) { + public init(can: StringDictionary? = nil, content_metadata_id: Int64? = nil, id: String? = nil, title: String? = nil, user_id: Int64? = nil, content_favorite_id: Int64? = nil, created_at: Date? = nil, deleted: Bool? = nil, deleted_at: Date? = nil, deleter_id: Int64? = nil, description: String? = nil, embed_url: String? = nil, excel_file_url: String? = nil, favorite_count: Int64? = nil, google_spreadsheet_formula: String? = nil, image_embed_url: String? = nil, is_run_on_load: Bool? = nil, last_accessed_at: Date? = nil, last_updater_id: Int64? = nil, last_viewed_at: Date? = nil, model: LookModel? = nil, `public`: Bool? = nil, public_slug: String? = nil, public_url: String? = nil, query_id: Int64? = nil, short_url: String? = nil, folder: FolderBase? = nil, folder_id: String? = nil, updated_at: Date? = nil, view_count: Int64? = nil, dashboards: [DashboardBase]? = nil) { self.can = can self.content_metadata_id = content_metadata_id - self.id = id + self._id = id.map(AnyString.init) self.title = title self.user_id = user_id self.content_favorite_id = content_favorite_id @@ -9468,7 +9655,7 @@ public struct LookWithQuery: SDKModel { private enum CodingKeys : String, CodingKey { case can case content_metadata_id - case id + case _id = "id" case title case user_id case content_favorite_id @@ -9509,10 +9696,14 @@ public struct LookWithQuery: SDKModel { */ public var content_metadata_id: Int64? + private var _id: AnyString? /** * Unique Id (read-only) */ - public var id: Int64? + public var id: String? { + get { _id?.value } + set { _id = newValue.map(AnyString.init) } + } /** * Look Title @@ -9654,10 +9845,10 @@ public struct LookWithQuery: SDKModel { */ public var url: String? - public init(can: StringDictionary? = nil, content_metadata_id: Int64? = nil, id: Int64? = nil, title: String? = nil, user_id: Int64? = nil, content_favorite_id: Int64? = nil, created_at: Date? = nil, deleted: Bool? = nil, deleted_at: Date? = nil, deleter_id: Int64? = nil, description: String? = nil, embed_url: String? = nil, excel_file_url: String? = nil, favorite_count: Int64? = nil, google_spreadsheet_formula: String? = nil, image_embed_url: String? = nil, is_run_on_load: Bool? = nil, last_accessed_at: Date? = nil, last_updater_id: Int64? = nil, last_viewed_at: Date? = nil, model: LookModel? = nil, `public`: Bool? = nil, public_slug: String? = nil, public_url: String? = nil, query_id: Int64? = nil, short_url: String? = nil, folder: FolderBase? = nil, folder_id: String? = nil, updated_at: Date? = nil, view_count: Int64? = nil, query: Query? = nil, url: String? = nil) { + public init(can: StringDictionary? = nil, content_metadata_id: Int64? = nil, id: String? = nil, title: String? = nil, user_id: Int64? = nil, content_favorite_id: Int64? = nil, created_at: Date? = nil, deleted: Bool? = nil, deleted_at: Date? = nil, deleter_id: Int64? = nil, description: String? = nil, embed_url: String? = nil, excel_file_url: String? = nil, favorite_count: Int64? = nil, google_spreadsheet_formula: String? = nil, image_embed_url: String? = nil, is_run_on_load: Bool? = nil, last_accessed_at: Date? = nil, last_updater_id: Int64? = nil, last_viewed_at: Date? = nil, model: LookModel? = nil, `public`: Bool? = nil, public_slug: String? = nil, public_url: String? = nil, query_id: Int64? = nil, short_url: String? = nil, folder: FolderBase? = nil, folder_id: String? = nil, updated_at: Date? = nil, view_count: Int64? = nil, query: Query? = nil, url: String? = nil) { self.can = can self.content_metadata_id = content_metadata_id - self.id = id + self._id = id.map(AnyString.init) self.title = title self.user_id = user_id self.content_favorite_id = content_favorite_id @@ -11243,7 +11434,7 @@ public struct QueryTask: SDKModel { case runtime case rebuild_pdts case result_source - case look_id + case _look_id = "look_id" case _dashboard_id = "dashboard_id" case result_format } @@ -11328,10 +11519,14 @@ public struct QueryTask: SDKModel { */ public var result_source: String? + private var _look_id: AnyString? /** * Id of look associated with query. */ - public var look_id: Int64? + public var look_id: String? { + get { _look_id?.value } + set { _look_id = newValue.map(AnyString.init) } + } private var _dashboard_id: AnyString? /** @@ -11347,7 +11542,7 @@ public struct QueryTask: SDKModel { */ public var result_format: String? - public init(can: StringDictionary? = nil, id: String? = nil, query_id: Int64? = nil, query: Query? = nil, generate_links: Bool? = nil, force_production: Bool? = nil, path_prefix: String? = nil, cache: Bool? = nil, server_table_calcs: Bool? = nil, cache_only: Bool? = nil, cache_key: String? = nil, status: String? = nil, source: String? = nil, runtime: Float? = nil, rebuild_pdts: Bool? = nil, result_source: String? = nil, look_id: Int64? = nil, dashboard_id: String? = nil, result_format: String? = nil) { + public init(can: StringDictionary? = nil, id: String? = nil, query_id: Int64? = nil, query: Query? = nil, generate_links: Bool? = nil, force_production: Bool? = nil, path_prefix: String? = nil, cache: Bool? = nil, server_table_calcs: Bool? = nil, cache_only: Bool? = nil, cache_key: String? = nil, status: String? = nil, source: String? = nil, runtime: Float? = nil, rebuild_pdts: Bool? = nil, result_source: String? = nil, look_id: String? = nil, dashboard_id: String? = nil, result_format: String? = nil) { self.can = can self._id = id.map(AnyString.init) self.query_id = query_id @@ -11364,7 +11559,7 @@ public struct QueryTask: SDKModel { self.runtime = runtime self.rebuild_pdts = rebuild_pdts self.result_source = result_source - self.look_id = look_id + self._look_id = look_id.map(AnyString.init) self._dashboard_id = dashboard_id.map(AnyString.init) self.result_format = result_format } @@ -11382,7 +11577,7 @@ public struct RenderTask: SDKModel { case finalized_at case height case _id = "id" - case look_id + case _look_id = "look_id" case _lookml_dashboard_id = "lookml_dashboard_id" case query_id case _dashboard_element_id = "dashboard_element_id" @@ -11439,10 +11634,14 @@ public struct RenderTask: SDKModel { set { _id = newValue.map(AnyString.init) } } + private var _look_id: AnyString? /** * Id of look to render (read-only) */ - public var look_id: Int64? + public var look_id: String? { + get { _look_id?.value } + set { _look_id = newValue.map(AnyString.init) } + } private var _lookml_dashboard_id: AnyString? /** @@ -11507,7 +11706,7 @@ public struct RenderTask: SDKModel { */ public var width: Int64? - public init(can: StringDictionary? = nil, created_at: String? = nil, dashboard_filters: String? = nil, dashboard_id: Int64? = nil, dashboard_style: String? = nil, finalized_at: String? = nil, height: Int64? = nil, id: String? = nil, look_id: Int64? = nil, lookml_dashboard_id: String? = nil, query_id: Int64? = nil, dashboard_element_id: String? = nil, query_runtime: Double? = nil, render_runtime: Double? = nil, result_format: String? = nil, runtime: Double? = nil, status: String? = nil, status_detail: String? = nil, user_id: Int64? = nil, width: Int64? = nil) { + public init(can: StringDictionary? = nil, created_at: String? = nil, dashboard_filters: String? = nil, dashboard_id: Int64? = nil, dashboard_style: String? = nil, finalized_at: String? = nil, height: Int64? = nil, id: String? = nil, look_id: String? = nil, lookml_dashboard_id: String? = nil, query_id: Int64? = nil, dashboard_element_id: String? = nil, query_runtime: Double? = nil, render_runtime: Double? = nil, result_format: String? = nil, runtime: Double? = nil, status: String? = nil, status_detail: String? = nil, user_id: Int64? = nil, width: Int64? = nil) { self.can = can self.created_at = created_at self.dashboard_filters = dashboard_filters @@ -11516,7 +11715,7 @@ public struct RenderTask: SDKModel { self.finalized_at = finalized_at self.height = height self._id = id.map(AnyString.init) - self.look_id = look_id + self._look_id = look_id.map(AnyString.init) self._lookml_dashboard_id = lookml_dashboard_id.map(AnyString.init) self.query_id = query_id self._dashboard_element_id = dashboard_element_id.map(AnyString.init) @@ -12412,7 +12611,7 @@ public struct ScheduledPlan: SDKModel { case user_id case run_as_recipient case enabled - case look_id + case _look_id = "look_id" case dashboard_id case _lookml_dashboard_id = "lookml_dashboard_id" case filters_string @@ -12463,10 +12662,14 @@ public struct ScheduledPlan: SDKModel { */ public var enabled: Bool? + private var _look_id: AnyString? /** * Id of a look */ - public var look_id: Int64? + public var look_id: String? { + get { _look_id?.value } + set { _look_id = newValue.map(AnyString.init) } + } /** * Id of a dashboard @@ -12618,12 +12821,12 @@ public struct ScheduledPlan: SDKModel { */ public var can: StringDictionary? - public init(name: String? = nil, user_id: Int64? = nil, run_as_recipient: Bool? = nil, enabled: Bool? = nil, look_id: Int64? = nil, dashboard_id: Int64? = nil, lookml_dashboard_id: String? = nil, filters_string: String? = nil, dashboard_filters: String? = nil, require_results: Bool? = nil, require_no_results: Bool? = nil, require_change: Bool? = nil, send_all_results: Bool? = nil, crontab: String? = nil, datagroup: String? = nil, timezone: String? = nil, query_id: String? = nil, scheduled_plan_destination: [ScheduledPlanDestination]? = nil, run_once: Bool? = nil, include_links: Bool? = nil, pdf_paper_size: String? = nil, pdf_landscape: Bool? = nil, embed: Bool? = nil, color_theme: String? = nil, long_tables: Bool? = nil, inline_table_width: Int64? = nil, id: Int64? = nil, created_at: Date? = nil, updated_at: Date? = nil, title: String? = nil, user: UserPublic? = nil, next_run_at: Date? = nil, last_run_at: Date? = nil, can: StringDictionary? = nil) { + public init(name: String? = nil, user_id: Int64? = nil, run_as_recipient: Bool? = nil, enabled: Bool? = nil, look_id: String? = nil, dashboard_id: Int64? = nil, lookml_dashboard_id: String? = nil, filters_string: String? = nil, dashboard_filters: String? = nil, require_results: Bool? = nil, require_no_results: Bool? = nil, require_change: Bool? = nil, send_all_results: Bool? = nil, crontab: String? = nil, datagroup: String? = nil, timezone: String? = nil, query_id: String? = nil, scheduled_plan_destination: [ScheduledPlanDestination]? = nil, run_once: Bool? = nil, include_links: Bool? = nil, pdf_paper_size: String? = nil, pdf_landscape: Bool? = nil, embed: Bool? = nil, color_theme: String? = nil, long_tables: Bool? = nil, inline_table_width: Int64? = nil, id: Int64? = nil, created_at: Date? = nil, updated_at: Date? = nil, title: String? = nil, user: UserPublic? = nil, next_run_at: Date? = nil, last_run_at: Date? = nil, can: StringDictionary? = nil) { self.name = name self.user_id = user_id self.run_as_recipient = run_as_recipient self.enabled = enabled - self.look_id = look_id + self._look_id = look_id.map(AnyString.init) self.dashboard_id = dashboard_id self._lookml_dashboard_id = lookml_dashboard_id.map(AnyString.init) self.filters_string = filters_string @@ -14799,7 +15002,7 @@ public struct WriteBoardItem: SDKModel { case custom_url case dashboard_id case board_section_id - case look_id + case _look_id = "look_id" case _lookml_dashboard_id = "lookml_dashboard_id" case order } @@ -14828,10 +15031,14 @@ public struct WriteBoardItem: SDKModel { */ public var board_section_id: Int64? + private var _look_id: AnyString? /** * Look to base this item on */ - public var look_id: Int64? + public var look_id: String? { + get { _look_id?.value } + set { _look_id = newValue.map(AnyString.init) } + } private var _lookml_dashboard_id: AnyString? /** @@ -14847,13 +15054,13 @@ public struct WriteBoardItem: SDKModel { */ public var order: Int64? - public init(custom_description: String? = nil, custom_title: String? = nil, custom_url: String? = nil, dashboard_id: Int64? = nil, board_section_id: Int64? = nil, look_id: Int64? = nil, lookml_dashboard_id: String? = nil, order: Int64? = nil) { + public init(custom_description: String? = nil, custom_title: String? = nil, custom_url: String? = nil, dashboard_id: Int64? = nil, board_section_id: Int64? = nil, look_id: String? = nil, lookml_dashboard_id: String? = nil, order: Int64? = nil) { self.custom_description = custom_description self.custom_title = custom_title self.custom_url = custom_url self.dashboard_id = dashboard_id self.board_section_id = board_section_id - self.look_id = look_id + self._look_id = look_id.map(AnyString.init) self._lookml_dashboard_id = lookml_dashboard_id.map(AnyString.init) self.order = order } @@ -15154,7 +15361,7 @@ public struct WriteCreateQueryTask: SDKModel { case result_format case source case deferred - case look_id + case _look_id = "look_id" case _dashboard_id = "dashboard_id" } /** @@ -15177,10 +15384,14 @@ public struct WriteCreateQueryTask: SDKModel { */ public var deferred: Bool? + private var _look_id: AnyString? /** * Id of look associated with query. */ - public var look_id: Int64? + public var look_id: String? { + get { _look_id?.value } + set { _look_id = newValue.map(AnyString.init) } + } private var _dashboard_id: AnyString? /** @@ -15191,16 +15402,16 @@ public struct WriteCreateQueryTask: SDKModel { set { _dashboard_id = newValue.map(AnyString.init) } } - public init(query_id: Int64, result_format: ResultFormat, source: String? = nil, deferred: Bool? = nil, look_id: Int64? = nil, dashboard_id: String? = nil) { + public init(query_id: Int64, result_format: ResultFormat, source: String? = nil, deferred: Bool? = nil, look_id: String? = nil, dashboard_id: String? = nil) { self.query_id = query_id self.result_format = result_format self.source = source self.deferred = deferred - self.look_id = look_id + self._look_id = look_id.map(AnyString.init) self._dashboard_id = dashboard_id.map(AnyString.init) } - public init(_ query_id: Int64, _ result_format: ResultFormat, source: String? = nil, deferred: Bool? = nil, look_id: Int64? = nil, dashboard_id: String? = nil) { + public init(_ query_id: Int64, _ result_format: ResultFormat, source: String? = nil, deferred: Bool? = nil, look_id: String? = nil, dashboard_id: String? = nil) { self.init(query_id: query_id, result_format: result_format, source: source, deferred: deferred, look_id: look_id, dashboard_id: dashboard_id) } @@ -15301,7 +15512,7 @@ public struct WriteDashboard: SDKModel { public var preferred_viewer: String? /** - * Enables alerts to keep in sync with dashboard filter changes - only available in Enhanced Alerts (beta) + * Enables alerts to keep in sync with dashboard filter changes */ public var alert_sync_with_dashboard_filter_enabled: Bool? @@ -16109,6 +16320,28 @@ public struct WriteDBConnectionOverride: SDKModel { } +/** + * Dynamic writeable type for EmbedSecret removes: + * created_at, id, secret, user_id + */ +public struct WriteEmbedSecret: SDKModel { + /** + * Signing algorithm to use with this secret. Either `hmac/sha-256`(default) or `hmac/sha-1` + */ + public var algorithm: String? + + /** + * Is this secret currently enabled + */ + public var enabled: Bool? + + public init(algorithm: String? = nil, enabled: Bool? = nil) { + self.algorithm = algorithm + self.enabled = enabled + } + +} + /** * Dynamic writeable type for ExternalOauthApplication removes: * can, id, created_at @@ -17573,7 +17806,7 @@ public struct WriteScheduledPlan: SDKModel { case user_id case run_as_recipient case enabled - case look_id + case _look_id = "look_id" case dashboard_id case _lookml_dashboard_id = "lookml_dashboard_id" case filters_string @@ -17616,10 +17849,14 @@ public struct WriteScheduledPlan: SDKModel { */ public var enabled: Bool? + private var _look_id: AnyString? /** * Id of a look */ - public var look_id: Int64? + public var look_id: String? { + get { _look_id?.value } + set { _look_id = newValue.map(AnyString.init) } + } /** * Id of a dashboard @@ -17734,12 +17971,12 @@ public struct WriteScheduledPlan: SDKModel { */ public var inline_table_width: Int64? - public init(name: String? = nil, user_id: Int64? = nil, run_as_recipient: Bool? = nil, enabled: Bool? = nil, look_id: Int64? = nil, dashboard_id: Int64? = nil, lookml_dashboard_id: String? = nil, filters_string: String? = nil, dashboard_filters: String? = nil, require_results: Bool? = nil, require_no_results: Bool? = nil, require_change: Bool? = nil, send_all_results: Bool? = nil, crontab: String? = nil, datagroup: String? = nil, timezone: String? = nil, query_id: String? = nil, scheduled_plan_destination: [ScheduledPlanDestination]? = nil, run_once: Bool? = nil, include_links: Bool? = nil, pdf_paper_size: String? = nil, pdf_landscape: Bool? = nil, embed: Bool? = nil, color_theme: String? = nil, long_tables: Bool? = nil, inline_table_width: Int64? = nil) { + public init(name: String? = nil, user_id: Int64? = nil, run_as_recipient: Bool? = nil, enabled: Bool? = nil, look_id: String? = nil, dashboard_id: Int64? = nil, lookml_dashboard_id: String? = nil, filters_string: String? = nil, dashboard_filters: String? = nil, require_results: Bool? = nil, require_no_results: Bool? = nil, require_change: Bool? = nil, send_all_results: Bool? = nil, crontab: String? = nil, datagroup: String? = nil, timezone: String? = nil, query_id: String? = nil, scheduled_plan_destination: [ScheduledPlanDestination]? = nil, run_once: Bool? = nil, include_links: Bool? = nil, pdf_paper_size: String? = nil, pdf_landscape: Bool? = nil, embed: Bool? = nil, color_theme: String? = nil, long_tables: Bool? = nil, inline_table_width: Int64? = nil) { self.name = name self.user_id = user_id self.run_as_recipient = run_as_recipient self.enabled = enabled - self.look_id = look_id + self._look_id = look_id.map(AnyString.init) self.dashboard_id = dashboard_id self._lookml_dashboard_id = lookml_dashboard_id.map(AnyString.init) self.filters_string = filters_string diff --git a/swift/looker/sdk/streams.swift b/swift/looker/sdk/streams.swift index c8b8e3e62..aa0348a19 100644 --- a/swift/looker/sdk/streams.swift +++ b/swift/looker/sdk/streams.swift @@ -25,7 +25,7 @@ */ /** - * 425 API methods + * 429 API methods */ @@ -348,6 +348,41 @@ open class LookerSDKStream: APIMethods { // MARK Auth: Manage User Authentication Configuration + /** + * ### Create an embed secret using the specified information. + * + * The value of the `secret` field will be set by Looker and returned. + * + * POST /embed_config/secrets -> EmbedSecret + */ + public func create_embed_secret( + /** + * @param {WriteEmbedSecret} body + */ + body: WriteEmbedSecret?, + options: ITransportSettings? = nil + ) -> SDKResponse { + let result: SDKResponse = self.post("/embed_config/secrets", nil, try! self.encode(body), options) + return result + } + + /** + * ### Delete an embed secret. + * + * DELETE /embed_config/secrets/{embed_secret_id} -> String + */ + public func delete_embed_secret( + /** + * @param {Int64} embed_secret_id Id of Embed Secret + */ + _ embed_secret_id: Int64, + options: ITransportSettings? = nil + ) -> SDKResponse { + let path_embed_secret_id = encodeParam(embed_secret_id) + let result: SDKResponse = self.delete("/embed_config/secrets/\(path_embed_secret_id)", nil, nil, options) + return result + } + /** * ### Create SSO Embed URL * @@ -4216,6 +4251,62 @@ open class LookerSDKStream: APIMethods { + // MARK DerivedTable: View Derived Table graphs + + /** + * ### Discover information about derived tables + * + * GET /derived_table/graph/model/{model} -> DependencyGraph + */ + public func graph_derived_tables_for_model( + /** + * @param {String} model The name of the Lookml model. + */ + _ model: String, + /** + * @param {String} format The format of the graph. Valid values are [dot]. Default is `dot` + */ + format: String? = nil, + /** + * @param {String} color Color denoting the build status of the graph. Grey = not built, green = built, yellow = building, red = error. + */ + color: String? = nil, + options: ITransportSettings? = nil + ) -> SDKResponse { + let path_model = encodeParam(model) + let result: SDKResponse = self.get("/derived_table/graph/model/\(path_model)", + ["format": format, "color": color], nil, options) + return result + } + + /** + * ### Get the subgraph representing this derived table and its dependencies. + * + * GET /derived_table/graph/view/{view} -> DependencyGraph + */ + public func graph_derived_tables_for_view( + /** + * @param {String} view The derived table's view name. + */ + _ view: String, + /** + * @param {String} models The models where this derived table is defined. + */ + models: String? = nil, + /** + * @param {String} workspace The model directory to look in, either `dev` or `production`. + */ + workspace: String? = nil, + options: ITransportSettings? = nil + ) -> SDKResponse { + let path_view = encodeParam(view) + let result: SDKResponse = self.get("/derived_table/graph/view/\(path_view)", + ["models": models, "workspace": workspace], nil, options) + return result + } + + + // MARK Folder: Manage Folders /** @@ -5515,9 +5606,9 @@ open class LookerSDKStream: APIMethods { */ public func look( /** - * @param {Int64} look_id Id of look + * @param {String} look_id Id of look */ - _ look_id: Int64, + _ look_id: String, /** * @param {String} fields Requested fields. */ @@ -5556,9 +5647,9 @@ open class LookerSDKStream: APIMethods { */ public func update_look( /** - * @param {Int64} look_id Id of look + * @param {String} look_id Id of look */ - _ look_id: Int64, + _ look_id: String, /** * @param {WriteLookWithQuery} body */ @@ -5588,9 +5679,9 @@ open class LookerSDKStream: APIMethods { */ public func delete_look( /** - * @param {Int64} look_id Id of look + * @param {String} look_id Id of look */ - _ look_id: Int64, + _ look_id: String, options: ITransportSettings? = nil ) -> SDKResponse { let path_look_id = encodeParam(look_id) @@ -5624,9 +5715,9 @@ open class LookerSDKStream: APIMethods { */ public func run_look( /** - * @param {Int64} look_id Id of look + * @param {String} look_id Id of look */ - _ look_id: Int64, + _ look_id: String, /** * @param {String} result_format Format of result */ @@ -5701,9 +5792,9 @@ open class LookerSDKStream: APIMethods { */ public func copy_look( /** - * @param {Int64} look_id Look id to copy. + * @param {String} look_id Look id to copy. */ - _ look_id: Int64, + _ look_id: String, /** * @param {String} folder_id Folder id to copy to. */ @@ -5728,9 +5819,9 @@ open class LookerSDKStream: APIMethods { */ public func move_look( /** - * @param {Int64} look_id Look id to move. + * @param {String} look_id Look id to move. */ - _ look_id: Int64, + _ look_id: String, /** * @param {String} folder_id Folder id to move to. */ @@ -5747,32 +5838,6 @@ open class LookerSDKStream: APIMethods { // MARK LookmlModel: Manage LookML Models - /** - * ### Discover information about derived tables - * - * GET /derived_table/graph/model/{model} -> DependencyGraph - */ - public func graph_derived_tables_for_model( - /** - * @param {String} model The name of the Lookml model. - */ - _ model: String, - /** - * @param {String} format The format of the graph. Valid values are [dot]. Default is `dot` - */ - format: String? = nil, - /** - * @param {String} color Color denoting the build status of the graph. Grey = not built, green = built, yellow = building, red = error. - */ - color: String? = nil, - options: ITransportSettings? = nil - ) -> SDKResponse { - let path_model = encodeParam(model) - let result: SDKResponse = self.get("/derived_table/graph/model/\(path_model)", - ["format": format, "color": color], nil, options) - return result - } - /** * ### Get information about all lookml models. * @@ -7360,12 +7425,16 @@ open class LookerSDKStream: APIMethods { * @param {Bool} server_table_calcs Perform table calculations on query results */ server_table_calcs: Bool? = nil, + /** + * @param {String} source Specifies the source of this call. + */ + source: String? = nil, options: ITransportSettings? = nil ) -> SDKResponse { let path_query_id = encodeParam(query_id) let path_result_format = encodeParam(result_format) let result: SDKResponse = self.get("/queries/\(path_query_id)/run/\(path_result_format)", - ["limit": limit, "apply_formatting": apply_formatting as Any?, "apply_vis": apply_vis as Any?, "cache": cache as Any?, "image_width": image_width, "image_height": image_height, "generate_drill_links": generate_drill_links as Any?, "force_production": force_production as Any?, "cache_only": cache_only as Any?, "path_prefix": path_prefix, "rebuild_pdts": rebuild_pdts as Any?, "server_table_calcs": server_table_calcs as Any?], nil, options) + ["limit": limit, "apply_formatting": apply_formatting as Any?, "apply_vis": apply_vis as Any?, "cache": cache as Any?, "image_width": image_width, "image_height": image_height, "generate_drill_links": generate_drill_links as Any?, "force_production": force_production as Any?, "cache_only": cache_only as Any?, "path_prefix": path_prefix, "rebuild_pdts": rebuild_pdts as Any?, "server_table_calcs": server_table_calcs as Any?, "source": source], nil, options) return result } @@ -10306,17 +10375,13 @@ open class LookerSDKStream: APIMethods { /** * ### API 3 login information for the specified user. This is for the newer API keys that can be added for any user. * - * POST /users/{user_id}/credentials_api3 -> CredentialsApi3 + * POST /users/{user_id}/credentials_api3 -> CreateCredentialsApi3 */ public func create_user_credentials_api3( /** * @param {Int64} user_id id of user */ _ user_id: Int64, - /** - * @param {CredentialsApi3} body - */ - body: CredentialsApi3?, /** * @param {String} fields Requested fields. */ @@ -10325,7 +10390,7 @@ open class LookerSDKStream: APIMethods { ) -> SDKResponse { let path_user_id = encodeParam(user_id) let result: SDKResponse = self.post("/users/\(path_user_id)/credentials_api3", - ["fields": fields], try! self.encode(body), options) + ["fields": fields], nil, options) return result } diff --git a/yarn.lock b/yarn.lock index dcdeb47ce..3e712979c 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5476,9 +5476,9 @@ css-to-react-native@^3.0.0: postcss-value-parser "^4.0.2" "css-what@>= 5.0.1", css-what@^4.0.0: - version "5.0.1" - resolved "https://registry.yarnpkg.com/css-what/-/css-what-5.0.1.tgz#3efa820131f4669a8ac2408f9c32e7c7de9f4cad" - integrity sha512-FYDTSHb/7KXsWICVsxdmiExPjCfRC4qRFBdVwv7Ax9hMnvMmEjP9RfxTEZ3qPZGmADDn2vAKSo9UcN1jKVYscg== + version "5.1.0" + resolved "https://registry.yarnpkg.com/css-what/-/css-what-5.1.0.tgz#3f7b707aadf633baf62c2ceb8579b545bb40f7fe" + integrity sha512-arSMRWIIFY0hV8pIxZMEfmMI47Wj3R/aWpZDDxWYCPEiOMv6tfOrnpDtgxBYPEQD4V0Y/958+1TdC3iWTFcUPw== css.escape@^1.5.1: version "1.5.1"