1package managementgroups 2 3// Copyright (c) Microsoft and contributors. All rights reserved. 4// 5// Licensed under the Apache License, Version 2.0 (the "License"); 6// you may not use this file except in compliance with the License. 7// You may obtain a copy of the License at 8// http://www.apache.org/licenses/LICENSE-2.0 9// 10// Unless required by applicable law or agreed to in writing, software 11// distributed under the License is distributed on an "AS IS" BASIS, 12// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13// 14// See the License for the specific language governing permissions and 15// limitations under the License. 16// 17// Code generated by Microsoft (R) AutoRest Code Generator. 18// Changes may cause incorrect behavior and will be lost if the code is regenerated. 19 20import ( 21 "encoding/json" 22 "github.com/Azure/go-autorest/autorest" 23 "github.com/Azure/go-autorest/autorest/azure" 24 "github.com/Azure/go-autorest/autorest/date" 25 "github.com/Azure/go-autorest/autorest/to" 26 "net/http" 27) 28 29// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/resources/mgmt/2018-01-01-preview/management instead. 30// Permissions enumerates the values for permissions. 31type Permissions string 32 33const ( 34 // Delete ... 35 Delete Permissions = "delete" 36 // Edit ... 37 Edit Permissions = "edit" 38 // Noaccess ... 39 Noaccess Permissions = "noaccess" 40 // View ... 41 View Permissions = "view" 42) 43 44// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/resources/mgmt/2018-01-01-preview/management instead. 45// PossiblePermissionsValues returns an array of possible values for the Permissions const type. 46func PossiblePermissionsValues() []Permissions { 47 return []Permissions{Delete, Edit, Noaccess, View} 48} 49 50// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/resources/mgmt/2018-01-01-preview/management instead. 51// Permissions1 enumerates the values for permissions 1. 52type Permissions1 string 53 54const ( 55 // Permissions1Delete ... 56 Permissions1Delete Permissions1 = "delete" 57 // Permissions1Edit ... 58 Permissions1Edit Permissions1 = "edit" 59 // Permissions1Noaccess ... 60 Permissions1Noaccess Permissions1 = "noaccess" 61 // Permissions1View ... 62 Permissions1View Permissions1 = "view" 63) 64 65// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/resources/mgmt/2018-01-01-preview/management instead. 66// PossiblePermissions1Values returns an array of possible values for the Permissions1 const type. 67func PossiblePermissions1Values() []Permissions1 { 68 return []Permissions1{Permissions1Delete, Permissions1Edit, Permissions1Noaccess, Permissions1View} 69} 70 71// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/resources/mgmt/2018-01-01-preview/management instead. 72// ProvisioningState enumerates the values for provisioning state. 73type ProvisioningState string 74 75const ( 76 // Updating ... 77 Updating ProvisioningState = "Updating" 78) 79 80// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/resources/mgmt/2018-01-01-preview/management instead. 81// PossibleProvisioningStateValues returns an array of possible values for the ProvisioningState const type. 82func PossibleProvisioningStateValues() []ProvisioningState { 83 return []ProvisioningState{Updating} 84} 85 86// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/resources/mgmt/2018-01-01-preview/management instead. 87// Reason enumerates the values for reason. 88type Reason string 89 90const ( 91 // AlreadyExists ... 92 AlreadyExists Reason = "AlreadyExists" 93 // Invalid ... 94 Invalid Reason = "Invalid" 95) 96 97// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/resources/mgmt/2018-01-01-preview/management instead. 98// PossibleReasonValues returns an array of possible values for the Reason const type. 99func PossibleReasonValues() []Reason { 100 return []Reason{AlreadyExists, Invalid} 101} 102 103// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/resources/mgmt/2018-01-01-preview/management instead. 104// Type enumerates the values for type. 105type Type string 106 107const ( 108 // ProvidersMicrosoftManagementmanagementGroup ... 109 ProvidersMicrosoftManagementmanagementGroup Type = "/providers/Microsoft.Management/managementGroup" 110) 111 112// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/resources/mgmt/2018-01-01-preview/management instead. 113// PossibleTypeValues returns an array of possible values for the Type const type. 114func PossibleTypeValues() []Type { 115 return []Type{ProvidersMicrosoftManagementmanagementGroup} 116} 117 118// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/resources/mgmt/2018-01-01-preview/management instead. 119// Type1 enumerates the values for type 1. 120type Type1 string 121 122const ( 123 // ProvidersMicrosoftManagementmanagementGroups ... 124 ProvidersMicrosoftManagementmanagementGroups Type1 = "/providers/Microsoft.Management/managementGroups" 125 // Subscriptions ... 126 Subscriptions Type1 = "/subscriptions" 127) 128 129// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/resources/mgmt/2018-01-01-preview/management instead. 130// PossibleType1Values returns an array of possible values for the Type1 const type. 131func PossibleType1Values() []Type1 { 132 return []Type1{ProvidersMicrosoftManagementmanagementGroups, Subscriptions} 133} 134 135// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/resources/mgmt/2018-01-01-preview/management instead. 136// Type2 enumerates the values for type 2. 137type Type2 string 138 139const ( 140 // Type2ProvidersMicrosoftManagementmanagementGroups ... 141 Type2ProvidersMicrosoftManagementmanagementGroups Type2 = "/providers/Microsoft.Management/managementGroups" 142 // Type2Subscriptions ... 143 Type2Subscriptions Type2 = "/subscriptions" 144) 145 146// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/resources/mgmt/2018-01-01-preview/management instead. 147// PossibleType2Values returns an array of possible values for the Type2 const type. 148func PossibleType2Values() []Type2 { 149 return []Type2{Type2ProvidersMicrosoftManagementmanagementGroups, Type2Subscriptions} 150} 151 152// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/resources/mgmt/2018-01-01-preview/management instead. 153// CheckNameAvailabilityRequest management group name availability check parameters. 154type CheckNameAvailabilityRequest struct { 155 // Name - the name to check for availability 156 Name *string `json:"name,omitempty"` 157 // Type - fully qualified resource type which includes provider namespace. Possible values include: 'ProvidersMicrosoftManagementmanagementGroup' 158 Type Type `json:"type,omitempty"` 159} 160 161// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/resources/mgmt/2018-01-01-preview/management instead. 162// CheckNameAvailabilityResult describes the result of the request to check management group name availability. 163type CheckNameAvailabilityResult struct { 164 autorest.Response `json:"-"` 165 // NameAvailable - Required. True indicates name is valid and available. False indicates the name is invalid, unavailable, or both. 166 NameAvailable *bool `json:"nameAvailable,omitempty"` 167 // Reason - Required if nameAvailable == false. Invalid indicates the name provided does not match the resource provider's naming requirements (incorrect length, unsupported characters, etc.) AlreadyExists indicates that the name is already in use and is therefore unavailable. Possible values include: 'Invalid', 'AlreadyExists' 168 Reason Reason `json:"reason,omitempty"` 169 // Message - Required if nameAvailable == false. Localized. If reason == invalid, provide the user with the reason why the given name is invalid, and provide the resource naming requirements so that the user can select a valid name. If reason == AlreadyExists, explain that is already in use, and direct them to select a different name. 170 Message *string `json:"message,omitempty"` 171} 172 173// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/resources/mgmt/2018-01-01-preview/management instead. 174// ChildInfo the child information of a management group. 175type ChildInfo struct { 176 // Type - The fully qualified resource type which includes provider namespace (e.g. /providers/Microsoft.Management/managementGroups). Possible values include: 'ProvidersMicrosoftManagementmanagementGroups', 'Subscriptions' 177 Type Type1 `json:"type,omitempty"` 178 // ID - The fully qualified ID for the child resource (management group or subscription). For example, /providers/Microsoft.Management/managementGroups/0000000-0000-0000-0000-000000000000 179 ID *string `json:"id,omitempty"` 180 // Name - The name of the child entity. 181 Name *string `json:"name,omitempty"` 182 // DisplayName - The friendly name of the child resource. 183 DisplayName *string `json:"displayName,omitempty"` 184 // Roles - The roles definitions associated with the management group. 185 Roles *[]string `json:"roles,omitempty"` 186 // Children - The list of children. 187 Children *[]ChildInfo `json:"children,omitempty"` 188} 189 190// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/resources/mgmt/2018-01-01-preview/management instead. 191// CreateManagementGroupChildInfo the child information of a management group used during creation. 192type CreateManagementGroupChildInfo struct { 193 // Type - The fully qualified resource type which includes provider namespace (e.g. /providers/Microsoft.Management/managementGroups). Possible values include: 'Type2ProvidersMicrosoftManagementmanagementGroups', 'Type2Subscriptions' 194 Type Type2 `json:"type,omitempty"` 195 // ID - The fully qualified ID for the child resource (management group or subscription). For example, /providers/Microsoft.Management/managementGroups/0000000-0000-0000-0000-000000000000 196 ID *string `json:"id,omitempty"` 197 // Name - The name of the child entity. 198 Name *string `json:"name,omitempty"` 199 // DisplayName - The friendly name of the child resource. 200 DisplayName *string `json:"displayName,omitempty"` 201 // Roles - The roles definitions associated with the management group. 202 Roles *[]string `json:"roles,omitempty"` 203 // Children - The list of children. 204 Children *[]CreateManagementGroupChildInfo `json:"children,omitempty"` 205} 206 207// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/resources/mgmt/2018-01-01-preview/management instead. 208// CreateManagementGroupDetails the details of a management group used during creation. 209type CreateManagementGroupDetails struct { 210 // Version - The version number of the object. 211 Version *float64 `json:"version,omitempty"` 212 // UpdatedTime - The date and time when this object was last updated. 213 UpdatedTime *date.Time `json:"updatedTime,omitempty"` 214 // UpdatedBy - The identity of the principal or process that updated the object. 215 UpdatedBy *string `json:"updatedBy,omitempty"` 216 Parent *CreateParentGroupInfo `json:"parent,omitempty"` 217} 218 219// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/resources/mgmt/2018-01-01-preview/management instead. 220// CreateManagementGroupProperties the generic properties of a management group used during creation. 221type CreateManagementGroupProperties struct { 222 // TenantID - The AAD Tenant ID associated with the management group. For example, 00000000-0000-0000-0000-000000000000 223 TenantID *string `json:"tenantId,omitempty"` 224 // DisplayName - The friendly name of the management group. If no value is passed then this field will be set to the groupId. 225 DisplayName *string `json:"displayName,omitempty"` 226 // Roles - The roles definitions associated with the management group. 227 Roles *[]string `json:"roles,omitempty"` 228 Details *CreateManagementGroupDetails `json:"details,omitempty"` 229 // Children - The list of children. 230 Children *[]CreateManagementGroupChildInfo `json:"children,omitempty"` 231} 232 233// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/resources/mgmt/2018-01-01-preview/management instead. 234// CreateManagementGroupRequest management group creation parameters. 235type CreateManagementGroupRequest struct { 236 // ID - The fully qualified ID for the management group. For example, /providers/Microsoft.Management/managementGroups/0000000-0000-0000-0000-000000000000 237 ID *string `json:"id,omitempty"` 238 // Type - The type of the resource. For example, /providers/Microsoft.Management/managementGroups 239 Type *string `json:"type,omitempty"` 240 // Name - The name of the management group. For example, 00000000-0000-0000-0000-000000000000 241 Name *string `json:"name,omitempty"` 242 *CreateManagementGroupProperties `json:"properties,omitempty"` 243} 244 245// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/resources/mgmt/2018-01-01-preview/management instead. 246// MarshalJSON is the custom marshaler for CreateManagementGroupRequest. 247func (cmgr CreateManagementGroupRequest) MarshalJSON() ([]byte, error) { 248 objectMap := make(map[string]interface{}) 249 if cmgr.ID != nil { 250 objectMap["id"] = cmgr.ID 251 } 252 if cmgr.Type != nil { 253 objectMap["type"] = cmgr.Type 254 } 255 if cmgr.Name != nil { 256 objectMap["name"] = cmgr.Name 257 } 258 if cmgr.CreateManagementGroupProperties != nil { 259 objectMap["properties"] = cmgr.CreateManagementGroupProperties 260 } 261 return json.Marshal(objectMap) 262} 263 264// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/resources/mgmt/2018-01-01-preview/management instead. 265// UnmarshalJSON is the custom unmarshaler for CreateManagementGroupRequest struct. 266func (cmgr *CreateManagementGroupRequest) UnmarshalJSON(body []byte) error { 267 var m map[string]*json.RawMessage 268 err := json.Unmarshal(body, &m) 269 if err != nil { 270 return err 271 } 272 for k, v := range m { 273 switch k { 274 case "id": 275 if v != nil { 276 var ID string 277 err = json.Unmarshal(*v, &ID) 278 if err != nil { 279 return err 280 } 281 cmgr.ID = &ID 282 } 283 case "type": 284 if v != nil { 285 var typeVar string 286 err = json.Unmarshal(*v, &typeVar) 287 if err != nil { 288 return err 289 } 290 cmgr.Type = &typeVar 291 } 292 case "name": 293 if v != nil { 294 var name string 295 err = json.Unmarshal(*v, &name) 296 if err != nil { 297 return err 298 } 299 cmgr.Name = &name 300 } 301 case "properties": 302 if v != nil { 303 var createManagementGroupProperties CreateManagementGroupProperties 304 err = json.Unmarshal(*v, &createManagementGroupProperties) 305 if err != nil { 306 return err 307 } 308 cmgr.CreateManagementGroupProperties = &createManagementGroupProperties 309 } 310 } 311 } 312 313 return nil 314} 315 316// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/resources/mgmt/2018-01-01-preview/management instead. 317// CreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running operation. 318type CreateOrUpdateFuture struct { 319 azure.Future 320 req *http.Request 321} 322 323// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/resources/mgmt/2018-01-01-preview/management instead. 324// Result returns the result of the asynchronous operation. 325// If the operation has not completed it will return an error. 326func (future CreateOrUpdateFuture) Result(client Client) (so SetObject, err error) { 327 var done bool 328 done, err = future.Done(client) 329 if err != nil { 330 err = autorest.NewErrorWithError(err, "managementgroups.CreateOrUpdateFuture", "Result", future.Response(), "Polling failure") 331 return 332 } 333 if !done { 334 return so, azure.NewAsyncOpIncompleteError("managementgroups.CreateOrUpdateFuture") 335 } 336 if future.PollingMethod() == azure.PollingLocation { 337 so, err = client.CreateOrUpdateResponder(future.Response()) 338 if err != nil { 339 err = autorest.NewErrorWithError(err, "managementgroups.CreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request") 340 } 341 return 342 } 343 var req *http.Request 344 var resp *http.Response 345 if future.PollingURL() != "" { 346 req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil) 347 if err != nil { 348 return 349 } 350 } else { 351 req = autorest.ChangeToGet(future.req) 352 } 353 resp, err = autorest.SendWithSender(client, req, 354 autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 355 if err != nil { 356 err = autorest.NewErrorWithError(err, "managementgroups.CreateOrUpdateFuture", "Result", resp, "Failure sending request") 357 return 358 } 359 so, err = client.CreateOrUpdateResponder(resp) 360 if err != nil { 361 err = autorest.NewErrorWithError(err, "managementgroups.CreateOrUpdateFuture", "Result", resp, "Failure responding to request") 362 } 363 return 364} 365 366// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/resources/mgmt/2018-01-01-preview/management instead. 367// CreateParentGroupInfo (Optional) The ID of the parent management group used during creation. 368type CreateParentGroupInfo struct { 369 // ID - The fully qualified ID for the parent management group. For example, /providers/Microsoft.Management/managementGroups/0000000-0000-0000-0000-000000000000 370 ID *string `json:"id,omitempty"` 371 // Name - The name of the parent management group 372 Name *string `json:"name,omitempty"` 373 // DisplayName - The friendly name of the parent management group. 374 DisplayName *string `json:"displayName,omitempty"` 375} 376 377// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/resources/mgmt/2018-01-01-preview/management instead. 378// DeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation. 379type DeleteFuture struct { 380 azure.Future 381 req *http.Request 382} 383 384// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/resources/mgmt/2018-01-01-preview/management instead. 385// Result returns the result of the asynchronous operation. 386// If the operation has not completed it will return an error. 387func (future DeleteFuture) Result(client Client) (or OperationResults, err error) { 388 var done bool 389 done, err = future.Done(client) 390 if err != nil { 391 err = autorest.NewErrorWithError(err, "managementgroups.DeleteFuture", "Result", future.Response(), "Polling failure") 392 return 393 } 394 if !done { 395 return or, azure.NewAsyncOpIncompleteError("managementgroups.DeleteFuture") 396 } 397 if future.PollingMethod() == azure.PollingLocation { 398 or, err = client.DeleteResponder(future.Response()) 399 if err != nil { 400 err = autorest.NewErrorWithError(err, "managementgroups.DeleteFuture", "Result", future.Response(), "Failure responding to request") 401 } 402 return 403 } 404 var req *http.Request 405 var resp *http.Response 406 if future.PollingURL() != "" { 407 req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil) 408 if err != nil { 409 return 410 } 411 } else { 412 req = autorest.ChangeToGet(future.req) 413 } 414 resp, err = autorest.SendWithSender(client, req, 415 autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 416 if err != nil { 417 err = autorest.NewErrorWithError(err, "managementgroups.DeleteFuture", "Result", resp, "Failure sending request") 418 return 419 } 420 or, err = client.DeleteResponder(resp) 421 if err != nil { 422 err = autorest.NewErrorWithError(err, "managementgroups.DeleteFuture", "Result", resp, "Failure responding to request") 423 } 424 return 425} 426 427// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/resources/mgmt/2018-01-01-preview/management instead. 428// Details the details of a management group. 429type Details struct { 430 // Version - The version number of the object. 431 Version *float64 `json:"version,omitempty"` 432 // UpdatedTime - The date and time when this object was last updated. 433 UpdatedTime *date.Time `json:"updatedTime,omitempty"` 434 // UpdatedBy - The identity of the principal or process that updated the object. 435 UpdatedBy *string `json:"updatedBy,omitempty"` 436 Parent *ParentGroupInfo `json:"parent,omitempty"` 437} 438 439// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/resources/mgmt/2018-01-01-preview/management instead. 440// EntityHierarchyItem the management group details for the hierarchy view. 441type EntityHierarchyItem struct { 442 // ID - The fully qualified ID for the management group. For example, /providers/Microsoft.Management/managementGroups/0000000-0000-0000-0000-000000000000 443 ID *string `json:"id,omitempty"` 444 // Type - The type of the resource. For example, /providers/Microsoft.Management/managementGroups 445 Type *string `json:"type,omitempty"` 446 // Name - The name of the management group. For example, 00000000-0000-0000-0000-000000000000 447 Name *string `json:"name,omitempty"` 448 *EntityHierarchyItemProperties `json:"properties,omitempty"` 449} 450 451// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/resources/mgmt/2018-01-01-preview/management instead. 452// MarshalJSON is the custom marshaler for EntityHierarchyItem. 453func (ehi EntityHierarchyItem) MarshalJSON() ([]byte, error) { 454 objectMap := make(map[string]interface{}) 455 if ehi.ID != nil { 456 objectMap["id"] = ehi.ID 457 } 458 if ehi.Type != nil { 459 objectMap["type"] = ehi.Type 460 } 461 if ehi.Name != nil { 462 objectMap["name"] = ehi.Name 463 } 464 if ehi.EntityHierarchyItemProperties != nil { 465 objectMap["properties"] = ehi.EntityHierarchyItemProperties 466 } 467 return json.Marshal(objectMap) 468} 469 470// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/resources/mgmt/2018-01-01-preview/management instead. 471// UnmarshalJSON is the custom unmarshaler for EntityHierarchyItem struct. 472func (ehi *EntityHierarchyItem) UnmarshalJSON(body []byte) error { 473 var m map[string]*json.RawMessage 474 err := json.Unmarshal(body, &m) 475 if err != nil { 476 return err 477 } 478 for k, v := range m { 479 switch k { 480 case "id": 481 if v != nil { 482 var ID string 483 err = json.Unmarshal(*v, &ID) 484 if err != nil { 485 return err 486 } 487 ehi.ID = &ID 488 } 489 case "type": 490 if v != nil { 491 var typeVar string 492 err = json.Unmarshal(*v, &typeVar) 493 if err != nil { 494 return err 495 } 496 ehi.Type = &typeVar 497 } 498 case "name": 499 if v != nil { 500 var name string 501 err = json.Unmarshal(*v, &name) 502 if err != nil { 503 return err 504 } 505 ehi.Name = &name 506 } 507 case "properties": 508 if v != nil { 509 var entityHierarchyItemProperties EntityHierarchyItemProperties 510 err = json.Unmarshal(*v, &entityHierarchyItemProperties) 511 if err != nil { 512 return err 513 } 514 ehi.EntityHierarchyItemProperties = &entityHierarchyItemProperties 515 } 516 } 517 } 518 519 return nil 520} 521 522// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/resources/mgmt/2018-01-01-preview/management instead. 523// EntityHierarchyItemProperties the generic properties of a management group. 524type EntityHierarchyItemProperties struct { 525 // DisplayName - The friendly name of the management group. 526 DisplayName *string `json:"displayName,omitempty"` 527 // Permissions - Possible values include: 'Permissions1Noaccess', 'Permissions1View', 'Permissions1Edit', 'Permissions1Delete' 528 Permissions Permissions1 `json:"permissions,omitempty"` 529 // Children - The list of children. 530 Children *[]EntityHierarchyItem `json:"children,omitempty"` 531} 532 533// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/resources/mgmt/2018-01-01-preview/management instead. 534// EntityInfo the entity. 535type EntityInfo struct { 536 // ID - The fully qualified ID for the entity. For example, /providers/Microsoft.Management/managementGroups/0000000-0000-0000-0000-000000000000 537 ID *string `json:"id,omitempty"` 538 // Type - The type of the resource. For example, /providers/Microsoft.Management/managementGroups 539 Type *string `json:"type,omitempty"` 540 // Name - The name of the entity. For example, 00000000-0000-0000-0000-000000000000 541 Name *string `json:"name,omitempty"` 542 *EntityInfoProperties `json:"properties,omitempty"` 543} 544 545// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/resources/mgmt/2018-01-01-preview/management instead. 546// MarshalJSON is the custom marshaler for EntityInfo. 547func (ei EntityInfo) MarshalJSON() ([]byte, error) { 548 objectMap := make(map[string]interface{}) 549 if ei.ID != nil { 550 objectMap["id"] = ei.ID 551 } 552 if ei.Type != nil { 553 objectMap["type"] = ei.Type 554 } 555 if ei.Name != nil { 556 objectMap["name"] = ei.Name 557 } 558 if ei.EntityInfoProperties != nil { 559 objectMap["properties"] = ei.EntityInfoProperties 560 } 561 return json.Marshal(objectMap) 562} 563 564// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/resources/mgmt/2018-01-01-preview/management instead. 565// UnmarshalJSON is the custom unmarshaler for EntityInfo struct. 566func (ei *EntityInfo) UnmarshalJSON(body []byte) error { 567 var m map[string]*json.RawMessage 568 err := json.Unmarshal(body, &m) 569 if err != nil { 570 return err 571 } 572 for k, v := range m { 573 switch k { 574 case "id": 575 if v != nil { 576 var ID string 577 err = json.Unmarshal(*v, &ID) 578 if err != nil { 579 return err 580 } 581 ei.ID = &ID 582 } 583 case "type": 584 if v != nil { 585 var typeVar string 586 err = json.Unmarshal(*v, &typeVar) 587 if err != nil { 588 return err 589 } 590 ei.Type = &typeVar 591 } 592 case "name": 593 if v != nil { 594 var name string 595 err = json.Unmarshal(*v, &name) 596 if err != nil { 597 return err 598 } 599 ei.Name = &name 600 } 601 case "properties": 602 if v != nil { 603 var entityInfoProperties EntityInfoProperties 604 err = json.Unmarshal(*v, &entityInfoProperties) 605 if err != nil { 606 return err 607 } 608 ei.EntityInfoProperties = &entityInfoProperties 609 } 610 } 611 } 612 613 return nil 614} 615 616// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/resources/mgmt/2018-01-01-preview/management instead. 617// EntityInfoProperties the generic properties of an entity. 618type EntityInfoProperties struct { 619 // TenantID - The AAD Tenant ID associated with the entity. For example, 00000000-0000-0000-0000-000000000000 620 TenantID *string `json:"tenantId,omitempty"` 621 // DisplayName - The friendly name of the management group. 622 DisplayName *string `json:"displayName,omitempty"` 623 Parent *EntityParentGroupInfo `json:"parent,omitempty"` 624 // Permissions - Possible values include: 'Noaccess', 'View', 'Edit', 'Delete' 625 Permissions Permissions `json:"permissions,omitempty"` 626} 627 628// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/resources/mgmt/2018-01-01-preview/management instead. 629// EntityListResult describes the result of the request to view entities. 630type EntityListResult struct { 631 autorest.Response `json:"-"` 632 // Value - The list of entities. 633 Value *[]EntityInfo `json:"value,omitempty"` 634 // NextLink - The URL to use for getting the next set of results. 635 NextLink *string `json:"nextLink,omitempty"` 636} 637 638// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/resources/mgmt/2018-01-01-preview/management instead. 639// EntityListResultIterator provides access to a complete listing of EntityInfo values. 640type EntityListResultIterator struct { 641 i int 642 page EntityListResultPage 643} 644 645// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/resources/mgmt/2018-01-01-preview/management instead. 646// Next advances to the next value. If there was an error making 647// the request the iterator does not advance and the error is returned. 648func (iter *EntityListResultIterator) Next() error { 649 iter.i++ 650 if iter.i < len(iter.page.Values()) { 651 return nil 652 } 653 err := iter.page.Next() 654 if err != nil { 655 iter.i-- 656 return err 657 } 658 iter.i = 0 659 return nil 660} 661 662// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/resources/mgmt/2018-01-01-preview/management instead. 663// NotDone returns true if the enumeration should be started or is not yet complete. 664func (iter EntityListResultIterator) NotDone() bool { 665 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 666} 667 668// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/resources/mgmt/2018-01-01-preview/management instead. 669// Response returns the raw server response from the last page request. 670func (iter EntityListResultIterator) Response() EntityListResult { 671 return iter.page.Response() 672} 673 674// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/resources/mgmt/2018-01-01-preview/management instead. 675// Value returns the current value or a zero-initialized value if the 676// iterator has advanced beyond the end of the collection. 677func (iter EntityListResultIterator) Value() EntityInfo { 678 if !iter.page.NotDone() { 679 return EntityInfo{} 680 } 681 return iter.page.Values()[iter.i] 682} 683 684// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/resources/mgmt/2018-01-01-preview/management instead. 685// IsEmpty returns true if the ListResult contains no values. 686func (elr EntityListResult) IsEmpty() bool { 687 return elr.Value == nil || len(*elr.Value) == 0 688} 689 690// entityListResultPreparer prepares a request to retrieve the next set of results. 691// It returns nil if no more results exist. 692func (elr EntityListResult) entityListResultPreparer() (*http.Request, error) { 693 if elr.NextLink == nil || len(to.String(elr.NextLink)) < 1 { 694 return nil, nil 695 } 696 return autorest.Prepare(&http.Request{}, 697 autorest.AsJSON(), 698 autorest.AsGet(), 699 autorest.WithBaseURL(to.String(elr.NextLink))) 700} 701 702// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/resources/mgmt/2018-01-01-preview/management instead. 703// EntityListResultPage contains a page of EntityInfo values. 704type EntityListResultPage struct { 705 fn func(EntityListResult) (EntityListResult, error) 706 elr EntityListResult 707} 708 709// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/resources/mgmt/2018-01-01-preview/management instead. 710// Next advances to the next page of values. If there was an error making 711// the request the page does not advance and the error is returned. 712func (page *EntityListResultPage) Next() error { 713 next, err := page.fn(page.elr) 714 if err != nil { 715 return err 716 } 717 page.elr = next 718 return nil 719} 720 721// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/resources/mgmt/2018-01-01-preview/management instead. 722// NotDone returns true if the page enumeration should be started or is not yet complete. 723func (page EntityListResultPage) NotDone() bool { 724 return !page.elr.IsEmpty() 725} 726 727// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/resources/mgmt/2018-01-01-preview/management instead. 728// Response returns the raw server response from the last page request. 729func (page EntityListResultPage) Response() EntityListResult { 730 return page.elr 731} 732 733// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/resources/mgmt/2018-01-01-preview/management instead. 734// Values returns the slice of values for the current page or nil if there are no values. 735func (page EntityListResultPage) Values() []EntityInfo { 736 if page.elr.IsEmpty() { 737 return nil 738 } 739 return *page.elr.Value 740} 741 742// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/resources/mgmt/2018-01-01-preview/management instead. 743// EntityParentGroupInfo (Optional) The ID of the parent management group. 744type EntityParentGroupInfo struct { 745 // ID - The fully qualified ID for the parent management group. For example, /providers/Microsoft.Management/managementGroups/0000000-0000-0000-0000-000000000000 746 ID *string `json:"id,omitempty"` 747} 748 749// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/resources/mgmt/2018-01-01-preview/management instead. 750// ErrorDetails the details of the error. 751type ErrorDetails struct { 752 // Code - One of a server-defined set of error codes. 753 Code *string `json:"code,omitempty"` 754 // Message - A human-readable representation of the error. 755 Message *string `json:"message,omitempty"` 756 // Details - A human-readable representation of the error's details. 757 Details *string `json:"details,omitempty"` 758} 759 760// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/resources/mgmt/2018-01-01-preview/management instead. 761// ErrorResponse the error object. 762type ErrorResponse struct { 763 Error *ErrorDetails `json:"error,omitempty"` 764} 765 766// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/resources/mgmt/2018-01-01-preview/management instead. 767// Info the management group resource. 768type Info struct { 769 // ID - The fully qualified ID for the management group. For example, /providers/Microsoft.Management/managementGroups/0000000-0000-0000-0000-000000000000 770 ID *string `json:"id,omitempty"` 771 // Type - The type of the resource. For example, /providers/Microsoft.Management/managementGroups 772 Type *string `json:"type,omitempty"` 773 // Name - The name of the management group. For example, 00000000-0000-0000-0000-000000000000 774 Name *string `json:"name,omitempty"` 775 *InfoProperties `json:"properties,omitempty"` 776} 777 778// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/resources/mgmt/2018-01-01-preview/management instead. 779// MarshalJSON is the custom marshaler for Info. 780func (i Info) MarshalJSON() ([]byte, error) { 781 objectMap := make(map[string]interface{}) 782 if i.ID != nil { 783 objectMap["id"] = i.ID 784 } 785 if i.Type != nil { 786 objectMap["type"] = i.Type 787 } 788 if i.Name != nil { 789 objectMap["name"] = i.Name 790 } 791 if i.InfoProperties != nil { 792 objectMap["properties"] = i.InfoProperties 793 } 794 return json.Marshal(objectMap) 795} 796 797// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/resources/mgmt/2018-01-01-preview/management instead. 798// UnmarshalJSON is the custom unmarshaler for Info struct. 799func (i *Info) UnmarshalJSON(body []byte) error { 800 var m map[string]*json.RawMessage 801 err := json.Unmarshal(body, &m) 802 if err != nil { 803 return err 804 } 805 for k, v := range m { 806 switch k { 807 case "id": 808 if v != nil { 809 var ID string 810 err = json.Unmarshal(*v, &ID) 811 if err != nil { 812 return err 813 } 814 i.ID = &ID 815 } 816 case "type": 817 if v != nil { 818 var typeVar string 819 err = json.Unmarshal(*v, &typeVar) 820 if err != nil { 821 return err 822 } 823 i.Type = &typeVar 824 } 825 case "name": 826 if v != nil { 827 var name string 828 err = json.Unmarshal(*v, &name) 829 if err != nil { 830 return err 831 } 832 i.Name = &name 833 } 834 case "properties": 835 if v != nil { 836 var infoProperties InfoProperties 837 err = json.Unmarshal(*v, &infoProperties) 838 if err != nil { 839 return err 840 } 841 i.InfoProperties = &infoProperties 842 } 843 } 844 } 845 846 return nil 847} 848 849// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/resources/mgmt/2018-01-01-preview/management instead. 850// InfoProperties the generic properties of a management group. 851type InfoProperties struct { 852 // TenantID - The AAD Tenant ID associated with the management group. For example, 00000000-0000-0000-0000-000000000000 853 TenantID *string `json:"tenantId,omitempty"` 854 // DisplayName - The friendly name of the management group. 855 DisplayName *string `json:"displayName,omitempty"` 856} 857 858// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/resources/mgmt/2018-01-01-preview/management instead. 859// ListResult describes the result of the request to list management groups. 860type ListResult struct { 861 autorest.Response `json:"-"` 862 // Value - The list of management groups. 863 Value *[]Info `json:"value,omitempty"` 864 // NextLink - The URL to use for getting the next set of results. 865 NextLink *string `json:"nextLink,omitempty"` 866} 867 868// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/resources/mgmt/2018-01-01-preview/management instead. 869// ListResultIterator provides access to a complete listing of Info values. 870type ListResultIterator struct { 871 i int 872 page ListResultPage 873} 874 875// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/resources/mgmt/2018-01-01-preview/management instead. 876// Next advances to the next value. If there was an error making 877// the request the iterator does not advance and the error is returned. 878func (iter *ListResultIterator) Next() error { 879 iter.i++ 880 if iter.i < len(iter.page.Values()) { 881 return nil 882 } 883 err := iter.page.Next() 884 if err != nil { 885 iter.i-- 886 return err 887 } 888 iter.i = 0 889 return nil 890} 891 892// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/resources/mgmt/2018-01-01-preview/management instead. 893// NotDone returns true if the enumeration should be started or is not yet complete. 894func (iter ListResultIterator) NotDone() bool { 895 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 896} 897 898// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/resources/mgmt/2018-01-01-preview/management instead. 899// Response returns the raw server response from the last page request. 900func (iter ListResultIterator) Response() ListResult { 901 return iter.page.Response() 902} 903 904// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/resources/mgmt/2018-01-01-preview/management instead. 905// Value returns the current value or a zero-initialized value if the 906// iterator has advanced beyond the end of the collection. 907func (iter ListResultIterator) Value() Info { 908 if !iter.page.NotDone() { 909 return Info{} 910 } 911 return iter.page.Values()[iter.i] 912} 913 914// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/resources/mgmt/2018-01-01-preview/management instead. 915// IsEmpty returns true if the ListResult contains no values. 916func (lr ListResult) IsEmpty() bool { 917 return lr.Value == nil || len(*lr.Value) == 0 918} 919 920// listResultPreparer prepares a request to retrieve the next set of results. 921// It returns nil if no more results exist. 922func (lr ListResult) listResultPreparer() (*http.Request, error) { 923 if lr.NextLink == nil || len(to.String(lr.NextLink)) < 1 { 924 return nil, nil 925 } 926 return autorest.Prepare(&http.Request{}, 927 autorest.AsJSON(), 928 autorest.AsGet(), 929 autorest.WithBaseURL(to.String(lr.NextLink))) 930} 931 932// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/resources/mgmt/2018-01-01-preview/management instead. 933// ListResultPage contains a page of Info values. 934type ListResultPage struct { 935 fn func(ListResult) (ListResult, error) 936 lr ListResult 937} 938 939// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/resources/mgmt/2018-01-01-preview/management instead. 940// Next advances to the next page of values. If there was an error making 941// the request the page does not advance and the error is returned. 942func (page *ListResultPage) Next() error { 943 next, err := page.fn(page.lr) 944 if err != nil { 945 return err 946 } 947 page.lr = next 948 return nil 949} 950 951// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/resources/mgmt/2018-01-01-preview/management instead. 952// NotDone returns true if the page enumeration should be started or is not yet complete. 953func (page ListResultPage) NotDone() bool { 954 return !page.lr.IsEmpty() 955} 956 957// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/resources/mgmt/2018-01-01-preview/management instead. 958// Response returns the raw server response from the last page request. 959func (page ListResultPage) Response() ListResult { 960 return page.lr 961} 962 963// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/resources/mgmt/2018-01-01-preview/management instead. 964// Values returns the slice of values for the current page or nil if there are no values. 965func (page ListResultPage) Values() []Info { 966 if page.lr.IsEmpty() { 967 return nil 968 } 969 return *page.lr.Value 970} 971 972// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/resources/mgmt/2018-01-01-preview/management instead. 973// ManagementGroup the management group details. 974type ManagementGroup struct { 975 autorest.Response `json:"-"` 976 // ID - The fully qualified ID for the management group. For example, /providers/Microsoft.Management/managementGroups/0000000-0000-0000-0000-000000000000 977 ID *string `json:"id,omitempty"` 978 // Type - The type of the resource. For example, /providers/Microsoft.Management/managementGroups 979 Type *string `json:"type,omitempty"` 980 // Name - The name of the management group. For example, 00000000-0000-0000-0000-000000000000 981 Name *string `json:"name,omitempty"` 982 *Properties `json:"properties,omitempty"` 983} 984 985// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/resources/mgmt/2018-01-01-preview/management instead. 986// MarshalJSON is the custom marshaler for ManagementGroup. 987func (mg ManagementGroup) MarshalJSON() ([]byte, error) { 988 objectMap := make(map[string]interface{}) 989 if mg.ID != nil { 990 objectMap["id"] = mg.ID 991 } 992 if mg.Type != nil { 993 objectMap["type"] = mg.Type 994 } 995 if mg.Name != nil { 996 objectMap["name"] = mg.Name 997 } 998 if mg.Properties != nil { 999 objectMap["properties"] = mg.Properties 1000 } 1001 return json.Marshal(objectMap) 1002} 1003 1004// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/resources/mgmt/2018-01-01-preview/management instead. 1005// UnmarshalJSON is the custom unmarshaler for ManagementGroup struct. 1006func (mg *ManagementGroup) UnmarshalJSON(body []byte) error { 1007 var m map[string]*json.RawMessage 1008 err := json.Unmarshal(body, &m) 1009 if err != nil { 1010 return err 1011 } 1012 for k, v := range m { 1013 switch k { 1014 case "id": 1015 if v != nil { 1016 var ID string 1017 err = json.Unmarshal(*v, &ID) 1018 if err != nil { 1019 return err 1020 } 1021 mg.ID = &ID 1022 } 1023 case "type": 1024 if v != nil { 1025 var typeVar string 1026 err = json.Unmarshal(*v, &typeVar) 1027 if err != nil { 1028 return err 1029 } 1030 mg.Type = &typeVar 1031 } 1032 case "name": 1033 if v != nil { 1034 var name string 1035 err = json.Unmarshal(*v, &name) 1036 if err != nil { 1037 return err 1038 } 1039 mg.Name = &name 1040 } 1041 case "properties": 1042 if v != nil { 1043 var properties Properties 1044 err = json.Unmarshal(*v, &properties) 1045 if err != nil { 1046 return err 1047 } 1048 mg.Properties = &properties 1049 } 1050 } 1051 } 1052 1053 return nil 1054} 1055 1056// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/resources/mgmt/2018-01-01-preview/management instead. 1057// Operation operation supported by the Microsoft.Management resource provider. 1058type Operation struct { 1059 // Name - Operation name: {provider}/{resource}/{operation}. 1060 Name *string `json:"name,omitempty"` 1061 Display *OperationDisplayProperties `json:"display,omitempty"` 1062} 1063 1064// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/resources/mgmt/2018-01-01-preview/management instead. 1065// OperationDisplayProperties the object that represents the operation. 1066type OperationDisplayProperties struct { 1067 // Provider - The name of the provider. 1068 Provider *string `json:"provider,omitempty"` 1069 // Resource - The resource on which the operation is performed. 1070 Resource *string `json:"resource,omitempty"` 1071 // Operation - The operation that can be performed. 1072 Operation *string `json:"operation,omitempty"` 1073 // Description - Operation description. 1074 Description *string `json:"description,omitempty"` 1075} 1076 1077// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/resources/mgmt/2018-01-01-preview/management instead. 1078// OperationListResult describes the result of the request to list Microsoft.Management operations. 1079type OperationListResult struct { 1080 autorest.Response `json:"-"` 1081 // Value - List of operations supported by the Microsoft.Management resource provider. 1082 Value *[]Operation `json:"value,omitempty"` 1083 // NextLink - URL to get the next set of operation list results if there are any. 1084 NextLink *string `json:"nextLink,omitempty"` 1085} 1086 1087// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/resources/mgmt/2018-01-01-preview/management instead. 1088// OperationListResultIterator provides access to a complete listing of Operation values. 1089type OperationListResultIterator struct { 1090 i int 1091 page OperationListResultPage 1092} 1093 1094// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/resources/mgmt/2018-01-01-preview/management instead. 1095// Next advances to the next value. If there was an error making 1096// the request the iterator does not advance and the error is returned. 1097func (iter *OperationListResultIterator) Next() error { 1098 iter.i++ 1099 if iter.i < len(iter.page.Values()) { 1100 return nil 1101 } 1102 err := iter.page.Next() 1103 if err != nil { 1104 iter.i-- 1105 return err 1106 } 1107 iter.i = 0 1108 return nil 1109} 1110 1111// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/resources/mgmt/2018-01-01-preview/management instead. 1112// NotDone returns true if the enumeration should be started or is not yet complete. 1113func (iter OperationListResultIterator) NotDone() bool { 1114 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 1115} 1116 1117// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/resources/mgmt/2018-01-01-preview/management instead. 1118// Response returns the raw server response from the last page request. 1119func (iter OperationListResultIterator) Response() OperationListResult { 1120 return iter.page.Response() 1121} 1122 1123// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/resources/mgmt/2018-01-01-preview/management instead. 1124// Value returns the current value or a zero-initialized value if the 1125// iterator has advanced beyond the end of the collection. 1126func (iter OperationListResultIterator) Value() Operation { 1127 if !iter.page.NotDone() { 1128 return Operation{} 1129 } 1130 return iter.page.Values()[iter.i] 1131} 1132 1133// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/resources/mgmt/2018-01-01-preview/management instead. 1134// IsEmpty returns true if the ListResult contains no values. 1135func (olr OperationListResult) IsEmpty() bool { 1136 return olr.Value == nil || len(*olr.Value) == 0 1137} 1138 1139// operationListResultPreparer prepares a request to retrieve the next set of results. 1140// It returns nil if no more results exist. 1141func (olr OperationListResult) operationListResultPreparer() (*http.Request, error) { 1142 if olr.NextLink == nil || len(to.String(olr.NextLink)) < 1 { 1143 return nil, nil 1144 } 1145 return autorest.Prepare(&http.Request{}, 1146 autorest.AsJSON(), 1147 autorest.AsGet(), 1148 autorest.WithBaseURL(to.String(olr.NextLink))) 1149} 1150 1151// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/resources/mgmt/2018-01-01-preview/management instead. 1152// OperationListResultPage contains a page of Operation values. 1153type OperationListResultPage struct { 1154 fn func(OperationListResult) (OperationListResult, error) 1155 olr OperationListResult 1156} 1157 1158// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/resources/mgmt/2018-01-01-preview/management instead. 1159// Next advances to the next page of values. If there was an error making 1160// the request the page does not advance and the error is returned. 1161func (page *OperationListResultPage) Next() error { 1162 next, err := page.fn(page.olr) 1163 if err != nil { 1164 return err 1165 } 1166 page.olr = next 1167 return nil 1168} 1169 1170// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/resources/mgmt/2018-01-01-preview/management instead. 1171// NotDone returns true if the page enumeration should be started or is not yet complete. 1172func (page OperationListResultPage) NotDone() bool { 1173 return !page.olr.IsEmpty() 1174} 1175 1176// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/resources/mgmt/2018-01-01-preview/management instead. 1177// Response returns the raw server response from the last page request. 1178func (page OperationListResultPage) Response() OperationListResult { 1179 return page.olr 1180} 1181 1182// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/resources/mgmt/2018-01-01-preview/management instead. 1183// Values returns the slice of values for the current page or nil if there are no values. 1184func (page OperationListResultPage) Values() []Operation { 1185 if page.olr.IsEmpty() { 1186 return nil 1187 } 1188 return *page.olr.Value 1189} 1190 1191// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/resources/mgmt/2018-01-01-preview/management instead. 1192// OperationResults the results of an asynchronous operation. 1193type OperationResults struct { 1194 autorest.Response `json:"-"` 1195 // ID - The fully qualified ID for the management group. For example, /providers/Microsoft.Management/managementGroups/0000000-0000-0000-0000-000000000000 1196 ID *string `json:"id,omitempty"` 1197 // Type - The type of the resource. For example, /providers/Microsoft.Management/managementGroups 1198 Type *string `json:"type,omitempty"` 1199 // Name - The name of the management group. For example, 00000000-0000-0000-0000-000000000000 1200 Name *string `json:"name,omitempty"` 1201 *OperationResultsProperties `json:"properties,omitempty"` 1202} 1203 1204// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/resources/mgmt/2018-01-01-preview/management instead. 1205// MarshalJSON is the custom marshaler for OperationResults. 1206func (or OperationResults) MarshalJSON() ([]byte, error) { 1207 objectMap := make(map[string]interface{}) 1208 if or.ID != nil { 1209 objectMap["id"] = or.ID 1210 } 1211 if or.Type != nil { 1212 objectMap["type"] = or.Type 1213 } 1214 if or.Name != nil { 1215 objectMap["name"] = or.Name 1216 } 1217 if or.OperationResultsProperties != nil { 1218 objectMap["properties"] = or.OperationResultsProperties 1219 } 1220 return json.Marshal(objectMap) 1221} 1222 1223// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/resources/mgmt/2018-01-01-preview/management instead. 1224// UnmarshalJSON is the custom unmarshaler for OperationResults struct. 1225func (or *OperationResults) UnmarshalJSON(body []byte) error { 1226 var m map[string]*json.RawMessage 1227 err := json.Unmarshal(body, &m) 1228 if err != nil { 1229 return err 1230 } 1231 for k, v := range m { 1232 switch k { 1233 case "id": 1234 if v != nil { 1235 var ID string 1236 err = json.Unmarshal(*v, &ID) 1237 if err != nil { 1238 return err 1239 } 1240 or.ID = &ID 1241 } 1242 case "type": 1243 if v != nil { 1244 var typeVar string 1245 err = json.Unmarshal(*v, &typeVar) 1246 if err != nil { 1247 return err 1248 } 1249 or.Type = &typeVar 1250 } 1251 case "name": 1252 if v != nil { 1253 var name string 1254 err = json.Unmarshal(*v, &name) 1255 if err != nil { 1256 return err 1257 } 1258 or.Name = &name 1259 } 1260 case "properties": 1261 if v != nil { 1262 var operationResultsProperties OperationResultsProperties 1263 err = json.Unmarshal(*v, &operationResultsProperties) 1264 if err != nil { 1265 return err 1266 } 1267 or.OperationResultsProperties = &operationResultsProperties 1268 } 1269 } 1270 } 1271 1272 return nil 1273} 1274 1275// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/resources/mgmt/2018-01-01-preview/management instead. 1276// OperationResultsProperties ... 1277type OperationResultsProperties struct { 1278 // ProvisioningState - Possible values include: 'Updating' 1279 ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` 1280} 1281 1282// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/resources/mgmt/2018-01-01-preview/management instead. 1283// ParentGroupInfo (Optional) The ID of the parent management group. 1284type ParentGroupInfo struct { 1285 // ID - The fully qualified ID for the parent management group. For example, /providers/Microsoft.Management/managementGroups/0000000-0000-0000-0000-000000000000 1286 ID *string `json:"id,omitempty"` 1287 // Name - The name of the parent management group 1288 Name *string `json:"name,omitempty"` 1289 // DisplayName - The friendly name of the parent management group. 1290 DisplayName *string `json:"displayName,omitempty"` 1291} 1292 1293// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/resources/mgmt/2018-01-01-preview/management instead. 1294// PatchManagementGroupRequest management group patch parameters. 1295type PatchManagementGroupRequest struct { 1296 // DisplayName - The friendly name of the management group. 1297 DisplayName *string `json:"displayName,omitempty"` 1298 // ParentID - (Optional) The fully qualified ID for the parent management group. For example, /providers/Microsoft.Management/managementGroups/0000000-0000-0000-0000-000000000000 1299 ParentID *string `json:"parentId,omitempty"` 1300} 1301 1302// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/resources/mgmt/2018-01-01-preview/management instead. 1303// Properties the generic properties of a management group. 1304type Properties struct { 1305 // TenantID - The AAD Tenant ID associated with the management group. For example, 00000000-0000-0000-0000-000000000000 1306 TenantID *string `json:"tenantId,omitempty"` 1307 // DisplayName - The friendly name of the management group. 1308 DisplayName *string `json:"displayName,omitempty"` 1309 // Roles - The role definitions associated with the management group. 1310 Roles *[]string `json:"roles,omitempty"` 1311 Details *Details `json:"details,omitempty"` 1312 // Children - The list of children. 1313 Children *[]ChildInfo `json:"children,omitempty"` 1314} 1315 1316// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/resources/mgmt/2018-01-01-preview/management instead. 1317// SetObject ... 1318type SetObject struct { 1319 autorest.Response `json:"-"` 1320 Value interface{} `json:"value,omitempty"` 1321} 1322