diff --git a/csharp/rtl/Constants.cs b/csharp/rtl/Constants.cs index 691f7898e..7f52c9ef4 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 = "24.16"; + public const string LookerVersion = "24.18"; public const string Bearer = "Bearer"; public const string LookerAppiId = "x-looker-appid"; diff --git a/csharp/sdk/4.0/methods.cs b/csharp/sdk/4.0/methods.cs index 52963f276..3b3967d09 100644 --- a/csharp/sdk/4.0/methods.cs +++ b/csharp/sdk/4.0/methods.cs @@ -21,7 +21,7 @@ /// SOFTWARE. /// -/// 466 API methods +/// 467 API methods #nullable enable using System; @@ -4647,16 +4647,16 @@ public async Task> delete_folder( /// /// All personal folders will be returned. /// - /// GET /folders -> Folder[] + /// GET /folders -> FolderBase[] /// - /// Folder[] Folder (application/json) + /// FolderBase[] Folder (application/json) /// /// Requested fields. - public async Task> all_folders( + public async Task> all_folders( string? fields = null, ITransportSettings? options = null) { - return await AuthRequest(HttpMethod.Get, "/folders", new Values { + return await AuthRequest(HttpMethod.Get, "/folders", new Values { { "fields", fields }},null,options); } @@ -7033,11 +7033,11 @@ public async Task> query_task( /// will be in the message of the 400 error response, but not as detailed as expressed in `json_detail.errors`. /// These data formats can only carry row data, and error info is not row data. /// - /// GET /query_tasks/{query_task_id}/results -> QueryTask + /// GET /query_tasks/{query_task_id}/results -> string /// /// - /// QueryTask query_task (text) - /// QueryTask query_task (application/json) + /// string The query results. (text) + /// string The query results. (application/json) /// string The query is not finished (text) /// string The query is not finished (application/json) /// @@ -8109,6 +8109,7 @@ public async Task> create_role( /// Match role name. /// Match roles by built_in status. /// Combine given search criteria in a boolean OR expression. + /// Search for Looker support roles. public async Task> search_roles( string? fields = null, long? limit = null, @@ -8118,6 +8119,7 @@ public async Task> search_roles( string? name = null, bool? built_in = null, bool? filter_or = null, + bool? is_support_role = null, ITransportSettings? options = null) { return await AuthRequest(HttpMethod.Get, "/roles/search", new Values { @@ -8128,7 +8130,8 @@ public async Task> search_roles( { "id", id }, { "name", name }, { "built_in", built_in }, - { "filter_or", filter_or }},null,options); + { "filter_or", filter_or }, + { "is_support_role", is_support_role }},null,options); } /// ### Search roles include user count @@ -8580,6 +8583,76 @@ public async Task> scheduled_plan_run_once return await AuthRequest(HttpMethod.Post, "/scheduled_plans/run_once", null,body,options); } + /// ### Search Scheduled Plans + /// + /// Returns all scheduled plans which matches the given search criteria. + /// + /// If no user_id is provided, this function returns the scheduled plans owned by the caller. + /// + /// + /// To list all schedules for all users, pass `all_users=true`. + /// + /// + /// The caller must have `see_schedules` permission to see other users' scheduled plans. + /// + /// GET /scheduled_plans/search -> ScheduledPlan[] + /// + /// ScheduledPlan[] Scheduled Plan (application/json) + /// + /// Return scheduled plans belonging to this user_id. If not provided, returns scheduled plans owned by the caller. + /// Comma delimited list of field names. If provided, only the fields specified will be included in the response + /// Return scheduled plans belonging to all users (caller needs see_schedules permission) + /// Number of results to return. (used with offset and takes priority over page and per_page) + /// Number of results to skip before returning any. (used with limit and takes priority over page and per_page) + /// Fields to sort by. + /// Match Scheduled plan's name. + /// Returns scheduled plans belonging to user with this first name. + /// Returns scheduled plans belonging to user with this last name. + /// Returns scheduled plans created on this Dashboard. + /// Returns scheduled plans created on this Look. + /// Returns scheduled plans created on this LookML Dashboard. + /// Match recipient address. + /// Match scheduled plan's destination type. + /// Match scheduled plan's delivery format. + /// Combine given search criteria in a boolean OR expression + public async Task> search_scheduled_plans( + string? user_id = null, + string? fields = null, + bool? all_users = null, + long? limit = null, + long? offset = null, + string? sorts = null, + string? name = null, + string? user_first_name = null, + string? user_last_name = null, + string? dashboard_id = null, + string? look_id = null, + string? lookml_dashboard_id = null, + string? recipient = null, + string? destination_type = null, + string? delivery_format = null, + bool? filter_or = null, + ITransportSettings? options = null) +{ + return await AuthRequest(HttpMethod.Get, "/scheduled_plans/search", new Values { + { "user_id", user_id }, + { "fields", fields }, + { "all_users", all_users }, + { "limit", limit }, + { "offset", offset }, + { "sorts", sorts }, + { "name", name }, + { "user_first_name", user_first_name }, + { "user_last_name", user_last_name }, + { "dashboard_id", dashboard_id }, + { "look_id", look_id }, + { "lookml_dashboard_id", lookml_dashboard_id }, + { "recipient", recipient }, + { "destination_type", destination_type }, + { "delivery_format", delivery_format }, + { "filter_or", filter_or }},null,options); + } + /// ### Get Scheduled Plans for a Look /// /// Returns all scheduled plans for a look which belong to the caller or given user. @@ -8823,21 +8896,13 @@ public async Task> sql_interfa /// /// | result_format | Description /// | :-----------: | :--- | - /// | json | Plain json - /// | json_bi | (*RECOMMENDED*) Row data plus metadata describing the fields, pivots, table calcs, and other aspects of the query - /// | json_detail | (*LEGACY*) Row data plus metadata describing the fields, pivots, table calcs, and other aspects of the query - /// | csv | Comma separated values with a header - /// | txt | Tab separated values with a header - /// | html | Simple html - /// | md | Simple markdown - /// | xlsx | MS Excel spreadsheet - /// | sql | Returns the generated SQL rather than running the query + /// | json_bi | Row data plus metadata describing the fields, pivots, table calcs, and other aspects of the query /// - /// GET /sql_interface_queries/{query_id}/run/{result_format} -> QueryFormats + /// GET /sql_interface_queries/{query_id}/run/{result_format} -> JsonBi /// /// - /// QueryFormats Query Formats (text) - /// QueryFormats Query Formats (application/json) + /// JsonBi Query Result (text) + /// JsonBi Query Result (application/json) /// /// /// Integer id of query diff --git a/csharp/sdk/4.0/models.cs b/csharp/sdk/4.0/models.cs index ec746bde0..6c0d3415e 100644 --- a/csharp/sdk/4.0/models.cs +++ b/csharp/sdk/4.0/models.cs @@ -21,7 +21,7 @@ /// SOFTWARE. /// -/// 343 API models: 260 Spec, 0 Request, 61 Write, 22 Enum +/// 342 API models: 259 Spec, 0 Request, 61 Write, 22 Enum #nullable enable using System; @@ -595,6 +595,8 @@ public class ContentSearch : SdkModel public long? view_count { get; set; } = null; /// Preferred way of viewing the content (only applies to dashboards) (read-only) public string? preferred_viewer { get; set; } = null; + /// Name of the model the explore belongs to (read-only) + public string? model { get; set; } = null; } public class ContentSummary : SdkModel @@ -609,6 +611,8 @@ public class ContentSummary : SdkModel public string? content_id { get; set; } = null; /// Content slug (read-only) public string? content_slug { get; set; } = null; + /// Content url (read-only) + public string? content_url { get; set; } = null; /// Content title (read-only) public string? title { get; set; } = null; /// Content Description (read-only) @@ -1753,8 +1757,10 @@ public class DBConnection : SdkModel public bool? default_bq_connection { get; set; } = null; /// The project id of the default BigQuery storage project. public string? bq_storage_project_id { get; set; } = null; - /// When true, represents that all project roles have been verified. (read-only) + /// When true, represents that all project roles have been verified. public bool? bq_roles_verified { get; set; } = null; + /// The name of P4SA service account that is associated with the Looker instance (read-only) + public string? p4sa_name { get; set; } = null; } public class DBConnectionBase : SdkModel @@ -3090,6 +3096,8 @@ public class Look : SdkModel public string? folder_id { get; set; } = null; /// Time that the Look was updated. (read-only) public DateTime? updated_at { get; set; } = null; + /// Name of User that created the look. (read-only) + public string? user_name { get; set; } = null; /// Number of times viewed in the Looker web UI (read-only) public long? view_count { get; set; } = null; } @@ -3617,6 +3625,8 @@ public class LookWithDashboards : SdkModel public string? folder_id { get; set; } = null; /// Time that the Look was updated. (read-only) public DateTime? updated_at { get; set; } = null; + /// Name of User that created the look. (read-only) + public string? user_name { get; set; } = null; /// Number of times viewed in the Looker web UI (read-only) public long? view_count { get; set; } = null; /// Dashboards (read-only) @@ -3681,6 +3691,8 @@ public class LookWithQuery : SdkModel public string? folder_id { get; set; } = null; /// Time that the Look was updated. (read-only) public DateTime? updated_at { get; set; } = null; + /// Name of User that created the look. (read-only) + public string? user_name { get; set; } = null; /// Number of times viewed in the Looker web UI (read-only) public long? view_count { get; set; } = null; public Query? query { get; set; } @@ -4331,27 +4343,6 @@ public class Query : SdkModel public bool? has_table_calculations { get; set; } = null; } -public class QueryFormats : SdkModel -{ - public JsonBi? json_bi { get; set; } - /// (read-only) - public string? json { get; set; } = null; - /// (read-only) - public string? json_detail { get; set; } = null; - /// (read-only) - public string? csv { get; set; } = null; - /// (read-only) - public string? txt { get; set; } = null; - /// (read-only) - public string? html { get; set; } = null; - /// (read-only) - public string? md { get; set; } = null; - /// (read-only) - public string? xlsx { get; set; } = null; - /// (read-only) - public string? sql { get; set; } = null; -} - public class QueryTask : SdkModel { /// Operations the current user is able to perform on this object (read-only) @@ -5533,8 +5524,6 @@ public class User : SdkModel public bool? allow_roles_from_normal_groups { get; set; } = null; /// (Embed only) ID of user's group folder based on the external_group_id optionally specified during embed user login (read-only) public string? embed_group_folder_id { get; set; } = null; - /// User is an IAM Admin - only available in Looker (Google Cloud core) (read-only) - public bool? is_iam_admin { get; set; } = null; /// Link to get this item (read-only) public string? url { get; set; } = null; } @@ -6098,7 +6087,7 @@ public class WriteDashboardElement : SdkModel public string? dashboard_id { get; set; } = null; /// /// Dynamic writeable type for LookWithQuery removes: - /// can, content_metadata_id, id, content_favorite_id, created_at, deleted_at, deleter_id, embed_url, excel_file_url, favorite_count, google_spreadsheet_formula, image_embed_url, last_accessed_at, last_updater_id, last_viewed_at, model, public_slug, public_url, short_url, updated_at, view_count, url + /// can, content_metadata_id, id, content_favorite_id, created_at, deleted_at, deleter_id, embed_url, excel_file_url, favorite_count, google_spreadsheet_formula, image_embed_url, last_accessed_at, last_updater_id, last_viewed_at, model, public_slug, public_url, short_url, updated_at, user_name, view_count, url /// public WriteLookWithQuery? look { get; set; } /// Id Of Look @@ -6228,7 +6217,7 @@ public class WriteDatagroup : SdkModel } /// Dynamic writeable type for DBConnection removes: -/// can, dialect, snippets, pdts_enabled, uses_oauth, uses_instance_oauth, supports_data_studio_link, created_at, user_id, example, last_regen_at, last_reap_at, managed, default_bq_connection, bq_roles_verified +/// can, dialect, snippets, pdts_enabled, uses_oauth, uses_instance_oauth, supports_data_studio_link, created_at, user_id, example, last_regen_at, last_reap_at, managed, default_bq_connection, p4sa_name public class WriteDBConnection : SdkModel { /// Name of the connection. Also used as the unique identifier @@ -6316,6 +6305,8 @@ public class WriteDBConnection : SdkModel public bool? connection_pooling { get; set; } = null; /// The project id of the default BigQuery storage project. public string? bq_storage_project_id { get; set; } = null; + /// When true, represents that all project roles have been verified. + public bool? bq_roles_verified { get; set; } = null; } /// Dynamic writeable type for DBConnectionOverride removes: @@ -6550,7 +6541,7 @@ public class WriteLookmlModel : SdkModel } /// Dynamic writeable type for LookWithQuery removes: -/// can, content_metadata_id, id, content_favorite_id, created_at, deleted_at, deleter_id, embed_url, excel_file_url, favorite_count, google_spreadsheet_formula, image_embed_url, last_accessed_at, last_updater_id, last_viewed_at, model, public_slug, public_url, short_url, updated_at, view_count, url +/// can, content_metadata_id, id, content_favorite_id, created_at, deleted_at, deleter_id, embed_url, excel_file_url, favorite_count, google_spreadsheet_formula, image_embed_url, last_accessed_at, last_updater_id, last_viewed_at, model, public_slug, public_url, short_url, updated_at, user_name, view_count, url public class WriteLookWithQuery : SdkModel { /// Look Title @@ -7110,7 +7101,7 @@ public class WriteTheme : SdkModel } /// Dynamic writeable type for User removes: -/// can, avatar_url, avatar_url_without_sizing, credentials_api3, credentials_embed, credentials_google, credentials_ldap, credentials_looker_openid, credentials_oidc, credentials_saml, credentials_totp, display_name, email, embed_group_space_id, group_ids, id, looker_versions, personal_folder_id, presumed_looker_employee, role_ids, sessions, verified_looker_employee, roles_externally_managed, allow_direct_roles, allow_normal_group_membership, allow_roles_from_normal_groups, embed_group_folder_id, is_iam_admin, url +/// can, avatar_url, avatar_url_without_sizing, credentials_api3, credentials_embed, credentials_google, credentials_ldap, credentials_looker_openid, credentials_oidc, credentials_saml, credentials_totp, display_name, email, embed_group_space_id, group_ids, id, looker_versions, personal_folder_id, presumed_looker_employee, role_ids, sessions, verified_looker_employee, roles_externally_managed, allow_direct_roles, allow_normal_group_membership, allow_roles_from_normal_groups, embed_group_folder_id, url public class WriteUser : SdkModel { /// diff --git a/go/sdk/v4/methods.go b/go/sdk/v4/methods.go index 7cff06968..dc5d14a91 100644 --- a/go/sdk/v4/methods.go +++ b/go/sdk/v4/methods.go @@ -26,7 +26,7 @@ SOFTWARE. /* -466 API methods +467 API methods */ // NOTE: Do not edit this file generated by Looker SDK Codegen for API v4 @@ -3721,11 +3721,11 @@ func (l *LookerSDK) DeleteFolder( // // All personal folders will be returned. // -// GET /folders -> []Folder +// GET /folders -> []FolderBase func (l *LookerSDK) AllFolders( fields string, - options *rtl.ApiSettings) ([]Folder, error) { - var result []Folder + options *rtl.ApiSettings) ([]FolderBase, error) { + var result []FolderBase err := l.session.Do(&result, "GET", "/4.0", "/folders", map[string]interface{}{"fields": fields}, nil, options) return result, err @@ -5405,12 +5405,12 @@ func (l *LookerSDK) QueryTask( // will be in the message of the 400 error response, but not as detailed as expressed in `json_detail.errors`. // These data formats can only carry row data, and error info is not row data. // -// GET /query_tasks/{query_task_id}/results -> QueryTask +// GET /query_tasks/{query_task_id}/results -> string func (l *LookerSDK) QueryTaskResults( queryTaskId string, - options *rtl.ApiSettings) (QueryTask, error) { + options *rtl.ApiSettings) (string, error) { queryTaskId = url.PathEscape(queryTaskId) - var result QueryTask + var result string err := l.session.Do(&result, "GET", "/4.0", fmt.Sprintf("/query_tasks/%v/results", queryTaskId), nil, nil, options) return result, err @@ -6184,7 +6184,7 @@ func (l *LookerSDK) CreateRole( func (l *LookerSDK) SearchRoles(request RequestSearchRoles, options *rtl.ApiSettings) ([]Role, error) { var result []Role - err := l.session.Do(&result, "GET", "/4.0", "/roles/search", map[string]interface{}{"fields": request.Fields, "limit": request.Limit, "offset": request.Offset, "sorts": request.Sorts, "id": request.Id, "name": request.Name, "built_in": request.BuiltIn, "filter_or": request.FilterOr}, nil, options) + err := l.session.Do(&result, "GET", "/4.0", "/roles/search", map[string]interface{}{"fields": request.Fields, "limit": request.Limit, "offset": request.Offset, "sorts": request.Sorts, "id": request.Id, "name": request.Name, "built_in": request.BuiltIn, "filter_or": request.FilterOr, "is_support_role": request.IsSupportRole}, nil, options) return result, err } @@ -6561,6 +6561,25 @@ func (l *LookerSDK) ScheduledPlanRunOnce( } +// ### Search Scheduled Plans +// +// Returns all scheduled plans which matches the given search criteria. +// +// If no user_id is provided, this function returns the scheduled plans owned by the caller. +// +// To list all schedules for all users, pass `all_users=true`. +// +// The caller must have `see_schedules` permission to see other users' scheduled plans. +// +// GET /scheduled_plans/search -> []ScheduledPlan +func (l *LookerSDK) SearchScheduledPlans(request RequestSearchScheduledPlans, + options *rtl.ApiSettings) ([]ScheduledPlan, error) { + var result []ScheduledPlan + err := l.session.Do(&result, "GET", "/4.0", "/scheduled_plans/search", map[string]interface{}{"user_id": request.UserId, "fields": request.Fields, "all_users": request.AllUsers, "limit": request.Limit, "offset": request.Offset, "sorts": request.Sorts, "name": request.Name, "user_first_name": request.UserFirstName, "user_last_name": request.UserLastName, "dashboard_id": request.DashboardId, "look_id": request.LookId, "lookml_dashboard_id": request.LookmlDashboardId, "recipient": request.Recipient, "destination_type": request.DestinationType, "delivery_format": request.DeliveryFormat, "filter_or": request.FilterOr}, nil, options) + return result, err + +} + // ### Get Scheduled Plans for a Look // // Returns all scheduled plans for a look which belong to the caller or given user. @@ -6752,23 +6771,15 @@ func (l *LookerSDK) SqlInterfaceMetadata( // // | result_format | Description // | :-----------: | :--- | -// | json | Plain json -// | json_bi | (*RECOMMENDED*) Row data plus metadata describing the fields, pivots, table calcs, and other aspects of the query -// | json_detail | (*LEGACY*) Row data plus metadata describing the fields, pivots, table calcs, and other aspects of the query -// | csv | Comma separated values with a header -// | txt | Tab separated values with a header -// | html | Simple html -// | md | Simple markdown -// | xlsx | MS Excel spreadsheet -// | sql | Returns the generated SQL rather than running the query +// | json_bi | Row data plus metadata describing the fields, pivots, table calcs, and other aspects of the query // -// GET /sql_interface_queries/{query_id}/run/{result_format} -> QueryFormats +// GET /sql_interface_queries/{query_id}/run/{result_format} -> JsonBi func (l *LookerSDK) RunSqlInterfaceQuery( queryId int64, resultFormat string, - options *rtl.ApiSettings) (QueryFormats, error) { + options *rtl.ApiSettings) (JsonBi, error) { resultFormat = url.PathEscape(resultFormat) - var result QueryFormats + var result JsonBi err := l.session.Do(&result, "GET", "/4.0", fmt.Sprintf("/sql_interface_queries/%v/run/%v", queryId, resultFormat), nil, nil, options) return result, err diff --git a/go/sdk/v4/models.go b/go/sdk/v4/models.go index 108e5e6b4..589437002 100644 --- a/go/sdk/v4/models.go +++ b/go/sdk/v4/models.go @@ -26,7 +26,7 @@ SOFTWARE. /* -410 API models: 260 Spec, 68 Request, 60 Write, 22 Enum +410 API models: 259 Spec, 69 Request, 60 Write, 22 Enum */ // NOTE: Do not edit this file generated by Looker SDK Codegen for API v4 @@ -345,6 +345,7 @@ type ContentSearch struct { FolderName *string `json:"folder_name,omitempty"` // Name of the folder where the content is saved ViewCount *int64 `json:"view_count,omitempty"` // Number of times the content has been viewed PreferredViewer *string `json:"preferred_viewer,omitempty"` // Preferred way of viewing the content (only applies to dashboards) + Model *string `json:"model,omitempty"` // Name of the model the explore belongs to } type ContentSummary struct { @@ -353,6 +354,7 @@ type ContentSummary struct { ContentType *string `json:"content_type,omitempty"` // Content type ContentId *string `json:"content_id,omitempty"` // Content id ContentSlug *string `json:"content_slug,omitempty"` // Content slug + ContentUrl *string `json:"content_url,omitempty"` // Content url Title *string `json:"title,omitempty"` // Content title Description *string `json:"description,omitempty"` // Content Description LastViewedAt *time.Time `json:"last_viewed_at,omitempty"` // Last time viewed by current user @@ -993,6 +995,7 @@ type DBConnection struct { DefaultBqConnection *bool `json:"default_bq_connection,omitempty"` // When true, represents that this connection is the default BQ connection. BqStorageProjectId *string `json:"bq_storage_project_id,omitempty"` // The project id of the default BigQuery storage project. BqRolesVerified *bool `json:"bq_roles_verified,omitempty"` // When true, represents that all project roles have been verified. + P4saName *string `json:"p4sa_name,omitempty"` // The name of P4SA service account that is associated with the Looker instance } type DBConnectionBase struct { @@ -1732,6 +1735,7 @@ type Look struct { Folder *FolderBase `json:"folder,omitempty"` FolderId *string `json:"folder_id,omitempty"` // Folder Id UpdatedAt *time.Time `json:"updated_at,omitempty"` // Time that the Look was updated. + UserName *string `json:"user_name,omitempty"` // Name of User that created the look. ViewCount *int64 `json:"view_count,omitempty"` // Number of times viewed in the Looker web UI } @@ -2019,6 +2023,7 @@ type LookWithDashboards struct { Folder *FolderBase `json:"folder,omitempty"` FolderId *string `json:"folder_id,omitempty"` // Folder Id UpdatedAt *time.Time `json:"updated_at,omitempty"` // Time that the Look was updated. + UserName *string `json:"user_name,omitempty"` // Name of User that created the look. ViewCount *int64 `json:"view_count,omitempty"` // Number of times viewed in the Looker web UI Dashboards *[]DashboardBase `json:"dashboards,omitempty"` // Dashboards } @@ -2053,6 +2058,7 @@ type LookWithQuery struct { Folder *FolderBase `json:"folder,omitempty"` FolderId *string `json:"folder_id,omitempty"` // Folder Id UpdatedAt *time.Time `json:"updated_at,omitempty"` // Time that the Look was updated. + UserName *string `json:"user_name,omitempty"` // Name of User that created the look. ViewCount *int64 `json:"view_count,omitempty"` // Number of times viewed in the Looker web UI Query *Query `json:"query,omitempty"` Url *string `json:"url,omitempty"` // Url @@ -2414,18 +2420,6 @@ type Query struct { HasTableCalculations *bool `json:"has_table_calculations,omitempty"` // Has Table Calculations } -type QueryFormats struct { - JsonBi *JsonBi `json:"json_bi,omitempty"` - Json *string `json:"json,omitempty"` - JsonDetail *string `json:"json_detail,omitempty"` - Csv *string `json:"csv,omitempty"` - Txt *string `json:"txt,omitempty"` - Html *string `json:"html,omitempty"` - Md *string `json:"md,omitempty"` - Xlsx *string `json:"xlsx,omitempty"` - Sql *string `json:"sql,omitempty"` -} - type QueryTask struct { Can *map[string]bool `json:"can,omitempty"` // Operations the current user is able to perform on this object Id *string `json:"id,omitempty"` // Unique Id @@ -3108,14 +3102,15 @@ type RequestSearchPermissionSets struct { // Dynamically generated request type for search_roles type RequestSearchRoles struct { - Fields *string `json:"fields,omitempty"` // Requested fields. - Limit *int64 `json:"limit,omitempty"` // Number of results to return (used with `offset`). - Offset *int64 `json:"offset,omitempty"` // Number of results to skip before returning any (used with `limit`). - Sorts *string `json:"sorts,omitempty"` // Fields to sort by. - Id *string `json:"id,omitempty"` // Match role id. - Name *string `json:"name,omitempty"` // Match role name. - BuiltIn *bool `json:"built_in,omitempty"` // Match roles by built_in status. - FilterOr *bool `json:"filter_or,omitempty"` // Combine given search criteria in a boolean OR expression. + Fields *string `json:"fields,omitempty"` // Requested fields. + Limit *int64 `json:"limit,omitempty"` // Number of results to return (used with `offset`). + Offset *int64 `json:"offset,omitempty"` // Number of results to skip before returning any (used with `limit`). + Sorts *string `json:"sorts,omitempty"` // Fields to sort by. + Id *string `json:"id,omitempty"` // Match role id. + Name *string `json:"name,omitempty"` // Match role name. + BuiltIn *bool `json:"built_in,omitempty"` // Match roles by built_in status. + FilterOr *bool `json:"filter_or,omitempty"` // Combine given search criteria in a boolean OR expression. + IsSupportRole *bool `json:"is_support_role,omitempty"` // Search for Looker support roles. } // Dynamically generated request type for search_roles_with_user_count @@ -3130,6 +3125,26 @@ type RequestSearchRolesWithUserCount struct { FilterOr *bool `json:"filter_or,omitempty"` // Combine given search criteria in a boolean OR expression. } +// Dynamically generated request type for search_scheduled_plans +type RequestSearchScheduledPlans struct { + UserId *string `json:"user_id,omitempty"` // Return scheduled plans belonging to this user_id. If not provided, returns scheduled plans owned by the caller. + Fields *string `json:"fields,omitempty"` // Comma delimited list of field names. If provided, only the fields specified will be included in the response + AllUsers *bool `json:"all_users,omitempty"` // Return scheduled plans belonging to all users (caller needs see_schedules permission) + Limit *int64 `json:"limit,omitempty"` // Number of results to return. (used with offset and takes priority over page and per_page) + Offset *int64 `json:"offset,omitempty"` // Number of results to skip before returning any. (used with limit and takes priority over page and per_page) + Sorts *string `json:"sorts,omitempty"` // Fields to sort by. + Name *string `json:"name,omitempty"` // Match Scheduled plan's name. + UserFirstName *string `json:"user_first_name,omitempty"` // Returns scheduled plans belonging to user with this first name. + UserLastName *string `json:"user_last_name,omitempty"` // Returns scheduled plans belonging to user with this last name. + DashboardId *string `json:"dashboard_id,omitempty"` // Returns scheduled plans created on this Dashboard. + LookId *string `json:"look_id,omitempty"` // Returns scheduled plans created on this Look. + LookmlDashboardId *string `json:"lookml_dashboard_id,omitempty"` // Returns scheduled plans created on this LookML Dashboard. + Recipient *string `json:"recipient,omitempty"` // Match recipient address. + DestinationType *string `json:"destination_type,omitempty"` // Match scheduled plan's destination type. + DeliveryFormat *string `json:"delivery_format,omitempty"` // Match scheduled plan's delivery format. + FilterOr *bool `json:"filter_or,omitempty"` // Combine given search criteria in a boolean OR expression +} + // Dynamically generated request type for search_themes type RequestSearchThemes struct { Id *string `json:"id,omitempty"` // Match theme id. @@ -3827,7 +3842,6 @@ type User struct { AllowNormalGroupMembership *bool `json:"allow_normal_group_membership,omitempty"` // User can be a direct member of a normal Looker group. AllowRolesFromNormalGroups *bool `json:"allow_roles_from_normal_groups,omitempty"` // User can inherit roles from a normal Looker group. EmbedGroupFolderId *string `json:"embed_group_folder_id,omitempty"` // (Embed only) ID of user's group folder based on the external_group_id optionally specified during embed user login - IsIamAdmin *bool `json:"is_iam_admin,omitempty"` // User is an IAM Admin - only available in Looker (Google Cloud core) Url *string `json:"url,omitempty"` // Link to get this item } @@ -4150,7 +4164,7 @@ type WriteDashboardElement struct { BodyText *string `json:"body_text,omitempty"` // Text tile body text DashboardId *string `json:"dashboard_id,omitempty"` // Id of Dashboard Look *WriteLookWithQuery `json:"look,omitempty"` // Dynamic writeable type for LookWithQuery removes: - // can, content_metadata_id, id, content_favorite_id, created_at, deleted_at, deleter_id, embed_url, excel_file_url, favorite_count, google_spreadsheet_formula, image_embed_url, last_accessed_at, last_updater_id, last_viewed_at, model, public_slug, public_url, short_url, updated_at, view_count, url + // can, content_metadata_id, id, content_favorite_id, created_at, deleted_at, deleter_id, embed_url, excel_file_url, favorite_count, google_spreadsheet_formula, image_embed_url, last_accessed_at, last_updater_id, last_viewed_at, model, public_slug, public_url, short_url, updated_at, user_name, view_count, url LookId *string `json:"look_id,omitempty"` // Id Of Look MergeResultId *string `json:"merge_result_id,omitempty"` // ID of merge result NoteDisplay *string `json:"note_display,omitempty"` // Note Display @@ -4225,7 +4239,7 @@ type WriteDatagroup struct { } // Dynamic writeable type for DBConnection removes: -// can, dialect, snippets, pdts_enabled, uses_oauth, uses_instance_oauth, supports_data_studio_link, created_at, user_id, example, last_regen_at, last_reap_at, managed, default_bq_connection, bq_roles_verified +// can, dialect, snippets, pdts_enabled, uses_oauth, uses_instance_oauth, supports_data_studio_link, created_at, user_id, example, last_regen_at, last_reap_at, managed, default_bq_connection, p4sa_name type WriteDBConnection struct { Name *string `json:"name,omitempty"` // Name of the connection. Also used as the unique identifier Host *string `json:"host,omitempty"` // Host name/address of server; or the string 'localhost' in case of a connection over an SSH tunnel. @@ -4269,6 +4283,7 @@ type WriteDBConnection struct { PdtApiControlEnabled *bool `json:"pdt_api_control_enabled,omitempty"` // PDT builds on this connection can be kicked off and cancelled via API. ConnectionPooling *bool `json:"connection_pooling,omitempty"` // Enable database connection pooling. BqStorageProjectId *string `json:"bq_storage_project_id,omitempty"` // The project id of the default BigQuery storage project. + BqRolesVerified *bool `json:"bq_roles_verified,omitempty"` // When true, represents that all project roles have been verified. } // Dynamic writeable type for DBConnectionOverride removes: @@ -4415,7 +4430,7 @@ type WriteLookmlModel struct { } // Dynamic writeable type for LookWithQuery removes: -// can, content_metadata_id, id, content_favorite_id, created_at, deleted_at, deleter_id, embed_url, excel_file_url, favorite_count, google_spreadsheet_formula, image_embed_url, last_accessed_at, last_updater_id, last_viewed_at, model, public_slug, public_url, short_url, updated_at, view_count, url +// can, content_metadata_id, id, content_favorite_id, created_at, deleted_at, deleter_id, embed_url, excel_file_url, favorite_count, google_spreadsheet_formula, image_embed_url, last_accessed_at, last_updater_id, last_viewed_at, model, public_slug, public_url, short_url, updated_at, user_name, view_count, url type WriteLookWithQuery struct { Title *string `json:"title,omitempty"` // Look Title UserId *string `json:"user_id,omitempty"` // User Id @@ -4738,7 +4753,7 @@ type WriteTheme struct { } // Dynamic writeable type for User removes: -// can, avatar_url, avatar_url_without_sizing, credentials_api3, credentials_embed, credentials_google, credentials_ldap, credentials_looker_openid, credentials_oidc, credentials_saml, credentials_totp, display_name, email, embed_group_space_id, group_ids, id, looker_versions, personal_folder_id, presumed_looker_employee, role_ids, sessions, verified_looker_employee, roles_externally_managed, allow_direct_roles, allow_normal_group_membership, allow_roles_from_normal_groups, embed_group_folder_id, is_iam_admin, url +// can, avatar_url, avatar_url_without_sizing, credentials_api3, credentials_embed, credentials_google, credentials_ldap, credentials_looker_openid, credentials_oidc, credentials_saml, credentials_totp, display_name, email, embed_group_space_id, group_ids, id, looker_versions, personal_folder_id, presumed_looker_employee, role_ids, sessions, verified_looker_employee, roles_externally_managed, allow_direct_roles, allow_normal_group_membership, allow_roles_from_normal_groups, embed_group_folder_id, url type WriteUser struct { CredentialsEmail *WriteCredentialsEmail `json:"credentials_email,omitempty"` // Dynamic writeable type for CredentialsEmail removes: // can, created_at, user_id, is_disabled, logged_in_at, password_reset_url, account_setup_url, password_reset_url_expired, account_setup_url_expired, type, url, user_url 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 2941da884..f83416e3e 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 @@ */ /** - * 466 API methods + * 467 API methods */ // NOTE: Do not edit this file generated by Looker SDK Codegen for API 4.0 @@ -4723,12 +4723,12 @@ class LookerSDK(authSession: AuthSession) : APIMethods(authSession) { * * @param {String} fields Requested fields. * - * GET /folders -> Array + * GET /folders -> Array */ @JvmOverloads fun all_folders( fields: String? = null, ): SDKResponse { - return this.get>( + return this.get>( "/folders", mapOf("fields" to fields), ) @@ -7188,13 +7188,13 @@ class LookerSDK(authSession: AuthSession) : APIMethods(authSession) { * * @param {String} query_task_id ID of the Query Task * - * GET /query_tasks/{query_task_id}/results -> QueryTask + * GET /query_tasks/{query_task_id}/results -> String */ fun query_task_results( query_task_id: String, ): SDKResponse { val path_query_task_id = encodeParam(query_task_id) - return this.get("/query_tasks/${path_query_task_id}/results", mapOf()) + return this.get("/query_tasks/${path_query_task_id}/results", mapOf()) } /** @@ -8264,6 +8264,7 @@ class LookerSDK(authSession: AuthSession) : APIMethods(authSession) { * @param {String} name Match role name. * @param {Boolean} built_in Match roles by built_in status. * @param {Boolean} filter_or Combine given search criteria in a boolean OR expression. + * @param {Boolean} is_support_role Search for Looker support roles. * * GET /roles/search -> Array */ @@ -8276,6 +8277,7 @@ class LookerSDK(authSession: AuthSession) : APIMethods(authSession) { name: String? = null, built_in: Boolean? = null, filter_or: Boolean? = null, + is_support_role: Boolean? = null, ): SDKResponse { return this.get>( "/roles/search", @@ -8288,6 +8290,7 @@ class LookerSDK(authSession: AuthSession) : APIMethods(authSession) { "name" to name, "built_in" to built_in, "filter_or" to filter_or, + "is_support_role" to is_support_role, ), ) } @@ -8750,6 +8753,79 @@ class LookerSDK(authSession: AuthSession) : APIMethods(authSession) { return this.post("/scheduled_plans/run_once", mapOf(), body) } + /** + * ### Search Scheduled Plans + * + * Returns all scheduled plans which matches the given search criteria. + * + * If no user_id is provided, this function returns the scheduled plans owned by the caller. + * + * + * To list all schedules for all users, pass `all_users=true`. + * + * + * The caller must have `see_schedules` permission to see other users' scheduled plans. + * + * @param {String} user_id Return scheduled plans belonging to this user_id. If not provided, returns scheduled plans owned by the caller. + * @param {String} fields Comma delimited list of field names. If provided, only the fields specified will be included in the response + * @param {Boolean} all_users Return scheduled plans belonging to all users (caller needs see_schedules permission) + * @param {Long} limit Number of results to return. (used with offset and takes priority over page and per_page) + * @param {Long} offset Number of results to skip before returning any. (used with limit and takes priority over page and per_page) + * @param {String} sorts Fields to sort by. + * @param {String} name Match Scheduled plan's name. + * @param {String} user_first_name Returns scheduled plans belonging to user with this first name. + * @param {String} user_last_name Returns scheduled plans belonging to user with this last name. + * @param {String} dashboard_id Returns scheduled plans created on this Dashboard. + * @param {String} look_id Returns scheduled plans created on this Look. + * @param {String} lookml_dashboard_id Returns scheduled plans created on this LookML Dashboard. + * @param {String} recipient Match recipient address. + * @param {String} destination_type Match scheduled plan's destination type. + * @param {String} delivery_format Match scheduled plan's delivery format. + * @param {Boolean} filter_or Combine given search criteria in a boolean OR expression + * + * GET /scheduled_plans/search -> Array + */ + @JvmOverloads fun search_scheduled_plans( + user_id: String? = null, + fields: String? = null, + all_users: Boolean? = null, + limit: Long? = null, + offset: Long? = null, + sorts: String? = null, + name: String? = null, + user_first_name: String? = null, + user_last_name: String? = null, + dashboard_id: String? = null, + look_id: String? = null, + lookml_dashboard_id: String? = null, + recipient: String? = null, + destination_type: String? = null, + delivery_format: String? = null, + filter_or: Boolean? = null, + ): SDKResponse { + return this.get>( + "/scheduled_plans/search", + mapOf( + "user_id" to user_id, + "fields" to fields, + "all_users" to all_users, + "limit" to limit, + "offset" to offset, + "sorts" to sorts, + "name" to name, + "user_first_name" to user_first_name, + "user_last_name" to user_last_name, + "dashboard_id" to dashboard_id, + "look_id" to look_id, + "lookml_dashboard_id" to lookml_dashboard_id, + "recipient" to recipient, + "destination_type" to destination_type, + "delivery_format" to delivery_format, + "filter_or" to filter_or, + ), + ) + } + /** * ### Get Scheduled Plans for a Look * @@ -9001,20 +9077,12 @@ class LookerSDK(authSession: AuthSession) : APIMethods(authSession) { * * | result_format | Description * | :-----------: | :--- | - * | json | Plain json - * | json_bi | (*RECOMMENDED*) Row data plus metadata describing the fields, pivots, table calcs, and other aspects of the query - * | json_detail | (*LEGACY*) Row data plus metadata describing the fields, pivots, table calcs, and other aspects of the query - * | csv | Comma separated values with a header - * | txt | Tab separated values with a header - * | html | Simple html - * | md | Simple markdown - * | xlsx | MS Excel spreadsheet - * | sql | Returns the generated SQL rather than running the query + * | json_bi | Row data plus metadata describing the fields, pivots, table calcs, and other aspects of the query * * @param {Long} query_id Integer id of query * @param {String} result_format Format of result, options are: ["json_bi"] * - * GET /sql_interface_queries/{query_id}/run/{result_format} -> QueryFormats + * GET /sql_interface_queries/{query_id}/run/{result_format} -> JsonBi */ fun run_sql_interface_query( query_id: Long, @@ -9022,7 +9090,7 @@ class LookerSDK(authSession: AuthSession) : APIMethods(authSession) { ): SDKResponse { val path_query_id = encodeParam(query_id) val path_result_format = encodeParam(result_format) - return this.get("/sql_interface_queries/${path_query_id}/run/${path_result_format}", mapOf()) + return this.get("/sql_interface_queries/${path_query_id}/run/${path_result_format}", mapOf()) } /** 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 b6872f901..cfe8bf8c5 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 @@ */ /** - * 343 API models: 260 Spec, 0 Request, 61 Write, 22 Enum + * 342 API models: 259 Spec, 0 Request, 61 Write, 22 Enum */ // NOTE: Do not edit this file generated by Looker SDK Codegen for API 4.0 @@ -600,6 +600,7 @@ data class ContentMetaGroupUser( * @property folder_name Name of the folder where the content is saved (read-only) * @property view_count Number of times the content has been viewed (read-only) * @property preferred_viewer Preferred way of viewing the content (only applies to dashboards) (read-only) + * @property model Name of the model the explore belongs to (read-only) */ data class ContentSearch( var can: Map? = null, @@ -611,6 +612,7 @@ data class ContentSearch( var folder_name: String? = null, var view_count: Long? = null, var preferred_viewer: String? = null, + var model: String? = null, ) : Serializable /** @@ -619,6 +621,7 @@ data class ContentSearch( * @property content_type Content type (read-only) * @property content_id Content id (read-only) * @property content_slug Content slug (read-only) + * @property content_url Content url (read-only) * @property title Content title (read-only) * @property description Content Description (read-only) * @property last_viewed_at Last time viewed by current user (read-only) @@ -639,6 +642,7 @@ data class ContentSummary( var content_type: String? = null, var content_id: String? = null, var content_slug: String? = null, + var content_url: String? = null, var title: String? = null, var description: String? = null, var last_viewed_at: Date? = null, @@ -1795,7 +1799,8 @@ data class Datagroup( * @property connection_pooling Enable database connection pooling. * @property default_bq_connection When true, represents that this connection is the default BQ connection. (read-only) * @property bq_storage_project_id The project id of the default BigQuery storage project. - * @property bq_roles_verified When true, represents that all project roles have been verified. (read-only) + * @property bq_roles_verified When true, represents that all project roles have been verified. + * @property p4sa_name The name of P4SA service account that is associated with the Looker instance (read-only) */ data class DBConnection( var can: Map? = null, @@ -1854,6 +1859,7 @@ data class DBConnection( var default_bq_connection: Boolean? = null, var bq_storage_project_id: String? = null, var bq_roles_verified: Boolean? = null, + var p4sa_name: String? = null, ) : Serializable /** @@ -3224,6 +3230,7 @@ data class LocalizationSettings( * @property folder * @property folder_id Folder Id * @property updated_at Time that the Look was updated. (read-only) + * @property user_name Name of User that created the look. (read-only) * @property view_count Number of times viewed in the Looker web UI (read-only) */ data class Look( @@ -3256,6 +3263,7 @@ data class Look( var folder: FolderBase? = null, var folder_id: String? = null, var updated_at: Date? = null, + var user_name: String? = null, var view_count: Long? = null, ) : Serializable @@ -3774,6 +3782,7 @@ data class LookModel( * @property folder * @property folder_id Folder Id * @property updated_at Time that the Look was updated. (read-only) + * @property user_name Name of User that created the look. (read-only) * @property view_count Number of times viewed in the Looker web UI (read-only) * @property dashboards Dashboards (read-only) */ @@ -3807,6 +3816,7 @@ data class LookWithDashboards( var folder: FolderBase? = null, var folder_id: String? = null, var updated_at: Date? = null, + var user_name: String? = null, var view_count: Long? = null, var dashboards: Array? = null, ) : Serializable @@ -3841,6 +3851,7 @@ data class LookWithDashboards( * @property folder * @property folder_id Folder Id * @property updated_at Time that the Look was updated. (read-only) + * @property user_name Name of User that created the look. (read-only) * @property view_count Number of times viewed in the Looker web UI (read-only) * @property query * @property url Url (read-only) @@ -3875,6 +3886,7 @@ data class LookWithQuery( var folder: FolderBase? = null, var folder_id: String? = null, var updated_at: Date? = null, + var user_name: String? = null, var view_count: Long? = null, var query: Query? = null, var url: String? = null, @@ -4544,29 +4556,6 @@ data class Query( var has_table_calculations: Boolean? = null, ) : Serializable -/** - * @property json_bi - * @property json (read-only) - * @property json_detail (read-only) - * @property csv (read-only) - * @property txt (read-only) - * @property html (read-only) - * @property md (read-only) - * @property xlsx (read-only) - * @property sql (read-only) - */ -data class QueryFormats( - var json_bi: JsonBi? = null, - var json: String? = null, - var json_detail: String? = null, - var csv: String? = null, - var txt: String? = null, - var html: String? = null, - var md: String? = null, - var xlsx: String? = null, - 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) @@ -5750,7 +5739,6 @@ data class UpdateFolder( * @property allow_normal_group_membership User can be a direct member of a normal Looker group. (read-only) * @property allow_roles_from_normal_groups User can inherit roles from a normal Looker group. (read-only) * @property embed_group_folder_id (Embed only) ID of user's group folder based on the external_group_id optionally specified during embed user login (read-only) - * @property is_iam_admin User is an IAM Admin - only available in Looker (Google Cloud core) (read-only) * @property url Link to get this item (read-only) */ data class User( @@ -5789,7 +5777,6 @@ data class User( var allow_normal_group_membership: Boolean? = null, var allow_roles_from_normal_groups: Boolean? = null, var embed_group_folder_id: String? = null, - var is_iam_admin: Boolean? = null, var url: String? = null, ) : Serializable @@ -6367,7 +6354,7 @@ data class WriteDashboardBase( * @property body_text Text tile body text * @property dashboard_id Id of Dashboard * @property look Dynamic writeable type for LookWithQuery removes: - * can, content_metadata_id, id, content_favorite_id, created_at, deleted_at, deleter_id, embed_url, excel_file_url, favorite_count, google_spreadsheet_formula, image_embed_url, last_accessed_at, last_updater_id, last_viewed_at, model, public_slug, public_url, short_url, updated_at, view_count, url + * can, content_metadata_id, id, content_favorite_id, created_at, deleted_at, deleter_id, embed_url, excel_file_url, favorite_count, google_spreadsheet_formula, image_embed_url, last_accessed_at, last_updater_id, last_viewed_at, model, public_slug, public_url, short_url, updated_at, user_name, view_count, url * @property look_id Id Of Look * @property merge_result_id ID of merge result * @property note_display Note Display @@ -6507,7 +6494,7 @@ data class WriteDatagroup( /** * Dynamic writeable type for DBConnection removes: - * can, dialect, snippets, pdts_enabled, uses_oauth, uses_instance_oauth, supports_data_studio_link, created_at, user_id, example, last_regen_at, last_reap_at, managed, default_bq_connection, bq_roles_verified + * can, dialect, snippets, pdts_enabled, uses_oauth, uses_instance_oauth, supports_data_studio_link, created_at, user_id, example, last_regen_at, last_reap_at, managed, default_bq_connection, p4sa_name * * @property name Name of the connection. Also used as the unique identifier * @property host Host name/address of server; or the string 'localhost' in case of a connection over an SSH tunnel. @@ -6551,6 +6538,7 @@ data class WriteDatagroup( * @property pdt_api_control_enabled PDT builds on this connection can be kicked off and cancelled via API. * @property connection_pooling Enable database connection pooling. * @property bq_storage_project_id The project id of the default BigQuery storage project. + * @property bq_roles_verified When true, represents that all project roles have been verified. */ data class WriteDBConnection( var name: String? = null, @@ -6594,6 +6582,7 @@ data class WriteDBConnection( var pdt_api_control_enabled: Boolean? = null, var connection_pooling: Boolean? = null, var bq_storage_project_id: String? = null, + var bq_roles_verified: Boolean? = null, ) : Serializable /** @@ -6856,7 +6845,7 @@ data class WriteLookmlModel( /** * Dynamic writeable type for LookWithQuery removes: - * can, content_metadata_id, id, content_favorite_id, created_at, deleted_at, deleter_id, embed_url, excel_file_url, favorite_count, google_spreadsheet_formula, image_embed_url, last_accessed_at, last_updater_id, last_viewed_at, model, public_slug, public_url, short_url, updated_at, view_count, url + * can, content_metadata_id, id, content_favorite_id, created_at, deleted_at, deleter_id, embed_url, excel_file_url, favorite_count, google_spreadsheet_formula, image_embed_url, last_accessed_at, last_updater_id, last_viewed_at, model, public_slug, public_url, short_url, updated_at, user_name, view_count, url * * @property title Look Title * @property user_id User Id @@ -7452,7 +7441,7 @@ data class WriteTheme( /** * Dynamic writeable type for User removes: - * can, avatar_url, avatar_url_without_sizing, credentials_api3, credentials_embed, credentials_google, credentials_ldap, credentials_looker_openid, credentials_oidc, credentials_saml, credentials_totp, display_name, email, embed_group_space_id, group_ids, id, looker_versions, personal_folder_id, presumed_looker_employee, role_ids, sessions, verified_looker_employee, roles_externally_managed, allow_direct_roles, allow_normal_group_membership, allow_roles_from_normal_groups, embed_group_folder_id, is_iam_admin, url + * can, avatar_url, avatar_url_without_sizing, credentials_api3, credentials_embed, credentials_google, credentials_ldap, credentials_looker_openid, credentials_oidc, credentials_saml, credentials_totp, display_name, email, embed_group_space_id, group_ids, id, looker_versions, personal_folder_id, presumed_looker_employee, role_ids, sessions, verified_looker_employee, roles_externally_managed, allow_direct_roles, allow_normal_group_membership, allow_roles_from_normal_groups, embed_group_folder_id, url * * @property credentials_email Dynamic writeable type for CredentialsEmail removes: * can, created_at, user_id, is_disabled, logged_in_at, password_reset_url, account_setup_url, password_reset_url_expired, account_setup_url_expired, type, url, user_url 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 1431f5b25..25a4d1f05 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 @@ */ /** - * 466 API methods + * 467 API methods */ // NOTE: Do not edit this file generated by Looker SDK Codegen for API 4.0 @@ -8262,6 +8262,7 @@ class LookerSDKStream(authSession: AuthSession) : APIMethods(authSession) { * @param {String} name Match role name. * @param {Boolean} built_in Match roles by built_in status. * @param {Boolean} filter_or Combine given search criteria in a boolean OR expression. + * @param {Boolean} is_support_role Search for Looker support roles. * * GET /roles/search -> ByteArray */ @@ -8274,6 +8275,7 @@ class LookerSDKStream(authSession: AuthSession) : APIMethods(authSession) { name: String? = null, built_in: Boolean? = null, filter_or: Boolean? = null, + is_support_role: Boolean? = null, ): SDKResponse { return this.get( "/roles/search", @@ -8286,6 +8288,7 @@ class LookerSDKStream(authSession: AuthSession) : APIMethods(authSession) { "name" to name, "built_in" to built_in, "filter_or" to filter_or, + "is_support_role" to is_support_role, ), ) } @@ -8748,6 +8751,79 @@ class LookerSDKStream(authSession: AuthSession) : APIMethods(authSession) { return this.post("/scheduled_plans/run_once", mapOf(), body) } + /** + * ### Search Scheduled Plans + * + * Returns all scheduled plans which matches the given search criteria. + * + * If no user_id is provided, this function returns the scheduled plans owned by the caller. + * + * + * To list all schedules for all users, pass `all_users=true`. + * + * + * The caller must have `see_schedules` permission to see other users' scheduled plans. + * + * @param {String} user_id Return scheduled plans belonging to this user_id. If not provided, returns scheduled plans owned by the caller. + * @param {String} fields Comma delimited list of field names. If provided, only the fields specified will be included in the response + * @param {Boolean} all_users Return scheduled plans belonging to all users (caller needs see_schedules permission) + * @param {Long} limit Number of results to return. (used with offset and takes priority over page and per_page) + * @param {Long} offset Number of results to skip before returning any. (used with limit and takes priority over page and per_page) + * @param {String} sorts Fields to sort by. + * @param {String} name Match Scheduled plan's name. + * @param {String} user_first_name Returns scheduled plans belonging to user with this first name. + * @param {String} user_last_name Returns scheduled plans belonging to user with this last name. + * @param {String} dashboard_id Returns scheduled plans created on this Dashboard. + * @param {String} look_id Returns scheduled plans created on this Look. + * @param {String} lookml_dashboard_id Returns scheduled plans created on this LookML Dashboard. + * @param {String} recipient Match recipient address. + * @param {String} destination_type Match scheduled plan's destination type. + * @param {String} delivery_format Match scheduled plan's delivery format. + * @param {Boolean} filter_or Combine given search criteria in a boolean OR expression + * + * GET /scheduled_plans/search -> ByteArray + */ + @JvmOverloads fun search_scheduled_plans( + user_id: String? = null, + fields: String? = null, + all_users: Boolean? = null, + limit: Long? = null, + offset: Long? = null, + sorts: String? = null, + name: String? = null, + user_first_name: String? = null, + user_last_name: String? = null, + dashboard_id: String? = null, + look_id: String? = null, + lookml_dashboard_id: String? = null, + recipient: String? = null, + destination_type: String? = null, + delivery_format: String? = null, + filter_or: Boolean? = null, + ): SDKResponse { + return this.get( + "/scheduled_plans/search", + mapOf( + "user_id" to user_id, + "fields" to fields, + "all_users" to all_users, + "limit" to limit, + "offset" to offset, + "sorts" to sorts, + "name" to name, + "user_first_name" to user_first_name, + "user_last_name" to user_last_name, + "dashboard_id" to dashboard_id, + "look_id" to look_id, + "lookml_dashboard_id" to lookml_dashboard_id, + "recipient" to recipient, + "destination_type" to destination_type, + "delivery_format" to delivery_format, + "filter_or" to filter_or, + ), + ) + } + /** * ### Get Scheduled Plans for a Look * @@ -8999,15 +9075,7 @@ class LookerSDKStream(authSession: AuthSession) : APIMethods(authSession) { * * | result_format | Description * | :-----------: | :--- | - * | json | Plain json - * | json_bi | (*RECOMMENDED*) Row data plus metadata describing the fields, pivots, table calcs, and other aspects of the query - * | json_detail | (*LEGACY*) Row data plus metadata describing the fields, pivots, table calcs, and other aspects of the query - * | csv | Comma separated values with a header - * | txt | Tab separated values with a header - * | html | Simple html - * | md | Simple markdown - * | xlsx | MS Excel spreadsheet - * | sql | Returns the generated SQL rather than running the query + * | json_bi | Row data plus metadata describing the fields, pivots, table calcs, and other aspects of the query * * @param {Long} query_id Integer id of query * @param {String} result_format Format of result, options are: ["json_bi"] diff --git a/kotlin/src/main/com/looker/sdk/Constants.kt b/kotlin/src/main/com/looker/sdk/Constants.kt index e0bd67653..5f8a081f9 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 = "24.16" +const val LOOKER_VERSION = "24.18" const val API_VERSION = "4.0" const val AGENT_TAG = "$SDK_TAG $LOOKER_VERSION" const val LOOKER_APPID = "x-looker-appid" diff --git a/packages/sdk/src/4.0/funcs.ts b/packages/sdk/src/4.0/funcs.ts index 68e4b24dd..4f166e59e 100644 --- a/packages/sdk/src/4.0/funcs.ts +++ b/packages/sdk/src/4.0/funcs.ts @@ -25,7 +25,7 @@ */ /** - * 466 API methods + * 467 API methods */ import type { @@ -116,6 +116,7 @@ import type { IError, IExternalOauthApplication, IFolder, + IFolderBase, IGitBranch, IGitConnectionTest, IGitConnectionTestResult, @@ -130,6 +131,7 @@ import type { IIntegrationTestResult, IInternalHelpResources, IInternalHelpResourcesContent, + IJsonBi, ILDAPConfig, ILDAPConfigTestResult, ILegacyFeature, @@ -159,7 +161,6 @@ import type { IProjectValidationCache, IProjectWorkspace, IQuery, - IQueryFormats, IQueryTask, IRenderTask, IRepositoryCredential, @@ -223,6 +224,7 @@ import type { IRequestSearchPermissionSets, IRequestSearchRoles, IRequestSearchRolesWithUserCount, + IRequestSearchScheduledPlans, IRequestSearchThemes, IRequestSearchUserLoginLockouts, IRequestSearchUsers, @@ -6556,7 +6558,7 @@ export const delete_folder = async ( * * All personal folders will be returned. * - * GET /folders -> IFolder[] + * GET /folders -> IFolderBase[] * * @param sdk IAPIMethods implementation * @param fields Requested fields. @@ -6567,8 +6569,8 @@ export const all_folders = async ( sdk: IAPIMethods, fields?: string, options?: Partial -): Promise> => { - return sdk.get('/folders', { fields }, null, options); +): Promise> => { + return sdk.get('/folders', { fields }, null, options); }; /** @@ -9455,7 +9457,7 @@ export const query_task = async ( * will be in the message of the 400 error response, but not as detailed as expressed in `json_detail.errors`. * These data formats can only carry row data, and error info is not row data. * - * GET /query_tasks/{query_task_id}/results -> IQueryTask + * GET /query_tasks/{query_task_id}/results -> string * * @param sdk IAPIMethods implementation * @param query_task_id ID of the Query Task @@ -9466,9 +9468,9 @@ export const query_task_results = async ( sdk: IAPIMethods, query_task_id: string, options?: Partial -): Promise> => { +): Promise> => { query_task_id = encodeParam(query_task_id); - return sdk.get( + return sdk.get( `/query_tasks/${query_task_id}/results`, null, null, @@ -10711,6 +10713,7 @@ export const search_roles = async ( name: request.name, built_in: request.built_in, filter_or: request.filter_or, + is_support_role: request.is_support_role, }, null, options @@ -11275,6 +11278,56 @@ export const scheduled_plan_run_once = async ( ); }; +/** + * ### Search Scheduled Plans + * + * Returns all scheduled plans which matches the given search criteria. + * + * If no user_id is provided, this function returns the scheduled plans owned by the caller. + * + * + * To list all schedules for all users, pass `all_users=true`. + * + * + * The caller must have `see_schedules` permission to see other users' scheduled plans. + * + * GET /scheduled_plans/search -> IScheduledPlan[] + * + * @param sdk IAPIMethods implementation + * @param request composed interface "IRequestSearchScheduledPlans" for complex method parameters + * @param options one-time API call overrides + * + */ +export const search_scheduled_plans = async ( + sdk: IAPIMethods, + request: IRequestSearchScheduledPlans, + options?: Partial +): Promise> => { + return sdk.get( + '/scheduled_plans/search', + { + user_id: request.user_id, + fields: request.fields, + all_users: request.all_users, + limit: request.limit, + offset: request.offset, + sorts: request.sorts, + name: request.name, + user_first_name: request.user_first_name, + user_last_name: request.user_last_name, + dashboard_id: request.dashboard_id, + look_id: request.look_id, + lookml_dashboard_id: request.lookml_dashboard_id, + recipient: request.recipient, + destination_type: request.destination_type, + delivery_format: request.delivery_format, + filter_or: request.filter_or, + }, + null, + options + ); +}; + /** * ### Get Scheduled Plans for a Look * @@ -11563,17 +11616,9 @@ export const sql_interface_metadata = async ( * * | result_format | Description * | :-----------: | :--- | - * | json | Plain json - * | json_bi | (*RECOMMENDED*) Row data plus metadata describing the fields, pivots, table calcs, and other aspects of the query - * | json_detail | (*LEGACY*) Row data plus metadata describing the fields, pivots, table calcs, and other aspects of the query - * | csv | Comma separated values with a header - * | txt | Tab separated values with a header - * | html | Simple html - * | md | Simple markdown - * | xlsx | MS Excel spreadsheet - * | sql | Returns the generated SQL rather than running the query + * | json_bi | Row data plus metadata describing the fields, pivots, table calcs, and other aspects of the query * - * GET /sql_interface_queries/{query_id}/run/{result_format} -> IQueryFormats + * GET /sql_interface_queries/{query_id}/run/{result_format} -> IJsonBi * * @param sdk IAPIMethods implementation * @param query_id Integer id of query @@ -11586,9 +11631,9 @@ export const run_sql_interface_query = async ( query_id: number, result_format: string, options?: Partial -): Promise> => { +): Promise> => { result_format = encodeParam(result_format); - return sdk.get( + return sdk.get( `/sql_interface_queries/${query_id}/run/${result_format}`, null, null, diff --git a/packages/sdk/src/4.0/methods.ts b/packages/sdk/src/4.0/methods.ts index 51ce4f5b0..07b696537 100644 --- a/packages/sdk/src/4.0/methods.ts +++ b/packages/sdk/src/4.0/methods.ts @@ -25,7 +25,7 @@ */ /** - * 466 API methods + * 467 API methods */ import type { @@ -114,6 +114,7 @@ import type { IError, IExternalOauthApplication, IFolder, + IFolderBase, IGitBranch, IGitConnectionTest, IGitConnectionTestResult, @@ -128,6 +129,7 @@ import type { IIntegrationTestResult, IInternalHelpResources, IInternalHelpResourcesContent, + IJsonBi, ILDAPConfig, ILDAPConfigTestResult, ILegacyFeature, @@ -157,7 +159,6 @@ import type { IProjectValidationCache, IProjectWorkspace, IQuery, - IQueryFormats, IQueryTask, IRenderTask, IRepositoryCredential, @@ -221,6 +222,7 @@ import type { IRequestSearchPermissionSets, IRequestSearchRoles, IRequestSearchRolesWithUserCount, + IRequestSearchScheduledPlans, IRequestSearchThemes, IRequestSearchUserLoginLockouts, IRequestSearchUsers, @@ -6148,7 +6150,7 @@ export class Looker40SDK extends APIMethods implements ILooker40SDK { * * All personal folders will be returned. * - * GET /folders -> IFolder[] + * GET /folders -> IFolderBase[] * * @param fields Requested fields. * @param options one-time API call overrides @@ -6157,8 +6159,13 @@ export class Looker40SDK extends APIMethods implements ILooker40SDK { async all_folders( fields?: string, options?: Partial - ): Promise> { - return this.get('/folders', { fields }, null, options); + ): Promise> { + return this.get( + '/folders', + { fields }, + null, + options + ); } /** @@ -8876,7 +8883,7 @@ export class Looker40SDK extends APIMethods implements ILooker40SDK { * will be in the message of the 400 error response, but not as detailed as expressed in `json_detail.errors`. * These data formats can only carry row data, and error info is not row data. * - * GET /query_tasks/{query_task_id}/results -> IQueryTask + * GET /query_tasks/{query_task_id}/results -> string * * @param query_task_id ID of the Query Task * @param options one-time API call overrides @@ -8885,9 +8892,9 @@ export class Looker40SDK extends APIMethods implements ILooker40SDK { async query_task_results( query_task_id: string, options?: Partial - ): Promise> { + ): Promise> { query_task_id = encodeParam(query_task_id); - return this.get( + return this.get( `/query_tasks/${query_task_id}/results`, null, null, @@ -10065,6 +10072,7 @@ export class Looker40SDK extends APIMethods implements ILooker40SDK { name: request.name, built_in: request.built_in, filter_or: request.filter_or, + is_support_role: request.is_support_role, }, null, options @@ -10604,6 +10612,54 @@ export class Looker40SDK extends APIMethods implements ILooker40SDK { ); } + /** + * ### Search Scheduled Plans + * + * Returns all scheduled plans which matches the given search criteria. + * + * If no user_id is provided, this function returns the scheduled plans owned by the caller. + * + * + * To list all schedules for all users, pass `all_users=true`. + * + * + * The caller must have `see_schedules` permission to see other users' scheduled plans. + * + * GET /scheduled_plans/search -> IScheduledPlan[] + * + * @param request composed interface "IRequestSearchScheduledPlans" for complex method parameters + * @param options one-time API call overrides + * + */ + async search_scheduled_plans( + request: IRequestSearchScheduledPlans, + options?: Partial + ): Promise> { + return this.get( + '/scheduled_plans/search', + { + user_id: request.user_id, + fields: request.fields, + all_users: request.all_users, + limit: request.limit, + offset: request.offset, + sorts: request.sorts, + name: request.name, + user_first_name: request.user_first_name, + user_last_name: request.user_last_name, + dashboard_id: request.dashboard_id, + look_id: request.look_id, + lookml_dashboard_id: request.lookml_dashboard_id, + recipient: request.recipient, + destination_type: request.destination_type, + delivery_format: request.delivery_format, + filter_or: request.filter_or, + }, + null, + options + ); + } + /** * ### Get Scheduled Plans for a Look * @@ -10878,17 +10934,9 @@ export class Looker40SDK extends APIMethods implements ILooker40SDK { * * | result_format | Description * | :-----------: | :--- | - * | json | Plain json - * | json_bi | (*RECOMMENDED*) Row data plus metadata describing the fields, pivots, table calcs, and other aspects of the query - * | json_detail | (*LEGACY*) Row data plus metadata describing the fields, pivots, table calcs, and other aspects of the query - * | csv | Comma separated values with a header - * | txt | Tab separated values with a header - * | html | Simple html - * | md | Simple markdown - * | xlsx | MS Excel spreadsheet - * | sql | Returns the generated SQL rather than running the query + * | json_bi | Row data plus metadata describing the fields, pivots, table calcs, and other aspects of the query * - * GET /sql_interface_queries/{query_id}/run/{result_format} -> IQueryFormats + * GET /sql_interface_queries/{query_id}/run/{result_format} -> IJsonBi * * @param query_id Integer id of query * @param result_format Format of result, options are: ["json_bi"] @@ -10899,9 +10947,9 @@ export class Looker40SDK extends APIMethods implements ILooker40SDK { query_id: number, result_format: string, options?: Partial - ): Promise> { + ): Promise> { result_format = encodeParam(result_format); - return this.get( + return this.get( `/sql_interface_queries/${query_id}/run/${result_format}`, null, null, diff --git a/packages/sdk/src/4.0/methodsInterface.ts b/packages/sdk/src/4.0/methodsInterface.ts index f990efcf5..482c1ab17 100644 --- a/packages/sdk/src/4.0/methodsInterface.ts +++ b/packages/sdk/src/4.0/methodsInterface.ts @@ -25,7 +25,7 @@ */ /** - * 466 API methods + * 467 API methods */ import type { @@ -111,6 +111,7 @@ import type { IError, IExternalOauthApplication, IFolder, + IFolderBase, IGitBranch, IGitConnectionTest, IGitConnectionTestResult, @@ -125,6 +126,7 @@ import type { IIntegrationTestResult, IInternalHelpResources, IInternalHelpResourcesContent, + IJsonBi, ILDAPConfig, ILDAPConfigTestResult, ILegacyFeature, @@ -154,7 +156,6 @@ import type { IProjectValidationCache, IProjectWorkspace, IQuery, - IQueryFormats, IQueryTask, IRenderTask, IRepositoryCredential, @@ -218,6 +219,7 @@ import type { IRequestSearchPermissionSets, IRequestSearchRoles, IRequestSearchRolesWithUserCount, + IRequestSearchScheduledPlans, IRequestSearchThemes, IRequestSearchUserLoginLockouts, IRequestSearchUsers, @@ -4411,7 +4413,7 @@ export interface ILooker40SDK extends IAPIMethods { * * All personal folders will be returned. * - * GET /folders -> IFolder[] + * GET /folders -> IFolderBase[] * * @param fields Requested fields. * @param options one-time API call overrides @@ -4420,7 +4422,7 @@ export interface ILooker40SDK extends IAPIMethods { all_folders( fields?: string, options?: Partial - ): Promise>; + ): Promise>; /** * ### Create a folder with specified information. @@ -6277,7 +6279,7 @@ export interface ILooker40SDK extends IAPIMethods { * will be in the message of the 400 error response, but not as detailed as expressed in `json_detail.errors`. * These data formats can only carry row data, and error info is not row data. * - * GET /query_tasks/{query_task_id}/results -> IQueryTask + * GET /query_tasks/{query_task_id}/results -> string * * @param query_task_id ID of the Query Task * @param options one-time API call overrides @@ -6286,7 +6288,7 @@ export interface ILooker40SDK extends IAPIMethods { query_task_results( query_task_id: string, options?: Partial - ): Promise>; + ): Promise>; /** * ### Get a previously created query by id. @@ -7537,6 +7539,30 @@ export interface ILooker40SDK extends IAPIMethods { options?: Partial ): Promise>; + /** + * ### Search Scheduled Plans + * + * Returns all scheduled plans which matches the given search criteria. + * + * If no user_id is provided, this function returns the scheduled plans owned by the caller. + * + * + * To list all schedules for all users, pass `all_users=true`. + * + * + * The caller must have `see_schedules` permission to see other users' scheduled plans. + * + * GET /scheduled_plans/search -> IScheduledPlan[] + * + * @param request composed interface "IRequestSearchScheduledPlans" for complex method parameters + * @param options one-time API call overrides + * + */ + search_scheduled_plans( + request: IRequestSearchScheduledPlans, + options?: Partial + ): Promise>; + /** * ### Get Scheduled Plans for a Look * @@ -7751,17 +7777,9 @@ export interface ILooker40SDK extends IAPIMethods { * * | result_format | Description * | :-----------: | :--- | - * | json | Plain json - * | json_bi | (*RECOMMENDED*) Row data plus metadata describing the fields, pivots, table calcs, and other aspects of the query - * | json_detail | (*LEGACY*) Row data plus metadata describing the fields, pivots, table calcs, and other aspects of the query - * | csv | Comma separated values with a header - * | txt | Tab separated values with a header - * | html | Simple html - * | md | Simple markdown - * | xlsx | MS Excel spreadsheet - * | sql | Returns the generated SQL rather than running the query + * | json_bi | Row data plus metadata describing the fields, pivots, table calcs, and other aspects of the query * - * GET /sql_interface_queries/{query_id}/run/{result_format} -> IQueryFormats + * GET /sql_interface_queries/{query_id}/run/{result_format} -> IJsonBi * * @param query_id Integer id of query * @param result_format Format of result, options are: ["json_bi"] @@ -7772,7 +7790,7 @@ export interface ILooker40SDK extends IAPIMethods { query_id: number, result_format: string, options?: Partial - ): Promise>; + ): Promise>; /** * ### Create a SQL interface query. diff --git a/packages/sdk/src/4.0/models.ts b/packages/sdk/src/4.0/models.ts index 77aaf5936..5364a7ef7 100644 --- a/packages/sdk/src/4.0/models.ts +++ b/packages/sdk/src/4.0/models.ts @@ -25,7 +25,7 @@ */ /** - * 411 API models: 260 Spec, 68 Request, 61 Write, 22 Enum + * 411 API models: 259 Spec, 69 Request, 61 Write, 22 Enum */ import type { IDictionary, DelimArray } from '@looker/sdk-rtl'; @@ -946,6 +946,10 @@ export interface IContentSearch { * Preferred way of viewing the content (only applies to dashboards) (read-only) */ preferred_viewer?: string | null; + /** + * Name of the model the explore belongs to (read-only) + */ + model?: string | null; } export interface IContentSummary { @@ -969,6 +973,10 @@ export interface IContentSummary { * Content slug (read-only) */ content_slug?: string | null; + /** + * Content url (read-only) + */ + content_url?: string | null; /** * Content title (read-only) */ @@ -2969,9 +2977,13 @@ export interface IDBConnection { */ bq_storage_project_id?: string | null; /** - * When true, represents that all project roles have been verified. (read-only) + * When true, represents that all project roles have been verified. */ bq_roles_verified?: boolean | null; + /** + * The name of P4SA service account that is associated with the Looker instance (read-only) + */ + p4sa_name?: string | null; } export interface IDBConnectionBase { @@ -5251,6 +5263,10 @@ export interface ILook { * Time that the Look was updated. (read-only) */ updated_at?: Date | null; + /** + * Name of User that created the look. (read-only) + */ + user_name?: string | null; /** * Number of times viewed in the Looker web UI (read-only) */ @@ -6168,6 +6184,10 @@ export interface ILookWithDashboards { * Time that the Look was updated. (read-only) */ updated_at?: Date | null; + /** + * Name of User that created the look. (read-only) + */ + user_name?: string | null; /** * Number of times viewed in the Looker web UI (read-only) */ @@ -6289,6 +6309,10 @@ export interface ILookWithQuery { * Time that the Look was updated. (read-only) */ updated_at?: Date | null; + /** + * Name of User that created the look. (read-only) + */ + user_name?: string | null; /** * Number of times viewed in the Looker web UI (read-only) */ @@ -7355,42 +7379,6 @@ export interface IQuery { has_table_calculations?: boolean; } -export interface IQueryFormats { - json_bi?: IJsonBi; - /** - * (read-only) - */ - json?: string | null; - /** - * (read-only) - */ - json_detail?: string | null; - /** - * (read-only) - */ - csv?: string | null; - /** - * (read-only) - */ - txt?: string | null; - /** - * (read-only) - */ - html?: string | null; - /** - * (read-only) - */ - md?: string | null; - /** - * (read-only) - */ - xlsx?: string | null; - /** - * (read-only) - */ - sql?: string | null; -} - export interface IQueryTask { /** * Operations the current user is able to perform on this object (read-only) @@ -9537,6 +9525,10 @@ export interface IRequestSearchRoles { * Combine given search criteria in a boolean OR expression. */ filter_or?: boolean | null; + /** + * Search for Looker support roles. + */ + is_support_role?: boolean | null; } /** @@ -9577,6 +9569,76 @@ export interface IRequestSearchRolesWithUserCount { filter_or?: boolean | null; } +/** + * Dynamically generated request type for search_scheduled_plans + */ +export interface IRequestSearchScheduledPlans { + /** + * Return scheduled plans belonging to this user_id. If not provided, returns scheduled plans owned by the caller. + */ + user_id?: string | null; + /** + * Comma delimited list of field names. If provided, only the fields specified will be included in the response + */ + fields?: string | null; + /** + * Return scheduled plans belonging to all users (caller needs see_schedules permission) + */ + all_users?: boolean | null; + /** + * Number of results to return. (used with offset and takes priority over page and per_page) + */ + limit?: number | null; + /** + * Number of results to skip before returning any. (used with limit and takes priority over page and per_page) + */ + offset?: number | null; + /** + * Fields to sort by. + */ + sorts?: string | null; + /** + * Match Scheduled plan's name. + */ + name?: string | null; + /** + * Returns scheduled plans belonging to user with this first name. + */ + user_first_name?: string | null; + /** + * Returns scheduled plans belonging to user with this last name. + */ + user_last_name?: string | null; + /** + * Returns scheduled plans created on this Dashboard. + */ + dashboard_id?: string | null; + /** + * Returns scheduled plans created on this Look. + */ + look_id?: string | null; + /** + * Returns scheduled plans created on this LookML Dashboard. + */ + lookml_dashboard_id?: string | null; + /** + * Match recipient address. + */ + recipient?: string | null; + /** + * Match scheduled plan's destination type. + */ + destination_type?: string | null; + /** + * Match scheduled plan's delivery format. + */ + delivery_format?: string | null; + /** + * Combine given search criteria in a boolean OR expression + */ + filter_or?: boolean | null; +} + /** * Dynamically generated request type for search_themes */ @@ -11649,10 +11711,6 @@ export interface IUser { * (Embed only) ID of user's group folder based on the external_group_id optionally specified during embed user login (read-only) */ embed_group_folder_id?: string | null; - /** - * User is an IAM Admin - only available in Looker (Google Cloud core) (read-only) - */ - is_iam_admin?: boolean; /** * Link to get this item (read-only) */ @@ -12563,7 +12621,7 @@ export interface IWriteDashboardElement { dashboard_id?: string | null; /** * Dynamic writeable type for LookWithQuery removes: - * can, content_metadata_id, id, content_favorite_id, created_at, deleted_at, deleter_id, embed_url, excel_file_url, favorite_count, google_spreadsheet_formula, image_embed_url, last_accessed_at, last_updater_id, last_viewed_at, model, public_slug, public_url, short_url, updated_at, view_count, url + * can, content_metadata_id, id, content_favorite_id, created_at, deleted_at, deleter_id, embed_url, excel_file_url, favorite_count, google_spreadsheet_formula, image_embed_url, last_accessed_at, last_updater_id, last_viewed_at, model, public_slug, public_url, short_url, updated_at, user_name, view_count, url */ look?: IWriteLookWithQuery | null; /** @@ -12783,7 +12841,7 @@ export interface IWriteDatagroup { /** * Dynamic writeable type for DBConnection removes: - * can, dialect, snippets, pdts_enabled, uses_oauth, uses_instance_oauth, supports_data_studio_link, created_at, user_id, example, last_regen_at, last_reap_at, managed, default_bq_connection, bq_roles_verified + * can, dialect, snippets, pdts_enabled, uses_oauth, uses_instance_oauth, supports_data_studio_link, created_at, user_id, example, last_regen_at, last_reap_at, managed, default_bq_connection, p4sa_name */ export interface IWriteDBConnection { /** @@ -12951,6 +13009,10 @@ export interface IWriteDBConnection { * The project id of the default BigQuery storage project. */ bq_storage_project_id?: string | null; + /** + * When true, represents that all project roles have been verified. + */ + bq_roles_verified?: boolean | null; } /** @@ -13345,7 +13407,7 @@ export interface IWriteLookmlModel { /** * Dynamic writeable type for LookWithQuery removes: - * can, content_metadata_id, id, content_favorite_id, created_at, deleted_at, deleter_id, embed_url, excel_file_url, favorite_count, google_spreadsheet_formula, image_embed_url, last_accessed_at, last_updater_id, last_viewed_at, model, public_slug, public_url, short_url, updated_at, view_count, url + * can, content_metadata_id, id, content_favorite_id, created_at, deleted_at, deleter_id, embed_url, excel_file_url, favorite_count, google_spreadsheet_formula, image_embed_url, last_accessed_at, last_updater_id, last_viewed_at, model, public_slug, public_url, short_url, updated_at, user_name, view_count, url */ export interface IWriteLookWithQuery { /** @@ -14315,7 +14377,7 @@ export interface IWriteTheme { /** * Dynamic writeable type for User removes: - * can, avatar_url, avatar_url_without_sizing, credentials_api3, credentials_embed, credentials_google, credentials_ldap, credentials_looker_openid, credentials_oidc, credentials_saml, credentials_totp, display_name, email, embed_group_space_id, group_ids, id, looker_versions, personal_folder_id, presumed_looker_employee, role_ids, sessions, verified_looker_employee, roles_externally_managed, allow_direct_roles, allow_normal_group_membership, allow_roles_from_normal_groups, embed_group_folder_id, is_iam_admin, url + * can, avatar_url, avatar_url_without_sizing, credentials_api3, credentials_embed, credentials_google, credentials_ldap, credentials_looker_openid, credentials_oidc, credentials_saml, credentials_totp, display_name, email, embed_group_space_id, group_ids, id, looker_versions, personal_folder_id, presumed_looker_employee, role_ids, sessions, verified_looker_employee, roles_externally_managed, allow_direct_roles, allow_normal_group_membership, allow_roles_from_normal_groups, embed_group_folder_id, url */ export interface IWriteUser { /** diff --git a/packages/sdk/src/4.0/streams.ts b/packages/sdk/src/4.0/streams.ts index e51aeafd2..38e91fd4d 100644 --- a/packages/sdk/src/4.0/streams.ts +++ b/packages/sdk/src/4.0/streams.ts @@ -25,7 +25,7 @@ */ /** - * 466 API methods + * 467 API methods */ import type { @@ -112,6 +112,7 @@ import type { IEmbedUrlResponse, IExternalOauthApplication, IFolder, + IFolderBase, IGitBranch, IGitConnectionTest, IGitConnectionTestResult, @@ -126,6 +127,7 @@ import type { IIntegrationTestResult, IInternalHelpResources, IInternalHelpResourcesContent, + IJsonBi, ILDAPConfig, ILDAPConfigTestResult, ILegacyFeature, @@ -155,7 +157,6 @@ import type { IProjectValidationCache, IProjectWorkspace, IQuery, - IQueryFormats, IQueryTask, IRenderTask, IRepositoryCredential, @@ -219,6 +220,7 @@ import type { IRequestSearchPermissionSets, IRequestSearchRoles, IRequestSearchRolesWithUserCount, + IRequestSearchScheduledPlans, IRequestSearchThemes, IRequestSearchUserLoginLockouts, IRequestSearchUsers, @@ -7037,7 +7039,7 @@ export class Looker40SDKStream extends APIMethods { * * All personal folders will be returned. * - * GET /folders -> IFolder[] + * GET /folders -> IFolderBase[] * * @param callback streaming output function * @param fields Requested fields. @@ -7045,11 +7047,11 @@ export class Looker40SDKStream extends APIMethods { * */ async all_folders( - callback: (response: Response) => Promise, + callback: (response: Response) => Promise, fields?: string, options?: Partial ) { - return this.authStream( + return this.authStream( callback, 'GET', '/folders', @@ -10156,7 +10158,7 @@ export class Looker40SDKStream extends APIMethods { * will be in the message of the 400 error response, but not as detailed as expressed in `json_detail.errors`. * These data formats can only carry row data, and error info is not row data. * - * GET /query_tasks/{query_task_id}/results -> IQueryTask + * GET /query_tasks/{query_task_id}/results -> string * * @param callback streaming output function * @param query_task_id ID of the Query Task @@ -10164,12 +10166,12 @@ export class Looker40SDKStream extends APIMethods { * */ async query_task_results( - callback: (response: Response) => Promise, + callback: (response: Response) => Promise, query_task_id: string, options?: Partial ) { query_task_id = encodeParam(query_task_id); - return this.authStream( + return this.authStream( callback, 'GET', `/query_tasks/${query_task_id}/results`, @@ -11494,6 +11496,7 @@ export class Looker40SDKStream extends APIMethods { name: request.name, built_in: request.built_in, filter_or: request.filter_or, + is_support_role: request.is_support_role, }, null, options @@ -12098,6 +12101,58 @@ export class Looker40SDKStream extends APIMethods { ); } + /** + * ### Search Scheduled Plans + * + * Returns all scheduled plans which matches the given search criteria. + * + * If no user_id is provided, this function returns the scheduled plans owned by the caller. + * + * + * To list all schedules for all users, pass `all_users=true`. + * + * + * The caller must have `see_schedules` permission to see other users' scheduled plans. + * + * GET /scheduled_plans/search -> IScheduledPlan[] + * + * @param callback streaming output function + * @param request composed interface "IRequestSearchScheduledPlans" for complex method parameters + * @param options one-time API call overrides + * + */ + async search_scheduled_plans( + callback: (response: Response) => Promise, + request: IRequestSearchScheduledPlans, + options?: Partial + ) { + return this.authStream( + callback, + 'GET', + '/scheduled_plans/search', + { + user_id: request.user_id, + fields: request.fields, + all_users: request.all_users, + limit: request.limit, + offset: request.offset, + sorts: request.sorts, + name: request.name, + user_first_name: request.user_first_name, + user_last_name: request.user_last_name, + dashboard_id: request.dashboard_id, + look_id: request.look_id, + lookml_dashboard_id: request.lookml_dashboard_id, + recipient: request.recipient, + destination_type: request.destination_type, + delivery_format: request.delivery_format, + filter_or: request.filter_or, + }, + null, + options + ); + } + /** * ### Get Scheduled Plans for a Look * @@ -12405,17 +12460,9 @@ export class Looker40SDKStream extends APIMethods { * * | result_format | Description * | :-----------: | :--- | - * | json | Plain json - * | json_bi | (*RECOMMENDED*) Row data plus metadata describing the fields, pivots, table calcs, and other aspects of the query - * | json_detail | (*LEGACY*) Row data plus metadata describing the fields, pivots, table calcs, and other aspects of the query - * | csv | Comma separated values with a header - * | txt | Tab separated values with a header - * | html | Simple html - * | md | Simple markdown - * | xlsx | MS Excel spreadsheet - * | sql | Returns the generated SQL rather than running the query + * | json_bi | Row data plus metadata describing the fields, pivots, table calcs, and other aspects of the query * - * GET /sql_interface_queries/{query_id}/run/{result_format} -> IQueryFormats + * GET /sql_interface_queries/{query_id}/run/{result_format} -> IJsonBi * * @param callback streaming output function * @param query_id Integer id of query @@ -12424,13 +12471,13 @@ export class Looker40SDKStream extends APIMethods { * */ async run_sql_interface_query( - callback: (response: Response) => Promise, + callback: (response: Response) => Promise, query_id: number, result_format: string, options?: Partial ) { result_format = encodeParam(result_format); - return this.authStream( + return this.authStream( callback, 'GET', `/sql_interface_queries/${query_id}/run/${result_format}`, diff --git a/packages/sdk/src/constants.ts b/packages/sdk/src/constants.ts index 5c02a7c5b..c31f5bfcf 100644 --- a/packages/sdk/src/constants.ts +++ b/packages/sdk/src/constants.ts @@ -24,5 +24,5 @@ */ -export const sdkVersion = '24.16'; +export const sdkVersion = '24.18'; export const environmentPrefix = 'LOOKERSDK'; diff --git a/python/looker_sdk/sdk/api40/methods.py b/python/looker_sdk/sdk/api40/methods.py index 4733f2f90..a2c91a893 100644 --- a/python/looker_sdk/sdk/api40/methods.py +++ b/python/looker_sdk/sdk/api40/methods.py @@ -21,7 +21,7 @@ # SOFTWARE. # -# 466 API methods +# 467 API methods # NOTE: Do not edit this file generated by Looker SDK Codegen for API 4.0 @@ -6028,19 +6028,19 @@ def delete_folder( # # All personal folders will be returned. # - # GET /folders -> Sequence[mdls.Folder] + # GET /folders -> Sequence[mdls.FolderBase] def all_folders( self, # Requested fields. fields: Optional[str] = None, transport_options: Optional[transport.TransportOptions] = None, - ) -> Sequence[mdls.Folder]: + ) -> Sequence[mdls.FolderBase]: """Get All Folders""" response = cast( - Sequence[mdls.Folder], + Sequence[mdls.FolderBase], self.get( path="/folders", - structure=Sequence[mdls.Folder], + structure=Sequence[mdls.FolderBase], query_params={"fields": fields}, transport_options=transport_options, ), @@ -8994,20 +8994,20 @@ def query_task( # will be in the message of the 400 error response, but not as detailed as expressed in `json_detail.errors`. # These data formats can only carry row data, and error info is not row data. # - # GET /query_tasks/{query_task_id}/results -> mdls.QueryTask + # GET /query_tasks/{query_task_id}/results -> str def query_task_results( self, # ID of the Query Task query_task_id: str, transport_options: Optional[transport.TransportOptions] = None, - ) -> mdls.QueryTask: + ) -> str: """Get Async Query Results""" query_task_id = self.encode_path_param(query_task_id) response = cast( - mdls.QueryTask, + str, self.get( path=f"/query_tasks/{query_task_id}/results", - structure=mdls.QueryTask, + structure=str, transport_options=transport_options, ), ) @@ -10265,6 +10265,8 @@ def search_roles( built_in: Optional[bool] = None, # Combine given search criteria in a boolean OR expression. filter_or: Optional[bool] = None, + # Search for Looker support roles. + is_support_role: Optional[bool] = None, transport_options: Optional[transport.TransportOptions] = None, ) -> Sequence[mdls.Role]: """Search Roles""" @@ -10282,6 +10284,7 @@ def search_roles( "name": name, "built_in": built_in, "filter_or": filter_or, + "is_support_role": is_support_role, }, transport_options=transport_options, ), @@ -10839,6 +10842,84 @@ def scheduled_plan_run_once( ) return response + # ### Search Scheduled Plans + # + # Returns all scheduled plans which matches the given search criteria. + # + # If no user_id is provided, this function returns the scheduled plans owned by the caller. + # + # + # To list all schedules for all users, pass `all_users=true`. + # + # + # The caller must have `see_schedules` permission to see other users' scheduled plans. + # + # GET /scheduled_plans/search -> Sequence[mdls.ScheduledPlan] + def search_scheduled_plans( + self, + # Return scheduled plans belonging to this user_id. If not provided, returns scheduled plans owned by the caller. + user_id: Optional[str] = None, + # Comma delimited list of field names. If provided, only the fields specified will be included in the response + fields: Optional[str] = None, + # Return scheduled plans belonging to all users (caller needs see_schedules permission) + all_users: Optional[bool] = None, + # Number of results to return. (used with offset and takes priority over page and per_page) + limit: Optional[int] = None, + # Number of results to skip before returning any. (used with limit and takes priority over page and per_page) + offset: Optional[int] = None, + # Fields to sort by. + sorts: Optional[str] = None, + # Match Scheduled plan's name. + name: Optional[str] = None, + # Returns scheduled plans belonging to user with this first name. + user_first_name: Optional[str] = None, + # Returns scheduled plans belonging to user with this last name. + user_last_name: Optional[str] = None, + # Returns scheduled plans created on this Dashboard. + dashboard_id: Optional[str] = None, + # Returns scheduled plans created on this Look. + look_id: Optional[str] = None, + # Returns scheduled plans created on this LookML Dashboard. + lookml_dashboard_id: Optional[str] = None, + # Match recipient address. + recipient: Optional[str] = None, + # Match scheduled plan's destination type. + destination_type: Optional[str] = None, + # Match scheduled plan's delivery format. + delivery_format: Optional[str] = None, + # Combine given search criteria in a boolean OR expression + filter_or: Optional[bool] = None, + transport_options: Optional[transport.TransportOptions] = None, + ) -> Sequence[mdls.ScheduledPlan]: + """Search Scheduled Plans""" + response = cast( + Sequence[mdls.ScheduledPlan], + self.get( + path="/scheduled_plans/search", + structure=Sequence[mdls.ScheduledPlan], + query_params={ + "user_id": user_id, + "fields": fields, + "all_users": all_users, + "limit": limit, + "offset": offset, + "sorts": sorts, + "name": name, + "user_first_name": user_first_name, + "user_last_name": user_last_name, + "dashboard_id": dashboard_id, + "look_id": look_id, + "lookml_dashboard_id": lookml_dashboard_id, + "recipient": recipient, + "destination_type": destination_type, + "delivery_format": delivery_format, + "filter_or": filter_or, + }, + transport_options=transport_options, + ), + ) + return response + # ### Get Scheduled Plans for a Look # # Returns all scheduled plans for a look which belong to the caller or given user. @@ -11132,17 +11213,9 @@ def sql_interface_metadata( # # | result_format | Description # | :-----------: | :--- | - # | json | Plain json - # | json_bi | (*RECOMMENDED*) Row data plus metadata describing the fields, pivots, table calcs, and other aspects of the query - # | json_detail | (*LEGACY*) Row data plus metadata describing the fields, pivots, table calcs, and other aspects of the query - # | csv | Comma separated values with a header - # | txt | Tab separated values with a header - # | html | Simple html - # | md | Simple markdown - # | xlsx | MS Excel spreadsheet - # | sql | Returns the generated SQL rather than running the query + # | json_bi | Row data plus metadata describing the fields, pivots, table calcs, and other aspects of the query # - # GET /sql_interface_queries/{query_id}/run/{result_format} -> mdls.QueryFormats + # GET /sql_interface_queries/{query_id}/run/{result_format} -> mdls.JsonBi def run_sql_interface_query( self, # Integer id of query @@ -11150,14 +11223,14 @@ def run_sql_interface_query( # Format of result, options are: ["json_bi"] result_format: str, transport_options: Optional[transport.TransportOptions] = None, - ) -> mdls.QueryFormats: + ) -> mdls.JsonBi: """Run SQL Interface Query""" result_format = self.encode_path_param(result_format) response = cast( - mdls.QueryFormats, + mdls.JsonBi, self.get( path=f"/sql_interface_queries/{query_id}/run/{result_format}", - structure=mdls.QueryFormats, + structure=mdls.JsonBi, transport_options=transport_options, ), ) diff --git a/python/looker_sdk/sdk/api40/models.py b/python/looker_sdk/sdk/api40/models.py index 2b571da94..c930426da 100644 --- a/python/looker_sdk/sdk/api40/models.py +++ b/python/looker_sdk/sdk/api40/models.py @@ -21,7 +21,7 @@ # SOFTWARE. # -# 343 API models: 260 Spec, 0 Request, 61 Write, 22 Enum +# 342 API models: 259 Spec, 0 Request, 61 Write, 22 Enum # NOTE: Do not edit this file generated by Looker SDK Codegen for API 4.0 @@ -1247,6 +1247,7 @@ class ContentSearch(model.Model): folder_name: Name of the folder where the content is saved view_count: Number of times the content has been viewed preferred_viewer: Preferred way of viewing the content (only applies to dashboards) + model: Name of the model the explore belongs to """ can: Optional[MutableMapping[str, bool]] = None @@ -1258,6 +1259,7 @@ class ContentSearch(model.Model): folder_name: Optional[str] = None view_count: Optional[int] = None preferred_viewer: Optional[str] = None + model: Optional[str] = None def __init__( self, @@ -1270,7 +1272,8 @@ def __init__( folder_id: Optional[str] = None, folder_name: Optional[str] = None, view_count: Optional[int] = None, - preferred_viewer: Optional[str] = None + preferred_viewer: Optional[str] = None, + model: Optional[str] = None ): self.can = can self.content_id = content_id @@ -1281,6 +1284,7 @@ def __init__( self.folder_name = folder_name self.view_count = view_count self.preferred_viewer = preferred_viewer + self.model = model @attr.s(auto_attribs=True, init=False) @@ -1292,6 +1296,7 @@ class ContentSummary(model.Model): content_type: Content type content_id: Content id content_slug: Content slug + content_url: Content url title: Content title description: Content Description last_viewed_at: Last time viewed by current user @@ -1312,6 +1317,7 @@ class ContentSummary(model.Model): content_type: Optional[str] = None content_id: Optional[str] = None content_slug: Optional[str] = None + content_url: Optional[str] = None title: Optional[str] = None description: Optional[str] = None last_viewed_at: Optional[datetime.datetime] = None @@ -1334,6 +1340,7 @@ def __init__( content_type: Optional[str] = None, content_id: Optional[str] = None, content_slug: Optional[str] = None, + content_url: Optional[str] = None, title: Optional[str] = None, description: Optional[str] = None, last_viewed_at: Optional[datetime.datetime] = None, @@ -1353,6 +1360,7 @@ def __init__( self.content_type = content_type self.content_id = content_id self.content_slug = content_slug + self.content_url = content_url self.title = title self.description = description self.last_viewed_at = last_viewed_at @@ -3728,6 +3736,7 @@ class DBConnection(model.Model): default_bq_connection: When true, represents that this connection is the default BQ connection. bq_storage_project_id: The project id of the default BigQuery storage project. bq_roles_verified: When true, represents that all project roles have been verified. + p4sa_name: The name of P4SA service account that is associated with the Looker instance """ can: Optional[MutableMapping[str, bool]] = None @@ -3786,6 +3795,7 @@ class DBConnection(model.Model): default_bq_connection: Optional[bool] = None bq_storage_project_id: Optional[str] = None bq_roles_verified: Optional[bool] = None + p4sa_name: Optional[str] = None def __init__( self, @@ -3845,7 +3855,8 @@ def __init__( connection_pooling: Optional[bool] = None, default_bq_connection: Optional[bool] = None, bq_storage_project_id: Optional[str] = None, - bq_roles_verified: Optional[bool] = None + bq_roles_verified: Optional[bool] = None, + p4sa_name: Optional[str] = None ): self.can = can self.name = name @@ -3903,6 +3914,7 @@ def __init__( self.default_bq_connection = default_bq_connection self.bq_storage_project_id = bq_storage_project_id self.bq_roles_verified = bq_roles_verified + self.p4sa_name = p4sa_name @attr.s(auto_attribs=True, init=False) @@ -6766,6 +6778,7 @@ class Look(model.Model): folder: folder_id: Folder Id updated_at: Time that the Look was updated. + user_name: Name of User that created the look. view_count: Number of times viewed in the Looker web UI """ @@ -6798,6 +6811,7 @@ class Look(model.Model): folder: Optional["FolderBase"] = None folder_id: Optional[str] = None updated_at: Optional[datetime.datetime] = None + user_name: Optional[str] = None view_count: Optional[int] = None def __init__( @@ -6832,6 +6846,7 @@ def __init__( folder: Optional["FolderBase"] = None, folder_id: Optional[str] = None, updated_at: Optional[datetime.datetime] = None, + user_name: Optional[str] = None, view_count: Optional[int] = None ): self.can = can @@ -6863,6 +6878,7 @@ def __init__( self.folder = folder self.folder_id = folder_id self.updated_at = updated_at + self.user_name = user_name self.view_count = view_count @@ -7902,6 +7918,7 @@ class LookWithDashboards(model.Model): folder: folder_id: Folder Id updated_at: Time that the Look was updated. + user_name: Name of User that created the look. view_count: Number of times viewed in the Looker web UI dashboards: Dashboards """ @@ -7935,6 +7952,7 @@ class LookWithDashboards(model.Model): folder: Optional["FolderBase"] = None folder_id: Optional[str] = None updated_at: Optional[datetime.datetime] = None + user_name: Optional[str] = None view_count: Optional[int] = None dashboards: Optional[Sequence["DashboardBase"]] = None @@ -7970,6 +7988,7 @@ def __init__( folder: Optional["FolderBase"] = None, folder_id: Optional[str] = None, updated_at: Optional[datetime.datetime] = None, + user_name: Optional[str] = None, view_count: Optional[int] = None, dashboards: Optional[Sequence["DashboardBase"]] = None ): @@ -8002,6 +8021,7 @@ def __init__( self.folder = folder self.folder_id = folder_id self.updated_at = updated_at + self.user_name = user_name self.view_count = view_count self.dashboards = dashboards @@ -8039,6 +8059,7 @@ class LookWithQuery(model.Model): folder: folder_id: Folder Id updated_at: Time that the Look was updated. + user_name: Name of User that created the look. view_count: Number of times viewed in the Looker web UI query: url: Url @@ -8073,6 +8094,7 @@ class LookWithQuery(model.Model): folder: Optional["FolderBase"] = None folder_id: Optional[str] = None updated_at: Optional[datetime.datetime] = None + user_name: Optional[str] = None view_count: Optional[int] = None query: Optional["Query"] = None url: Optional[str] = None @@ -8109,6 +8131,7 @@ def __init__( folder: Optional["FolderBase"] = None, folder_id: Optional[str] = None, updated_at: Optional[datetime.datetime] = None, + user_name: Optional[str] = None, view_count: Optional[int] = None, query: Optional["Query"] = None, url: Optional[str] = None @@ -8142,6 +8165,7 @@ def __init__( self.folder = folder self.folder_id = folder_id self.updated_at = updated_at + self.user_name = user_name self.view_count = view_count self.query = query self.url = url @@ -9556,55 +9580,6 @@ def __init__( self.has_table_calculations = has_table_calculations -@attr.s(auto_attribs=True, init=False) -class QueryFormats(model.Model): - """ - Attributes: - json_bi: - json: - json_detail: - csv: - txt: - html: - md: - xlsx: - sql: - """ - - json_bi: Optional["JsonBi"] = None - json: Optional[str] = None - json_detail: Optional[str] = None - csv: Optional[str] = None - txt: Optional[str] = None - html: Optional[str] = None - md: Optional[str] = None - xlsx: Optional[str] = None - sql: Optional[str] = None - - def __init__( - self, - *, - json_bi: Optional["JsonBi"] = None, - json: Optional[str] = None, - json_detail: Optional[str] = None, - csv: Optional[str] = None, - txt: Optional[str] = None, - html: Optional[str] = None, - md: Optional[str] = None, - xlsx: Optional[str] = None, - sql: Optional[str] = None - ): - self.json_bi = json_bi - self.json = json - self.json_detail = json_detail - self.csv = csv - self.txt = txt - self.html = html - self.md = md - self.xlsx = xlsx - self.sql = sql - - @attr.s(auto_attribs=True, init=False) class QueryTask(model.Model): """ @@ -12024,7 +11999,6 @@ class User(model.Model): allow_normal_group_membership: User can be a direct member of a normal Looker group. allow_roles_from_normal_groups: User can inherit roles from a normal Looker group. embed_group_folder_id: (Embed only) ID of user's group folder based on the external_group_id optionally specified during embed user login - is_iam_admin: User is an IAM Admin - only available in Looker (Google Cloud core) url: Link to get this item """ @@ -12063,7 +12037,6 @@ class User(model.Model): allow_normal_group_membership: Optional[bool] = None allow_roles_from_normal_groups: Optional[bool] = None embed_group_folder_id: Optional[str] = None - is_iam_admin: Optional[bool] = None url: Optional[str] = None def __init__( @@ -12104,7 +12077,6 @@ def __init__( allow_normal_group_membership: Optional[bool] = None, allow_roles_from_normal_groups: Optional[bool] = None, embed_group_folder_id: Optional[str] = None, - is_iam_admin: Optional[bool] = None, url: Optional[str] = None ): self.can = can @@ -12142,7 +12114,6 @@ def __init__( self.allow_normal_group_membership = allow_normal_group_membership self.allow_roles_from_normal_groups = allow_roles_from_normal_groups self.embed_group_folder_id = embed_group_folder_id - self.is_iam_admin = is_iam_admin self.url = url @@ -13323,7 +13294,7 @@ class WriteDashboardElement(model.Model): body_text: Text tile body text dashboard_id: Id of Dashboard look: Dynamic writeable type for LookWithQuery removes: - can, content_metadata_id, id, content_favorite_id, created_at, deleted_at, deleter_id, embed_url, excel_file_url, favorite_count, google_spreadsheet_formula, image_embed_url, last_accessed_at, last_updater_id, last_viewed_at, model, public_slug, public_url, short_url, updated_at, view_count, url + can, content_metadata_id, id, content_favorite_id, created_at, deleted_at, deleter_id, embed_url, excel_file_url, favorite_count, google_spreadsheet_formula, image_embed_url, last_accessed_at, last_updater_id, last_viewed_at, model, public_slug, public_url, short_url, updated_at, user_name, view_count, url look_id: Id Of Look merge_result_id: ID of merge result note_display: Note Display @@ -13600,7 +13571,7 @@ def __init__( class WriteDBConnection(model.Model): """ Dynamic writeable type for DBConnection removes: - can, dialect, snippets, pdts_enabled, uses_oauth, uses_instance_oauth, supports_data_studio_link, created_at, user_id, example, last_regen_at, last_reap_at, managed, default_bq_connection, bq_roles_verified + can, dialect, snippets, pdts_enabled, uses_oauth, uses_instance_oauth, supports_data_studio_link, created_at, user_id, example, last_regen_at, last_reap_at, managed, default_bq_connection, p4sa_name Attributes: name: Name of the connection. Also used as the unique identifier @@ -13645,6 +13616,7 @@ class WriteDBConnection(model.Model): pdt_api_control_enabled: PDT builds on this connection can be kicked off and cancelled via API. connection_pooling: Enable database connection pooling. bq_storage_project_id: The project id of the default BigQuery storage project. + bq_roles_verified: When true, represents that all project roles have been verified. """ name: Optional[str] = None @@ -13688,6 +13660,7 @@ class WriteDBConnection(model.Model): pdt_api_control_enabled: Optional[bool] = None connection_pooling: Optional[bool] = None bq_storage_project_id: Optional[str] = None + bq_roles_verified: Optional[bool] = None def __init__( self, @@ -13732,7 +13705,8 @@ def __init__( cost_estimate_enabled: Optional[bool] = None, pdt_api_control_enabled: Optional[bool] = None, connection_pooling: Optional[bool] = None, - bq_storage_project_id: Optional[str] = None + bq_storage_project_id: Optional[str] = None, + bq_roles_verified: Optional[bool] = None ): self.name = name self.host = host @@ -13775,6 +13749,7 @@ def __init__( self.pdt_api_control_enabled = pdt_api_control_enabled self.connection_pooling = connection_pooling self.bq_storage_project_id = bq_storage_project_id + self.bq_roles_verified = bq_roles_verified @attr.s(auto_attribs=True, init=False) @@ -14272,7 +14247,7 @@ def __init__( class WriteLookWithQuery(model.Model): """ Dynamic writeable type for LookWithQuery removes: - can, content_metadata_id, id, content_favorite_id, created_at, deleted_at, deleter_id, embed_url, excel_file_url, favorite_count, google_spreadsheet_formula, image_embed_url, last_accessed_at, last_updater_id, last_viewed_at, model, public_slug, public_url, short_url, updated_at, view_count, url + can, content_metadata_id, id, content_favorite_id, created_at, deleted_at, deleter_id, embed_url, excel_file_url, favorite_count, google_spreadsheet_formula, image_embed_url, last_accessed_at, last_updater_id, last_viewed_at, model, public_slug, public_url, short_url, updated_at, user_name, view_count, url Attributes: title: Look Title @@ -15443,7 +15418,7 @@ def __init__( class WriteUser(model.Model): """ Dynamic writeable type for User removes: - can, avatar_url, avatar_url_without_sizing, credentials_api3, credentials_embed, credentials_google, credentials_ldap, credentials_looker_openid, credentials_oidc, credentials_saml, credentials_totp, display_name, email, embed_group_space_id, group_ids, id, looker_versions, personal_folder_id, presumed_looker_employee, role_ids, sessions, verified_looker_employee, roles_externally_managed, allow_direct_roles, allow_normal_group_membership, allow_roles_from_normal_groups, embed_group_folder_id, is_iam_admin, url + can, avatar_url, avatar_url_without_sizing, credentials_api3, credentials_embed, credentials_google, credentials_ldap, credentials_looker_openid, credentials_oidc, credentials_saml, credentials_totp, display_name, email, embed_group_space_id, group_ids, id, looker_versions, personal_folder_id, presumed_looker_employee, role_ids, sessions, verified_looker_employee, roles_externally_managed, allow_direct_roles, allow_normal_group_membership, allow_roles_from_normal_groups, embed_group_folder_id, url Attributes: credentials_email: Dynamic writeable type for CredentialsEmail removes: diff --git a/python/looker_sdk/sdk/constants.py b/python/looker_sdk/sdk/constants.py index a4c9b3cfb..fc218091e 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 = "24.16" +sdk_version = "24.18" environment_prefix = "LOOKERSDK" diff --git a/spec/Looker.4.0.json b/spec/Looker.4.0.json index 4f2357470..a8d3ab3a9 100644 --- a/spec/Looker.4.0.json +++ b/spec/Looker.4.0.json @@ -1,8 +1,8 @@ { "swagger": "2.0", "info": { - "version": "4.0.24.16", - "x-looker-release-version": "24.16.10", + "version": "4.0.24.18", + "x-looker-release-version": "24.18.48", "title": "Looker API 4.0 Reference", "description": "\nAPI 4.0 is the current release of the Looker API. API 3.x has been removed.\n\n### Authorization\n\nThe classic method of API authorization uses Looker **API** credentials for authorization and access control.\nLooker admins can create API 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://cloud.google.com/looker/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.\n\nFor details, see the [API Explorer documentation](https://cloud.google.com/looker/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://cloud.google.com/looker/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://cloud.google.com/looker/docs/r/api/versioning).\n\n\n### In This Release\n\nAPI 4.0 is the only supported API version for Looker starting with release 23.18. API 3.0 and 3.1 have been removed.\n\nAPI 4.0 has better support for strongly typed languages like TypeScript, Kotlin, Swift, Go, C#, and more.\n\nSee the [API 4.0 GA announcement](https://developers.looker.com/api/advanced-usage/version-4-ga) for more information\nabout API 4.0.\n\nThe API Explorer can be used to [interactively compare](https://cloud.google.com/looker/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://cloud.google.com/looker/docs/r/api/support-policy) for more information.\n\n\n", "contact": { @@ -426,9 +426,9 @@ ], "responses": { "200": { - "description": "query_task", + "description": "The query results.", "schema": { - "$ref": "#/definitions/QueryTask" + "type": "string" } }, "204": { @@ -18724,6 +18724,13 @@ "description": "Combine given search criteria in a boolean OR expression.", "required": false, "type": "boolean" + }, + { + "name": "is_support_role", + "in": "query", + "description": "Search for Looker support roles.", + "required": false, + "type": "boolean" } ], "responses": { @@ -20192,6 +20199,170 @@ "x-looker-rate-limited": true } }, + "/scheduled_plans/search": { + "get": { + "tags": [ + "ScheduledPlan" + ], + "operationId": "search_scheduled_plans", + "summary": "Search Scheduled Plans", + "description": "### Search Scheduled Plans\n\nReturns all scheduled plans which matches the given search criteria.\n\nIf no user_id is provided, this function returns the scheduled plans owned by the caller.\n\n\nTo list all schedules for all users, pass `all_users=true`.\n\n\nThe caller must have `see_schedules` permission to see other users' scheduled plans.\n\n\n", + "parameters": [ + { + "name": "user_id", + "in": "query", + "description": "Return scheduled plans belonging to this user_id. If not provided, returns scheduled plans owned by the caller.", + "required": false, + "type": "string" + }, + { + "name": "fields", + "in": "query", + "description": "Comma delimited list of field names. If provided, only the fields specified will be included in the response", + "required": false, + "type": "string" + }, + { + "name": "all_users", + "in": "query", + "description": "Return scheduled plans belonging to all users (caller needs see_schedules permission)", + "required": false, + "type": "boolean" + }, + { + "name": "limit", + "in": "query", + "description": "Number of results to return. (used with offset and takes priority over page and per_page)", + "required": false, + "type": "integer", + "format": "int64" + }, + { + "name": "offset", + "in": "query", + "description": "Number of results to skip before returning any. (used with limit and takes priority over page and per_page)", + "required": false, + "type": "integer", + "format": "int64" + }, + { + "name": "sorts", + "in": "query", + "description": "Fields to sort by.", + "required": false, + "type": "string" + }, + { + "name": "name", + "in": "query", + "description": "Match Scheduled plan's name.", + "required": false, + "type": "string" + }, + { + "name": "user_first_name", + "in": "query", + "description": "Returns scheduled plans belonging to user with this first name.", + "required": false, + "type": "string" + }, + { + "name": "user_last_name", + "in": "query", + "description": "Returns scheduled plans belonging to user with this last name.", + "required": false, + "type": "string" + }, + { + "name": "dashboard_id", + "in": "query", + "description": "Returns scheduled plans created on this Dashboard.", + "required": false, + "type": "string" + }, + { + "name": "look_id", + "in": "query", + "description": "Returns scheduled plans created on this Look.", + "required": false, + "type": "string" + }, + { + "name": "lookml_dashboard_id", + "in": "query", + "description": "Returns scheduled plans created on this LookML Dashboard.", + "required": false, + "type": "string" + }, + { + "name": "recipient", + "in": "query", + "description": "Match recipient address.", + "required": false, + "type": "string" + }, + { + "name": "destination_type", + "in": "query", + "description": "Match scheduled plan's destination type.", + "required": false, + "type": "string" + }, + { + "name": "delivery_format", + "in": "query", + "description": "Match scheduled plan's delivery format.", + "required": false, + "type": "string" + }, + { + "name": "filter_or", + "in": "query", + "description": "Combine given search criteria in a boolean OR expression", + "required": false, + "type": "boolean" + } + ], + "responses": { + "200": { + "description": "Scheduled Plan", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/ScheduledPlan" + } + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/Error" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/Error" + } + }, + "422": { + "description": "Validation Error", + "schema": { + "$ref": "#/definitions/ValidationError" + } + }, + "429": { + "description": "Too Many Requests", + "schema": { + "$ref": "#/definitions/Error" + } + } + }, + "x-looker-status": "alpha", + "x-looker-activity-type": "db_query", + "x-looker-rate-limited": true + } + }, "/scheduled_plans/look/{look_id}": { "get": { "tags": [ @@ -21235,7 +21406,7 @@ "schema": { "type": "array", "items": { - "$ref": "#/definitions/Folder" + "$ref": "#/definitions/FolderBase" } } }, @@ -21784,7 +21955,7 @@ ], "operationId": "run_sql_interface_query", "summary": "Run SQL Interface Query", - "description": "### Run a saved SQL interface query.\n\nThis runs a previously created SQL interface query.\n\nThe 'result_format' parameter specifies the desired structure and format of the response.\n\nSupported formats:\n\n| result_format | Description\n| :-----------: | :--- |\n| json | Plain json\n| json_bi | (*RECOMMENDED*) Row data plus metadata describing the fields, pivots, table calcs, and other aspects of the query\n| json_detail | (*LEGACY*) Row data plus metadata describing the fields, pivots, table calcs, and other aspects of the query\n| csv | Comma separated values with a header\n| txt | Tab separated values with a header\n| html | Simple html\n| md | Simple markdown\n| xlsx | MS Excel spreadsheet\n| sql | Returns the generated SQL rather than running the query\n\n\n", + "description": "### Run a saved SQL interface query.\n\nThis runs a previously created SQL interface query.\n\nThe 'result_format' parameter specifies the desired structure and format of the response.\n\nSupported formats:\n\n| result_format | Description\n| :-----------: | :--- |\n| json_bi | Row data plus metadata describing the fields, pivots, table calcs, and other aspects of the query\n\n\n", "produces": [ "text", "application/json" @@ -21808,9 +21979,9 @@ ], "responses": { "200": { - "description": "Query Formats", + "description": "Query Result", "schema": { - "$ref": "#/definitions/QueryFormats" + "$ref": "#/definitions/JsonBi" } }, "400": { @@ -29694,6 +29865,12 @@ "readOnly": true, "description": "Preferred way of viewing the content (only applies to dashboards)", "x-looker-nullable": true + }, + "model": { + "type": "string", + "readOnly": true, + "description": "Name of the model the explore belongs to", + "x-looker-nullable": true } }, "x-looker-status": "beta" @@ -29733,6 +29910,12 @@ "description": "Content slug", "x-looker-nullable": true }, + "content_url": { + "type": "string", + "readOnly": true, + "description": "Content url", + "x-looker-nullable": true + }, "title": { "type": "string", "readOnly": true, @@ -32677,9 +32860,14 @@ }, "bq_roles_verified": { "type": "boolean", - "readOnly": true, "description": "When true, represents that all project roles have been verified.", "x-looker-nullable": true + }, + "p4sa_name": { + "type": "string", + "readOnly": true, + "description": "The name of P4SA service account that is associated with the Looker instance", + "x-looker-nullable": true } }, "x-looker-status": "stable" @@ -36077,6 +36265,12 @@ "description": "Time that the Look was updated.", "x-looker-nullable": true }, + "user_name": { + "type": "string", + "readOnly": true, + "description": "Name of User that created the look.", + "x-looker-nullable": true + }, "view_count": { "type": "integer", "format": "int64", @@ -36264,6 +36458,12 @@ "description": "Time that the Look was updated.", "x-looker-nullable": true }, + "user_name": { + "type": "string", + "readOnly": true, + "description": "Name of User that created the look.", + "x-looker-nullable": true + }, "view_count": { "type": "integer", "format": "int64", @@ -36463,6 +36663,12 @@ "description": "Time that the Look was updated.", "x-looker-nullable": true }, + "user_name": { + "type": "string", + "readOnly": true, + "description": "Name of User that created the look.", + "x-looker-nullable": true + }, "view_count": { "type": "integer", "format": "int64", @@ -39106,56 +39312,6 @@ }, "x-looker-status": "stable" }, - "QueryFormats": { - "properties": { - "json_bi": { - "$ref": "#/definitions/JsonBi", - "readOnly": true, - "x-looker-nullable": true - }, - "json": { - "type": "string", - "readOnly": true, - "x-looker-nullable": true - }, - "json_detail": { - "type": "string", - "readOnly": true, - "x-looker-nullable": true - }, - "csv": { - "type": "string", - "readOnly": true, - "x-looker-nullable": true - }, - "txt": { - "type": "string", - "readOnly": true, - "x-looker-nullable": true - }, - "html": { - "type": "string", - "readOnly": true, - "x-looker-nullable": true - }, - "md": { - "type": "string", - "readOnly": true, - "x-looker-nullable": true - }, - "xlsx": { - "type": "string", - "readOnly": true, - "x-looker-nullable": true - }, - "sql": { - "type": "string", - "readOnly": true, - "x-looker-nullable": true - } - }, - "x-looker-status": "stable" - }, "Query": { "properties": { "can": { @@ -42991,12 +43147,6 @@ "description": "(Embed only) ID of user's group folder based on the external_group_id optionally specified during embed user login", "x-looker-nullable": true }, - "is_iam_admin": { - "type": "boolean", - "readOnly": true, - "description": "User is an IAM Admin - only available in Looker (Google Cloud core)", - "x-looker-nullable": false - }, "url": { "type": "string", "format": "uri-reference", diff --git a/spec/Looker.4.0.oas.json b/spec/Looker.4.0.oas.json index 29fa040df..d9ec94240 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.24.16", - "x-looker-release-version": "24.16.10", + "version": "4.0.24.18", + "x-looker-release-version": "24.18.48", "title": "Looker API 4.0 Reference", "description": "\nAPI 4.0 is the current release of the Looker API. API 3.x has been removed.\n\n### Authorization\n\nThe classic method of API authorization uses Looker **API** credentials for authorization and access control.\nLooker admins can create API 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://cloud.google.com/looker/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.\n\nFor details, see the [API Explorer documentation](https://cloud.google.com/looker/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://cloud.google.com/looker/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://cloud.google.com/looker/docs/r/api/versioning).\n\n\n### In This Release\n\nAPI 4.0 is the only supported API version for Looker starting with release 23.18. API 3.0 and 3.1 have been removed.\n\nAPI 4.0 has better support for strongly typed languages like TypeScript, Kotlin, Swift, Go, C#, and more.\n\nSee the [API 4.0 GA announcement](https://developers.looker.com/api/advanced-usage/version-4-ga) for more information\nabout API 4.0.\n\nThe API Explorer can be used to [interactively compare](https://cloud.google.com/looker/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://cloud.google.com/looker/docs/r/api/support-policy) for more information.\n\n\n", "contact": { @@ -500,16 +500,16 @@ ], "responses": { "200": { - "description": "query_task", + "description": "The query results.", "content": { "text": { "schema": { - "$ref": "#/components/schemas/QueryTask" + "type": "string" } }, "application/json": { "schema": { - "$ref": "#/components/schemas/QueryTask" + "type": "string" } } } @@ -25902,6 +25902,15 @@ "schema": { "type": "boolean" } + }, + { + "name": "is_support_role", + "in": "query", + "description": "Search for Looker support roles.", + "required": false, + "schema": { + "type": "boolean" + } } ], "responses": { @@ -27920,6 +27929,222 @@ } } }, + "/scheduled_plans/search": { + "get": { + "tags": [ + "ScheduledPlan" + ], + "operationId": "search_scheduled_plans", + "summary": "Search Scheduled Plans", + "description": "### Search Scheduled Plans\n\nReturns all scheduled plans which matches the given search criteria.\n\nIf no user_id is provided, this function returns the scheduled plans owned by the caller.\n\n\nTo list all schedules for all users, pass `all_users=true`.\n\n\nThe caller must have `see_schedules` permission to see other users' scheduled plans.\n\n\n", + "parameters": [ + { + "name": "user_id", + "in": "query", + "description": "Return scheduled plans belonging to this user_id. If not provided, returns scheduled plans owned by the caller.", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "fields", + "in": "query", + "description": "Comma delimited list of field names. If provided, only the fields specified will be included in the response", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "all_users", + "in": "query", + "description": "Return scheduled plans belonging to all users (caller needs see_schedules permission)", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "limit", + "in": "query", + "description": "Number of results to return. (used with offset and takes priority over page and per_page)", + "required": false, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "offset", + "in": "query", + "description": "Number of results to skip before returning any. (used with limit and takes priority over page and per_page)", + "required": false, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "sorts", + "in": "query", + "description": "Fields to sort by.", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "name", + "in": "query", + "description": "Match Scheduled plan's name.", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "user_first_name", + "in": "query", + "description": "Returns scheduled plans belonging to user with this first name.", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "user_last_name", + "in": "query", + "description": "Returns scheduled plans belonging to user with this last name.", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "dashboard_id", + "in": "query", + "description": "Returns scheduled plans created on this Dashboard.", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "look_id", + "in": "query", + "description": "Returns scheduled plans created on this Look.", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "lookml_dashboard_id", + "in": "query", + "description": "Returns scheduled plans created on this LookML Dashboard.", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "recipient", + "in": "query", + "description": "Match recipient address.", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "destination_type", + "in": "query", + "description": "Match scheduled plan's destination type.", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "delivery_format", + "in": "query", + "description": "Match scheduled plan's delivery format.", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "filter_or", + "in": "query", + "description": "Combine given search criteria in a boolean OR expression", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "200": { + "description": "Scheduled Plan", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ScheduledPlan" + } + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Not Found", + "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": "alpha", + "x-looker-activity-type": "db_query", + "x-looker-rate-limited": true + } + }, "/scheduled_plans/look/{look_id}": { "get": { "tags": [ @@ -29343,7 +29568,7 @@ "schema": { "type": "array", "items": { - "$ref": "#/components/schemas/Folder" + "$ref": "#/components/schemas/FolderBase" } } } @@ -30086,7 +30311,7 @@ ], "operationId": "run_sql_interface_query", "summary": "Run SQL Interface Query", - "description": "### Run a saved SQL interface query.\n\nThis runs a previously created SQL interface query.\n\nThe 'result_format' parameter specifies the desired structure and format of the response.\n\nSupported formats:\n\n| result_format | Description\n| :-----------: | :--- |\n| json | Plain json\n| json_bi | (*RECOMMENDED*) Row data plus metadata describing the fields, pivots, table calcs, and other aspects of the query\n| json_detail | (*LEGACY*) Row data plus metadata describing the fields, pivots, table calcs, and other aspects of the query\n| csv | Comma separated values with a header\n| txt | Tab separated values with a header\n| html | Simple html\n| md | Simple markdown\n| xlsx | MS Excel spreadsheet\n| sql | Returns the generated SQL rather than running the query\n\n\n", + "description": "### Run a saved SQL interface query.\n\nThis runs a previously created SQL interface query.\n\nThe 'result_format' parameter specifies the desired structure and format of the response.\n\nSupported formats:\n\n| result_format | Description\n| :-----------: | :--- |\n| json_bi | Row data plus metadata describing the fields, pivots, table calcs, and other aspects of the query\n\n\n", "parameters": [ { "name": "query_id", @@ -30110,16 +30335,16 @@ ], "responses": { "200": { - "description": "Query Formats", + "description": "Query Result", "content": { "text": { "schema": { - "$ref": "#/components/schemas/QueryFormats" + "$ref": "#/components/schemas/JsonBi" } }, "application/json": { "schema": { - "$ref": "#/components/schemas/QueryFormats" + "$ref": "#/components/schemas/JsonBi" } } } @@ -40333,6 +40558,12 @@ "readOnly": true, "description": "Preferred way of viewing the content (only applies to dashboards)", "nullable": true + }, + "model": { + "type": "string", + "readOnly": true, + "description": "Name of the model the explore belongs to", + "nullable": true } }, "x-looker-status": "beta" @@ -40372,6 +40603,12 @@ "description": "Content slug", "nullable": true }, + "content_url": { + "type": "string", + "readOnly": true, + "description": "Content url", + "nullable": true + }, "title": { "type": "string", "readOnly": true, @@ -43264,9 +43501,14 @@ }, "bq_roles_verified": { "type": "boolean", - "readOnly": true, "description": "When true, represents that all project roles have been verified.", "nullable": true + }, + "p4sa_name": { + "type": "string", + "readOnly": true, + "description": "The name of P4SA service account that is associated with the Looker instance", + "nullable": true } }, "x-looker-status": "stable" @@ -46643,6 +46885,12 @@ "description": "Time that the Look was updated.", "nullable": true }, + "user_name": { + "type": "string", + "readOnly": true, + "description": "Name of User that created the look.", + "nullable": true + }, "view_count": { "type": "integer", "format": "int64", @@ -46824,6 +47072,12 @@ "description": "Time that the Look was updated.", "nullable": true }, + "user_name": { + "type": "string", + "readOnly": true, + "description": "Name of User that created the look.", + "nullable": true + }, "view_count": { "type": "integer", "format": "int64", @@ -47014,6 +47268,12 @@ "description": "Time that the Look was updated.", "nullable": true }, + "user_name": { + "type": "string", + "readOnly": true, + "description": "Name of User that created the look.", + "nullable": true + }, "view_count": { "type": "integer", "format": "int64", @@ -49639,54 +49899,6 @@ }, "x-looker-status": "stable" }, - "QueryFormats": { - "properties": { - "json_bi": { - "$ref": "#/components/schemas/JsonBi" - }, - "json": { - "type": "string", - "readOnly": true, - "nullable": true - }, - "json_detail": { - "type": "string", - "readOnly": true, - "nullable": true - }, - "csv": { - "type": "string", - "readOnly": true, - "nullable": true - }, - "txt": { - "type": "string", - "readOnly": true, - "nullable": true - }, - "html": { - "type": "string", - "readOnly": true, - "nullable": true - }, - "md": { - "type": "string", - "readOnly": true, - "nullable": true - }, - "xlsx": { - "type": "string", - "readOnly": true, - "nullable": true - }, - "sql": { - "type": "string", - "readOnly": true, - "nullable": true - } - }, - "x-looker-status": "stable" - }, "Query": { "properties": { "can": { @@ -53445,12 +53657,6 @@ "description": "(Embed only) ID of user's group folder based on the external_group_id optionally specified during embed user login", "nullable": true }, - "is_iam_admin": { - "type": "boolean", - "readOnly": true, - "description": "User is an IAM Admin - only available in Looker (Google Cloud core)", - "nullable": false - }, "url": { "type": "string", "format": "uri-reference", diff --git a/swift/looker/rtl/constants.swift b/swift/looker/rtl/constants.swift index 0c30c42b0..5e6d1f01a 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 = "24.16" + public static let lookerVersion = "24.18" 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 55d03ae21..2b9eee85b 100644 --- a/swift/looker/sdk/methods.swift +++ b/swift/looker/sdk/methods.swift @@ -25,7 +25,7 @@ */ /** - * 466 API methods + * 467 API methods */ @@ -5414,7 +5414,7 @@ open class LookerSDK: APIMethods { * * All personal folders will be returned. * - * GET /folders -> [Folder] + * GET /folders -> [FolderBase] */ public func all_folders( /** @@ -5422,8 +5422,8 @@ open class LookerSDK: APIMethods { */ fields: String? = nil, options: ITransportSettings? = nil - ) -> SDKResponse<[Folder], SDKError> { - let result: SDKResponse<[Folder], SDKError> = self.get("/folders", + ) -> SDKResponse<[FolderBase], SDKError> { + let result: SDKResponse<[FolderBase], SDKError> = self.get("/folders", ["fields": fields], nil, options) return result } @@ -8244,7 +8244,7 @@ open class LookerSDK: APIMethods { * will be in the message of the 400 error response, but not as detailed as expressed in `json_detail.errors`. * These data formats can only carry row data, and error info is not row data. * - * GET /query_tasks/{query_task_id}/results -> QueryTask + * GET /query_tasks/{query_task_id}/results -> String */ public func query_task_results( /** @@ -8252,9 +8252,9 @@ open class LookerSDK: APIMethods { */ _ query_task_id: String, options: ITransportSettings? = nil - ) -> SDKResponse { + ) -> SDKResponse { let path_query_task_id = encodeParam(query_task_id) - let result: SDKResponse = self.get("/query_tasks/\(path_query_task_id)/results", nil, nil, options) + let result: SDKResponse = self.get("/query_tasks/\(path_query_task_id)/results", nil, nil, options) return result } @@ -9499,10 +9499,14 @@ open class LookerSDK: APIMethods { * @param {Bool} filter_or Combine given search criteria in a boolean OR expression. */ filter_or: Bool? = nil, + /** + * @param {Bool} is_support_role Search for Looker support roles. + */ + is_support_role: Bool? = nil, options: ITransportSettings? = nil ) -> SDKResponse<[Role], SDKError> { let result: SDKResponse<[Role], SDKError> = self.get("/roles/search", - ["fields": fields, "limit": limit, "offset": offset, "sorts": sorts, "id": id, "name": name, "built_in": built_in as Any?, "filter_or": filter_or as Any?], nil, options) + ["fields": fields, "limit": limit, "offset": offset, "sorts": sorts, "id": id, "name": name, "built_in": built_in as Any?, "filter_or": filter_or as Any?, "is_support_role": is_support_role as Any?], nil, options) return result } @@ -10017,6 +10021,93 @@ open class LookerSDK: APIMethods { return result } + /** + * ### Search Scheduled Plans + * + * Returns all scheduled plans which matches the given search criteria. + * + * If no user_id is provided, this function returns the scheduled plans owned by the caller. + * + * + * To list all schedules for all users, pass `all_users=true`. + * + * + * The caller must have `see_schedules` permission to see other users' scheduled plans. + * + * GET /scheduled_plans/search -> [ScheduledPlan] + */ + public func search_scheduled_plans( + /** + * @param {String} user_id Return scheduled plans belonging to this user_id. If not provided, returns scheduled plans owned by the caller. + */ + user_id: String? = nil, + /** + * @param {String} fields Comma delimited list of field names. If provided, only the fields specified will be included in the response + */ + fields: String? = nil, + /** + * @param {Bool} all_users Return scheduled plans belonging to all users (caller needs see_schedules permission) + */ + all_users: Bool? = nil, + /** + * @param {Int64} limit Number of results to return. (used with offset and takes priority over page and per_page) + */ + limit: Int64? = nil, + /** + * @param {Int64} offset Number of results to skip before returning any. (used with limit and takes priority over page and per_page) + */ + offset: Int64? = nil, + /** + * @param {String} sorts Fields to sort by. + */ + sorts: String? = nil, + /** + * @param {String} name Match Scheduled plan's name. + */ + name: String? = nil, + /** + * @param {String} user_first_name Returns scheduled plans belonging to user with this first name. + */ + user_first_name: String? = nil, + /** + * @param {String} user_last_name Returns scheduled plans belonging to user with this last name. + */ + user_last_name: String? = nil, + /** + * @param {String} dashboard_id Returns scheduled plans created on this Dashboard. + */ + dashboard_id: String? = nil, + /** + * @param {String} look_id Returns scheduled plans created on this Look. + */ + look_id: String? = nil, + /** + * @param {String} lookml_dashboard_id Returns scheduled plans created on this LookML Dashboard. + */ + lookml_dashboard_id: String? = nil, + /** + * @param {String} recipient Match recipient address. + */ + recipient: String? = nil, + /** + * @param {String} destination_type Match scheduled plan's destination type. + */ + destination_type: String? = nil, + /** + * @param {String} delivery_format Match scheduled plan's delivery format. + */ + delivery_format: String? = nil, + /** + * @param {Bool} filter_or Combine given search criteria in a boolean OR expression + */ + filter_or: Bool? = nil, + options: ITransportSettings? = nil + ) -> SDKResponse<[ScheduledPlan], SDKError> { + let result: SDKResponse<[ScheduledPlan], SDKError> = self.get("/scheduled_plans/search", + ["user_id": user_id, "fields": fields, "all_users": all_users as Any?, "limit": limit, "offset": offset, "sorts": sorts, "name": name, "user_first_name": user_first_name, "user_last_name": user_last_name, "dashboard_id": dashboard_id, "look_id": look_id, "lookml_dashboard_id": lookml_dashboard_id, "recipient": recipient, "destination_type": destination_type, "delivery_format": delivery_format, "filter_or": filter_or as Any?], nil, options) + return result + } + /** * ### Get Scheduled Plans for a Look * @@ -10289,17 +10380,9 @@ open class LookerSDK: APIMethods { * * | result_format | Description * | :-----------: | :--- | - * | json | Plain json - * | json_bi | (*RECOMMENDED*) Row data plus metadata describing the fields, pivots, table calcs, and other aspects of the query - * | json_detail | (*LEGACY*) Row data plus metadata describing the fields, pivots, table calcs, and other aspects of the query - * | csv | Comma separated values with a header - * | txt | Tab separated values with a header - * | html | Simple html - * | md | Simple markdown - * | xlsx | MS Excel spreadsheet - * | sql | Returns the generated SQL rather than running the query + * | json_bi | Row data plus metadata describing the fields, pivots, table calcs, and other aspects of the query * - * GET /sql_interface_queries/{query_id}/run/{result_format} -> QueryFormats + * GET /sql_interface_queries/{query_id}/run/{result_format} -> JsonBi */ public func run_sql_interface_query( /** @@ -10311,10 +10394,10 @@ open class LookerSDK: APIMethods { */ _ result_format: String, options: ITransportSettings? = nil - ) -> SDKResponse { + ) -> SDKResponse { let path_query_id = encodeParam(query_id) let path_result_format = encodeParam(result_format) - let result: SDKResponse = self.get("/sql_interface_queries/\(path_query_id)/run/\(path_result_format)", nil, nil, options) + let result: SDKResponse = self.get("/sql_interface_queries/\(path_query_id)/run/\(path_result_format)", nil, nil, options) return result } diff --git a/swift/looker/sdk/models.swift b/swift/looker/sdk/models.swift index 1434d3dc2..b66096634 100644 --- a/swift/looker/sdk/models.swift +++ b/swift/looker/sdk/models.swift @@ -25,7 +25,7 @@ */ /** - * 343 API models: 260 Spec, 0 Request, 61 Write, 22 Enum + * 342 API models: 259 Spec, 0 Request, 61 Write, 22 Enum */ @@ -2201,6 +2201,7 @@ public struct ContentSearch: SDKModel { case _folder_name = "folder_name" case _view_count = "view_count" case _preferred_viewer = "preferred_viewer" + case _model = "model" } /** * Operations the current user is able to perform on this object (read-only) @@ -2279,7 +2280,16 @@ public struct ContentSearch: SDKModel { set { _preferred_viewer = newValue.map(AnyString.init) } } - public init(can: StringDictionary? = nil, content_id: String? = nil, type: String? = nil, title: String? = nil, description: String? = nil, folder_id: String? = nil, folder_name: String? = nil, view_count: Int64? = nil, preferred_viewer: String? = nil) { + private var _model: AnyString? + /** + * Name of the model the explore belongs to (read-only) + */ + public var model: String? { + get { _model?.value } + set { _model = newValue.map(AnyString.init) } + } + + public init(can: StringDictionary? = nil, content_id: String? = nil, type: String? = nil, title: String? = nil, description: String? = nil, folder_id: String? = nil, folder_name: String? = nil, view_count: Int64? = nil, preferred_viewer: String? = nil, model: String? = nil) { self.can = can self._content_id = content_id.map(AnyString.init) self._type = type.map(AnyString.init) @@ -2289,6 +2299,7 @@ public struct ContentSearch: SDKModel { self._folder_name = folder_name.map(AnyString.init) self._view_count = view_count.map(AnyInt.init) self._preferred_viewer = preferred_viewer.map(AnyString.init) + self._model = model.map(AnyString.init) } } @@ -2301,6 +2312,7 @@ public struct ContentSummary: SDKModel { case _content_type = "content_type" case _content_id = "content_id" case _content_slug = "content_slug" + case _content_url = "content_url" case _title = "title" case _description = "description" case last_viewed_at @@ -2356,6 +2368,15 @@ public struct ContentSummary: SDKModel { set { _content_slug = newValue.map(AnyString.init) } } + private var _content_url: AnyString? + /** + * Content url (read-only) + */ + public var content_url: String? { + get { _content_url?.value } + set { _content_url = newValue.map(AnyString.init) } + } + private var _title: AnyString? /** * Content title (read-only) @@ -2453,12 +2474,13 @@ public struct ContentSummary: SDKModel { set { _preferred_viewer = newValue.map(AnyString.init) } } - public init(can: StringDictionary? = nil, id: String? = nil, content_type: String? = nil, content_id: String? = nil, content_slug: String? = nil, title: String? = nil, description: String? = nil, last_viewed_at: Date? = nil, user_id: String? = nil, user_full_name: String? = nil, is_scheduled: Bool? = nil, favorite_count: Int64? = nil, view_count: Int64? = nil, favorite_id: String? = nil, weighted_score: Float? = nil, group_weighted_score: Float? = nil, suggestion_score: Float? = nil, preferred_viewer: String? = nil) { + public init(can: StringDictionary? = nil, id: String? = nil, content_type: String? = nil, content_id: String? = nil, content_slug: String? = nil, content_url: String? = nil, title: String? = nil, description: String? = nil, last_viewed_at: Date? = nil, user_id: String? = nil, user_full_name: String? = nil, is_scheduled: Bool? = nil, favorite_count: Int64? = nil, view_count: Int64? = nil, favorite_id: String? = nil, weighted_score: Float? = nil, group_weighted_score: Float? = nil, suggestion_score: Float? = nil, preferred_viewer: String? = nil) { self.can = can self._id = id.map(AnyString.init) self._content_type = content_type.map(AnyString.init) self._content_id = content_id.map(AnyString.init) self._content_slug = content_slug.map(AnyString.init) + self._content_url = content_url.map(AnyString.init) self._title = title.map(AnyString.init) self._description = description.map(AnyString.init) self.last_viewed_at = last_viewed_at @@ -7024,6 +7046,7 @@ public struct DBConnection: SDKModel { case default_bq_connection case _bq_storage_project_id = "bq_storage_project_id" case bq_roles_verified + case _p4sa_name = "p4sa_name" } /** * Operations the current user is able to perform on this object (read-only) @@ -7423,11 +7446,20 @@ public struct DBConnection: SDKModel { } /** - * When true, represents that all project roles have been verified. (read-only) + * When true, represents that all project roles have been verified. */ public var bq_roles_verified: Bool? - public init(can: StringDictionary? = nil, name: String? = nil, dialect: Dialect? = nil, snippets: [Snippet]? = nil, pdts_enabled: Bool? = nil, host: String? = nil, port: String? = nil, username: String? = nil, password: String? = nil, uses_oauth: Bool? = nil, uses_instance_oauth: Bool? = nil, certificate: String? = nil, file_type: String? = nil, database: String? = nil, db_timezone: String? = nil, query_timezone: String? = nil, schema: String? = nil, max_connections: Int64? = nil, max_queries: Int64? = nil, max_queries_per_user: Int64? = nil, max_billing_gigabytes: String? = nil, ssl: Bool? = nil, verify_ssl: Bool? = nil, tmp_db_name: String? = nil, jdbc_additional_params: String? = nil, pool_timeout: Int64? = nil, dialect_name: String? = nil, supports_data_studio_link: Bool? = nil, created_at: String? = nil, user_id: String? = nil, example: Bool? = nil, user_db_credentials: Bool? = nil, user_attribute_fields: [String]? = nil, maintenance_cron: String? = nil, last_regen_at: String? = nil, last_reap_at: String? = nil, sql_runner_precache_tables: Bool? = nil, sql_writing_with_info_schema: Bool? = nil, after_connect_statements: String? = nil, pdt_context_override: DBConnectionOverride? = nil, managed: Bool? = nil, custom_local_port: Int64? = nil, tunnel_id: String? = nil, uses_tns: Bool? = nil, pdt_concurrency: Int64? = nil, disable_context_comment: Bool? = nil, oauth_application_id: String? = nil, always_retry_failed_builds: Bool? = nil, uses_application_default_credentials: Bool? = nil, impersonated_service_account: String? = nil, cost_estimate_enabled: Bool? = nil, pdt_api_control_enabled: Bool? = nil, connection_pooling: Bool? = nil, default_bq_connection: Bool? = nil, bq_storage_project_id: String? = nil, bq_roles_verified: Bool? = nil) { + private var _p4sa_name: AnyString? + /** + * The name of P4SA service account that is associated with the Looker instance (read-only) + */ + public var p4sa_name: String? { + get { _p4sa_name?.value } + set { _p4sa_name = newValue.map(AnyString.init) } + } + + public init(can: StringDictionary? = nil, name: String? = nil, dialect: Dialect? = nil, snippets: [Snippet]? = nil, pdts_enabled: Bool? = nil, host: String? = nil, port: String? = nil, username: String? = nil, password: String? = nil, uses_oauth: Bool? = nil, uses_instance_oauth: Bool? = nil, certificate: String? = nil, file_type: String? = nil, database: String? = nil, db_timezone: String? = nil, query_timezone: String? = nil, schema: String? = nil, max_connections: Int64? = nil, max_queries: Int64? = nil, max_queries_per_user: Int64? = nil, max_billing_gigabytes: String? = nil, ssl: Bool? = nil, verify_ssl: Bool? = nil, tmp_db_name: String? = nil, jdbc_additional_params: String? = nil, pool_timeout: Int64? = nil, dialect_name: String? = nil, supports_data_studio_link: Bool? = nil, created_at: String? = nil, user_id: String? = nil, example: Bool? = nil, user_db_credentials: Bool? = nil, user_attribute_fields: [String]? = nil, maintenance_cron: String? = nil, last_regen_at: String? = nil, last_reap_at: String? = nil, sql_runner_precache_tables: Bool? = nil, sql_writing_with_info_schema: Bool? = nil, after_connect_statements: String? = nil, pdt_context_override: DBConnectionOverride? = nil, managed: Bool? = nil, custom_local_port: Int64? = nil, tunnel_id: String? = nil, uses_tns: Bool? = nil, pdt_concurrency: Int64? = nil, disable_context_comment: Bool? = nil, oauth_application_id: String? = nil, always_retry_failed_builds: Bool? = nil, uses_application_default_credentials: Bool? = nil, impersonated_service_account: String? = nil, cost_estimate_enabled: Bool? = nil, pdt_api_control_enabled: Bool? = nil, connection_pooling: Bool? = nil, default_bq_connection: Bool? = nil, bq_storage_project_id: String? = nil, bq_roles_verified: Bool? = nil, p4sa_name: String? = nil) { self.can = can self._name = name.map(AnyString.init) self.dialect = dialect @@ -7484,6 +7516,7 @@ public struct DBConnection: SDKModel { self.default_bq_connection = default_bq_connection self._bq_storage_project_id = bq_storage_project_id.map(AnyString.init) self.bq_roles_verified = bq_roles_verified + self._p4sa_name = p4sa_name.map(AnyString.init) } } @@ -12697,6 +12730,7 @@ public struct Look: SDKModel { case folder case _folder_id = "folder_id" case updated_at + case _user_name = "user_name" case _view_count = "view_count" } /** @@ -12910,6 +12944,15 @@ public struct Look: SDKModel { */ public var updated_at: Date? + private var _user_name: AnyString? + /** + * Name of User that created the look. (read-only) + */ + public var user_name: String? { + get { _user_name?.value } + set { _user_name = newValue.map(AnyString.init) } + } + private var _view_count: AnyInt? /** * Number of times viewed in the Looker web UI (read-only) @@ -12919,7 +12962,7 @@ public struct Look: SDKModel { set { _view_count = newValue.map(AnyInt.init) } } - public init(can: StringDictionary? = nil, content_metadata_id: String? = nil, id: String? = nil, title: String? = nil, user_id: String? = nil, content_favorite_id: String? = nil, created_at: Date? = nil, deleted: Bool? = nil, deleted_at: Date? = nil, deleter_id: String? = 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: String? = nil, last_viewed_at: Date? = nil, model: LookModel? = nil, `public`: Bool? = nil, public_slug: String? = nil, public_url: String? = nil, query_id: String? = 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: String? = nil, id: String? = nil, title: String? = nil, user_id: String? = nil, content_favorite_id: String? = nil, created_at: Date? = nil, deleted: Bool? = nil, deleted_at: Date? = nil, deleter_id: String? = 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: String? = nil, last_viewed_at: Date? = nil, model: LookModel? = nil, `public`: Bool? = nil, public_slug: String? = nil, public_url: String? = nil, query_id: String? = nil, short_url: String? = nil, folder: FolderBase? = nil, folder_id: String? = nil, updated_at: Date? = nil, user_name: String? = nil, view_count: Int64? = nil) { self.can = can self._content_metadata_id = content_metadata_id.map(AnyString.init) self._id = id.map(AnyString.init) @@ -12949,6 +12992,7 @@ public struct Look: SDKModel { self.folder = folder self._folder_id = folder_id.map(AnyString.init) self.updated_at = updated_at + self._user_name = user_name.map(AnyString.init) self._view_count = view_count.map(AnyInt.init) } @@ -14936,6 +14980,7 @@ public struct LookWithDashboards: SDKModel { case folder case _folder_id = "folder_id" case updated_at + case _user_name = "user_name" case _view_count = "view_count" case dashboards } @@ -15150,6 +15195,15 @@ public struct LookWithDashboards: SDKModel { */ public var updated_at: Date? + private var _user_name: AnyString? + /** + * Name of User that created the look. (read-only) + */ + public var user_name: String? { + get { _user_name?.value } + set { _user_name = newValue.map(AnyString.init) } + } + private var _view_count: AnyInt? /** * Number of times viewed in the Looker web UI (read-only) @@ -15164,7 +15218,7 @@ public struct LookWithDashboards: SDKModel { */ public var dashboards: [DashboardBase]? - public init(can: StringDictionary? = nil, content_metadata_id: String? = nil, id: String? = nil, title: String? = nil, user_id: String? = nil, content_favorite_id: String? = nil, created_at: Date? = nil, deleted: Bool? = nil, deleted_at: Date? = nil, deleter_id: String? = 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: String? = nil, last_viewed_at: Date? = nil, model: LookModel? = nil, `public`: Bool? = nil, public_slug: String? = nil, public_url: String? = nil, query_id: String? = 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: String? = nil, id: String? = nil, title: String? = nil, user_id: String? = nil, content_favorite_id: String? = nil, created_at: Date? = nil, deleted: Bool? = nil, deleted_at: Date? = nil, deleter_id: String? = 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: String? = nil, last_viewed_at: Date? = nil, model: LookModel? = nil, `public`: Bool? = nil, public_slug: String? = nil, public_url: String? = nil, query_id: String? = nil, short_url: String? = nil, folder: FolderBase? = nil, folder_id: String? = nil, updated_at: Date? = nil, user_name: String? = nil, view_count: Int64? = nil, dashboards: [DashboardBase]? = nil) { self.can = can self._content_metadata_id = content_metadata_id.map(AnyString.init) self._id = id.map(AnyString.init) @@ -15194,6 +15248,7 @@ public struct LookWithDashboards: SDKModel { self.folder = folder self._folder_id = folder_id.map(AnyString.init) self.updated_at = updated_at + self._user_name = user_name.map(AnyString.init) self._view_count = view_count.map(AnyInt.init) self.dashboards = dashboards } @@ -15232,6 +15287,7 @@ public struct LookWithQuery: SDKModel { case folder case _folder_id = "folder_id" case updated_at + case _user_name = "user_name" case _view_count = "view_count" case query case _url = "url" @@ -15447,6 +15503,15 @@ public struct LookWithQuery: SDKModel { */ public var updated_at: Date? + private var _user_name: AnyString? + /** + * Name of User that created the look. (read-only) + */ + public var user_name: String? { + get { _user_name?.value } + set { _user_name = newValue.map(AnyString.init) } + } + private var _view_count: AnyInt? /** * Number of times viewed in the Looker web UI (read-only) @@ -15467,7 +15532,7 @@ public struct LookWithQuery: SDKModel { set { _url = newValue.map(AnyString.init) } } - public init(can: StringDictionary? = nil, content_metadata_id: String? = nil, id: String? = nil, title: String? = nil, user_id: String? = nil, content_favorite_id: String? = nil, created_at: Date? = nil, deleted: Bool? = nil, deleted_at: Date? = nil, deleter_id: String? = 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: String? = nil, last_viewed_at: Date? = nil, model: LookModel? = nil, `public`: Bool? = nil, public_slug: String? = nil, public_url: String? = nil, query_id: String? = 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: String? = nil, id: String? = nil, title: String? = nil, user_id: String? = nil, content_favorite_id: String? = nil, created_at: Date? = nil, deleted: Bool? = nil, deleted_at: Date? = nil, deleter_id: String? = 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: String? = nil, last_viewed_at: Date? = nil, model: LookModel? = nil, `public`: Bool? = nil, public_slug: String? = nil, public_url: String? = nil, query_id: String? = nil, short_url: String? = nil, folder: FolderBase? = nil, folder_id: String? = nil, updated_at: Date? = nil, user_name: String? = nil, view_count: Int64? = nil, query: Query? = nil, url: String? = nil) { self.can = can self._content_metadata_id = content_metadata_id.map(AnyString.init) self._id = id.map(AnyString.init) @@ -15497,6 +15562,7 @@ public struct LookWithQuery: SDKModel { self.folder = folder self._folder_id = folder_id.map(AnyString.init) self.updated_at = updated_at + self._user_name = user_name.map(AnyString.init) self._view_count = view_count.map(AnyInt.init) self.query = query self._url = url.map(AnyString.init) @@ -18020,107 +18086,6 @@ public struct Query: SDKModel { } -public struct QueryFormats: SDKModel { - - private enum CodingKeys : String, CodingKey { - case json_bi - case _json = "json" - case _json_detail = "json_detail" - case _csv = "csv" - case _txt = "txt" - case _html = "html" - case _md = "md" - case _xlsx = "xlsx" - case _sql = "sql" - } - public var json_bi: JsonBi? - - private var _json: AnyString? - /** - * (read-only) - */ - public var json: String? { - get { _json?.value } - set { _json = newValue.map(AnyString.init) } - } - - private var _json_detail: AnyString? - /** - * (read-only) - */ - public var json_detail: String? { - get { _json_detail?.value } - set { _json_detail = newValue.map(AnyString.init) } - } - - private var _csv: AnyString? - /** - * (read-only) - */ - public var csv: String? { - get { _csv?.value } - set { _csv = newValue.map(AnyString.init) } - } - - private var _txt: AnyString? - /** - * (read-only) - */ - public var txt: String? { - get { _txt?.value } - set { _txt = newValue.map(AnyString.init) } - } - - private var _html: AnyString? - /** - * (read-only) - */ - public var html: String? { - get { _html?.value } - set { _html = newValue.map(AnyString.init) } - } - - private var _md: AnyString? - /** - * (read-only) - */ - public var md: String? { - get { _md?.value } - set { _md = newValue.map(AnyString.init) } - } - - private var _xlsx: AnyString? - /** - * (read-only) - */ - public var xlsx: String? { - get { _xlsx?.value } - set { _xlsx = newValue.map(AnyString.init) } - } - - private var _sql: AnyString? - /** - * (read-only) - */ - public var sql: String? { - get { _sql?.value } - set { _sql = newValue.map(AnyString.init) } - } - - public init(json_bi: JsonBi? = nil, json: String? = nil, json_detail: String? = nil, csv: String? = nil, txt: String? = nil, html: String? = nil, md: String? = nil, xlsx: String? = nil, sql: String? = nil) { - self.json_bi = json_bi - self._json = json.map(AnyString.init) - self._json_detail = json_detail.map(AnyString.init) - self._csv = csv.map(AnyString.init) - self._txt = txt.map(AnyString.init) - self._html = html.map(AnyString.init) - self._md = md.map(AnyString.init) - self._xlsx = xlsx.map(AnyString.init) - self._sql = sql.map(AnyString.init) - } - -} - public struct QueryTask: SDKModel { private enum CodingKeys : String, CodingKey { @@ -22574,7 +22539,6 @@ public struct User: SDKModel { case allow_normal_group_membership case allow_roles_from_normal_groups case _embed_group_folder_id = "embed_group_folder_id" - case is_iam_admin case _url = "url" } /** @@ -22791,11 +22755,6 @@ public struct User: SDKModel { set { _embed_group_folder_id = newValue.map(AnyString.init) } } - /** - * User is an IAM Admin - only available in Looker (Google Cloud core) (read-only) - */ - public var is_iam_admin: Bool? - private var _url: AnyString? /** * Link to get this item (read-only) @@ -22805,7 +22764,7 @@ public struct User: SDKModel { set { _url = newValue.map(AnyString.init) } } - public init(can: StringDictionary? = nil, avatar_url: String? = nil, avatar_url_without_sizing: String? = nil, credentials_api3: [CredentialsApi3]? = nil, credentials_email: CredentialsEmail? = nil, credentials_embed: [CredentialsEmbed]? = nil, credentials_google: CredentialsGoogle? = nil, credentials_ldap: CredentialsLDAP? = nil, credentials_looker_openid: CredentialsLookerOpenid? = nil, credentials_oidc: CredentialsOIDC? = nil, credentials_saml: CredentialsSaml? = nil, credentials_totp: CredentialsTotp? = nil, display_name: String? = nil, email: String? = nil, embed_group_space_id: String? = nil, first_name: String? = nil, group_ids: [String]? = nil, home_folder_id: String? = nil, id: String? = nil, is_disabled: Bool? = nil, last_name: String? = nil, locale: String? = nil, looker_versions: [String]? = nil, models_dir_validated: Bool? = nil, personal_folder_id: String? = nil, presumed_looker_employee: Bool? = nil, role_ids: [String]? = nil, sessions: [Session]? = nil, ui_state: StringDictionary? = nil, verified_looker_employee: Bool? = nil, roles_externally_managed: Bool? = nil, allow_direct_roles: Bool? = nil, allow_normal_group_membership: Bool? = nil, allow_roles_from_normal_groups: Bool? = nil, embed_group_folder_id: String? = nil, is_iam_admin: Bool? = nil, url: String? = nil) { + public init(can: StringDictionary? = nil, avatar_url: String? = nil, avatar_url_without_sizing: String? = nil, credentials_api3: [CredentialsApi3]? = nil, credentials_email: CredentialsEmail? = nil, credentials_embed: [CredentialsEmbed]? = nil, credentials_google: CredentialsGoogle? = nil, credentials_ldap: CredentialsLDAP? = nil, credentials_looker_openid: CredentialsLookerOpenid? = nil, credentials_oidc: CredentialsOIDC? = nil, credentials_saml: CredentialsSaml? = nil, credentials_totp: CredentialsTotp? = nil, display_name: String? = nil, email: String? = nil, embed_group_space_id: String? = nil, first_name: String? = nil, group_ids: [String]? = nil, home_folder_id: String? = nil, id: String? = nil, is_disabled: Bool? = nil, last_name: String? = nil, locale: String? = nil, looker_versions: [String]? = nil, models_dir_validated: Bool? = nil, personal_folder_id: String? = nil, presumed_looker_employee: Bool? = nil, role_ids: [String]? = nil, sessions: [Session]? = nil, ui_state: StringDictionary? = nil, verified_looker_employee: Bool? = nil, roles_externally_managed: Bool? = nil, allow_direct_roles: Bool? = nil, allow_normal_group_membership: Bool? = nil, allow_roles_from_normal_groups: Bool? = nil, embed_group_folder_id: String? = nil, url: String? = nil) { self.can = can self._avatar_url = avatar_url.map(AnyString.init) self._avatar_url_without_sizing = avatar_url_without_sizing.map(AnyString.init) @@ -22841,7 +22800,6 @@ public struct User: SDKModel { self.allow_normal_group_membership = allow_normal_group_membership self.allow_roles_from_normal_groups = allow_roles_from_normal_groups self._embed_group_folder_id = embed_group_folder_id.map(AnyString.init) - self.is_iam_admin = is_iam_admin self._url = url.map(AnyString.init) } @@ -24967,7 +24925,7 @@ public struct WriteDashboardElement: SDKModel { /** * Dynamic writeable type for LookWithQuery removes: - * can, content_metadata_id, id, content_favorite_id, created_at, deleted_at, deleter_id, embed_url, excel_file_url, favorite_count, google_spreadsheet_formula, image_embed_url, last_accessed_at, last_updater_id, last_viewed_at, model, public_slug, public_url, short_url, updated_at, view_count, url + * can, content_metadata_id, id, content_favorite_id, created_at, deleted_at, deleter_id, embed_url, excel_file_url, favorite_count, google_spreadsheet_formula, image_embed_url, last_accessed_at, last_updater_id, last_viewed_at, model, public_slug, public_url, short_url, updated_at, user_name, view_count, url */ public var look: WriteLookWithQuery? @@ -25487,7 +25445,7 @@ public struct WriteDatagroup: SDKModel { /** * Dynamic writeable type for DBConnection removes: - * can, dialect, snippets, pdts_enabled, uses_oauth, uses_instance_oauth, supports_data_studio_link, created_at, user_id, example, last_regen_at, last_reap_at, managed, default_bq_connection, bq_roles_verified + * can, dialect, snippets, pdts_enabled, uses_oauth, uses_instance_oauth, supports_data_studio_link, created_at, user_id, example, last_regen_at, last_reap_at, managed, default_bq_connection, p4sa_name */ public struct WriteDBConnection: SDKModel { @@ -25533,6 +25491,7 @@ public struct WriteDBConnection: SDKModel { case pdt_api_control_enabled case connection_pooling case _bq_storage_project_id = "bq_storage_project_id" + case bq_roles_verified } private var _name: AnyString? /** @@ -25852,7 +25811,12 @@ public struct WriteDBConnection: SDKModel { set { _bq_storage_project_id = newValue.map(AnyString.init) } } - public init(name: String? = nil, host: String? = nil, port: String? = nil, username: String? = nil, password: String? = nil, certificate: String? = nil, file_type: String? = nil, database: String? = nil, db_timezone: String? = nil, query_timezone: String? = nil, schema: String? = nil, max_connections: Int64? = nil, max_queries: Int64? = nil, max_queries_per_user: Int64? = nil, max_billing_gigabytes: String? = nil, ssl: Bool? = nil, verify_ssl: Bool? = nil, tmp_db_name: String? = nil, jdbc_additional_params: String? = nil, pool_timeout: Int64? = nil, dialect_name: String? = nil, user_db_credentials: Bool? = nil, user_attribute_fields: [String]? = nil, maintenance_cron: String? = nil, sql_runner_precache_tables: Bool? = nil, sql_writing_with_info_schema: Bool? = nil, after_connect_statements: String? = nil, pdt_context_override: WriteDBConnectionOverride? = nil, custom_local_port: Int64? = nil, tunnel_id: String? = nil, uses_tns: Bool? = nil, pdt_concurrency: Int64? = nil, disable_context_comment: Bool? = nil, oauth_application_id: String? = nil, always_retry_failed_builds: Bool? = nil, uses_application_default_credentials: Bool? = nil, impersonated_service_account: String? = nil, cost_estimate_enabled: Bool? = nil, pdt_api_control_enabled: Bool? = nil, connection_pooling: Bool? = nil, bq_storage_project_id: String? = nil) { + /** + * When true, represents that all project roles have been verified. + */ + public var bq_roles_verified: Bool? + + public init(name: String? = nil, host: String? = nil, port: String? = nil, username: String? = nil, password: String? = nil, certificate: String? = nil, file_type: String? = nil, database: String? = nil, db_timezone: String? = nil, query_timezone: String? = nil, schema: String? = nil, max_connections: Int64? = nil, max_queries: Int64? = nil, max_queries_per_user: Int64? = nil, max_billing_gigabytes: String? = nil, ssl: Bool? = nil, verify_ssl: Bool? = nil, tmp_db_name: String? = nil, jdbc_additional_params: String? = nil, pool_timeout: Int64? = nil, dialect_name: String? = nil, user_db_credentials: Bool? = nil, user_attribute_fields: [String]? = nil, maintenance_cron: String? = nil, sql_runner_precache_tables: Bool? = nil, sql_writing_with_info_schema: Bool? = nil, after_connect_statements: String? = nil, pdt_context_override: WriteDBConnectionOverride? = nil, custom_local_port: Int64? = nil, tunnel_id: String? = nil, uses_tns: Bool? = nil, pdt_concurrency: Int64? = nil, disable_context_comment: Bool? = nil, oauth_application_id: String? = nil, always_retry_failed_builds: Bool? = nil, uses_application_default_credentials: Bool? = nil, impersonated_service_account: String? = nil, cost_estimate_enabled: Bool? = nil, pdt_api_control_enabled: Bool? = nil, connection_pooling: Bool? = nil, bq_storage_project_id: String? = nil, bq_roles_verified: Bool? = nil) { self._name = name.map(AnyString.init) self._host = host.map(AnyString.init) self._port = port.map(AnyString.init) @@ -25894,6 +25858,7 @@ public struct WriteDBConnection: SDKModel { self.pdt_api_control_enabled = pdt_api_control_enabled self.connection_pooling = connection_pooling self._bq_storage_project_id = bq_storage_project_id.map(AnyString.init) + self.bq_roles_verified = bq_roles_verified } } @@ -26797,7 +26762,7 @@ public struct WriteLookmlModel: SDKModel { /** * Dynamic writeable type for LookWithQuery removes: - * can, content_metadata_id, id, content_favorite_id, created_at, deleted_at, deleter_id, embed_url, excel_file_url, favorite_count, google_spreadsheet_formula, image_embed_url, last_accessed_at, last_updater_id, last_viewed_at, model, public_slug, public_url, short_url, updated_at, view_count, url + * can, content_metadata_id, id, content_favorite_id, created_at, deleted_at, deleter_id, embed_url, excel_file_url, favorite_count, google_spreadsheet_formula, image_embed_url, last_accessed_at, last_updater_id, last_viewed_at, model, public_slug, public_url, short_url, updated_at, user_name, view_count, url */ public struct WriteLookWithQuery: SDKModel { @@ -28992,7 +28957,7 @@ public struct WriteTheme: SDKModel { /** * Dynamic writeable type for User removes: - * can, avatar_url, avatar_url_without_sizing, credentials_api3, credentials_embed, credentials_google, credentials_ldap, credentials_looker_openid, credentials_oidc, credentials_saml, credentials_totp, display_name, email, embed_group_space_id, group_ids, id, looker_versions, personal_folder_id, presumed_looker_employee, role_ids, sessions, verified_looker_employee, roles_externally_managed, allow_direct_roles, allow_normal_group_membership, allow_roles_from_normal_groups, embed_group_folder_id, is_iam_admin, url + * can, avatar_url, avatar_url_without_sizing, credentials_api3, credentials_embed, credentials_google, credentials_ldap, credentials_looker_openid, credentials_oidc, credentials_saml, credentials_totp, display_name, email, embed_group_space_id, group_ids, id, looker_versions, personal_folder_id, presumed_looker_employee, role_ids, sessions, verified_looker_employee, roles_externally_managed, allow_direct_roles, allow_normal_group_membership, allow_roles_from_normal_groups, embed_group_folder_id, url */ public struct WriteUser: SDKModel { diff --git a/swift/looker/sdk/streams.swift b/swift/looker/sdk/streams.swift index e5e843bbf..41aca0d49 100644 --- a/swift/looker/sdk/streams.swift +++ b/swift/looker/sdk/streams.swift @@ -25,7 +25,7 @@ */ /** - * 466 API methods + * 467 API methods */ @@ -5412,7 +5412,7 @@ open class LookerSDKStream: APIMethods { * * All personal folders will be returned. * - * GET /folders -> [Folder] + * GET /folders -> [FolderBase] */ public func all_folders( /** @@ -8242,7 +8242,7 @@ open class LookerSDKStream: APIMethods { * will be in the message of the 400 error response, but not as detailed as expressed in `json_detail.errors`. * These data formats can only carry row data, and error info is not row data. * - * GET /query_tasks/{query_task_id}/results -> QueryTask + * GET /query_tasks/{query_task_id}/results -> String */ public func query_task_results( /** @@ -9497,10 +9497,14 @@ open class LookerSDKStream: APIMethods { * @param {Bool} filter_or Combine given search criteria in a boolean OR expression. */ filter_or: Bool? = nil, + /** + * @param {Bool} is_support_role Search for Looker support roles. + */ + is_support_role: Bool? = nil, options: ITransportSettings? = nil ) -> SDKResponse { let result: SDKResponse = self.get("/roles/search", - ["fields": fields, "limit": limit, "offset": offset, "sorts": sorts, "id": id, "name": name, "built_in": built_in as Any?, "filter_or": filter_or as Any?], nil, options) + ["fields": fields, "limit": limit, "offset": offset, "sorts": sorts, "id": id, "name": name, "built_in": built_in as Any?, "filter_or": filter_or as Any?, "is_support_role": is_support_role as Any?], nil, options) return result } @@ -10015,6 +10019,93 @@ open class LookerSDKStream: APIMethods { return result } + /** + * ### Search Scheduled Plans + * + * Returns all scheduled plans which matches the given search criteria. + * + * If no user_id is provided, this function returns the scheduled plans owned by the caller. + * + * + * To list all schedules for all users, pass `all_users=true`. + * + * + * The caller must have `see_schedules` permission to see other users' scheduled plans. + * + * GET /scheduled_plans/search -> [ScheduledPlan] + */ + public func search_scheduled_plans( + /** + * @param {String} user_id Return scheduled plans belonging to this user_id. If not provided, returns scheduled plans owned by the caller. + */ + user_id: String? = nil, + /** + * @param {String} fields Comma delimited list of field names. If provided, only the fields specified will be included in the response + */ + fields: String? = nil, + /** + * @param {Bool} all_users Return scheduled plans belonging to all users (caller needs see_schedules permission) + */ + all_users: Bool? = nil, + /** + * @param {Int64} limit Number of results to return. (used with offset and takes priority over page and per_page) + */ + limit: Int64? = nil, + /** + * @param {Int64} offset Number of results to skip before returning any. (used with limit and takes priority over page and per_page) + */ + offset: Int64? = nil, + /** + * @param {String} sorts Fields to sort by. + */ + sorts: String? = nil, + /** + * @param {String} name Match Scheduled plan's name. + */ + name: String? = nil, + /** + * @param {String} user_first_name Returns scheduled plans belonging to user with this first name. + */ + user_first_name: String? = nil, + /** + * @param {String} user_last_name Returns scheduled plans belonging to user with this last name. + */ + user_last_name: String? = nil, + /** + * @param {String} dashboard_id Returns scheduled plans created on this Dashboard. + */ + dashboard_id: String? = nil, + /** + * @param {String} look_id Returns scheduled plans created on this Look. + */ + look_id: String? = nil, + /** + * @param {String} lookml_dashboard_id Returns scheduled plans created on this LookML Dashboard. + */ + lookml_dashboard_id: String? = nil, + /** + * @param {String} recipient Match recipient address. + */ + recipient: String? = nil, + /** + * @param {String} destination_type Match scheduled plan's destination type. + */ + destination_type: String? = nil, + /** + * @param {String} delivery_format Match scheduled plan's delivery format. + */ + delivery_format: String? = nil, + /** + * @param {Bool} filter_or Combine given search criteria in a boolean OR expression + */ + filter_or: Bool? = nil, + options: ITransportSettings? = nil + ) -> SDKResponse { + let result: SDKResponse = self.get("/scheduled_plans/search", + ["user_id": user_id, "fields": fields, "all_users": all_users as Any?, "limit": limit, "offset": offset, "sorts": sorts, "name": name, "user_first_name": user_first_name, "user_last_name": user_last_name, "dashboard_id": dashboard_id, "look_id": look_id, "lookml_dashboard_id": lookml_dashboard_id, "recipient": recipient, "destination_type": destination_type, "delivery_format": delivery_format, "filter_or": filter_or as Any?], nil, options) + return result + } + /** * ### Get Scheduled Plans for a Look * @@ -10287,17 +10378,9 @@ open class LookerSDKStream: APIMethods { * * | result_format | Description * | :-----------: | :--- | - * | json | Plain json - * | json_bi | (*RECOMMENDED*) Row data plus metadata describing the fields, pivots, table calcs, and other aspects of the query - * | json_detail | (*LEGACY*) Row data plus metadata describing the fields, pivots, table calcs, and other aspects of the query - * | csv | Comma separated values with a header - * | txt | Tab separated values with a header - * | html | Simple html - * | md | Simple markdown - * | xlsx | MS Excel spreadsheet - * | sql | Returns the generated SQL rather than running the query + * | json_bi | Row data plus metadata describing the fields, pivots, table calcs, and other aspects of the query * - * GET /sql_interface_queries/{query_id}/run/{result_format} -> QueryFormats + * GET /sql_interface_queries/{query_id}/run/{result_format} -> JsonBi */ public func run_sql_interface_query( /**