Skip to content

Commit 8c42be7

Browse files
feat: generate SDKs for Looker 24.0 (#1426)
I disabled the pre-commit hook in order to get this to build. Please look at diffs closely to see if it looks good. Release-As: 24.0.0
1 parent aa6c173 commit 8c42be7

File tree

26 files changed

+549
-454
lines changed

26 files changed

+549
-454
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.20";
64+
public const string LookerVersion = "24.0";
6565

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

csharp/sdk/4.0/methods.cs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3753,7 +3753,7 @@ public async Task<SdkResponse<Dashboard, Exception>> dashboard(
37533753
/// You can use this function to change the string and integer properties of
37543754
/// a dashboard. Nested objects such as filters, dashboard elements, or dashboard layout components
37553755
/// cannot be modified by this function - use the update functions for the respective
3756-
/// nested object types (like [update_dashboard_filter()](#!/3.1/Dashboard/update_dashboard_filter) to change a filter)
3756+
/// nested object types (like [update_dashboard_filter()](#!/Dashboard/update_dashboard_filter) to change a filter)
37573757
/// to modify nested objects referenced by a dashboard.
37583758
///
37593759
/// If you receive a 422 error response when updating a dashboard, be sure to look at the
@@ -5859,16 +5859,19 @@ public async Task<SdkResponse<string, Exception>> delete_lookml_model(
58595859
/// <param name="lookml_model_name">Name of lookml model.</param>
58605860
/// <param name="explore_name">Name of explore.</param>
58615861
/// <param name="fields">Requested fields.</param>
5862+
/// <param name="add_drills_metadata">Whether response should include drill field metadata.</param>
58625863
public async Task<SdkResponse<LookmlModelExplore, Exception>> lookml_model_explore(
58635864
string lookml_model_name,
58645865
string explore_name,
58655866
string? fields = null,
5867+
bool? add_drills_metadata = null,
58665868
ITransportSettings? options = null)
58675869
{
58685870
lookml_model_name = SdkUtils.EncodeParam(lookml_model_name);
58695871
explore_name = SdkUtils.EncodeParam(explore_name);
58705872
return await AuthRequest<LookmlModelExplore, Exception>(HttpMethod.Get, $"/lookml_models/{lookml_model_name}/explores/{explore_name}", new Values {
5871-
{ "fields", fields }},null,options);
5873+
{ "fields", fields },
5874+
{ "add_drills_metadata", add_drills_metadata }},null,options);
58725875
}
58735876

58745877
#endregion LookmlModel: Manage LookML Models

csharp/sdk/4.0/models.cs

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

24-
/// 338 API models: 255 Spec, 0 Request, 61 Write, 22 Enum
24+
/// 339 API models: 256 Spec, 0 Request, 61 Write, 22 Enum
2525

2626
#nullable enable
2727
using System;
@@ -2487,7 +2487,7 @@ public class Integration : SdkModel
24872487
public bool? enabled { get; set; } = null;
24882488
/// <summary>Array of params for the integration.</summary>
24892489
public IntegrationParam[]? @params { get; set; } = null;
2490-
/// <summary>A list of data formats the integration supports. If unspecified, the default is all data formats. Valid values are: "txt", "csv", "inline_json", "json", "json_label", "json_detail", "json_detail_lite_stream", "xlsx", "html", "wysiwyg_pdf", "assembled_pdf", "wysiwyg_png", "csv_zip". (read-only)</summary>
2490+
/// <summary>A list of data formats the integration supports. If unspecified, the default is all data formats. Valid values are: "txt", "csv", "inline_json", "json", "json_label", "json_detail", "json_detail_lite_stream", "json_bi", "xlsx", "html", "wysiwyg_pdf", "assembled_pdf", "wysiwyg_png", "csv_zip". (read-only)</summary>
24912491
public SupportedFormats[]? supported_formats { get; set; } = null;
24922492
/// <summary>A list of action types the integration supports. Valid values are: "cell", "query", "dashboard", "none". (read-only)</summary>
24932493
public SupportedActionTypes[]? supported_action_types { get; set; } = null;
@@ -2622,6 +2622,8 @@ public class JsonBi : SdkModel
26222622
public string filter_expression { get; set; } = "";
26232623
/// <summary>Filters applied to the query results (read-only)</summary>
26242624
public StringDictionary<string> filters { get; set; } = null;
2625+
/// <summary>Raw sql query. Null if user does not have permission to view sql (read-only)</summary>
2626+
public string sql { get; set; } = "";
26252627
/// <summary>Json query results (read-only)</summary>
26262628
public string[] data { get; set; } = null;
26272629
}
@@ -3003,6 +3005,16 @@ public class LookBasic : SdkModel
30033005
public string? user_id { get; set; } = null;
30043006
}
30053007

