dashboards

package
v0.76.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 17, 2025 License: Apache-2.0 Imports: 10 Imported by: 10

Documentation

Overview

These APIs allow you to manage Genie, Lakeview, Lakeview Embedded, etc.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthorizationDetails added in v0.63.0

type AuthorizationDetails struct {
	// Represents downscoped permission rules with specific access rights. This
	// field is specific to `workspace_rule_set` constraint.
	GrantRules []AuthorizationDetailsGrantRule `json:"grant_rules,omitempty"`
	// The acl path of the tree store resource resource.
	ResourceLegacyAclPath string `json:"resource_legacy_acl_path,omitempty"`
	// The resource name to which the authorization rule applies. This field is
	// specific to `workspace_rule_set` constraint. Format:
	// `workspaces/{workspace_id}/dashboards/{dashboard_id}`
	ResourceName string `json:"resource_name,omitempty"`
	// The type of authorization downscoping policy. Ex: `workspace_rule_set`
	// defines access rules for a specific workspace resource
	Type string `json:"type,omitempty"`

	ForceSendFields []string `json:"-" url:"-"`
}

func (AuthorizationDetails) MarshalJSON added in v0.63.0

func (s AuthorizationDetails) MarshalJSON() ([]byte, error)

func (*AuthorizationDetails) UnmarshalJSON added in v0.63.0

func (s *AuthorizationDetails) UnmarshalJSON(b []byte) error

type AuthorizationDetailsGrantRule added in v0.63.0

type AuthorizationDetailsGrantRule struct {
	// Permission sets for dashboard are defined in
	// iam-common/rbac-common/permission-sets/definitions/TreeStoreBasePermissionSets
	// Ex: `permissionSets/dashboard.runner`
	PermissionSet string `json:"permission_set,omitempty"`

	ForceSendFields []string `json:"-" url:"-"`
}

func (AuthorizationDetailsGrantRule) MarshalJSON added in v0.63.0

func (s AuthorizationDetailsGrantRule) MarshalJSON() ([]byte, error)

func (*AuthorizationDetailsGrantRule) UnmarshalJSON added in v0.63.0

func (s *AuthorizationDetailsGrantRule) UnmarshalJSON(b []byte) error

type CreateDashboardRequest added in v0.35.0

type CreateDashboardRequest struct {
	Dashboard Dashboard `json:"dashboard"`
}

type CreateScheduleRequest added in v0.43.0

type CreateScheduleRequest struct {
	// UUID identifying the dashboard to which the schedule belongs.
	DashboardId string `json:"-" url:"-"`
	// The schedule to create. A dashboard is limited to 10 schedules.
	Schedule Schedule `json:"schedule"`
}

type CreateSubscriptionRequest added in v0.43.0

type CreateSubscriptionRequest struct {
	// UUID identifying the dashboard to which the subscription belongs.
	DashboardId string `json:"-" url:"-"`
	// UUID identifying the schedule to which the subscription belongs.
	ScheduleId string `json:"-" url:"-"`
	// The subscription to create. A schedule is limited to 100 subscriptions.
	Subscription Subscription `json:"subscription"`
}

type CronSchedule added in v0.43.0

type CronSchedule struct {
	// A cron expression using quartz syntax. EX: `0 0 8 * * ?` represents
	// everyday at 8am. See [Cron Trigger] for details.
	//
	// [Cron Trigger]: http://www.quartz-scheduler.org/documentation/quartz-2.3.0/tutorials/crontrigger.html
	QuartzCronExpression string `json:"quartz_cron_expression"`
	// A Java timezone id. The schedule will be resolved with respect to this
	// timezone. See [Java TimeZone] for details.
	//
	// [Java TimeZone]: https://docs.oracle.com/javase/7/docs/api/java/util/TimeZone.html
	TimezoneId string `json:"timezone_id"`
}

type Dashboard added in v0.35.0

type Dashboard struct {
	// The timestamp of when the dashboard was created.
	CreateTime string `json:"create_time,omitempty"`
	// UUID identifying the dashboard.
	DashboardId string `json:"dashboard_id,omitempty"`
	// The display name of the dashboard.
	DisplayName string `json:"display_name,omitempty"`
	// The etag for the dashboard. Can be optionally provided on updates to
	// ensure that the dashboard has not been modified since the last read. This
	// field is excluded in List Dashboards responses.
	Etag string `json:"etag,omitempty"`
	// The state of the dashboard resource. Used for tracking trashed status.
	LifecycleState LifecycleState `json:"lifecycle_state,omitempty"`
	// The workspace path of the folder containing the dashboard. Includes
	// leading slash and no trailing slash. This field is excluded in List
	// Dashboards responses.
	ParentPath string `json:"parent_path,omitempty"`
	// The workspace path of the dashboard asset, including the file name.
	// Exported dashboards always have the file extension `.lvdash.json`. This
	// field is excluded in List Dashboards responses.
	Path string `json:"path,omitempty"`
	// The contents of the dashboard in serialized string form. This field is
	// excluded in List Dashboards responses. Use the [get dashboard API] to
	// retrieve an example response, which includes the `serialized_dashboard`
	// field. This field provides the structure of the JSON string that
	// represents the dashboard's layout and components.
	//
	// [get dashboard API]: https://docs.databricks.com/api/workspace/lakeview/get
	SerializedDashboard string `json:"serialized_dashboard,omitempty"`
	// The timestamp of when the dashboard was last updated by the user. This
	// field is excluded in List Dashboards responses.
	UpdateTime string `json:"update_time,omitempty"`
	// The warehouse ID used to run the dashboard.
	WarehouseId string `json:"warehouse_id,omitempty"`

	ForceSendFields []string `json:"-" url:"-"`
}

func (Dashboard) MarshalJSON added in v0.35.0

func (s Dashboard) MarshalJSON() ([]byte, error)

func (*Dashboard) UnmarshalJSON added in v0.35.0

func (s *Dashboard) UnmarshalJSON(b []byte) error

type DashboardView added in v0.43.0

type DashboardView string
const DashboardViewDashboardViewBasic DashboardView = `DASHBOARD_VIEW_BASIC`

func (*DashboardView) Set added in v0.43.0

func (f *DashboardView) Set(v string) error

Set raw string value and validate it against allowed values

func (*DashboardView) String added in v0.43.0

func (f *DashboardView) String() string

String representation for fmt.Print

func (*DashboardView) Type added in v0.43.0

func (f *DashboardView) Type() string

Type always returns DashboardView to satisfy [pflag.Value] interface

func (*DashboardView) Values added in v0.72.0

func (f *DashboardView) Values() []DashboardView

Values returns all possible values for DashboardView.

There is no guarantee on the order of the values in the slice.

type DeleteScheduleRequest added in v0.43.0

type DeleteScheduleRequest struct {
	// UUID identifying the dashboard to which the schedule belongs.
	DashboardId string `json:"-" url:"-"`
	// The etag for the schedule. Optionally, it can be provided to verify that
	// the schedule has not been modified from its last retrieval.
	Etag string `json:"-" url:"etag,omitempty"`
	// UUID identifying the schedule.
	ScheduleId string `json:"-" url:"-"`

	ForceSendFields []string `json:"-" url:"-"`
}

func (DeleteScheduleRequest) MarshalJSON added in v0.43.0

func (s DeleteScheduleRequest) MarshalJSON() ([]byte, error)

func (*DeleteScheduleRequest) UnmarshalJSON added in v0.43.0

func (s *DeleteScheduleRequest) UnmarshalJSON(b []byte) error

type DeleteSubscriptionRequest added in v0.43.0

type DeleteSubscriptionRequest struct {
	// UUID identifying the dashboard which the subscription belongs.
	DashboardId string `json:"-" url:"-"`
	// The etag for the subscription. Can be optionally provided to ensure that
	// the subscription has not been modified since the last read.
	Etag string `json:"-" url:"etag,omitempty"`
	// UUID identifying the schedule which the subscription belongs.
	ScheduleId string `json:"-" url:"-"`
	// UUID identifying the subscription.
	SubscriptionId string `json:"-" url:"-"`

	ForceSendFields []string `json:"-" url:"-"`
}

func (DeleteSubscriptionRequest) MarshalJSON added in v0.43.0

func (s DeleteSubscriptionRequest) MarshalJSON() ([]byte, error)

func (*DeleteSubscriptionRequest) UnmarshalJSON added in v0.43.0

func (s *DeleteSubscriptionRequest) UnmarshalJSON(b []byte) error

type GenieAPI added in v0.44.0

type GenieAPI struct {
	// contains filtered or unexported fields
}

Genie provides a no-code experience for business users, powered by AI/BI. Analysts set up spaces that business users can use to ask questions using natural language. Genie uses data registered to Unity Catalog and requires at least CAN USE permission on a Pro or Serverless SQL warehouse. Also, Databricks Assistant must be enabled.

func NewGenie added in v0.44.0

func NewGenie(client *client.DatabricksClient) *GenieAPI

func (*GenieAPI) CreateMessage added in v0.44.0

func (a *GenieAPI) CreateMessage(ctx context.Context, genieCreateConversationMessageRequest GenieCreateConversationMessageRequest) (*WaitGetMessageGenieCompleted[GenieMessage], error)

Create new message in a [conversation](:method:genie/startconversation). The AI response uses all previously created messages in the conversation to respond.

func (*GenieAPI) CreateMessageAndWait deprecated added in v0.44.0

func (a *GenieAPI) CreateMessageAndWait(ctx context.Context, genieCreateConversationMessageRequest GenieCreateConversationMessageRequest, options ...retries.Option[GenieMessage]) (*GenieMessage, error)

Calls GenieAPI.CreateMessage and waits to reach COMPLETED state

You can override the default timeout of 20 minutes by calling adding retries.Timeout[GenieMessage](60*time.Minute) functional option.

Deprecated: use GenieAPI.CreateMessage.Get() or GenieAPI.WaitGetMessageGenieCompleted

func (*GenieAPI) DeleteConversation added in v0.74.0

func (a *GenieAPI) DeleteConversation(ctx context.Context, request GenieDeleteConversationRequest) error

func (*GenieAPI) DeleteConversationBySpaceIdAndConversationId added in v0.74.0

func (a *GenieAPI) DeleteConversationBySpaceIdAndConversationId(ctx context.Context, spaceId string, conversationId string) error

Delete a conversation.

func (*GenieAPI) ExecuteMessageAttachmentQuery added in v0.60.0

func (a *GenieAPI) ExecuteMessageAttachmentQuery(ctx context.Context, request GenieExecuteMessageAttachmentQueryRequest) (*GenieGetMessageQueryResultResponse, error)

func (*GenieAPI) ExecuteMessageQuery added in v0.44.0

func (a *GenieAPI) ExecuteMessageQuery(ctx context.Context, request GenieExecuteMessageQueryRequest) (*GenieGetMessageQueryResultResponse, error)

func (*GenieAPI) GetMessage added in v0.44.0

