Skip to content

Commit

Permalink
feat: generate SDKs for Looker 22.10 (#1115)
Browse files Browse the repository at this point in the history
* feat: generate SDKs for Looker 22.10

* update release please config to 22.10
  • Loading branch information
jkaster authored Jul 14, 2022
1 parent c645e63 commit 2156fff
Show file tree
Hide file tree
Showing 34 changed files with 6,727 additions and 5,887 deletions.
13 changes: 6 additions & 7 deletions bin/sdk_gen
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ const branchOffMain = (release) => {
const branch = branchName(release)
if (branchExists(branch)) {
console.log(`Switching to branch ${branch} ...`)
result = run(`git checkout ${branch} && git pull`)
result = run(`git checkout ${branch}`)
} else {
console.log(`Creating branch ${branch} ...`)
result = run(`git checkout -b ${branch} origin/main`)
Expand Down Expand Up @@ -172,16 +172,15 @@ const pullci = async (release) => {
const regen = async (release) => {
console.info(`Generating SDKs for Looker ${release} ...`)
if (ok(branchOffMain(release))) {
const branch = branchActive()
if (await pullci(release)) {
return batch([
'yarn gen',
'yarn test:sdk',
// 'git add -A',
// `git commit -m "feat: generate SDKs for Looker ${release}"`,
/*
Test these out after first cut is merged to main
'git push'
create PR
'git add -A',
`git commit -m "feat: generate SDKs for Looker ${release}"`,
`git push origin ${branch}`,
/* create PR
*/
])
} else {
Expand Down
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 = "22.8";
public const string LookerVersion = "22.10";

public const string Bearer = "Bearer";
public const string LookerAppiId = "x-looker-appid";
Expand Down
20 changes: 10 additions & 10 deletions csharp/sdk/3.1/methods.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3928,7 +3928,7 @@ public async Task<SdkResponse<string, Exception>> delete_look(
/// <param name="image_width">Render width for image formats.</param>
/// <param name="image_height">Render height for image formats.</param>
/// <param name="generate_drill_links">Generate drill links (only applicable to 'json_detail' format.</param>
/// <param name="force_production">Force use of production models even if the user is in development mode.</param>
/// <param name="force_production">Force use of production models even if the user is in development mode. Note that this flag being false does not guarantee development models will be used.</param>
/// <param name="cache_only">Retrieve any results from cache even if the results have expired.</param>
/// <param name="path_prefix">Prefix to use for drill links (url encoded).</param>
/// <param name="rebuild_pdts">Rebuild PDTS used in query.</param>
Expand Down Expand Up @@ -4786,29 +4786,29 @@ public async Task<SdkResponse<RepositoryCredential[], Exception>> get_all_reposi
/// <param name="apply_formatting">Apply model-specified formatting to each result.</param>
/// <param name="apply_vis">Apply visualization options to results.</param>
/// <param name="cache">Get results from cache if available.</param>
/// <param name="image_width">Render width for image formats.</param>
/// <param name="image_height">Render height for image formats.</param>
/// <param name="generate_drill_links">Generate drill links (only applicable to 'json_detail' format.</param>
/// <param name="force_production">Force use of production models even if the user is in development mode.</param>
/// <param name="force_production">Force use of production models even if the user is in development mode. Note that this flag being false does not guarantee development models will be used.</param>
/// <param name="cache_only">Retrieve any results from cache even if the results have expired.</param>
/// <param name="path_prefix">Prefix to use for drill links (url encoded).</param>
/// <param name="rebuild_pdts">Rebuild PDTS used in query.</param>
/// <param name="server_table_calcs">Perform table calculations on query results</param>
/// <param name="image_width">Render width for image formats.</param>
/// <param name="image_height">Render height for image formats.</param>
/// <param name="fields">Requested fields</param>
public async Task<SdkResponse<QueryTask, Exception>> create_query_task(
WriteCreateQueryTask body,
long? limit = null,
bool? apply_formatting = null,
bool? apply_vis = null,
bool? cache = null,
long? image_width = null,
long? image_height = null,
bool? generate_drill_links = null,
bool? force_production = null,
bool? cache_only = null,
string? path_prefix = null,
bool? rebuild_pdts = null,
bool? server_table_calcs = null,
long? image_width = null,
long? image_height = null,
string? fields = null,
ITransportSettings? options = null)
{
Expand All @@ -4817,14 +4817,14 @@ public async Task<SdkResponse<QueryTask, Exception>> create_query_task(
{ "apply_formatting", apply_formatting },
{ "apply_vis", apply_vis },
{ "cache", cache },
{ "image_width", image_width },
{ "image_height", image_height },
{ "generate_drill_links", generate_drill_links },
{ "force_production", force_production },
{ "cache_only", cache_only },
{ "path_prefix", path_prefix },
{ "rebuild_pdts", rebuild_pdts },
{ "server_table_calcs", server_table_calcs },
{ "image_width", image_width },
{ "image_height", image_height },
{ "fields", fields }},body,options);
}

Expand Down Expand Up @@ -5047,7 +5047,7 @@ public async Task<SdkResponse<Query, Exception>> create_query(
/// <param name="image_width">Render width for image formats.</param>
/// <param name="image_height">Render height for image formats.</param>
/// <param name="generate_drill_links">Generate drill links (only applicable to 'json_detail' format.</param>
/// <param name="force_production">Force use of production models even if the user is in development mode.</param>
/// <param name="force_production">Force use of production models even if the user is in development mode. Note that this flag being false does not guarantee development models will be used.</param>
/// <param name="cache_only">Retrieve any results from cache even if the results have expired.</param>
/// <param name="path_prefix">Prefix to use for drill links (url encoded).</param>
/// <param name="rebuild_pdts">Rebuild PDTS used in query.</param>
Expand Down Expand Up @@ -5155,7 +5155,7 @@ public async Task<SdkResponse<TSuccess, Exception>> run_query<TSuccess>(
/// <param name="image_width">Render width for image formats.</param>
/// <param name="image_height">Render height for image formats.</param>
/// <param name="generate_drill_links">Generate drill links (only applicable to 'json_detail' format.</param>
/// <param name="force_production">Force use of production models even if the user is in development mode.</param>
/// <param name="force_production">Force use of production models even if the user is in development mode. Note that this flag being false does not guarantee development models will be used.</param>
/// <param name="cache_only">Retrieve any results from cache even if the results have expired.</param>
/// <param name="path_prefix">Prefix to use for drill links (url encoded).</param>
/// <param name="rebuild_pdts">Rebuild PDTS used in query.</param>
Expand Down
52 changes: 41 additions & 11 deletions csharp/sdk/4.0/methods.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
/// SOFTWARE.
///

/// 444 API methods
/// 446 API methods

#nullable enable
using System;
Expand All @@ -41,6 +41,36 @@ public Looker40SDK(IAuthSession authSession): base(authSession, "4.0") { }

#region Alert: Alert

/// Follow an alert.
///
/// POST /alerts/{alert_id}/follow -> void
///
/// <returns><c>void</c> Successfully followed an alert. ()</returns>
///
/// <param name="alert_id">ID of an alert</param>
public async Task<SdkResponse<string, Exception>> follow_alert(
string alert_id,
ITransportSettings? options = null)
{
alert_id = SdkUtils.EncodeParam(alert_id);
return await AuthRequest<string, Exception>(HttpMethod.Post, $"/alerts/{alert_id}/follow", null,null,options);
}

/// Unfollow an alert.
///
/// DELETE /alerts/{alert_id}/follow -> void
///
/// <returns><c>void</c> Successfully unfollowed an alert. ()</returns>
///
/// <param name="alert_id">ID of an alert</param>
public async Task<SdkResponse<string, Exception>> unfollow_alert(
string alert_id,
ITransportSettings? options = null)
{
alert_id = SdkUtils.EncodeParam(alert_id);
return await AuthRequest<string, Exception>(HttpMethod.Delete, $"/alerts/{alert_id}/follow", null,null,options);
}

/// ### Search Alerts
///
/// GET /alerts/search -> Alert[]
Expand Down Expand Up @@ -5149,7 +5179,7 @@ public async Task<SdkResponse<string, Exception>> delete_look(
/// <param name="image_width">Render width for image formats.</param>
/// <param name="image_height">Render height for image formats.</param>
/// <param name="generate_drill_links">Generate drill links (only applicable to 'json_detail' format.</param>
/// <param name="force_production">Force use of production models even if the user is in development mode.</param>
/// <param name="force_production">Force use of production models even if the user is in development mode. Note that this flag being false does not guarantee development models will be used.</param>
/// <param name="cache_only">Retrieve any results from cache even if the results have expired.</param>
/// <param name="path_prefix">Prefix to use for drill links (url encoded).</param>
/// <param name="rebuild_pdts">Rebuild PDTS used in query.</param>
Expand Down Expand Up @@ -6336,29 +6366,29 @@ public async Task<SdkResponse<RepositoryCredential[], Exception>> get_all_reposi
/// <param name="apply_formatting">Apply model-specified formatting to each result.</param>
/// <param name="apply_vis">Apply visualization options to results.</param>
/// <param name="cache">Get results from cache if available.</param>
/// <param name="image_width">Render width for image formats.</param>
/// <param name="image_height">Render height for image formats.</param>
/// <param name="generate_drill_links">Generate drill links (only applicable to 'json_detail' format.</param>
/// <param name="force_production">Force use of production models even if the user is in development mode.</param>
/// <param name="force_production">Force use of production models even if the user is in development mode. Note that this flag being false does not guarantee development models will be used.</param>
/// <param name="cache_only">Retrieve any results from cache even if the results have expired.</param>
/// <param name="path_prefix">Prefix to use for drill links (url encoded).</param>
/// <param name="rebuild_pdts">Rebuild PDTS used in query.</param>
/// <param name="server_table_calcs">Perform table calculations on query results</param>
/// <param name="image_width">DEPRECATED. Render width for image formats. Note that this parameter is always ignored by this method.</param>
/// <param name="image_height">DEPRECATED. Render height for image formats. Note that this parameter is always ignored by this method.</param>
/// <param name="fields">Requested fields</param>
public async Task<SdkResponse<QueryTask, Exception>> create_query_task(
WriteCreateQueryTask body,
long? limit = null,
bool? apply_formatting = null,
bool? apply_vis = null,
bool? cache = null,
long? image_width = null,
long? image_height = null,
bool? generate_drill_links = null,
bool? force_production = null,
bool? cache_only = null,
string? path_prefix = null,
bool? rebuild_pdts = null,
bool? server_table_calcs = null,
long? image_width = null,
long? image_height = null,
string? fields = null,
ITransportSettings? options = null)
{
Expand All @@ -6367,14 +6397,14 @@ public async Task<SdkResponse<QueryTask, Exception>> create_query_task(
{ "apply_formatting", apply_formatting },
{ "apply_vis", apply_vis },
{ "cache", cache },
{ "image_width", image_width },
{ "image_height", image_height },
{ "generate_drill_links", generate_drill_links },
{ "force_production", force_production },
{ "cache_only", cache_only },
{ "path_prefix", path_prefix },
{ "rebuild_pdts", rebuild_pdts },
{ "server_table_calcs", server_table_calcs },
{ "image_width", image_width },
{ "image_height", image_height },
{ "fields", fields }},body,options);
}

Expand Down Expand Up @@ -6598,7 +6628,7 @@ public async Task<SdkResponse<Query, Exception>> create_query(
/// <param name="image_width">Render width for image formats.</param>
/// <param name="image_height">Render height for image formats.</param>
/// <param name="generate_drill_links">Generate drill links (only applicable to 'json_detail' format.</param>
/// <param name="force_production">Force use of production models even if the user is in development mode.</param>
/// <param name="force_production">Force use of production models even if the user is in development mode. Note that this flag being false does not guarantee development models will be used.</param>
/// <param name="cache_only">Retrieve any results from cache even if the results have expired.</param>
/// <param name="path_prefix">Prefix to use for drill links (url encoded).</param>
/// <param name="rebuild_pdts">Rebuild PDTS used in query.</param>
Expand Down Expand Up @@ -6710,7 +6740,7 @@ public async Task<SdkResponse<TSuccess, Exception>> run_query<TSuccess>(
/// <param name="image_width">Render width for image formats.</param>
/// <param name="image_height">Render height for image formats.</param>
/// <param name="generate_drill_links">Generate drill links (only applicable to 'json_detail' format.</param>
/// <param name="force_production">Force use of production models even if the user is in development mode.</param>
/// <param name="force_production">Force use of production models even if the user is in development mode. Note that this flag being false does not guarantee development models will be used.</param>
/// <param name="cache_only">Retrieve any results from cache even if the results have expired.</param>
/// <param name="path_prefix">Prefix to use for drill links (url encoded).</param>
/// <param name="rebuild_pdts">Rebuild PDTS used in query.</param>
Expand Down
16 changes: 13 additions & 3 deletions csharp/sdk/4.0/models.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
/// SOFTWARE.
///

/// 315 API models: 234 Spec, 0 Request, 60 Write, 21 Enum
/// 316 API models: 235 Spec, 0 Request, 60 Write, 21 Enum

#nullable enable
using System;
Expand Down Expand Up @@ -3323,6 +3323,14 @@ public class MergeQuerySourceQuery : SdkModel
public string? query_id { get; set; } = null;
}

public class MobileFeatureFlags : SdkModel
{
/// <summary>Specifies the name of feature flag. (read-only)</summary>
public string? feature_flag_name { get; set; } = null;
/// <summary>Specifies the state of feature flag (read-only)</summary>
public bool? feature_flag_state { get; set; } = null;
}

public class MobilePayload : SdkModel
{
/// <summary>Title of the alert (read-only)</summary>
Expand All @@ -3345,6 +3353,8 @@ public class MobileSettings : SdkModel
public bool? mobile_force_authentication { get; set; } = null;
/// <summary>Specifies whether mobile access for this instance is enabled. (read-only)</summary>
public bool? mobile_app_integration { get; set; } = null;
/// <summary>Specifies feature flag and state relevant to mobile. (read-only)</summary>
public MobileFeatureFlags[]? mobile_feature_flags { get; set; } = null;
}

public class MobileToken : SdkModel
Expand Down Expand Up @@ -3456,7 +3466,7 @@ public class OauthClientApp : SdkModel
public string? display_name { get; set; } = null;
/// <summary>A description of the application that will be displayed to users</summary>
public string? description { get; set; } = null;
/// <summary>When enabled is true, OAuth2 and API requests will be accepted from this app. When false, all requests from this app will be refused.</summary>
/// <summary>When enabled is true, OAuth2 and API requests will be accepted from this app. When false, all requests from this app will be refused. Setting disabled invalidates existing tokens.</summary>
public bool? enabled { get; set; } = null;
/// <summary>If set, only Looker users who are members of this group can use this web app with Looker. If group_id is not set, any Looker user may use this app to access this Looker instance</summary>
public string? group_id { get; set; } = null;
Expand Down Expand Up @@ -5975,7 +5985,7 @@ public class WriteOauthClientApp : SdkModel
public string? display_name { get; set; } = null;
/// <summary>A description of the application that will be displayed to users</summary>
public string? description { get; set; } = null;
/// <summary>When enabled is true, OAuth2 and API requests will be accepted from this app. When false, all requests from this app will be refused.</summary>
/// <summary>When enabled is true, OAuth2 and API requests will be accepted from this app. When false, all requests from this app will be refused. Setting disabled invalidates existing tokens.</summary>
public bool? enabled { get; set; } = null;
/// <summary>If set, only Looker users who are members of this group can use this web app with Looker. If group_id is not set, any Looker user may use this app to access this Looker instance</summary>
public string? group_id { get; set; } = null;
Expand Down
Loading

0 comments on commit 2156fff

Please sign in to comment.