Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion csharp/rtl/Constants.cs
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public struct Constants

public const string DefaultApiVersion = "4.0";
public const string AgentPrefix = "CS-SDK";
public const string LookerVersion = "22.0";
public const string LookerVersion = "22.2";

public const string Bearer = "Bearer";
public const string LookerAppiId = "x-looker-appid";
Expand Down
80 changes: 79 additions & 1 deletion csharp/sdk/3.1/methods.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
/// SOFTWARE.
///

/// 378 API methods
/// 382 API methods

#nullable enable
using System;
Expand Down Expand Up @@ -1091,6 +1091,21 @@ public async Task<SdkResponse<Locale[], Exception>> all_locales(
return await AuthRequest<Locale[], Exception>(HttpMethod.Get, "/locales", null,null,options);
}

/// ### Configure SMTP Settings
/// This API allows users to configure the SMTP settings on the Looker instance.
/// This API is only supported in the OEM jar. Additionally, only admin users are authorised to call this API.
///
/// POST /smtp_settings -> void
///
/// <returns><c>void</c> Successfully updated SMTP settings ()</returns>
///
public async Task<SdkResponse<string, Exception>> set_smtp_settings(
SmtpSettings body,
ITransportSettings? options = null)
{
return await AuthRequest<string, Exception>(HttpMethod.Post, "/smtp_settings", null,body,options);
}

/// ### Get a list of timezones that Looker supports (e.g. useful for scheduling tasks).
///
/// GET /timezones -> Timezone[]
Expand Down Expand Up @@ -2491,6 +2506,69 @@ public async Task<SdkResponse<DependencyGraph, Exception>> graph_derived_tables_
{ "workspace", workspace }},null,options);
}

/// Enqueue materialization for a PDT with the given model name and view name
///
/// GET /derived_table/{model_name}/{view_name}/start -> MaterializePDT
///
/// <returns><c>MaterializePDT</c> Derived Table (application/json)</returns>
///
/// <param name="model_name">The model of the PDT to start building.</param>
/// <param name="view_name">The view name of the PDT to start building.</param>
/// <param name="force_rebuild">Force rebuild of required dependent PDTs, even if they are already materialized.</param>
/// <param name="force_full_incremental">Force involved incremental PDTs to fully re-materialize.</param>
/// <param name="workspace">Workspace in which to materialize selected PDT ('dev' or default 'production').</param>
/// <param name="source">The source of this request.</param>
public async Task<SdkResponse<MaterializePDT, Exception>> start_pdt_build(
string model_name,
string view_name,
string? force_rebuild = null,
string? force_full_incremental = null,
string? workspace = null,
string? source = null,
ITransportSettings? options = null)
{
model_name = SdkUtils.EncodeParam(model_name);
view_name = SdkUtils.EncodeParam(view_name);
return await AuthRequest<MaterializePDT, Exception>(HttpMethod.Get, $"/derived_table/{model_name}/{view_name}/start", new Values {
{ "force_rebuild", force_rebuild },
{ "force_full_incremental", force_full_incremental },
{ "workspace", workspace },
{ "source", source }},null,options);
}

/// Check status of PDT materialization
///
/// GET /derived_table/{materialization_id}/status -> MaterializePDT
///
/// <returns><c>MaterializePDT</c> Derived Table (application/json)</returns>
///
/// <param name="materialization_id">The materialization id to check status for.</param>
public async Task<SdkResponse<MaterializePDT, Exception>> check_pdt_build(
string materialization_id,
ITransportSettings? options = null)
{
materialization_id = SdkUtils.EncodeParam(materialization_id);
return await AuthRequest<MaterializePDT, Exception>(HttpMethod.Get, $"/derived_table/{materialization_id}/status", null,null,options);
}

/// Stop a PDT materialization
///
/// GET /derived_table/{materialization_id}/stop -> MaterializePDT
///
/// <returns><c>MaterializePDT</c> Derived Table (application/json)</returns>
///
/// <param name="materialization_id">The materialization id to stop.</param>
/// <param name="source">The source of this request.</param>
public async Task<SdkResponse<MaterializePDT, Exception>> stop_pdt_build(
string materialization_id,
string? source = null,
ITransportSettings? options = null)
{
materialization_id = SdkUtils.EncodeParam(materialization_id);
return await AuthRequest<MaterializePDT, Exception>(HttpMethod.Get, $"/derived_table/{materialization_id}/stop", new Values {
{ "source", source }},null,options);
}

#endregion DerivedTable: View Derived Table graphs

#region Folder: Manage Folders
Expand Down
44 changes: 42 additions & 2 deletions csharp/sdk/3.1/models.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
/// SOFTWARE.
///

