Skip to content

Commit

Permalink
feat: generate SDKs for Looker 24.0 (#1426)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
drstrangelooker authored Feb 1, 2024
1 parent aa6c173 commit 8c42be7
Show file tree
Hide file tree
Showing 26 changed files with 549 additions and 454 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 = "23.20";
public const string LookerVersion = "24.0";

public const string Bearer = "Bearer";
public const string LookerAppiId = "x-looker-appid";
Expand Down
7 changes: 5 additions & 2 deletions csharp/sdk/4.0/methods.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3753,7 +3753,7 @@ public async Task<SdkResponse<Dashboard, Exception>> dashboard(
/// You can use this function to change the string and integer properties of
/// a dashboard. Nested objects such as filters, dashboard elements, or dashboard layout components
/// cannot be modified by this function - use the update functions for the respective
/// nested object types (like [update_dashboard_filter()](#!/3.1/Dashboard/update_dashboard_filter) to change a filter)
/// nested object types (like [update_dashboard_filter()](#!/Dashboard/update_dashboard_filter) to change a filter)
/// to modify nested objects referenced by a dashboard.
///
/// If you receive a 422 error response when updating a dashboard, be sure to look at the
Expand Down Expand Up @@ -5859,16 +5859,19 @@ public async Task<SdkResponse<string, Exception>> delete_lookml_model(
/// <param name="lookml_model_name">Name of lookml model.</param>
/// <param name="explore_name">Name of explore.</param>
/// <param name="fields">Requested fields.</param>
/// <param name="add_drills_metadata">Whether response should include drill field metadata.</param>
public async Task<SdkResponse<LookmlModelExplore, Exception>> lookml_model_explore(
string lookml_model_name,
string explore_name,
string? fields = null,
bool? add_drills_metadata = null,
ITransportSettings? options = null)
{
lookml_model_name = SdkUtils.EncodeParam(lookml_model_name);
explore_name = SdkUtils.EncodeParam(explore_name);
return await AuthRequest<LookmlModelExplore, Exception>(HttpMethod.Get, $"/lookml_models/{lookml_model_name}/explores/{explore_name}", new Values {
{ "fields", fields }},null,options);
{ "fields", fields },
{ "add_drills_metadata", add_drills_metadata }},null,options);
}

#endregion LookmlModel: Manage LookML Models
Expand Down
26 changes: 23 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.
///

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

#nullable enable
using System;
Expand Down Expand Up @@ -2487,7 +2487,7 @@ public class Integration : SdkModel
public bool? enabled { get; set; } = null;
/// <summary>Array of params for the integration.</summary>
public IntegrationParam[]? @params { get; set; } = null;
/// <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>
/// <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>
public SupportedFormats[]? supported_formats { get; set; } = null;
/// <summary>A list of action types the integration supports. Valid values are: "cell", "query", "dashboard", "none". (read-only)</summary>
public SupportedActionTypes[]? supported_action_types { get; set; } = null;
Expand Down Expand Up @@ -2622,6 +2622,8 @@ public class JsonBi : SdkModel
public string filter_expression { get; set; } = "";
/// <summary>Filters applied to the query results (read-only)</summary>
public StringDictionary<string> filters { get; set; } = null;
/// <summary>Raw sql query. Null if user does not have permission to view sql (read-only)</summary>
public string sql { get; set; } = "";
/// <summary>Json query results (read-only)</summary>
public string[] data { get; set; } = null;
}
Expand Down Expand Up @@ -3003,6 +3005,16 @@ public class LookBasic : SdkModel
public string? user_id { get; set; } = null;
}

public class LookmlFieldLink : SdkModel
{
/// <summary>The name of the link as it would appear to users. (read-only)</summary>
public string? label { get; set; } = null;
/// <summary>URL the link will go to. (read-only)</summary>
public string? url { get; set; } = null;
/// <summary>A URL containing an image file to display with a link. (read-only)</summary>
public string? icon_url { get; set; } = null;
}