func (a *GenieAPI) GetMessage(ctx context.Context, request GenieGetConversationMessageRequest) (*GenieMessage, error)

func (*GenieAPI) GetMessageAttachmentQueryResult added in v0.60.0

func (a *GenieAPI) GetMessageAttachmentQueryResult(ctx context.Context, request GenieGetMessageAttachmentQueryResultRequest) (*GenieGetMessageQueryResultResponse, error)

func (*GenieAPI) GetMessageAttachmentQueryResultBySpaceIdAndConversationIdAndMessageIdAndAttachmentId added in v0.60.0

func (a *GenieAPI) GetMessageAttachmentQueryResultBySpaceIdAndConversationIdAndMessageIdAndAttachmentId(ctx context.Context, spaceId string, conversationId string, messageId string, attachmentId string) (*GenieGetMessageQueryResultResponse, error)

Get the result of SQL query if the message has a query attachment. This is only available if a message has a query attachment and the message status is `EXECUTING_QUERY` OR `COMPLETED`.

func (*GenieAPI) GetMessageBySpaceIdAndConversationIdAndMessageId added in v0.44.0

func (a *GenieAPI) GetMessageBySpaceIdAndConversationIdAndMessageId(ctx context.Context, spaceId string, conversationId string, messageId string) (*GenieMessage, error)

Get message from conversation.

func (*GenieAPI) GetMessageQueryResult added in v0.44.0

func (a *GenieAPI) GetMessageQueryResult(ctx context.Context, request GenieGetMessageQueryResultRequest) (*GenieGetMessageQueryResultResponse, error)

func (*GenieAPI) GetMessageQueryResultByAttachment added in v0.58.0

func (a *GenieAPI) GetMessageQueryResultByAttachment(ctx context.Context, request GenieGetQueryResultByAttachmentRequest) (*GenieGetMessageQueryResultResponse, error)

func (*GenieAPI) GetMessageQueryResultByAttachmentBySpaceIdAndConversationIdAndMessageIdAndAttachmentId added in v0.58.0

func (a *GenieAPI) GetMessageQueryResultByAttachmentBySpaceIdAndConversationIdAndMessageIdAndAttachmentId(ctx context.Context, spaceId string, conversationId string, messageId string, attachmentId string) (*GenieGetMessageQueryResultResponse, error)

Get the result of SQL query if the message has a query attachment. This is only available if a message has a query attachment and the message status is `EXECUTING_QUERY` OR `COMPLETED`.

func (*GenieAPI) GetMessageQueryResultBySpaceIdAndConversationIdAndMessageId added in v0.44.0

func (a *GenieAPI) GetMessageQueryResultBySpaceIdAndConversationIdAndMessageId(ctx context.Context, spaceId string, conversationId string, messageId string) (*GenieGetMessageQueryResultResponse, error)

Get the result of SQL query if the message has a query attachment. This is only available if a message has a query attachment and the message status is `EXECUTING_QUERY`.

func (*GenieAPI) GetSpace added in v0.59.0

func (a *GenieAPI) GetSpace(ctx context.Context, request GenieGetSpaceRequest) (*GenieSpace, error)

func (*GenieAPI) GetSpaceBySpaceId added in v0.59.0

func (a *GenieAPI) GetSpaceBySpaceId(ctx context.Context, spaceId string) (*GenieSpace, error)

Get details of a Genie Space.

func (*GenieAPI) ListConversations added in v0.74.0

func (a *GenieAPI) ListConversations(ctx context.Context, request GenieListConversationsRequest) (*GenieListConversationsResponse, error)

func (*GenieAPI) ListConversationsBySpaceId added in v0.74.0

func (a *GenieAPI) ListConversationsBySpaceId(ctx context.Context, spaceId string) (*GenieListConversationsResponse, error)

Get a list of conversations in a Genie Space.

func (*GenieAPI) ListSpaces added in v0.72.0

func (a *GenieAPI) ListSpaces(ctx context.Context, request GenieListSpacesRequest) (*GenieListSpacesResponse, error)

func (*GenieAPI) StartConversation added in v0.44.0

func (a *GenieAPI) StartConversation(ctx context.Context, genieStartConversationMessageRequest GenieStartConversationMessageRequest) (*WaitGetMessageGenieCompleted[GenieStartConversationResponse], error)

Start a new conversation.

func (*GenieAPI) StartConversationAndWait deprecated added in v0.44.0

func (a *GenieAPI) StartConversationAndWait(ctx context.Context, genieStartConversationMessageRequest GenieStartConversationMessageRequest, options ...retries.Option[GenieMessage]) (*GenieMessage, error)

Calls GenieAPI.StartConversation and waits to reach COMPLETED state

You can override the default timeout of 20 minutes by calling adding retries.Timeout[GenieMessage](60*time.Minute) functional option.

Deprecated: use GenieAPI.StartConversation.Get() or GenieAPI.WaitGetMessageGenieCompleted

func (*GenieAPI) TrashSpace added in v0.74.0

func (a *GenieAPI) TrashSpace(ctx context.Context, request GenieTrashSpaceRequest) error

func (*GenieAPI) TrashSpaceBySpaceId added in v0.74.0

func (a *GenieAPI) TrashSpaceBySpaceId(ctx context.Context, spaceId string) error

Move a Genie Space to the trash.

func (*GenieAPI) WaitGetMessageGenieCompleted added in v0.44.0

func (a *GenieAPI) WaitGetMessageGenieCompleted(ctx context.Context, conversationId string, messageId string, spaceId string,
	timeout time.Duration, callback func(*GenieMessage)) (*GenieMessage, error)

WaitGetMessageGenieCompleted repeatedly calls GenieAPI.GetMessage and waits to reach COMPLETED state

type GenieAttachment added in v0.44.0

type GenieAttachment struct {
	// Attachment ID
	AttachmentId string `json:"attachment_id,omitempty"`
	// Query Attachment if Genie responds with a SQL query
	Query *GenieQueryAttachment `json:"query,omitempty"`
	// Text Attachment if Genie responds with text
	Text *TextAttachment `json:"text,omitempty"`

	ForceSendFields []string `json:"-" url:"-"`
}

Genie AI Response

func (GenieAttachment) MarshalJSON added in v0.59.0

func (s GenieAttachment) MarshalJSON() ([]byte, error)

func (*GenieAttachment) UnmarshalJSON added in v0.59.0

func (s *GenieAttachment) UnmarshalJSON(b []byte) error

type GenieConversation added in v0.44.0

type GenieConversation struct {
	// Conversation ID
	ConversationId string `json:"conversation_id"`
	// Timestamp when the message was created
	CreatedTimestamp int64 `json:"created_timestamp,omitempty"`
	// Conversation ID. Legacy identifier, use conversation_id instead
	Id string `json:"id"`
	// Timestamp when the message was last updated
	LastUpdatedTimestamp int64 `json:"last_updated_timestamp,omitempty"`
	// Genie space ID
	SpaceId string `json:"space_id"`
	// Conversation title
	Title string `json:"title"`
	// ID of the user who created the conversation
	UserId int `json:"user_id"`

	ForceSendFields []string `json:"-" url:"-"`
}

func (GenieConversation) MarshalJSON added in v0.44.0

func (s GenieConversation) MarshalJSON() ([]byte, error)

func (*GenieConversation) UnmarshalJSON added in v0.44.0

func (s *GenieConversation) UnmarshalJSON(b []byte) error

type GenieConversationSummary added in v0.74.0

type GenieConversationSummary struct {
	ConversationId string `json:"conversation_id"`

	CreatedTimestamp int64 `json:"created_timestamp"`

	Title string `json:"title"`
}

type GenieCreateConversationMessageRequest added in v0.44.0

type GenieCreateConversationMessageRequest struct {
	// User message content.
	Content string `json:"content"`
	// The ID associated with the conversation.
	ConversationId string `json:"-" url:"-"`
	// The ID associated with the Genie space where the conversation is started.
	SpaceId string `json:"-" url:"-"`
}

type GenieDeleteConversationRequest added in v0.74.0

type GenieDeleteConversationRequest struct {
	// The ID of the conversation to delete.
	ConversationId string `json:"-" url:"-"`
	// The ID associated with the Genie space where the conversation is located.
	SpaceId string `json:"-" url:"-"`
}

type GenieExecuteMessageAttachmentQueryRequest added in v0.60.0

type GenieExecuteMessageAttachmentQueryRequest struct {
	// Attachment ID
	AttachmentId string `json:"-" url:"-"`
	// Conversation ID
	ConversationId string `json:"-" url:"-"`
	// Message ID
	MessageId string `json:"-" url:"-"`
	// Genie space ID
	SpaceId string `json:"-" url:"-"`
}

type GenieExecuteMessageQueryRequest added in v0.50.0

type GenieExecuteMessageQueryRequest struct {
	// Conversation ID
	ConversationId string `json:"-" url:"-"`
	// Message ID
	MessageId string `json:"-" url:"-"`
	// Genie space ID
	SpaceId string `json:"-" url:"-"`
}

type GenieGetConversationMessageRequest added in v0.44.0

type GenieGetConversationMessageRequest struct {
	// The ID associated with the target conversation.
	ConversationId string `json:"-" url:"-"`
	// The ID associated with the target message from the identified
	// conversation.
	MessageId string `json:"-" url:"-"`
	// The ID associated with the Genie space where the target conversation is
	// located.
	SpaceId string `json:"-" url:"-"`
}

type GenieGetMessageAttachmentQueryResultRequest added in v0.60.0

type GenieGetMessageAttachmentQueryResultRequest struct {
	// Attachment ID
	AttachmentId string `json:"-" url:"-"`
	// Conversation ID
	ConversationId string `json:"-" url:"-"`
	// Message ID
	MessageId string `json:"-" url:"-"`
	// Genie space ID
	SpaceId string `json:"-" url:"-"`
}

type GenieGetMessageQueryResultRequest added in v0.44.0

type GenieGetMessageQueryResultRequest struct {
	// Conversation ID
	ConversationId string `json:"-" url:"-"`
	// Message ID
	MessageId string `json:"-" url:"-"`
	// Genie space ID
	SpaceId string `json:"-" url:"-"`
}

type GenieGetMessageQueryResultResponse added in v0.44.0

type GenieGetMessageQueryResultResponse struct {
	// SQL Statement Execution response. See [Get status, manifest, and result
	// first chunk](:method:statementexecution/getstatement) for more details.
	StatementResponse *sql.StatementResponse `json:"statement_response,omitempty"`
}

type GenieGetQueryResultByAttachmentRequest added in v0.58.0

type GenieGetQueryResultByAttachmentRequest struct {
	// Attachment ID
	AttachmentId string `json:"-" url:"-"`
	// Conversation ID
	ConversationId string `json:"-" url:"-"`
	// Message ID
	MessageId string `json:"-" url:"-"`
	// Genie space ID
	SpaceId string `json:"-" url:"-"`
}

type GenieGetSpaceRequest added in v0.59.0

