diff --git a/csharp/rtl/Constants.cs b/csharp/rtl/Constants.cs index 7d8554891..f9c74b2e4 100644 --- a/csharp/rtl/Constants.cs +++ b/csharp/rtl/Constants.cs @@ -61,7 +61,7 @@ public struct Constants public const string DefaultApiVersion = "4.0"; public const string AgentPrefix = "CS-SDK"; - public const string LookerVersion = "25.4"; + public const string LookerVersion = "25.6"; public const string Bearer = "Bearer"; public const string LookerAppiId = "x-looker-appid"; diff --git a/csharp/sdk/4.0/methods.cs b/csharp/sdk/4.0/methods.cs index d427f2d90..3a6030c1e 100644 --- a/csharp/sdk/4.0/methods.cs +++ b/csharp/sdk/4.0/methods.cs @@ -21,7 +21,7 @@ /// SOFTWARE. /// -/// 469 API methods +/// 471 API methods #nullable enable using System; @@ -733,9 +733,6 @@ public async Task> create_sso_embed_url /// it to disk, do not pass it to a third party, and only pass it through a secure HTTPS /// encrypted transport. /// - /// - /// **NOTE**: Calls to this endpoint require [Embedding](https://cloud.google.com/looker/docs/r/looker-core-feature-embed) to be enabled. Usage of this endpoint is not authorized for Looker Core Standard and Looker Core Enterprise. - /// /// POST /embed/token_url/me -> EmbedUrlResponse /// /// EmbedUrlResponse Embed URL (application/json) @@ -6868,6 +6865,46 @@ public async Task> tag_ref( { "tag_message", tag_message }},body,options); } + /// ### Fetches a CI Run. + /// + /// GET /projects/{project_id}/ci/runs/{run_id} -> ProjectCIRun + /// + /// ProjectCIRun CI Run (application/json) + /// + /// Project Id + /// Run Id + /// Requested fields + public async Task> get_ci_run( + string project_id, + string run_id, + string? fields = null, + ITransportSettings? options = null) +{ + project_id = SdkUtils.EncodeParam(project_id); + run_id = SdkUtils.EncodeParam(run_id); + return await AuthRequest(HttpMethod.Get, $"/projects/{project_id}/ci/runs/{run_id}", new Values { + { "fields", fields }},null,options); + } + + /// ### Creates a CI Run. + /// + /// POST /projects/{project_id}/ci/run -> CreateCIRunResponse + /// + /// CreateCIRunResponse CI Run (application/json) + /// + /// Project Id + /// Requested fields + public async Task> create_ci_run( + string project_id, + CreateCIRunRequest body, + string? fields = null, + ITransportSettings? options = null) +{ + project_id = SdkUtils.EncodeParam(project_id); + return await AuthRequest(HttpMethod.Post, $"/projects/{project_id}/ci/run", new Values { + { "fields", fields }},body,options); + } + /// ### Configure Repository Credential for a remote dependency /// /// Admin required. diff --git a/csharp/sdk/4.0/models.cs b/csharp/sdk/4.0/models.cs index 08f498a35..2a44a56ae 100644 --- a/csharp/sdk/4.0/models.cs +++ b/csharp/sdk/4.0/models.cs @@ -21,7 +21,7 @@ /// SOFTWARE. /// -/// 344 API models: 260 Spec, 0 Request, 62 Write, 22 Enum +/// 353 API models: 269 Spec, 0 Request, 62 Write, 22 Enum #nullable enable using System; @@ -422,6 +422,83 @@ public enum Category dimension } +public class CIChangeRequest : SdkModel +{ + /// Change request number (read-only) + public long? change_request_number { get; set; } = null; + /// Change request url (read-only) + public string? change_request_url { get; set; } = null; + /// Change request name (read-only) + public string? change_request_name { get; set; } = null; + /// Change request commits url (read-only) + public string? change_request_commits_url { get; set; } = null; +} + +public class CIGitState : SdkModel +{ + /// Git branch for run (read-only) + public string? branch { get; set; } = null; + /// Git repository for run (read-only) + public string? repository { get; set; } = null; + /// Git commit for run (read-only) + public string? commit_ref { get; set; } = null; + /// Run start time. (read-only) + public string? target { get; set; } = null; +} + +public class CIRun : SdkModel +{ + /// Run ID (read-only) + public string? run_id { get; set; } = null; + /// Run created time. (read-only) + public DateTime? created_at { get; set; } = null; + /// Run start time. (read-only) + public DateTime? started_at { get; set; } = null; + /// Run completed time. (read-only) + public DateTime? finished_at { get; set; } = null; + /// Run status url (read-only) + public string? status_url { get; set; } = null; + /// Run status. (read-only) + public string? status { get; set; } = null; + /// Git service for run (read-only) + public string? git_service { get; set; } = null; + public CIGitState? git_state { get; set; } + /// Run results (read-only) + public CIRunResult[]? result { get; set; } = null; + public CIScheduleTrigger? schedule { get; set; } + /// Target branch for run (read-only) + public string? target_branch { get; set; } = null; + /// Suite title (read-only) + public string? title { get; set; } = null; + /// Trigger for run (read-only) + public string? trigger { get; set; } = null; + public CIChangeRequest? change_request { get; set; } + /// The Id of the suite used (read-only) + public string? suite_id { get; set; } = null; + /// User who triggered the run (read-only) + public string? username { get; set; } = null; +} + +public class CIRunResult : SdkModel +{ + /// Run result status (read-only) + public string? status { get; set; } = null; + /// Run result validator (read-only) + public string? validator { get; set; } = null; +} + +public class CIScheduleTrigger : SdkModel +{ + /// Whether schedule is active (read-only) + public bool? enabled { get; set; } = null; + /// Day of week (0 = Sunday, 6 = Saturday) (read-only) + public string? day { get; set; } = null; + /// Hour of the day (24 hour format) (read-only) + public string? hour { get; set; } = null; + /// How often the schedule is configured to run (read-only) + public string? frequency { get; set; } = null; +} + public class ColorCollection : SdkModel { /// Unique Id (read-only) @@ -881,6 +958,30 @@ public class CostEstimate : SdkModel public string? message { get; set; } = null; } +public class CreateCIRunRequest : SdkModel +{ + /// Run ID + public string? suite_id { get; set; } = null; + /// The branch to test. Omit to test production. + public string? branch { get; set; } = null; + /// Suite name + public string? target { get; set; } = null; + /// The commit to test. Omit to test production. + public string? commit { get; set; } = null; + /// User attributes to set for run + public string[]? user_attributes { get; set; } = null; + /// Webhooks to trigger when run completes. + public string[]? webhooks { get; set; } = null; +} + +public class CreateCIRunResponse : SdkModel +{ + /// Run ID (read-only) + public string? run_id { get; set; } = null; + /// Run status (read-only) + public string? status { get; set; } = null; +} + /// WARNING: no writeable properties found for POST, PUT, or PATCH public class CreateCostEstimate : SdkModel { @@ -1672,11 +1773,13 @@ public class DBConnection : SdkModel public string? password { get; set; } = null; /// Whether the connection uses OAuth for authentication. (read-only) public bool? uses_oauth { get; set; } = null; + /// Whether the connection uses key-pair for authentication. + public bool? uses_key_pair_auth { get; set; } = null; /// Whether the integration uses the oauth instance account. (read-only) public bool? uses_instance_oauth { get; set; } = null; /// (Write-Only) Base64 encoded Certificate body for server authentication (when appropriate for dialect). public string? certificate { get; set; } = null; - /// (Write-Only) Certificate keyfile type - .json or .p12 + /// (Write-Only) Certificate keyfile type - .json, .p8 or .p12 public string? file_type { get; set; } = null; /// Database name public string? database { get; set; } = null; @@ -1927,6 +2030,14 @@ public class Dialect : SdkModel public bool? has_ssl_support { get; set; } = null; } +public class DialectDriverVersion : SdkModel +{ + /// Name to be passed to the backend (read-only) + public string? name { get; set; } = null; + /// Name to be displayed in the frontend. (read-only) + public string? display_name { get; set; } = null; +} + public class DialectInfo : SdkModel { /// Operations the current user is able to perform on this object (read-only) @@ -1948,7 +2059,7 @@ public class DialectInfo : SdkModel /// The name of the driver used for this dialect (read-only) public string? supported_driver_name { get; set; } = null; /// Array of supported drivers for a given dialect (read-only) - public string[]? supported_driver_versions { get; set; } = null; + public DialectDriverVersion[]? supported_driver_versions { get; set; } = null; public DialectInfoOptions? supported_options { get; set; } } @@ -4213,6 +4324,11 @@ public class Project : SdkModel public string? dependency_status { get; set; } = null; } +public class ProjectCIRun : SdkModel +{ + public CIRun? run { get; set; } +} + public class ProjectError : SdkModel { /// A stable token that uniquely identifies this class of error, ignoring parameter values. Error message text may vary due to parameters or localization, but error codes do not. For example, a "File not found" error will have the same error code regardless of the filename in question or the user's display language (read-only) @@ -4499,6 +4615,8 @@ public class Report : SdkModel public string? deleter_user_id { get; set; } = null; /// Name of User that deleted the Report. (read-only) public string? deleter_user_name { get; set; } = null; + /// Count of schedules on the report. (read-only) + public long? schedule_count { get; set; } = null; } public class RepositoryCredential : SdkModel @@ -6311,9 +6429,11 @@ public class WriteDBConnection : SdkModel public string? username { get; set; } = null; /// (Write-Only) Password for server authentication public string? password { get; set; } = null; + /// Whether the connection uses key-pair for authentication. + public bool? uses_key_pair_auth { get; set; } = null; /// (Write-Only) Base64 encoded Certificate body for server authentication (when appropriate for dialect). public string? certificate { get; set; } = null; - /// (Write-Only) Certificate keyfile type - .json or .p12 + /// (Write-Only) Certificate keyfile type - .json, .p8 or .p12 public string? file_type { get; set; } = null; /// Database name public string? database { get; set; } = null; diff --git a/go/sdk/v4/methods.go b/go/sdk/v4/methods.go index c61307a64..4e2077fd1 100644 --- a/go/sdk/v4/methods.go +++ b/go/sdk/v4/methods.go @@ -26,7 +26,7 @@ SOFTWARE. /* -469 API methods +471 API methods */ // NOTE: Do not edit this file generated by Looker SDK Codegen for API v4 @@ -602,8 +602,6 @@ func (l *LookerSDK) CreateSsoEmbedUrl( // it to disk, do not pass it to a third party, and only pass it through a secure HTTPS // encrypted transport. // -// **NOTE**: Calls to this endpoint require [Embedding](https://cloud.google.com/looker/docs/r/looker-core-feature-embed) to be enabled. Usage of this endpoint is not authorized for Looker Core Standard and Looker Core Enterprise. -// // POST /embed/token_url/me -> EmbedUrlResponse func (l *LookerSDK) CreateEmbedUrlAsMe( body EmbedParams, @@ -5268,6 +5266,37 @@ func (l *LookerSDK) TagRef(request RequestTagRef, } +// ### Fetches a CI Run. +// +// GET /projects/{project_id}/ci/runs/{run_id} -> ProjectCIRun +func (l *LookerSDK) GetCiRun( + projectId string, + runId string, + fields string, + options *rtl.ApiSettings) (ProjectCIRun, error) { + projectId = url.PathEscape(projectId) + runId = url.PathEscape(runId) + var result ProjectCIRun + err := l.session.Do(&result, "GET", "/4.0", fmt.Sprintf("/projects/%v/ci/runs/%v", projectId, runId), map[string]interface{}{"fields": fields}, nil, options) + return result, err + +} + +// ### Creates a CI Run. +// +// POST /projects/{project_id}/ci/run -> CreateCIRunResponse +func (l *LookerSDK) CreateCiRun( + projectId string, + body CreateCIRunRequest, + fields string, + options *rtl.ApiSettings) (CreateCIRunResponse, error) { + projectId = url.PathEscape(projectId) + var result CreateCIRunResponse + err := l.session.Do(&result, "POST", "/4.0", fmt.Sprintf("/projects/%v/ci/run", projectId), map[string]interface{}{"fields": fields}, body, options) + return result, err + +} + // ### Configure Repository Credential for a remote dependency // // Admin required. diff --git a/go/sdk/v4/models.go b/go/sdk/v4/models.go index d1a505588..7a7b336d2 100644 --- a/go/sdk/v4/models.go +++ b/go/sdk/v4/models.go @@ -26,7 +26,7 @@ SOFTWARE. /* -414 API models: 260 Spec, 71 Request, 61 Write, 22 Enum +423 API models: 269 Spec, 71 Request, 61 Write, 22 Enum */ // NOTE: Do not edit this file generated by Looker SDK Codegen for API v4 @@ -250,6 +250,51 @@ const Category_Filter Category = "filter" const Category_Measure Category = "measure" const Category_Dimension Category = "dimension" +type CIChangeRequest struct { + ChangeRequestNumber *int64 `json:"change_request_number,omitempty"` // Change request number + ChangeRequestUrl *string `json:"change_request_url,omitempty"` // Change request url + ChangeRequestName *string `json:"change_request_name,omitempty"` // Change request name + ChangeRequestCommitsUrl *string `json:"change_request_commits_url,omitempty"` // Change request commits url +} + +type CIGitState struct { + Branch *string `json:"branch,omitempty"` // Git branch for run + Repository *string `json:"repository,omitempty"` // Git repository for run + CommitRef *string `json:"commit_ref,omitempty"` // Git commit for run + Target *string `json:"target,omitempty"` // Run start time. +} + +type CIRun struct { + RunId *string `json:"run_id,omitempty"` // Run ID + CreatedAt *time.Time `json:"created_at,omitempty"` // Run created time. + StartedAt *time.Time `json:"started_at,omitempty"` // Run start time. + FinishedAt *time.Time `json:"finished_at,omitempty"` // Run completed time. + StatusUrl *string `json:"status_url,omitempty"` // Run status url + Status *string `json:"status,omitempty"` // Run status. + GitService *string `json:"git_service,omitempty"` // Git service for run + GitState *CIGitState `json:"git_state,omitempty"` + Result *[]CIRunResult `json:"result,omitempty"` // Run results + Schedule *CIScheduleTrigger `json:"schedule,omitempty"` + TargetBranch *string `json:"target_branch,omitempty"` // Target branch for run + Title *string `json:"title,omitempty"` // Suite title + Trigger *string `json:"trigger,omitempty"` // Trigger for run + ChangeRequest *CIChangeRequest `json:"change_request,omitempty"` + SuiteId *string `json:"suite_id,omitempty"` // The Id of the suite used + Username *string `json:"username,omitempty"` // User who triggered the run +} + +type CIRunResult struct { + Status *string `json:"status,omitempty"` // Run result status + Validator *string `json:"validator,omitempty"` // Run result validator +} + +type CIScheduleTrigger struct { + Enabled *bool `json:"enabled,omitempty"` // Whether schedule is active + Day *string `json:"day,omitempty"` // Day of week (0 = Sunday, 6 = Saturday) + Hour *string `json:"hour,omitempty"` // Hour of the day (24 hour format) + Frequency *string `json:"frequency,omitempty"` // How often the schedule is configured to run +} + type ColorCollection struct { Id *string `json:"id,omitempty"` // Unique Id Label *string `json:"label,omitempty"` // Label of color collection @@ -510,6 +555,20 @@ type CostEstimate struct { Message *string `json:"message,omitempty"` // Human-friendly message } +type CreateCIRunRequest struct { + SuiteId *string `json:"suite_id,omitempty"` // Run ID + Branch *string `json:"branch,omitempty"` // The branch to test. Omit to test production. + Target *string `json:"target,omitempty"` // Suite name + Commit *string `json:"commit,omitempty"` // The commit to test. Omit to test production. + UserAttributes *[]string `json:"user_attributes,omitempty"` // User attributes to set for run + Webhooks *[]string `json:"webhooks,omitempty"` // Webhooks to trigger when run completes. +} + +type CreateCIRunResponse struct { + RunId *string `json:"run_id,omitempty"` // Run ID + Status *string `json:"status,omitempty"` // Run status +} + // WARNING: no writeable properties found for POST, PUT, or PATCH type CreateCostEstimate struct { Sql *string `json:"sql,omitempty"` // SQL statement to estimate @@ -951,9 +1010,10 @@ type DBConnection struct { Username *string `json:"username,omitempty"` // Username for server authentication Password *string `json:"password,omitempty"` // (Write-Only) Password for server authentication UsesOauth *bool `json:"uses_oauth,omitempty"` // Whether the connection uses OAuth for authentication. + UsesKeyPairAuth *bool `json:"uses_key_pair_auth,omitempty"` // Whether the connection uses key-pair for authentication. UsesInstanceOauth *bool `json:"uses_instance_oauth,omitempty"` // Whether the integration uses the oauth instance account. Certificate *string `json:"certificate,omitempty"` // (Write-Only) Base64 encoded Certificate body for server authentication (when appropriate for dialect). - FileType *string `json:"file_type,omitempty"` // (Write-Only) Certificate keyfile type - .json or .p12 + FileType *string `json:"file_type,omitempty"` // (Write-Only) Certificate keyfile type - .json, .p8 or .p12 Database *string `json:"database,omitempty"` // Database name DbTimezone *string `json:"db_timezone,omitempty"` // Time zone of database QueryTimezone *string `json:"query_timezone,omitempty"` // Timezone to use in queries @@ -1088,18 +1148,23 @@ type Dialect struct { HasSslSupport *bool `json:"has_ssl_support,omitempty"` // Does the database have client SSL support settable through the JDBC string explicitly? } +type DialectDriverVersion struct { + Name *string `json:"name,omitempty"` // Name to be passed to the backend + DisplayName *string `json:"display_name,omitempty"` // Name to be displayed in the frontend. +} + type DialectInfo struct { - Can *map[string]bool `json:"can,omitempty"` // Operations the current user is able to perform on this object - DefaultMaxConnections *string `json:"default_max_connections,omitempty"` // Default number max connections - DefaultPort *string `json:"default_port,omitempty"` // Default port number - Installed *bool `json:"installed,omitempty"` // Is the supporting driver installed - Label *string `json:"label,omitempty"` // The human-readable label of the connection - LabelForDatabaseEquivalent *string `json:"label_for_database_equivalent,omitempty"` // What the dialect calls the equivalent of a normal SQL table - LabelForSchemaEquivalent *string `json:"label_for_schema_equivalent,omitempty"` // What the dialect calls the equivalent of a schema-level namespace - Name *string `json:"name,omitempty"` // The name of the dialect - SupportedDriverName *string `json:"supported_driver_name,omitempty"` // The name of the driver used for this dialect - SupportedDriverVersions *[]string `json:"supported_driver_versions,omitempty"` // Array of supported drivers for a given dialect - SupportedOptions *DialectInfoOptions `json:"supported_options,omitempty"` + Can *map[string]bool `json:"can,omitempty"` // Operations the current user is able to perform on this object + DefaultMaxConnections *string `json:"default_max_connections,omitempty"` // Default number max connections + DefaultPort *string `json:"default_port,omitempty"` // Default port number + Installed *bool `json:"installed,omitempty"` // Is the supporting driver installed + Label *string `json:"label,omitempty"` // The human-readable label of the connection + LabelForDatabaseEquivalent *string `json:"label_for_database_equivalent,omitempty"` // What the dialect calls the equivalent of a normal SQL table + LabelForSchemaEquivalent *string `json:"label_for_schema_equivalent,omitempty"` // What the dialect calls the equivalent of a schema-level namespace + Name *string `json:"name,omitempty"` // The name of the dialect + SupportedDriverName *string `json:"supported_driver_name,omitempty"` // The name of the driver used for this dialect + SupportedDriverVersions *[]DialectDriverVersion `json:"supported_driver_versions,omitempty"` // Array of supported drivers for a given dialect + SupportedOptions *DialectInfoOptions `json:"supported_options,omitempty"` } type DialectInfoOptions struct { @@ -2348,6 +2413,10 @@ type Project struct { DependencyStatus *string `json:"dependency_status,omitempty"` // Status of dependencies in your manifest & lockfile } +type ProjectCIRun struct { + Run *CIRun `json:"run,omitempty"` +} + type ProjectError struct { Code *string `json:"code,omitempty"` // A stable token that uniquely identifies this class of error, ignoring parameter values. Error message text may vary due to parameters or localization, but error codes do not. For example, a "File not found" error will have the same error code regardless of the filename in question or the user's display language Severity *string `json:"severity,omitempty"` // Severity: fatal, error, warning, info, success @@ -2501,6 +2570,7 @@ type Report struct { LastAccessedAt *time.Time `json:"last_accessed_at,omitempty"` // Last Accessed at DeleterUserId *string `json:"deleter_user_id,omitempty"` // User Id of the deleter of the report DeleterUserName *string `json:"deleter_user_name,omitempty"` // Name of User that deleted the Report. + ScheduleCount *int64 `json:"schedule_count,omitempty"` // Count of schedules on the report. } type RepositoryCredential struct { @@ -4315,8 +4385,9 @@ type WriteDBConnection struct { Port *string `json:"port,omitempty"` // Port number on server. If the connection is over an SSH tunnel, then the local port associated with the SSH tunnel. Username *string `json:"username,omitempty"` // Username for server authentication Password *string `json:"password,omitempty"` // (Write-Only) Password for server authentication + UsesKeyPairAuth *bool `json:"uses_key_pair_auth,omitempty"` // Whether the connection uses key-pair for authentication. Certificate *string `json:"certificate,omitempty"` // (Write-Only) Base64 encoded Certificate body for server authentication (when appropriate for dialect). - FileType *string `json:"file_type,omitempty"` // (Write-Only) Certificate keyfile type - .json or .p12 + FileType *string `json:"file_type,omitempty"` // (Write-Only) Certificate keyfile type - .json, .p8 or .p12 Database *string `json:"database,omitempty"` // Database name DbTimezone *string `json:"db_timezone,omitempty"` // Time zone of database QueryTimezone *string `json:"query_timezone,omitempty"` // Timezone to use in queries diff --git a/kotlin/src/main/com/looker/sdk/4.0/methods.kt b/kotlin/src/main/com/looker/sdk/4.0/methods.kt index 72af94b1d..65143553e 100644 --- a/kotlin/src/main/com/looker/sdk/4.0/methods.kt +++ b/kotlin/src/main/com/looker/sdk/4.0/methods.kt @@ -25,7 +25,7 @@ */ /** - * 469 API methods + * 471 API methods */ // NOTE: Do not edit this file generated by Looker SDK Codegen for API 4.0 @@ -749,9 +749,6 @@ class LookerSDK(authSession: AuthSession) : APIMethods(authSession) { * it to disk, do not pass it to a third party, and only pass it through a secure HTTPS * encrypted transport. * - * - * **NOTE**: Calls to this endpoint require [Embedding](https://cloud.google.com/looker/docs/r/looker-core-feature-embed) to be enabled. Usage of this endpoint is not authorized for Looker Core Standard and Looker Core Enterprise. - * * @param {EmbedParams} body * * POST /embed/token_url/me -> EmbedUrlResponse @@ -7017,6 +7014,50 @@ class LookerSDK(authSession: AuthSession) : APIMethods(authSession) { ) } + /** + * ### Fetches a CI Run. + * + * @param {String} project_id Project Id + * @param {String} run_id Run Id + * @param {String} fields Requested fields + * + * GET /projects/{project_id}/ci/runs/{run_id} -> ProjectCIRun + */ + @JvmOverloads fun get_ci_run( + project_id: String, + run_id: String, + fields: String? = null, + ): SDKResponse { + val path_project_id = encodeParam(project_id) + val path_run_id = encodeParam(run_id) + return this.get( + "/projects/${path_project_id}/ci/runs/${path_run_id}", + mapOf("fields" to fields), + ) + } + + /** + * ### Creates a CI Run. + * + * @param {String} project_id Project Id + * @param {CreateCIRunRequest} body + * @param {String} fields Requested fields + * + * POST /projects/{project_id}/ci/run -> CreateCIRunResponse + */ + @JvmOverloads fun create_ci_run( + project_id: String, + body: CreateCIRunRequest, + fields: String? = null, + ): SDKResponse { + val path_project_id = encodeParam(project_id) + return this.post( + "/projects/${path_project_id}/ci/run", + mapOf("fields" to fields), + body, + ) + } + /** * ### Configure Repository Credential for a remote dependency * diff --git a/kotlin/src/main/com/looker/sdk/4.0/models.kt b/kotlin/src/main/com/looker/sdk/4.0/models.kt index 1fbb82d2b..fc37e5859 100644 --- a/kotlin/src/main/com/looker/sdk/4.0/models.kt +++ b/kotlin/src/main/com/looker/sdk/4.0/models.kt @@ -25,7 +25,7 @@ */ /** - * 344 API models: 260 Spec, 0 Request, 62 Write, 22 Enum + * 353 API models: 269 Spec, 0 Request, 62 Write, 22 Enum */ // NOTE: Do not edit this file generated by Looker SDK Codegen for API 4.0 @@ -435,6 +435,91 @@ enum class Category : Serializable { dimension, } +/** + * @property change_request_number Change request number (read-only) + * @property change_request_url Change request url (read-only) + * @property change_request_name Change request name (read-only) + * @property change_request_commits_url Change request commits url (read-only) + */ +data class CIChangeRequest( + var change_request_number: Long? = null, + var change_request_url: String? = null, + var change_request_name: String? = null, + var change_request_commits_url: String? = null, +) : Serializable + +/** + * @property branch Git branch for run (read-only) + * @property repository Git repository for run (read-only) + * @property commit_ref Git commit for run (read-only) + * @property target Run start time. (read-only) + */ +data class CIGitState( + var branch: String? = null, + var repository: String? = null, + var commit_ref: String? = null, + var target: String? = null, +) : Serializable + +/** + * @property run_id Run ID (read-only) + * @property created_at Run created time. (read-only) + * @property started_at Run start time. (read-only) + * @property finished_at Run completed time. (read-only) + * @property status_url Run status url (read-only) + * @property status Run status. (read-only) + * @property git_service Git service for run (read-only) + * @property git_state + * @property result Run results (read-only) + * @property schedule + * @property target_branch Target branch for run (read-only) + * @property title Suite title (read-only) + * @property trigger Trigger for run (read-only) + * @property change_request + * @property suite_id The Id of the suite used (read-only) + * @property username User who triggered the run (read-only) + */ +data class CIRun( + var run_id: String? = null, + var created_at: Date? = null, + var started_at: Date? = null, + var finished_at: Date? = null, + var status_url: String? = null, + var status: String? = null, + var git_service: String? = null, + var git_state: CIGitState? = null, + var result: Array? = null, + var schedule: CIScheduleTrigger? = null, + var target_branch: String? = null, + var title: String? = null, + var trigger: String? = null, + var change_request: CIChangeRequest? = null, + var suite_id: String? = null, + var username: String? = null, +) : Serializable + +/** + * @property status Run result status (read-only) + * @property validator Run result validator (read-only) + */ +data class CIRunResult( + var status: String? = null, + var validator: String? = null, +) : Serializable + +/** + * @property enabled Whether schedule is active (read-only) + * @property day Day of week (0 = Sunday, 6 = Saturday) (read-only) + * @property hour Hour of the day (24 hour format) (read-only) + * @property frequency How often the schedule is configured to run (read-only) + */ +data class CIScheduleTrigger( + var enabled: Boolean? = null, + var day: String? = null, + var hour: String? = null, + var frequency: String? = null, +) : Serializable + /** * @property id Unique Id (read-only) * @property label Label of color collection @@ -923,6 +1008,32 @@ data class CostEstimate( var message: String? = null, ) : Serializable +/** + * @property suite_id Run ID + * @property branch The branch to test. Omit to test production. + * @property target Suite name + * @property commit The commit to test. Omit to test production. + * @property user_attributes User attributes to set for run + * @property webhooks Webhooks to trigger when run completes. + */ +data class CreateCIRunRequest( + var suite_id: String? = null, + var branch: String? = null, + var target: String? = null, + var commit: String? = null, + var user_attributes: Array? = null, + var webhooks: Array? = null, +) : Serializable + +/** + * @property run_id Run ID (read-only) + * @property status Run status (read-only) + */ +data class CreateCIRunResponse( + var run_id: String? = null, + var status: String? = null, +) : Serializable + /** * WARNING: no writeable properties found for POST, PUT, or PATCH * @@ -1756,9 +1867,10 @@ data class Datagroup( * @property username Username for server authentication * @property password (Write-Only) Password for server authentication * @property uses_oauth Whether the connection uses OAuth for authentication. (read-only) + * @property uses_key_pair_auth Whether the connection uses key-pair for authentication. * @property uses_instance_oauth Whether the integration uses the oauth instance account. (read-only) * @property certificate (Write-Only) Base64 encoded Certificate body for server authentication (when appropriate for dialect). - * @property file_type (Write-Only) Certificate keyfile type - .json or .p12 + * @property file_type (Write-Only) Certificate keyfile type - .json, .p8 or .p12 * @property database Database name * @property db_timezone Time zone of database * @property query_timezone Timezone to use in queries @@ -1819,6 +1931,7 @@ data class DBConnection( var username: String? = null, var password: String? = null, var uses_oauth: Boolean? = null, + var uses_key_pair_auth: Boolean? = null, var uses_instance_oauth: Boolean? = null, var certificate: String? = null, var file_type: String? = null, @@ -2028,6 +2141,15 @@ data class Dialect( var has_ssl_support: Boolean? = null, ) : Serializable +/** + * @property name Name to be passed to the backend (read-only) + * @property display_name Name to be displayed in the frontend. (read-only) + */ +data class DialectDriverVersion( + var name: String? = null, + var display_name: String? = null, +) : Serializable + /** * @property can Operations the current user is able to perform on this object (read-only) * @property default_max_connections Default number max connections (read-only) @@ -2051,7 +2173,7 @@ data class DialectInfo( var label_for_schema_equivalent: String? = null, var name: String? = null, var supported_driver_name: String? = null, - var supported_driver_versions: Array? = null, + var supported_driver_versions: Array? = null, var supported_options: DialectInfoOptions? = null, ) : Serializable @@ -4422,6 +4544,13 @@ data class Project( var dependency_status: String? = null, ) : Serializable +/** + * @property run + */ +data class ProjectCIRun( + var run: CIRun? = null, +) : Serializable + /** * @property code A stable token that uniquely identifies this class of error, ignoring parameter values. Error message text may vary due to parameters or localization, but error codes do not. For example, a "File not found" error will have the same error code regardless of the filename in question or the user's display language (read-only) * @property severity Severity: fatal, error, warning, info, success (read-only) @@ -4697,6 +4826,7 @@ data class RenderTask( * @property last_accessed_at Last Accessed at (read-only) * @property deleter_user_id User Id of the deleter of the report (read-only) * @property deleter_user_name Name of User that deleted the Report. (read-only) + * @property schedule_count Count of schedules on the report. (read-only) */ data class Report( var can: Map? = null, @@ -4717,6 +4847,7 @@ data class Report( var last_accessed_at: Date? = null, var deleter_user_id: String? = null, var deleter_user_name: String? = null, + var schedule_count: Long? = null, ) : Serializable /** @@ -6582,8 +6713,9 @@ data class WriteDatagroup( * @property port Port number on server. If the connection is over an SSH tunnel, then the local port associated with the SSH tunnel. * @property username Username for server authentication * @property password (Write-Only) Password for server authentication + * @property uses_key_pair_auth Whether the connection uses key-pair for authentication. * @property certificate (Write-Only) Base64 encoded Certificate body for server authentication (when appropriate for dialect). - * @property file_type (Write-Only) Certificate keyfile type - .json or .p12 + * @property file_type (Write-Only) Certificate keyfile type - .json, .p8 or .p12 * @property database Database name * @property db_timezone Time zone of database * @property query_timezone Timezone to use in queries @@ -6630,6 +6762,7 @@ data class WriteDBConnection( var port: String? = null, var username: String? = null, var password: String? = null, + var uses_key_pair_auth: Boolean? = null, var certificate: String? = null, var file_type: String? = null, var database: String? = null, diff --git a/kotlin/src/main/com/looker/sdk/4.0/streams.kt b/kotlin/src/main/com/looker/sdk/4.0/streams.kt index c2528a91f..05d17b352 100644 --- a/kotlin/src/main/com/looker/sdk/4.0/streams.kt +++ b/kotlin/src/main/com/looker/sdk/4.0/streams.kt @@ -25,7 +25,7 @@ */ /** - * 469 API methods + * 471 API methods */ // NOTE: Do not edit this file generated by Looker SDK Codegen for API 4.0 @@ -747,9 +747,6 @@ class LookerSDKStream(authSession: AuthSession) : APIMethods(authSession) { * it to disk, do not pass it to a third party, and only pass it through a secure HTTPS * encrypted transport. * - * - * **NOTE**: Calls to this endpoint require [Embedding](https://cloud.google.com/looker/docs/r/looker-core-feature-embed) to be enabled. Usage of this endpoint is not authorized for Looker Core Standard and Looker Core Enterprise. - * * @param {EmbedParams} body * * POST /embed/token_url/me -> ByteArray @@ -7015,6 +7012,50 @@ class LookerSDKStream(authSession: AuthSession) : APIMethods(authSession) { ) } + /** + * ### Fetches a CI Run. + * + * @param {String} project_id Project Id + * @param {String} run_id Run Id + * @param {String} fields Requested fields + * + * GET /projects/{project_id}/ci/runs/{run_id} -> ByteArray + */ + @JvmOverloads fun get_ci_run( + project_id: String, + run_id: String, + fields: String? = null, + ): SDKResponse { + val path_project_id = encodeParam(project_id) + val path_run_id = encodeParam(run_id) + return this.get( + "/projects/${path_project_id}/ci/runs/${path_run_id}", + mapOf("fields" to fields), + ) + } + + /** + * ### Creates a CI Run. + * + * @param {String} project_id Project Id + * @param {CreateCIRunRequest} body + * @param {String} fields Requested fields + * + * POST /projects/{project_id}/ci/run -> ByteArray + */ + @JvmOverloads fun create_ci_run( + project_id: String, + body: CreateCIRunRequest, + fields: String? = null, + ): SDKResponse { + val path_project_id = encodeParam(project_id) + return this.post( + "/projects/${path_project_id}/ci/run", + mapOf("fields" to fields), + body, + ) + } + /** * ### Configure Repository Credential for a remote dependency * diff --git a/kotlin/src/main/com/looker/sdk/Constants.kt b/kotlin/src/main/com/looker/sdk/Constants.kt index 15704883c..e1d99ed2e 100644 --- a/kotlin/src/main/com/looker/sdk/Constants.kt +++ b/kotlin/src/main/com/looker/sdk/Constants.kt @@ -28,7 +28,7 @@ package com.looker.sdk const val ENVIRONMENT_PREFIX = "LOOKERSDK" const val SDK_TAG = "KT-SDK" -const val LOOKER_VERSION = "25.4" +const val LOOKER_VERSION = "25.6" const val API_VERSION = "4.0" const val AGENT_TAG = "$SDK_TAG $LOOKER_VERSION" const val LOOKER_APPID = "x-looker-appid" diff --git a/packages/sdk/src/4.0/funcs.ts b/packages/sdk/src/4.0/funcs.ts index 11408a45a..889b3ba31 100644 --- a/packages/sdk/src/4.0/funcs.ts +++ b/packages/sdk/src/4.0/funcs.ts @@ -25,7 +25,7 @@ */ /** - * 469 API methods + * 471 API methods */ import type { @@ -69,6 +69,8 @@ import type { IContentValidation, IContentView, ICostEstimate, + ICreateCIRunRequest, + ICreateCIRunResponse, ICreateCostEstimate, ICreateCredentialsApi3, ICreateEmbedUserRequest, @@ -156,6 +158,7 @@ import type { IPermission, IPermissionSet, IProject, + IProjectCIRun, IProjectFile, IProjectValidation, IProjectValidationCache, @@ -1189,9 +1192,6 @@ export const create_sso_embed_url = async ( * it to disk, do not pass it to a third party, and only pass it through a secure HTTPS * encrypted transport. * - * - * **NOTE**: Calls to this endpoint require [Embedding](https://cloud.google.com/looker/docs/r/looker-core-feature-embed) to be enabled. Usage of this endpoint is not authorized for Looker Core Standard and Looker Core Enterprise. - * * POST /embed/token_url/me -> IEmbedUrlResponse * * @param sdk IAPIMethods implementation @@ -9253,6 +9253,63 @@ export const tag_ref = async ( ); }; +/** + * ### Fetches a CI Run. + * + * GET /projects/{project_id}/ci/runs/{run_id} -> IProjectCIRun + * + * @param sdk IAPIMethods implementation + * @param project_id Project Id + * @param run_id Run Id + * @param fields Requested fields + * @param options one-time API call overrides + * + */ +export const get_ci_run = async ( + sdk: IAPIMethods, + project_id: string, + run_id: string, + fields?: string, + options?: Partial +): Promise> => { + project_id = encodeParam(project_id); + run_id = encodeParam(run_id); + return sdk.get( + `/projects/${project_id}/ci/runs/${run_id}`, + { fields }, + null, + options + ); +}; + +/** + * ### Creates a CI Run. + * + * POST /projects/{project_id}/ci/run -> ICreateCIRunResponse + * + * @param sdk IAPIMethods implementation + * @param project_id Project Id + * @param body Partial + * @param fields Requested fields + * @param options one-time API call overrides + * + */ +export const create_ci_run = async ( + sdk: IAPIMethods, + project_id: string, + body: Partial, + fields?: string, + options?: Partial +): Promise> => { + project_id = encodeParam(project_id); + return sdk.post( + `/projects/${project_id}/ci/run`, + { fields }, + body, + options + ); +}; + /** * ### Configure Repository Credential for a remote dependency * diff --git a/packages/sdk/src/4.0/methods.ts b/packages/sdk/src/4.0/methods.ts index 8f1d7668f..14c32a376 100644 --- a/packages/sdk/src/4.0/methods.ts +++ b/packages/sdk/src/4.0/methods.ts @@ -25,7 +25,7 @@ */ /** - * 469 API methods + * 471 API methods */ import type { @@ -67,6 +67,8 @@ import type { IContentValidation, IContentView, ICostEstimate, + ICreateCIRunRequest, + ICreateCIRunResponse, ICreateCostEstimate, ICreateCredentialsApi3, ICreateEmbedUserRequest, @@ -154,6 +156,7 @@ import type { IPermission, IPermissionSet, IProject, + IProjectCIRun, IProjectFile, IProjectValidation, IProjectValidationCache, @@ -1145,9 +1148,6 @@ export class Looker40SDK extends APIMethods implements ILooker40SDK { * it to disk, do not pass it to a third party, and only pass it through a secure HTTPS * encrypted transport. * - * - * **NOTE**: Calls to this endpoint require [Embedding](https://cloud.google.com/looker/docs/r/looker-core-feature-embed) to be enabled. Usage of this endpoint is not authorized for Looker Core Standard and Looker Core Enterprise. - * * POST /embed/token_url/me -> IEmbedUrlResponse * * @param body Partial @@ -8691,6 +8691,59 @@ export class Looker40SDK extends APIMethods implements ILooker40SDK { ); } + /** + * ### Fetches a CI Run. + * + * GET /projects/{project_id}/ci/runs/{run_id} -> IProjectCIRun + * + * @param project_id Project Id + * @param run_id Run Id + * @param fields Requested fields + * @param options one-time API call overrides + * + */ + async get_ci_run( + project_id: string, + run_id: string, + fields?: string, + options?: Partial + ): Promise> { + project_id = encodeParam(project_id); + run_id = encodeParam(run_id); + return this.get( + `/projects/${project_id}/ci/runs/${run_id}`, + { fields }, + null, + options + ); + } + + /** + * ### Creates a CI Run. + * + * POST /projects/{project_id}/ci/run -> ICreateCIRunResponse + * + * @param project_id Project Id + * @param body Partial + * @param fields Requested fields + * @param options one-time API call overrides + * + */ + async create_ci_run( + project_id: string, + body: Partial, + fields?: string, + options?: Partial + ): Promise> { + project_id = encodeParam(project_id); + return this.post( + `/projects/${project_id}/ci/run`, + { fields }, + body, + options + ); + } + /** * ### Configure Repository Credential for a remote dependency * diff --git a/packages/sdk/src/4.0/methodsInterface.ts b/packages/sdk/src/4.0/methodsInterface.ts index 420539211..a9d6671d4 100644 --- a/packages/sdk/src/4.0/methodsInterface.ts +++ b/packages/sdk/src/4.0/methodsInterface.ts @@ -25,7 +25,7 @@ */ /** - * 469 API methods + * 471 API methods */ import type { @@ -64,6 +64,8 @@ import type { IContentValidation, IContentView, ICostEstimate, + ICreateCIRunRequest, + ICreateCIRunResponse, ICreateCostEstimate, ICreateCredentialsApi3, ICreateEmbedUserRequest, @@ -151,6 +153,7 @@ import type { IPermission, IPermissionSet, IProject, + IProjectCIRun, IProjectFile, IProjectValidation, IProjectValidationCache, @@ -925,9 +928,6 @@ export interface ILooker40SDK extends IAPIMethods { * it to disk, do not pass it to a third party, and only pass it through a secure HTTPS * encrypted transport. * - * - * **NOTE**: Calls to this endpoint require [Embedding](https://cloud.google.com/looker/docs/r/looker-core-feature-embed) to be enabled. Usage of this endpoint is not authorized for Looker Core Standard and Looker Core Enterprise. - * * POST /embed/token_url/me -> IEmbedUrlResponse * * @param body Partial @@ -6134,6 +6134,42 @@ export interface ILooker40SDK extends IAPIMethods { options?: Partial ): Promise>; + /** + * ### Fetches a CI Run. + * + * GET /projects/{project_id}/ci/runs/{run_id} -> IProjectCIRun + * + * @param project_id Project Id + * @param run_id Run Id + * @param fields Requested fields + * @param options one-time API call overrides + * + */ + get_ci_run( + project_id: string, + run_id: string, + fields?: string, + options?: Partial + ): Promise>; + + /** + * ### Creates a CI Run. + * + * POST /projects/{project_id}/ci/run -> ICreateCIRunResponse + * + * @param project_id Project Id + * @param body Partial + * @param fields Requested fields + * @param options one-time API call overrides + * + */ + create_ci_run( + project_id: string, + body: Partial, + fields?: string, + options?: Partial + ): Promise>; + /** * ### Configure Repository Credential for a remote dependency * diff --git a/packages/sdk/src/4.0/models.ts b/packages/sdk/src/4.0/models.ts index e002b0295..7e2f3ead1 100644 --- a/packages/sdk/src/4.0/models.ts +++ b/packages/sdk/src/4.0/models.ts @@ -25,7 +25,7 @@ */ /** - * 415 API models: 260 Spec, 71 Request, 62 Write, 22 Enum + * 424 API models: 269 Spec, 71 Request, 62 Write, 22 Enum */ import type { IDictionary, DelimArray } from '@looker/sdk-rtl'; @@ -669,6 +669,132 @@ export enum Category { dimension = 'dimension', } +export interface ICIChangeRequest { + /** + * Change request number (read-only) + */ + change_request_number?: number | null; + /** + * Change request url (read-only) + */ + change_request_url?: string | null; + /** + * Change request name (read-only) + */ + change_request_name?: string | null; + /** + * Change request commits url (read-only) + */ + change_request_commits_url?: string | null; +} + +export interface ICIGitState { + /** + * Git branch for run (read-only) + */ + branch?: string | null; + /** + * Git repository for run (read-only) + */ + repository?: string | null; + /** + * Git commit for run (read-only) + */ + commit_ref?: string | null; + /** + * Run start time. (read-only) + */ + target?: string | null; +} + +export interface ICIRun { + /** + * Run ID (read-only) + */ + run_id?: string; + /** + * Run created time. (read-only) + */ + created_at?: Date; + /** + * Run start time. (read-only) + */ + started_at?: Date | null; + /** + * Run completed time. (read-only) + */ + finished_at?: Date | null; + /** + * Run status url (read-only) + */ + status_url?: string; + /** + * Run status. (read-only) + */ + status?: string | null; + /** + * Git service for run (read-only) + */ + git_service?: string | null; + git_state?: ICIGitState; + /** + * Run results (read-only) + */ + result?: ICIRunResult[] | null; + schedule?: ICIScheduleTrigger; + /** + * Target branch for run (read-only) + */ + target_branch?: string | null; + /** + * Suite title (read-only) + */ + title?: string | null; + /** + * Trigger for run (read-only) + */ + trigger?: string | null; + change_request?: ICIChangeRequest; + /** + * The Id of the suite used (read-only) + */ + suite_id?: string; + /** + * User who triggered the run (read-only) + */ + username?: string | null; +} + +export interface ICIRunResult { + /** + * Run result status (read-only) + */ + status?: string; + /** + * Run result validator (read-only) + */ + validator?: string; +} + +export interface ICIScheduleTrigger { + /** + * Whether schedule is active (read-only) + */ + enabled?: boolean; + /** + * Day of week (0 = Sunday, 6 = Saturday) (read-only) + */ + day?: string; + /** + * Hour of the day (24 hour format) (read-only) + */ + hour?: string; + /** + * How often the schedule is configured to run (read-only) + */ + frequency?: string | null; +} + export interface IColorCollection { /** * Unique Id (read-only) @@ -1426,6 +1552,44 @@ export interface ICostEstimate { message?: string; } +export interface ICreateCIRunRequest { + /** + * Run ID + */ + suite_id?: string; + /** + * The branch to test. Omit to test production. + */ + branch?: string | null; + /** + * Suite name + */ + target?: string; + /** + * The commit to test. Omit to test production. + */ + commit?: string | null; + /** + * User attributes to set for run + */ + user_attributes?: string[] | null; + /** + * Webhooks to trigger when run completes. + */ + webhooks?: string[] | null; +} + +export interface ICreateCIRunResponse { + /** + * Run ID (read-only) + */ + run_id?: string; + /** + * Run status (read-only) + */ + status?: string; +} + /** * WARNING: no writeable properties found for POST, PUT, or PATCH */ @@ -2807,6 +2971,10 @@ export interface IDBConnection { * Whether the connection uses OAuth for authentication. (read-only) */ uses_oauth?: boolean; + /** + * Whether the connection uses key-pair for authentication. + */ + uses_key_pair_auth?: boolean; /** * Whether the integration uses the oauth instance account. (read-only) */ @@ -2816,7 +2984,7 @@ export interface IDBConnection { */ certificate?: string | null; /** - * (Write-Only) Certificate keyfile type - .json or .p12 + * (Write-Only) Certificate keyfile type - .json, .p8 or .p12 */ file_type?: string | null; /** @@ -3247,6 +3415,17 @@ export interface IDialect { has_ssl_support?: boolean; } +export interface IDialectDriverVersion { + /** + * Name to be passed to the backend (read-only) + */ + name?: string | null; + /** + * Name to be displayed in the frontend. (read-only) + */ + display_name?: string | null; +} + export interface IDialectInfo { /** * Operations the current user is able to perform on this object (read-only) @@ -3287,7 +3466,7 @@ export interface IDialectInfo { /** * Array of supported drivers for a given dialect (read-only) */ - supported_driver_versions?: string[] | null; + supported_driver_versions?: IDialectDriverVersion[] | null; supported_options?: IDialectInfoOptions; } @@ -7169,6 +7348,10 @@ export interface IProject { dependency_status?: string | null; } +export interface IProjectCIRun { + run?: ICIRun; +} + export interface IProjectError { /** * A stable token that uniquely identifies this class of error, ignoring parameter values. Error message text may vary due to parameters or localization, but error codes do not. For example, a "File not found" error will have the same error code regardless of the filename in question or the user's display language (read-only) @@ -7676,6 +7859,10 @@ export interface IReport { * Name of User that deleted the Report. (read-only) */ deleter_user_name?: string | null; + /** + * Count of schedules on the report. (read-only) + */ + schedule_count?: number | null; } export interface IRepositoryCredential { @@ -13105,12 +13292,16 @@ export interface IWriteDBConnection { * (Write-Only) Password for server authentication */ password?: string | null; + /** + * Whether the connection uses key-pair for authentication. + */ + uses_key_pair_auth?: boolean; /** * (Write-Only) Base64 encoded Certificate body for server authentication (when appropriate for dialect). */ certificate?: string | null; /** - * (Write-Only) Certificate keyfile type - .json or .p12 + * (Write-Only) Certificate keyfile type - .json, .p8 or .p12 */ file_type?: string | null; /** diff --git a/packages/sdk/src/4.0/streams.ts b/packages/sdk/src/4.0/streams.ts index 0ba31f1b4..712e2af6e 100644 --- a/packages/sdk/src/4.0/streams.ts +++ b/packages/sdk/src/4.0/streams.ts @@ -25,7 +25,7 @@ */ /** - * 469 API methods + * 471 API methods */ import type { @@ -66,6 +66,8 @@ import type { IContentValidation, IContentView, ICostEstimate, + ICreateCIRunRequest, + ICreateCIRunResponse, ICreateCostEstimate, ICreateCredentialsApi3, ICreateEmbedUserRequest, @@ -152,6 +154,7 @@ import type { IPermission, IPermissionSet, IProject, + IProjectCIRun, IProjectFile, IProjectValidation, IProjectValidationCache, @@ -1254,9 +1257,6 @@ export class Looker40SDKStream extends APIMethods { * it to disk, do not pass it to a third party, and only pass it through a secure HTTPS * encrypted transport. * - * - * **NOTE**: Calls to this endpoint require [Embedding](https://cloud.google.com/looker/docs/r/looker-core-feature-embed) to be enabled. Usage of this endpoint is not authorized for Looker Core Standard and Looker Core Enterprise. - * * POST /embed/token_url/me -> IEmbedUrlResponse * * @param callback streaming output function @@ -9942,6 +9942,67 @@ export class Looker40SDKStream extends APIMethods { ); } + /** + * ### Fetches a CI Run. + * + * GET /projects/{project_id}/ci/runs/{run_id} -> IProjectCIRun + * + * @param callback streaming output function + * @param project_id Project Id + * @param run_id Run Id + * @param fields Requested fields + * @param options one-time API call overrides + * + */ + async get_ci_run( + callback: (response: Response) => Promise, + project_id: string, + run_id: string, + fields?: string, + options?: Partial + ) { + project_id = encodeParam(project_id); + run_id = encodeParam(run_id); + return this.authStream( + callback, + 'GET', + `/projects/${project_id}/ci/runs/${run_id}`, + { fields }, + null, + options + ); + } + + /** + * ### Creates a CI Run. + * + * POST /projects/{project_id}/ci/run -> ICreateCIRunResponse + * + * @param callback streaming output function + * @param project_id Project Id + * @param body Partial + * @param fields Requested fields + * @param options one-time API call overrides + * + */ + async create_ci_run( + callback: (response: Response) => Promise, + project_id: string, + body: Partial, + fields?: string, + options?: Partial + ) { + project_id = encodeParam(project_id); + return this.authStream( + callback, + 'POST', + `/projects/${project_id}/ci/run`, + { fields }, + body, + options + ); + } + /** * ### Configure Repository Credential for a remote dependency * diff --git a/packages/sdk/src/constants.ts b/packages/sdk/src/constants.ts index a8b2fe28e..e82a4150c 100644 --- a/packages/sdk/src/constants.ts +++ b/packages/sdk/src/constants.ts @@ -24,5 +24,5 @@ */ -export const sdkVersion = '25.4'; +export const sdkVersion = '25.6'; export const environmentPrefix = 'LOOKERSDK'; diff --git a/python/looker_sdk/sdk/api40/methods.py b/python/looker_sdk/sdk/api40/methods.py index d902c432c..78e231ab1 100644 --- a/python/looker_sdk/sdk/api40/methods.py +++ b/python/looker_sdk/sdk/api40/methods.py @@ -21,7 +21,7 @@ # SOFTWARE. # -# 469 API methods +# 471 API methods # NOTE: Do not edit this file generated by Looker SDK Codegen for API 4.0 @@ -889,9 +889,6 @@ def create_sso_embed_url( # it to disk, do not pass it to a third party, and only pass it through a secure HTTPS # encrypted transport. # - # - # **NOTE**: Calls to this endpoint require [Embedding](https://cloud.google.com/looker/docs/r/looker-core-feature-embed) to be enabled. Usage of this endpoint is not authorized for Looker Core Standard and Looker Core Enterprise. - # # POST /embed/token_url/me -> mdls.EmbedUrlResponse def create_embed_url_as_me( self, @@ -8795,6 +8792,59 @@ def tag_ref( ) return response + # ### Fetches a CI Run. + # + # GET /projects/{project_id}/ci/runs/{run_id} -> mdls.ProjectCIRun + def get_ci_run( + self, + # Project Id + project_id: str, + # Run Id + run_id: str, + # Requested fields + fields: Optional[str] = None, + transport_options: Optional[transport.TransportOptions] = None, + ) -> mdls.ProjectCIRun: + """Fetch Continuous Integration run""" + project_id = self.encode_path_param(project_id) + run_id = self.encode_path_param(run_id) + response = cast( + mdls.ProjectCIRun, + self.get( + path=f"/projects/{project_id}/ci/runs/{run_id}", + structure=mdls.ProjectCIRun, + query_params={"fields": fields}, + transport_options=transport_options, + ), + ) + return response + + # ### Creates a CI Run. + # + # POST /projects/{project_id}/ci/run -> mdls.CreateCIRunResponse + def create_ci_run( + self, + # Project Id + project_id: str, + body: mdls.CreateCIRunRequest, + # Requested fields + fields: Optional[str] = None, + transport_options: Optional[transport.TransportOptions] = None, + ) -> mdls.CreateCIRunResponse: + """Create a Continuous Integration run""" + project_id = self.encode_path_param(project_id) + response = cast( + mdls.CreateCIRunResponse, + self.post( + path=f"/projects/{project_id}/ci/run", + structure=mdls.CreateCIRunResponse, + query_params={"fields": fields}, + body=body, + transport_options=transport_options, + ), + ) + return response + # ### Configure Repository Credential for a remote dependency # # Admin required. diff --git a/python/looker_sdk/sdk/api40/models.py b/python/looker_sdk/sdk/api40/models.py index 6bd7ef1ed..918d555c3 100644 --- a/python/looker_sdk/sdk/api40/models.py +++ b/python/looker_sdk/sdk/api40/models.py @@ -21,7 +21,7 @@ # SOFTWARE. # -# 344 API models: 260 Spec, 0 Request, 62 Write, 22 Enum +# 353 API models: 269 Spec, 0 Request, 62 Write, 22 Enum # NOTE: Do not edit this file generated by Looker SDK Codegen for API 4.0 @@ -917,6 +917,188 @@ class Category(enum.Enum): Category.__new__ = model.safe_enum__new__ # type: ignore +@attr.s(auto_attribs=True, init=False) +class CIChangeRequest(model.Model): + """ + Attributes: + change_request_number: Change request number + change_request_url: Change request url + change_request_name: Change request name + change_request_commits_url: Change request commits url + """ + + change_request_number: Optional[int] = None + change_request_url: Optional[str] = None + change_request_name: Optional[str] = None + change_request_commits_url: Optional[str] = None + + def __init__( + self, + *, + change_request_number: Optional[int] = None, + change_request_url: Optional[str] = None, + change_request_name: Optional[str] = None, + change_request_commits_url: Optional[str] = None + ): + self.change_request_number = change_request_number + self.change_request_url = change_request_url + self.change_request_name = change_request_name + self.change_request_commits_url = change_request_commits_url + + +@attr.s(auto_attribs=True, init=False) +class CIGitState(model.Model): + """ + Attributes: + branch: Git branch for run + repository: Git repository for run + commit_ref: Git commit for run + target: Run start time. + """ + + branch: Optional[str] = None + repository: Optional[str] = None + commit_ref: Optional[str] = None + target: Optional[str] = None + + def __init__( + self, + *, + branch: Optional[str] = None, + repository: Optional[str] = None, + commit_ref: Optional[str] = None, + target: Optional[str] = None + ): + self.branch = branch + self.repository = repository + self.commit_ref = commit_ref + self.target = target + + +@attr.s(auto_attribs=True, init=False) +class CIRun(model.Model): + """ + Attributes: + run_id: Run ID + created_at: Run created time. + started_at: Run start time. + finished_at: Run completed time. + status_url: Run status url + status: Run status. + git_service: Git service for run + git_state: + result: Run results + schedule: + target_branch: Target branch for run + title: Suite title + trigger: Trigger for run + change_request: + suite_id: The Id of the suite used + username: User who triggered the run + """ + + run_id: Optional[str] = None + created_at: Optional[datetime.datetime] = None + started_at: Optional[datetime.datetime] = None + finished_at: Optional[datetime.datetime] = None + status_url: Optional[str] = None + status: Optional[str] = None + git_service: Optional[str] = None + git_state: Optional["CIGitState"] = None + result: Optional[Sequence["CIRunResult"]] = None + schedule: Optional["CIScheduleTrigger"] = None + target_branch: Optional[str] = None + title: Optional[str] = None + trigger: Optional[str] = None + change_request: Optional["CIChangeRequest"] = None + suite_id: Optional[str] = None + username: Optional[str] = None + + def __init__( + self, + *, + run_id: Optional[str] = None, + created_at: Optional[datetime.datetime] = None, + started_at: Optional[datetime.datetime] = None, + finished_at: Optional[datetime.datetime] = None, + status_url: Optional[str] = None, + status: Optional[str] = None, + git_service: Optional[str] = None, + git_state: Optional["CIGitState"] = None, + result: Optional[Sequence["CIRunResult"]] = None, + schedule: Optional["CIScheduleTrigger"] = None, + target_branch: Optional[str] = None, + title: Optional[str] = None, + trigger: Optional[str] = None, + change_request: Optional["CIChangeRequest"] = None, + suite_id: Optional[str] = None, + username: Optional[str] = None + ): + self.run_id = run_id + self.created_at = created_at + self.started_at = started_at + self.finished_at = finished_at + self.status_url = status_url + self.status = status + self.git_service = git_service + self.git_state = git_state + self.result = result + self.schedule = schedule + self.target_branch = target_branch + self.title = title + self.trigger = trigger + self.change_request = change_request + self.suite_id = suite_id + self.username = username + + +@attr.s(auto_attribs=True, init=False) +class CIRunResult(model.Model): + """ + Attributes: + status: Run result status + validator: Run result validator + """ + + status: Optional[str] = None + validator: Optional[str] = None + + def __init__( + self, *, status: Optional[str] = None, validator: Optional[str] = None + ): + self.status = status + self.validator = validator + + +@attr.s(auto_attribs=True, init=False) +class CIScheduleTrigger(model.Model): + """ + Attributes: + enabled: Whether schedule is active + day: Day of week (0 = Sunday, 6 = Saturday) + hour: Hour of the day (24 hour format) + frequency: How often the schedule is configured to run + """ + + enabled: Optional[bool] = None + day: Optional[str] = None + hour: Optional[str] = None + frequency: Optional[str] = None + + def __init__( + self, + *, + enabled: Optional[bool] = None, + day: Optional[str] = None, + hour: Optional[str] = None, + frequency: Optional[str] = None + ): + self.enabled = enabled + self.day = day + self.hour = hour + self.frequency = frequency + + @attr.s(auto_attribs=True, init=False) class ColorCollection(model.Model): """ @@ -1945,6 +2127,59 @@ def __init__( self.message = message +@attr.s(auto_attribs=True, init=False) +class CreateCIRunRequest(model.Model): + """ + Attributes: + suite_id: Run ID + branch: The branch to test. Omit to test production. + target: Suite name + commit: The commit to test. Omit to test production. + user_attributes: User attributes to set for run + webhooks: Webhooks to trigger when run completes. + """ + + suite_id: Optional[str] = None + branch: Optional[str] = None + target: Optional[str] = None + commit: Optional[str] = None + user_attributes: Optional[Sequence[str]] = None + webhooks: Optional[Sequence[str]] = None + + def __init__( + self, + *, + suite_id: Optional[str] = None, + branch: Optional[str] = None, + target: Optional[str] = None, + commit: Optional[str] = None, + user_attributes: Optional[Sequence[str]] = None, + webhooks: Optional[Sequence[str]] = None + ): + self.suite_id = suite_id + self.branch = branch + self.target = target + self.commit = commit + self.user_attributes = user_attributes + self.webhooks = webhooks + + +@attr.s(auto_attribs=True, init=False) +class CreateCIRunResponse(model.Model): + """ + Attributes: + run_id: Run ID + status: Run status + """ + + run_id: Optional[str] = None + status: Optional[str] = None + + def __init__(self, *, run_id: Optional[str] = None, status: Optional[str] = None): + self.run_id = run_id + self.status = status + + @attr.s(auto_attribs=True, init=False) class CreateCostEstimate(model.Model): """ @@ -3692,9 +3927,10 @@ class DBConnection(model.Model): username: Username for server authentication password: (Write-Only) Password for server authentication uses_oauth: Whether the connection uses OAuth for authentication. + uses_key_pair_auth: Whether the connection uses key-pair for authentication. uses_instance_oauth: Whether the integration uses the oauth instance account. certificate: (Write-Only) Base64 encoded Certificate body for server authentication (when appropriate for dialect). - file_type: (Write-Only) Certificate keyfile type - .json or .p12 + file_type: (Write-Only) Certificate keyfile type - .json, .p8 or .p12 database: Database name db_timezone: Time zone of database query_timezone: Timezone to use in queries @@ -3755,6 +3991,7 @@ class DBConnection(model.Model): username: Optional[str] = None password: Optional[str] = None uses_oauth: Optional[bool] = None + uses_key_pair_auth: Optional[bool] = None uses_instance_oauth: Optional[bool] = None certificate: Optional[str] = None file_type: Optional[str] = None @@ -3820,6 +4057,7 @@ def __init__( username: Optional[str] = None, password: Optional[str] = None, uses_oauth: Optional[bool] = None, + uses_key_pair_auth: Optional[bool] = None, uses_instance_oauth: Optional[bool] = None, certificate: Optional[str] = None, file_type: Optional[str] = None, @@ -3882,6 +4120,7 @@ def __init__( self.username = username self.password = password self.uses_oauth = uses_oauth + self.uses_key_pair_auth = uses_key_pair_auth self.uses_instance_oauth = uses_instance_oauth self.certificate = certificate self.file_type = file_type @@ -4260,6 +4499,24 @@ def __init__( self.has_ssl_support = has_ssl_support +@attr.s(auto_attribs=True, init=False) +class DialectDriverVersion(model.Model): + """ + Attributes: + name: Name to be passed to the backend + display_name: Name to be displayed in the frontend. + """ + + name: Optional[str] = None + display_name: Optional[str] = None + + def __init__( + self, *, name: Optional[str] = None, display_name: Optional[str] = None + ): + self.name = name + self.display_name = display_name + + @attr.s(auto_attribs=True, init=False) class DialectInfo(model.Model): """ @@ -4286,7 +4543,7 @@ class DialectInfo(model.Model): label_for_schema_equivalent: Optional[str] = None name: Optional[str] = None supported_driver_name: Optional[str] = None - supported_driver_versions: Optional[Sequence[str]] = None + supported_driver_versions: Optional[Sequence["DialectDriverVersion"]] = None supported_options: Optional["DialectInfoOptions"] = None def __init__( @@ -4301,7 +4558,7 @@ def __init__( label_for_schema_equivalent: Optional[str] = None, name: Optional[str] = None, supported_driver_name: Optional[str] = None, - supported_driver_versions: Optional[Sequence[str]] = None, + supported_driver_versions: Optional[Sequence["DialectDriverVersion"]] = None, supported_options: Optional["DialectInfoOptions"] = None ): self.can = can @@ -9297,6 +9554,19 @@ def __init__( self.dependency_status = dependency_status +@attr.s(auto_attribs=True, init=False) +class ProjectCIRun(model.Model): + """ + Attributes: + run: + """ + + run: Optional["CIRun"] = None + + def __init__(self, *, run: Optional["CIRun"] = None): + self.run = run + + @attr.s(auto_attribs=True, init=False) class ProjectError(model.Model): """ @@ -9852,6 +10122,7 @@ class Report(model.Model): last_accessed_at: Last Accessed at deleter_user_id: User Id of the deleter of the report deleter_user_name: Name of User that deleted the Report. + schedule_count: Count of schedules on the report. """ can: Optional[MutableMapping[str, bool]] = None @@ -9872,6 +10143,7 @@ class Report(model.Model): last_accessed_at: Optional[datetime.datetime] = None deleter_user_id: Optional[str] = None deleter_user_name: Optional[str] = None + schedule_count: Optional[int] = None def __init__( self, @@ -9893,7 +10165,8 @@ def __init__( deleted_at: Optional[datetime.datetime] = None, last_accessed_at: Optional[datetime.datetime] = None, deleter_user_id: Optional[str] = None, - deleter_user_name: Optional[str] = None + deleter_user_name: Optional[str] = None, + schedule_count: Optional[int] = None ): self.can = can self.id = id @@ -9913,6 +10186,7 @@ def __init__( self.last_accessed_at = last_accessed_at self.deleter_user_id = deleter_user_id self.deleter_user_name = deleter_user_name + self.schedule_count = schedule_count @attr.s(auto_attribs=True, init=False) @@ -13742,8 +14016,9 @@ class WriteDBConnection(model.Model): port: Port number on server. If the connection is over an SSH tunnel, then the local port associated with the SSH tunnel. username: Username for server authentication password: (Write-Only) Password for server authentication + uses_key_pair_auth: Whether the connection uses key-pair for authentication. certificate: (Write-Only) Base64 encoded Certificate body for server authentication (when appropriate for dialect). - file_type: (Write-Only) Certificate keyfile type - .json or .p12 + file_type: (Write-Only) Certificate keyfile type - .json, .p8 or .p12 database: Database name db_timezone: Time zone of database query_timezone: Timezone to use in queries @@ -13790,6 +14065,7 @@ class WriteDBConnection(model.Model): port: Optional[str] = None username: Optional[str] = None password: Optional[str] = None + uses_key_pair_auth: Optional[bool] = None certificate: Optional[str] = None file_type: Optional[str] = None database: Optional[str] = None @@ -13839,6 +14115,7 @@ def __init__( port: Optional[str] = None, username: Optional[str] = None, password: Optional[str] = None, + uses_key_pair_auth: Optional[bool] = None, certificate: Optional[str] = None, file_type: Optional[str] = None, database: Optional[str] = None, @@ -13885,6 +14162,7 @@ def __init__( self.port = port self.username = username self.password = password + self.uses_key_pair_auth = uses_key_pair_auth self.certificate = certificate self.file_type = file_type self.database = database diff --git a/python/looker_sdk/sdk/constants.py b/python/looker_sdk/sdk/constants.py index 7b14005a6..f517f9f29 100644 --- a/python/looker_sdk/sdk/constants.py +++ b/python/looker_sdk/sdk/constants.py @@ -20,5 +20,5 @@ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN # THE SOFTWARE. -sdk_version = "25.4" +sdk_version = "25.6" environment_prefix = "LOOKERSDK" diff --git a/spec/Looker.4.0.json b/spec/Looker.4.0.json index c301e49f2..83bdd7729 100644 --- a/spec/Looker.4.0.json +++ b/spec/Looker.4.0.json @@ -1,8 +1,8 @@ { "swagger": "2.0", "info": { - "version": "4.0.25.4", - "x-looker-release-version": "25.4.7", + "version": "4.0.25.6", + "x-looker-release-version": "25.6.11", "title": "Looker API 4.0 Reference", "description": "\nAPI 4.0 is the current release of the Looker API. API 3.x has been removed.\n\n### Authorization\n\nThe classic method of API authorization uses Looker **API** credentials for authorization and access control.\nLooker admins can create API credentials on Looker's **Admin/Users** page.\n\nAPI 4.0 adds additional ways to authenticate API requests, including OAuth and CORS requests.\n\nFor details, see [Looker API Authorization](https://cloud.google.com/looker/docs/r/api/authorization).\n\n\n### API Explorer\n\nThe API Explorer is a Looker-provided utility with many new and unique features for learning and using the Looker API and SDKs.\n\nFor details, see the [API Explorer documentation](https://cloud.google.com/looker/docs/r/api/explorer).\n\n\n### Looker Language SDKs\n\nThe Looker API is a RESTful system that should be usable by any programming language capable of making\nHTTPS requests. SDKs for a variety of programming languages are also provided to streamline using the API. Looker\nhas an OpenSource [sdk-codegen project](https://github.com/looker-open-source/sdk-codegen) that provides several\nlanguage SDKs. Language SDKs generated by `sdk-codegen` have an Authentication manager that can automatically\nauthenticate API requests when needed.\n\nFor details on available Looker SDKs, see [Looker API Client SDKs](https://cloud.google.com/looker/docs/r/api/client_sdks).\n\n\n### API Versioning\n\nFuture releases of Looker expand the latest API version release-by-release to securely expose more and more of the core\npower of the Looker platform to API client applications. API endpoints marked as \"beta\" may receive breaking changes without\nwarning (but we will try to avoid doing that). Stable (non-beta) API endpoints should not receive breaking\nchanges in future releases.\n\nFor details, see [Looker API Versioning](https://cloud.google.com/looker/docs/r/api/versioning).\n\n\n### In This Release\n\nAPI 4.0 is the only supported API version for Looker starting with release 23.18. API 3.0 and 3.1 have been removed.\n\nAPI 4.0 has better support for strongly typed languages like TypeScript, Kotlin, Swift, Go, C#, and more.\n\nSee the [API 4.0 GA announcement](https://developers.looker.com/api/advanced-usage/version-4-ga) for more information\nabout API 4.0.\n\nThe API Explorer can be used to [interactively compare](https://cloud.google.com/looker/docs/r/api/explorer#comparing_api_versions) the differences between API 3.1 and 4.0.\n\n\n### API and SDK Support Policies\n\nLooker API versions and language SDKs have varying support levels. Please read the API and SDK\n[support policies](https://cloud.google.com/looker/docs/r/api/support-policy) for more information.\n\n\n", "contact": { @@ -8241,7 +8241,7 @@ ], "operationId": "create_embed_url_as_me", "summary": "Create Embed URL", - "description": "### Create an Embed URL\n\nCreates an embed URL that runs as the Looker user making this API call. (\"Embed as me\")\nThis embed URL can then be used to instantiate a Looker embed session in a\n\"Powered by Looker\" (PBL) web application.\n\nThis is similar to Private Embedding (https://cloud.google.com/looker/docs/r/admin/embed/private-embed). Instead of\nlogging into the Web UI to authenticate, the user has already authenticated against the API to be able to\nmake this call. However, unlike Private Embed where the user has access to any other part of the Looker UI,\nthe embed web session created by requesting the EmbedUrlResponse.url in a browser only has access to\ncontent visible under the `/embed` context.\n\nAn embed URL can only be used once, and must be used within 5 minutes of being created. After it\nhas been used to request a page from the Looker server, the URL is invalid. Future requests using\nthe same URL will fail. This is to prevent 'replay attacks'.\n\nThe `target_url` property must be a complete URL of a Looker Embedded UI page - scheme, hostname, path starting with \"/embed\" and query params.\nTo load a dashboard with id 56 and with a filter of `Date=1 years`, the looker Embed URL would look like `https://myname.looker.com/embed/dashboards/56?Date=1%20years`.\nThe best way to obtain this target_url is to navigate to the desired Looker page in your web browser,\ncopy the URL shown in the browser address bar, insert \"/embed\" after the host/port, and paste it into the `target_url` property as a quoted string value in this API request.\n\n#### Security Note\nProtect this signed URL as you would an access token or password credentials - do not write\nit to disk, do not pass it to a third party, and only pass it through a secure HTTPS\nencrypted transport.\n\n\n**NOTE**: Calls to this endpoint require [Embedding](https://cloud.google.com/looker/docs/r/looker-core-feature-embed) to be enabled. Usage of this endpoint is not authorized for Looker Core Standard and Looker Core Enterprise.\n", + "description": "### Create an Embed URL\n\nCreates an embed URL that runs as the Looker user making this API call. (\"Embed as me\")\nThis embed URL can then be used to instantiate a Looker embed session in a\n\"Powered by Looker\" (PBL) web application.\n\nThis is similar to Private Embedding (https://cloud.google.com/looker/docs/r/admin/embed/private-embed). Instead of\nlogging into the Web UI to authenticate, the user has already authenticated against the API to be able to\nmake this call. However, unlike Private Embed where the user has access to any other part of the Looker UI,\nthe embed web session created by requesting the EmbedUrlResponse.url in a browser only has access to\ncontent visible under the `/embed` context.\n\nAn embed URL can only be used once, and must be used within 5 minutes of being created. After it\nhas been used to request a page from the Looker server, the URL is invalid. Future requests using\nthe same URL will fail. This is to prevent 'replay attacks'.\n\nThe `target_url` property must be a complete URL of a Looker Embedded UI page - scheme, hostname, path starting with \"/embed\" and query params.\nTo load a dashboard with id 56 and with a filter of `Date=1 years`, the looker Embed URL would look like `https://myname.looker.com/embed/dashboards/56?Date=1%20years`.\nThe best way to obtain this target_url is to navigate to the desired Looker page in your web browser,\ncopy the URL shown in the browser address bar, insert \"/embed\" after the host/port, and paste it into the `target_url` property as a quoted string value in this API request.\n\n#### Security Note\nProtect this signed URL as you would an access token or password credentials - do not write\nit to disk, do not pass it to a third party, and only pass it through a secure HTTPS\nencrypted transport.\n\n\n", "parameters": [ { "name": "body", @@ -18007,6 +18007,144 @@ "x-looker-rate-limited": true } }, + "/projects/{project_id}/ci/runs/{run_id}": { + "get": { + "tags": [ + "Project" + ], + "operationId": "get_ci_run", + "summary": "Fetch Continuous Integration run", + "description": "### Fetches a CI Run.\n\n", + "parameters": [ + { + "name": "project_id", + "in": "path", + "description": "Project Id", + "required": true, + "type": "string" + }, + { + "name": "run_id", + "in": "path", + "description": "Run Id", + "required": true, + "type": "string" + }, + { + "name": "fields", + "in": "query", + "description": "Requested fields", + "required": false, + "type": "string" + } + ], + "responses": { + "200": { + "description": "CI Run", + "schema": { + "$ref": "#/definitions/ProjectCIRun" + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/Error" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/Error" + } + }, + "429": { + "description": "Too Many Requests", + "schema": { + "$ref": "#/definitions/Error" + } + } + }, + "x-looker-status": "beta", + "x-looker-activity-type": "non_query", + "x-looker-rate-limited": true + } + }, + "/projects/{project_id}/ci/run": { + "post": { + "tags": [ + "Project" + ], + "operationId": "create_ci_run", + "summary": "Create a Continuous Integration run", + "description": "### Creates a CI Run.\n\n", + "parameters": [ + { + "name": "project_id", + "in": "path", + "description": "Project Id", + "required": true, + "type": "string" + }, + { + "name": "body", + "in": "body", + "description": "Options for creating a CI run", + "required": true, + "schema": { + "$ref": "#/definitions/CreateCIRunRequest" + } + }, + { + "name": "fields", + "in": "query", + "description": "Requested fields", + "required": false, + "type": "string" + } + ], + "responses": { + "200": { + "description": "CI Run", + "schema": { + "$ref": "#/definitions/CreateCIRunResponse" + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/Error" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/Error" + } + }, + "409": { + "description": "Resource Already Exists", + "schema": { + "$ref": "#/definitions/Error" + } + }, + "422": { + "description": "Validation Error", + "schema": { + "$ref": "#/definitions/ValidationError" + } + }, + "429": { + "description": "Too Many Requests", + "schema": { + "$ref": "#/definitions/Error" + } + } + }, + "x-looker-status": "beta", + "x-looker-activity-type": "non_query", + "x-looker-rate-limited": true + } + }, "/render_tasks/looks/{look_id}/{result_format}": { "post": { "tags": [ @@ -30856,6 +30994,65 @@ }, "x-looker-status": "stable" }, + "CreateCIRunRequest": { + "properties": { + "suite_id": { + "type": "string", + "description": "Run ID", + "x-looker-nullable": false + }, + "branch": { + "type": "string", + "description": "The branch to test. Omit to test production.", + "x-looker-nullable": true + }, + "target": { + "type": "string", + "description": "Suite name", + "x-looker-nullable": false + }, + "commit": { + "type": "string", + "format": "uri-reference", + "description": "The commit to test. Omit to test production.", + "x-looker-nullable": true + }, + "user_attributes": { + "type": "array", + "items": { + "type": "string" + }, + "description": "User attributes to set for run", + "x-looker-nullable": true + }, + "webhooks": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Webhooks to trigger when run completes.", + "x-looker-nullable": true + } + }, + "x-looker-status": "beta" + }, + "CreateCIRunResponse": { + "properties": { + "run_id": { + "type": "string", + "readOnly": true, + "description": "Run ID", + "x-looker-nullable": false + }, + "status": { + "type": "string", + "readOnly": true, + "description": "Run status", + "x-looker-nullable": false + } + }, + "x-looker-status": "beta" + }, "CreateEmbedUserRequest": { "properties": { "external_user_id": { @@ -32915,6 +33112,11 @@ "description": "Whether the connection uses OAuth for authentication.", "x-looker-nullable": false }, + "uses_key_pair_auth": { + "type": "boolean", + "description": "Whether the connection uses key-pair for authentication.", + "x-looker-nullable": false + }, "uses_instance_oauth": { "type": "boolean", "readOnly": true, @@ -32930,7 +33132,7 @@ "file_type": { "type": "string", "x-looker-write-only": true, - "description": "(Write-Only) Certificate keyfile type - .json or .p12", + "description": "(Write-Only) Certificate keyfile type - .json, .p8 or .p12", "x-looker-nullable": true }, "database": { @@ -33384,6 +33586,23 @@ }, "x-looker-status": "stable" }, + "DialectDriverVersion": { + "properties": { + "name": { + "type": "string", + "readOnly": true, + "description": "Name to be passed to the backend", + "x-looker-nullable": true + }, + "display_name": { + "type": "string", + "readOnly": true, + "description": "Name to be displayed in the frontend.", + "x-looker-nullable": true + } + }, + "x-looker-status": "stable" + }, "DialectInfo": { "properties": { "can": { @@ -33446,7 +33665,7 @@ "supported_driver_versions": { "type": "array", "items": { - "type": "string" + "$ref": "#/definitions/DialectDriverVersion" }, "readOnly": true, "description": "Array of supported drivers for a given dialect", @@ -39265,6 +39484,232 @@ }, "x-looker-status": "stable" }, + "ProjectCIRun": { + "properties": { + "run": { + "$ref": "#/definitions/CIRun", + "readOnly": true, + "description": "Continuous Integration Run", + "x-looker-nullable": false + } + }, + "x-looker-status": "beta" + }, + "CIGitState": { + "properties": { + "branch": { + "type": "string", + "readOnly": true, + "description": "Git branch for run", + "x-looker-nullable": true + }, + "repository": { + "type": "string", + "readOnly": true, + "description": "Git repository for run", + "x-looker-nullable": true + }, + "commit_ref": { + "type": "string", + "readOnly": true, + "description": "Git commit for run", + "x-looker-nullable": true + }, + "target": { + "type": "string", + "readOnly": true, + "description": "Run start time.", + "x-looker-nullable": true + } + }, + "x-looker-status": "beta" + }, + "CIScheduleTrigger": { + "properties": { + "enabled": { + "type": "boolean", + "readOnly": true, + "description": "Whether schedule is active", + "x-looker-nullable": false + }, + "day": { + "type": "string", + "readOnly": true, + "description": "Day of week (0 = Sunday, 6 = Saturday)", + "x-looker-nullable": false + }, + "hour": { + "type": "string", + "readOnly": true, + "description": "Hour of the day (24 hour format)", + "x-looker-nullable": false + }, + "frequency": { + "type": "string", + "readOnly": true, + "description": "How often the schedule is configured to run", + "x-looker-nullable": true + } + }, + "x-looker-status": "beta" + }, + "CIChangeRequest": { + "properties": { + "change_request_number": { + "type": "integer", + "format": "int64", + "readOnly": true, + "description": "Change request number", + "x-looker-nullable": true + }, + "change_request_url": { + "type": "string", + "format": "uri-reference", + "readOnly": true, + "description": "Change request url", + "x-looker-nullable": true + }, + "change_request_name": { + "type": "string", + "readOnly": true, + "description": "Change request name", + "x-looker-nullable": true + }, + "change_request_commits_url": { + "type": "string", + "format": "uri-reference", + "readOnly": true, + "description": "Change request commits url", + "x-looker-nullable": true + } + }, + "x-looker-status": "beta" + }, + "CIRunResult": { + "properties": { + "status": { + "type": "string", + "readOnly": true, + "description": "Run result status", + "x-looker-nullable": false + }, + "validator": { + "type": "string", + "readOnly": true, + "description": "Run result validator", + "x-looker-nullable": false + } + }, + "x-looker-status": "beta" + }, + "CIRun": { + "properties": { + "run_id": { + "type": "string", + "readOnly": true, + "description": "Run ID", + "x-looker-nullable": false + }, + "created_at": { + "type": "string", + "format": "date-time", + "readOnly": true, + "description": "Run created time.", + "x-looker-nullable": false + }, + "started_at": { + "type": "string", + "format": "date-time", + "readOnly": true, + "description": "Run start time.", + "x-looker-nullable": true + }, + "finished_at": { + "type": "string", + "format": "date-time", + "readOnly": true, + "description": "Run completed time.", + "x-looker-nullable": true + }, + "status_url": { + "type": "string", + "format": "uri-reference", + "readOnly": true, + "description": "Run status url", + "x-looker-nullable": false + }, + "status": { + "type": "string", + "readOnly": true, + "description": "Run status.", + "x-looker-nullable": true + }, + "git_service": { + "type": "string", + "readOnly": true, + "description": "Git service for run", + "x-looker-nullable": true + }, + "git_state": { + "$ref": "#/definitions/CIGitState", + "readOnly": true, + "description": "Git state for run", + "x-looker-nullable": false + }, + "result": { + "type": "array", + "items": { + "$ref": "#/definitions/CIRunResult" + }, + "readOnly": true, + "description": "Run results", + "x-looker-nullable": true + }, + "schedule": { + "$ref": "#/definitions/CIScheduleTrigger", + "readOnly": true, + "description": "Schedule for run", + "x-looker-nullable": true + }, + "target_branch": { + "type": "string", + "readOnly": true, + "description": "Target branch for run", + "x-looker-nullable": true + }, + "title": { + "type": "string", + "readOnly": true, + "description": "Suite title", + "x-looker-nullable": true + }, + "trigger": { + "type": "string", + "readOnly": true, + "description": "Trigger for run", + "x-looker-nullable": true + }, + "change_request": { + "$ref": "#/definitions/CIChangeRequest", + "readOnly": true, + "description": "Change request for run", + "x-looker-nullable": true + }, + "suite_id": { + "type": "string", + "readOnly": true, + "description": "The Id of the suite used", + "x-looker-nullable": false + }, + "username": { + "type": "string", + "readOnly": true, + "description": "User who triggered the run", + "x-looker-nullable": true + } + }, + "x-looker-status": "beta" + }, "ProjectFile": { "properties": { "can": { @@ -42757,6 +43202,13 @@ "readOnly": true, "description": "Name of User that deleted the Report.", "x-looker-nullable": true + }, + "schedule_count": { + "type": "integer", + "format": "int64", + "readOnly": true, + "description": "Count of schedules on the report.", + "x-looker-nullable": true } }, "x-looker-status": "alpha" diff --git a/spec/Looker.4.0.oas.json b/spec/Looker.4.0.oas.json index eab73a1e5..bbc7d48c2 100644 --- a/spec/Looker.4.0.oas.json +++ b/spec/Looker.4.0.oas.json @@ -1,8 +1,8 @@ { "openapi": "3.0.0", "info": { - "version": "4.0.25.4", - "x-looker-release-version": "25.4.7", + "version": "4.0.25.6", + "x-looker-release-version": "25.6.11", "title": "Looker API 4.0 Reference", "description": "\nAPI 4.0 is the current release of the Looker API. API 3.x has been removed.\n\n### Authorization\n\nThe classic method of API authorization uses Looker **API** credentials for authorization and access control.\nLooker admins can create API credentials on Looker's **Admin/Users** page.\n\nAPI 4.0 adds additional ways to authenticate API requests, including OAuth and CORS requests.\n\nFor details, see [Looker API Authorization](https://cloud.google.com/looker/docs/r/api/authorization).\n\n\n### API Explorer\n\nThe API Explorer is a Looker-provided utility with many new and unique features for learning and using the Looker API and SDKs.\n\nFor details, see the [API Explorer documentation](https://cloud.google.com/looker/docs/r/api/explorer).\n\n\n### Looker Language SDKs\n\nThe Looker API is a RESTful system that should be usable by any programming language capable of making\nHTTPS requests. SDKs for a variety of programming languages are also provided to streamline using the API. Looker\nhas an OpenSource [sdk-codegen project](https://github.com/looker-open-source/sdk-codegen) that provides several\nlanguage SDKs. Language SDKs generated by `sdk-codegen` have an Authentication manager that can automatically\nauthenticate API requests when needed.\n\nFor details on available Looker SDKs, see [Looker API Client SDKs](https://cloud.google.com/looker/docs/r/api/client_sdks).\n\n\n### API Versioning\n\nFuture releases of Looker expand the latest API version release-by-release to securely expose more and more of the core\npower of the Looker platform to API client applications. API endpoints marked as \"beta\" may receive breaking changes without\nwarning (but we will try to avoid doing that). Stable (non-beta) API endpoints should not receive breaking\nchanges in future releases.\n\nFor details, see [Looker API Versioning](https://cloud.google.com/looker/docs/r/api/versioning).\n\n\n### In This Release\n\nAPI 4.0 is the only supported API version for Looker starting with release 23.18. API 3.0 and 3.1 have been removed.\n\nAPI 4.0 has better support for strongly typed languages like TypeScript, Kotlin, Swift, Go, C#, and more.\n\nSee the [API 4.0 GA announcement](https://developers.looker.com/api/advanced-usage/version-4-ga) for more information\nabout API 4.0.\n\nThe API Explorer can be used to [interactively compare](https://cloud.google.com/looker/docs/r/api/explorer#comparing_api_versions) the differences between API 3.1 and 4.0.\n\n\n### API and SDK Support Policies\n\nLooker API versions and language SDKs have varying support levels. Please read the API and SDK\n[support policies](https://cloud.google.com/looker/docs/r/api/support-policy) for more information.\n\n\n", "contact": { @@ -11465,7 +11465,7 @@ ], "operationId": "create_embed_url_as_me", "summary": "Create Embed URL", - "description": "### Create an Embed URL\n\nCreates an embed URL that runs as the Looker user making this API call. (\"Embed as me\")\nThis embed URL can then be used to instantiate a Looker embed session in a\n\"Powered by Looker\" (PBL) web application.\n\nThis is similar to Private Embedding (https://cloud.google.com/looker/docs/r/admin/embed/private-embed). Instead of\nlogging into the Web UI to authenticate, the user has already authenticated against the API to be able to\nmake this call. However, unlike Private Embed where the user has access to any other part of the Looker UI,\nthe embed web session created by requesting the EmbedUrlResponse.url in a browser only has access to\ncontent visible under the `/embed` context.\n\nAn embed URL can only be used once, and must be used within 5 minutes of being created. After it\nhas been used to request a page from the Looker server, the URL is invalid. Future requests using\nthe same URL will fail. This is to prevent 'replay attacks'.\n\nThe `target_url` property must be a complete URL of a Looker Embedded UI page - scheme, hostname, path starting with \"/embed\" and query params.\nTo load a dashboard with id 56 and with a filter of `Date=1 years`, the looker Embed URL would look like `https://myname.looker.com/embed/dashboards/56?Date=1%20years`.\nThe best way to obtain this target_url is to navigate to the desired Looker page in your web browser,\ncopy the URL shown in the browser address bar, insert \"/embed\" after the host/port, and paste it into the `target_url` property as a quoted string value in this API request.\n\n#### Security Note\nProtect this signed URL as you would an access token or password credentials - do not write\nit to disk, do not pass it to a third party, and only pass it through a secure HTTPS\nencrypted transport.\n\n\n**NOTE**: Calls to this endpoint require [Embedding](https://cloud.google.com/looker/docs/r/looker-core-feature-embed) to be enabled. Usage of this endpoint is not authorized for Looker Core Standard and Looker Core Enterprise.\n", + "description": "### Create an Embed URL\n\nCreates an embed URL that runs as the Looker user making this API call. (\"Embed as me\")\nThis embed URL can then be used to instantiate a Looker embed session in a\n\"Powered by Looker\" (PBL) web application.\n\nThis is similar to Private Embedding (https://cloud.google.com/looker/docs/r/admin/embed/private-embed). Instead of\nlogging into the Web UI to authenticate, the user has already authenticated against the API to be able to\nmake this call. However, unlike Private Embed where the user has access to any other part of the Looker UI,\nthe embed web session created by requesting the EmbedUrlResponse.url in a browser only has access to\ncontent visible under the `/embed` context.\n\nAn embed URL can only be used once, and must be used within 5 minutes of being created. After it\nhas been used to request a page from the Looker server, the URL is invalid. Future requests using\nthe same URL will fail. This is to prevent 'replay attacks'.\n\nThe `target_url` property must be a complete URL of a Looker Embedded UI page - scheme, hostname, path starting with \"/embed\" and query params.\nTo load a dashboard with id 56 and with a filter of `Date=1 years`, the looker Embed URL would look like `https://myname.looker.com/embed/dashboards/56?Date=1%20years`.\nThe best way to obtain this target_url is to navigate to the desired Looker page in your web browser,\ncopy the URL shown in the browser address bar, insert \"/embed\" after the host/port, and paste it into the `target_url` property as a quoted string value in this API request.\n\n#### Security Note\nProtect this signed URL as you would an access token or password credentials - do not write\nit to disk, do not pass it to a third party, and only pass it through a secure HTTPS\nencrypted transport.\n\n\n", "responses": { "200": { "description": "Embed URL", @@ -24943,6 +24943,196 @@ } } }, + "/projects/{project_id}/ci/runs/{run_id}": { + "get": { + "tags": [ + "Project" + ], + "operationId": "get_ci_run", + "summary": "Fetch Continuous Integration run", + "description": "### Fetches a CI Run.\n\n", + "parameters": [ + { + "name": "project_id", + "in": "path", + "description": "Project Id", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "run_id", + "in": "path", + "description": "Run Id", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "fields", + "in": "query", + "description": "Requested fields", + "required": false, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "CI Run", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProjectCIRun" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "429": { + "description": "Too Many Requests", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "x-looker-status": "beta", + "x-looker-activity-type": "non_query", + "x-looker-rate-limited": true + } + }, + "/projects/{project_id}/ci/run": { + "post": { + "tags": [ + "Project" + ], + "operationId": "create_ci_run", + "summary": "Create a Continuous Integration run", + "description": "### Creates a CI Run.\n\n", + "parameters": [ + { + "name": "project_id", + "in": "path", + "description": "Project Id", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "fields", + "in": "query", + "description": "Requested fields", + "required": false, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "CI Run", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateCIRunResponse" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "409": { + "description": "Resource Already Exists", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ValidationError" + } + } + } + }, + "429": { + "description": "Too Many Requests", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "x-looker-status": "beta", + "x-looker-activity-type": "non_query", + "x-looker-rate-limited": true, + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateCIRunRequest" + } + } + }, + "description": "Options for creating a CI run", + "required": true + } + } + }, "/render_tasks/looks/{look_id}/{result_format}": { "post": { "tags": [ @@ -41683,6 +41873,65 @@ }, "x-looker-status": "stable" }, + "CreateCIRunRequest": { + "properties": { + "suite_id": { + "type": "string", + "description": "Run ID", + "nullable": false + }, + "branch": { + "type": "string", + "description": "The branch to test. Omit to test production.", + "nullable": true + }, + "target": { + "type": "string", + "description": "Suite name", + "nullable": false + }, + "commit": { + "type": "string", + "format": "uri-reference", + "description": "The commit to test. Omit to test production.", + "nullable": true + }, + "user_attributes": { + "type": "array", + "items": { + "type": "string" + }, + "description": "User attributes to set for run", + "nullable": true + }, + "webhooks": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Webhooks to trigger when run completes.", + "nullable": true + } + }, + "x-looker-status": "beta" + }, + "CreateCIRunResponse": { + "properties": { + "run_id": { + "type": "string", + "readOnly": true, + "description": "Run ID", + "nullable": false + }, + "status": { + "type": "string", + "readOnly": true, + "description": "Run status", + "nullable": false + } + }, + "x-looker-status": "beta" + }, "CreateEmbedUserRequest": { "properties": { "external_user_id": { @@ -43714,6 +43963,11 @@ "description": "Whether the connection uses OAuth for authentication.", "nullable": false }, + "uses_key_pair_auth": { + "type": "boolean", + "description": "Whether the connection uses key-pair for authentication.", + "nullable": false + }, "uses_instance_oauth": { "type": "boolean", "readOnly": true, @@ -43729,7 +43983,7 @@ "file_type": { "type": "string", "x-looker-write-only": true, - "description": "(Write-Only) Certificate keyfile type - .json or .p12", + "description": "(Write-Only) Certificate keyfile type - .json, .p8 or .p12", "nullable": true }, "database": { @@ -44181,6 +44435,23 @@ }, "x-looker-status": "stable" }, + "DialectDriverVersion": { + "properties": { + "name": { + "type": "string", + "readOnly": true, + "description": "Name to be passed to the backend", + "nullable": true + }, + "display_name": { + "type": "string", + "readOnly": true, + "description": "Name to be displayed in the frontend.", + "nullable": true + } + }, + "x-looker-status": "stable" + }, "DialectInfo": { "properties": { "can": { @@ -44243,7 +44514,7 @@ "supported_driver_versions": { "type": "array", "items": { - "type": "string" + "$ref": "#/components/schemas/DialectDriverVersion" }, "readOnly": true, "description": "Array of supported drivers for a given dialect", @@ -50014,6 +50285,220 @@ }, "x-looker-status": "stable" }, + "ProjectCIRun": { + "properties": { + "run": { + "$ref": "#/components/schemas/CIRun" + } + }, + "x-looker-status": "beta" + }, + "CIGitState": { + "properties": { + "branch": { + "type": "string", + "readOnly": true, + "description": "Git branch for run", + "nullable": true + }, + "repository": { + "type": "string", + "readOnly": true, + "description": "Git repository for run", + "nullable": true + }, + "commit_ref": { + "type": "string", + "readOnly": true, + "description": "Git commit for run", + "nullable": true + }, + "target": { + "type": "string", + "readOnly": true, + "description": "Run start time.", + "nullable": true + } + }, + "x-looker-status": "beta" + }, + "CIScheduleTrigger": { + "properties": { + "enabled": { + "type": "boolean", + "readOnly": true, + "description": "Whether schedule is active", + "nullable": false + }, + "day": { + "type": "string", + "readOnly": true, + "description": "Day of week (0 = Sunday, 6 = Saturday)", + "nullable": false + }, + "hour": { + "type": "string", + "readOnly": true, + "description": "Hour of the day (24 hour format)", + "nullable": false + }, + "frequency": { + "type": "string", + "readOnly": true, + "description": "How often the schedule is configured to run", + "nullable": true + } + }, + "x-looker-status": "beta" + }, + "CIChangeRequest": { + "properties": { + "change_request_number": { + "type": "integer", + "format": "int64", + "readOnly": true, + "description": "Change request number", + "nullable": true + }, + "change_request_url": { + "type": "string", + "format": "uri-reference", + "readOnly": true, + "description": "Change request url", + "nullable": true + }, + "change_request_name": { + "type": "string", + "readOnly": true, + "description": "Change request name", + "nullable": true + }, + "change_request_commits_url": { + "type": "string", + "format": "uri-reference", + "readOnly": true, + "description": "Change request commits url", + "nullable": true + } + }, + "x-looker-status": "beta" + }, + "CIRunResult": { + "properties": { + "status": { + "type": "string", + "readOnly": true, + "description": "Run result status", + "nullable": false + }, + "validator": { + "type": "string", + "readOnly": true, + "description": "Run result validator", + "nullable": false + } + }, + "x-looker-status": "beta" + }, + "CIRun": { + "properties": { + "run_id": { + "type": "string", + "readOnly": true, + "description": "Run ID", + "nullable": false + }, + "created_at": { + "type": "string", + "format": "date-time", + "readOnly": true, + "description": "Run created time.", + "nullable": false + }, + "started_at": { + "type": "string", + "format": "date-time", + "readOnly": true, + "description": "Run start time.", + "nullable": true + }, + "finished_at": { + "type": "string", + "format": "date-time", + "readOnly": true, + "description": "Run completed time.", + "nullable": true + }, + "status_url": { + "type": "string", + "format": "uri-reference", + "readOnly": true, + "description": "Run status url", + "nullable": false + }, + "status": { + "type": "string", + "readOnly": true, + "description": "Run status.", + "nullable": true + }, + "git_service": { + "type": "string", + "readOnly": true, + "description": "Git service for run", + "nullable": true + }, + "git_state": { + "$ref": "#/components/schemas/CIGitState" + }, + "result": { + "type": "array", + "items": { + "$ref": "#/components/schemas/CIRunResult" + }, + "readOnly": true, + "description": "Run results", + "nullable": true + }, + "schedule": { + "$ref": "#/components/schemas/CIScheduleTrigger" + }, + "target_branch": { + "type": "string", + "readOnly": true, + "description": "Target branch for run", + "nullable": true + }, + "title": { + "type": "string", + "readOnly": true, + "description": "Suite title", + "nullable": true + }, + "trigger": { + "type": "string", + "readOnly": true, + "description": "Trigger for run", + "nullable": true + }, + "change_request": { + "$ref": "#/components/schemas/CIChangeRequest" + }, + "suite_id": { + "type": "string", + "readOnly": true, + "description": "The Id of the suite used", + "nullable": false + }, + "username": { + "type": "string", + "readOnly": true, + "description": "User who triggered the run", + "nullable": true + } + }, + "x-looker-status": "beta" + }, "ProjectFile": { "properties": { "can": { @@ -53443,6 +53928,13 @@ "readOnly": true, "description": "Name of User that deleted the Report.", "nullable": true + }, + "schedule_count": { + "type": "integer", + "format": "int64", + "readOnly": true, + "description": "Count of schedules on the report.", + "nullable": true } }, "x-looker-status": "alpha" diff --git a/swift/looker/rtl/constants.swift b/swift/looker/rtl/constants.swift index c17ad0006..c280dd460 100644 --- a/swift/looker/rtl/constants.swift +++ b/swift/looker/rtl/constants.swift @@ -51,7 +51,7 @@ extension String { } public struct Constants { - public static let lookerVersion = "25.4" + public static let lookerVersion = "25.6" public static let apiVersion = "4.0" public static let defaultApiVersion = "4.0" // Swift requires API 4.0 public static let sdkVersion = #"\#(apiVersion).\#(lookerVersion)"# diff --git a/swift/looker/sdk/methods.swift b/swift/looker/sdk/methods.swift index 3b9f9008c..7b25cb9cf 100644 --- a/swift/looker/sdk/methods.swift +++ b/swift/looker/sdk/methods.swift @@ -25,7 +25,7 @@ */ /** - * 469 API methods + * 471 API methods */ @@ -831,9 +831,6 @@ open class LookerSDK: APIMethods { * it to disk, do not pass it to a third party, and only pass it through a secure HTTPS * encrypted transport. * - * - * **NOTE**: Calls to this endpoint require [Embedding](https://cloud.google.com/looker/docs/r/looker-core-feature-embed) to be enabled. Usage of this endpoint is not authorized for Looker Core Standard and Looker Core Enterprise. - * * POST /embed/token_url/me -> EmbedUrlResponse */ public func create_embed_url_as_me( @@ -8051,6 +8048,59 @@ open class LookerSDK: APIMethods { return result } + /** + * ### Fetches a CI Run. + * + * GET /projects/{project_id}/ci/runs/{run_id} -> ProjectCIRun + */ + public func get_ci_run( + /** + * @param {String} project_id Project Id + */ + _ project_id: String, + /** + * @param {String} run_id Run Id + */ + _ run_id: String, + /** + * @param {String} fields Requested fields + */ + fields: String? = nil, + options: ITransportSettings? = nil + ) -> SDKResponse { + let path_project_id = encodeParam(project_id) + let path_run_id = encodeParam(run_id) + let result: SDKResponse = self.get("/projects/\(path_project_id)/ci/runs/\(path_run_id)", + ["fields": fields], nil, options) + return result + } + + /** + * ### Creates a CI Run. + * + * POST /projects/{project_id}/ci/run -> CreateCIRunResponse + */ + public func create_ci_run( + /** + * @param {String} project_id Project Id + */ + _ project_id: String, + /** + * @param {CreateCIRunRequest} body + */ + _ body: CreateCIRunRequest, + /** + * @param {String} fields Requested fields + */ + fields: String? = nil, + options: ITransportSettings? = nil + ) -> SDKResponse { + let path_project_id = encodeParam(project_id) + let result: SDKResponse = self.post("/projects/\(path_project_id)/ci/run", + ["fields": fields], try! self.encode(body), options) + return result + } + /** * ### Configure Repository Credential for a remote dependency * diff --git a/swift/looker/sdk/models.swift b/swift/looker/sdk/models.swift index b81945be9..a1722d89d 100644 --- a/swift/looker/sdk/models.swift +++ b/swift/looker/sdk/models.swift @@ -25,7 +25,7 @@ */ /** - * 344 API models: 260 Spec, 0 Request, 62 Write, 22 Enum + * 353 API models: 269 Spec, 0 Request, 62 Write, 22 Enum */ @@ -1639,6 +1639,340 @@ public enum Category: String, Codable { case dimension = "dimension" } +public struct CIChangeRequest: SDKModel { + + private enum CodingKeys : String, CodingKey { + case _change_request_number = "change_request_number" + case _change_request_url = "change_request_url" + case _change_request_name = "change_request_name" + case _change_request_commits_url = "change_request_commits_url" + } + private var _change_request_number: AnyInt? + /** + * Change request number (read-only) + */ + public var change_request_number: Int64? { + get { _change_request_number?.value } + set { _change_request_number = newValue.map(AnyInt.init) } + } + + private var _change_request_url: AnyString? + /** + * Change request url (read-only) + */ + public var change_request_url: String? { + get { _change_request_url?.value } + set { _change_request_url = newValue.map(AnyString.init) } + } + + private var _change_request_name: AnyString? + /** + * Change request name (read-only) + */ + public var change_request_name: String? { + get { _change_request_name?.value } + set { _change_request_name = newValue.map(AnyString.init) } + } + + private var _change_request_commits_url: AnyString? + /** + * Change request commits url (read-only) + */ + public var change_request_commits_url: String? { + get { _change_request_commits_url?.value } + set { _change_request_commits_url = newValue.map(AnyString.init) } + } + + public init(change_request_number: Int64? = nil, change_request_url: String? = nil, change_request_name: String? = nil, change_request_commits_url: String? = nil) { + self._change_request_number = change_request_number.map(AnyInt.init) + self._change_request_url = change_request_url.map(AnyString.init) + self._change_request_name = change_request_name.map(AnyString.init) + self._change_request_commits_url = change_request_commits_url.map(AnyString.init) + } + +} + +public struct CIGitState: SDKModel { + + private enum CodingKeys : String, CodingKey { + case _branch = "branch" + case _repository = "repository" + case _commit_ref = "commit_ref" + case _target = "target" + } + private var _branch: AnyString? + /** + * Git branch for run (read-only) + */ + public var branch: String? { + get { _branch?.value } + set { _branch = newValue.map(AnyString.init) } + } + + private var _repository: AnyString? + /** + * Git repository for run (read-only) + */ + public var repository: String? { + get { _repository?.value } + set { _repository = newValue.map(AnyString.init) } + } + + private var _commit_ref: AnyString? + /** + * Git commit for run (read-only) + */ + public var commit_ref: String? { + get { _commit_ref?.value } + set { _commit_ref = newValue.map(AnyString.init) } + } + + private var _target: AnyString? + /** + * Run start time. (read-only) + */ + public var target: String? { + get { _target?.value } + set { _target = newValue.map(AnyString.init) } + } + + public init(branch: String? = nil, repository: String? = nil, commit_ref: String? = nil, target: String? = nil) { + self._branch = branch.map(AnyString.init) + self._repository = repository.map(AnyString.init) + self._commit_ref = commit_ref.map(AnyString.init) + self._target = target.map(AnyString.init) + } + +} + +public struct CIRun: SDKModel { + + private enum CodingKeys : String, CodingKey { + case _run_id = "run_id" + case created_at + case started_at + case finished_at + case _status_url = "status_url" + case _status = "status" + case _git_service = "git_service" + case git_state + case result + case schedule + case _target_branch = "target_branch" + case _title = "title" + case _trigger = "trigger" + case change_request + case _suite_id = "suite_id" + case _username = "username" + } + private var _run_id: AnyString? + /** + * Run ID (read-only) + */ + public var run_id: String? { + get { _run_id?.value } + set { _run_id = newValue.map(AnyString.init) } + } + + /** + * Run created time. (read-only) + */ + public var created_at: Date? + + /** + * Run start time. (read-only) + */ + public var started_at: Date? + + /** + * Run completed time. (read-only) + */ + public var finished_at: Date? + + private var _status_url: AnyString? + /** + * Run status url (read-only) + */ + public var status_url: String? { + get { _status_url?.value } + set { _status_url = newValue.map(AnyString.init) } + } + + private var _status: AnyString? + /** + * Run status. (read-only) + */ + public var status: String? { + get { _status?.value } + set { _status = newValue.map(AnyString.init) } + } + + private var _git_service: AnyString? + /** + * Git service for run (read-only) + */ + public var git_service: String? { + get { _git_service?.value } + set { _git_service = newValue.map(AnyString.init) } + } + + public var git_state: CIGitState? + + /** + * Run results (read-only) + */ + public var result: [CIRunResult]? + + public var schedule: CIScheduleTrigger? + + private var _target_branch: AnyString? + /** + * Target branch for run (read-only) + */ + public var target_branch: String? { + get { _target_branch?.value } + set { _target_branch = newValue.map(AnyString.init) } + } + + private var _title: AnyString? + /** + * Suite title (read-only) + */ + public var title: String? { + get { _title?.value } + set { _title = newValue.map(AnyString.init) } + } + + private var _trigger: AnyString? + /** + * Trigger for run (read-only) + */ + public var trigger: String? { + get { _trigger?.value } + set { _trigger = newValue.map(AnyString.init) } + } + + public var change_request: CIChangeRequest? + + private var _suite_id: AnyString? + /** + * The Id of the suite used (read-only) + */ + public var suite_id: String? { + get { _suite_id?.value } + set { _suite_id = newValue.map(AnyString.init) } + } + + private var _username: AnyString? + /** + * User who triggered the run (read-only) + */ + public var username: String? { + get { _username?.value } + set { _username = newValue.map(AnyString.init) } + } + + public init(run_id: String? = nil, created_at: Date? = nil, started_at: Date? = nil, finished_at: Date? = nil, status_url: String? = nil, status: String? = nil, git_service: String? = nil, git_state: CIGitState? = nil, result: [CIRunResult]? = nil, schedule: CIScheduleTrigger? = nil, target_branch: String? = nil, title: String? = nil, trigger: String? = nil, change_request: CIChangeRequest? = nil, suite_id: String? = nil, username: String? = nil) { + self._run_id = run_id.map(AnyString.init) + self.created_at = created_at + self.started_at = started_at + self.finished_at = finished_at + self._status_url = status_url.map(AnyString.init) + self._status = status.map(AnyString.init) + self._git_service = git_service.map(AnyString.init) + self.git_state = git_state + self.result = result + self.schedule = schedule + self._target_branch = target_branch.map(AnyString.init) + self._title = title.map(AnyString.init) + self._trigger = trigger.map(AnyString.init) + self.change_request = change_request + self._suite_id = suite_id.map(AnyString.init) + self._username = username.map(AnyString.init) + } + +} + +public struct CIRunResult: SDKModel { + + private enum CodingKeys : String, CodingKey { + case _status = "status" + case _validator = "validator" + } + private var _status: AnyString? + /** + * Run result status (read-only) + */ + public var status: String? { + get { _status?.value } + set { _status = newValue.map(AnyString.init) } + } + + private var _validator: AnyString? + /** + * Run result validator (read-only) + */ + public var validator: String? { + get { _validator?.value } + set { _validator = newValue.map(AnyString.init) } + } + + public init(status: String? = nil, validator: String? = nil) { + self._status = status.map(AnyString.init) + self._validator = validator.map(AnyString.init) + } + +} + +public struct CIScheduleTrigger: SDKModel { + + private enum CodingKeys : String, CodingKey { + case enabled + case _day = "day" + case _hour = "hour" + case _frequency = "frequency" + } + /** + * Whether schedule is active (read-only) + */ + public var enabled: Bool? + + private var _day: AnyString? + /** + * Day of week (0 = Sunday, 6 = Saturday) (read-only) + */ + public var day: String? { + get { _day?.value } + set { _day = newValue.map(AnyString.init) } + } + + private var _hour: AnyString? + /** + * Hour of the day (24 hour format) (read-only) + */ + public var hour: String? { + get { _hour?.value } + set { _hour = newValue.map(AnyString.init) } + } + + private var _frequency: AnyString? + /** + * How often the schedule is configured to run (read-only) + */ + public var frequency: String? { + get { _frequency?.value } + set { _frequency = newValue.map(AnyString.init) } + } + + public init(enabled: Bool? = nil, day: String? = nil, hour: String? = nil, frequency: String? = nil) { + self.enabled = enabled + self._day = day.map(AnyString.init) + self._hour = hour.map(AnyString.init) + self._frequency = frequency.map(AnyString.init) + } + +} + public struct ColorCollection: SDKModel { private enum CodingKeys : String, CodingKey { @@ -3576,6 +3910,112 @@ public struct CostEstimate: SDKModel { } +public struct CreateCIRunRequest: SDKModel { + + private enum CodingKeys : String, CodingKey { + case _suite_id = "suite_id" + case _branch = "branch" + case _target = "target" + case _commit = "commit" + case _user_attributes = "user_attributes" + case _webhooks = "webhooks" + } + private var _suite_id: AnyString? + /** + * Run ID + */ + public var suite_id: String? { + get { _suite_id?.value } + set { _suite_id = newValue.map(AnyString.init) } + } + + private var _branch: AnyString? + /** + * The branch to test. Omit to test production. + */ + public var branch: String? { + get { _branch?.value } + set { _branch = newValue.map(AnyString.init) } + } + + private var _target: AnyString? + /** + * Suite name + */ + public var target: String? { + get { _target?.value } + set { _target = newValue.map(AnyString.init) } + } + + private var _commit: AnyString? + /** + * The commit to test. Omit to test production. + */ + public var commit: String? { + get { _commit?.value } + set { _commit = newValue.map(AnyString.init) } + } + + private var _user_attributes: [AnyString]? + /** + * User attributes to set for run + */ + public var user_attributes: [String]? { + get { if let v = _user_attributes { return v.map { $0.value } } else { return nil } } + set { if let v = newValue { _user_attributes = v.map { AnyString.init($0) } } else { _user_attributes = nil } } + } + + private var _webhooks: [AnyString]? + /** + * Webhooks to trigger when run completes. + */ + public var webhooks: [String]? { + get { if let v = _webhooks { return v.map { $0.value } } else { return nil } } + set { if let v = newValue { _webhooks = v.map { AnyString.init($0) } } else { _webhooks = nil } } + } + + public init(suite_id: String? = nil, branch: String? = nil, target: String? = nil, commit: String? = nil, user_attributes: [String]? = nil, webhooks: [String]? = nil) { + self._suite_id = suite_id.map(AnyString.init) + self._branch = branch.map(AnyString.init) + self._target = target.map(AnyString.init) + self._commit = commit.map(AnyString.init) + if let v = user_attributes { _user_attributes = v.map { AnyString.init($0) } } else { _user_attributes = nil } + if let v = webhooks { _webhooks = v.map { AnyString.init($0) } } else { _webhooks = nil } + } + +} + +public struct CreateCIRunResponse: SDKModel { + + private enum CodingKeys : String, CodingKey { + case _run_id = "run_id" + case _status = "status" + } + private var _run_id: AnyString? + /** + * Run ID (read-only) + */ + public var run_id: String? { + get { _run_id?.value } + set { _run_id = newValue.map(AnyString.init) } + } + + private var _status: AnyString? + /** + * Run status (read-only) + */ + public var status: String? { + get { _status?.value } + set { _status = newValue.map(AnyString.init) } + } + + public init(run_id: String? = nil, status: String? = nil) { + self._run_id = run_id.map(AnyString.init) + self._status = status.map(AnyString.init) + } + +} + /** * WARNING: no writeable properties found for POST, PUT, or PATCH */ @@ -7002,6 +7442,7 @@ public struct DBConnection: SDKModel { case _username = "username" case _password = "password" case uses_oauth + case uses_key_pair_auth case uses_instance_oauth case _certificate = "certificate" case _file_type = "file_type" @@ -7137,6 +7578,11 @@ public struct DBConnection: SDKModel { */ public var uses_oauth: Bool? + /** + * Whether the connection uses key-pair for authentication. + */ + public var uses_key_pair_auth: Bool? + /** * Whether the integration uses the oauth instance account. (read-only) */ @@ -7153,7 +7599,7 @@ public struct DBConnection: SDKModel { private var _file_type: AnyString? /** - * (Write-Only) Certificate keyfile type - .json or .p12 + * (Write-Only) Certificate keyfile type - .json, .p8 or .p12 */ public var file_type: String? { get { _file_type?.value } @@ -7495,7 +7941,7 @@ public struct DBConnection: SDKModel { */ public var query_holding_disabled: Bool? - public init(can: StringDictionary? = nil, name: String? = nil, dialect: Dialect? = nil, snippets: [Snippet]? = nil, pdts_enabled: Bool? = nil, named_driver_version_requested: String? = nil, named_driver_version_actual: String? = nil, host: String? = nil, port: String? = nil, username: String? = nil, password: String? = nil, uses_oauth: Bool? = nil, uses_instance_oauth: Bool? = nil, certificate: String? = nil, file_type: String? = nil, database: String? = nil, db_timezone: String? = nil, query_timezone: String? = nil, schema: String? = nil, max_connections: Int64? = nil, max_queries: Int64? = nil, max_queries_per_user: Int64? = nil, max_billing_gigabytes: String? = nil, ssl: Bool? = nil, verify_ssl: Bool? = nil, tmp_db_name: String? = nil, tmp_db_host: String? = nil, jdbc_additional_params: String? = nil, pool_timeout: Int64? = nil, dialect_name: String? = nil, supports_data_studio_link: Bool? = nil, created_at: String? = nil, user_id: String? = nil, example: Bool? = nil, user_db_credentials: Bool? = nil, user_attribute_fields: [String]? = nil, maintenance_cron: String? = nil, last_regen_at: String? = nil, last_reap_at: String? = nil, sql_runner_precache_tables: Bool? = nil, sql_writing_with_info_schema: Bool? = nil, after_connect_statements: String? = nil, pdt_context_override: DBConnectionOverride? = nil, managed: Bool? = nil, custom_local_port: Int64? = nil, tunnel_id: String? = nil, uses_tns: Bool? = nil, pdt_concurrency: Int64? = nil, disable_context_comment: Bool? = nil, oauth_application_id: String? = nil, always_retry_failed_builds: Bool? = nil, uses_application_default_credentials: Bool? = nil, impersonated_service_account: String? = nil, cost_estimate_enabled: Bool? = nil, pdt_api_control_enabled: Bool? = nil, connection_pooling: Bool? = nil, default_bq_connection: Bool? = nil, bq_storage_project_id: String? = nil, bq_roles_verified: Bool? = nil, p4sa_name: String? = nil, query_holding_disabled: Bool? = nil) { + public init(can: StringDictionary? = nil, name: String? = nil, dialect: Dialect? = nil, snippets: [Snippet]? = nil, pdts_enabled: Bool? = nil, named_driver_version_requested: String? = nil, named_driver_version_actual: String? = nil, host: String? = nil, port: String? = nil, username: String? = nil, password: String? = nil, uses_oauth: Bool? = nil, uses_key_pair_auth: Bool? = nil, uses_instance_oauth: Bool? = nil, certificate: String? = nil, file_type: String? = nil, database: String? = nil, db_timezone: String? = nil, query_timezone: String? = nil, schema: String? = nil, max_connections: Int64? = nil, max_queries: Int64? = nil, max_queries_per_user: Int64? = nil, max_billing_gigabytes: String? = nil, ssl: Bool? = nil, verify_ssl: Bool? = nil, tmp_db_name: String? = nil, tmp_db_host: String? = nil, jdbc_additional_params: String? = nil, pool_timeout: Int64? = nil, dialect_name: String? = nil, supports_data_studio_link: Bool? = nil, created_at: String? = nil, user_id: String? = nil, example: Bool? = nil, user_db_credentials: Bool? = nil, user_attribute_fields: [String]? = nil, maintenance_cron: String? = nil, last_regen_at: String? = nil, last_reap_at: String? = nil, sql_runner_precache_tables: Bool? = nil, sql_writing_with_info_schema: Bool? = nil, after_connect_statements: String? = nil, pdt_context_override: DBConnectionOverride? = nil, managed: Bool? = nil, custom_local_port: Int64? = nil, tunnel_id: String? = nil, uses_tns: Bool? = nil, pdt_concurrency: Int64? = nil, disable_context_comment: Bool? = nil, oauth_application_id: String? = nil, always_retry_failed_builds: Bool? = nil, uses_application_default_credentials: Bool? = nil, impersonated_service_account: String? = nil, cost_estimate_enabled: Bool? = nil, pdt_api_control_enabled: Bool? = nil, connection_pooling: Bool? = nil, default_bq_connection: Bool? = nil, bq_storage_project_id: String? = nil, bq_roles_verified: Bool? = nil, p4sa_name: String? = nil, query_holding_disabled: Bool? = nil) { self.can = can self._name = name.map(AnyString.init) self.dialect = dialect @@ -7508,6 +7954,7 @@ public struct DBConnection: SDKModel { self._username = username.map(AnyString.init) self._password = password.map(AnyString.init) self.uses_oauth = uses_oauth + self.uses_key_pair_auth = uses_key_pair_auth self.uses_instance_oauth = uses_instance_oauth self._certificate = certificate.map(AnyString.init) self._file_type = file_type.map(AnyString.init) @@ -8143,6 +8590,37 @@ public struct Dialect: SDKModel { } +public struct DialectDriverVersion: SDKModel { + + private enum CodingKeys : String, CodingKey { + case _name = "name" + case _display_name = "display_name" + } + private var _name: AnyString? + /** + * Name to be passed to the backend (read-only) + */ + public var name: String? { + get { _name?.value } + set { _name = newValue.map(AnyString.init) } + } + + private var _display_name: AnyString? + /** + * Name to be displayed in the frontend. (read-only) + */ + public var display_name: String? { + get { _display_name?.value } + set { _display_name = newValue.map(AnyString.init) } + } + + public init(name: String? = nil, display_name: String? = nil) { + self._name = name.map(AnyString.init) + self._display_name = display_name.map(AnyString.init) + } + +} + public struct DialectInfo: SDKModel { private enum CodingKeys : String, CodingKey { @@ -8155,7 +8633,7 @@ public struct DialectInfo: SDKModel { case _label_for_schema_equivalent = "label_for_schema_equivalent" case _name = "name" case _supported_driver_name = "supported_driver_name" - case _supported_driver_versions = "supported_driver_versions" + case supported_driver_versions case supported_options } /** @@ -8231,18 +8709,14 @@ public struct DialectInfo: SDKModel { set { _supported_driver_name = newValue.map(AnyString.init) } } - private var _supported_driver_versions: [AnyString]? /** * Array of supported drivers for a given dialect (read-only) */ - public var supported_driver_versions: [String]? { - get { if let v = _supported_driver_versions { return v.map { $0.value } } else { return nil } } - set { if let v = newValue { _supported_driver_versions = v.map { AnyString.init($0) } } else { _supported_driver_versions = nil } } - } + public var supported_driver_versions: [DialectDriverVersion]? public var supported_options: DialectInfoOptions? - public init(can: StringDictionary? = nil, default_max_connections: String? = nil, default_port: String? = nil, installed: Bool? = nil, label: String? = nil, label_for_database_equivalent: String? = nil, label_for_schema_equivalent: String? = nil, name: String? = nil, supported_driver_name: String? = nil, supported_driver_versions: [String]? = nil, supported_options: DialectInfoOptions? = nil) { + public init(can: StringDictionary? = nil, default_max_connections: String? = nil, default_port: String? = nil, installed: Bool? = nil, label: String? = nil, label_for_database_equivalent: String? = nil, label_for_schema_equivalent: String? = nil, name: String? = nil, supported_driver_name: String? = nil, supported_driver_versions: [DialectDriverVersion]? = nil, supported_options: DialectInfoOptions? = nil) { self.can = can self._default_max_connections = default_max_connections.map(AnyString.init) self._default_port = default_port.map(AnyString.init) @@ -8252,7 +8726,7 @@ public struct DialectInfo: SDKModel { self._label_for_schema_equivalent = label_for_schema_equivalent.map(AnyString.init) self._name = name.map(AnyString.init) self._supported_driver_name = supported_driver_name.map(AnyString.init) - if let v = supported_driver_versions { _supported_driver_versions = v.map { AnyString.init($0) } } else { _supported_driver_versions = nil } + self.supported_driver_versions = supported_driver_versions self.supported_options = supported_options } @@ -17579,6 +18053,15 @@ public struct Project: SDKModel { } +public struct ProjectCIRun: SDKModel { + public var run: CIRun? + + public init(run: CIRun? = nil) { + self.run = run + } + +} + public struct ProjectError: SDKModel { private enum CodingKeys : String, CodingKey { @@ -18678,6 +19161,7 @@ public struct Report: SDKModel { case last_accessed_at case _deleter_user_id = "deleter_user_id" case _deleter_user_name = "deleter_user_name" + case _schedule_count = "schedule_count" } /** * Operations the current user is able to perform on this object (read-only) @@ -18806,7 +19290,16 @@ public struct Report: SDKModel { set { _deleter_user_name = newValue.map(AnyString.init) } } - public init(can: StringDictionary? = nil, id: String? = nil, title: String? = nil, user_id: String? = nil, created_at: Date? = nil, updated_at: Date? = nil, last_viewed_at: Date? = nil, favorite: Bool? = nil, favorite_count: Int64? = nil, view_count: Int64? = nil, folder: FolderBase? = nil, folder_id: String? = nil, url: String? = nil, user_name: String? = nil, deleted_at: Date? = nil, last_accessed_at: Date? = nil, deleter_user_id: String? = nil, deleter_user_name: String? = nil) { + private var _schedule_count: AnyInt? + /** + * Count of schedules on the report. (read-only) + */ + public var schedule_count: Int64? { + get { _schedule_count?.value } + set { _schedule_count = newValue.map(AnyInt.init) } + } + + public init(can: StringDictionary? = nil, id: String? = nil, title: String? = nil, user_id: String? = nil, created_at: Date? = nil, updated_at: Date? = nil, last_viewed_at: Date? = nil, favorite: Bool? = nil, favorite_count: Int64? = nil, view_count: Int64? = nil, folder: FolderBase? = nil, folder_id: String? = nil, url: String? = nil, user_name: String? = nil, deleted_at: Date? = nil, last_accessed_at: Date? = nil, deleter_user_id: String? = nil, deleter_user_name: String? = nil, schedule_count: Int64? = nil) { self.can = can self._id = id.map(AnyString.init) self._title = title.map(AnyString.init) @@ -18825,6 +19318,7 @@ public struct Report: SDKModel { self.last_accessed_at = last_accessed_at self._deleter_user_id = deleter_user_id.map(AnyString.init) self._deleter_user_name = deleter_user_name.map(AnyString.init) + self._schedule_count = schedule_count.map(AnyInt.init) } } @@ -25826,6 +26320,7 @@ public struct WriteDBConnection: SDKModel { case _port = "port" case _username = "username" case _password = "password" + case uses_key_pair_auth case _certificate = "certificate" case _file_type = "file_type" case _database = "database" @@ -25920,6 +26415,11 @@ public struct WriteDBConnection: SDKModel { set { _password = newValue.map(AnyString.init) } } + /** + * Whether the connection uses key-pair for authentication. + */ + public var uses_key_pair_auth: Bool? + private var _certificate: AnyString? /** * (Write-Only) Base64 encoded Certificate body for server authentication (when appropriate for dialect). @@ -25931,7 +26431,7 @@ public struct WriteDBConnection: SDKModel { private var _file_type: AnyString? /** - * (Write-Only) Certificate keyfile type - .json or .p12 + * (Write-Only) Certificate keyfile type - .json, .p8 or .p12 */ public var file_type: String? { get { _file_type?.value } @@ -26212,13 +26712,14 @@ public struct WriteDBConnection: SDKModel { */ public var query_holding_disabled: Bool? - public init(name: String? = nil, named_driver_version_requested: String? = nil, host: String? = nil, port: String? = nil, username: String? = nil, password: String? = nil, certificate: String? = nil, file_type: String? = nil, database: String? = nil, db_timezone: String? = nil, query_timezone: String? = nil, schema: String? = nil, max_connections: Int64? = nil, max_queries: Int64? = nil, max_queries_per_user: Int64? = nil, max_billing_gigabytes: String? = nil, ssl: Bool? = nil, verify_ssl: Bool? = nil, tmp_db_name: String? = nil, tmp_db_host: String? = nil, jdbc_additional_params: String? = nil, pool_timeout: Int64? = nil, dialect_name: String? = nil, user_db_credentials: Bool? = nil, user_attribute_fields: [String]? = nil, maintenance_cron: String? = nil, sql_runner_precache_tables: Bool? = nil, sql_writing_with_info_schema: Bool? = nil, after_connect_statements: String? = nil, pdt_context_override: WriteDBConnectionOverride? = nil, custom_local_port: Int64? = nil, tunnel_id: String? = nil, uses_tns: Bool? = nil, pdt_concurrency: Int64? = nil, disable_context_comment: Bool? = nil, oauth_application_id: String? = nil, always_retry_failed_builds: Bool? = nil, uses_application_default_credentials: Bool? = nil, impersonated_service_account: String? = nil, cost_estimate_enabled: Bool? = nil, pdt_api_control_enabled: Bool? = nil, connection_pooling: Bool? = nil, bq_storage_project_id: String? = nil, bq_roles_verified: Bool? = nil, query_holding_disabled: Bool? = nil) { + public init(name: String? = nil, named_driver_version_requested: String? = nil, host: String? = nil, port: String? = nil, username: String? = nil, password: String? = nil, uses_key_pair_auth: Bool? = nil, certificate: String? = nil, file_type: String? = nil, database: String? = nil, db_timezone: String? = nil, query_timezone: String? = nil, schema: String? = nil, max_connections: Int64? = nil, max_queries: Int64? = nil, max_queries_per_user: Int64? = nil, max_billing_gigabytes: String? = nil, ssl: Bool? = nil, verify_ssl: Bool? = nil, tmp_db_name: String? = nil, tmp_db_host: String? = nil, jdbc_additional_params: String? = nil, pool_timeout: Int64? = nil, dialect_name: String? = nil, user_db_credentials: Bool? = nil, user_attribute_fields: [String]? = nil, maintenance_cron: String? = nil, sql_runner_precache_tables: Bool? = nil, sql_writing_with_info_schema: Bool? = nil, after_connect_statements: String? = nil, pdt_context_override: WriteDBConnectionOverride? = nil, custom_local_port: Int64? = nil, tunnel_id: String? = nil, uses_tns: Bool? = nil, pdt_concurrency: Int64? = nil, disable_context_comment: Bool? = nil, oauth_application_id: String? = nil, always_retry_failed_builds: Bool? = nil, uses_application_default_credentials: Bool? = nil, impersonated_service_account: String? = nil, cost_estimate_enabled: Bool? = nil, pdt_api_control_enabled: Bool? = nil, connection_pooling: Bool? = nil, bq_storage_project_id: String? = nil, bq_roles_verified: Bool? = nil, query_holding_disabled: Bool? = nil) { self._name = name.map(AnyString.init) self._named_driver_version_requested = named_driver_version_requested.map(AnyString.init) self._host = host.map(AnyString.init) self._port = port.map(AnyString.init) self._username = username.map(AnyString.init) self._password = password.map(AnyString.init) + self.uses_key_pair_auth = uses_key_pair_auth self._certificate = certificate.map(AnyString.init) self._file_type = file_type.map(AnyString.init) self._database = database.map(AnyString.init) diff --git a/swift/looker/sdk/streams.swift b/swift/looker/sdk/streams.swift index fc417436b..a1005b68c 100644 --- a/swift/looker/sdk/streams.swift +++ b/swift/looker/sdk/streams.swift @@ -25,7 +25,7 @@ */ /** - * 469 API methods + * 471 API methods */ @@ -829,9 +829,6 @@ open class LookerSDKStream: APIMethods { * it to disk, do not pass it to a third party, and only pass it through a secure HTTPS * encrypted transport. * - * - * **NOTE**: Calls to this endpoint require [Embedding](https://cloud.google.com/looker/docs/r/looker-core-feature-embed) to be enabled. Usage of this endpoint is not authorized for Looker Core Standard and Looker Core Enterprise. - * * POST /embed/token_url/me -> EmbedUrlResponse */ public func create_embed_url_as_me( @@ -8049,6 +8046,59 @@ open class LookerSDKStream: APIMethods { return result } + /** + * ### Fetches a CI Run. + * + * GET /projects/{project_id}/ci/runs/{run_id} -> ProjectCIRun + */ + public func get_ci_run( + /** + * @param {String} project_id Project Id + */ + _ project_id: String, + /** + * @param {String} run_id Run Id + */ + _ run_id: String, + /** + * @param {String} fields Requested fields + */ + fields: String? = nil, + options: ITransportSettings? = nil + ) -> SDKResponse { + let path_project_id = encodeParam(project_id) + let path_run_id = encodeParam(run_id) + let result: SDKResponse = self.get("/projects/\(path_project_id)/ci/runs/\(path_run_id)", + ["fields": fields], nil, options) + return result + } + + /** + * ### Creates a CI Run. + * + * POST /projects/{project_id}/ci/run -> CreateCIRunResponse + */ + public func create_ci_run( + /** + * @param {String} project_id Project Id + */ + _ project_id: String, + /** + * @param {CreateCIRunRequest} body + */ + _ body: CreateCIRunRequest, + /** + * @param {String} fields Requested fields + */ + fields: String? = nil, + options: ITransportSettings? = nil + ) -> SDKResponse { + let path_project_id = encodeParam(project_id) + let result: SDKResponse = self.post("/projects/\(path_project_id)/ci/run", + ["fields": fields], try! self.encode(body), options) + return result + } + /** * ### Configure Repository Credential for a remote dependency *