zz_generated.model.go 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388
  1. // Licensed under the Apache License, Version 2.0 (the "License");
  2. // you may not use this file except in compliance with the License.
  3. // You may obtain a copy of the License at
  4. //
  5. // http://www.apache.org/licenses/LICENSE-2.0
  6. //
  7. // Unless required by applicable law or agreed to in writing, software
  8. // distributed under the License is distributed on an "AS IS" BASIS,
  9. // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  10. // See the License for the specific language governing permissions and
  11. // limitations under the License.
  12. // Code generated by model-api-gen. DO NOT EDIT.
  13. package identity
  14. import (
  15. time "time"
  16. jsonutils "yunion.io/x/jsonutils"
  17. "yunion.io/x/onecloud/pkg/apis"
  18. tagutils "yunion.io/x/onecloud/pkg/util/tagutils"
  19. )
  20. // SAssignment is an autogenerated struct via yunion.io/x/onecloud/pkg/keystone/models.SAssignment.
  21. type SAssignment struct {
  22. apis.SResourceBase
  23. // 关联类型,分为四类:'UserProject','GroupProject','UserDomain','GroupDomain'
  24. Type string `json:"type"`
  25. // 用户或者用户组ID
  26. ActorId string `json:"actor_id"`
  27. // 项目或者域ID
  28. TargetId string `json:"target_id"`
  29. // 角色ID
  30. RoleId string `json:"role_id"`
  31. Inherited *bool `json:"inherited,omitempty"`
  32. }
  33. // SConfigOption is an autogenerated struct via yunion.io/x/onecloud/pkg/keystone/models.SConfigOption.
  34. type SConfigOption struct {
  35. apis.SResourceBase
  36. apis.SRecordChecksumResourceBase
  37. ResType string `json:"res_type"`
  38. ResId string `json:"domain_id"`
  39. Group string `json:"group"`
  40. Option string `json:"option"`
  41. Value jsonutils.JSONObject `json:"value"`
  42. }
  43. // SCredential is an autogenerated struct via yunion.io/x/onecloud/pkg/keystone/models.SCredential.
  44. type SCredential struct {
  45. apis.SStandaloneResourceBase
  46. UserId string `json:"user_id"`
  47. ProjectId string `json:"project_id"`
  48. Type string `json:"type"`
  49. KeyHash string `json:"key_hash"`
  50. Extra *jsonutils.JSONDict `json:"extra"`
  51. EncryptedBlob string `json:"encrypted_blob"`
  52. Enabled *bool `json:"enabled,omitempty"`
  53. }
  54. // SDomain is an autogenerated struct via yunion.io/x/onecloud/pkg/keystone/models.SDomain.
  55. type SDomain struct {
  56. apis.SStandaloneResourceBase
  57. apis.SPendingDeletedBase
  58. // 额外信息
  59. Extra *jsonutils.JSONDict `json:"extra"`
  60. // 改域是否启用
  61. Enabled *bool `json:"enabled,omitempty"`
  62. // 是否为域
  63. IsDomain *bool `json:"is_domain,omitempty"`
  64. DomainId string `json:"domain_id"`
  65. ParentId string `json:"parent_id"`
  66. AdminId string `json:"admin_id"`
  67. }
  68. // SEnabledIdentityBaseResource is an autogenerated struct via yunion.io/x/onecloud/pkg/keystone/models.SEnabledIdentityBaseResource.
  69. type SEnabledIdentityBaseResource struct {
  70. SIdentityBaseResource
  71. apis.SEnabledResourceBase
  72. }
  73. // SEndpoint is an autogenerated struct via yunion.io/x/onecloud/pkg/keystone/models.SEndpoint.
  74. type SEndpoint struct {
  75. apis.SStandaloneResourceBase
  76. LegacyEndpointId string `json:"legacy_endpoint_id"`
  77. Interface string `json:"interface"`
  78. ServiceId string `json:"service_id"`
  79. Url string `json:"url"`
  80. Extra *jsonutils.JSONDict `json:"extra"`
  81. Enabled *bool `json:"enabled,omitempty"`
  82. RegionId string `json:"region_id"`
  83. ServiceCertificateId string `json:"service_certificate_id"`
  84. }
  85. // SFederatedUser is an autogenerated struct via yunion.io/x/onecloud/pkg/keystone/models.SFederatedUser.
  86. type SFederatedUser struct {
  87. apis.SResourceBase
  88. Id int `json:"id"`
  89. UserId string `json:"user_id"`
  90. IdpId string `json:"idp_id"`
  91. ProtocolId string `json:"protocol_id"`
  92. UniqueId string `json:"unique_id"`
  93. DisplayName string `json:"display_name"`
  94. }
  95. // SFederationProtocol is an autogenerated struct via yunion.io/x/onecloud/pkg/keystone/models.SFederationProtocol.
  96. type SFederationProtocol struct {
  97. Id string `json:"id"`
  98. IdpId string `json:"idp_id"`
  99. MappingId string `json:"mapping_id"`
  100. }
  101. // SFernetKey is an autogenerated struct via yunion.io/x/onecloud/pkg/keystone/models.SFernetKey.
  102. type SFernetKey struct {
  103. Type string `json:"type"`
  104. Index int `json:"index"`
  105. Key string `json:"key"`
  106. }
  107. // SGroup is an autogenerated struct via yunion.io/x/onecloud/pkg/keystone/models.SGroup.
  108. type SGroup struct {
  109. SIdentityBaseResource
  110. // 用户组的显示名称
  111. Displayname string `json:"displayname"`
  112. }
  113. // SIdentityBaseResource is an autogenerated struct via yunion.io/x/onecloud/pkg/keystone/models.SIdentityBaseResource.
  114. type SIdentityBaseResource struct {
  115. apis.SStandaloneResourceBase
  116. apis.SDomainizedResourceBase
  117. apis.SPendingDeletedBase
  118. // 额外信息
  119. Extra *jsonutils.JSONDict `json:"extra"`
  120. }
  121. // SIdentityProvider is an autogenerated struct via yunion.io/x/onecloud/pkg/keystone/models.SIdentityProvider.
  122. type SIdentityProvider struct {
  123. apis.SEnabledStatusStandaloneResourceBase
  124. apis.SDomainizedResourceBase
  125. Driver string `json:"driver"`
  126. Template string `json:"template"`
  127. TargetDomainId string `json:"target_domain_id"`
  128. // 是否自动创建项目
  129. AutoCreateProject *bool `json:"auto_create_project,omitempty"`
  130. // 是否自动创建用户
  131. AutoCreateUser *bool `json:"auto_create_user,omitempty"`
  132. ErrorCount int `json:"error_count"`
  133. SyncStatus string `json:"sync_status"`
  134. LastSync time.Time `json:"last_sync"`
  135. // = Column(DateTime, nullable=True)
  136. LastSyncEndAt time.Time `json:"last_sync_end_at"`
  137. SyncIntervalSeconds int `json:"sync_interval_seconds"`
  138. // 认证源图标
  139. IconUri string `json:"icon_uri"`
  140. // 是否是SSO登录方式
  141. IsSso *bool `json:"is_sso,omitempty"`
  142. // 是否是缺省SSO登录方式
  143. IsDefault *bool `json:"is_default,omitempty"`
  144. }
  145. // SIdmapping is an autogenerated struct via yunion.io/x/onecloud/pkg/keystone/models.SIdmapping.
  146. type SIdmapping struct {
  147. apis.SResourceBase
  148. PublicId string `json:"public_id"`
  149. IdpId string `json:"domain_id"`
  150. IdpEntityId string `json:"local_id"`
  151. EntityType string `json:"entity_type"`
  152. }
  153. // SIdpRemoteIds is an autogenerated struct via yunion.io/x/onecloud/pkg/keystone/models.SIdpRemoteIds.
  154. type SIdpRemoteIds struct {
  155. IdpId string `json:"idp_id"`
  156. RemoteId string `json:"remote_id"`
  157. }
  158. // SImpliedRole is an autogenerated struct via yunion.io/x/onecloud/pkg/keystone/models.SImpliedRole.
  159. type SImpliedRole struct {
  160. PriorRoleId string `json:"prior_role_id"`
  161. ImpliedRoleId string `json:"implied_role_id"`
  162. }
  163. // SLocalUser is an autogenerated struct via yunion.io/x/onecloud/pkg/keystone/models.SLocalUser.
  164. type SLocalUser struct {
  165. apis.SResourceBase
  166. Id int `json:"id"`
  167. UserId string `json:"user_id"`
  168. DomainId string `json:"domain_id"`
  169. Name string `json:"name"`
  170. FailedAuthCount int `json:"failed_auth_count"`
  171. NeedResetPassword *bool `json:"need_reset_password,omitempty"`
  172. ResetHint string `json:"reset_hint"`
  173. }
  174. // SNonlocalUser is an autogenerated struct via yunion.io/x/onecloud/pkg/keystone/models.SNonlocalUser.
  175. type SNonlocalUser struct {
  176. DomainId string `json:"domain_id"`
  177. Name string `json:"name"`
  178. UserId string `json:"user_id"`
  179. }
  180. // SOrganization is an autogenerated struct via yunion.io/x/onecloud/pkg/keystone/models.SOrganization.
  181. type SOrganization struct {
  182. SEnabledIdentityBaseResource
  183. apis.SSharableBaseResource
  184. apis.SStatusResourceBase
  185. Type string `json:"type"`
  186. Keys string `json:"keys"`
  187. Level int `json:"level"`
  188. }
  189. // SOrganizationNode is an autogenerated struct via yunion.io/x/onecloud/pkg/keystone/models.SOrganizationNode.
  190. type SOrganizationNode struct {
  191. apis.SStandaloneResourceBase
  192. apis.SPendingDeletedBase
  193. OrgId string `json:"org_id"`
  194. FullLabel string `json:"full_label"`
  195. Level int `json:"level"`
  196. Weight int `json:"weight"`
  197. }
  198. // SPassword is an autogenerated struct via yunion.io/x/onecloud/pkg/keystone/models.SPassword.
  199. type SPassword struct {
  200. apis.SResourceBase
  201. Id int `json:"id"`
  202. LocalUserId int `json:"local_user_id"`
  203. Password string `json:"password"`
  204. SelfService bool `json:"self_service"`
  205. PasswordHash string `json:"password_hash"`
  206. CreatedAtInt int64 `json:"created_at_int"`
  207. ExpiresAtInt int64 `json:"expires_at_int"`
  208. }
  209. // SPolicy is an autogenerated struct via yunion.io/x/onecloud/pkg/keystone/models.SPolicy.
  210. type SPolicy struct {
  211. SEnabledIdentityBaseResource
  212. apis.SSharableBaseResource
  213. // swagger:ignore
  214. // Deprecated
  215. Type string `json:"type"`
  216. // 权限定义
  217. Blob jsonutils.JSONObject `json:"blob"`
  218. // 权限范围
  219. Scope string `json:"scope"`
  220. // 是否为系统权限
  221. IsSystem *bool `json:"is_system,omitempty"`
  222. // 匹配的项目标签
  223. ProjectTags []tagutils.STag `json:"project_tags"`
  224. // 匹配的域标签
  225. DomainTags []tagutils.STag `json:"domain_tags"`
  226. // 匹配的资源标签
  227. ObjectTags []tagutils.STag `json:"object_tags"`
  228. // 匹配的组织架构节点
  229. OrgNodeId []string `json:"org_node_id"`
  230. }
  231. // SProject is an autogenerated struct via yunion.io/x/onecloud/pkg/keystone/models.SProject.
  232. type SProject struct {
  233. SIdentityBaseResource
  234. // 上级项目或域的ID
  235. ParentId string `json:"parent_id"`
  236. // 该项目是否为域(domain)
  237. IsDomain *bool `json:"is_domain,omitempty"`
  238. AdminId string `json:"admin_id"`
  239. }
  240. // SProjectExtended is an autogenerated struct via yunion.io/x/onecloud/pkg/keystone/models.SProjectExtended.
  241. type SProjectExtended struct {
  242. SProject
  243. DomainName string `json:"domain_name"`
  244. }
  245. // SRegion is an autogenerated struct via yunion.io/x/onecloud/pkg/keystone/models.SRegion.
  246. type SRegion struct {
  247. apis.SStandaloneResourceBase
  248. ParentRegionId string `json:"parent_region_id"`
  249. Extra *jsonutils.JSONDict `json:"extra"`
  250. }
  251. // SRole is an autogenerated struct via yunion.io/x/onecloud/pkg/keystone/models.SRole.
  252. type SRole struct {
  253. SIdentityBaseResource
  254. apis.SSharableBaseResource
  255. }
  256. // SRolePolicy is an autogenerated struct via yunion.io/x/onecloud/pkg/keystone/models.SRolePolicy.
  257. type SRolePolicy struct {
  258. apis.SResourceBase
  259. // 角色ID, 主键
  260. RoleId string `json:"role_id"`
  261. // 项目ID,主键
  262. ProjectId string `json:"project_id"`
  263. // 权限ID, 主键
  264. PolicyId string `json:"policy_id"`
  265. // 是否需要认证
  266. Auth *bool `json:"auth,omitempty"`
  267. // 匹配的IP白名单
  268. Ips string `json:"ips"`
  269. // 匹配开始时间
  270. ValidSince time.Time `json:"valid_since"`
  271. // 匹配结束时间
  272. ValidUntil time.Time `json:"valid_until"`
  273. }
  274. // SScopeResource is an autogenerated struct via yunion.io/x/onecloud/pkg/keystone/models.SScopeResource.
  275. type SScopeResource struct {
  276. DomainId string `json:"domain_id"`
  277. ProjectId string `json:"project_id"`
  278. OwnerId string `json:"owner_id"`
  279. RegionId string `json:"region_id"`
  280. ServiceId string `json:"service_id"`
  281. Resource string `json:"resource"`
  282. Count int `json:"count"`
  283. }
  284. // SService is an autogenerated struct via yunion.io/x/onecloud/pkg/keystone/models.SService.
  285. type SService struct {
  286. apis.SStandaloneResourceBase
  287. Type string `json:"type"`
  288. Enabled *bool `json:"enabled,omitempty"`
  289. Extra *jsonutils.JSONDict `json:"extra"`
  290. ConfigVersion int `json:"config_version"`
  291. }
  292. // SServiceCertificate is an autogenerated struct via yunion.io/x/onecloud/pkg/keystone/models.SServiceCertificate.
  293. type SServiceCertificate struct {
  294. apis.SStandaloneResourceBase
  295. apis.SCertificateResourceBase
  296. CaCertificate string `json:"ca_certificate"`
  297. CaPrivateKey string `json:"ca_private_key"`
  298. }
  299. // STokenCache is an autogenerated struct via yunion.io/x/onecloud/pkg/keystone/models.STokenCache.
  300. type STokenCache struct {
  301. apis.SStandaloneAnonResourceBase
  302. Valid bool `json:"valid"`
  303. Method string `json:"method"`
  304. AuditIds string `json:"audit_ids"`
  305. UserId string `json:"user_id"`
  306. ProjectId string `json:"project_id"`
  307. DomainId string `json:"domain_id"`
  308. Source string `json:"source"`
  309. Ip string `json:"ip"`
  310. }
  311. // SUser is an autogenerated struct via yunion.io/x/onecloud/pkg/keystone/models.SUser.
  312. type SUser struct {
  313. apis.SRecordChecksumResourceBase
  314. SEnabledIdentityBaseResource
  315. // 用户邮箱
  316. Email string `json:"email"`
  317. // 用户手机号
  318. Mobile string `json:"mobile"`
  319. // 显示名称,用户登录后显示在右上角菜单入口
  320. Displayname string `json:"displayname"`
  321. // 上次登录时间
  322. // deprecated
  323. // swagger:ignore
  324. LastActiveAt time.Time `json:"last_active_at"`
  325. // 上次用户登录IP
  326. // deprecated
  327. // swagger:ignore
  328. LastLoginIp string `json:"last_login_ip"`
  329. // 上次用户登录方式,可能值有:web(web控制台),cli(命令行climc),API(api)
  330. // deprecated
  331. // swagger:ignore
  332. LastLoginSource string `json:"last_login_source"`
  333. // 是否为系统账号,系统账号不会检查密码复杂度,默认不在列表显示
  334. IsSystemAccount *bool `json:"is_system_account,omitempty"`
  335. // deprecated
  336. DefaultProjectId string `json:"default_project_id"`
  337. // 是否允许登录Web控制台,如果是用于API访问的用户,可禁用web控制台登录
  338. AllowWebConsole *bool `json:"allow_web_console,omitempty"`
  339. // 是否开启MFA
  340. EnableMfa *bool `json:"enable_mfa,omitempty"`
  341. // 用户的默认语言设置,默认是zh_CN
  342. Lang string `json:"lang"`
  343. // 过期时间
  344. ExpiredAt time.Time `json:"expired_at"`
  345. }
  346. // SUserOption is an autogenerated struct via yunion.io/x/onecloud/pkg/keystone/models.SUserOption.
  347. type SUserOption struct {
  348. UserId string `json:"user_id"`
  349. OptionId string `json:"option_id"`
  350. OptionValue string `json:"option_value"`
  351. }