type GenieGetSpaceRequest struct {
	// The ID associated with the Genie space
	SpaceId string `json:"-" url:"-"`
}

type GenieInterface added in v0.44.0

type GenieInterface interface {

	// WaitGetMessageGenieCompleted repeatedly calls [GenieAPI.GetMessage] and waits to reach COMPLETED state
	WaitGetMessageGenieCompleted(ctx context.Context, conversationId string, messageId string, spaceId string,
		timeout time.Duration, callback func(*GenieMessage)) (*GenieMessage, error)

	// Create new message in a [conversation](:method:genie/startconversation). The
	// AI response uses all previously created messages in the conversation to
	// respond.
	CreateMessage(ctx context.Context, genieCreateConversationMessageRequest GenieCreateConversationMessageRequest) (*WaitGetMessageGenieCompleted[GenieMessage], error)

	// Calls [GenieAPIInterface.CreateMessage] and waits to reach COMPLETED state
	//
	// You can override the default timeout of 20 minutes by calling adding
	// retries.Timeout[GenieMessage](60*time.Minute) functional option.
	//
	// Deprecated: use [GenieAPIInterface.CreateMessage].Get() or [GenieAPIInterface.WaitGetMessageGenieCompleted]
	CreateMessageAndWait(ctx context.Context, genieCreateConversationMessageRequest GenieCreateConversationMessageRequest, options ...retries.Option[GenieMessage]) (*GenieMessage, error)

	// Delete a conversation.
	DeleteConversation(ctx context.Context, request GenieDeleteConversationRequest) error

	// Delete a conversation.
	DeleteConversationBySpaceIdAndConversationId(ctx context.Context, spaceId string, conversationId string) error

	// Execute the SQL for a message query attachment. Use this API when the query
	// attachment has expired and needs to be re-executed.
	ExecuteMessageAttachmentQuery(ctx context.Context, request GenieExecuteMessageAttachmentQueryRequest) (*GenieGetMessageQueryResultResponse, error)

	// Execute the SQL query in the message.
	ExecuteMessageQuery(ctx context.Context, request GenieExecuteMessageQueryRequest) (*GenieGetMessageQueryResultResponse, error)

	// Get message from conversation.
	GetMessage(ctx context.Context, request GenieGetConversationMessageRequest) (*GenieMessage, error)

	// Get message from conversation.
	GetMessageBySpaceIdAndConversationIdAndMessageId(ctx context.Context, spaceId string, conversationId string, messageId string) (*GenieMessage, error)

	// Get the result of SQL query if the message has a query attachment. This is
	// only available if a message has a query attachment and the message status is
	// `EXECUTING_QUERY` OR `COMPLETED`.
	GetMessageAttachmentQueryResult(ctx context.Context, request GenieGetMessageAttachmentQueryResultRequest) (*GenieGetMessageQueryResultResponse, error)

	// Get the result of SQL query if the message has a query attachment. This is
	// only available if a message has a query attachment and the message status is
	// `EXECUTING_QUERY` OR `COMPLETED`.
	GetMessageAttachmentQueryResultBySpaceIdAndConversationIdAndMessageIdAndAttachmentId(ctx context.Context, spaceId string, conversationId string, messageId string, attachmentId string) (*GenieGetMessageQueryResultResponse, error)

	// Get the result of SQL query if the message has a query attachment. This is
	// only available if a message has a query attachment and the message status is
	// `EXECUTING_QUERY`.
	GetMessageQueryResult(ctx context.Context, request GenieGetMessageQueryResultRequest) (*GenieGetMessageQueryResultResponse, error)

	// Get the result of SQL query if the message has a query attachment. This is
	// only available if a message has a query attachment and the message status is
	// `EXECUTING_QUERY`.
	GetMessageQueryResultBySpaceIdAndConversationIdAndMessageId(ctx context.Context, spaceId string, conversationId string, messageId string) (*GenieGetMessageQueryResultResponse, error)

	// Get the result of SQL query if the message has a query attachment. This is
	// only available if a message has a query attachment and the message status is
	// `EXECUTING_QUERY` OR `COMPLETED`.
	GetMessageQueryResultByAttachment(ctx context.Context, request GenieGetQueryResultByAttachmentRequest) (*GenieGetMessageQueryResultResponse, error)

	// Get the result of SQL query if the message has a query attachment. This is
	// only available if a message has a query attachment and the message status is
	// `EXECUTING_QUERY` OR `COMPLETED`.
	GetMessageQueryResultByAttachmentBySpaceIdAndConversationIdAndMessageIdAndAttachmentId(ctx context.Context, spaceId string, conversationId string, messageId string, attachmentId string) (*GenieGetMessageQueryResultResponse, error)

	// Get details of a Genie Space.
	GetSpace(ctx context.Context, request GenieGetSpaceRequest) (*GenieSpace, error)

	// Get details of a Genie Space.
	GetSpaceBySpaceId(ctx context.Context, spaceId string) (*GenieSpace, error)

	// Get a list of conversations in a Genie Space.
	ListConversations(ctx context.Context, request GenieListConversationsRequest) (*GenieListConversationsResponse, error)

	// Get a list of conversations in a Genie Space.
	ListConversationsBySpaceId(ctx context.Context, spaceId string) (*GenieListConversationsResponse, error)

	// Get list of Genie Spaces.
	ListSpaces(ctx context.Context, request GenieListSpacesRequest) (*GenieListSpacesResponse, error)

	// Start a new conversation.
	StartConversation(ctx context.Context, genieStartConversationMessageRequest GenieStartConversationMessageRequest) (*WaitGetMessageGenieCompleted[GenieStartConversationResponse], error)

	// Calls [GenieAPIInterface.StartConversation] and waits to reach COMPLETED state
	//
	// You can override the default timeout of 20 minutes by calling adding
	// retries.Timeout[GenieMessage](60*time.Minute) functional option.
	//
	// Deprecated: use [GenieAPIInterface.StartConversation].Get() or [GenieAPIInterface.WaitGetMessageGenieCompleted]
	StartConversationAndWait(ctx context.Context, genieStartConversationMessageRequest GenieStartConversationMessageRequest, options ...retries.Option[GenieMessage]) (*GenieMessage, error)

	// Move a Genie Space to the trash.
	TrashSpace(ctx context.Context, request GenieTrashSpaceRequest) error

	// Move a Genie Space to the trash.
	TrashSpaceBySpaceId(ctx context.Context, spaceId string) error
}

type GenieListConversationsRequest added in v0.74.0

type GenieListConversationsRequest struct {
	// Maximum number of conversations to return per page
	PageSize int `json:"-" url:"page_size,omitempty"`
	// Token to get the next page of results
	PageToken string `json:"-" url:"page_token,omitempty"`
	// The ID of the Genie space to retrieve conversations from.
	SpaceId string `json:"-" url:"-"`

	ForceSendFields []string `json:"-" url:"-"`
}

func (GenieListConversationsRequest) MarshalJSON added in v0.74.0

func (s GenieListConversationsRequest) MarshalJSON() ([]byte, error)

func (*GenieListConversationsRequest) UnmarshalJSON added in v0.74.0

func (s *GenieListConversationsRequest) UnmarshalJSON(b []byte) error

type GenieListConversationsResponse added in v0.74.0

type GenieListConversationsResponse struct {
	// List of conversations in the Genie space
	Conversations []GenieConversationSummary `json:"conversations,omitempty"`
	// Token to get the next page of results
	NextPageToken string `json:"next_page_token,omitempty"`

	ForceSendFields []string `json:"-" url:"-"`
}

func (GenieListConversationsResponse) MarshalJSON added in v0.74.0

func (s GenieListConversationsResponse) MarshalJSON() ([]byte, error)

func (*GenieListConversationsResponse) UnmarshalJSON added in v0.74.0

func (s *GenieListConversationsResponse) UnmarshalJSON(b []byte) error

type GenieListSpacesRequest added in v0.72.0

type GenieListSpacesRequest struct {
	// Maximum number of spaces to return per page
	PageSize int `json:"-" url:"page_size,omitempty"`
	// Pagination token for getting the next page of results
	PageToken string `json:"-" url:"page_token,omitempty"`

	ForceSendFields []string `json:"-" url:"-"`
}

func (GenieListSpacesRequest) MarshalJSON added in v0.72.0

func (s GenieListSpacesRequest) MarshalJSON() ([]byte, error)

func (*GenieListSpacesRequest) UnmarshalJSON added in v0.72.0

func (s *GenieListSpacesRequest) UnmarshalJSON(b []byte) error

type GenieListSpacesResponse added in v0.72.0

type GenieListSpacesResponse struct {
	// Token to get the next page of results
	NextPageToken string `json:"next_page_token,omitempty"`
	// List of Genie spaces
	Spaces []GenieSpace `json:"spaces,omitempty"`

	ForceSendFields []string `json:"-" url:"-"`
}

func (GenieListSpacesResponse) MarshalJSON added in v0.72.0

func (s GenieListSpacesResponse) MarshalJSON() ([]byte, error)

func (*GenieListSpacesResponse) UnmarshalJSON added in v0.72.0

func (s *GenieListSpacesResponse) UnmarshalJSON(b []byte) error

type GenieMessage added in v0.44.0

type GenieMessage struct {
	// AI-generated response to the message
	Attachments []GenieAttachment `json:"attachments,omitempty"`
	// User message content
	Content string `json:"content"`
	// Conversation ID
	ConversationId string `json:"conversation_id"`
	// Timestamp when the message was created
	CreatedTimestamp int64 `json:"created_timestamp,omitempty"`
	// Error message if Genie failed to respond to the message
	Error *MessageError `json:"error,omitempty"`
	// Message ID. Legacy identifier, use message_id instead
	Id string `json:"id"`
	// Timestamp when the message was last updated
	LastUpdatedTimestamp int64 `json:"last_updated_timestamp,omitempty"`
	// Message ID
	MessageId string `json:"message_id"`
	// The result of SQL query if the message includes a query attachment.
	// Deprecated. Use `query_result_metadata` in `GenieQueryAttachment`
	// instead.
	QueryResult *Result `json:"query_result,omitempty"`
	// Genie space ID
	SpaceId string `json:"space_id"`

	Status MessageStatus `json:"status,omitempty"`
	// ID of the user who created the message
	UserId int64 `json:"user_id,omitempty"`

	ForceSendFields []string `json:"-" url:"-"`
}

func (GenieMessage) MarshalJSON added in v0.44.0

func (s GenieMessage) MarshalJSON() ([]byte, error)

func (*GenieMessage) UnmarshalJSON added in v0.44.0

func (s *GenieMessage) UnmarshalJSON(b []byte) error

type GenieQueryAttachment added in v0.59.0