public class LookmlModel : SdkModel
{
/// <summary>Operations the current user is able to perform on this object (read-only)</summary>
Expand Down Expand Up @@ -3164,6 +3176,8 @@ public class LookmlModelExploreField : SdkModel
public string? description { get; set; } = null;
/// <summary>Dimension group if this field is part of a dimension group. If not, this will be null. (read-only)</summary>
public string? dimension_group { get; set; } = null;
/// <summary>Drill fields declared for this field in LookML or default drills for certain types. (read-only)</summary>
public string[]? drill_fields { get; set; } = null;
/// <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>
public LookmlModelExploreFieldEnumeration[]? enumerations { get; set; } = null;
/// <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>
Expand All @@ -3179,6 +3193,8 @@ public class LookmlModelExploreField : SdkModel
public long? fiscal_month_offset { get; set; } = null;
/// <summary>Whether this field has a set of allowed_values specified in LookML. (read-only)</summary>
public bool? has_allowed_values { get; set; } = null;
/// <summary>Whether this field has links or drill fields defined. (read-only)</summary>
public bool? has_drills_metadata { get; set; } = null;
/// <summary>Whether this field should be hidden from the user interface. (read-only)</summary>
public bool? hidden { get; set; } = null;
/// <summary>Whether this field is a filter. (read-only)</summary>
Expand All @@ -3200,6 +3216,8 @@ public class LookmlModelExploreField : SdkModel
public string? label_short { get; set; } = null;
/// <summary>A URL linking to the definition of this field in the LookML IDE. (read-only)</summary>
public string? lookml_link { get; set; } = null;
/// <summary>Links associated with this field. (read-only)</summary>
public LookmlFieldLink[]? links { get; set; } = null;
public LookmlModelExploreFieldMapLayer? map_layer { get; set; }
/// <summary>Whether this field is a measure. (read-only)</summary>
public bool? measure { get; set; } = null;
Expand Down Expand Up @@ -5148,7 +5166,7 @@ public enum SupportedDownloadSettings
url
}

