Skip to content

Commit

Permalink
feat: generate SDKs for Looker 25.2 (#1561)
Browse files Browse the repository at this point in the history
Release-As: 25.2.0
  • Loading branch information
drstrangelooker authored Feb 7, 2025
1 parent 272a287 commit 8c4ccfa
Show file tree
Hide file tree
Showing 24 changed files with 399 additions and 84 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 = "25.0";
public const string LookerVersion = "25.2";

public const string Bearer = "Bearer";
public const string LookerAppiId = "x-looker-appid";
Expand Down
12 changes: 9 additions & 3 deletions csharp/sdk/4.0/methods.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7206,6 +7206,7 @@ public async Task<SdkResponse<Query, Exception>> create_query(
/// <param name="rebuild_pdts">Rebuild PDTS used in query.</param>
/// <param name="server_table_calcs">Perform table calculations on query results</param>
/// <param name="source">Specifies the source of this call.</param>
/// <param name="enable_oauth_error_response">Return a specialized OAuth error response if a database OAuth error occurs.</param>
public async Task<SdkResponse<TSuccess, Exception>> run_query<TSuccess>(
string query_id,
string result_format,
Expand All @@ -7222,6 +7223,7 @@ public async Task<SdkResponse<TSuccess, Exception>> run_query<TSuccess>(
bool? rebuild_pdts = null,
bool? server_table_calcs = null,
string? source = null,
bool? enable_oauth_error_response = null,
ITransportSettings? options = null) where TSuccess : class
{
query_id = SdkUtils.EncodeParam(query_id);
Expand All @@ -7239,7 +7241,8 @@ public async Task<SdkResponse<TSuccess, Exception>> run_query<TSuccess>(
{ "path_prefix", path_prefix },
{ "rebuild_pdts", rebuild_pdts },
{ "server_table_calcs", server_table_calcs },
{ "source", source }},null,options);
{ "source", source },
{ "enable_oauth_error_response", enable_oauth_error_response }},null,options);
}

/// ### Run the query that is specified inline in the posted body.
Expand Down Expand Up @@ -7318,6 +7321,7 @@ public async Task<SdkResponse<TSuccess, Exception>> run_query<TSuccess>(
/// <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="enable_oauth_error_response">Return a specialized OAuth error response if a database OAuth error occurs.</param>
public async Task<SdkResponse<TSuccess, Exception>> run_inline_query<TSuccess>(
string result_format,
WriteQuery body,
Expand All @@ -7333,6 +7337,7 @@ public async Task<SdkResponse<TSuccess, Exception>> run_inline_query<TSuccess>(
string? path_prefix = null,
bool? rebuild_pdts = null,
bool? server_table_calcs = null,
bool? enable_oauth_error_response = null,
ITransportSettings? options = null) where TSuccess : class
{
result_format = SdkUtils.EncodeParam(result_format);
Expand All @@ -7348,7 +7353,8 @@ public async Task<SdkResponse<TSuccess, Exception>> run_inline_query<TSuccess>(
{ "cache_only", cache_only },
{ "path_prefix", path_prefix },
{ "rebuild_pdts", rebuild_pdts },
{ "server_table_calcs", server_table_calcs }},body,options);
{ "server_table_calcs", server_table_calcs },
{ "enable_oauth_error_response", enable_oauth_error_response }},body,options);
}