type GenieQueryAttachment struct {
	// Description of the query
	Description string `json:"description,omitempty"`

	Id string `json:"id,omitempty"`
	// Time when the user updated the query last
	LastUpdatedTimestamp int64 `json:"last_updated_timestamp,omitempty"`
	// AI generated SQL query
	Query string `json:"query,omitempty"`
	// Metadata associated with the query result.
	QueryResultMetadata *GenieResultMetadata `json:"query_result_metadata,omitempty"`
	// Statement Execution API statement id. Use [Get status, manifest, and
	// result first chunk](:method:statementexecution/getstatement) to get the
	// full result data.
	StatementId string `json:"statement_id,omitempty"`
	// Name of the query
	Title string `json:"title,omitempty"`

	ForceSendFields []string `json:"-" url:"-"`
}

func (GenieQueryAttachment) MarshalJSON added in v0.59.0

func (s GenieQueryAttachment) MarshalJSON() ([]byte, error)

func (*GenieQueryAttachment) UnmarshalJSON added in v0.59.0

func (s *GenieQueryAttachment) UnmarshalJSON(b []byte) error

type GenieResultMetadata added in v0.59.0

type GenieResultMetadata struct {
	// Indicates whether the result set is truncated.
	IsTruncated bool `json:"is_truncated,omitempty"`
	// The number of rows in the result set.
	RowCount int64 `json:"row_count,omitempty"`

	ForceSendFields []string `json:"-" url:"-"`
}

func (GenieResultMetadata) MarshalJSON added in v0.59.0

func (s GenieResultMetadata) MarshalJSON() ([]byte, error)

func (*GenieResultMetadata) UnmarshalJSON added in v0.59.0

func (s *GenieResultMetadata) UnmarshalJSON(b []byte) error

type GenieService deprecated added in v0.44.0

type GenieService interface {

	// Create new message in a [conversation](:method:genie/startconversation).
	// The AI response uses all previously created messages in the conversation
	// to respond.
	CreateMessage(ctx context.Context, request GenieCreateConversationMessageRequest) (*GenieMessage, error)

	// Delete a conversation.
	DeleteConversation(ctx context.Context, request GenieDeleteConversationRequest) error

	// Execute the SQL for a message query attachment. Use this API when the
	// query attachment has expired and needs to be re-executed.
	ExecuteMessageAttachmentQuery(ctx context.Context, request GenieExecuteMessageAttachmentQueryRequest) (*GenieGetMessageQueryResultResponse, error)

	// Execute the SQL query in the message.
	ExecuteMessageQuery(ctx context.Context, request GenieExecuteMessageQueryRequest) (*GenieGetMessageQueryResultResponse, error)

	// Get message from conversation.
	GetMessage(ctx context.Context, request GenieGetConversationMessageRequest) (*GenieMessage, error)

	// Get the result of SQL query if the message has a query attachment. This
	// is only available if a message has a query attachment and the message
	// status is `EXECUTING_QUERY` OR `COMPLETED`.
	GetMessageAttachmentQueryResult(ctx context.Context, request GenieGetMessageAttachmentQueryResultRequest) (*GenieGetMessageQueryResultResponse, error)

	// Get the result of SQL query if the message has a query attachment. This
	// is only available if a message has a query attachment and the message
	// status is `EXECUTING_QUERY`.
	GetMessageQueryResult(ctx context.Context, request GenieGetMessageQueryResultRequest) (*GenieGetMessageQueryResultResponse, error)

	// Get the result of SQL query if the message has a query attachment. This
	// is only available if a message has a query attachment and the message
	// status is `EXECUTING_QUERY` OR `COMPLETED`.
	GetMessageQueryResultByAttachment(ctx context.Context, request GenieGetQueryResultByAttachmentRequest) (*GenieGetMessageQueryResultResponse, error)

	// Get details of a Genie Space.
	GetSpace(ctx context.Context, request GenieGetSpaceRequest) (*GenieSpace, error)

	// Get a list of conversations in a Genie Space.
	ListConversations(ctx context.Context, request GenieListConversationsRequest) (*GenieListConversationsResponse, error)

	// Get list of Genie Spaces.
	ListSpaces(ctx context.Context, request GenieListSpacesRequest) (*GenieListSpacesResponse, error)

	// Start a new conversation.
	StartConversation(ctx context.Context, request GenieStartConversationMessageRequest) (*GenieStartConversationResponse, error)

	// Move a Genie Space to the trash.
	TrashSpace(ctx context.Context, request GenieTrashSpaceRequest) error
}

Genie provides a no-code experience for business users, powered by AI/BI. Analysts set up spaces that business users can use to ask questions using natural language. Genie uses data registered to Unity Catalog and requires at least CAN USE permission on a Pro or Serverless SQL warehouse. Also, Databricks Assistant must be enabled.

Deprecated: Do not use this interface, it will be removed in a future version of the SDK.

type GenieSpace added in v0.59.0

type GenieSpace struct {
	// Description of the Genie Space
	Description string `json:"description,omitempty"`
	// Genie space ID
	SpaceId string `json:"space_id"`
	// Title of the Genie Space
	Title string `json:"title"`

	ForceSendFields []string `json:"-" url:"-"`
}

func (GenieSpace) MarshalJSON added in v0.59.0

func (s GenieSpace) MarshalJSON() ([]byte, error)

func (*GenieSpace) UnmarshalJSON added in v0.59.0

func (s *GenieSpace) UnmarshalJSON(b []byte) error

type GenieStartConversationMessageRequest added in v0.44.0

type GenieStartConversationMessageRequest struct {
	// The text of the message that starts the conversation.
	Content string `json:"content"`
	// The ID associated with the Genie space where you want to start a
	// conversation.
	SpaceId string `json:"-" url:"-"`
}

type GenieStartConversationResponse added in v0.44.0

type GenieStartConversationResponse struct {
	Conversation *GenieConversation `json:"conversation,omitempty"`
	// Conversation ID
	ConversationId string `json:"conversation_id"`

	Message *GenieMessage `json:"message,omitempty"`
	// Message ID
	MessageId string `json:"message_id"`
}

type GenieTrashSpaceRequest added in v0.74.0

type GenieTrashSpaceRequest struct {
	// The ID associated with the Genie space to be sent to the trash.
	SpaceId string `json:"-" url:"-"`
}

type GetDashboardRequest added in v0.36.0

type GetDashboardRequest struct {
	// UUID identifying the dashboard.
	DashboardId string `json:"-" url:"-"`
}

type GetPublishedDashboardRequest added in v0.36.0

type GetPublishedDashboardRequest struct {
	// UUID identifying the published dashboard.
	DashboardId string `json:"-" url:"-"`
}

type GetPublishedDashboardTokenInfoRequest added in v0.63.0

type GetPublishedDashboardTokenInfoRequest struct {
	// UUID identifying the published dashboard.
	DashboardId string `json:"-" url:"-"`
	// Provided external value to be included in the custom claim.
	ExternalValue string `json:"-" url:"external_value,omitempty"`
	// Provided external viewer id to be included in the custom claim.
	ExternalViewerId string `json:"-" url:"external_viewer_id,omitempty"`

	ForceSendFields []string `json:"-" url:"-"`
}

func (GetPublishedDashboardTokenInfoRequest) MarshalJSON added in v0.63.0

func (s GetPublishedDashboardTokenInfoRequest) MarshalJSON() ([]byte, error)

func (*GetPublishedDashboardTokenInfoRequest) UnmarshalJSON added in v0.63.0

func (s *GetPublishedDashboardTokenInfoRequest) UnmarshalJSON(b []byte) error

type GetPublishedDashboardTokenInfoResponse added in v0.63.0

type GetPublishedDashboardTokenInfoResponse struct {
	// Authorization constraints for accessing the published dashboard.
	// Currently includes `workspace_rule_set` and could be enriched with
	// `unity_catalog_privileges` before oAuth token generation.
	AuthorizationDetails []AuthorizationDetails `json:"authorization_details,omitempty"`
	// Custom claim generated from external_value and external_viewer_id.
	// Format:
	// `urn:aibi:external_data:<external_value>:<external_viewer_id>:<dashboard_id>`
	CustomClaim string `json:"custom_claim,omitempty"`
	// Scope defining access permissions.
	Scope string `json:"scope,omitempty"`

	ForceSendFields []string `json:"-" url:"-"`
}

func (GetPublishedDashboardTokenInfoResponse) MarshalJSON added in v0.63.0

func (s GetPublishedDashboardTokenInfoResponse) MarshalJSON() ([]byte, error)

func (*GetPublishedDashboardTokenInfoResponse) UnmarshalJSON added in v0.63.0

func (s *GetPublishedDashboardTokenInfoResponse) UnmarshalJSON(b []byte) error

type GetScheduleRequest added in v0.43.0

type GetScheduleRequest struct {
	// UUID identifying the dashboard to which the schedule belongs.
	DashboardId string `json:"-" url:"-"`
	// UUID identifying the schedule.
	ScheduleId string `json:"-" url:"-"`
}

type GetSubscriptionRequest added in v0.43.0

type GetSubscriptionRequest struct {
	// UUID identifying the dashboard which the subscription belongs.
	DashboardId string `json:"-" url:"-"`
	// UUID identifying the schedule which the subscription belongs.
	ScheduleId string `json:"-" url:"-"`
	// UUID identifying the subscription.
	SubscriptionId string `json:"-" url:"-"`
}

type LakeviewAPI

type LakeviewAPI struct {
	// contains filtered or unexported fields
}

These APIs provide specific management operations for Lakeview dashboards. Generic resource management can be done with Workspace API (import, export, get-status, list, delete).

func NewLakeview

func NewLakeview(client *client.DatabricksClient) *LakeviewAPI

func (*LakeviewAPI) Create added in v0.35.0

func (a *LakeviewAPI) Create(ctx context.Context, request CreateDashboardRequest) (*Dashboard, error)

func (*LakeviewAPI) CreateSchedule added in v0.43.0

func (a *LakeviewAPI) CreateSchedule(ctx context.Context, request CreateScheduleRequest) (*Schedule, error)

func (*LakeviewAPI) CreateSubscription added in v0.43.0

func (a *LakeviewAPI) CreateSubscription(ctx context.Context, request CreateSubscriptionRequest) (*Subscription, error)

func (*LakeviewAPI) DeleteSchedule added in v0.43.0

func (a *LakeviewAPI) DeleteSchedule(ctx context.Context, request DeleteScheduleRequest) error

func (*LakeviewAPI) DeleteScheduleByDashboardIdAndScheduleId added in v0.43.0

func (a *LakeviewAPI) DeleteScheduleByDashboardIdAndScheduleId(ctx context.Context, dashboardId string, scheduleId string) error

Delete dashboard schedule.

func (*LakeviewAPI) DeleteSubscription added in v0.43.0

func (a *LakeviewAPI) DeleteSubscription(ctx context.Context, request DeleteSubscriptionRequest) error

func (*LakeviewAPI) DeleteSubscriptionByDashboardIdAndScheduleIdAndSubscriptionId added in v0.43.0

func (a *LakeviewAPI) DeleteSubscriptionByDashboardIdAndScheduleIdAndSubscriptionId(ctx context.Context, dashboardId string, scheduleId string, subscriptionId string) error

Delete schedule subscription.

