1 //go:build go1.18
2 // +build go1.18
3 4 // Copyright (c) Microsoft Corporation. All rights reserved.
5 // Licensed under the MIT License. See License.txt in the project root for license information.
6 // Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT.
7 // Changes may cause incorrect behavior and will be lost if the code is regenerated.
8 9 package armresourcegraph
10 11 import "time"
12 13 // Column - Query result column descriptor.
14 type Column struct {
15 // REQUIRED; Column name.
16 Name *string
17 18 // REQUIRED; Column data type.
19 Type *ColumnDataType
20 }
21 22 // DateTimeInterval - An interval in time specifying the date and time for the inclusive start and exclusive end, i.e. [start,
23 // end).
24 type DateTimeInterval struct {
25 // REQUIRED; A datetime indicating the exclusive/open end of the time interval, i.e. [start,end). Specifying an end that occurs
26 // chronologically before start will result in an error.
27 End *time.Time
28 29 // REQUIRED; A datetime indicating the inclusive/closed start of the time interval, i.e. [start, end). Specifying a start
30 // that occurs chronologically after end will result in an error.
31 Start *time.Time
32 }
33 34 // Error details.
35 type Error struct {
36 // REQUIRED; Error code identifying the specific error.
37 Code *string
38 39 // REQUIRED; A human readable error message.
40 Message *string
41 42 // Error details
43 Details []*ErrorDetails
44 }
45 46 // ErrorDetails - Error details.
47 type ErrorDetails struct {
48 // REQUIRED; Error code identifying the specific error.
49 Code *string
50 51 // REQUIRED; A human readable error message.
52 Message *string
53 54 // OPTIONAL; Contains additional key/value pairs not defined in the schema.
55 AdditionalProperties map[string]any
56 }
57 58 // ErrorResponse - An error response from the API.
59 type ErrorResponse struct {
60 // REQUIRED; Error information.
61 Error *Error
62 }
63 64 // Facet - A facet containing additional statistics on the response of a query. Can be either FacetResult or FacetError.
65 type Facet struct {
66 // REQUIRED; Facet expression, same as in the corresponding facet request.
67 Expression *string
68 69 // REQUIRED; Result type
70 ResultType *string
71 }
72 73 // GetFacet implements the FacetClassification interface for type Facet.
74 func (f *Facet) GetFacet() *Facet { return f }
75 76 // FacetError - A facet whose execution resulted in an error.
77 type FacetError struct {
78 // REQUIRED; An array containing detected facet errors with details.
79 Errors []*ErrorDetails
80 81 // REQUIRED; Facet expression, same as in the corresponding facet request.
82 Expression *string
83 84 // REQUIRED; Result type
85 ResultType *string
86 }
87 88 // GetFacet implements the FacetClassification interface for type FacetError.
89 func (f *FacetError) GetFacet() *Facet {
90 return &Facet{
91 Expression: f.Expression,
92 ResultType: f.ResultType,
93 }
94 }
95 96 // FacetRequest - A request to compute additional statistics (facets) over the query results.
97 type FacetRequest struct {
98 // REQUIRED; The column or list of columns to summarize by
99 Expression *string
100 101 // The options for facet evaluation
102 Options *FacetRequestOptions
103 }
104 105 // FacetRequestOptions - The options for facet evaluation
106 type FacetRequestOptions struct {
107 // Specifies the filter condition for the 'where' clause which will be run on main query's result, just before the actual
108 // faceting.
109 Filter *string
110 111 // The column name or query expression to sort on. Defaults to count if not present.
112 SortBy *string
113 114 // The sorting order by the selected column (count by default).
115 SortOrder *FacetSortOrder
116 117 // The maximum number of facet rows that should be returned.
118 Top *int32
119 }
120 121 // FacetResult - Successfully executed facet containing additional statistics on the response of a query.
122 type FacetResult struct {
123 // REQUIRED; Number of records returned in the facet response.
124 Count *int32
125 126 // REQUIRED; A JObject array or Table containing the desired facets. Only present if the facet is valid.
127 Data any
128 129 // REQUIRED; Facet expression, same as in the corresponding facet request.
130 Expression *string
131 132 // REQUIRED; Result type
133 ResultType *string
134 135 // REQUIRED; Number of total records in the facet results.
136 TotalRecords *int64
137 }
138 139 // GetFacet implements the FacetClassification interface for type FacetResult.
140 func (f *FacetResult) GetFacet() *Facet {
141 return &Facet{
142 Expression: f.Expression,
143 ResultType: f.ResultType,
144 }
145 }
146 147 // Operation - Resource Graph REST API operation definition.
148 type Operation struct {
149 // Display metadata associated with the operation.
150 Display *OperationDisplay
151 152 // Operation name: {provider}/{resource}/{operation}
153 Name *string
154 155 // The origin of operations.
156 Origin *string
157 }
158 159 // OperationDisplay - Display metadata associated with the operation.
160 type OperationDisplay struct {
161 // Description for the operation.
162 Description *string
163 164 // Type of operation: get, read, delete, etc.
165 Operation *string
166 167 // Service provider: Microsoft Resource Graph.
168 Provider *string
169 170 // Resource on which the operation is performed etc.
171 Resource *string
172 }
173 174 // OperationListResult - Result of the request to list Resource Graph operations. It contains a list of operations and a URL
175 // link to get the next set of results.
176 type OperationListResult struct {
177 // List of Resource Graph operations supported by the Resource Graph resource provider.
178 Value []*Operation
179 }
180 181 // QueryRequest - Describes a query to be executed.
182 type QueryRequest struct {
183 // REQUIRED; The resources query.
184 Query *string
185 186 // An array of facet requests to be computed against the query result.
187 Facets []*FacetRequest
188 189 // Azure management groups against which to execute the query. Example: [ 'mg1', 'mg2' ]
190 ManagementGroups []*string
191 192 // The query evaluation options
193 Options *QueryRequestOptions
194 195 // Azure subscriptions against which to execute the query.
196 Subscriptions []*string
197 }
198 199 // QueryRequestOptions - The options for query evaluation
200 type QueryRequestOptions struct {
201 // Only applicable for tenant and management group level queries to decide whether to allow partial scopes for result in case
202 // the number of subscriptions exceed allowed limits.
203 AllowPartialScopes *bool
204 205 // Defines what level of authorization resources should be returned based on the which subscriptions and management groups
206 // are passed as scopes.
207 AuthorizationScopeFilter *AuthorizationScopeFilter
208 209 // Defines in which format query result returned.
210 ResultFormat *ResultFormat
211 212 // The number of rows to skip from the beginning of the results. Overrides the next page offset when $skipToken property is
213 // present.
214 Skip *int32
215 216 // Continuation token for pagination, capturing the next page size and offset, as well as the context of the query.
217 SkipToken *string
218 219 // The maximum number of rows that the query should return. Overrides the page size when $skipToken property is present.
220 Top *int32
221 }
222 223 // QueryResponse - Query result.
224 type QueryResponse struct {
225 // REQUIRED; Number of records returned in the current response. In the case of paging, this is the number of records in the
226 // current page.
227 Count *int64
228 229 // REQUIRED; Query output in JObject array or Table format.
230 Data any
231 232 // REQUIRED; Indicates whether the query results are truncated.
233 ResultTruncated *ResultTruncated
234 235 // REQUIRED; Number of total records matching the query.
236 TotalRecords *int64
237 238 // Query facets.
239 Facets []FacetClassification
240 241 // When present, the value can be passed to a subsequent query call (together with the same query and scopes used in the current
242 // request) to retrieve the next page of data.
243 SkipToken *string
244 }
245 246 // ResourcesHistoryRequest - Describes a history request to be executed.
247 type ResourcesHistoryRequest struct {
248 // Azure management groups against which to execute the query. Example: [ 'mg1', 'mg2' ]
249 ManagementGroups []*string
250 251 // The history request evaluation options
252 Options *ResourcesHistoryRequestOptions
253 254 // The resources query.
255 Query *string
256 257 // Azure subscriptions against which to execute the query.
258 Subscriptions []*string
259 }
260 261 // ResourcesHistoryRequestOptions - The options for history request evaluation
262 type ResourcesHistoryRequestOptions struct {
263 // The time interval used to fetch history.
264 Interval *DateTimeInterval
265 266 // Defines in which format query result returned.
267 ResultFormat *ResultFormat
268 269 // The number of rows to skip from the beginning of the results. Overrides the next page offset when $skipToken property is
270 // present.
271 Skip *int32
272 273 // Continuation token for pagination, capturing the next page size and offset, as well as the context of the query.
274 SkipToken *string
275 276 // The maximum number of rows that the query should return. Overrides the page size when $skipToken property is present.
277 Top *int32
278 }
279 280 // Table - Query output in tabular format.
281 type Table struct {
282 // REQUIRED; Query result column descriptors.
283 Columns []*Column
284 285 // REQUIRED; Query result rows.
286 Rows [][]any
287 }
288