Skip to content

Commit 9d6937a

Browse files
authored
feat: generate SDKs for Looker 23.16 (#1365)
Release-As: 23.16.0
1 parent 4f5ed2b commit 9d6937a

File tree

24 files changed

+2552
-460
lines changed

24 files changed

+2552
-460
lines changed

csharp/rtl/Constants.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ public struct Constants
6161

6262
public const string DefaultApiVersion = "4.0";
6363
public const string AgentPrefix = "CS-SDK";
64-
public const string LookerVersion = "23.14";
64+
public const string LookerVersion = "23.17";
6565

6666
public const string Bearer = "Bearer";
6767
public const string LookerAppiId = "x-looker-appid";

csharp/sdk/4.0/methods.cs

Lines changed: 120 additions & 33 deletions
Large diffs are not rendered by default.

csharp/sdk/4.0/models.cs

Lines changed: 39 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
/// SOFTWARE.
2222
///
2323

24-
/// 329 API models: 247 Spec, 0 Request, 60 Write, 22 Enum
24+
/// 332 API models: 249 Spec, 0 Request, 61 Write, 22 Enum
2525

2626
#nullable enable
2727
using System;
@@ -58,7 +58,7 @@ public class Alert : SdkModel
5858
/// <summary>This property informs the check what kind of comparison we are performing. Only certain condition types are valid for time series alerts. For details, refer to [Setting Alert Conditions](https://cloud.google.com/looker/docs/sharing-and-publishing/creating-alerts#setting_alert_conditions) Valid values are: "EQUAL_TO", "GREATER_THAN", "GREATER_THAN_OR_EQUAL_TO", "LESS_THAN", "LESS_THAN_OR_EQUAL_TO", "INCREASES_BY", "DECREASES_BY", "CHANGES_BY".</summary>
5959
[JsonConverter(typeof(StringEnumConverter))]
6060
public ComparisonType comparison_type { get; set; }
61-
/// <summary>Vixie-Style crontab specification when to run. At minumum, it has to be longer than 15 minute intervals</summary>
61+
/// <summary>Vixie-Style crontab specification when to run. At minimum, it has to be longer than 15 minute intervals</summary>
6262
public string cron { get; set; } = "";
6363
/// <summary>Domain for the custom url selected by the alert creator from the admin defined domain allowlist</summary>
6464
public string? custom_url_base { get; set; } = null;
@@ -1811,7 +1811,7 @@ public class Dialect : SdkModel
18111811
public string? persistent_table_sortkeys { get; set; } = null;
18121812
/// <summary>PDT distkey column (read-only)</summary>
18131813
public string? persistent_table_distkey { get; set; } = null;
1814-
/// <summary>Suports streaming results (read-only)</summary>
1814+
/// <summary>Supports streaming results (read-only)</summary>
18151815
public bool? supports_streaming { get; set; } = null;
18161816
/// <summary>Should SQL Runner snippets automatically be run (read-only)</summary>
18171817
public bool? automatically_run_sql_runner_snippets { get; set; } = null;
@@ -2565,9 +2565,9 @@ public class IntegrationRequiredField : SdkModel
25652565
{
25662566
/// <summary>Matches a field that has this tag. (read-only)</summary>
25672567
public string? tag { get; set; } = null;
2568-
/// <summary>If present, supercedes 'tag' and matches a field that has any of the provided tags. (read-only)</summary>
2568+
/// <summary>If present, supersedes 'tag' and matches a field that has any of the provided tags. (read-only)</summary>
25692569
public string[]? any_tag { get; set; } = null;
2570-
/// <summary>If present, supercedes 'tag' and matches a field that has all of the provided tags. (read-only)</summary>
2570+
/// <summary>If present, supersedes 'tag' and matches a field that has all of the provided tags. (read-only)</summary>
25712571
public string[]? all_tags { get; set; } = null;
25722572
}
25732573

@@ -3970,6 +3970,8 @@ public class Project : SdkModel
39703970
public bool? is_example { get; set; } = null;
39713971
/// <summary>Status of dependencies in your manifest & lockfile</summary>
39723972
public string? dependency_status { get; set; } = null;
3973+
/// <summary>Number of data tests within project (read-only)</summary>
3974+
public long? data_tests_count { get; set; } = null;
39733975
}
39743976