func (*LakeviewAPI) Get added in v0.35.0

func (a *LakeviewAPI) Get(ctx context.Context, request GetDashboardRequest) (*Dashboard, error)

func (*LakeviewAPI) GetByDashboardId added in v0.35.0

func (a *LakeviewAPI) GetByDashboardId(ctx context.Context, dashboardId string) (*Dashboard, error)

Get a draft dashboard.

func (*LakeviewAPI) GetPublished added in v0.35.0

func (a *LakeviewAPI) GetPublished(ctx context.Context, request GetPublishedDashboardRequest) (*PublishedDashboard, error)

func (*LakeviewAPI) GetPublishedByDashboardId added in v0.35.0

func (a *LakeviewAPI) GetPublishedByDashboardId(ctx context.Context, dashboardId string) (*PublishedDashboard, error)

Get the current published dashboard.

func (*LakeviewAPI) GetSchedule added in v0.43.0

func (a *LakeviewAPI) GetSchedule(ctx context.Context, request GetScheduleRequest) (*Schedule, error)

func (*LakeviewAPI) GetScheduleByDashboardIdAndScheduleId added in v0.43.0

func (a *LakeviewAPI) GetScheduleByDashboardIdAndScheduleId(ctx context.Context, dashboardId string, scheduleId string) (*Schedule, error)

Get dashboard schedule.

func (*LakeviewAPI) GetSubscription added in v0.43.0

func (a *LakeviewAPI) GetSubscription(ctx context.Context, request GetSubscriptionRequest) (*Subscription, error)

func (*LakeviewAPI) GetSubscriptionByDashboardIdAndScheduleIdAndSubscriptionId added in v0.43.0

func (a *LakeviewAPI) GetSubscriptionByDashboardIdAndScheduleIdAndSubscriptionId(ctx context.Context, dashboardId string, scheduleId string, subscriptionId string) (*Subscription, error)

Get schedule subscription.

func (*LakeviewAPI) List added in v0.43.0

func (a *LakeviewAPI) List(ctx context.Context, request ListDashboardsRequest) listing.Iterator[Dashboard]

List dashboards.

func (*LakeviewAPI) ListAll added in v0.43.0

func (a *LakeviewAPI) ListAll(ctx context.Context, request ListDashboardsRequest) ([]Dashboard, error)

List dashboards.

func (*LakeviewAPI) ListSchedules added in v0.43.0

func (a *LakeviewAPI) ListSchedules(ctx context.Context, request ListSchedulesRequest) listing.Iterator[Schedule]

List dashboard schedules.

func (*LakeviewAPI) ListSchedulesAll added in v0.43.0

func (a *LakeviewAPI) ListSchedulesAll(ctx context.Context, request ListSchedulesRequest) ([]Schedule, error)

List dashboard schedules.

func (*LakeviewAPI) ListSchedulesByDashboardId added in v0.43.0

func (a *LakeviewAPI) ListSchedulesByDashboardId(ctx context.Context, dashboardId string) (*ListSchedulesResponse, error)

List dashboard schedules.

func (*LakeviewAPI) ListSubscriptions added in v0.43.0

func (a *LakeviewAPI) ListSubscriptions(ctx context.Context, request ListSubscriptionsRequest) listing.Iterator[Subscription]

List schedule subscriptions.

func (*LakeviewAPI) ListSubscriptionsAll added in v0.43.0

func (a *LakeviewAPI) ListSubscriptionsAll(ctx context.Context, request ListSubscriptionsRequest) ([]Subscription, error)

List schedule subscriptions.

func (*LakeviewAPI) ListSubscriptionsByDashboardIdAndScheduleId added in v0.43.0

func (a *LakeviewAPI) ListSubscriptionsByDashboardIdAndScheduleId(ctx context.Context, dashboardId string, scheduleId string) (*ListSubscriptionsResponse, error)

List schedule subscriptions.

func (*LakeviewAPI) Migrate added in v0.37.0

func (a *LakeviewAPI) Migrate(ctx context.Context, request MigrateDashboardRequest) (*Dashboard, error)

func (*LakeviewAPI) Publish

func (a *LakeviewAPI) Publish(ctx context.Context, request PublishRequest) (*PublishedDashboard, error)

func (*LakeviewAPI) Trash added in v0.35.0

func (a *LakeviewAPI) Trash(ctx context.Context, request TrashDashboardRequest) error

func (*LakeviewAPI) TrashByDashboardId added in v0.35.0

func (a *LakeviewAPI) TrashByDashboardId(ctx context.Context, dashboardId string) error

Trash a dashboard.

func (*LakeviewAPI) Unpublish added in v0.37.0

func (a *LakeviewAPI) Unpublish(ctx context.Context, request UnpublishDashboardRequest) error

func (*LakeviewAPI) UnpublishByDashboardId added in v0.37.0

func (a *LakeviewAPI) UnpublishByDashboardId(ctx context.Context, dashboardId string) error

Unpublish the dashboard.

func (*LakeviewAPI) Update added in v0.35.0

func (a *LakeviewAPI) Update(ctx context.Context, request UpdateDashboardRequest) (*Dashboard, error)

func (*LakeviewAPI) UpdateSchedule added in v0.43.0

func (a *LakeviewAPI) UpdateSchedule(ctx context.Context, request UpdateScheduleRequest) (*Schedule, error)

type LakeviewEmbeddedAPI added in v0.57.0

type LakeviewEmbeddedAPI struct {
	// contains filtered or unexported fields
}

Token-based Lakeview APIs for embedding dashboards in external applications.

func NewLakeviewEmbedded added in v0.57.0

func NewLakeviewEmbedded(client *client.DatabricksClient) *LakeviewEmbeddedAPI

func (*LakeviewEmbeddedAPI) GetPublishedDashboardTokenInfo added in v0.63.0

func (a *LakeviewEmbeddedAPI) GetPublishedDashboardTokenInfo(ctx context.Context, request GetPublishedDashboardTokenInfoRequest) (*GetPublishedDashboardTokenInfoResponse, error)

func (*LakeviewEmbeddedAPI) GetPublishedDashboardTokenInfoByDashboardId added in v0.63.0

func (a *LakeviewEmbeddedAPI) GetPublishedDashboardTokenInfoByDashboardId(ctx context.Context, dashboardId string) (*GetPublishedDashboardTokenInfoResponse, error)

Get a required authorization details and scopes of a published dashboard to mint an OAuth token.

type LakeviewEmbeddedInterface added in v0.57.0

type LakeviewEmbeddedInterface interface {

	// Get a required authorization details and scopes of a published dashboard to
	// mint an OAuth token.
	GetPublishedDashboardTokenInfo(ctx context.Context, request GetPublishedDashboardTokenInfoRequest) (*GetPublishedDashboardTokenInfoResponse, error)

	// Get a required authorization details and scopes of a published dashboard to
	// mint an OAuth token.
	GetPublishedDashboardTokenInfoByDashboardId(ctx context.Context, dashboardId string) (*GetPublishedDashboardTokenInfoResponse, error)
}

type LakeviewEmbeddedService deprecated added in v0.57.0

type LakeviewEmbeddedService interface {

	// Get a required authorization details and scopes of a published dashboard
	// to mint an OAuth token.
	GetPublishedDashboardTokenInfo(ctx context.Context, request GetPublishedDashboardTokenInfoRequest) (*GetPublishedDashboardTokenInfoResponse, error)
}

Token-based Lakeview APIs for embedding dashboards in external applications.

Deprecated: Do not use this interface, it will be removed in a future version of the SDK.

type LakeviewInterface

type LakeviewInterface interface {

	// Create a draft dashboard.
	Create(ctx context.Context, request CreateDashboardRequest) (*Dashboard, error)

	// Create dashboard schedule.
	CreateSchedule(ctx context.Context, request CreateScheduleRequest) (*Schedule, error)

	// Create schedule subscription.
	CreateSubscription(ctx context.Context, request CreateSubscriptionRequest) (*Subscription, error)

	// Delete dashboard schedule.
	DeleteSchedule(ctx context.Context, request DeleteScheduleRequest) error

	// Delete dashboard schedule.
	DeleteScheduleByDashboardIdAndScheduleId(ctx context.Context, dashboardId string, scheduleId string) error

	// Delete schedule subscription.
	DeleteSubscription(ctx context.Context, request DeleteSubscriptionRequest) error

	// Delete schedule subscription.
	DeleteSubscriptionByDashboardIdAndScheduleIdAndSubscriptionId(ctx context.Context, dashboardId string, scheduleId string, subscriptionId string) error

	// Get a draft dashboard.
	Get(ctx context.Context, request GetDashboardRequest) (*Dashboard, error)

	// Get a draft dashboard.
	GetByDashboardId(ctx context.Context, dashboardId string) (*Dashboard, error)

	// Get the current published dashboard.
	GetPublished(ctx context.Context, request GetPublishedDashboardRequest) (*PublishedDashboard, error)

	// Get the current published dashboard.
	GetPublishedByDashboardId(ctx context.Context, dashboardId string) (*PublishedDashboard, error)

	// Get dashboard schedule.
	GetSchedule(ctx context.Context, request GetScheduleRequest) (*Schedule, error)

	// Get dashboard schedule.
	GetScheduleByDashboardIdAndScheduleId(ctx context.Context, dashboardId string, scheduleId string) (*Schedule, error)

	// Get schedule subscription.
	GetSubscription(ctx context.Context, request GetSubscriptionRequest) (*Subscription, error)

	// Get schedule subscription.
	GetSubscriptionByDashboardIdAndScheduleIdAndSubscriptionId(ctx context.Context, dashboardId string, scheduleId string, subscriptionId string) (*Subscription, error)

	// List dashboards.
	//
	// This method is generated by Databricks SDK Code Generator.
	List(ctx context.Context, request ListDashboardsRequest) listing.Iterator[Dashboard]

	// List dashboards.
	//
	// This method is generated by Databricks SDK Code Generator.
	ListAll(ctx context.Context, request ListDashboardsRequest) ([]Dashboard, error)

	// List dashboard schedules.
	//
	// This method is generated by Databricks SDK Code Generator.
	ListSchedules(ctx context.Context, request ListSchedulesRequest) listing.Iterator[Schedule]

	// List dashboard schedules.
	//
	// This method is generated by Databricks SDK Code Generator.
	ListSchedulesAll(ctx context.Context, request ListSchedulesRequest) ([]Schedule, error)

	// List dashboard schedules.
	ListSchedulesByDashboardId(ctx context.Context, dashboardId string) (*ListSchedulesResponse, error)

	// List schedule subscriptions.
	//
	// This method is generated by Databricks SDK Code Generator.
	ListSubscriptions(ctx context.Context, request ListSubscriptionsRequest) listing.Iterator[Subscription]

	// List schedule subscriptions.
	//
	// This method is generated by Databricks SDK Code Generator.
	ListSubscriptionsAll(ctx context.Context, request ListSubscriptionsRequest) ([]Subscription, error)

	// List schedule subscriptions.
	ListSubscriptionsByDashboardIdAndScheduleId(ctx context.Context, dashboardId string, scheduleId string) (*ListSubscriptionsResponse, error)

	// Migrates a classic SQL dashboard to Lakeview.
	Migrate(ctx context.Context, request MigrateDashboardRequest) (*Dashboard, error)

	// Publish the current draft dashboard.
	Publish(ctx context.Context, request PublishRequest) (*PublishedDashboard, error)

	// Trash a dashboard.
	Trash(ctx context.Context, request TrashDashboardRequest) error

	// Trash a dashboard.
	TrashByDashboardId(ctx context.Context, dashboardId string) error

	// Unpublish the dashboard.
	Unpublish(ctx context.Context, request UnpublishDashboardRequest) error

	// Unpublish the dashboard.
	UnpublishByDashboardId(ctx context.Context, dashboardId string) error

	// Update a draft dashboard.
	Update(ctx context.Context, request UpdateDashboardRequest) (*Dashboard, error)

	// Update dashboard schedule.
	UpdateSchedule(ctx context.Context, request UpdateScheduleRequest) (*Schedule, error)
}