/// 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)
/// 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)
public enum SupportedFormats
{
[EnumMember(Value = "txt")]
Expand All @@ -5165,6 +5183,8 @@ public enum SupportedFormats
json_detail,
[EnumMember(Value = "json_detail_lite_stream")]
json_detail_lite_stream,
[EnumMember(Value = "json_bi")]
json_bi,
[EnumMember(Value = "xlsx")]
xlsx,
[EnumMember(Value = "html")]
Expand Down
25 changes: 11 additions & 14 deletions go/sdk/v4/methods.go
Original file line number Diff line number Diff line change
Expand Up @@ -3050,7 +3050,7 @@ func (l *LookerSDK) Dashboard(
// You can use this function to change the string and integer properties of
// a dashboard. Nested objects such as filters, dashboard elements, or dashboard layout components
// cannot be modified by this function - use the update functions for the respective
// nested object types (like [update_dashboard_filter()](#!/3.1/Dashboard/update_dashboard_filter) to change a filter)
// nested object types (like [update_dashboard_filter()](#!/Dashboard/update_dashboard_filter) to change a filter)
// to modify nested objects referenced by a dashboard.
//
// If you receive a 422 error response when updating a dashboard, be sure to look at the
Expand Down Expand Up @@ -3872,7 +3872,7 @@ func (l *LookerSDK) SearchGroups(request RequestSearchGroups,
// Boolean search params accept only "true" and "false" as values.
//
// GET /groups/search/with_roles -> []GroupSearch
func (l *LookerSDK) SearchGroupsWithRoles(request RequestSearchGroupsWithRoles,
func (l *LookerSDK) SearchGroupsWithRoles(request RequestSearchGroups,
options *rtl.ApiSettings) ([]GroupSearch, error) {
var result []GroupSearch
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)
Expand Down Expand Up @@ -3907,7 +3907,7 @@ func (l *LookerSDK) SearchGroupsWithRoles(request RequestSearchGroupsWithRoles,
// Boolean search params accept only "true" and "false" as values.
//
// GET /groups/search/with_hierarchy -> []GroupHierarchy
func (l *LookerSDK) SearchGroupsWithHierarchy(request RequestSearchGroupsWithHierarchy,
func (l *LookerSDK) SearchGroupsWithHierarchy(request RequestSearchGroups,
options *rtl.ApiSettings) ([]GroupHierarchy, error) {
var result []GroupHierarchy
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)
Expand Down Expand Up @@ -4467,7 +4467,7 @@ func (l *LookerSDK) MoveLook(
// ### Get information about all lookml models.
//
// GET /lookml_models -> []LookmlModel
func (l *LookerSDK) AllLookmlModels(request RequestAllLookmlModels,
func (l *LookerSDK) AllLookmlModels(request RequestArtifactNamespaces,
options *rtl.ApiSettings) ([]LookmlModel, error) {
var result []LookmlModel
err := l.session.Do(&result, "GET", "/4.0", "/lookml_models", map[string]interface{}{"fields": request.Fields, "limit": request.Limit, "offset": request.Offset}, nil, options)
Expand Down Expand Up @@ -4531,15 +4531,12 @@ func (l *LookerSDK) DeleteLookmlModel(
// ### Get information about a lookml model explore.
//
// GET /lookml_models/{lookml_model_name}/explores/{explore_name} -> LookmlModelExplore
func (l *LookerSDK) LookmlModelExplore(
lookmlModelName string,
exploreName string,
fields string,
func (l *LookerSDK) LookmlModelExplore(request RequestLookmlModelExplore,
options *rtl.ApiSettings) (LookmlModelExplore, error) {
lookmlModelName = url.PathEscape(lookmlModelName)
exploreName = url.PathEscape(exploreName)
request.LookmlModelName = url.PathEscape(request.LookmlModelName)
request.ExploreName = url.PathEscape(request.ExploreName)
var result LookmlModelExplore
err := l.session.Do(&result, "GET", "/4.0", fmt.Sprintf("/lookml_models/%v/explores/%v", lookmlModelName, exploreName), map[string]interface{}{"fields": fields}, nil, options)
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)
return result, err

}
Expand Down Expand Up @@ -6019,7 +6016,7 @@ func (l *LookerSDK) AllPermissions(
// Boolean search params accept only "true" and "false" as values.
//
// GET /permission_sets/search -> []PermissionSet
func (l *LookerSDK) SearchPermissionSets(request RequestSearchPermissionSets,
func (l *LookerSDK) SearchPermissionSets(request RequestSearchModelSets,
options *rtl.ApiSettings) ([]PermissionSet, error) {
var result []PermissionSet
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)
Expand Down Expand Up @@ -6176,7 +6173,7 @@ func (l *LookerSDK) SearchRoles(request RequestSearchRoles,
// Boolean search params accept only "true" and "false" as values.
//
// GET /roles/search/with_user_count -> []RoleSearch
func (l *LookerSDK) SearchRolesWithUserCount(request RequestSearchRolesWithUserCount,
func (l *LookerSDK) SearchRolesWithUserCount(request RequestSearchRoles,
options *rtl.ApiSettings) ([]RoleSearch, error) {
var result []RoleSearch
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)
Expand Down Expand Up @@ -7838,7 +7835,7 @@ func (l *LookerSDK) CreateEmbedUser(
// ### Get information about all user attributes.
//
// GET /user_attributes -> []UserAttribute
func (l *LookerSDK) AllUserAttributes(request RequestAllUserAttributes,
func (l *LookerSDK) AllUserAttributes(request RequestAllBoardSections,
options *rtl.ApiSettings) ([]UserAttribute, error) {
var result []UserAttribute
err := l.session.Do(&result, "GET", "/4.0", "/user_attributes", map[string]interface{}{"fields": request.Fields, "sorts": request.Sorts}, nil, options)
Expand Down
Loading

0 comments on commit 8c42be7

Please sign in to comment.