1package accesscontrol
2
3// Copyright (c) Microsoft Corporation. All rights reserved.
4// Licensed under the MIT License. See License.txt in the project root for license information.
5//
6// Code generated by Microsoft (R) AutoRest Code Generator.
7// Changes may cause incorrect behavior and will be lost if the code is regenerated.
8
9import (
10	"github.com/Azure/go-autorest/autorest"
11	"github.com/gofrs/uuid"
12)
13
14// The package's fully qualified name.
15const fqdn = "github.com/Azure/azure-sdk-for-go/services/preview/synapse/2020-08-01-preview/accesscontrol"
16
17// CheckAccessDecision check access response details
18type CheckAccessDecision struct {
19	// AccessDecision - Access Decision.
20	AccessDecision *string `json:"accessDecision,omitempty"`
21	// ActionID - Action Id.
22	ActionID       *string                `json:"actionId,omitempty"`
23	RoleAssignment *RoleAssignmentDetails `json:"roleAssignment,omitempty"`
24}
25
26// CheckPrincipalAccessRequest check access request details
27type CheckPrincipalAccessRequest struct {
28	// Subject - Subject details
29	Subject *SubjectInfo `json:"subject,omitempty"`
30	// Actions - List of actions.
31	Actions *[]RequiredAction `json:"actions,omitempty"`
32	// Scope - Scope at which the check access is done.
33	Scope *string `json:"scope,omitempty"`
34}
35
36// CheckPrincipalAccessResponse check access response details
37type CheckPrincipalAccessResponse struct {
38	autorest.Response `json:"-"`
39	// AccessDecisions - To check if the current user, group, or service principal has permission to read artifacts in the specified workspace.
40	AccessDecisions *[]CheckAccessDecision `json:"AccessDecisions,omitempty"`
41}
42
43// ErrorContract contains details when the response code indicates an error.
44type ErrorContract struct {
45	// Error - The error details.
46	Error *ErrorResponse `json:"error,omitempty"`
47}
48
49// ErrorDetail ...
50type ErrorDetail struct {
51	Code    *string `json:"code,omitempty"`
52	Message *string `json:"message,omitempty"`
53	Target  *string `json:"target,omitempty"`
54}
55
56// ErrorResponse ...
57type ErrorResponse struct {
58	Code    *string        `json:"code,omitempty"`
59	Message *string        `json:"message,omitempty"`
60	Target  *string        `json:"target,omitempty"`
61	Details *[]ErrorDetail `json:"details,omitempty"`
62}
63
64// ListString ...
65type ListString struct {
66	autorest.Response `json:"-"`
67	Value             *[]string `json:"value,omitempty"`
68}
69
70// ListSynapseRoleDefinition ...
71type ListSynapseRoleDefinition struct {
72	autorest.Response `json:"-"`
73	Value             *[]SynapseRoleDefinition `json:"value,omitempty"`
74}
75
76// RequiredAction action Info
77type RequiredAction struct {
78	// ID - Action Id.
79	ID *string `json:"id,omitempty"`
80	// IsDataAction - Is a data action or not.
81	IsDataAction *bool `json:"isDataAction,omitempty"`
82}
83
84// RoleAssignmentDetails role Assignment response details
85type RoleAssignmentDetails struct {
86	autorest.Response `json:"-"`
87	// ID - Role Assignment ID
88	ID *string `json:"id,omitempty"`
89	// RoleDefinitionID - Role ID of the Synapse Built-In Role
90	RoleDefinitionID *uuid.UUID `json:"roleDefinitionId,omitempty"`
91	// PrincipalID - Object ID of the AAD principal or security-group
92	PrincipalID *uuid.UUID `json:"principalId,omitempty"`
93	// Scope - Scope at the role assignment is created
94	Scope *string `json:"scope,omitempty"`
95	// PrincipalType - Type of the principal Id: User, Group or ServicePrincipal
96	PrincipalType *string `json:"principalType,omitempty"`
97}
98
99// RoleAssignmentDetailsList role Assignment response details
100type RoleAssignmentDetailsList struct {
101	autorest.Response `json:"-"`
102	// Count - Number of role assignments
103	Count *int32 `json:"count,omitempty"`
104	// Value - A list of role assignments
105	Value *[]RoleAssignmentDetails `json:"value,omitempty"`
106}
107
108// RoleAssignmentRequest role Assignment request details
109type RoleAssignmentRequest struct {
110	// RoleID - Role ID of the Synapse Built-In Role
111	RoleID *uuid.UUID `json:"roleId,omitempty"`
112	// PrincipalID - Object ID of the AAD principal or security-group
113	PrincipalID *uuid.UUID `json:"principalId,omitempty"`
114	// Scope - Scope at which the role assignment is created
115	Scope *string `json:"scope,omitempty"`
116	// PrincipalType - Type of the principal Id: User, Group or ServicePrincipal
117	PrincipalType *string `json:"principalType,omitempty"`
118}
119
120// SubjectInfo subject details
121type SubjectInfo struct {
122	// PrincipalID - Principal Id
123	PrincipalID *uuid.UUID `json:"principalId,omitempty"`
124	// GroupIds - List of group Ids that the principalId is part of.
125	GroupIds *[]uuid.UUID `json:"groupIds,omitempty"`
126}
127
128// SynapseRbacPermission synapse role definition details
129type SynapseRbacPermission struct {
130	// Actions - List of actions
131	Actions *[]string `json:"actions,omitempty"`
132	// NotActions - List of Not actions
133	NotActions *[]string `json:"notActions,omitempty"`
134	// DataActions - List of data actions
135	DataActions *[]string `json:"dataActions,omitempty"`
136	// NotDataActions - List of Not data actions
137	NotDataActions *[]string `json:"notDataActions,omitempty"`
138}
139
140// SynapseRoleDefinition synapse role definition details
141type SynapseRoleDefinition struct {
142	autorest.Response `json:"-"`
143	// ID - Role Definition ID
144	ID *uuid.UUID `json:"id,omitempty"`
145	// Name - Name of the Synapse role
146	Name *string `json:"name,omitempty"`
147	// IsBuiltIn - Is a built-in role or not
148	IsBuiltIn *bool `json:"isBuiltIn,omitempty"`
149	// Description - Description for the Synapse role
150	Description *string `json:"description,omitempty"`
151	// Permissions - Permissions for the Synapse role
152	Permissions *[]SynapseRbacPermission `json:"permissions,omitempty"`
153	// Scopes - Allowed scopes for the Synapse role
154	Scopes *[]string `json:"scopes,omitempty"`
155	// AvailabilityStatus - Availability of the Synapse role
156	AvailabilityStatus *string `json:"availabilityStatus,omitempty"`
157}
158