type LakeviewService deprecated

type LakeviewService interface {

	// Create a draft dashboard.
	Create(ctx context.Context, request CreateDashboardRequest) (*Dashboard, error)

	// Create dashboard schedule.
	CreateSchedule(ctx context.Context, request CreateScheduleRequest) (*Schedule, error)

	// Create schedule subscription.
	CreateSubscription(ctx context.Context, request CreateSubscriptionRequest) (*Subscription, error)

	// Delete dashboard schedule.
	DeleteSchedule(ctx context.Context, request DeleteScheduleRequest) error

	// Delete schedule subscription.
	DeleteSubscription(ctx context.Context, request DeleteSubscriptionRequest) error

	// Get a draft dashboard.
	Get(ctx context.Context, request GetDashboardRequest) (*Dashboard, error)

	// Get the current published dashboard.
	GetPublished(ctx context.Context, request GetPublishedDashboardRequest) (*PublishedDashboard, error)

	// Get dashboard schedule.
	GetSchedule(ctx context.Context, request GetScheduleRequest) (*Schedule, error)

	// Get schedule subscription.
	GetSubscription(ctx context.Context, request GetSubscriptionRequest) (*Subscription, error)

	// List dashboards.
	List(ctx context.Context, request ListDashboardsRequest) (*ListDashboardsResponse, error)

	// List dashboard schedules.
	ListSchedules(ctx context.Context, request ListSchedulesRequest) (*ListSchedulesResponse, error)

	// List schedule subscriptions.
	ListSubscriptions(ctx context.Context, request ListSubscriptionsRequest) (*ListSubscriptionsResponse, error)

	// Migrates a classic SQL dashboard to Lakeview.
	Migrate(ctx context.Context, request MigrateDashboardRequest) (*Dashboard, error)

	// Publish the current draft dashboard.
	Publish(ctx context.Context, request PublishRequest) (*PublishedDashboard, error)

	// Trash a dashboard.
	Trash(ctx context.Context, request TrashDashboardRequest) error

	// Unpublish the dashboard.
	Unpublish(ctx context.Context, request UnpublishDashboardRequest) error

	// Update a draft dashboard.
	Update(ctx context.Context, request UpdateDashboardRequest) (*Dashboard, error)

	// Update dashboard schedule.
	UpdateSchedule(ctx context.Context, request UpdateScheduleRequest) (*Schedule, error)
}

These APIs provide specific management operations for Lakeview dashboards. Generic resource management can be done with Workspace API (import, export, get-status, list, delete).

Deprecated: Do not use this interface, it will be removed in a future version of the SDK.

type LifecycleState added in v0.35.0

type LifecycleState string
const LifecycleStateActive LifecycleState = `ACTIVE`
const LifecycleStateTrashed LifecycleState = `TRASHED`

func (*LifecycleState) Set added in v0.35.0

func (f *LifecycleState) Set(v string) error

Set raw string value and validate it against allowed values

func (*LifecycleState) String added in v0.35.0

func (f *LifecycleState) String() string

String representation for fmt.Print

func (*LifecycleState) Type added in v0.35.0

func (f *LifecycleState) Type() string

Type always returns LifecycleState to satisfy [pflag.Value] interface

func (*LifecycleState) Values added in v0.72.0

func (f *LifecycleState) Values() []LifecycleState

Values returns all possible values for LifecycleState.

There is no guarantee on the order of the values in the slice.

type ListDashboardsRequest added in v0.43.0

type ListDashboardsRequest struct {
	// The number of dashboards to return per page.
	PageSize int `json:"-" url:"page_size,omitempty"`
	// A page token, received from a previous `ListDashboards` call. This token
	// can be used to retrieve the subsequent page.
	PageToken string `json:"-" url:"page_token,omitempty"`
	// The flag to include dashboards located in the trash. If unspecified, only
	// active dashboards will be returned.
	ShowTrashed bool `json:"-" url:"show_trashed,omitempty"`
	// `DASHBOARD_VIEW_BASIC`only includes summary metadata from the dashboard.
	View DashboardView `json:"-" url:"view,omitempty"`

	ForceSendFields []string `json:"-" url:"-"`
}

func (ListDashboardsRequest) MarshalJSON added in v0.43.0

func (s ListDashboardsRequest) MarshalJSON() ([]byte, error)

func (*ListDashboardsRequest) UnmarshalJSON added in v0.43.0

func (s *ListDashboardsRequest) UnmarshalJSON(b []byte) error

type ListDashboardsResponse added in v0.43.0

type ListDashboardsResponse struct {
	Dashboards []Dashboard `json:"dashboards,omitempty"`
	// A token, which can be sent as `page_token` to retrieve the next page. If
	// this field is omitted, there are no subsequent dashboards.
	NextPageToken string `json:"next_page_token,omitempty"`

	ForceSendFields []string `json:"-" url:"-"`
}

func (ListDashboardsResponse) MarshalJSON added in v0.43.0

func (s ListDashboardsResponse) MarshalJSON() ([]byte, error)

func (*ListDashboardsResponse) UnmarshalJSON added in v0.43.0

func (s *ListDashboardsResponse) UnmarshalJSON(b []byte) error

type ListSchedulesRequest added in v0.43.0

type ListSchedulesRequest struct {
	// UUID identifying the dashboard to which the schedules belongs.
	DashboardId string `json:"-" url:"-"`
	// The number of schedules to return per page.
	PageSize int `json:"-" url:"page_size,omitempty"`
	// A page token, received from a previous `ListSchedules` call. Use this to
	// retrieve the subsequent page.
	PageToken string `json:"-" url:"page_token,omitempty"`

	ForceSendFields []string `json:"-" url:"-"`
}

func (ListSchedulesRequest) MarshalJSON added in v0.43.0

func (s ListSchedulesRequest) MarshalJSON() ([]byte, error)

func (*ListSchedulesRequest) UnmarshalJSON added in v0.43.0

func (s *ListSchedulesRequest) UnmarshalJSON(b []byte) error

type ListSchedulesResponse added in v0.43.0

type ListSchedulesResponse struct {
	// A token that can be used as a `page_token` in subsequent requests to
	// retrieve the next page of results. If this field is omitted, there are no
	// subsequent schedules.
	NextPageToken string `json:"next_page_token,omitempty"`

	Schedules []Schedule `json:"schedules,omitempty"`

	ForceSendFields []string `json:"-" url:"-"`
}

func (ListSchedulesResponse) MarshalJSON added in v0.43.0

func (s ListSchedulesResponse) MarshalJSON() ([]byte, error)

func (*ListSchedulesResponse) UnmarshalJSON added in v0.43.0

func (s *ListSchedulesResponse) UnmarshalJSON(b []byte) error

type ListSubscriptionsRequest added in v0.43.0

type ListSubscriptionsRequest struct {
	// UUID identifying the dashboard which the subscriptions belongs.
	DashboardId string `json:"-" url:"-"`
	// The number of subscriptions to return per page.
	PageSize int `json:"-" url:"page_size,omitempty"`
	// A page token, received from a previous `ListSubscriptions` call. Use this
	// to retrieve the subsequent page.
	PageToken string `json:"-" url:"page_token,omitempty"`
	// UUID identifying the schedule which the subscriptions belongs.
	ScheduleId string `json:"-" url:"-"`

	ForceSendFields []string `json:"-" url:"-"`
}

func (ListSubscriptionsRequest) MarshalJSON added in v0.43.0

func (s ListSubscriptionsRequest) MarshalJSON() ([]byte, error)

func (*ListSubscriptionsRequest) UnmarshalJSON added in v0.43.0

func (s *ListSubscriptionsRequest) UnmarshalJSON(b []byte) error

type ListSubscriptionsResponse added in v0.43.0

type ListSubscriptionsResponse struct {
	// A token that can be used as a `page_token` in subsequent requests to
	// retrieve the next page of results. If this field is omitted, there are no
	// subsequent subscriptions.
	NextPageToken string `json:"next_page_token,omitempty"`

	Subscriptions []Subscription `json:"subscriptions,omitempty"`

	ForceSendFields []string `json:"-" url:"-"`
}

func (ListSubscriptionsResponse) MarshalJSON added in v0.43.0

func (s ListSubscriptionsResponse) MarshalJSON() ([]byte, error)

func (*ListSubscriptionsResponse) UnmarshalJSON added in v0.43.0

func (s *ListSubscriptionsResponse) UnmarshalJSON(b []byte) error

type MessageError added in v0.44.0

type MessageError struct {
	Error string `json:"error,omitempty"`

	Type MessageErrorType `json:"type,omitempty"`

	ForceSendFields []string `json:"-" url:"-"`
}

func (MessageError) MarshalJSON added in v0.44.0

func (s MessageError) MarshalJSON() ([]byte, error)

func (*MessageError) UnmarshalJSON added in v0.44.0

func (s *MessageError) UnmarshalJSON(b []byte) error

type MessageErrorType added in v0.44.0