39753977
public class ProjectError : SdkModel
@@ -4858,6 +4860,26 @@ public class Snippet : SdkModel
48584860
public string? sql { get; set; } = null;
48594861
}
48604862

4863+
public class SqlInterfaceQuery : SdkModel
4864+
{
4865+
/// <summary>Operations the current user is able to perform on this object (read-only)</summary>
4866+
public StringDictionary<bool>? can { get; set; } = null;
4867+
/// <summary>Unique Id (read-only)</summary>
4868+
public long? id { get; set; } = null;
4869+
/// <summary>Calcite signature (read-only)</summary>
4870+
public string signature { get; set; } = "";
4871+
}
4872+
4873+
public class SqlInterfaceQueryCreate : SdkModel
4874+
{
4875+
/// <summary>Operations the current user is able to perform on this object (read-only)</summary>
4876+
public StringDictionary<bool>? can { get; set; } = null;
4877+
/// <summary>Original SQL request</summary>
4878+
public string sql { get; set; } = "";
4879+
/// <summary>Whether the query should be run for use in a JDBC Client. This changes the formatting of some datetime based values.</summary>
4880+
public bool? jdbc_client { get; set; } = null;
4881+
}
4882+
48614883
public class SqlQuery : SdkModel
48624884
{
48634885
/// <summary>Operations the current user is able to perform on this object (read-only)</summary>
@@ -5534,7 +5556,7 @@ public class WriteAlert : SdkModel
55345556
/// <summary>This property informs the check what kind of comparison we are performing. Only certain condition types are valid for time series alerts. For details, refer to [Setting Alert Conditions](https://cloud.google.com/looker/docs/sharing-and-publishing/creating-alerts#setting_alert_conditions) Valid values are: "EQUAL_TO", "GREATER_THAN", "GREATER_THAN_OR_EQUAL_TO", "LESS_THAN", "LESS_THAN_OR_EQUAL_TO", "INCREASES_BY", "DECREASES_BY", "CHANGES_BY".</summary>
55355557
[JsonConverter(typeof(StringEnumConverter))]
55365558
public ComparisonType comparison_type { get; set; }
5537-
/// <summary>Vixie-Style crontab specification when to run. At minumum, it has to be longer than 15 minute intervals</summary>
5559+
/// <summary>Vixie-Style crontab specification when to run. At minimum, it has to be longer than 15 minute intervals</summary>
55385560
public string cron { get; set; } = "";
55395561
/// <summary>Domain for the custom url selected by the alert creator from the admin defined domain allowlist</summary>
55405562
public string? custom_url_base { get; set; } = null;
@@ -6478,7 +6500,7 @@ public class WritePrivatelabelConfiguration : SdkModel
64786500
}
64796501

64806502
/// Dynamic writeable type for Project removes:
6481-
/// can, id, uses_git, is_example
6503+
/// can, id, uses_git, is_example, data_tests_count
64826504
public class WriteProject : SdkModel
64836505
{
64846506
/// <summary>Project display name</summary>
@@ -6785,6 +6807,16 @@ public class WriteSetting : SdkModel
67856807
public EmbedConfig? embed_config { get; set; }
67866808
}
67876809

6810+
/// Dynamic writeable type for SqlInterfaceQueryCreate removes:
6811+
/// can
6812+
public class WriteSqlInterfaceQueryCreate : SdkModel
6813+
{
6814+
/// <summary>Original SQL request</summary>
6815+
public string sql { get; set; } = "";
6816+
/// <summary>Whether the query should be run for use in a JDBC Client. This changes the formatting of some datetime based values.</summary>
6817+
public bool? jdbc_client { get; set; } = null;
6818+
}
6819+
67886820
/// Dynamic writeable type for SshServer removes:
67896821
/// ssh_server_id, finger_print, sha_finger_print, public_key, status
67906822
public class WriteSshServer : SdkModel

go/sdk/v4/methods.go

Lines changed: 95 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ SOFTWARE.
2626

2727
/*
2828
29-
461 API methods
29+
464 API methods
3030
*/
3131

3232
// NOTE: Do not edit this file generated by Looker SDK Codegen for API v4
@@ -607,6 +607,18 @@ func (l *LookerSDK) CreateEmbedUrlAsMe(
607607

608608
}
609609

