Skip to content

Commit

Permalink
feat: generate SDKs for Looker 23.6 (#1293)
Browse files Browse the repository at this point in the history
Release-As: 23.6.0
  • Loading branch information
pfrisella authored Apr 11, 2023
1 parent 6dcbd31 commit dab9e0a
Show file tree
Hide file tree
Showing 35 changed files with 658 additions and 412 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.4";
public const string LookerVersion = "23.6";

public const string Bearer = "Bearer";
public const string LookerAppiId = "x-looker-appid";
Expand Down
36 changes: 20 additions & 16 deletions csharp/sdk/3.1/methods.cs
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ public Looker31SDK(IAuthSession authSession): base(authSession, "3.1") { }
/// ### Present client credentials to obtain an authorization token
///
/// Looker API implements the OAuth2 [Resource Owner Password Credentials Grant](https://cloud.google.com/looker/docs/r/api/outh2_resource_owner_pc) pattern.
/// The client credentials required for this login must be obtained by creating an API3 key on a user account
/// in the Looker Admin console. The API3 key consists of a public `client_id` and a private `client_secret`.
/// The client credentials required for this login must be obtained by creating an API key on a user account
/// in the Looker Admin console. The API key consists of a public `client_id` and a private `client_secret`.
///
/// The access token returned by `login` must be used in the HTTP Authorization header of subsequent
/// API requests, like this:
Expand All @@ -68,14 +68,14 @@ public Looker31SDK(IAuthSession authSession): base(authSession, "3.1") { }
/// ### Best Practice:
/// Always pass credentials in body params. Pass credentials in URL query params **only** when you cannot pass body params due to application, tool, or other limitations.
///
/// For more information and detailed examples of Looker API authorization, see [How to Authenticate to Looker API3](https://github.com/looker/looker-sdk-ruby/blob/master/authentication.md).
/// For more information and detailed examples of Looker API authorization, see [How to Authenticate to Looker API](https://github.com/looker/looker-sdk-ruby/blob/master/authentication.md).
///
/// POST /login -> AccessToken
///
/// <returns><c>AccessToken</c> Access token with metadata. (application/json)</returns>
///
/// <param name="client_id">client_id part of API3 Key.</param>
/// <param name="client_secret">client_secret part of API3 Key.</param>
/// <param name="client_id">client_id part of API Key.</param>
/// <param name="client_secret">client_secret part of API Key.</param>
public async Task<SdkResponse<AccessToken, Exception>> login(
string? client_id = null,
string? client_secret = null,
Expand Down Expand Up @@ -1567,13 +1567,15 @@ public async Task<SdkResponse<string, Exception>> delete_content_metadata_access
/// <param name="type">Either dashboard or look</param>
/// <param name="resource_id">ID of the dashboard or look to render</param>
/// <param name="reload">Whether or not to refresh the rendered image with the latest content</param>
/// <param name="theme">Light or dark background. Default is "light"</param>
/// <param name="format">A value of png produces a thumbnail in PNG format instead of SVG (default)</param>
/// <param name="width">The width of the image if format is supplied</param>
/// <param name="height">The height of the image if format is supplied</param>
public async Task<SdkResponse<TSuccess, Exception>> content_thumbnail<TSuccess>(
string type,
string resource_id,
string? reload = null,
string? theme = null,
string? format = null,
long? width = null,
long? height = null,
Expand All @@ -1583,6 +1585,7 @@ public async Task<SdkResponse<TSuccess, Exception>> content_thumbnail<TSuccess>(
resource_id = SdkUtils.EncodeParam(resource_id);
return await AuthRequest<TSuccess, Exception>(HttpMethod.Get, $"/content_thumbnail/{type}/{resource_id}", new Values {
{ "reload", reload },
{ "theme", theme },
{ "format", format },
{ "width", width },
{ "height", height }},null,options);
Expand Down Expand Up @@ -1758,7 +1761,8 @@ public async Task<SdkResponse<Dashboard, Exception>> create_dashboard(

/// ### Search Dashboards
///
/// Returns an **array of dashboard objects** that match the specified search criteria.
/// Returns an array of **user-defined dashboard** objects that match the specified search criteria.
/// Note, [search_dashboards()](#!/Dashboard/search_dashboards) does not return LookML dashboard objects.
///
/// If multiple search params are given and `filter_or` is FALSE or not specified,
/// search params are combined in a logical AND operation.
Expand Down Expand Up @@ -7723,14 +7727,14 @@ public async Task<SdkResponse<string, Exception>> delete_user_credentials_oidc(
return await AuthRequest<string, Exception>(HttpMethod.Delete, $"/users/{user_id}/credentials_oidc", null,null,options);
}

/// ### API 3 login information for the specified user. This is for the newer API keys that can be added for any user.
/// ### API login information for the specified user. This is for the newer API keys that can be added for any user.
///
/// GET /users/{user_id}/credentials_api3/{credentials_api3_id} -> CredentialsApi3
///
/// <returns><c>CredentialsApi3</c> API 3 Credential (application/json)</returns>
/// <returns><c>CredentialsApi3</c> API Credential (application/json)</returns>
///
/// <param name="user_id">Id of user</param>
/// <param name="credentials_api3_id">Id of API 3 Credential</param>
/// <param name="credentials_api3_id">Id of API Credential</param>
/// <param name="fields">Requested fields.</param>
public async Task<SdkResponse<CredentialsApi3, Exception>> user_credentials_api3(
long user_id,
Expand All @@ -7742,14 +7746,14 @@ public async Task<SdkResponse<CredentialsApi3, Exception>> user_credentials_api3
{ "fields", fields }},null,options);
}

/// ### API 3 login information for the specified user. This is for the newer API keys that can be added for any user.
/// ### API login information for the specified user. This is for the newer API keys that can be added for any user.
///
/// DELETE /users/{user_id}/credentials_api3/{credentials_api3_id} -> string
///
/// <returns><c>string</c> Successfully deleted. (application/json)</returns>
///
/// <param name="user_id">Id of user</param>
/// <param name="credentials_api3_id">Id of API 3 Credential</param>
/// <param name="credentials_api3_id">Id of API Credential</param>
public async Task<SdkResponse<string, Exception>> delete_user_credentials_api3(
long user_id,
long credentials_api3_id,
Expand All @@ -7758,11 +7762,11 @@ public async Task<SdkResponse<string, Exception>> delete_user_credentials_api3(
return await AuthRequest<string, Exception>(HttpMethod.Delete, $"/users/{user_id}/credentials_api3/{credentials_api3_id}", null,null,options);
}

/// ### API 3 login information for the specified user. This is for the newer API keys that can be added for any user.
/// ### API login information for the specified user. This is for the newer API keys that can be added for any user.
///
/// GET /users/{user_id}/credentials_api3 -> CredentialsApi3[]
///
/// <returns><c>CredentialsApi3[]</c> API 3 Credential (application/json)</returns>
/// <returns><c>CredentialsApi3[]</c> API Credential (application/json)</returns>
///
/// <param name="user_id">Id of user</param>
/// <param name="fields">Requested fields.</param>
Expand All @@ -7775,11 +7779,11 @@ public async Task<SdkResponse<CredentialsApi3[], Exception>> all_user_credential
{ "fields", fields }},null,options);
}

/// ### API 3 login information for the specified user. This is for the newer API keys that can be added for any user.
/// ### API login information for the specified user. This is for the newer API keys that can be added for any user.
///
/// POST /users/{user_id}/credentials_api3 -> CredentialsApi3
///
/// <returns><c>CredentialsApi3</c> API 3 Credential (application/json)</returns>
/// <returns><c>CredentialsApi3</c> API Credential (application/json)</returns>
///
/// <param name="user_id">Id of user</param>
/// <param name="fields">Requested fields.</param>
Expand Down Expand Up @@ -8269,7 +8273,7 @@ public async Task<SdkResponse<Workspace[], Exception>> all_workspaces(
///
/// The dev workspace is NOT unique to an API session. Two applications accessing the Looker API using
/// the same user account will see the same files in the dev workspace. To avoid collisions between
/// API clients it's best to have each client login with API3 credentials for a different user account.
/// API clients it's best to have each client login with API credentials for a different user account.
///
/// Changes made to files in a dev workspace are persistent across API sessions. It's a good
/// idea to commit any changes you've made to the git repository, but not strictly required. Your modified files
Expand Down
18 changes: 11 additions & 7 deletions csharp/sdk/3.1/models.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1165,7 +1165,7 @@ public class DBConnection : SdkModel
public string? db_timezone { get; set; } = null;
/// <summary>Timezone to use in queries</summary>
public string? query_timezone { get; set; } = null;
/// <summary>Scheme name</summary>
/// <summary>Schema name</summary>
public string? schema { get; set; } = null;
/// <summary>Maximum number of concurrent connection to use</summary>
public long? max_connections { get; set; } = null;
Expand Down Expand Up @@ -1247,7 +1247,7 @@ public class DBConnectionOverride : SdkModel
public string? file_type { get; set; } = null;
/// <summary>Database name</summary>
public string? database { get; set; } = null;
/// <summary>Scheme name</summary>
/// <summary>Schema name</summary>
public string? schema { get; set; } = null;
/// <summary>Additional params to add to JDBC connection string</summary>
public string? jdbc_additional_params { get; set; } = null;
Expand Down Expand Up @@ -4108,7 +4108,7 @@ public class ThemeSettings : SdkModel
public string? font_family { get; set; } = null;
/// <summary>Source specification for font</summary>
public string? font_source { get; set; } = null;
/// <summary>Info button color</summary>
/// <summary>(DEPRECATED) Info button color</summary>
public string? info_button_color { get; set; } = null;
/// <summary>Primary button color</summary>
public string? primary_button_color { get; set; } = null;
Expand All @@ -4126,7 +4126,7 @@ public class ThemeSettings : SdkModel
public string? tile_text_color { get; set; } = null;
/// <summary>Color for titles</summary>
public string? title_color { get; set; } = null;
/// <summary>Warning button color</summary>
/// <summary>(DEPRECATED) Warning button color</summary>
public string? warn_button_color { get; set; } = null;
/// <summary>The text alignment of tile titles (New Dashboards)</summary>
public string? tile_title_alignment { get; set; } = null;
Expand All @@ -4144,6 +4144,10 @@ public class ThemeSettings : SdkModel
public bool? show_dashboard_header { get; set; } = null;
/// <summary>Toggle to center the dashboard title. Defaults to false.</summary>
public bool? center_dashboard_title { get; set; } = null;
/// <summary>Dashboard title font size.</summary>
public string? dashboard_title_font_size { get; set; } = null;
/// <summary>Default box shadow.</summary>
public string? box_shadow { get; set; } = null;
}

public class Timezone : SdkModel
Expand Down Expand Up @@ -4180,7 +4184,7 @@ public class User : SdkModel
public Url? avatar_url { get; set; } = null;
/// <summary>URL for the avatar image (may be generic), does not specify size (read-only)</summary>
public Url? avatar_url_without_sizing { get; set; } = null;
/// <summary>API 3 credentials (read-only)</summary>
/// <summary>API credentials (read-only)</summary>
public CredentialsApi3[]? credentials_api3 { get; set; } = null;
public CredentialsEmail? credentials_email { get; set; }
/// <summary>Embed credentials (read-only)</summary>
Expand Down Expand Up @@ -4852,7 +4856,7 @@ public class WriteDBConnection : SdkModel
public string? db_timezone { get; set; } = null;
/// <summary>Timezone to use in queries</summary>
public string? query_timezone { get; set; } = null;
/// <summary>Scheme name</summary>
/// <summary>Schema name</summary>
public string? schema { get; set; } = null;
/// <summary>Maximum number of concurrent connection to use</summary>
public long? max_connections { get; set; } = null;
Expand Down Expand Up @@ -4911,7 +4915,7 @@ public class WriteDBConnectionOverride : SdkModel
public string? file_type { get; set; } = null;
/// <summary>Database name</summary>
public string? database { get; set; } = null;
/// <summary>Scheme name</summary>
/// <summary>Schema name</summary>
public string? schema { get; set; } = null;
/// <summary>Additional params to add to JDBC connection string</summary>
public string? jdbc_additional_params { get; set; } = null;
Expand Down
Loading

0 comments on commit dab9e0a

Please sign in to comment.