type MessageErrorType string
const MessageErrorTypeBlockMultipleExecutionsException MessageErrorType = `BLOCK_MULTIPLE_EXECUTIONS_EXCEPTION`
const MessageErrorTypeChatCompletionClientException MessageErrorType = `CHAT_COMPLETION_CLIENT_EXCEPTION`
const MessageErrorTypeChatCompletionClientTimeoutException MessageErrorType = `CHAT_COMPLETION_CLIENT_TIMEOUT_EXCEPTION`
const MessageErrorTypeChatCompletionNetworkException MessageErrorType = `CHAT_COMPLETION_NETWORK_EXCEPTION`
const MessageErrorTypeContentFilterException MessageErrorType = `CONTENT_FILTER_EXCEPTION`
const MessageErrorTypeContextExceededException MessageErrorType = `CONTEXT_EXCEEDED_EXCEPTION`
const MessageErrorTypeCouldNotGetModelDeploymentsException MessageErrorType = `COULD_NOT_GET_MODEL_DEPLOYMENTS_EXCEPTION`
const MessageErrorTypeCouldNotGetUcSchemaException MessageErrorType = `COULD_NOT_GET_UC_SCHEMA_EXCEPTION`
const MessageErrorTypeDeploymentNotFoundException MessageErrorType = `DEPLOYMENT_NOT_FOUND_EXCEPTION`
const MessageErrorTypeDescribeQueryInvalidSqlError MessageErrorType = `DESCRIBE_QUERY_INVALID_SQL_ERROR`
const MessageErrorTypeDescribeQueryTimeout MessageErrorType = `DESCRIBE_QUERY_TIMEOUT`
const MessageErrorTypeDescribeQueryUnexpectedFailure MessageErrorType = `DESCRIBE_QUERY_UNEXPECTED_FAILURE`
const MessageErrorTypeFunctionArgumentsInvalidException MessageErrorType = `FUNCTION_ARGUMENTS_INVALID_EXCEPTION`
const MessageErrorTypeFunctionArgumentsInvalidJsonException MessageErrorType = `FUNCTION_ARGUMENTS_INVALID_JSON_EXCEPTION`
const MessageErrorTypeFunctionArgumentsInvalidTypeException MessageErrorType = `FUNCTION_ARGUMENTS_INVALID_TYPE_EXCEPTION`
const MessageErrorTypeFunctionCallMissingParameterException MessageErrorType = `FUNCTION_CALL_MISSING_PARAMETER_EXCEPTION`
const MessageErrorTypeFunctionsNotAvailableException MessageErrorType = `FUNCTIONS_NOT_AVAILABLE_EXCEPTION`
const MessageErrorTypeGeneratedSqlQueryTooLongException MessageErrorType = `GENERATED_SQL_QUERY_TOO_LONG_EXCEPTION`
const MessageErrorTypeGenericChatCompletionException MessageErrorType = `GENERIC_CHAT_COMPLETION_EXCEPTION`
const MessageErrorTypeGenericChatCompletionServiceException MessageErrorType = `GENERIC_CHAT_COMPLETION_SERVICE_EXCEPTION`
const MessageErrorTypeGenericSqlExecApiCallException MessageErrorType = `GENERIC_SQL_EXEC_API_CALL_EXCEPTION`
const MessageErrorTypeIllegalParameterDefinitionException MessageErrorType = `ILLEGAL_PARAMETER_DEFINITION_EXCEPTION`
const MessageErrorTypeInvalidCertifiedAnswerFunctionException MessageErrorType = `INVALID_CERTIFIED_ANSWER_FUNCTION_EXCEPTION`
const MessageErrorTypeInvalidCertifiedAnswerIdentifierException MessageErrorType = `INVALID_CERTIFIED_ANSWER_IDENTIFIER_EXCEPTION`
const MessageErrorTypeInvalidChatCompletionArgumentsJsonException MessageErrorType = `INVALID_CHAT_COMPLETION_ARGUMENTS_JSON_EXCEPTION`
const MessageErrorTypeInvalidChatCompletionJsonException MessageErrorType = `INVALID_CHAT_COMPLETION_JSON_EXCEPTION`
const MessageErrorTypeInvalidCompletionRequestException MessageErrorType = `INVALID_COMPLETION_REQUEST_EXCEPTION`
const MessageErrorTypeInvalidFunctionCallException MessageErrorType = `INVALID_FUNCTION_CALL_EXCEPTION`
const MessageErrorTypeInvalidSqlMultipleDatasetReferencesException MessageErrorType = `INVALID_SQL_MULTIPLE_DATASET_REFERENCES_EXCEPTION`
const MessageErrorTypeInvalidSqlMultipleStatementsException MessageErrorType = `INVALID_SQL_MULTIPLE_STATEMENTS_EXCEPTION`
const MessageErrorTypeInvalidSqlUnknownTableException MessageErrorType = `INVALID_SQL_UNKNOWN_TABLE_EXCEPTION`
const MessageErrorTypeInvalidTableIdentifierException MessageErrorType = `INVALID_TABLE_IDENTIFIER_EXCEPTION`
const MessageErrorTypeLocalContextExceededException MessageErrorType = `LOCAL_CONTEXT_EXCEEDED_EXCEPTION`
const MessageErrorTypeMessageCancelledWhileExecutingException MessageErrorType = `MESSAGE_CANCELLED_WHILE_EXECUTING_EXCEPTION`
const MessageErrorTypeMessageDeletedWhileExecutingException MessageErrorType = `MESSAGE_DELETED_WHILE_EXECUTING_EXCEPTION`
const MessageErrorTypeMessageUpdatedWhileExecutingException MessageErrorType = `MESSAGE_UPDATED_WHILE_EXECUTING_EXCEPTION`
const MessageErrorTypeMissingSqlQueryException MessageErrorType = `MISSING_SQL_QUERY_EXCEPTION`
const MessageErrorTypeNoDeploymentsAvailableToWorkspace MessageErrorType = `NO_DEPLOYMENTS_AVAILABLE_TO_WORKSPACE`
const MessageErrorTypeNoQueryToVisualizeException MessageErrorType = `NO_QUERY_TO_VISUALIZE_EXCEPTION`
const MessageErrorTypeNoTablesToQueryException MessageErrorType = `NO_TABLES_TO_QUERY_EXCEPTION`
const MessageErrorTypeRateLimitExceededGenericException MessageErrorType = `RATE_LIMIT_EXCEEDED_GENERIC_EXCEPTION`
const MessageErrorTypeRateLimitExceededSpecifiedWaitException MessageErrorType = `RATE_LIMIT_EXCEEDED_SPECIFIED_WAIT_EXCEPTION`
const MessageErrorTypeReplyProcessTimeoutException MessageErrorType = `REPLY_PROCESS_TIMEOUT_EXCEPTION`
const MessageErrorTypeRetryableProcessingException MessageErrorType = `RETRYABLE_PROCESSING_EXCEPTION`
const MessageErrorTypeSqlExecutionException MessageErrorType = `SQL_EXECUTION_EXCEPTION`
const MessageErrorTypeStopProcessDueToAutoRegenerate MessageErrorType = `STOP_PROCESS_DUE_TO_AUTO_REGENERATE`
const MessageErrorTypeTablesMissingException MessageErrorType = `TABLES_MISSING_EXCEPTION`
const MessageErrorTypeTooManyCertifiedAnswersException MessageErrorType = `TOO_MANY_CERTIFIED_ANSWERS_EXCEPTION`
const MessageErrorTypeTooManyTablesException MessageErrorType = `TOO_MANY_TABLES_EXCEPTION`
const MessageErrorTypeUnexpectedReplyProcessException MessageErrorType = `UNEXPECTED_REPLY_PROCESS_EXCEPTION`
const MessageErrorTypeUnknownAiModel MessageErrorType = `UNKNOWN_AI_MODEL`
const MessageErrorTypeWarehouseAccessMissingException MessageErrorType = `WAREHOUSE_ACCESS_MISSING_EXCEPTION`
const MessageErrorTypeWarehouseNotFoundException MessageErrorType = `WAREHOUSE_NOT_FOUND_EXCEPTION`

func (*MessageErrorType) Set added in v0.44.0

func (f *MessageErrorType) Set(v string) error

Set raw string value and validate it against allowed values

func (*MessageErrorType) String added in v0.44.0

func (f *MessageErrorType) String() string

String representation for fmt.Print

func (*MessageErrorType) Type added in v0.44.0

func (f *MessageErrorType) Type() string

Type always returns MessageErrorType to satisfy [pflag.Value] interface

func (*MessageErrorType) Values added in v0.72.0

func (f *MessageErrorType) Values() []MessageErrorType

Values returns all possible values for MessageErrorType.

There is no guarantee on the order of the values in the slice.

type MessageStatus added in v0.44.0

type MessageStatus string

MessageStatus. The possible values are: * `FETCHING_METADATA`: Fetching metadata from the data sources. * `FILTERING_CONTEXT`: Running smart context step to determine relevant context. * `ASKING_AI`: Waiting for the LLM to respond to the user's question. * `PENDING_WAREHOUSE`: Waiting for warehouse before the SQL query can start executing. * `EXECUTING_QUERY`: Executing a generated SQL query. Get the SQL query result by calling [getMessageAttachmentQueryResult](:method:genie/getMessageAttachmentQueryResult) API. * `FAILED`: The response generation or query execution failed. See `error` field. * `COMPLETED`: Message processing is completed. Results are in the `attachments` field. Get the SQL query result by calling [getMessageAttachmentQueryResult](:method:genie/getMessageAttachmentQueryResult) API. * `SUBMITTED`: Message has been submitted. * `QUERY_RESULT_EXPIRED`: SQL result is not available anymore. The user needs to rerun the query. Rerun the SQL query result by calling [executeMessageAttachmentQuery](:method:genie/executeMessageAttachmentQuery) API. * `CANCELLED`: Message has been cancelled.

const MessageStatusAskingAi MessageStatus = `ASKING_AI`

Waiting for the LLM to respond to the user's question.

const MessageStatusCancelled MessageStatus = `CANCELLED`

Message has been cancelled.

const MessageStatusCompleted MessageStatus = `COMPLETED`

Message processing is completed. Results are in the `attachments` field. Get the SQL query result by calling [getMessageAttachmentQueryResult](:method:genie/getMessageAttachmentQueryResult) API.

const MessageStatusExecutingQuery MessageStatus = `EXECUTING_QUERY`

Executing a generated SQL query. Get the SQL query result by calling [getMessageAttachmentQueryResult](:method:genie/getMessageAttachmentQueryResult) API.

const MessageStatusFailed MessageStatus = `FAILED`

The response generation or query execution failed. See `error` field.

const MessageStatusFetchingMetadata MessageStatus = `FETCHING_METADATA`

Fetching metadata from the data sources.

const MessageStatusFilteringContext MessageStatus = `FILTERING_CONTEXT`

Running smart context step to determine relevant context.

const MessageStatusPendingWarehouse MessageStatus = `PENDING_WAREHOUSE`

Waiting for warehouse before the SQL query can start executing.

const MessageStatusQueryResultExpired MessageStatus = `QUERY_RESULT_EXPIRED`

SQL result is not available anymore. The user needs to rerun the query. Rerun the SQL query result by calling [executeMessageAttachmentQuery](:method:genie/executeMessageAttachmentQuery) API.

const MessageStatusSubmitted MessageStatus = `SUBMITTED`

Message has been submitted.

func (*MessageStatus) Set added in v0.44.0

func (f *MessageStatus) Set(v string) error

Set raw string value and validate it against allowed values

func (*MessageStatus) String added in v0.44.0

func (f *MessageStatus) String() string

String representation for fmt.Print

func (*MessageStatus) Type added in v0.44.0

func (f *MessageStatus) Type() string

Type always returns MessageStatus to satisfy [pflag.Value] interface

func (*MessageStatus) Values added in v0.72.0