/// 255 API models: 188 Spec, 0 Request, 51 Write, 16 Enum
/// 258 API models: 190 Spec, 0 Request, 51 Write, 17 Enum

#nullable enable
using System;
Expand Down Expand Up @@ -1018,7 +1018,9 @@ public class DashboardLookml : SdkModel
{
/// <summary>Id of Dashboard (read-only)</summary>
public string? dashboard_id { get; set; } = null;
/// <summary>lookml of UDD (read-only)</summary>
/// <summary>(Write-Only) Id of the folder</summary>
public string? folder_id { get; set; } = null;
/// <summary>lookml of UDD</summary>
public string? lookml { get; set; } = null;
}

Expand Down Expand Up @@ -2777,6 +2779,14 @@ public class Manifest : SdkModel
public LocalizationSettings? localization_settings { get; set; }
}

public class MaterializePDT : SdkModel
{
/// <summary>The ID of the enqueued materialization task (read-only)</summary>
public string? materialization_id { get; set; } = null;
/// <summary>Detailed response in text format (read-only)</summary>
public string? resp_text { get; set; } = null;
}

public class MergeFields : SdkModel
{
/// <summary>Field name to map onto in the merged results</summary>
Expand Down Expand Up @@ -3776,6 +3786,25 @@ public class SessionConfig : SdkModel
public bool? track_session_location { get; set; } = null;
}

public class SmtpSettings : SdkModel
{
/// <summary>SMTP Server url</summary>
public string? address { get; set; } = null;
/// <summary>From e-mail address</summary>
public string? from { get; set; } = null;
/// <summary>User name</summary>
public string? user_name { get; set; } = null;
/// <summary>Password</summary>
public string? password { get; set; } = null;
/// <summary>SMTP Server's port</summary>
public long? port { get; set; } = null;
/// <summary>Is TLS encryption enabled?</summary>
public bool? enable_starttls_auto { get; set; } = null;
/// <summary>TLS version selected Valid values are: "TLSv1_1", "SSLv23", "TLSv1_2".</summary>
[JsonConverter(typeof(StringEnumConverter))]
public SslVersion? ssl_version { get; set; }
}

public class Snippet : SdkModel
{
/// <summary>Name of the snippet (read-only)</summary>
Expand Down Expand Up @@ -3908,6 +3937,17 @@ public class SqlQueryCreate : SdkModel
public StringDictionary<object>? vis_config { get; set; } = null;
}

/// TLS version selected Valid values are: "TLSv1_1", "SSLv23", "TLSv1_2". (Enum defined in SmtpSettings)
public enum SslVersion
{
[EnumMember(Value = "TLSv1_1")]
TLSv1_1,
[EnumMember(Value = "SSLv23")]
SSLv23,
[EnumMember(Value = "TLSv1_2")]
TLSv1_2
}

/// A list of action types the integration supports. Valid values are: "cell", "query", "dashboard". (Enum defined in Integration)
public enum SupportedActionTypes
{
Expand Down
116 changes: 115 additions & 1 deletion csharp/sdk/4.0/methods.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
/// SOFTWARE.
///

/// 437 API methods
/// 443 API methods

#nullable enable
using System;
Expand Down Expand Up @@ -1872,6 +1872,20 @@ public async Task<SdkResponse<DigestEmailSend, Exception>> create_digest_email_s
return await AuthRequest<DigestEmailSend, Exception>(HttpMethod.Post, "/digest_email_send", null,null,options);
}

/// ### Get Egress IP Addresses
///
/// Returns the list of public egress IP Addresses for a hosted customer's instance
///
/// GET /public_egress_ip_addresses -> EgressIpAddresses
///
/// <returns><c>EgressIpAddresses</c> Public Egress IP Addresses (application/json)</returns>
///
public async Task<SdkResponse<EgressIpAddresses, Exception>> public_egress_ip_addresses(
ITransportSettings? options = null)
{
return await AuthRequest<EgressIpAddresses, Exception>(HttpMethod.Get, "/public_egress_ip_addresses", null,null,options);
}

/// ### Set the menu item name and content for internal help resources
///
/// GET /internal_help_resources_content -> InternalHelpResourcesContent
Expand Down Expand Up @@ -2038,6 +2052,21 @@ public async Task<SdkResponse<Setting, Exception>> set_setting(
{ "fields", fields }},body,options);
}

/// ### Configure SMTP Settings
/// This API allows users to configure the SMTP settings on the Looker instance.
/// This API is only supported in the OEM jar. Additionally, only admin users are authorised to call this API.
///
/// POST /smtp_settings -> void
///
/// <returns><c>void</c> Successfully updated SMTP settings ()</returns>
///
public async Task<SdkResponse<string, Exception>> set_smtp_settings(
SmtpSettings body,
ITransportSettings? options = null)
{
return await AuthRequest<string, Exception>(HttpMethod.Post, "/smtp_settings", null,body,options);
}