3008+
public class LookmlFieldLink : SdkModel
3009+
{
3010+
/// <summary>The name of the link as it would appear to users. (read-only)</summary>
3011+
public string? label { get; set; } = null;
3012+
/// <summary>URL the link will go to. (read-only)</summary>
3013+
public string? url { get; set; } = null;
3014+
/// <summary>A URL containing an image file to display with a link. (read-only)</summary>
3015+
public string? icon_url { get; set; } = null;
3016+
}
3017+
30063018
public class LookmlModel : SdkModel
30073019
{
30083020
/// <summary>Operations the current user is able to perform on this object (read-only)</summary>
@@ -3164,6 +3176,8 @@ public class LookmlModelExploreField : SdkModel
31643176
public string? description { get; set; } = null;
31653177
/// <summary>Dimension group if this field is part of a dimension group. If not, this will be null. (read-only)</summary>
31663178
public string? dimension_group { get; set; } = null;
3179+
/// <summary>Drill fields declared for this field in LookML or default drills for certain types. (read-only)</summary>
3180+
public string[]? drill_fields { get; set; } = null;
31673181
/// <summary>An array enumerating all the possible values that this field can contain. When null, there is no limit to the set of possible values this field can contain. (read-only)</summary>
31683182
public LookmlModelExploreFieldEnumeration[]? enumerations { get; set; } = null;
31693183
/// <summary>An error message indicating a problem with the definition of this field. If there are no errors, this will be null. (read-only)</summary>
@@ -3179,6 +3193,8 @@ public class LookmlModelExploreField : SdkModel
31793193
public long? fiscal_month_offset { get; set; } = null;
31803194
/// <summary>Whether this field has a set of allowed_values specified in LookML. (read-only)</summary>
31813195
public bool? has_allowed_values { get; set; } = null;
3196+
/// <summary>Whether this field has links or drill fields defined. (read-only)</summary>
3197+
public bool? has_drills_metadata { get; set; } = null;
31823198
/// <summary>Whether this field should be hidden from the user interface. (read-only)</summary>
31833199
public bool? hidden { get; set; } = null;
31843200
/// <summary>Whether this field is a filter. (read-only)</summary>
@@ -3200,6 +3216,8 @@ public class LookmlModelExploreField : SdkModel
32003216
public string? label_short { get; set; } = null;
32013217
/// <summary>A URL linking to the definition of this field in the LookML IDE. (read-only)</summary>
32023218
public string? lookml_link { get; set; } = null;
3219+
/// <summary>Links associated with this field. (read-only)</summary>
3220+
public LookmlFieldLink[]? links { get; set; } = null;
32033221
public LookmlModelExploreFieldMapLayer? map_layer { get; set; }
32043222
/// <summary>Whether this field is a measure. (read-only)</summary>
32053223
public bool? measure { get; set; } = null;
@@ -5148,7 +5166,7 @@ public enum SupportedDownloadSettings
51485166
url
51495167
}
51505168