610+
// ### Validate a Signed Embed URL
611+
//
612+
// GET /embed/sso/validate -> EmbedUrlResponse
613+
func (l *LookerSDK) ValidateEmbedUrl(
614+
url string,
615+
options *rtl.ApiSettings) (EmbedUrlResponse, error) {
616+
var result EmbedUrlResponse
617+
err := l.session.Do(&result, "GET", "/4.0", "/embed/sso/validate", map[string]interface{}{"url": url}, nil, options)
618+
return result, err
619+
620+
}
621+
610622
// ### Acquire a cookieless embed session.
611623
//
612624
// The acquire session endpoint negates the need for signing the embed url and passing it as a parameter
@@ -2216,7 +2228,10 @@ func (l *LookerSDK) ApiSpec(
22162228
}
22172229

22182230
// ### This feature is enabled only by special license.
2219-
// ### Gets the whitelabel configuration, which includes hiding documentation links, custom favicon uploading, etc.
2231+
//
2232+
// This endpoint provides the private label configuration, which includes hiding documentation links, custom favicon uploading, etc.
2233+
//
2234+
// This endpoint is deprecated. [Get Setting](#!/Config/get_setting) should be used to retrieve private label settings instead
22202235
//
22212236
// GET /whitelabel_configuration -> WhitelabelConfiguration
22222237
//
@@ -2230,7 +2245,9 @@ func (l *LookerSDK) WhitelabelConfiguration(
22302245

22312246
}
22322247