func (f *MessageStatus) Values() []MessageStatus

Values returns all possible values for MessageStatus.

There is no guarantee on the order of the values in the slice.

type MigrateDashboardRequest added in v0.37.0

type MigrateDashboardRequest struct {
	// Display name for the new Lakeview dashboard.
	DisplayName string `json:"display_name,omitempty"`
	// The workspace path of the folder to contain the migrated Lakeview
	// dashboard.
	ParentPath string `json:"parent_path,omitempty"`
	// UUID of the dashboard to be migrated.
	SourceDashboardId string `json:"source_dashboard_id"`
	// Flag to indicate if mustache parameter syntax ({{ param }}) should be
	// auto-updated to named syntax (:param) when converting datasets in the
	// dashboard.
	UpdateParameterSyntax bool `json:"update_parameter_syntax,omitempty"`

	ForceSendFields []string `json:"-" url:"-"`
}

func (MigrateDashboardRequest) MarshalJSON added in v0.37.0

func (s MigrateDashboardRequest) MarshalJSON() ([]byte, error)

func (*MigrateDashboardRequest) UnmarshalJSON added in v0.37.0

func (s *MigrateDashboardRequest) UnmarshalJSON(b []byte) error

type PublishRequest

type PublishRequest struct {
	// UUID identifying the dashboard to be published.
	DashboardId string `json:"-" url:"-"`
	// Flag to indicate if the publisher's credentials should be embedded in the
	// published dashboard. These embedded credentials will be used to execute
	// the published dashboard's queries.
	EmbedCredentials bool `json:"embed_credentials,omitempty"`
	// The ID of the warehouse that can be used to override the warehouse which
	// was set in the draft.
	WarehouseId string `json:"warehouse_id,omitempty"`

	ForceSendFields []string `json:"-" url:"-"`
}

func (PublishRequest) MarshalJSON

func (s PublishRequest) MarshalJSON() ([]byte, error)

func (*PublishRequest) UnmarshalJSON

func (s *PublishRequest) UnmarshalJSON(b []byte) error

type PublishedDashboard added in v0.35.0

type PublishedDashboard struct {
	// The display name of the published dashboard.
	DisplayName string `json:"display_name,omitempty"`
	// Indicates whether credentials are embedded in the published dashboard.
	EmbedCredentials bool `json:"embed_credentials,omitempty"`
	// The timestamp of when the published dashboard was last revised.
	RevisionCreateTime string `json:"revision_create_time,omitempty"`
	// The warehouse ID used to run the published dashboard.
	WarehouseId string `json:"warehouse_id,omitempty"`

	ForceSendFields []string `json:"-" url:"-"`
}

func (PublishedDashboard) MarshalJSON added in v0.35.0

func (s PublishedDashboard) MarshalJSON() ([]byte, error)

func (*PublishedDashboard) UnmarshalJSON added in v0.35.0

func (s *PublishedDashboard) UnmarshalJSON(b []byte) error

type Result added in v0.44.0

type Result struct {
	// If result is truncated
	IsTruncated bool `json:"is_truncated,omitempty"`
	// Row count of the result
	RowCount int64 `json:"row_count,omitempty"`
	// Statement Execution API statement id. Use [Get status, manifest, and
	// result first chunk](:method:statementexecution/getstatement) to get the
	// full result data.
	StatementId string `json:"statement_id,omitempty"`

	ForceSendFields []string `json:"-" url:"-"`
}

func (Result) MarshalJSON added in v0.44.0

func (s Result) MarshalJSON() ([]byte, error)

func (*Result) UnmarshalJSON added in v0.44.0

func (s *Result) UnmarshalJSON(b []byte) error

type Schedule added in v0.43.0

type Schedule struct {
	// A timestamp indicating when the schedule was created.
	CreateTime string `json:"create_time,omitempty"`
	// The cron expression describing the frequency of the periodic refresh for
	// this schedule.
	CronSchedule CronSchedule `json:"cron_schedule"`
	// UUID identifying the dashboard to which the schedule belongs.
	DashboardId string `json:"dashboard_id,omitempty"`
	// The display name for schedule.
	DisplayName string `json:"display_name,omitempty"`
	// The etag for the schedule. Must be left empty on create, must be provided
	// on updates to ensure that the schedule has not been modified since the
	// last read, and can be optionally provided on delete.
	Etag string `json:"etag,omitempty"`
	// The status indicates whether this schedule is paused or not.
	PauseStatus SchedulePauseStatus `json:"pause_status,omitempty"`
	// UUID identifying the schedule.
	ScheduleId string `json:"schedule_id,omitempty"`
	// A timestamp indicating when the schedule was last updated.
	UpdateTime string `json:"update_time,omitempty"`
	// The warehouse id to run the dashboard with for the schedule.
	WarehouseId string `json:"warehouse_id,omitempty"`

	ForceSendFields []string `json:"-" url:"-"`
}

func (Schedule) MarshalJSON added in v0.43.0

func (s Schedule) MarshalJSON() ([]byte, error)

func (*Schedule) UnmarshalJSON added in v0.43.0

func (s *Schedule) UnmarshalJSON(b []byte) error

type SchedulePauseStatus added in v0.43.0

type SchedulePauseStatus string
const SchedulePauseStatusPaused SchedulePauseStatus = `PAUSED`
const SchedulePauseStatusUnpaused SchedulePauseStatus = `UNPAUSED`

func (*SchedulePauseStatus) Set added in v0.43.0

func (f *SchedulePauseStatus) Set(v string) error

Set raw string value and validate it against allowed values

func (*SchedulePauseStatus) String added in v0.43.0

func (f *SchedulePauseStatus) String() string

String representation for fmt.Print

func (*SchedulePauseStatus) Type added in v0.43.0

func (f *SchedulePauseStatus) Type() string

Type always returns SchedulePauseStatus to satisfy [pflag.Value] interface

func (*SchedulePauseStatus) Values added in v0.72.0

Values returns all possible values for SchedulePauseStatus.

There is no guarantee on the order of the values in the slice.

type Subscriber added in v0.43.0

type Subscriber struct {
	// The destination to receive the subscription email. This parameter is
	// mutually exclusive with `user_subscriber`.
	DestinationSubscriber *SubscriptionSubscriberDestination `json:"destination_subscriber,omitempty"`
	// The user to receive the subscription email. This parameter is mutually
	// exclusive with `destination_subscriber`.
	UserSubscriber *SubscriptionSubscriberUser `json:"user_subscriber,omitempty"`
}

type Subscription added in v0.43.0

type Subscription struct {
	// A timestamp indicating when the subscription was created.
	CreateTime string `json:"create_time,omitempty"`
	// UserId of the user who adds subscribers (users or notification
	// destinations) to the dashboard's schedule.
	CreatedByUserId int64 `json:"created_by_user_id,omitempty"`
	// UUID identifying the dashboard to which the subscription belongs.
	DashboardId string `json:"dashboard_id,omitempty"`
	// The etag for the subscription. Must be left empty on create, can be
	// optionally provided on delete to ensure that the subscription has not
	// been deleted since the last read.
	Etag string `json:"etag,omitempty"`
	// UUID identifying the schedule to which the subscription belongs.
	ScheduleId string `json:"schedule_id,omitempty"`
	// Subscriber details for users and destinations to be added as subscribers
	// to the schedule.
	Subscriber Subscriber `json:"subscriber"`
	// UUID identifying the subscription.
	SubscriptionId string `json:"subscription_id,omitempty"`
	// A timestamp indicating when the subscription was last updated.
	UpdateTime string `json:"update_time,omitempty"`

	ForceSendFields []string `json:"-" url:"-"`
}

func (Subscription) MarshalJSON added in v0.43.0

func (s Subscription) MarshalJSON() ([]byte, error)

func (*Subscription) UnmarshalJSON added in v0.43.0

func (s *Subscription) UnmarshalJSON(b []byte) error

type SubscriptionSubscriberDestination added in v0.43.0

type SubscriptionSubscriberDestination struct {
	// The canonical identifier of the destination to receive email
	// notification.
	DestinationId string `json:"destination_id"`
}

type SubscriptionSubscriberUser added in v0.43.0

type SubscriptionSubscriberUser struct {
	// UserId of the subscriber.
	UserId int64 `json:"user_id"`
}

type TextAttachment added in v0.44.0

type TextAttachment struct {
	// AI generated message
	Content string `json:"content,omitempty"`

	Id string `json:"id,omitempty"`

	ForceSendFields []string `json:"-" url:"-"`
}

func (TextAttachment) MarshalJSON added in v0.44.0

func (s TextAttachment) MarshalJSON() ([]byte, error)

func (*TextAttachment) UnmarshalJSON added in v0.44.0

func (s *TextAttachment) UnmarshalJSON(b []byte) error

type TrashDashboardRequest added in v0.36.0

type TrashDashboardRequest struct {
	// UUID identifying the dashboard.
	DashboardId string `json:"-" url:"-"`
}

type UnpublishDashboardRequest added in v0.37.0

type UnpublishDashboardRequest struct {
	// UUID identifying the published dashboard.
	DashboardId string `json:"-" url:"-"`
}

type UpdateDashboardRequest added in v0.35.0

type UpdateDashboardRequest struct {
	Dashboard Dashboard `json:"dashboard"`
	// UUID identifying the dashboard.
	DashboardId string `json:"-" url:"-"`
}

type UpdateScheduleRequest added in v0.43.0

type UpdateScheduleRequest struct {
	// UUID identifying the dashboard to which the schedule belongs.
	DashboardId string `json:"-" url:"-"`
	// The schedule to update.
	Schedule Schedule `json:"schedule"`
	// UUID identifying the schedule.
	ScheduleId string `json:"-" url:"-"`
}

type WaitGetMessageGenieCompleted added in v0.44.0

type WaitGetMessageGenieCompleted[R any] struct {
	Response       *R
	ConversationId string `json:"conversation_id"`
	MessageId      string `json:"message_id"`
	SpaceId        string `json:"space_id"`
	Poll           func(time.Duration, func(*GenieMessage)) (*GenieMessage, error)
	// contains filtered or unexported fields
}

WaitGetMessageGenieCompleted is a wrapper that calls GenieAPI.WaitGetMessageGenieCompleted and waits to reach COMPLETED state.

func (*WaitGetMessageGenieCompleted[R]) Get added in v0.44.0

Get the GenieMessage with the default timeout of 20 minutes.

func (*WaitGetMessageGenieCompleted[R]) GetWithTimeout added in v0.44.0

func (w *WaitGetMessageGenieCompleted[R]) GetWithTimeout(timeout time.Duration) (*GenieMessage, error)

Get the GenieMessage with custom timeout.

func (*WaitGetMessageGenieCompleted[R]) OnProgress added in v0.44.0

func (w *WaitGetMessageGenieCompleted[R]) OnProgress(callback func(*GenieMessage)) *WaitGetMessageGenieCompleted[R]

OnProgress invokes a callback every time it polls for the status update.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL