Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: generate SDKs for Looker 22.14 round 2 #1178

Merged
merged 4 commits into from
Sep 21, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 = "22.12";
public const string LookerVersion = "22.14";

public const string Bearer = "Bearer";
public const string LookerAppiId = "x-looker-appid";
Expand Down
4 changes: 3 additions & 1 deletion csharp/sdk/3.1/models.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1169,6 +1169,8 @@ public class DBConnection : SdkModel
public long? pool_timeout { get; set; } = null;
/// <summary>(Read/Write) SQL Dialect name</summary>
public string? dialect_name { get; set; } = null;
/// <summary>Database connection has the ability to support open data studio from explore (read-only)</summary>
public bool? supports_data_studio_link { get; set; } = null;
/// <summary>Creation date for this connection (read-only)</summary>
public string? created_at { get; set; } = null;
/// <summary>Id of user who last modified this connection configuration (read-only)</summary>
Expand Down Expand Up @@ -4761,7 +4763,7 @@ public class WriteDatagroup : SdkModel
}

/// Dynamic writeable type for DBConnection removes:
/// can, dialect, snippets, pdts_enabled, uses_oauth, created_at, user_id, example, last_regen_at, last_reap_at, managed
/// can, dialect, snippets, pdts_enabled, uses_oauth, supports_data_studio_link, created_at, user_id, example, last_regen_at, last_reap_at, managed
public class WriteDBConnection : SdkModel
{
/// <summary>Name of the connection. Also used as the unique identifier</summary>
Expand Down
5 changes: 4 additions & 1 deletion csharp/sdk/4.0/methods.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1381,6 +1381,7 @@ public async Task<SdkResponse<Board, Exception>> create_board(
/// <param name="offset">The number of items to skip before returning any. (used with limit and takes priority over page and per_page)</param>
/// <param name="limit">The maximum number of items to return. (used with offset and takes priority over page and per_page)</param>
/// <param name="filter_or">Combine given search criteria in a boolean OR expression</param>
/// <param name="permission">Filter results based on permission, either show (default) or update</param>
public async Task<SdkResponse<Board[], Exception>> search_boards(
string? title = null,
string? created_at = null,
Expand All @@ -1395,6 +1396,7 @@ public async Task<SdkResponse<Board[], Exception>> search_boards(
long? offset = null,
long? limit = null,
bool? filter_or = null,
string? permission = null,
ITransportSettings? options = null)
{
return await AuthRequest<Board[], Exception>(HttpMethod.Get, "/boards/search", new Values {
Expand All @@ -1410,7 +1412,8 @@ public async Task<SdkResponse<Board[], Exception>> search_boards(
{ "per_page", per_page },
{ "offset", offset },
{ "limit", limit },
{ "filter_or", filter_or }},null,options);
{ "filter_or", filter_or },
{ "permission", permission }},null,options);
}

/// ### Get information about a board.
Expand Down
4 changes: 3 additions & 1 deletion csharp/sdk/4.0/models.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1554,6 +1554,8 @@ public class DBConnection : SdkModel
public long? pool_timeout { get; set; } = null;
/// <summary>(Read/Write) SQL Dialect name</summary>
public string? dialect_name { get; set; } = null;
/// <summary>Database connection has the ability to support open data studio from explore (read-only)</summary>
public bool? supports_data_studio_link { get; set; } = null;
/// <summary>Creation date for this connection (read-only)</summary>
public string? created_at { get; set; } = null;
/// <summary>Id of user who last modified this connection configuration (read-only)</summary>
Expand Down Expand Up @@ -5603,7 +5605,7 @@ public class WriteDatagroup : SdkModel
}

/// Dynamic writeable type for DBConnection removes:
/// can, dialect, snippets, pdts_enabled, uses_oauth, created_at, user_id, example, last_regen_at, last_reap_at, managed
/// can, dialect, snippets, pdts_enabled, uses_oauth, supports_data_studio_link, created_at, user_id, example, last_regen_at, last_reap_at, managed
public class WriteDBConnection : SdkModel
{
/// <summary>Name of the connection. Also used as the unique identifier</summary>
Expand Down
2 changes: 1 addition & 1 deletion go/sdk/v4/methods.go
Original file line number Diff line number Diff line change
Expand Up @@ -1190,7 +1190,7 @@ func (l *LookerSDK) CreateBoard(
func (l *LookerSDK) SearchBoards(request RequestSearchBoards,
options *rtl.ApiSettings) ([]Board, error) {
var result []Board
err := l.session.Do(&result, "GET", "/4.0", "/boards/search", map[string]interface{}{"title": request.Title, "created_at": request.CreatedAt, "first_name": request.FirstName, "last_name": request.LastName, "fields": request.Fields, "favorited": request.Favorited, "creator_id": request.CreatorId, "sorts": request.Sorts, "page": request.Page, "per_page": request.PerPage, "offset": request.Offset, "limit": request.Limit, "filter_or": request.FilterOr}, nil, options)
err := l.session.Do(&result, "GET", "/4.0", "/boards/search", map[string]interface{}{"title": request.Title, "created_at": request.CreatedAt, "first_name": request.FirstName, "last_name": request.LastName, "fields": request.Fields, "favorited": request.Favorited, "creator_id": request.CreatorId, "sorts": request.Sorts, "page": request.Page, "per_page": request.PerPage, "offset": request.Offset, "limit": request.Limit, "filter_or": request.FilterOr, "permission": request.Permission}, nil, options)
return result, err

}
Expand Down
30 changes: 16 additions & 14 deletions go/sdk/v4/models.go
Original file line number Diff line number Diff line change
Expand Up @@ -887,6 +887,7 @@ type DBConnection struct {
JdbcAdditionalParams *string `json:"jdbc_additional_params,omitempty"` // Additional params to add to JDBC connection string
PoolTimeout *int64 `json:"pool_timeout,omitempty"` // Connection Pool Timeout, in seconds
DialectName *string `json:"dialect_name,omitempty"` // (Read/Write) SQL Dialect name
SupportsDataStudioLink *bool `json:"supports_data_studio_link,omitempty"` // Database connection has the ability to support open data studio from explore
CreatedAt *string `json:"created_at,omitempty"` // Creation date for this connection
UserId *string `json:"user_id,omitempty"` // Id of user who last modified this connection configuration
Example *bool `json:"example,omitempty"` // Is this an example connection?
Expand Down Expand Up @@ -2594,19 +2595,20 @@ type RequestSearchAlerts struct {

// Dynamically generated request type for search_boards
type RequestSearchBoards struct {
Title *string `json:"title,omitempty"` // Matches board title.
CreatedAt *string `json:"created_at,omitempty"` // Matches the timestamp for when the board was created.
FirstName *string `json:"first_name,omitempty"` // The first name of the user who created this board.
LastName *string `json:"last_name,omitempty"` // The last name of the user who created this board.
Fields *string `json:"fields,omitempty"` // Requested fields.
Favorited *bool `json:"favorited,omitempty"` // Return favorited boards when true.
CreatorId *string `json:"creator_id,omitempty"` // Filter on boards created by a particular user.
Sorts *string `json:"sorts,omitempty"` // The fields to sort the results by
Page *int64 `json:"page,omitempty"` // The page to return. DEPRECATED. Use offset instead.
PerPage *int64 `json:"per_page,omitempty"` // The number of items in the returned page. DEPRECATED. Use limit instead.
Offset *int64 `json:"offset,omitempty"` // The number of items to skip before returning any. (used with limit and takes priority over page and per_page)
Limit *int64 `json:"limit,omitempty"` // The maximum number of items to return. (used with offset and takes priority over page and per_page)
FilterOr *bool `json:"filter_or,omitempty"` // Combine given search criteria in a boolean OR expression
Title *string `json:"title,omitempty"` // Matches board title.
CreatedAt *string `json:"created_at,omitempty"` // Matches the timestamp for when the board was created.
FirstName *string `json:"first_name,omitempty"` // The first name of the user who created this board.
LastName *string `json:"last_name,omitempty"` // The last name of the user who created this board.
Fields *string `json:"fields,omitempty"` // Requested fields.
Favorited *bool `json:"favorited,omitempty"` // Return favorited boards when true.
CreatorId *string `json:"creator_id,omitempty"` // Filter on boards created by a particular user.
Sorts *string `json:"sorts,omitempty"` // The fields to sort the results by
Page *int64 `json:"page,omitempty"` // The page to return. DEPRECATED. Use offset instead.
PerPage *int64 `json:"per_page,omitempty"` // The number of items in the returned page. DEPRECATED. Use limit instead.
Offset *int64 `json:"offset,omitempty"` // The number of items to skip before returning any. (used with limit and takes priority over page and per_page)
Limit *int64 `json:"limit,omitempty"` // The maximum number of items to return. (used with offset and takes priority over page and per_page)
FilterOr *bool `json:"filter_or,omitempty"` // Combine given search criteria in a boolean OR expression
Permission *string `json:"permission,omitempty"` // Filter results based on permission, either show (default) or update
}

// Dynamically generated request type for search_content_favorites
Expand Down Expand Up @@ -3823,7 +3825,7 @@ type WriteDatagroup struct {
}

// Dynamic writeable type for DBConnection removes:
// can, dialect, snippets, pdts_enabled, uses_oauth, created_at, user_id, example, last_regen_at, last_reap_at, managed
// can, dialect, snippets, pdts_enabled, uses_oauth, supports_data_studio_link, created_at, user_id, example, last_regen_at, last_reap_at, managed
type WriteDBConnection struct {
Name *string `json:"name,omitempty"` // Name of the connection. Also used as the unique identifier
Host *string `json:"host,omitempty"` // Host name/address of server
Expand Down
7 changes: 5 additions & 2 deletions kotlin/src/main/com/looker/sdk/4.0/methods.kt
Original file line number Diff line number Diff line change
Expand Up @@ -1401,6 +1401,7 @@ class LookerSDK(authSession: AuthSession) : APIMethods(authSession) {
* @param {Long} offset The number of items to skip before returning any. (used with limit and takes priority over page and per_page)
* @param {Long} limit The maximum number of items to return. (used with offset and takes priority over page and per_page)
* @param {Boolean} filter_or Combine given search criteria in a boolean OR expression
* @param {String} permission Filter results based on permission, either show (default) or update
*
* GET /boards/search -> Array<Board>
*/
Expand All @@ -1417,7 +1418,8 @@ class LookerSDK(authSession: AuthSession) : APIMethods(authSession) {
per_page: Long? = null,
offset: Long? = null,
limit: Long? = null,
filter_or: Boolean? = null
filter_or: Boolean? = null,
permission: String? = null
) : SDKResponse {
return this.get<Array<Board>>("/boards/search",
mapOf("title" to title,
Expand All @@ -1432,7 +1434,8 @@ class LookerSDK(authSession: AuthSession) : APIMethods(authSession) {
"per_page" to per_page,
"offset" to offset,
"limit" to limit,
"filter_or" to filter_or))
"filter_or" to filter_or,
"permission" to permission))
}


Expand Down
4 changes: 3 additions & 1 deletion kotlin/src/main/com/looker/sdk/4.0/models.kt
Original file line number Diff line number Diff line change
Expand Up @@ -1622,6 +1622,7 @@ data class Datagroup (
* @property jdbc_additional_params Additional params to add to JDBC connection string
* @property pool_timeout Connection Pool Timeout, in seconds
* @property dialect_name (Read/Write) SQL Dialect name
* @property supports_data_studio_link Database connection has the ability to support open data studio from explore (read-only)
* @property created_at Creation date for this connection (read-only)
* @property user_id Id of user who last modified this connection configuration (read-only)
* @property example Is this an example connection? (read-only)
Expand Down Expand Up @@ -1668,6 +1669,7 @@ data class DBConnection (
var jdbc_additional_params: String? = null,
var pool_timeout: Long? = null,
var dialect_name: String? = null,
var supports_data_studio_link: Boolean? = null,
var created_at: String? = null,
var user_id: String? = null,
var example: Boolean? = null,
Expand Down Expand Up @@ -5856,7 +5858,7 @@ data class WriteDatagroup (

/**
* Dynamic writeable type for DBConnection removes:
* can, dialect, snippets, pdts_enabled, uses_oauth, created_at, user_id, example, last_regen_at, last_reap_at, managed
* can, dialect, snippets, pdts_enabled, uses_oauth, supports_data_studio_link, created_at, user_id, example, last_regen_at, last_reap_at, managed
*
* @property name Name of the connection. Also used as the unique identifier
* @property host Host name/address of server
Expand Down
7 changes: 5 additions & 2 deletions kotlin/src/main/com/looker/sdk/4.0/streams.kt
Original file line number Diff line number Diff line change
Expand Up @@ -1400,6 +1400,7 @@ class LookerSDKStream(authSession: AuthSession) : APIMethods(authSession) {
* @param {Long} offset The number of items to skip before returning any. (used with limit and takes priority over page and per_page)
* @param {Long} limit The maximum number of items to return. (used with offset and takes priority over page and per_page)
* @param {Boolean} filter_or Combine given search criteria in a boolean OR expression
* @param {String} permission Filter results based on permission, either show (default) or update
*
* GET /boards/search -> ByteArray
*/
Expand All @@ -1416,7 +1417,8 @@ class LookerSDKStream(authSession: AuthSession) : APIMethods(authSession) {
per_page: Long? = null,
offset: Long? = null,
limit: Long? = null,
filter_or: Boolean? = null
filter_or: Boolean? = null,
permission: String? = null
) : SDKResponse {
return this.get<ByteArray>("/boards/search",
mapOf("title" to title,
Expand All @@ -1431,7 +1433,8 @@ class LookerSDKStream(authSession: AuthSession) : APIMethods(authSession) {
"per_page" to per_page,
"offset" to offset,
"limit" to limit,
"filter_or" to filter_or))
"filter_or" to filter_or,
"permission" to permission))
}


Expand Down
2 changes: 1 addition & 1 deletion kotlin/src/main/com/looker/sdk/Constants.kt
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ package com.looker.sdk

const val ENVIRONMENT_PREFIX = "LOOKERSDK"
const val SDK_TAG = "KT-SDK"
const val LOOKER_VERSION = "22.12"
const val LOOKER_VERSION = "22.14"
const val API_VERSION = "4.0"
const val AGENT_TAG = "$SDK_TAG $LOOKER_VERSION"
const val LOOKER_APPID = "x-looker-appid"
6 changes: 5 additions & 1 deletion packages/sdk/src/3.1/models.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1955,6 +1955,10 @@ export interface IDBConnection {
* (Read/Write) SQL Dialect name
*/
dialect_name?: string | null
/**
* Database connection has the ability to support open data studio from explore (read-only)
*/
supports_data_studio_link?: boolean
/**
* Creation date for this connection (read-only)
*/
Expand Down Expand Up @@ -9788,7 +9792,7 @@ export interface IWriteDatagroup {

/**
* Dynamic writeable type for DBConnection removes:
* can, dialect, snippets, pdts_enabled, uses_oauth, created_at, user_id, example, last_regen_at, last_reap_at, managed
* can, dialect, snippets, pdts_enabled, uses_oauth, supports_data_studio_link, created_at, user_id, example, last_regen_at, last_reap_at, managed
*/
export interface IWriteDBConnection {
/**
Expand Down
1 change: 1 addition & 0 deletions packages/sdk/src/4.0/funcs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2164,6 +2164,7 @@ export const search_boards = async (
offset: request.offset,
limit: request.limit,
filter_or: request.filter_or,
permission: request.permission,
},
null,
options
Expand Down
1 change: 1 addition & 0 deletions packages/sdk/src/4.0/methods.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2042,6 +2042,7 @@ export class Looker40SDK extends APIMethods implements ILooker40SDK {
offset: request.offset,
limit: request.limit,
filter_or: request.filter_or,
permission: request.permission,
},
null,
options
Expand Down
10 changes: 9 additions & 1 deletion packages/sdk/src/4.0/models.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2596,6 +2596,10 @@ export interface IDBConnection {
* (Read/Write) SQL Dialect name
*/
dialect_name?: string | null
/**
* Database connection has the ability to support open data studio from explore (read-only)
*/
supports_data_studio_link?: boolean
/**
* Creation date for this connection (read-only)
*/
Expand Down Expand Up @@ -7892,6 +7896,10 @@ export interface IRequestSearchBoards {
* Combine given search criteria in a boolean OR expression
*/
filter_or?: boolean | null
/**
* Filter results based on permission, either show (default) or update
*/
permission?: string | null
}

/**
Expand Down Expand Up @@ -11502,7 +11510,7 @@ export interface IWriteDatagroup {

/**
* Dynamic writeable type for DBConnection removes:
* can, dialect, snippets, pdts_enabled, uses_oauth, created_at, user_id, example, last_regen_at, last_reap_at, managed
* can, dialect, snippets, pdts_enabled, uses_oauth, supports_data_studio_link, created_at, user_id, example, last_regen_at, last_reap_at, managed
*/
export interface IWriteDBConnection {
/**
Expand Down
1 change: 1 addition & 0 deletions packages/sdk/src/4.0/streams.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2330,6 +2330,7 @@ export class Looker40SDKStream extends APIMethods {
offset: request.offset,
limit: request.limit,
filter_or: request.filter_or,
permission: request.permission,
},
null,
options
Expand Down
2 changes: 1 addition & 1 deletion packages/sdk/src/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,5 @@

*/

export const sdkVersion = '22.12'
export const sdkVersion = '22.14'
export const environmentPrefix = 'LOOKERSDK'
6 changes: 5 additions & 1 deletion python/looker_sdk/sdk/api31/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -2532,6 +2532,7 @@ class DBConnection(model.Model):
jdbc_additional_params: Additional params to add to JDBC connection string
pool_timeout: Connection Pool Timeout, in seconds
dialect_name: (Read/Write) SQL Dialect name
supports_data_studio_link: Database connection has the ability to support open data studio from explore
created_at: Creation date for this connection
user_id: Id of user who last modified this connection configuration
example: Is this an example connection?
Expand Down Expand Up @@ -2571,6 +2572,7 @@ class DBConnection(model.Model):
jdbc_additional_params: Optional[str] = None
pool_timeout: Optional[int] = None
dialect_name: Optional[str] = None
supports_data_studio_link: Optional[bool] = None
created_at: Optional[str] = None
user_id: Optional[str] = None
example: Optional[bool] = None
Expand Down Expand Up @@ -2612,6 +2614,7 @@ def __init__(
jdbc_additional_params: Optional[str] = None,
pool_timeout: Optional[int] = None,
dialect_name: Optional[str] = None,
supports_data_studio_link: Optional[bool] = None,
created_at: Optional[str] = None,
user_id: Optional[str] = None,
example: Optional[bool] = None,
Expand Down Expand Up @@ -2650,6 +2653,7 @@ def __init__(
self.jdbc_additional_params = jdbc_additional_params
self.pool_timeout = pool_timeout
self.dialect_name = dialect_name
self.supports_data_studio_link = supports_data_studio_link
self.created_at = created_at
self.user_id = user_id
self.example = example
Expand Down Expand Up @@ -10300,7 +10304,7 @@ def __init__(
class WriteDBConnection(model.Model):
"""
Dynamic writeable type for DBConnection removes:
can, dialect, snippets, pdts_enabled, uses_oauth, created_at, user_id, example, last_regen_at, last_reap_at, managed
can, dialect, snippets, pdts_enabled, uses_oauth, supports_data_studio_link, created_at, user_id, example, last_regen_at, last_reap_at, managed

Attributes:
name: Name of the connection. Also used as the unique identifier
Expand Down
3 changes: 3 additions & 0 deletions python/looker_sdk/sdk/api40/methods.py
Original file line number Diff line number Diff line change
Expand Up @@ -1793,6 +1793,8 @@ def search_boards(
limit: Optional[int] = None,
# Combine given search criteria in a boolean OR expression
filter_or: Optional[bool] = None,
# Filter results based on permission, either show (default) or update
permission: Optional[str] = None,
transport_options: Optional[transport.TransportOptions] = None,
) -> Sequence[mdls.Board]:
"""Search Boards"""
Expand All @@ -1815,6 +1817,7 @@ def search_boards(
"offset": offset,
"limit": limit,
"filter_or": filter_or,
"permission": permission,
},
transport_options=transport_options,
),
Expand Down
Loading