2233-
// ### Update the whitelabel configuration
2248+
// ### Update the private label configuration
2249+
//
2250+
// This endpoint is deprecated. [Set Setting](#!/Config/set_setting) should be used to update private label settings instead
22342251
//
22352252
// PUT /whitelabel_configuration -> WhitelabelConfiguration
22362253
//
@@ -3652,10 +3669,7 @@ func (l *LookerSDK) DeleteFolder(
36523669

36533670
// ### Get information about all folders.
36543671
//
3655-
// In API 3.x, this will not return empty personal folders, unless they belong to the calling user,
3656-
// or if they contain soft-deleted content.
3657-
//
3658-
// In API 4.0+, all personal folders will be returned.
3672+
// All personal folders will be returned.
36593673
//
36603674
// GET /folders -> []Folder
36613675
func (l *LookerSDK) AllFolders(
@@ -3735,7 +3749,6 @@ func (l *LookerSDK) FolderAncestors(
37353749
}
37363750

37373751
// ### Get all looks in a folder.
3738-
// In API 3.x, this will return all looks in a folder, including looks in the trash.
37393752
// In API 4.0+, all looks in a folder will be returned, excluding looks in the trash.
37403753
//
37413754
// GET /folders/{folder_id}/looks -> []LookWithQuery
@@ -4347,7 +4360,7 @@ func (l *LookerSDK) Look(
43474360
//
43484361
// Soft-deleted looks are excluded from the results of [all_looks()](#!/Look/all_looks) and [search_looks()](#!/Look/search_looks), so they
43494362
// essentially disappear from view even though they still reside in the db.
4350-
// In API 3.1 and later, you can pass `deleted: true` as a parameter to [search_looks()](#!/3.1/Look/search_looks) to list soft-deleted looks.
4363+
// You can pass `deleted: true` as a parameter to [search_looks()](#!/Look/search_looks) to list soft-deleted looks.
43514364
//
43524365
// NOTE: [delete_look()](#!/Look/delete_look) performs a "hard delete" - the look data is removed from the Looker
43534366
// database and destroyed. There is no "undo" for `delete_look()`.
@@ -4393,7 +4406,8 @@ func (l *LookerSDK) DeleteLook(
43934406
// | result_format | Description
43944407
// | :-----------: | :--- |
43954408
// | json | Plain json
4396-
// | json_detail | Row data plus metadata describing the fields, pivots, table calcs, and other aspects of the query
4409+
// | json_bi | (*RECOMMENDED*) Row data plus metadata describing the fields, pivots, table calcs, and other aspects of the query
4410+
// | json_detail | (*LEGACY*) Row data plus metadata describing the fields, pivots, table calcs, and other aspects of the query
43974411
// | csv | Comma separated values with a header
43984412
// | txt | Tab separated values with a header
43994413
// | html | Simple html
@@ -5465,7 +5479,8 @@ func (l *LookerSDK) CreateQuery(
54655479
// | result_format | Description
54665480
// | :-----------: | :--- |
54675481
// | json | Plain json
5468-
// | json_detail | Row data plus metadata describing the fields, pivots, table calcs, and other aspects of the query
5482+
// | json_bi | (*RECOMMENDED*) Row data plus metadata describing the fields, pivots, table calcs, and other aspects of the query
5483+
// | json_detail | (*LEGACY*) Row data plus metadata describing the fields, pivots, table calcs, and other aspects of the query
54695484
// | csv | Comma separated values with a header
54705485
// | txt | Tab separated values with a header
54715486
// | html | Simple html
@@ -5533,7 +5548,8 @@ func (l *LookerSDK) RunQuery(request RequestRunQuery,
55335548
// | result_format | Description
55345549
// | :-----------: | :--- |
55355550
// | json | Plain json
5536-
// | json_detail | Row data plus metadata describing the fields, pivots, table calcs, and other aspects of the query
5551+
// | json_bi | (*RECOMMENDED*) Row data plus metadata describing the fields, pivots, table calcs, and other aspects of the query
5552+
// | json_detail | (*LEGACY*) Row data plus metadata describing the fields, pivots, table calcs, and other aspects of the query
55375553
// | csv | Comma separated values with a header
55385554
// | txt | Tab separated values with a header
55395555
// | html | Simple html
@@ -5572,7 +5588,7 @@ func (l *LookerSDK) RunInlineQuery(request RequestRunInlineQuery,
55725588
// Here is an example inline query URL:
55735589
//
55745590
// ```
5575-
// https://looker.mycompany.com:19999/api/3.0/queries/models/thelook/views/inventory_items/run/json?fields=category.name,inventory_items.days_in_inventory_tier,products.count&f[category.name]=socks&sorts=products.count+desc+0&limit=500&query_timezone=America/Los_Angeles
5591+
// https://looker.mycompany.com:19999/api/4.0/queries/models/thelook/views/inventory_items/run/json?fields=category.name,inventory_items.days_in_inventory_tier,products.count&f[category.name]=socks&sorts=products.count+desc+0&limit=500&query_timezone=America/Los_Angeles
55765592
// ```
55775593
//
55785594
// When invoking this endpoint with the Ruby SDK, pass the query parameter parts as a hash. The hash to match the above would look like:
@@ -5600,7 +5616,8 @@ func (l *LookerSDK) RunInlineQuery(request RequestRunInlineQuery,
56005616
// | result_format | Description
56015617
// | :-----------: | :--- |
56025618
// | json | Plain json
5603-
// | json_detail | Row data plus metadata describing the fields, pivots, table calcs, and other aspects of the query
5619+
// | json_bi | (*RECOMMENDED*) Row data plus metadata describing the fields, pivots, table calcs, and other aspects of the query
5620+
// | json_detail | (*LEGACY*) Row data plus metadata describing the fields, pivots, table calcs, and other aspects of the query
56045621
// | csv | Comma separated values with a header
56055622
// | txt | Tab separated values with a header
56065623
// | html | Simple html
@@ -5696,15 +5713,57 @@ func (l *LookerSDK) KillQuery(
56965713

56975714
}
56985715

5699-
// Get a SQL Runner query.
5716+
// ### Run a saved SQL interface query.
57005717
//
5701-
// GET /sql_queries/{slug} -> SqlQuery
5702-
func (l *LookerSDK) SqlQuery(
5703-
slug string,
5704-
options *rtl.ApiSettings) (SqlQuery, error) {
5705-
slug = url.PathEscape(slug)
5706-
var result SqlQuery
5707-
err := l.session.Do(&result, "GET", "/4.0", fmt.Sprintf("/sql_queries/%v", slug), nil, nil, options)
5718+
// This runs a previously created SQL interface query.
5719+
//
5720+
// The 'result_format' parameter specifies the desired structure and format of the response.
5721+
//
5722+
// Supported formats:
5723+
//
5724+
// | result_format | Description
5725+
// | :-----------: | :--- |
5726+
// | json | Plain json
5727+
// | json_bi | (*RECOMMENDED*) Row data plus metadata describing the fields, pivots, table calcs, and other aspects of the query
5728+
// | json_detail | (*LEGACY*) Row data plus metadata describing the fields, pivots, table calcs, and other aspects of the query
5729+
// | csv | Comma separated values with a header
5730+
// | txt | Tab separated values with a header
5731+
// | html | Simple html
5732+
// | md | Simple markdown
5733+
// | xlsx | MS Excel spreadsheet
5734+
// | sql | Returns the generated SQL rather than running the query
5735+
// | png | A PNG image of the visualization of the query
5736+
// | jpg | A JPG image of the visualization of the query
5737+
//
5738+
// GET /sql_interface_queries/{query_id}/run/{result_format} -> string
5739+
//
5740+
// **Note**: Binary content may be returned by this method.
5741+
func (l *LookerSDK) RunSqlInterfaceQuery(
5742+
queryId int64,
5743+
resultFormat string,
5744+
options *rtl.ApiSettings) (string, error) {
5745+
resultFormat = url.PathEscape(resultFormat)
5746+
var result string
5747+
err := l.session.Do(&result, "GET", "/4.0", fmt.Sprintf("/sql_interface_queries/%v/run/%v", queryId, resultFormat), nil, nil, options)
5748+
return result, err
5749+
5750+
}
5751+
5752+
// ### Create a SQL interface query.
5753+
//
5754+
// This allows you to create a new SQL interface query that you can later run. Looker queries are immutable once created
5755+
// and are not deleted. If you create a query that is exactly like an existing query then the existing query
5756+
// will be returned and no new query will be created. Whether a new query is created or not, you can use
5757+
// the 'id' in the returned query with the 'run' method.
5758+
//
5759+
// The query parameters are passed as json in the body of the request.
5760+
//
5761+
// POST /sql_interface_queries -> SqlInterfaceQuery
5762+
func (l *LookerSDK) CreateSqlInterfaceQuery(
5763+
body WriteSqlInterfaceQueryCreate,
5764+
options *rtl.ApiSettings) (SqlInterfaceQuery, error) {
5765+
var result SqlInterfaceQuery
5766+
err := l.session.Do(&result, "POST", "/4.0", "/sql_interface_queries", nil, body, options)
57085767
return result, err
57095768

57105769
}
@@ -5723,6 +5782,19 @@ func (l *LookerSDK) CreateSqlQuery(
57235782

57245783
}
57255784

5785+
// Get a SQL Runner query.
5786+
//
5787+
// GET /sql_queries/{slug} -> SqlQuery
5788+
func (l *LookerSDK) SqlQuery(
5789+
slug string,
5790+
options *rtl.ApiSettings) (SqlQuery, error) {
5791+
slug = url.PathEscape(slug)
5792+
var result SqlQuery
5793+
err := l.session.Do(&result, "GET", "/4.0", fmt.Sprintf("/sql_queries/%v", slug), nil, nil, options)
5794+
return result, err
5795+
5796+
}
5797+
57265798
// Execute a SQL Runner query in a given result_format.
57275799
//
57285800
// POST /sql_queries/{slug}/run/{result_format} -> string
@@ -5801,7 +5873,7 @@ func (l *LookerSDK) CreateDashboardRenderTask(request RequestCreateDashboardRend
58015873
request.DashboardId = url.PathEscape(request.DashboardId)
58025874
request.ResultFormat = url.PathEscape(request.ResultFormat)
58035875
var result RenderTask
5804-
err := l.session.Do(&result, "POST", "/4.0", fmt.Sprintf("/render_tasks/dashboards/%v/%v", request.DashboardId, request.ResultFormat), map[string]interface{}{"width": request.Width, "height": request.Height, "fields": request.Fields, "pdf_paper_size": request.PdfPaperSize, "pdf_landscape": request.PdfLandscape, "long_tables": request.LongTables}, request.Body, options)
5876+
err := l.session.Do(&result, "POST", "/4.0", fmt.Sprintf("/render_tasks/dashboards/%v/%v", request.DashboardId, request.ResultFormat), map[string]interface{}{"width": request.Width, "height": request.Height, "fields": request.Fields, "pdf_paper_size": request.PdfPaperSize, "pdf_landscape": request.PdfLandscape, "long_tables": request.LongTables, "theme": request.Theme}, request.Body, options)
58055877
return result, err
58065878

58075879
}

0 commit comments

Comments
 (0)