/// ### Run an URL encoded query.
Expand Down Expand Up @@ -7550,7 +7556,7 @@ public async Task<SdkResponse<SqlQuery, Exception>> sql_query(
/// </returns>
///
/// <param name="slug">slug of query</param>
/// <param name="result_format">Format of result, options are: ["inline_json", "json", "json_detail", "json_fe", "json_bi", "csv", "html", "md", "txt", "xlsx", "gsxml", "sql", "json_label"]</param>
/// <param name="result_format">Format of result, options are: ["inline_json", "json", "json_detail", "json_fe", "json_bi", "csv", "html", "md", "txt", "xlsx", "gsxml", "sql", "odc", "json_label"]</param>
/// <param name="download">Defaults to false. If set to true, the HTTP response will have content-disposition and other headers set to make the HTTP response behave as a downloadable attachment instead of as inline content.</param>
public async Task<SdkResponse<TSuccess, Exception>> run_sql_query<TSuccess>(
string slug,
Expand Down
18 changes: 14 additions & 4 deletions csharp/sdk/4.0/models.cs
Original file line number Diff line number Diff line change
Expand Up @@ -987,7 +987,7 @@ public class CreateQueryTask : SdkModel
public StringDictionary<bool>? can { get; set; } = null;
/// <summary>Id of query to run</summary>
public string query_id { get; set; } = "";
/// <summary>Desired async query result format. Valid values are: "inline_json", "json", "json_detail", "json_fe", "json_bi", "csv", "html", "md", "txt", "xlsx", "gsxml", "sql".</summary>
/// <summary>Desired async query result format. Valid values are: "inline_json", "json", "json_detail", "json_fe", "json_bi", "csv", "html", "md", "txt", "xlsx", "gsxml", "sql", "odc".</summary>
[JsonConverter(typeof(StringEnumConverter))]
public ResultFormat result_format { get; set; }
/// <summary>Source of query task</summary>
Expand Down Expand Up @@ -1658,6 +1658,8 @@ public class DBConnection : SdkModel
public Snippet[]? snippets { get; set; } = null;
/// <summary>True if PDTs are enabled on this connection (read-only)</summary>
public bool? pdts_enabled { get; set; } = null;
/// <summary>JDBC driver version name</summary>
public string? named_driver_version { get; set; } = null;
/// <summary>Host name/address of server; or the string 'localhost' in case of a connection over an SSH tunnel.</summary>
public string? host { get; set; } = null;
/// <summary>Port number on server. If the connection is over an SSH tunnel, then the local port associated with the SSH tunnel.</summary>
Expand Down Expand Up @@ -1763,6 +1765,8 @@ public class DBConnection : SdkModel
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;
/// <summary>Disable query holding for this connection.</summary>
public bool? query_holding_disabled { get; set; } = null;
}

public class DBConnectionBase : SdkModel
Expand Down Expand Up @@ -4452,7 +4456,7 @@ public class RepositoryCredential : SdkModel
public bool? is_configured { get; set; } = null;
}

/// Desired async query result format. Valid values are: "inline_json", "json", "json_detail", "json_fe", "json_bi", "csv", "html", "md", "txt", "xlsx", "gsxml", "sql". (Enum defined in CreateQueryTask)
/// Desired async query result format. Valid values are: "inline_json", "json", "json_detail", "json_fe", "json_bi", "csv", "html", "md", "txt", "xlsx", "gsxml", "sql", "odc". (Enum defined in CreateQueryTask)
public enum ResultFormat
{
[EnumMember(Value = "inline_json")]
Expand All @@ -4478,7 +4482,9 @@ public enum ResultFormat
[EnumMember(Value = "gsxml")]
gsxml,
[EnumMember(Value = "sql")]
sql
sql,
[EnumMember(Value = "odc")]
odc
}