5151-
/// A list of data formats the integration supports. If unspecified, the default is all data formats. Valid values are: "txt", "csv", "inline_json", "json", "json_label", "json_detail", "json_detail_lite_stream", "xlsx", "html", "wysiwyg_pdf", "assembled_pdf", "wysiwyg_png", "csv_zip". (Enum defined in Integration)
5169+
/// A list of data formats the integration supports. If unspecified, the default is all data formats. Valid values are: "txt", "csv", "inline_json", "json", "json_label", "json_detail", "json_detail_lite_stream", "json_bi", "xlsx", "html", "wysiwyg_pdf", "assembled_pdf", "wysiwyg_png", "csv_zip". (Enum defined in Integration)
51525170
public enum SupportedFormats
51535171
{
51545172
[EnumMember(Value = "txt")]
@@ -5165,6 +5183,8 @@ public enum SupportedFormats
51655183
json_detail,
51665184
[EnumMember(Value = "json_detail_lite_stream")]
51675185
json_detail_lite_stream,
5186+
[EnumMember(Value = "json_bi")]
5187+
json_bi,
51685188
[EnumMember(Value = "xlsx")]
51695189
xlsx,
51705190
[EnumMember(Value = "html")]

go/sdk/v4/methods.go

Lines changed: 11 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -3050,7 +3050,7 @@ func (l *LookerSDK) Dashboard(
30503050
// You can use this function to change the string and integer properties of
30513051
// a dashboard. Nested objects such as filters, dashboard elements, or dashboard layout components
30523052
// cannot be modified by this function - use the update functions for the respective
3053-
// nested object types (like [update_dashboard_filter()](#!/3.1/Dashboard/update_dashboard_filter) to change a filter)
3053+
// nested object types (like [update_dashboard_filter()](#!/Dashboard/update_dashboard_filter) to change a filter)
30543054
// to modify nested objects referenced by a dashboard.
30553055
//
30563056
// If you receive a 422 error response when updating a dashboard, be sure to look at the
@@ -3872,7 +3872,7 @@ func (l *LookerSDK) SearchGroups(request RequestSearchGroups,
38723872
// Boolean search params accept only "true" and "false" as values.
38733873
//
38743874
// GET /groups/search/with_roles -> []GroupSearch
3875-
func (l *LookerSDK) SearchGroupsWithRoles(request RequestSearchGroupsWithRoles,
3875+
func (l *LookerSDK) SearchGroupsWithRoles(request RequestSearchGroups,
38763876
options *rtl.ApiSettings) ([]GroupSearch, error) {
38773877
var result []GroupSearch
38783878
err := l.session.Do(&result, "GET", "/4.0", "/groups/search/with_roles", map[string]interface{}{"fields": request.Fields, "limit": request.Limit, "offset": request.Offset, "sorts": request.Sorts, "filter_or": request.FilterOr, "id": request.Id, "name": request.Name, "external_group_id": request.ExternalGroupId, "externally_managed": request.ExternallyManaged, "externally_orphaned": request.ExternallyOrphaned}, nil, options)
@@ -3907,7 +3907,7 @@ func (l *LookerSDK) SearchGroupsWithRoles(request RequestSearchGroupsWithRoles,
39073907
// Boolean search params accept only "true" and "false" as values.
39083908
//
39093909
// GET /groups/search/with_hierarchy -> []GroupHierarchy
3910-
func (l *LookerSDK) SearchGroupsWithHierarchy(request RequestSearchGroupsWithHierarchy,
3910+
func (l *LookerSDK) SearchGroupsWithHierarchy(request RequestSearchGroups,
39113911
options *rtl.ApiSettings) ([]GroupHierarchy, error) {
39123912
var result []GroupHierarchy
39133913
err := l.session.Do(&result, "GET", "/4.0", "/groups/search/with_hierarchy", map[string]interface{}{"fields": request.Fields, "limit": request.Limit, "offset": request.Offset, "sorts": request.Sorts, "filter_or": request.FilterOr, "id": request.Id, "name": request.Name, "external_group_id": request.ExternalGroupId, "externally_managed": request.ExternallyManaged, "externally_orphaned": request.ExternallyOrphaned}, nil, options)
@@ -4467,7 +4467,7 @@ func (l *LookerSDK) MoveLook(
44674467
// ### Get information about all lookml models.
44684468
//
44694469
// GET /lookml_models -> []LookmlModel
4470-
func (l *LookerSDK) AllLookmlModels(request RequestAllLookmlModels,
4470+
func (l *LookerSDK) AllLookmlModels(request RequestArtifactNamespaces,
44714471
options *rtl.ApiSettings) ([]LookmlModel, error) {
44724472
var result []LookmlModel
44734473
err := l.session.Do(&result, "GET", "/4.0", "/lookml_models", map[string]interface{}{"fields": request.Fields, "limit": request.Limit, "offset": request.Offset}, nil, options)
@@ -4531,15 +4531,12 @@ func (l *LookerSDK) DeleteLookmlModel(
45314531
// ### Get information about a lookml model explore.
45324532
//
45334533
// GET /lookml_models/{lookml_model_name}/explores/{explore_name} -> LookmlModelExplore
4534-
func (l *LookerSDK) LookmlModelExplore(
4535-
lookmlModelName string,
4536-
exploreName string,
4537-
fields string,
4534+
func (l *LookerSDK) LookmlModelExplore(request RequestLookmlModelExplore,
45384535
options *rtl.ApiSettings) (LookmlModelExplore, error) {
4539-
lookmlModelName = url.PathEscape(lookmlModelName)
4540-
exploreName = url.PathEscape(exploreName)
4536+
request.LookmlModelName = url.PathEscape(request.LookmlModelName)
4537+
request.ExploreName = url.PathEscape(request.ExploreName)
45414538
var result LookmlModelExplore
4542-
err := l.session.Do(&result, "GET", "/4.0", fmt.Sprintf("/lookml_models/%v/explores/%v", lookmlModelName, exploreName), map[string]interface{}{"fields": fields}, nil, options)
4539+
err := l.session.Do(&result, "GET", "/4.0", fmt.Sprintf("/lookml_models/%v/explores/%v", request.LookmlModelName, request.ExploreName), map[string]interface{}{"fields": request.Fields, "add_drills_metadata": request.AddDrillsMetadata}, nil, options)
45434540
return result, err
45444541

45454542
}
@@ -6019,7 +6016,7 @@ func (l *LookerSDK) AllPermissions(
60196016
// Boolean search params accept only "true" and "false" as values.
60206017
//
60216018
// GET /permission_sets/search -> []PermissionSet
6022-
func (l *LookerSDK) SearchPermissionSets(request RequestSearchPermissionSets,
6019+
func (l *LookerSDK) SearchPermissionSets(request RequestSearchModelSets,
60236020
options *rtl.ApiSettings) ([]PermissionSet, error) {
60246021
var result []PermissionSet
60256022
err := l.session.Do(&result, "GET", "/4.0", "/permission_sets/search", map[string]interface{}{"fields": request.Fields, "limit": request.Limit, "offset": request.Offset, "sorts": request.Sorts, "id": request.Id, "name": request.Name, "all_access": request.AllAccess, "built_in": request.BuiltIn, "filter_or": request.FilterOr}, nil, options)
@@ -6176,7 +6173,7 @@ func (l *LookerSDK) SearchRoles(request RequestSearchRoles,
61766173
// Boolean search params accept only "true" and "false" as values.
61776174
//
61786175
// GET /roles/search/with_user_count -> []RoleSearch
6179-
func (l *LookerSDK) SearchRolesWithUserCount(request RequestSearchRolesWithUserCount,
6176+
func (l *LookerSDK) SearchRolesWithUserCount(request RequestSearchRoles,
61806177
options *rtl.ApiSettings) ([]RoleSearch, error) {
61816178
var result []RoleSearch
61826179
err := l.session.Do(&result, "GET", "/4.0", "/roles/search/with_user_count", 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)
@@ -7838,7 +7835,7 @@ func (l *LookerSDK) CreateEmbedUser(
78387835
// ### Get information about all user attributes.
78397836
//
78407837
// GET /user_attributes -> []UserAttribute
7841-
func (l *LookerSDK) AllUserAttributes(request RequestAllUserAttributes,
7838+
func (l *LookerSDK) AllUserAttributes(request RequestAllBoardSections,
78427839
options *rtl.ApiSettings) ([]UserAttribute, error) {
78437840
var result []UserAttribute
78447841
err := l.session.Do(&result, "GET", "/4.0", "/user_attributes", map[string]interface{}{"fields": request.Fields, "sorts": request.Sorts}, nil, options)

0 commit comments

Comments
 (0)