forked from databricks/databricks-sdk-go
-
Notifications
You must be signed in to change notification settings - Fork 0
/
model.go
executable file
·186 lines (161 loc) · 6.12 KB
/
model.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT.
package oauth2
// all definitions in this file are in alphabetical order
type CreateCustomAppIntegration struct {
// indicates if an oauth client-secret should be generated
Confidential bool `json:"confidential,omitempty"`
// name of the custom oauth app
Name string `json:"name"`
// List of oauth redirect urls
RedirectUrls []string `json:"redirect_urls"`
// Token access policy
TokenAccessPolicy *TokenAccessPolicy `json:"token_access_policy,omitempty"`
}
type CreateCustomAppIntegrationOutput struct {
// oauth client-id generated by the Databricks
ClientId string `json:"client_id,omitempty"`
// oauth client-secret generated by the Databricks if this is a confidential
// oauth app client-secret will be generated.
ClientSecret string `json:"client_secret,omitempty"`
// unique integration id for the custom oauth app
IntegrationId string `json:"integration_id,omitempty"`
}
type CreateOAuthEnrollment struct {
// If true, enable OAuth for all the published applications in the account.
EnableAllPublishedApps bool `json:"enable_all_published_apps,omitempty"`
}
type CreatePublishedAppIntegration struct {
// app_id of the oauth published app integration. For example power-bi,
// tableau-deskop
AppId string `json:"app_id,omitempty"`
// Token access policy
TokenAccessPolicy *TokenAccessPolicy `json:"token_access_policy,omitempty"`
}
type CreatePublishedAppIntegrationOutput struct {
// unique integration id for the published oauth app
IntegrationId string `json:"integration_id,omitempty"`
}
// Create service principal secret
type CreateServicePrincipalSecretRequest struct {
// The service principal ID.
ServicePrincipalId int64 `json:"-" url:"-"`
}
type CreateServicePrincipalSecretResponse struct {
// UTC time when the secret was created
CreateTime string `json:"create_time,omitempty"`
// ID of the secret
Id string `json:"id,omitempty"`
// Secret Value
Secret string `json:"secret,omitempty"`
// Secret Hash
SecretHash string `json:"secret_hash,omitempty"`
// Status of the secret
Status string `json:"status,omitempty"`
// UTC time when the secret was updated
UpdateTime string `json:"update_time,omitempty"`
}
// Delete Custom OAuth App Integration
type DeleteCustomAppIntegrationRequest struct {
// The oauth app integration ID.
IntegrationId string `json:"-" url:"-"`
}
// Delete Published OAuth App Integration
type DeletePublishedAppIntegrationRequest struct {
// The oauth app integration ID.
IntegrationId string `json:"-" url:"-"`
}
// Delete service principal secret
type DeleteServicePrincipalSecretRequest struct {
// The secret ID.
SecretId string `json:"-" url:"-"`
// The service principal ID.
ServicePrincipalId int64 `json:"-" url:"-"`
}
type GetCustomAppIntegrationOutput struct {
// oauth client id of the custom oauth app
ClientId string `json:"client_id,omitempty"`
// indicates if an oauth client-secret should be generated
Confidential bool `json:"confidential,omitempty"`
// ID of this custom app
IntegrationId string `json:"integration_id,omitempty"`
// name of the custom oauth app
Name string `json:"name,omitempty"`
// List of oauth redirect urls
RedirectUrls []string `json:"redirect_urls,omitempty"`
// Token access policy
TokenAccessPolicy *TokenAccessPolicy `json:"token_access_policy,omitempty"`
}
// Get OAuth Custom App Integration
type GetCustomAppIntegrationRequest struct {
// The oauth app integration ID.
IntegrationId string `json:"-" url:"-"`
}
type GetCustomAppIntegrationsOutput struct {
// Array of Custom OAuth App Integrations defined for the account.
Apps []GetCustomAppIntegrationOutput `json:"apps,omitempty"`
}
type GetPublishedAppIntegrationOutput struct {
// app-id of the published app integration
AppId string `json:"app_id,omitempty"`
// unique integration id for the published oauth app
IntegrationId string `json:"integration_id,omitempty"`
// name of the published oauth app
Name string `json:"name,omitempty"`
// Token access policy
TokenAccessPolicy *TokenAccessPolicy `json:"token_access_policy,omitempty"`
}
// Get OAuth Published App Integration
type GetPublishedAppIntegrationRequest struct {
// The oauth app integration ID.
IntegrationId string `json:"-" url:"-"`
}
type GetPublishedAppIntegrationsOutput struct {
// Array of Published OAuth App Integrations defined for the account.
Apps []GetPublishedAppIntegrationOutput `json:"apps,omitempty"`
}
// List service principal secrets
type ListServicePrincipalSecretsRequest struct {
// The service principal ID.
ServicePrincipalId int64 `json:"-" url:"-"`
}
type ListServicePrincipalSecretsResponse struct {
// List of the secrets
Secrets []SecretInfo `json:"secrets,omitempty"`
}
type OAuthEnrollmentStatus struct {
// Is OAuth enrolled for the account.
IsEnabled bool `json:"is_enabled,omitempty"`
}
type SecretInfo struct {
// UTC time when the secret was created
CreateTime string `json:"create_time,omitempty"`
// ID of the secret
Id string `json:"id,omitempty"`
// Secret Hash
SecretHash string `json:"secret_hash,omitempty"`
// Status of the secret
Status string `json:"status,omitempty"`
// UTC time when the secret was updated
UpdateTime string `json:"update_time,omitempty"`
}
type TokenAccessPolicy struct {
// access token time to live in minutes
AccessTokenTtlInMinutes int `json:"access_token_ttl_in_minutes,omitempty"`
// refresh token time to live in minutes
RefreshTokenTtlInMinutes int `json:"refresh_token_ttl_in_minutes,omitempty"`
}
type UpdateCustomAppIntegration struct {
// The oauth app integration ID.
IntegrationId string `json:"-" url:"-"`
// List of oauth redirect urls to be updated in the custom oauth app
// integration
RedirectUrls []string `json:"redirect_urls,omitempty"`
// Token access policy to be updated in the custom oauth app integration
TokenAccessPolicy *TokenAccessPolicy `json:"token_access_policy,omitempty"`
}
type UpdatePublishedAppIntegration struct {
// The oauth app integration ID.
IntegrationId string `json:"-" url:"-"`
// Token access policy to be updated in the published oauth app integration
TokenAccessPolicy *TokenAccessPolicy `json:"token_access_policy,omitempty"`
}