/// ### Get current SMTP status.
///
/// GET /smtp_status -> SmtpStatus
Expand Down Expand Up @@ -3248,6 +3277,28 @@ public async Task<SdkResponse<Dashboard, Exception>> move_dashboard(
{ "folder_id", folder_id }},null,options);
}

/// ### Creates a new dashboard object based on LookML Dashboard YAML, and returns the details of the newly created dashboard.
///
/// This is equivalent to creating a LookML Dashboard and converting to a User-defined dashboard.
///
/// LookML must contain valid LookML YAML code. It's recommended to use the LookML format returned
/// from [dashboard_lookml()](#!/Dashboard/dashboard_lookml) as the input LookML (newlines replaced with
/// ).
///
/// Note that the created dashboard is not linked to any LookML Dashboard,
/// i.e. [sync_lookml_dashboard()](#!/Dashboard/sync_lookml_dashboard) will not update dashboards created by this method.
///
/// POST /dashboards/from_lookml -> DashboardLookml
///
/// <returns><c>DashboardLookml</c> DashboardLookML (application/json)</returns>
///
public async Task<SdkResponse<DashboardLookml, Exception>> create_dashboard_from_lookml(
WriteDashboardLookml body,
ITransportSettings? options = null)
{
return await AuthRequest<DashboardLookml, Exception>(HttpMethod.Post, "/dashboards/from_lookml", null,body,options);
}

/// ### Copy an existing dashboard
///
/// Creates a copy of an existing dashboard, in a specified folder, and returns the copied dashboard.
Expand Down Expand Up @@ -3764,6 +3815,69 @@ public async Task<SdkResponse<DependencyGraph, Exception>> graph_derived_tables_
{ "workspace", workspace }},null,options);
}

/// Enqueue materialization for a PDT with the given model name and view name
///
/// GET /derived_table/{model_name}/{view_name}/start -> MaterializePDT
///
/// <returns><c>MaterializePDT</c> Derived Table (application/json)</returns>
///
/// <param name="model_name">The model of the PDT to start building.</param>
/// <param name="view_name">The view name of the PDT to start building.</param>
/// <param name="force_rebuild">Force rebuild of required dependent PDTs, even if they are already materialized.</param>
/// <param name="force_full_incremental">Force involved incremental PDTs to fully re-materialize.</param>
/// <param name="workspace">Workspace in which to materialize selected PDT ('dev' or default 'production').</param>
/// <param name="source">The source of this request.</param>
public async Task<SdkResponse<MaterializePDT, Exception>> start_pdt_build(
string model_name,
string view_name,
string? force_rebuild = null,
string? force_full_incremental = null,
string? workspace = null,
string? source = null,
ITransportSettings? options = null)
{
model_name = SdkUtils.EncodeParam(model_name);
view_name = SdkUtils.EncodeParam(view_name);
return await AuthRequest<MaterializePDT, Exception>(HttpMethod.Get, $"/derived_table/{model_name}/{view_name}/start", new Values {
{ "force_rebuild", force_rebuild },
{ "force_full_incremental", force_full_incremental },
{ "workspace", workspace },
{ "source", source }},null,options);
}

/// Check status of PDT materialization
///
/// GET /derived_table/{materialization_id}/status -> MaterializePDT
///
/// <returns><c>MaterializePDT</c> Derived Table (application/json)</returns>
///
/// <param name="materialization_id">The materialization id to check status for.</param>
public async Task<SdkResponse<MaterializePDT, Exception>> check_pdt_build(
string materialization_id,
ITransportSettings? options = null)
{
materialization_id = SdkUtils.EncodeParam(materialization_id);
return await AuthRequest<MaterializePDT, Exception>(HttpMethod.Get, $"/derived_table/{materialization_id}/status", null,null,options);
}

/// Stop a PDT materialization
///
/// GET /derived_table/{materialization_id}/stop -> MaterializePDT
///
/// <returns><c>MaterializePDT</c> Derived Table (application/json)</returns>
///
/// <param name="materialization_id">The materialization id to stop.</param>
/// <param name="source">The source of this request.</param>
public async Task<SdkResponse<MaterializePDT, Exception>> stop_pdt_build(
string materialization_id,
string? source = null,
ITransportSettings? options = null)
{
materialization_id = SdkUtils.EncodeParam(materialization_id);
return await AuthRequest<MaterializePDT, Exception>(HttpMethod.Get, $"/derived_table/{materialization_id}/stop", new Values {
{ "source", source }},null,options);
}

#endregion DerivedTable: View Derived Table graphs

#region Folder: Manage Folders
Expand Down
Loading