public class ResultMakerFilterables : SdkModel
Expand Down Expand Up @@ -5991,7 +5997,7 @@ public class WriteCreateQueryTask : SdkModel
{
/// <summary>Id of query to run</summary>
public string query_id { get; set; } = "";
/// <summary>Desired async query result format. Valid values are: "inline_json", "json", "json_detail", "json_fe", "json_bi", "csv", "html", "md", "txt", "xlsx", "gsxml", "sql".</summary>
/// <summary>Desired async query result format. Valid values are: "inline_json", "json", "json_detail", "json_fe", "json_bi", "csv", "html", "md", "txt", "xlsx", "gsxml", "sql", "odc".</summary>
[JsonConverter(typeof(StringEnumConverter))]
public ResultFormat result_format { get; set; }
/// <summary>Source of query task</summary>
Expand Down Expand Up @@ -6228,6 +6234,8 @@ public class WriteDBConnection : SdkModel
{
/// <summary>Name of the connection. Also used as the unique identifier</summary>
public string? name { get; set; } = null;
/// <summary>JDBC driver version name</summary>
public string? named_driver_version { get; set; } = null;
/// <summary>Host name/address of server; or the string 'localhost' in case of a connection over an SSH tunnel.</summary>
public string? host { get; set; } = null;
/// <summary>Port number on server. If the connection is over an SSH tunnel, then the local port associated with the SSH tunnel.</summary>
Expand Down Expand Up @@ -6315,6 +6323,8 @@ public class WriteDBConnection : SdkModel
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;
/// <summary>Disable query holding for this connection.</summary>
public bool? query_holding_disabled { get; set; } = null;
}

/// Dynamic writeable type for DBConnectionOverride removes:
Expand Down
4 changes: 2 additions & 2 deletions go/sdk/v4/methods.go
Original file line number Diff line number Diff line change
Expand Up @@ -5528,7 +5528,7 @@ func (l *LookerSDK) RunQuery(request RequestRunQuery,
request.QueryId = url.PathEscape(request.QueryId)
request.ResultFormat = url.PathEscape(request.ResultFormat)
var result string
err := l.session.Do(&result, "GET", "/4.0", fmt.Sprintf("/queries/%v/run/%v", request.QueryId, request.ResultFormat), map[string]interface{}{"limit": request.Limit, "apply_formatting": request.ApplyFormatting, "apply_vis": request.ApplyVis, "cache": request.Cache, "image_width": request.ImageWidth, "image_height": request.ImageHeight, "generate_drill_links": request.GenerateDrillLinks, "force_production": request.ForceProduction, "cache_only": request.CacheOnly, "path_prefix": request.PathPrefix, "rebuild_pdts": request.RebuildPdts, "server_table_calcs": request.ServerTableCalcs, "source": request.Source}, nil, options)
err := l.session.Do(&result, "GET", "/4.0", fmt.Sprintf("/queries/%v/run/%v", request.QueryId, request.ResultFormat), map[string]interface{}{"limit": request.Limit, "apply_formatting": request.ApplyFormatting, "apply_vis": request.ApplyVis, "cache": request.Cache, "image_width": request.ImageWidth, "image_height": request.ImageHeight, "generate_drill_links": request.GenerateDrillLinks, "force_production": request.ForceProduction, "cache_only": request.CacheOnly, "path_prefix": request.PathPrefix, "rebuild_pdts": request.RebuildPdts, "server_table_calcs": request.ServerTableCalcs, "source": request.Source, "enable_oauth_error_response": request.EnableOauthErrorResponse}, nil, options)
return result, err

}
Expand Down Expand Up @@ -5596,7 +5596,7 @@ func (l *LookerSDK) RunInlineQuery(request RequestRunInlineQuery,
options *rtl.ApiSettings) (string, error) {
request.ResultFormat = url.PathEscape(request.ResultFormat)
var result string
err := l.session.Do(&result, "POST", "/4.0", fmt.Sprintf("/queries/run/%v", request.ResultFormat), map[string]interface{}{"limit": request.Limit, "apply_formatting": request.ApplyFormatting, "apply_vis": request.ApplyVis, "cache": request.Cache, "image_width": request.ImageWidth, "image_height": request.ImageHeight, "generate_drill_links": request.GenerateDrillLinks, "force_production": request.ForceProduction, "cache_only": request.CacheOnly, "path_prefix": request.PathPrefix, "rebuild_pdts": request.RebuildPdts, "server_table_calcs": request.ServerTableCalcs}, request.Body, options)
err := l.session.Do(&result, "POST", "/4.0", fmt.Sprintf("/queries/run/%v", request.ResultFormat), map[string]interface{}{"limit": request.Limit, "apply_formatting": request.ApplyFormatting, "apply_vis": request.ApplyVis, "cache": request.Cache, "image_width": request.ImageWidth, "image_height": request.ImageHeight, "generate_drill_links": request.GenerateDrillLinks, "force_production": request.ForceProduction, "cache_only": request.CacheOnly, "path_prefix": request.PathPrefix, "rebuild_pdts": request.RebuildPdts, "server_table_calcs": request.ServerTableCalcs, "enable_oauth_error_response": request.EnableOauthErrorResponse}, request.Body, options)
return result, err

}
Expand Down
Loading

0 comments on commit 8c4ccfa

Please sign in to comment.