Skip to content

Commit

Permalink
feat: generate SDKs for Looker 24.18 (#1515)
Browse files Browse the repository at this point in the history
Release-As: 24.18.0
  • Loading branch information
drstrangelooker authored Oct 11, 2024
1 parent 2be3f92 commit 745a3a0
Show file tree
Hide file tree
Showing 24 changed files with 1,612 additions and 650 deletions.
2 changes: 1 addition & 1 deletion csharp/rtl/Constants.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down
107 changes: 86 additions & 21 deletions csharp/sdk/4.0/methods.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
/// SOFTWARE.
///

/// 466 API methods
/// 467 API methods

#nullable enable
using System;
Expand Down Expand Up @@ -4647,16 +4647,16 @@ public async Task<SdkResponse<string, Exception>> delete_folder(
///
/// All personal folders will be returned.
///
/// GET /folders -> Folder[]
/// GET /folders -> FolderBase[]
///
/// <returns><c>Folder[]</c> Folder (application/json)</returns>
/// <returns><c>FolderBase[]</c> Folder (application/json)</returns>
///
/// <param name="fields">Requested fields.</param>
public async Task<SdkResponse<Folder[], Exception>> all_folders(
public async Task<SdkResponse<FolderBase[], Exception>> all_folders(
string? fields = null,
ITransportSettings? options = null)
{
return await AuthRequest<Folder[], Exception>(HttpMethod.Get, "/folders", new Values {
return await AuthRequest<FolderBase[], Exception>(HttpMethod.Get, "/folders", new Values {
{ "fields", fields }},null,options);
}

Expand Down Expand Up @@ -7033,11 +7033,11 @@ public async Task<SdkResponse<QueryTask, Exception>> 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
///
/// <returns>
/// <c>QueryTask</c> query_task (text)
/// <c>QueryTask</c> query_task (application/json)
/// <c>string</c> The query results. (text)
/// <c>string</c> The query results. (application/json)
/// <c>string</c> The query is not finished (text)
/// <c>string</c> The query is not finished (application/json)
/// </returns>
Expand Down Expand Up @@ -8109,6 +8109,7 @@ public async Task<SdkResponse<Role, Exception>> create_role(
/// <param name="name">Match role name.</param>
/// <param name="built_in">Match roles by built_in status.</param>
/// <param name="filter_or">Combine given search criteria in a boolean OR expression.</param>
/// <param name="is_support_role">Search for Looker support roles.</param>
public async Task<SdkResponse<Role[], Exception>> search_roles(
string? fields = null,
long? limit = null,
Expand All @@ -8118,6 +8119,7 @@ public async Task<SdkResponse<Role[], Exception>> search_roles(
string? name = null,
bool? built_in = null,
bool? filter_or = null,
bool? is_support_role = null,
ITransportSettings? options = null)
{
return await AuthRequest<Role[], Exception>(HttpMethod.Get, "/roles/search", new Values {
Expand All @@ -8128,7 +8130,8 @@ public async Task<SdkResponse<Role[], Exception>> 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
Expand Down Expand Up @@ -8580,6 +8583,76 @@ public async Task<SdkResponse<ScheduledPlan, Exception>> scheduled_plan_run_once
return await AuthRequest<ScheduledPlan, Exception>(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[]
///
/// <returns><c>ScheduledPlan[]</c> Scheduled Plan (application/json)</returns>
///
/// <param name="user_id">Return scheduled plans belonging to this user_id. If not provided, returns scheduled plans owned by the caller.</param>
/// <param name="fields">Comma delimited list of field names. If provided, only the fields specified will be included in the response</param>
/// <param name="all_users">Return scheduled plans belonging to all users (caller needs see_schedules permission)</param>
/// <param name="limit">Number of results to return. (used with offset and takes priority over page and per_page)</param>
/// <param name="offset">Number of results to skip before returning any. (used with limit and takes priority over page and per_page)</param>
/// <param name="sorts">Fields to sort by.</param>
/// <param name="name">Match Scheduled plan's name.</param>
/// <param name="user_first_name">Returns scheduled plans belonging to user with this first name.</param>
/// <param name="user_last_name">Returns scheduled plans belonging to user with this last name.</param>
/// <param name="dashboard_id">Returns scheduled plans created on this Dashboard.</param>
/// <param name="look_id">Returns scheduled plans created on this Look.</param>
/// <param name="lookml_dashboard_id">Returns scheduled plans created on this LookML Dashboard.</param>
/// <param name="recipient">Match recipient address.</param>
/// <param name="destination_type">Match scheduled plan's destination type.</param>
/// <param name="delivery_format">Match scheduled plan's delivery format.</param>
/// <param name="filter_or">Combine given search criteria in a boolean OR expression</param>
public async Task<SdkResponse<ScheduledPlan[], Exception>> 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<ScheduledPlan[], Exception>(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.
Expand Down Expand Up @@ -8823,21 +8896,13 @@ public async Task<SdkResponse<SqlInterfaceQueryMetadata, Exception>> 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
///
/// <returns>
/// <c>QueryFormats</c> Query Formats (text)
/// <c>QueryFormats</c> Query Formats (application/json)
/// <c>JsonBi</c> Query Result (text)
/// <c>JsonBi</c> Query Result (application/json)
/// </returns>
///
/// <param name="query_id">Integer id of query</param>
Expand Down
49 changes: 20 additions & 29 deletions csharp/sdk/4.0/models.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -595,6 +595,8 @@ public class ContentSearch : SdkModel
public long? view_count { get; set; } = null;
/// <summary>Preferred way of viewing the content (only applies to dashboards) (read-only)</summary>
public string? preferred_viewer { get; set; } = null;
/// <summary>Name of the model the explore belongs to (read-only)</summary>
public string? model { get; set; } = null;
}

public class ContentSummary : SdkModel
Expand All @@ -609,6 +611,8 @@ public class ContentSummary : SdkModel
public string? content_id { get; set; } = null;
/// <summary>Content slug (read-only)</summary>
public string? content_slug { get; set; } = null;
/// <summary>Content url (read-only)</summary>
public string? content_url { get; set; } = null;
/// <summary>Content title (read-only)</summary>
public string? title { get; set; } = null;
/// <summary>Content Description (read-only)</summary>
Expand Down Expand Up @@ -1753,8 +1757,10 @@ public class DBConnection : SdkModel
public bool? default_bq_connection { get; set; } = null;
/// <summary>The project id of the default BigQuery storage project.</summary>
public string? bq_storage_project_id { get; set; } = null;
/// <summary>When true, represents that all project roles have been verified. (read-only)</summary>
/// <summary>When true, represents that all project roles have been verified.</summary>
public bool? bq_roles_verified { get; set; } = null;
/// <summary>The name of P4SA service account that is associated with the Looker instance (read-only)</summary>
public string? p4sa_name { get; set; } = null;
}

public class DBConnectionBase : SdkModel
Expand Down Expand Up @@ -3090,6 +3096,8 @@ public class Look : SdkModel
public string? folder_id { get; set; } = null;
/// <summary>Time that the Look was updated. (read-only)</summary>
public DateTime? updated_at { get; set; } = null;
/// <summary>Name of User that created the look. (read-only)</summary>
public string? user_name { get; set; } = null;
/// <summary>Number of times viewed in the Looker web UI (read-only)</summary>
public long? view_count { get; set; } = null;
}
Expand Down Expand Up @@ -3617,6 +3625,8 @@ public class LookWithDashboards : SdkModel
public string? folder_id { get; set; } = null;
/// <summary>Time that the Look was updated. (read-only)</summary>
public DateTime? updated_at { get; set; } = null;
/// <summary>Name of User that created the look. (read-only)</summary>
public string? user_name { get; set; } = null;
/// <summary>Number of times viewed in the Looker web UI (read-only)</summary>
public long? view_count { get; set; } = null;
/// <summary>Dashboards (read-only)</summary>
Expand Down Expand Up @@ -3681,6 +3691,8 @@ public class LookWithQuery : SdkModel
public string? folder_id { get; set; } = null;
/// <summary>Time that the Look was updated. (read-only)</summary>
public DateTime? updated_at { get; set; } = null;
/// <summary>Name of User that created the look. (read-only)</summary>
public string? user_name { get; set; } = null;
/// <summary>Number of times viewed in the Looker web UI (read-only)</summary>
public long? view_count { get; set; } = null;
public Query? query { get; set; }
Expand Down Expand Up @@ -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; }
/// <summary> (read-only)</summary>
public string? json { get; set; } = null;
/// <summary> (read-only)</summary>
public string? json_detail { get; set; } = null;
/// <summary> (read-only)</summary>
public string? csv { get; set; } = null;
/// <summary> (read-only)</summary>
public string? txt { get; set; } = null;
/// <summary> (read-only)</summary>
public string? html { get; set; } = null;
/// <summary> (read-only)</summary>
public string? md { get; set; } = null;
/// <summary> (read-only)</summary>
public string? xlsx { get; set; } = null;
/// <summary> (read-only)</summary>
public string? sql { get; set; } = null;
}

public class QueryTask : SdkModel
{
/// <summary>Operations the current user is able to perform on this object (read-only)</summary>
Expand Down Expand Up @@ -5533,8 +5524,6 @@ public class User : SdkModel
public bool? allow_roles_from_normal_groups { get; set; } = null;
/// <summary>(Embed only) ID of user's group folder based on the external_group_id optionally specified during embed user login (read-only)</summary>
public string? embed_group_folder_id { get; set; } = null;
/// <summary>User is an IAM Admin - only available in Looker (Google Cloud core) (read-only)</summary>
public bool? is_iam_admin { get; set; } = null;
/// <summary>Link to get this item (read-only)</summary>
public string? url { get; set; } = null;
}
Expand Down Expand Up @@ -6098,7 +6087,7 @@ public class WriteDashboardElement : SdkModel
public string? dashboard_id { get; set; } = null;
/// <summary>
/// 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
/// </summary>
public WriteLookWithQuery? look { get; set; }
/// <summary>Id Of Look</summary>
Expand Down Expand Up @@ -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
{
/// <summary>Name of the connection. Also used as the unique identifier</summary>
Expand Down Expand Up @@ -6316,6 +6305,8 @@ public class WriteDBConnection : SdkModel
public bool? connection_pooling { get; set; } = null;
/// <summary>The project id of the default BigQuery storage project.</summary>
public string? bq_storage_project_id { get; set; } = null;
/// <summary>When true, represents that all project roles have been verified.</summary>
public bool? bq_roles_verified { get; set; } = null;
}

/// Dynamic writeable type for DBConnectionOverride removes:
Expand Down Expand Up @@ -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
{
/// <summary>Look Title</summary>
Expand Down Expand Up @@ -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
{
/// <summary>
Expand Down
Loading

0 comments on commit 745a3a0

Please sign in to comment.