1// +build go1.13 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// Code generated by Microsoft (R) AutoRest Code Generator. 6// Changes may cause incorrect behavior and will be lost if the code is regenerated. 7 8package armresources 9 10import ( 11 "encoding/json" 12 "github.com/Azure/azure-sdk-for-go/sdk/azcore" 13 "reflect" 14 "time" 15) 16 17type APIProfile struct { 18 // READ-ONLY; The API version. 19 APIVersion *string `json:"apiVersion,omitempty" azure:"ro"` 20 21 // READ-ONLY; The profile version. 22 ProfileVersion *string `json:"profileVersion,omitempty" azure:"ro"` 23} 24 25// Alias - The alias type. 26type Alias struct { 27 // The default path for an alias. 28 DefaultPath *string `json:"defaultPath,omitempty"` 29 30 // The default pattern for an alias. 31 DefaultPattern *AliasPattern `json:"defaultPattern,omitempty"` 32 33 // The alias name. 34 Name *string `json:"name,omitempty"` 35 36 // The paths for an alias. 37 Paths []*AliasPath `json:"paths,omitempty"` 38 39 // The type of the alias. 40 Type *AliasType `json:"type,omitempty"` 41 42 // READ-ONLY; The default alias path metadata. Applies to the default path and to any alias path that doesn't have metadata 43 DefaultMetadata *AliasPathMetadata `json:"defaultMetadata,omitempty" azure:"ro"` 44} 45 46// MarshalJSON implements the json.Marshaller interface for type Alias. 47func (a Alias) MarshalJSON() ([]byte, error) { 48 objectMap := make(map[string]interface{}) 49 populate(objectMap, "defaultMetadata", a.DefaultMetadata) 50 populate(objectMap, "defaultPath", a.DefaultPath) 51 populate(objectMap, "defaultPattern", a.DefaultPattern) 52 populate(objectMap, "name", a.Name) 53 populate(objectMap, "paths", a.Paths) 54 populate(objectMap, "type", a.Type) 55 return json.Marshal(objectMap) 56} 57 58// AliasPath - The type of the paths for alias. 59type AliasPath struct { 60 // The API versions. 61 APIVersions []*string `json:"apiVersions,omitempty"` 62 63 // The path of an alias. 64 Path *string `json:"path,omitempty"` 65 66 // The pattern for an alias path. 67 Pattern *AliasPattern `json:"pattern,omitempty"` 68 69 // READ-ONLY; The metadata of the alias path. If missing, fall back to the default metadata of the alias. 70 Metadata *AliasPathMetadata `json:"metadata,omitempty" azure:"ro"` 71} 72 73// MarshalJSON implements the json.Marshaller interface for type AliasPath. 74func (a AliasPath) MarshalJSON() ([]byte, error) { 75 objectMap := make(map[string]interface{}) 76 populate(objectMap, "apiVersions", a.APIVersions) 77 populate(objectMap, "metadata", a.Metadata) 78 populate(objectMap, "path", a.Path) 79 populate(objectMap, "pattern", a.Pattern) 80 return json.Marshal(objectMap) 81} 82 83type AliasPathMetadata struct { 84 // READ-ONLY; The attributes of the token that the alias path is referring to. 85 Attributes *AliasPathAttributes `json:"attributes,omitempty" azure:"ro"` 86 87 // READ-ONLY; The type of the token that the alias path is referring to. 88 Type *AliasPathTokenType `json:"type,omitempty" azure:"ro"` 89} 90 91// AliasPattern - The type of the pattern for an alias path. 92type AliasPattern struct { 93 // The alias pattern phrase. 94 Phrase *string `json:"phrase,omitempty"` 95 96 // The type of alias pattern 97 Type *AliasPatternType `json:"type,omitempty"` 98 99 // The alias pattern variable. 100 Variable *string `json:"variable,omitempty"` 101} 102 103// BasicDependency - Deployment dependency information. 104type BasicDependency struct { 105 // The ID of the dependency. 106 ID *string `json:"id,omitempty"` 107 108 // The dependency resource name. 109 ResourceName *string `json:"resourceName,omitempty"` 110 111 // The dependency resource type. 112 ResourceType *string `json:"resourceType,omitempty"` 113} 114 115// CloudError - An error response for a resource management request. 116// Implements the error and azcore.HTTPResponse interfaces. 117type CloudError struct { 118 raw string 119 // Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows the OData error response 120 // format.) 121 InnerError *ErrorResponse `json:"error,omitempty"` 122} 123 124// Error implements the error interface for type CloudError. 125// The contents of the error text are not contractual and subject to change. 126func (e CloudError) Error() string { 127 return e.raw 128} 129 130// DebugSetting - The debug setting. 131type DebugSetting struct { 132 // Specifies the type of information to log for debugging. The permitted values are none, requestContent, responseContent, or both requestContent and responseContent 133 // separated by a comma. The default is 134 // none. When setting this value, carefully consider the type of information you are passing in during deployment. By logging information about the request 135 // or response, you could potentially expose 136 // sensitive data that is retrieved through the deployment operations. 137 DetailLevel *string `json:"detailLevel,omitempty"` 138} 139 140// Dependency - Deployment dependency information. 141type Dependency struct { 142 // The list of dependencies. 143 DependsOn []*BasicDependency `json:"dependsOn,omitempty"` 144 145 // The ID of the dependency. 146 ID *string `json:"id,omitempty"` 147 148 // The dependency resource name. 149 ResourceName *string `json:"resourceName,omitempty"` 150 151 // The dependency resource type. 152 ResourceType *string `json:"resourceType,omitempty"` 153} 154 155// MarshalJSON implements the json.Marshaller interface for type Dependency. 156func (d Dependency) MarshalJSON() ([]byte, error) { 157 objectMap := make(map[string]interface{}) 158 populate(objectMap, "dependsOn", d.DependsOn) 159 populate(objectMap, "id", d.ID) 160 populate(objectMap, "resourceName", d.ResourceName) 161 populate(objectMap, "resourceType", d.ResourceType) 162 return json.Marshal(objectMap) 163} 164 165// Deployment operation parameters. 166type Deployment struct { 167 // REQUIRED; The deployment properties. 168 Properties *DeploymentProperties `json:"properties,omitempty"` 169 170 // The location to store the deployment data. 171 Location *string `json:"location,omitempty"` 172 173 // Deployment tags 174 Tags map[string]*string `json:"tags,omitempty"` 175} 176 177// MarshalJSON implements the json.Marshaller interface for type Deployment. 178func (d Deployment) MarshalJSON() ([]byte, error) { 179 objectMap := make(map[string]interface{}) 180 populate(objectMap, "location", d.Location) 181 populate(objectMap, "properties", d.Properties) 182 populate(objectMap, "tags", d.Tags) 183 return json.Marshal(objectMap) 184} 185 186// DeploymentExportResult - The deployment export result. 187type DeploymentExportResult struct { 188 // The template content. 189 Template map[string]interface{} `json:"template,omitempty"` 190} 191 192// DeploymentExtended - Deployment information. 193type DeploymentExtended struct { 194 // the location of the deployment. 195 Location *string `json:"location,omitempty"` 196 197 // Deployment properties. 198 Properties *DeploymentPropertiesExtended `json:"properties,omitempty"` 199 200 // Deployment tags 201 Tags map[string]*string `json:"tags,omitempty"` 202 203 // READ-ONLY; The ID of the deployment. 204 ID *string `json:"id,omitempty" azure:"ro"` 205 206 // READ-ONLY; The name of the deployment. 207 Name *string `json:"name,omitempty" azure:"ro"` 208 209 // READ-ONLY; The type of the deployment. 210 Type *string `json:"type,omitempty" azure:"ro"` 211} 212 213// MarshalJSON implements the json.Marshaller interface for type DeploymentExtended. 214func (d DeploymentExtended) MarshalJSON() ([]byte, error) { 215 objectMap := make(map[string]interface{}) 216 populate(objectMap, "id", d.ID) 217 populate(objectMap, "location", d.Location) 218 populate(objectMap, "name", d.Name) 219 populate(objectMap, "properties", d.Properties) 220 populate(objectMap, "tags", d.Tags) 221 populate(objectMap, "type", d.Type) 222 return json.Marshal(objectMap) 223} 224 225// DeploymentExtendedFilter - Deployment filter. 226type DeploymentExtendedFilter struct { 227 // The provisioning state. 228 ProvisioningState *string `json:"provisioningState,omitempty"` 229} 230 231// DeploymentListResult - List of deployments. 232type DeploymentListResult struct { 233 // An array of deployments. 234 Value []*DeploymentExtended `json:"value,omitempty"` 235 236 // READ-ONLY; The URL to use for getting the next set of results. 237 NextLink *string `json:"nextLink,omitempty" azure:"ro"` 238} 239 240// MarshalJSON implements the json.Marshaller interface for type DeploymentListResult. 241func (d DeploymentListResult) MarshalJSON() ([]byte, error) { 242 objectMap := make(map[string]interface{}) 243 populate(objectMap, "nextLink", d.NextLink) 244 populate(objectMap, "value", d.Value) 245 return json.Marshal(objectMap) 246} 247 248// DeploymentOperation - Deployment operation information. 249type DeploymentOperation struct { 250 // Deployment properties. 251 Properties *DeploymentOperationProperties `json:"properties,omitempty"` 252 253 // READ-ONLY; Full deployment operation ID. 254 ID *string `json:"id,omitempty" azure:"ro"` 255 256 // READ-ONLY; Deployment operation ID. 257 OperationID *string `json:"operationId,omitempty" azure:"ro"` 258} 259 260// DeploymentOperationProperties - Deployment operation properties. 261type DeploymentOperationProperties struct { 262 // READ-ONLY; The duration of the operation. 263 Duration *string `json:"duration,omitempty" azure:"ro"` 264 265 // READ-ONLY; The name of the current provisioning operation. 266 ProvisioningOperation *ProvisioningOperation `json:"provisioningOperation,omitempty" azure:"ro"` 267 268 // READ-ONLY; The state of the provisioning. 269 ProvisioningState *string `json:"provisioningState,omitempty" azure:"ro"` 270 271 // READ-ONLY; The HTTP request message. 272 Request *HTTPMessage `json:"request,omitempty" azure:"ro"` 273 274 // READ-ONLY; The HTTP response message. 275 Response *HTTPMessage `json:"response,omitempty" azure:"ro"` 276 277 // READ-ONLY; Deployment operation service request id. 278 ServiceRequestID *string `json:"serviceRequestId,omitempty" azure:"ro"` 279 280 // READ-ONLY; Operation status code from the resource provider. This property may not be set if a response has not yet been received. 281 StatusCode *string `json:"statusCode,omitempty" azure:"ro"` 282 283 // READ-ONLY; Operation status message from the resource provider. This property is optional. It will only be provided if an error was received from the 284 // resource provider. 285 StatusMessage *StatusMessage `json:"statusMessage,omitempty" azure:"ro"` 286 287 // READ-ONLY; The target resource. 288 TargetResource *TargetResource `json:"targetResource,omitempty" azure:"ro"` 289 290 // READ-ONLY; The date and time of the operation. 291 Timestamp *time.Time `json:"timestamp,omitempty" azure:"ro"` 292} 293 294// MarshalJSON implements the json.Marshaller interface for type DeploymentOperationProperties. 295func (d DeploymentOperationProperties) MarshalJSON() ([]byte, error) { 296 objectMap := make(map[string]interface{}) 297 populate(objectMap, "duration", d.Duration) 298 populate(objectMap, "provisioningOperation", d.ProvisioningOperation) 299 populate(objectMap, "provisioningState", d.ProvisioningState) 300 populate(objectMap, "request", d.Request) 301 populate(objectMap, "response", d.Response) 302 populate(objectMap, "serviceRequestId", d.ServiceRequestID) 303 populate(objectMap, "statusCode", d.StatusCode) 304 populate(objectMap, "statusMessage", d.StatusMessage) 305 populate(objectMap, "targetResource", d.TargetResource) 306 populate(objectMap, "timestamp", (*timeRFC3339)(d.Timestamp)) 307 return json.Marshal(objectMap) 308} 309 310// UnmarshalJSON implements the json.Unmarshaller interface for type DeploymentOperationProperties. 311func (d *DeploymentOperationProperties) UnmarshalJSON(data []byte) error { 312 var rawMsg map[string]json.RawMessage 313 if err := json.Unmarshal(data, &rawMsg); err != nil { 314 return err 315 } 316 for key, val := range rawMsg { 317 var err error 318 switch key { 319 case "duration": 320 err = unpopulate(val, &d.Duration) 321 delete(rawMsg, key) 322 case "provisioningOperation": 323 err = unpopulate(val, &d.ProvisioningOperation) 324 delete(rawMsg, key) 325 case "provisioningState": 326 err = unpopulate(val, &d.ProvisioningState) 327 delete(rawMsg, key) 328 case "request": 329 err = unpopulate(val, &d.Request) 330 delete(rawMsg, key) 331 case "response": 332 err = unpopulate(val, &d.Response) 333 delete(rawMsg, key) 334 case "serviceRequestId": 335 err = unpopulate(val, &d.ServiceRequestID) 336 delete(rawMsg, key) 337 case "statusCode": 338 err = unpopulate(val, &d.StatusCode) 339 delete(rawMsg, key) 340 case "statusMessage": 341 err = unpopulate(val, &d.StatusMessage) 342 delete(rawMsg, key) 343 case "targetResource": 344 err = unpopulate(val, &d.TargetResource) 345 delete(rawMsg, key) 346 case "timestamp": 347 var aux timeRFC3339 348 err = unpopulate(val, &aux) 349 d.Timestamp = (*time.Time)(&aux) 350 delete(rawMsg, key) 351 } 352 if err != nil { 353 return err 354 } 355 } 356 return nil 357} 358 359// DeploymentOperationsGetAtManagementGroupScopeOptions contains the optional parameters for the DeploymentOperations.GetAtManagementGroupScope method. 360type DeploymentOperationsGetAtManagementGroupScopeOptions struct { 361 // placeholder for future optional parameters 362} 363 364// DeploymentOperationsGetAtScopeOptions contains the optional parameters for the DeploymentOperations.GetAtScope method. 365type DeploymentOperationsGetAtScopeOptions struct { 366 // placeholder for future optional parameters 367} 368 369// DeploymentOperationsGetAtSubscriptionScopeOptions contains the optional parameters for the DeploymentOperations.GetAtSubscriptionScope method. 370type DeploymentOperationsGetAtSubscriptionScopeOptions struct { 371 // placeholder for future optional parameters 372} 373 374// DeploymentOperationsGetAtTenantScopeOptions contains the optional parameters for the DeploymentOperations.GetAtTenantScope method. 375type DeploymentOperationsGetAtTenantScopeOptions struct { 376 // placeholder for future optional parameters 377} 378 379// DeploymentOperationsGetOptions contains the optional parameters for the DeploymentOperations.Get method. 380type DeploymentOperationsGetOptions struct { 381 // placeholder for future optional parameters 382} 383 384// DeploymentOperationsListAtManagementGroupScopeOptions contains the optional parameters for the DeploymentOperations.ListAtManagementGroupScope method. 385type DeploymentOperationsListAtManagementGroupScopeOptions struct { 386 // The number of results to return. 387 Top *int32 388} 389 390// DeploymentOperationsListAtScopeOptions contains the optional parameters for the DeploymentOperations.ListAtScope method. 391type DeploymentOperationsListAtScopeOptions struct { 392 // The number of results to return. 393 Top *int32 394} 395 396// DeploymentOperationsListAtSubscriptionScopeOptions contains the optional parameters for the DeploymentOperations.ListAtSubscriptionScope method. 397type DeploymentOperationsListAtSubscriptionScopeOptions struct { 398 // The number of results to return. 399 Top *int32 400} 401 402// DeploymentOperationsListAtTenantScopeOptions contains the optional parameters for the DeploymentOperations.ListAtTenantScope method. 403type DeploymentOperationsListAtTenantScopeOptions struct { 404 // The number of results to return. 405 Top *int32 406} 407 408// DeploymentOperationsListOptions contains the optional parameters for the DeploymentOperations.List method. 409type DeploymentOperationsListOptions struct { 410 // The number of results to return. 411 Top *int32 412} 413 414// DeploymentOperationsListResult - List of deployment operations. 415type DeploymentOperationsListResult struct { 416 // An array of deployment operations. 417 Value []*DeploymentOperation `json:"value,omitempty"` 418 419 // READ-ONLY; The URL to use for getting the next set of results. 420 NextLink *string `json:"nextLink,omitempty" azure:"ro"` 421} 422 423// MarshalJSON implements the json.Marshaller interface for type DeploymentOperationsListResult. 424func (d DeploymentOperationsListResult) MarshalJSON() ([]byte, error) { 425 objectMap := make(map[string]interface{}) 426 populate(objectMap, "nextLink", d.NextLink) 427 populate(objectMap, "value", d.Value) 428 return json.Marshal(objectMap) 429} 430 431// DeploymentProperties - Deployment properties. 432type DeploymentProperties struct { 433 // REQUIRED; The mode that is used to deploy resources. This value can be either Incremental or Complete. In Incremental mode, resources are deployed without 434 // deleting existing resources that are not included in 435 // the template. In Complete mode, resources are deployed and existing resources in the resource group that are not included in the template are deleted. 436 // Be careful when using Complete mode as you may 437 // unintentionally delete resources. 438 Mode *DeploymentMode `json:"mode,omitempty"` 439 440 // The debug setting of the deployment. 441 DebugSetting *DebugSetting `json:"debugSetting,omitempty"` 442 443 // Specifies whether template expressions are evaluated within the scope of the parent template or nested template. Only applicable to nested templates. 444 // If not specified, default value is outer. 445 ExpressionEvaluationOptions *ExpressionEvaluationOptions `json:"expressionEvaluationOptions,omitempty"` 446 447 // The deployment on error behavior. 448 OnErrorDeployment *OnErrorDeployment `json:"onErrorDeployment,omitempty"` 449 450 // Name and value pairs that define the deployment parameters for the template. You use this element when you want to provide the parameter values directly 451 // in the request rather than link to an existing 452 // parameter file. Use either the parametersLink property or the parameters property, but not both. It can be a JObject or a well formed JSON string. 453 Parameters map[string]interface{} `json:"parameters,omitempty"` 454 455 // The URI of parameters file. You use this element to link to an existing parameters file. Use either the parametersLink property or the parameters property, 456 // but not both. 457 ParametersLink *ParametersLink `json:"parametersLink,omitempty"` 458 459 // The template content. You use this element when you want to pass the template syntax directly in the request rather than link to an existing template. 460 // It can be a JObject or well-formed JSON string. 461 // Use either the templateLink property or the template property, but not both. 462 Template map[string]interface{} `json:"template,omitempty"` 463 464 // The URI of the template. Use either the templateLink property or the template property, but not both. 465 TemplateLink *TemplateLink `json:"templateLink,omitempty"` 466} 467 468// DeploymentPropertiesExtended - Deployment properties with additional details. 469type DeploymentPropertiesExtended struct { 470 // READ-ONLY; The correlation ID of the deployment. 471 CorrelationID *string `json:"correlationId,omitempty" azure:"ro"` 472 473 // READ-ONLY; The debug setting of the deployment. 474 DebugSetting *DebugSetting `json:"debugSetting,omitempty" azure:"ro"` 475 476 // READ-ONLY; The list of deployment dependencies. 477 Dependencies []*Dependency `json:"dependencies,omitempty" azure:"ro"` 478 479 // READ-ONLY; The duration of the template deployment. 480 Duration *string `json:"duration,omitempty" azure:"ro"` 481 482 // READ-ONLY; The deployment error. 483 Error *ErrorResponse `json:"error,omitempty" azure:"ro"` 484 485 // READ-ONLY; The deployment mode. Possible values are Incremental and Complete. 486 Mode *DeploymentMode `json:"mode,omitempty" azure:"ro"` 487 488 // READ-ONLY; The deployment on error behavior. 489 OnErrorDeployment *OnErrorDeploymentExtended `json:"onErrorDeployment,omitempty" azure:"ro"` 490 491 // READ-ONLY; Array of provisioned resources. 492 OutputResources []*ResourceReference `json:"outputResources,omitempty" azure:"ro"` 493 494 // READ-ONLY; Key/value pairs that represent deployment output. 495 Outputs map[string]interface{} `json:"outputs,omitempty" azure:"ro"` 496 497 // READ-ONLY; Deployment parameters. 498 Parameters map[string]interface{} `json:"parameters,omitempty" azure:"ro"` 499 500 // READ-ONLY; The URI referencing the parameters. 501 ParametersLink *ParametersLink `json:"parametersLink,omitempty" azure:"ro"` 502 503 // READ-ONLY; The list of resource providers needed for the deployment. 504 Providers []*Provider `json:"providers,omitempty" azure:"ro"` 505 506 // READ-ONLY; Denotes the state of provisioning. 507 ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"` 508 509 // READ-ONLY; The hash produced for the template. 510 TemplateHash *string `json:"templateHash,omitempty" azure:"ro"` 511 512 // READ-ONLY; The URI referencing the template. 513 TemplateLink *TemplateLink `json:"templateLink,omitempty" azure:"ro"` 514 515 // READ-ONLY; The timestamp of the template deployment. 516 Timestamp *time.Time `json:"timestamp,omitempty" azure:"ro"` 517 518 // READ-ONLY; Array of validated resources. 519 ValidatedResources []*ResourceReference `json:"validatedResources,omitempty" azure:"ro"` 520} 521 522// MarshalJSON implements the json.Marshaller interface for type DeploymentPropertiesExtended. 523func (d DeploymentPropertiesExtended) MarshalJSON() ([]byte, error) { 524 objectMap := make(map[string]interface{}) 525 populate(objectMap, "correlationId", d.CorrelationID) 526 populate(objectMap, "debugSetting", d.DebugSetting) 527 populate(objectMap, "dependencies", d.Dependencies) 528 populate(objectMap, "duration", d.Duration) 529 populate(objectMap, "error", d.Error) 530 populate(objectMap, "mode", d.Mode) 531 populate(objectMap, "onErrorDeployment", d.OnErrorDeployment) 532 populate(objectMap, "outputResources", d.OutputResources) 533 populate(objectMap, "outputs", d.Outputs) 534 populate(objectMap, "parameters", d.Parameters) 535 populate(objectMap, "parametersLink", d.ParametersLink) 536 populate(objectMap, "providers", d.Providers) 537 populate(objectMap, "provisioningState", d.ProvisioningState) 538 populate(objectMap, "templateHash", d.TemplateHash) 539 populate(objectMap, "templateLink", d.TemplateLink) 540 populate(objectMap, "timestamp", (*timeRFC3339)(d.Timestamp)) 541 populate(objectMap, "validatedResources", d.ValidatedResources) 542 return json.Marshal(objectMap) 543} 544 545// UnmarshalJSON implements the json.Unmarshaller interface for type DeploymentPropertiesExtended. 546func (d *DeploymentPropertiesExtended) UnmarshalJSON(data []byte) error { 547 var rawMsg map[string]json.RawMessage 548 if err := json.Unmarshal(data, &rawMsg); err != nil { 549 return err 550 } 551 for key, val := range rawMsg { 552 var err error 553 switch key { 554 case "correlationId": 555 err = unpopulate(val, &d.CorrelationID) 556 delete(rawMsg, key) 557 case "debugSetting": 558 err = unpopulate(val, &d.DebugSetting) 559 delete(rawMsg, key) 560 case "dependencies": 561 err = unpopulate(val, &d.Dependencies) 562 delete(rawMsg, key) 563 case "duration": 564 err = unpopulate(val, &d.Duration) 565 delete(rawMsg, key) 566 case "error": 567 err = unpopulate(val, &d.Error) 568 delete(rawMsg, key) 569 case "mode": 570 err = unpopulate(val, &d.Mode) 571 delete(rawMsg, key) 572 case "onErrorDeployment": 573 err = unpopulate(val, &d.OnErrorDeployment) 574 delete(rawMsg, key) 575 case "outputResources": 576 err = unpopulate(val, &d.OutputResources) 577 delete(rawMsg, key) 578 case "outputs": 579 err = unpopulate(val, &d.Outputs) 580 delete(rawMsg, key) 581 case "parameters": 582 err = unpopulate(val, &d.Parameters) 583 delete(rawMsg, key) 584 case "parametersLink": 585 err = unpopulate(val, &d.ParametersLink) 586 delete(rawMsg, key) 587 case "providers": 588 err = unpopulate(val, &d.Providers) 589 delete(rawMsg, key) 590 case "provisioningState": 591 err = unpopulate(val, &d.ProvisioningState) 592 delete(rawMsg, key) 593 case "templateHash": 594 err = unpopulate(val, &d.TemplateHash) 595 delete(rawMsg, key) 596 case "templateLink": 597 err = unpopulate(val, &d.TemplateLink) 598 delete(rawMsg, key) 599 case "timestamp": 600 var aux timeRFC3339 601 err = unpopulate(val, &aux) 602 d.Timestamp = (*time.Time)(&aux) 603 delete(rawMsg, key) 604 case "validatedResources": 605 err = unpopulate(val, &d.ValidatedResources) 606 delete(rawMsg, key) 607 } 608 if err != nil { 609 return err 610 } 611 } 612 return nil 613} 614 615// DeploymentValidateResult - Information from validate template deployment response. 616type DeploymentValidateResult struct { 617 // The template deployment properties. 618 Properties *DeploymentPropertiesExtended `json:"properties,omitempty"` 619 620 // READ-ONLY; The deployment validation error. 621 Error *ErrorResponse `json:"error,omitempty" azure:"ro"` 622} 623 624// DeploymentWhatIf - Deployment What-if operation parameters. 625type DeploymentWhatIf struct { 626 // REQUIRED; The deployment properties. 627 Properties *DeploymentWhatIfProperties `json:"properties,omitempty"` 628 629 // The location to store the deployment data. 630 Location *string `json:"location,omitempty"` 631} 632 633// DeploymentWhatIfProperties - Deployment What-if properties. 634type DeploymentWhatIfProperties struct { 635 DeploymentProperties 636 // Optional What-If operation settings. 637 WhatIfSettings *DeploymentWhatIfSettings `json:"whatIfSettings,omitempty"` 638} 639 640// DeploymentWhatIfSettings - Deployment What-If operation settings. 641type DeploymentWhatIfSettings struct { 642 // The format of the What-If results 643 ResultFormat *WhatIfResultFormat `json:"resultFormat,omitempty"` 644} 645 646// DeploymentsBeginCreateOrUpdateAtManagementGroupScopeOptions contains the optional parameters for the Deployments.BeginCreateOrUpdateAtManagementGroupScope 647// method. 648type DeploymentsBeginCreateOrUpdateAtManagementGroupScopeOptions struct { 649 // placeholder for future optional parameters 650} 651 652// DeploymentsBeginCreateOrUpdateAtScopeOptions contains the optional parameters for the Deployments.BeginCreateOrUpdateAtScope method. 653type DeploymentsBeginCreateOrUpdateAtScopeOptions struct { 654 // placeholder for future optional parameters 655} 656 657// DeploymentsBeginCreateOrUpdateAtSubscriptionScopeOptions contains the optional parameters for the Deployments.BeginCreateOrUpdateAtSubscriptionScope 658// method. 659type DeploymentsBeginCreateOrUpdateAtSubscriptionScopeOptions struct { 660 // placeholder for future optional parameters 661} 662 663// DeploymentsBeginCreateOrUpdateAtTenantScopeOptions contains the optional parameters for the Deployments.BeginCreateOrUpdateAtTenantScope method. 664type DeploymentsBeginCreateOrUpdateAtTenantScopeOptions struct { 665 // placeholder for future optional parameters 666} 667 668// DeploymentsBeginCreateOrUpdateOptions contains the optional parameters for the Deployments.BeginCreateOrUpdate method. 669type DeploymentsBeginCreateOrUpdateOptions struct { 670 // placeholder for future optional parameters 671} 672 673// DeploymentsBeginDeleteAtManagementGroupScopeOptions contains the optional parameters for the Deployments.BeginDeleteAtManagementGroupScope method. 674type DeploymentsBeginDeleteAtManagementGroupScopeOptions struct { 675 // placeholder for future optional parameters 676} 677 678// DeploymentsBeginDeleteAtScopeOptions contains the optional parameters for the Deployments.BeginDeleteAtScope method. 679type DeploymentsBeginDeleteAtScopeOptions struct { 680 // placeholder for future optional parameters 681} 682 683// DeploymentsBeginDeleteAtSubscriptionScopeOptions contains the optional parameters for the Deployments.BeginDeleteAtSubscriptionScope method. 684type DeploymentsBeginDeleteAtSubscriptionScopeOptions struct { 685 // placeholder for future optional parameters 686} 687 688// DeploymentsBeginDeleteAtTenantScopeOptions contains the optional parameters for the Deployments.BeginDeleteAtTenantScope method. 689type DeploymentsBeginDeleteAtTenantScopeOptions struct { 690 // placeholder for future optional parameters 691} 692 693// DeploymentsBeginDeleteOptions contains the optional parameters for the Deployments.BeginDelete method. 694type DeploymentsBeginDeleteOptions struct { 695 // placeholder for future optional parameters 696} 697 698// DeploymentsBeginValidateAtManagementGroupScopeOptions contains the optional parameters for the Deployments.BeginValidateAtManagementGroupScope method. 699type DeploymentsBeginValidateAtManagementGroupScopeOptions struct { 700 // placeholder for future optional parameters 701} 702 703// DeploymentsBeginValidateAtScopeOptions contains the optional parameters for the Deployments.BeginValidateAtScope method. 704type DeploymentsBeginValidateAtScopeOptions struct { 705 // placeholder for future optional parameters 706} 707 708// DeploymentsBeginValidateAtSubscriptionScopeOptions contains the optional parameters for the Deployments.BeginValidateAtSubscriptionScope method. 709type DeploymentsBeginValidateAtSubscriptionScopeOptions struct { 710 // placeholder for future optional parameters 711} 712 713// DeploymentsBeginValidateAtTenantScopeOptions contains the optional parameters for the Deployments.BeginValidateAtTenantScope method. 714type DeploymentsBeginValidateAtTenantScopeOptions struct { 715 // placeholder for future optional parameters 716} 717 718// DeploymentsBeginValidateOptions contains the optional parameters for the Deployments.BeginValidate method. 719type DeploymentsBeginValidateOptions struct { 720 // placeholder for future optional parameters 721} 722 723// DeploymentsBeginWhatIfAtManagementGroupScopeOptions contains the optional parameters for the Deployments.BeginWhatIfAtManagementGroupScope method. 724type DeploymentsBeginWhatIfAtManagementGroupScopeOptions struct { 725 // placeholder for future optional parameters 726} 727 728// DeploymentsBeginWhatIfAtSubscriptionScopeOptions contains the optional parameters for the Deployments.BeginWhatIfAtSubscriptionScope method. 729type DeploymentsBeginWhatIfAtSubscriptionScopeOptions struct { 730 // placeholder for future optional parameters 731} 732 733// DeploymentsBeginWhatIfAtTenantScopeOptions contains the optional parameters for the Deployments.BeginWhatIfAtTenantScope method. 734type DeploymentsBeginWhatIfAtTenantScopeOptions struct { 735 // placeholder for future optional parameters 736} 737 738// DeploymentsBeginWhatIfOptions contains the optional parameters for the Deployments.BeginWhatIf method. 739type DeploymentsBeginWhatIfOptions struct { 740 // placeholder for future optional parameters 741} 742 743// DeploymentsCalculateTemplateHashOptions contains the optional parameters for the Deployments.CalculateTemplateHash method. 744type DeploymentsCalculateTemplateHashOptions struct { 745 // placeholder for future optional parameters 746} 747 748// DeploymentsCancelAtManagementGroupScopeOptions contains the optional parameters for the Deployments.CancelAtManagementGroupScope method. 749type DeploymentsCancelAtManagementGroupScopeOptions struct { 750 // placeholder for future optional parameters 751} 752 753// DeploymentsCancelAtScopeOptions contains the optional parameters for the Deployments.CancelAtScope method. 754type DeploymentsCancelAtScopeOptions struct { 755 // placeholder for future optional parameters 756} 757 758// DeploymentsCancelAtSubscriptionScopeOptions contains the optional parameters for the Deployments.CancelAtSubscriptionScope method. 759type DeploymentsCancelAtSubscriptionScopeOptions struct { 760 // placeholder for future optional parameters 761} 762 763// DeploymentsCancelAtTenantScopeOptions contains the optional parameters for the Deployments.CancelAtTenantScope method. 764type DeploymentsCancelAtTenantScopeOptions struct { 765 // placeholder for future optional parameters 766} 767 768// DeploymentsCancelOptions contains the optional parameters for the Deployments.Cancel method. 769type DeploymentsCancelOptions struct { 770 // placeholder for future optional parameters 771} 772 773// DeploymentsCheckExistenceAtManagementGroupScopeOptions contains the optional parameters for the Deployments.CheckExistenceAtManagementGroupScope method. 774type DeploymentsCheckExistenceAtManagementGroupScopeOptions struct { 775 // placeholder for future optional parameters 776} 777 778// DeploymentsCheckExistenceAtScopeOptions contains the optional parameters for the Deployments.CheckExistenceAtScope method. 779type DeploymentsCheckExistenceAtScopeOptions struct { 780 // placeholder for future optional parameters 781} 782 783// DeploymentsCheckExistenceAtSubscriptionScopeOptions contains the optional parameters for the Deployments.CheckExistenceAtSubscriptionScope method. 784type DeploymentsCheckExistenceAtSubscriptionScopeOptions struct { 785 // placeholder for future optional parameters 786} 787 788// DeploymentsCheckExistenceAtTenantScopeOptions contains the optional parameters for the Deployments.CheckExistenceAtTenantScope method. 789type DeploymentsCheckExistenceAtTenantScopeOptions struct { 790 // placeholder for future optional parameters 791} 792 793// DeploymentsCheckExistenceOptions contains the optional parameters for the Deployments.CheckExistence method. 794type DeploymentsCheckExistenceOptions struct { 795 // placeholder for future optional parameters 796} 797 798// DeploymentsExportTemplateAtManagementGroupScopeOptions contains the optional parameters for the Deployments.ExportTemplateAtManagementGroupScope method. 799type DeploymentsExportTemplateAtManagementGroupScopeOptions struct { 800 // placeholder for future optional parameters 801} 802 803// DeploymentsExportTemplateAtScopeOptions contains the optional parameters for the Deployments.ExportTemplateAtScope method. 804type DeploymentsExportTemplateAtScopeOptions struct { 805 // placeholder for future optional parameters 806} 807 808// DeploymentsExportTemplateAtSubscriptionScopeOptions contains the optional parameters for the Deployments.ExportTemplateAtSubscriptionScope method. 809type DeploymentsExportTemplateAtSubscriptionScopeOptions struct { 810 // placeholder for future optional parameters 811} 812 813// DeploymentsExportTemplateAtTenantScopeOptions contains the optional parameters for the Deployments.ExportTemplateAtTenantScope method. 814type DeploymentsExportTemplateAtTenantScopeOptions struct { 815 // placeholder for future optional parameters 816} 817 818// DeploymentsExportTemplateOptions contains the optional parameters for the Deployments.ExportTemplate method. 819type DeploymentsExportTemplateOptions struct { 820 // placeholder for future optional parameters 821} 822 823// DeploymentsGetAtManagementGroupScopeOptions contains the optional parameters for the Deployments.GetAtManagementGroupScope method. 824type DeploymentsGetAtManagementGroupScopeOptions struct { 825 // placeholder for future optional parameters 826} 827 828// DeploymentsGetAtScopeOptions contains the optional parameters for the Deployments.GetAtScope method. 829type DeploymentsGetAtScopeOptions struct { 830 // placeholder for future optional parameters 831} 832 833// DeploymentsGetAtSubscriptionScopeOptions contains the optional parameters for the Deployments.GetAtSubscriptionScope method. 834type DeploymentsGetAtSubscriptionScopeOptions struct { 835 // placeholder for future optional parameters 836} 837 838// DeploymentsGetAtTenantScopeOptions contains the optional parameters for the Deployments.GetAtTenantScope method. 839type DeploymentsGetAtTenantScopeOptions struct { 840 // placeholder for future optional parameters 841} 842 843// DeploymentsGetOptions contains the optional parameters for the Deployments.Get method. 844type DeploymentsGetOptions struct { 845 // placeholder for future optional parameters 846} 847 848// DeploymentsListAtManagementGroupScopeOptions contains the optional parameters for the Deployments.ListAtManagementGroupScope method. 849type DeploymentsListAtManagementGroupScopeOptions struct { 850 // The filter to apply on the operation. For example, you can use $filter=provisioningState eq '{state}'. 851 Filter *string 852 // The number of results to get. If null is passed, returns all deployments. 853 Top *int32 854} 855 856// DeploymentsListAtScopeOptions contains the optional parameters for the Deployments.ListAtScope method. 857type DeploymentsListAtScopeOptions struct { 858 // The filter to apply on the operation. For example, you can use $filter=provisioningState eq '{state}'. 859 Filter *string 860 // The number of results to get. If null is passed, returns all deployments. 861 Top *int32 862} 863 864// DeploymentsListAtSubscriptionScopeOptions contains the optional parameters for the Deployments.ListAtSubscriptionScope method. 865type DeploymentsListAtSubscriptionScopeOptions struct { 866 // The filter to apply on the operation. For example, you can use $filter=provisioningState eq '{state}'. 867 Filter *string 868 // The number of results to get. If null is passed, returns all deployments. 869 Top *int32 870} 871 872// DeploymentsListAtTenantScopeOptions contains the optional parameters for the Deployments.ListAtTenantScope method. 873type DeploymentsListAtTenantScopeOptions struct { 874 // The filter to apply on the operation. For example, you can use $filter=provisioningState eq '{state}'. 875 Filter *string 876 // The number of results to get. If null is passed, returns all deployments. 877 Top *int32 878} 879 880// DeploymentsListByResourceGroupOptions contains the optional parameters for the Deployments.ListByResourceGroup method. 881type DeploymentsListByResourceGroupOptions struct { 882 // The filter to apply on the operation. For example, you can use $filter=provisioningState eq '{state}'. 883 Filter *string 884 // The number of results to get. If null is passed, returns all deployments. 885 Top *int32 886} 887 888// ErrorAdditionalInfo - The resource management error additional info. 889type ErrorAdditionalInfo struct { 890 // READ-ONLY; The additional info. 891 Info map[string]interface{} `json:"info,omitempty" azure:"ro"` 892 893 // READ-ONLY; The additional info type. 894 Type *string `json:"type,omitempty" azure:"ro"` 895} 896 897// ErrorResponse - Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows the OData 898// error response format.) 899type ErrorResponse struct { 900 // READ-ONLY; The error additional info. 901 AdditionalInfo []*ErrorAdditionalInfo `json:"additionalInfo,omitempty" azure:"ro"` 902 903 // READ-ONLY; The error code. 904 Code *string `json:"code,omitempty" azure:"ro"` 905 906 // READ-ONLY; The error details. 907 Details []*ErrorResponse `json:"details,omitempty" azure:"ro"` 908 909 // READ-ONLY; The error message. 910 Message *string `json:"message,omitempty" azure:"ro"` 911 912 // READ-ONLY; The error target. 913 Target *string `json:"target,omitempty" azure:"ro"` 914} 915 916// MarshalJSON implements the json.Marshaller interface for type ErrorResponse. 917func (e ErrorResponse) MarshalJSON() ([]byte, error) { 918 objectMap := make(map[string]interface{}) 919 populate(objectMap, "additionalInfo", e.AdditionalInfo) 920 populate(objectMap, "code", e.Code) 921 populate(objectMap, "details", e.Details) 922 populate(objectMap, "message", e.Message) 923 populate(objectMap, "target", e.Target) 924 return json.Marshal(objectMap) 925} 926 927// ExportTemplateRequest - Export resource group template request parameters. 928type ExportTemplateRequest struct { 929 // The export template options. A CSV-formatted list containing zero or more of the following: 'IncludeParameterDefaultValue', 'IncludeComments', 'SkipResourceNameParameterization', 930 // 'SkipAllParameterization' 931 Options *string `json:"options,omitempty"` 932 933 // The IDs of the resources to filter the export by. To export all resources, supply an array with single entry '*'. 934 Resources []*string `json:"resources,omitempty"` 935} 936 937// MarshalJSON implements the json.Marshaller interface for type ExportTemplateRequest. 938func (e ExportTemplateRequest) MarshalJSON() ([]byte, error) { 939 objectMap := make(map[string]interface{}) 940 populate(objectMap, "options", e.Options) 941 populate(objectMap, "resources", e.Resources) 942 return json.Marshal(objectMap) 943} 944 945// ExpressionEvaluationOptions - Specifies whether template expressions are evaluated within the scope of the parent template or nested template. 946type ExpressionEvaluationOptions struct { 947 // The scope to be used for evaluation of parameters, variables and functions in a nested template. 948 Scope *ExpressionEvaluationOptionsScopeType `json:"scope,omitempty"` 949} 950 951// ExtendedLocation - Resource extended location. 952type ExtendedLocation struct { 953 // The extended location name. 954 Name *string `json:"name,omitempty"` 955 956 // The extended location type. 957 Type *ExtendedLocationType `json:"type,omitempty"` 958} 959 960// GenericResource - Resource information. 961type GenericResource struct { 962 Resource 963 // The identity of the resource. 964 Identity *Identity `json:"identity,omitempty"` 965 966 // The kind of the resource. 967 Kind *string `json:"kind,omitempty"` 968 969 // ID of the resource that manages this resource. 970 ManagedBy *string `json:"managedBy,omitempty"` 971 972 // The plan of the resource. 973 Plan *Plan `json:"plan,omitempty"` 974 975 // The resource properties. 976 Properties map[string]interface{} `json:"properties,omitempty"` 977 978 // The SKU of the resource. 979 SKU *SKU `json:"sku,omitempty"` 980} 981 982// MarshalJSON implements the json.Marshaller interface for type GenericResource. 983func (g GenericResource) MarshalJSON() ([]byte, error) { 984 objectMap := g.marshalInternal() 985 return json.Marshal(objectMap) 986} 987 988// UnmarshalJSON implements the json.Unmarshaller interface for type GenericResource. 989func (g *GenericResource) UnmarshalJSON(data []byte) error { 990 var rawMsg map[string]json.RawMessage 991 if err := json.Unmarshal(data, &rawMsg); err != nil { 992 return err 993 } 994 return g.unmarshalInternal(rawMsg) 995} 996 997func (g GenericResource) marshalInternal() map[string]interface{} { 998 objectMap := g.Resource.marshalInternal() 999 populate(objectMap, "identity", g.Identity) 1000 populate(objectMap, "kind", g.Kind) 1001 populate(objectMap, "managedBy", g.ManagedBy) 1002 populate(objectMap, "plan", g.Plan) 1003 populate(objectMap, "properties", g.Properties) 1004 populate(objectMap, "sku", g.SKU) 1005 return objectMap 1006} 1007 1008func (g *GenericResource) unmarshalInternal(rawMsg map[string]json.RawMessage) error { 1009 for key, val := range rawMsg { 1010 var err error 1011 switch key { 1012 case "identity": 1013 err = unpopulate(val, &g.Identity) 1014 delete(rawMsg, key) 1015 case "kind": 1016 err = unpopulate(val, &g.Kind) 1017 delete(rawMsg, key) 1018 case "managedBy": 1019 err = unpopulate(val, &g.ManagedBy) 1020 delete(rawMsg, key) 1021 case "plan": 1022 err = unpopulate(val, &g.Plan) 1023 delete(rawMsg, key) 1024 case "properties": 1025 err = unpopulate(val, &g.Properties) 1026 delete(rawMsg, key) 1027 case "sku": 1028 err = unpopulate(val, &g.SKU) 1029 delete(rawMsg, key) 1030 } 1031 if err != nil { 1032 return err 1033 } 1034 } 1035 return g.Resource.unmarshalInternal(rawMsg) 1036} 1037 1038// GenericResourceExpanded - Resource information. 1039type GenericResourceExpanded struct { 1040 GenericResource 1041 // READ-ONLY; The changed time of the resource. This is only present if requested via the $expand query parameter. 1042 ChangedTime *time.Time `json:"changedTime,omitempty" azure:"ro"` 1043 1044 // READ-ONLY; The created time of the resource. This is only present if requested via the $expand query parameter. 1045 CreatedTime *time.Time `json:"createdTime,omitempty" azure:"ro"` 1046 1047 // READ-ONLY; The provisioning state of the resource. This is only present if requested via the $expand query parameter. 1048 ProvisioningState *string `json:"provisioningState,omitempty" azure:"ro"` 1049} 1050 1051// MarshalJSON implements the json.Marshaller interface for type GenericResourceExpanded. 1052func (g GenericResourceExpanded) MarshalJSON() ([]byte, error) { 1053 objectMap := g.GenericResource.marshalInternal() 1054 populate(objectMap, "changedTime", (*timeRFC3339)(g.ChangedTime)) 1055 populate(objectMap, "createdTime", (*timeRFC3339)(g.CreatedTime)) 1056 populate(objectMap, "provisioningState", g.ProvisioningState) 1057 return json.Marshal(objectMap) 1058} 1059 1060// UnmarshalJSON implements the json.Unmarshaller interface for type GenericResourceExpanded. 1061func (g *GenericResourceExpanded) UnmarshalJSON(data []byte) error { 1062 var rawMsg map[string]json.RawMessage 1063 if err := json.Unmarshal(data, &rawMsg); err != nil { 1064 return err 1065 } 1066 for key, val := range rawMsg { 1067 var err error 1068 switch key { 1069 case "changedTime": 1070 var aux timeRFC3339 1071 err = unpopulate(val, &aux) 1072 g.ChangedTime = (*time.Time)(&aux) 1073 delete(rawMsg, key) 1074 case "createdTime": 1075 var aux timeRFC3339 1076 err = unpopulate(val, &aux) 1077 g.CreatedTime = (*time.Time)(&aux) 1078 delete(rawMsg, key) 1079 case "provisioningState": 1080 err = unpopulate(val, &g.ProvisioningState) 1081 delete(rawMsg, key) 1082 } 1083 if err != nil { 1084 return err 1085 } 1086 } 1087 return g.GenericResource.unmarshalInternal(rawMsg) 1088} 1089 1090// GenericResourceFilter - Resource filter. 1091type GenericResourceFilter struct { 1092 // The resource type. 1093 ResourceType *string `json:"resourceType,omitempty"` 1094 1095 // The tag name. 1096 Tagname *string `json:"tagname,omitempty"` 1097 1098 // The tag value. 1099 Tagvalue *string `json:"tagvalue,omitempty"` 1100} 1101 1102// HTTPMessage - HTTP message. 1103type HTTPMessage struct { 1104 // HTTP message content. 1105 Content map[string]interface{} `json:"content,omitempty"` 1106} 1107 1108// Identity for the resource. 1109type Identity struct { 1110 // The identity type. 1111 Type *ResourceIdentityType `json:"type,omitempty"` 1112 1113 // The list of user identities associated with the resource. The user identity dictionary key references will be ARM resource ids in the form: 1114 // '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. 1115 UserAssignedIdentities map[string]*IdentityUserAssignedIdentitiesValue `json:"userAssignedIdentities,omitempty"` 1116 1117 // READ-ONLY; The principal ID of resource identity. 1118 PrincipalID *string `json:"principalId,omitempty" azure:"ro"` 1119 1120 // READ-ONLY; The tenant ID of resource. 1121 TenantID *string `json:"tenantId,omitempty" azure:"ro"` 1122} 1123 1124// MarshalJSON implements the json.Marshaller interface for type Identity. 1125func (i Identity) MarshalJSON() ([]byte, error) { 1126 objectMap := make(map[string]interface{}) 1127 populate(objectMap, "principalId", i.PrincipalID) 1128 populate(objectMap, "tenantId", i.TenantID) 1129 populate(objectMap, "type", i.Type) 1130 populate(objectMap, "userAssignedIdentities", i.UserAssignedIdentities) 1131 return json.Marshal(objectMap) 1132} 1133 1134type IdentityUserAssignedIdentitiesValue struct { 1135 // READ-ONLY; The client id of user assigned identity. 1136 ClientID *string `json:"clientId,omitempty" azure:"ro"` 1137 1138 // READ-ONLY; The principal id of user assigned identity. 1139 PrincipalID *string `json:"principalId,omitempty" azure:"ro"` 1140} 1141 1142// OnErrorDeployment - Deployment on error behavior. 1143type OnErrorDeployment struct { 1144 // The deployment to be used on error case. 1145 DeploymentName *string `json:"deploymentName,omitempty"` 1146 1147 // The deployment on error behavior type. Possible values are LastSuccessful and SpecificDeployment. 1148 Type *OnErrorDeploymentType `json:"type,omitempty"` 1149} 1150 1151// OnErrorDeploymentExtended - Deployment on error behavior with additional details. 1152type OnErrorDeploymentExtended struct { 1153 // The deployment to be used on error case. 1154 DeploymentName *string `json:"deploymentName,omitempty"` 1155 1156 // The deployment on error behavior type. Possible values are LastSuccessful and SpecificDeployment. 1157 Type *OnErrorDeploymentType `json:"type,omitempty"` 1158 1159 // READ-ONLY; The state of the provisioning for the on error deployment. 1160 ProvisioningState *string `json:"provisioningState,omitempty" azure:"ro"` 1161} 1162 1163// Operation - Microsoft.Resources operation 1164type Operation struct { 1165 // The object that represents the operation. 1166 Display *OperationDisplay `json:"display,omitempty"` 1167 1168 // Operation name: {provider}/{resource}/{operation} 1169 Name *string `json:"name,omitempty"` 1170} 1171 1172// OperationDisplay - The object that represents the operation. 1173type OperationDisplay struct { 1174 // Description of the operation. 1175 Description *string `json:"description,omitempty"` 1176 1177 // Operation type: Read, write, delete, etc. 1178 Operation *string `json:"operation,omitempty"` 1179 1180 // Service provider: Microsoft.Resources 1181 Provider *string `json:"provider,omitempty"` 1182 1183 // Resource on which the operation is performed: Profile, endpoint, etc. 1184 Resource *string `json:"resource,omitempty"` 1185} 1186 1187// OperationListResult - Result of the request to list Microsoft.Resources operations. It contains a list of operations and a URL link to get the next set 1188// of results. 1189type OperationListResult struct { 1190 // URL to get the next set of operation list results if there are any. 1191 NextLink *string `json:"nextLink,omitempty"` 1192 1193 // List of Microsoft.Resources operations. 1194 Value []*Operation `json:"value,omitempty"` 1195} 1196 1197// MarshalJSON implements the json.Marshaller interface for type OperationListResult. 1198func (o OperationListResult) MarshalJSON() ([]byte, error) { 1199 objectMap := make(map[string]interface{}) 1200 populate(objectMap, "nextLink", o.NextLink) 1201 populate(objectMap, "value", o.Value) 1202 return json.Marshal(objectMap) 1203} 1204 1205// OperationsListOptions contains the optional parameters for the Operations.List method. 1206type OperationsListOptions struct { 1207 // placeholder for future optional parameters 1208} 1209 1210// ParametersLink - Entity representing the reference to the deployment parameters. 1211type ParametersLink struct { 1212 // REQUIRED; The URI of the parameters file. 1213 URI *string `json:"uri,omitempty"` 1214 1215 // If included, must match the ContentVersion in the template. 1216 ContentVersion *string `json:"contentVersion,omitempty"` 1217} 1218 1219// Permission - Role definition permissions. 1220type Permission struct { 1221 // Allowed actions. 1222 Actions []*string `json:"actions,omitempty"` 1223 1224 // Allowed Data actions. 1225 DataActions []*string `json:"dataActions,omitempty"` 1226 1227 // Denied actions. 1228 NotActions []*string `json:"notActions,omitempty"` 1229 1230 // Denied Data actions. 1231 NotDataActions []*string `json:"notDataActions,omitempty"` 1232} 1233 1234// MarshalJSON implements the json.Marshaller interface for type Permission. 1235func (p Permission) MarshalJSON() ([]byte, error) { 1236 objectMap := make(map[string]interface{}) 1237 populate(objectMap, "actions", p.Actions) 1238 populate(objectMap, "dataActions", p.DataActions) 1239 populate(objectMap, "notActions", p.NotActions) 1240 populate(objectMap, "notDataActions", p.NotDataActions) 1241 return json.Marshal(objectMap) 1242} 1243 1244// Plan for the resource. 1245type Plan struct { 1246 // The plan ID. 1247 Name *string `json:"name,omitempty"` 1248 1249 // The offer ID. 1250 Product *string `json:"product,omitempty"` 1251 1252 // The promotion code. 1253 PromotionCode *string `json:"promotionCode,omitempty"` 1254 1255 // The publisher ID. 1256 Publisher *string `json:"publisher,omitempty"` 1257 1258 // The plan's version. 1259 Version *string `json:"version,omitempty"` 1260} 1261 1262// Provider - Resource provider information. 1263type Provider struct { 1264 // The namespace of the resource provider. 1265 Namespace *string `json:"namespace,omitempty"` 1266 1267 // The provider authorization consent state. 1268 ProviderAuthorizationConsentState *ProviderAuthorizationConsentState `json:"providerAuthorizationConsentState,omitempty"` 1269 1270 // READ-ONLY; The provider ID. 1271 ID *string `json:"id,omitempty" azure:"ro"` 1272 1273 // READ-ONLY; The registration policy of the resource provider. 1274 RegistrationPolicy *string `json:"registrationPolicy,omitempty" azure:"ro"` 1275 1276 // READ-ONLY; The registration state of the resource provider. 1277 RegistrationState *string `json:"registrationState,omitempty" azure:"ro"` 1278 1279 // READ-ONLY; The collection of provider resource types. 1280 ResourceTypes []*ProviderResourceType `json:"resourceTypes,omitempty" azure:"ro"` 1281} 1282 1283// MarshalJSON implements the json.Marshaller interface for type Provider. 1284func (p Provider) MarshalJSON() ([]byte, error) { 1285 objectMap := make(map[string]interface{}) 1286 populate(objectMap, "id", p.ID) 1287 populate(objectMap, "namespace", p.Namespace) 1288 populate(objectMap, "providerAuthorizationConsentState", p.ProviderAuthorizationConsentState) 1289 populate(objectMap, "registrationPolicy", p.RegistrationPolicy) 1290 populate(objectMap, "registrationState", p.RegistrationState) 1291 populate(objectMap, "resourceTypes", p.ResourceTypes) 1292 return json.Marshal(objectMap) 1293} 1294 1295// ProviderConsentDefinition - The provider consent. 1296type ProviderConsentDefinition struct { 1297 // A value indicating whether authorization is consented or not. 1298 ConsentToAuthorization *bool `json:"consentToAuthorization,omitempty"` 1299} 1300 1301// ProviderExtendedLocation - The provider extended location. 1302type ProviderExtendedLocation struct { 1303 // The extended locations for the azure location. 1304 ExtendedLocations []*string `json:"extendedLocations,omitempty"` 1305 1306 // The azure location. 1307 Location *string `json:"location,omitempty"` 1308 1309 // The extended location type. 1310 Type *string `json:"type,omitempty"` 1311} 1312 1313// MarshalJSON implements the json.Marshaller interface for type ProviderExtendedLocation. 1314func (p ProviderExtendedLocation) MarshalJSON() ([]byte, error) { 1315 objectMap := make(map[string]interface{}) 1316 populate(objectMap, "extendedLocations", p.ExtendedLocations) 1317 populate(objectMap, "location", p.Location) 1318 populate(objectMap, "type", p.Type) 1319 return json.Marshal(objectMap) 1320} 1321 1322// ProviderListResult - List of resource providers. 1323type ProviderListResult struct { 1324 // An array of resource providers. 1325 Value []*Provider `json:"value,omitempty"` 1326 1327 // READ-ONLY; The URL to use for getting the next set of results. 1328 NextLink *string `json:"nextLink,omitempty" azure:"ro"` 1329} 1330 1331// MarshalJSON implements the json.Marshaller interface for type ProviderListResult. 1332func (p ProviderListResult) MarshalJSON() ([]byte, error) { 1333 objectMap := make(map[string]interface{}) 1334 populate(objectMap, "nextLink", p.NextLink) 1335 populate(objectMap, "value", p.Value) 1336 return json.Marshal(objectMap) 1337} 1338 1339// ProviderPermission - The provider permission 1340type ProviderPermission struct { 1341 // The application id. 1342 ApplicationID *string `json:"applicationId,omitempty"` 1343 1344 // Role definition properties. 1345 ManagedByRoleDefinition *RoleDefinition `json:"managedByRoleDefinition,omitempty"` 1346 1347 // The provider authorization consent state. 1348 ProviderAuthorizationConsentState *ProviderAuthorizationConsentState `json:"providerAuthorizationConsentState,omitempty"` 1349 1350 // Role definition properties. 1351 RoleDefinition *RoleDefinition `json:"roleDefinition,omitempty"` 1352} 1353 1354// ProviderPermissionListResult - List of provider permissions. 1355type ProviderPermissionListResult struct { 1356 // An array of provider permissions. 1357 Value []*ProviderPermission `json:"value,omitempty"` 1358 1359 // READ-ONLY; The URL to use for getting the next set of results. 1360 NextLink *string `json:"nextLink,omitempty" azure:"ro"` 1361} 1362 1363// MarshalJSON implements the json.Marshaller interface for type ProviderPermissionListResult. 1364func (p ProviderPermissionListResult) MarshalJSON() ([]byte, error) { 1365 objectMap := make(map[string]interface{}) 1366 populate(objectMap, "nextLink", p.NextLink) 1367 populate(objectMap, "value", p.Value) 1368 return json.Marshal(objectMap) 1369} 1370 1371// ProviderRegistrationRequest - The provider registration definition. 1372type ProviderRegistrationRequest struct { 1373 // The provider consent. 1374 ThirdPartyProviderConsent *ProviderConsentDefinition `json:"thirdPartyProviderConsent,omitempty"` 1375} 1376 1377// ProviderResourceType - Resource type managed by the resource provider. 1378type ProviderResourceType struct { 1379 // The API version. 1380 APIVersions []*string `json:"apiVersions,omitempty"` 1381 1382 // The aliases that are supported by this resource type. 1383 Aliases []*Alias `json:"aliases,omitempty"` 1384 1385 // The additional capabilities offered by this resource type. 1386 Capabilities *string `json:"capabilities,omitempty"` 1387 1388 // The location mappings that are supported by this resource type. 1389 LocationMappings []*ProviderExtendedLocation `json:"locationMappings,omitempty"` 1390 1391 // The collection of locations where this resource type can be created. 1392 Locations []*string `json:"locations,omitempty"` 1393 1394 // The properties. 1395 Properties map[string]*string `json:"properties,omitempty"` 1396 1397 // The resource type. 1398 ResourceType *string `json:"resourceType,omitempty"` 1399 1400 // READ-ONLY; The API profiles for the resource provider. 1401 APIProfiles []*APIProfile `json:"apiProfiles,omitempty" azure:"ro"` 1402 1403 // READ-ONLY; The default API version. 1404 DefaultAPIVersion *string `json:"defaultApiVersion,omitempty" azure:"ro"` 1405} 1406 1407// MarshalJSON implements the json.Marshaller interface for type ProviderResourceType. 1408func (p ProviderResourceType) MarshalJSON() ([]byte, error) { 1409 objectMap := make(map[string]interface{}) 1410 populate(objectMap, "apiProfiles", p.APIProfiles) 1411 populate(objectMap, "apiVersions", p.APIVersions) 1412 populate(objectMap, "aliases", p.Aliases) 1413 populate(objectMap, "capabilities", p.Capabilities) 1414 populate(objectMap, "defaultApiVersion", p.DefaultAPIVersion) 1415 populate(objectMap, "locationMappings", p.LocationMappings) 1416 populate(objectMap, "locations", p.Locations) 1417 populate(objectMap, "properties", p.Properties) 1418 populate(objectMap, "resourceType", p.ResourceType) 1419 return json.Marshal(objectMap) 1420} 1421 1422// ProviderResourceTypeListResult - List of resource types of a resource provider. 1423type ProviderResourceTypeListResult struct { 1424 // An array of resource types. 1425 Value []*ProviderResourceType `json:"value,omitempty"` 1426 1427 // READ-ONLY; The URL to use for getting the next set of results. 1428 NextLink *string `json:"nextLink,omitempty" azure:"ro"` 1429} 1430 1431// MarshalJSON implements the json.Marshaller interface for type ProviderResourceTypeListResult. 1432func (p ProviderResourceTypeListResult) MarshalJSON() ([]byte, error) { 1433 objectMap := make(map[string]interface{}) 1434 populate(objectMap, "nextLink", p.NextLink) 1435 populate(objectMap, "value", p.Value) 1436 return json.Marshal(objectMap) 1437} 1438 1439// ProviderResourceTypesListOptions contains the optional parameters for the ProviderResourceTypes.List method. 1440type ProviderResourceTypesListOptions struct { 1441 // The $expand query parameter. For example, to include property aliases in response, use $expand=resourceTypes/aliases. 1442 Expand *string 1443} 1444 1445// ProvidersGetAtTenantScopeOptions contains the optional parameters for the Providers.GetAtTenantScope method. 1446type ProvidersGetAtTenantScopeOptions struct { 1447 // The $expand query parameter. For example, to include property aliases in response, use $expand=resourceTypes/aliases. 1448 Expand *string 1449} 1450 1451// ProvidersGetOptions contains the optional parameters for the Providers.Get method. 1452type ProvidersGetOptions struct { 1453 // The $expand query parameter. For example, to include property aliases in response, use $expand=resourceTypes/aliases. 1454 Expand *string 1455} 1456 1457// ProvidersListAtTenantScopeOptions contains the optional parameters for the Providers.ListAtTenantScope method. 1458type ProvidersListAtTenantScopeOptions struct { 1459 // The properties to include in the results. For example, use &$expand=metadata in the query string to retrieve resource provider metadata. To include property 1460 // aliases in response, use $expand=resourceTypes/aliases. 1461 Expand *string 1462 // The number of results to return. If null is passed returns all providers. 1463 Top *int32 1464} 1465 1466// ProvidersListOptions contains the optional parameters for the Providers.List method. 1467type ProvidersListOptions struct { 1468 // The properties to include in the results. For example, use &$expand=metadata in the query string to retrieve resource provider metadata. To include property 1469 // aliases in response, use $expand=resourceTypes/aliases. 1470 Expand *string 1471 // The number of results to return. If null is passed returns all deployments. 1472 Top *int32 1473} 1474 1475// ProvidersProviderPermissionsOptions contains the optional parameters for the Providers.ProviderPermissions method. 1476type ProvidersProviderPermissionsOptions struct { 1477 // placeholder for future optional parameters 1478} 1479 1480// ProvidersRegisterAtManagementGroupScopeOptions contains the optional parameters for the Providers.RegisterAtManagementGroupScope method. 1481type ProvidersRegisterAtManagementGroupScopeOptions struct { 1482 // placeholder for future optional parameters 1483} 1484 1485// ProvidersRegisterOptions contains the optional parameters for the Providers.Register method. 1486type ProvidersRegisterOptions struct { 1487 // The third party consent for S2S. 1488 Properties *ProviderRegistrationRequest 1489} 1490 1491// ProvidersUnregisterOptions contains the optional parameters for the Providers.Unregister method. 1492type ProvidersUnregisterOptions struct { 1493 // placeholder for future optional parameters 1494} 1495 1496// Resource - Specified resource. 1497type Resource struct { 1498 // Resource extended location. 1499 ExtendedLocation *ExtendedLocation `json:"extendedLocation,omitempty"` 1500 1501 // Resource location 1502 Location *string `json:"location,omitempty"` 1503 1504 // Resource tags 1505 Tags map[string]*string `json:"tags,omitempty"` 1506 1507 // READ-ONLY; Resource ID 1508 ID *string `json:"id,omitempty" azure:"ro"` 1509 1510 // READ-ONLY; Resource name 1511 Name *string `json:"name,omitempty" azure:"ro"` 1512 1513 // READ-ONLY; Resource type 1514 Type *string `json:"type,omitempty" azure:"ro"` 1515} 1516 1517// MarshalJSON implements the json.Marshaller interface for type Resource. 1518func (r Resource) MarshalJSON() ([]byte, error) { 1519 objectMap := r.marshalInternal() 1520 return json.Marshal(objectMap) 1521} 1522 1523// UnmarshalJSON implements the json.Unmarshaller interface for type Resource. 1524func (r *Resource) UnmarshalJSON(data []byte) error { 1525 var rawMsg map[string]json.RawMessage 1526 if err := json.Unmarshal(data, &rawMsg); err != nil { 1527 return err 1528 } 1529 return r.unmarshalInternal(rawMsg) 1530} 1531 1532func (r Resource) marshalInternal() map[string]interface{} { 1533 objectMap := make(map[string]interface{}) 1534 populate(objectMap, "extendedLocation", r.ExtendedLocation) 1535 populate(objectMap, "id", r.ID) 1536 populate(objectMap, "location", r.Location) 1537 populate(objectMap, "name", r.Name) 1538 populate(objectMap, "tags", r.Tags) 1539 populate(objectMap, "type", r.Type) 1540 return objectMap 1541} 1542 1543func (r *Resource) unmarshalInternal(rawMsg map[string]json.RawMessage) error { 1544 for key, val := range rawMsg { 1545 var err error 1546 switch key { 1547 case "extendedLocation": 1548 err = unpopulate(val, &r.ExtendedLocation) 1549 delete(rawMsg, key) 1550 case "id": 1551 err = unpopulate(val, &r.ID) 1552 delete(rawMsg, key) 1553 case "location": 1554 err = unpopulate(val, &r.Location) 1555 delete(rawMsg, key) 1556 case "name": 1557 err = unpopulate(val, &r.Name) 1558 delete(rawMsg, key) 1559 case "tags": 1560 err = unpopulate(val, &r.Tags) 1561 delete(rawMsg, key) 1562 case "type": 1563 err = unpopulate(val, &r.Type) 1564 delete(rawMsg, key) 1565 } 1566 if err != nil { 1567 return err 1568 } 1569 } 1570 return nil 1571} 1572 1573// ResourceGroup - Resource group information. 1574type ResourceGroup struct { 1575 // REQUIRED; The location of the resource group. It cannot be changed after the resource group has been created. It must be one of the supported Azure locations. 1576 Location *string `json:"location,omitempty"` 1577 1578 // The ID of the resource that manages this resource group. 1579 ManagedBy *string `json:"managedBy,omitempty"` 1580 1581 // The resource group properties. 1582 Properties *ResourceGroupProperties `json:"properties,omitempty"` 1583 1584 // The tags attached to the resource group. 1585 Tags map[string]*string `json:"tags,omitempty"` 1586 1587 // READ-ONLY; The ID of the resource group. 1588 ID *string `json:"id,omitempty" azure:"ro"` 1589 1590 // READ-ONLY; The name of the resource group. 1591 Name *string `json:"name,omitempty" azure:"ro"` 1592 1593 // READ-ONLY; The type of the resource group. 1594 Type *string `json:"type,omitempty" azure:"ro"` 1595} 1596 1597// MarshalJSON implements the json.Marshaller interface for type ResourceGroup. 1598func (r ResourceGroup) MarshalJSON() ([]byte, error) { 1599 objectMap := make(map[string]interface{}) 1600 populate(objectMap, "id", r.ID) 1601 populate(objectMap, "location", r.Location) 1602 populate(objectMap, "managedBy", r.ManagedBy) 1603 populate(objectMap, "name", r.Name) 1604 populate(objectMap, "properties", r.Properties) 1605 populate(objectMap, "tags", r.Tags) 1606 populate(objectMap, "type", r.Type) 1607 return json.Marshal(objectMap) 1608} 1609 1610// ResourceGroupExportResult - Resource group export result. 1611type ResourceGroupExportResult struct { 1612 // The template export error. 1613 Error *ErrorResponse `json:"error,omitempty"` 1614 1615 // The template content. 1616 Template map[string]interface{} `json:"template,omitempty"` 1617} 1618 1619// ResourceGroupFilter - Resource group filter. 1620type ResourceGroupFilter struct { 1621 // The tag name. 1622 TagName *string `json:"tagName,omitempty"` 1623 1624 // The tag value. 1625 TagValue *string `json:"tagValue,omitempty"` 1626} 1627 1628// ResourceGroupListResult - List of resource groups. 1629type ResourceGroupListResult struct { 1630 // An array of resource groups. 1631 Value []*ResourceGroup `json:"value,omitempty"` 1632 1633 // READ-ONLY; The URL to use for getting the next set of results. 1634 NextLink *string `json:"nextLink,omitempty" azure:"ro"` 1635} 1636 1637// MarshalJSON implements the json.Marshaller interface for type ResourceGroupListResult. 1638func (r ResourceGroupListResult) MarshalJSON() ([]byte, error) { 1639 objectMap := make(map[string]interface{}) 1640 populate(objectMap, "nextLink", r.NextLink) 1641 populate(objectMap, "value", r.Value) 1642 return json.Marshal(objectMap) 1643} 1644 1645// ResourceGroupPatchable - Resource group information. 1646type ResourceGroupPatchable struct { 1647 // The ID of the resource that manages this resource group. 1648 ManagedBy *string `json:"managedBy,omitempty"` 1649 1650 // The name of the resource group. 1651 Name *string `json:"name,omitempty"` 1652 1653 // The resource group properties. 1654 Properties *ResourceGroupProperties `json:"properties,omitempty"` 1655 1656 // The tags attached to the resource group. 1657 Tags map[string]*string `json:"tags,omitempty"` 1658} 1659 1660// MarshalJSON implements the json.Marshaller interface for type ResourceGroupPatchable. 1661func (r ResourceGroupPatchable) MarshalJSON() ([]byte, error) { 1662 objectMap := make(map[string]interface{}) 1663 populate(objectMap, "managedBy", r.ManagedBy) 1664 populate(objectMap, "name", r.Name) 1665 populate(objectMap, "properties", r.Properties) 1666 populate(objectMap, "tags", r.Tags) 1667 return json.Marshal(objectMap) 1668} 1669 1670// ResourceGroupProperties - The resource group properties. 1671type ResourceGroupProperties struct { 1672 // READ-ONLY; The provisioning state. 1673 ProvisioningState *string `json:"provisioningState,omitempty" azure:"ro"` 1674} 1675 1676// ResourceGroupsBeginDeleteOptions contains the optional parameters for the ResourceGroups.BeginDelete method. 1677type ResourceGroupsBeginDeleteOptions struct { 1678 // The resource types you want to force delete. Currently, only the following is supported: forceDeletionTypes=Microsoft.Compute/virtualMachines,Microsoft.Compute/virtualMachineScaleSets 1679 ForceDeletionTypes *string 1680} 1681 1682// ResourceGroupsBeginExportTemplateOptions contains the optional parameters for the ResourceGroups.BeginExportTemplate method. 1683type ResourceGroupsBeginExportTemplateOptions struct { 1684 // placeholder for future optional parameters 1685} 1686 1687// ResourceGroupsCheckExistenceOptions contains the optional parameters for the ResourceGroups.CheckExistence method. 1688type ResourceGroupsCheckExistenceOptions struct { 1689 // placeholder for future optional parameters 1690} 1691 1692// ResourceGroupsCreateOrUpdateOptions contains the optional parameters for the ResourceGroups.CreateOrUpdate method. 1693type ResourceGroupsCreateOrUpdateOptions struct { 1694 // placeholder for future optional parameters 1695} 1696 1697// ResourceGroupsGetOptions contains the optional parameters for the ResourceGroups.Get method. 1698type ResourceGroupsGetOptions struct { 1699 // placeholder for future optional parameters 1700} 1701 1702// ResourceGroupsListOptions contains the optional parameters for the ResourceGroups.List method. 1703type ResourceGroupsListOptions struct { 1704 // The filter to apply on the operation.<br><br>You can filter by tag names and values. For example, to filter for a tag name and value, use $filter=tagName 1705 // eq 'tag1' and tagValue eq 'Value1' 1706 Filter *string 1707 // The number of results to return. If null is passed, returns all resource groups. 1708 Top *int32 1709} 1710 1711// ResourceGroupsUpdateOptions contains the optional parameters for the ResourceGroups.Update method. 1712type ResourceGroupsUpdateOptions struct { 1713 // placeholder for future optional parameters 1714} 1715 1716// ResourceListResult - List of resource groups. 1717type ResourceListResult struct { 1718 // An array of resources. 1719 Value []*GenericResourceExpanded `json:"value,omitempty"` 1720 1721 // READ-ONLY; The URL to use for getting the next set of results. 1722 NextLink *string `json:"nextLink,omitempty" azure:"ro"` 1723} 1724 1725// MarshalJSON implements the json.Marshaller interface for type ResourceListResult. 1726func (r ResourceListResult) MarshalJSON() ([]byte, error) { 1727 objectMap := make(map[string]interface{}) 1728 populate(objectMap, "nextLink", r.NextLink) 1729 populate(objectMap, "value", r.Value) 1730 return json.Marshal(objectMap) 1731} 1732 1733// ResourceProviderOperationDisplayProperties - Resource provider operation's display properties. 1734type ResourceProviderOperationDisplayProperties struct { 1735 // Operation description. 1736 Description *string `json:"description,omitempty"` 1737 1738 // Resource provider operation. 1739 Operation *string `json:"operation,omitempty"` 1740 1741 // Operation provider. 1742 Provider *string `json:"provider,omitempty"` 1743 1744 // Operation description. 1745 Publisher *string `json:"publisher,omitempty"` 1746 1747 // Operation resource. 1748 Resource *string `json:"resource,omitempty"` 1749} 1750 1751// ResourceReference - The resource Id model. 1752type ResourceReference struct { 1753 // READ-ONLY; The fully qualified resource Id. 1754 ID *string `json:"id,omitempty" azure:"ro"` 1755} 1756 1757// ResourcesBeginCreateOrUpdateByIDOptions contains the optional parameters for the Resources.BeginCreateOrUpdateByID method. 1758type ResourcesBeginCreateOrUpdateByIDOptions struct { 1759 // placeholder for future optional parameters 1760} 1761 1762// ResourcesBeginCreateOrUpdateOptions contains the optional parameters for the Resources.BeginCreateOrUpdate method. 1763type ResourcesBeginCreateOrUpdateOptions struct { 1764 // placeholder for future optional parameters 1765} 1766 1767// ResourcesBeginDeleteByIDOptions contains the optional parameters for the Resources.BeginDeleteByID method. 1768type ResourcesBeginDeleteByIDOptions struct { 1769 // placeholder for future optional parameters 1770} 1771 1772// ResourcesBeginDeleteOptions contains the optional parameters for the Resources.BeginDelete method. 1773type ResourcesBeginDeleteOptions struct { 1774 // placeholder for future optional parameters 1775} 1776 1777// ResourcesBeginMoveResourcesOptions contains the optional parameters for the Resources.BeginMoveResources method. 1778type ResourcesBeginMoveResourcesOptions struct { 1779 // placeholder for future optional parameters 1780} 1781 1782// ResourcesBeginUpdateByIDOptions contains the optional parameters for the Resources.BeginUpdateByID method. 1783type ResourcesBeginUpdateByIDOptions struct { 1784 // placeholder for future optional parameters 1785} 1786 1787// ResourcesBeginUpdateOptions contains the optional parameters for the Resources.BeginUpdate method. 1788type ResourcesBeginUpdateOptions struct { 1789 // placeholder for future optional parameters 1790} 1791 1792// ResourcesBeginValidateMoveResourcesOptions contains the optional parameters for the Resources.BeginValidateMoveResources method. 1793type ResourcesBeginValidateMoveResourcesOptions struct { 1794 // placeholder for future optional parameters 1795} 1796 1797// ResourcesCheckExistenceByIDOptions contains the optional parameters for the Resources.CheckExistenceByID method. 1798type ResourcesCheckExistenceByIDOptions struct { 1799 // placeholder for future optional parameters 1800} 1801 1802// ResourcesCheckExistenceOptions contains the optional parameters for the Resources.CheckExistence method. 1803type ResourcesCheckExistenceOptions struct { 1804 // placeholder for future optional parameters 1805} 1806 1807// ResourcesGetByIDOptions contains the optional parameters for the Resources.GetByID method. 1808type ResourcesGetByIDOptions struct { 1809 // placeholder for future optional parameters 1810} 1811 1812// ResourcesGetOptions contains the optional parameters for the Resources.Get method. 1813type ResourcesGetOptions struct { 1814 // placeholder for future optional parameters 1815} 1816 1817// ResourcesListByResourceGroupOptions contains the optional parameters for the Resources.ListByResourceGroup method. 1818type ResourcesListByResourceGroupOptions struct { 1819 // Comma-separated list of additional properties to be included in the response. Valid values include `createdTime`, `changedTime` and `provisioningState`. 1820 // For example, `$expand=createdTime,changedTime`. 1821 Expand *string 1822 // The filter to apply on the operation.<br><br>The properties you can use for eq (equals) or ne (not equals) are: location, resourceType, name, resourceGroup, 1823 // identity, identity/principalId, plan, plan/publisher, plan/product, plan/name, plan/version, and plan/promotionCode.<br><br>For example, to filter by 1824 // a resource type, use: $filter=resourceType eq 'Microsoft.Network/virtualNetworks'<br><br>You can use substringof(value, property) in the filter. The 1825 // properties you can use for substring are: name and resourceGroup.<br><br>For example, to get all resources with 'demo' anywhere in the name, use: $filter=substringof('demo', 1826 // name)<br><br>You can link more than one substringof together by adding and/or operators.<br><br>You can filter by tag names and values. For example, 1827 // to filter for a tag name and value, use $filter=tagName eq 'tag1' and tagValue eq 'Value1'. When you filter by a tag name and value, the tags for each 1828 // resource are not returned in the results.<br><br>You can use some properties together when filtering. The combinations you can use are: substringof and/or 1829 // resourceType, plan and plan/publisher and plan/name, identity and identity/principalId. 1830 Filter *string 1831 // The number of results to return. If null is passed, returns all resources. 1832 Top *int32 1833} 1834 1835// ResourcesListOptions contains the optional parameters for the Resources.List method. 1836type ResourcesListOptions struct { 1837 // Comma-separated list of additional properties to be included in the response. Valid values include `createdTime`, `changedTime` and `provisioningState`. 1838 // For example, `$expand=createdTime,changedTime`. 1839 Expand *string 1840 // The filter to apply on the operation.<br><br>The properties you can use for eq (equals) or ne (not equals) are: location, resourceType, name, resourceGroup, 1841 // identity, identity/principalId, plan, plan/publisher, plan/product, plan/name, plan/version, and plan/promotionCode.<br><br>For example, to filter by 1842 // a resource type, use: $filter=resourceType eq 'Microsoft.Network/virtualNetworks'<br><br>You can use substringof(value, property) in the filter. The 1843 // properties you can use for substring are: name and resourceGroup.<br><br>For example, to get all resources with 'demo' anywhere in the name, use: $filter=substringof('demo', 1844 // name)<br><br>You can link more than one substringof together by adding and/or operators.<br><br>You can filter by tag names and values. For example, 1845 // to filter for a tag name and value, use $filter=tagName eq 'tag1' and tagValue eq 'Value1'. When you filter by a tag name and value, the tags for each 1846 // resource are not returned in the results.<br><br>You can use some properties together when filtering. The combinations you can use are: substringof and/or 1847 // resourceType, plan and plan/publisher and plan/name, identity and identity/principalId. 1848 Filter *string 1849 // The number of results to return. If null is passed, returns all resource groups. 1850 Top *int32 1851} 1852 1853// ResourcesMoveInfo - Parameters of move resources. 1854type ResourcesMoveInfo struct { 1855 // The IDs of the resources. 1856 Resources []*string `json:"resources,omitempty"` 1857 1858 // The target resource group. 1859 TargetResourceGroup *string `json:"targetResourceGroup,omitempty"` 1860} 1861 1862// MarshalJSON implements the json.Marshaller interface for type ResourcesMoveInfo. 1863func (r ResourcesMoveInfo) MarshalJSON() ([]byte, error) { 1864 objectMap := make(map[string]interface{}) 1865 populate(objectMap, "resources", r.Resources) 1866 populate(objectMap, "targetResourceGroup", r.TargetResourceGroup) 1867 return json.Marshal(objectMap) 1868} 1869 1870// RoleDefinition - Role definition properties. 1871type RoleDefinition struct { 1872 // The role definition ID. 1873 ID *string `json:"id,omitempty"` 1874 1875 // If this is a service role. 1876 IsServiceRole *bool `json:"isServiceRole,omitempty"` 1877 1878 // The role definition name. 1879 Name *string `json:"name,omitempty"` 1880 1881 // Role definition permissions. 1882 Permissions []*Permission `json:"permissions,omitempty"` 1883 1884 // Role definition assignable scopes. 1885 Scopes []*string `json:"scopes,omitempty"` 1886} 1887 1888// MarshalJSON implements the json.Marshaller interface for type RoleDefinition. 1889func (r RoleDefinition) MarshalJSON() ([]byte, error) { 1890 objectMap := make(map[string]interface{}) 1891 populate(objectMap, "id", r.ID) 1892 populate(objectMap, "isServiceRole", r.IsServiceRole) 1893 populate(objectMap, "name", r.Name) 1894 populate(objectMap, "permissions", r.Permissions) 1895 populate(objectMap, "scopes", r.Scopes) 1896 return json.Marshal(objectMap) 1897} 1898 1899// SKU for the resource. 1900type SKU struct { 1901 // The SKU capacity. 1902 Capacity *int32 `json:"capacity,omitempty"` 1903 1904 // The SKU family. 1905 Family *string `json:"family,omitempty"` 1906 1907 // The SKU model. 1908 Model *string `json:"model,omitempty"` 1909 1910 // The SKU name. 1911 Name *string `json:"name,omitempty"` 1912 1913 // The SKU size. 1914 Size *string `json:"size,omitempty"` 1915 1916 // The SKU tier. 1917 Tier *string `json:"tier,omitempty"` 1918} 1919 1920// ScopedDeployment - Deployment operation parameters. 1921type ScopedDeployment struct { 1922 // REQUIRED; The location to store the deployment data. 1923 Location *string `json:"location,omitempty"` 1924 1925 // REQUIRED; The deployment properties. 1926 Properties *DeploymentProperties `json:"properties,omitempty"` 1927 1928 // Deployment tags 1929 Tags map[string]*string `json:"tags,omitempty"` 1930} 1931 1932// MarshalJSON implements the json.Marshaller interface for type ScopedDeployment. 1933func (s ScopedDeployment) MarshalJSON() ([]byte, error) { 1934 objectMap := make(map[string]interface{}) 1935 populate(objectMap, "location", s.Location) 1936 populate(objectMap, "properties", s.Properties) 1937 populate(objectMap, "tags", s.Tags) 1938 return json.Marshal(objectMap) 1939} 1940 1941// ScopedDeploymentWhatIf - Deployment What-if operation parameters. 1942type ScopedDeploymentWhatIf struct { 1943 // REQUIRED; The location to store the deployment data. 1944 Location *string `json:"location,omitempty"` 1945 1946 // REQUIRED; The deployment properties. 1947 Properties *DeploymentWhatIfProperties `json:"properties,omitempty"` 1948} 1949 1950// StatusMessage - Operation status message object. 1951type StatusMessage struct { 1952 // The error reported by the operation. 1953 Error *ErrorResponse `json:"error,omitempty"` 1954 1955 // Status of the deployment operation. 1956 Status *string `json:"status,omitempty"` 1957} 1958 1959// SubResource - Sub-resource. 1960type SubResource struct { 1961 // Resource ID 1962 ID *string `json:"id,omitempty"` 1963} 1964 1965// TagCount - Tag count. 1966type TagCount struct { 1967 // Type of count. 1968 Type *string `json:"type,omitempty"` 1969 1970 // Value of count. 1971 Value *int32 `json:"value,omitempty"` 1972} 1973 1974// TagDetails - Tag details. 1975type TagDetails struct { 1976 // The total number of resources that use the resource tag. When a tag is initially created and has no associated resources, the value is 0. 1977 Count *TagCount `json:"count,omitempty"` 1978 1979 // The tag name. 1980 TagName *string `json:"tagName,omitempty"` 1981 1982 // The list of tag values. 1983 Values []*TagValue `json:"values,omitempty"` 1984 1985 // READ-ONLY; The tag name ID. 1986 ID *string `json:"id,omitempty" azure:"ro"` 1987} 1988 1989// MarshalJSON implements the json.Marshaller interface for type TagDetails. 1990func (t TagDetails) MarshalJSON() ([]byte, error) { 1991 objectMap := make(map[string]interface{}) 1992 populate(objectMap, "count", t.Count) 1993 populate(objectMap, "id", t.ID) 1994 populate(objectMap, "tagName", t.TagName) 1995 populate(objectMap, "values", t.Values) 1996 return json.Marshal(objectMap) 1997} 1998 1999// TagValue - Tag information. 2000type TagValue struct { 2001 // The tag value count. 2002 Count *TagCount `json:"count,omitempty"` 2003 2004 // The tag value. 2005 TagValue *string `json:"tagValue,omitempty"` 2006 2007 // READ-ONLY; The tag value ID. 2008 ID *string `json:"id,omitempty" azure:"ro"` 2009} 2010 2011// Tags - A dictionary of name and value pairs. 2012type Tags struct { 2013 // Dictionary of 2014 Tags map[string]*string `json:"tags,omitempty"` 2015} 2016 2017// MarshalJSON implements the json.Marshaller interface for type Tags. 2018func (t Tags) MarshalJSON() ([]byte, error) { 2019 objectMap := make(map[string]interface{}) 2020 populate(objectMap, "tags", t.Tags) 2021 return json.Marshal(objectMap) 2022} 2023 2024// TagsCreateOrUpdateAtScopeOptions contains the optional parameters for the Tags.CreateOrUpdateAtScope method. 2025type TagsCreateOrUpdateAtScopeOptions struct { 2026 // placeholder for future optional parameters 2027} 2028 2029// TagsCreateOrUpdateOptions contains the optional parameters for the Tags.CreateOrUpdate method. 2030type TagsCreateOrUpdateOptions struct { 2031 // placeholder for future optional parameters 2032} 2033 2034// TagsCreateOrUpdateValueOptions contains the optional parameters for the Tags.CreateOrUpdateValue method. 2035type TagsCreateOrUpdateValueOptions struct { 2036 // placeholder for future optional parameters 2037} 2038 2039// TagsDeleteAtScopeOptions contains the optional parameters for the Tags.DeleteAtScope method. 2040type TagsDeleteAtScopeOptions struct { 2041 // placeholder for future optional parameters 2042} 2043 2044// TagsDeleteOptions contains the optional parameters for the Tags.Delete method. 2045type TagsDeleteOptions struct { 2046 // placeholder for future optional parameters 2047} 2048 2049// TagsDeleteValueOptions contains the optional parameters for the Tags.DeleteValue method. 2050type TagsDeleteValueOptions struct { 2051 // placeholder for future optional parameters 2052} 2053 2054// TagsGetAtScopeOptions contains the optional parameters for the Tags.GetAtScope method. 2055type TagsGetAtScopeOptions struct { 2056 // placeholder for future optional parameters 2057} 2058 2059// TagsListOptions contains the optional parameters for the Tags.List method. 2060type TagsListOptions struct { 2061 // placeholder for future optional parameters 2062} 2063 2064// TagsListResult - List of subscription tags. 2065type TagsListResult struct { 2066 // An array of tags. 2067 Value []*TagDetails `json:"value,omitempty"` 2068 2069 // READ-ONLY; The URL to use for getting the next set of results. 2070 NextLink *string `json:"nextLink,omitempty" azure:"ro"` 2071} 2072 2073// MarshalJSON implements the json.Marshaller interface for type TagsListResult. 2074func (t TagsListResult) MarshalJSON() ([]byte, error) { 2075 objectMap := make(map[string]interface{}) 2076 populate(objectMap, "nextLink", t.NextLink) 2077 populate(objectMap, "value", t.Value) 2078 return json.Marshal(objectMap) 2079} 2080 2081// TagsPatchResource - Wrapper resource for tags patch API request only. 2082type TagsPatchResource struct { 2083 // The operation type for the patch API. 2084 Operation *TagsPatchOperation `json:"operation,omitempty"` 2085 2086 // The set of tags. 2087 Properties *Tags `json:"properties,omitempty"` 2088} 2089 2090// MarshalJSON implements the json.Marshaller interface for type TagsPatchResource. 2091func (t TagsPatchResource) MarshalJSON() ([]byte, error) { 2092 objectMap := make(map[string]interface{}) 2093 populate(objectMap, "operation", t.Operation) 2094 populate(objectMap, "properties", t.Properties) 2095 return json.Marshal(objectMap) 2096} 2097 2098// TagsResource - Wrapper resource for tags API requests and responses. 2099type TagsResource struct { 2100 // REQUIRED; The set of tags. 2101 Properties *Tags `json:"properties,omitempty"` 2102 2103 // READ-ONLY; The ID of the tags wrapper resource. 2104 ID *string `json:"id,omitempty" azure:"ro"` 2105 2106 // READ-ONLY; The name of the tags wrapper resource. 2107 Name *string `json:"name,omitempty" azure:"ro"` 2108 2109 // READ-ONLY; The type of the tags wrapper resource. 2110 Type *string `json:"type,omitempty" azure:"ro"` 2111} 2112 2113// TagsUpdateAtScopeOptions contains the optional parameters for the Tags.UpdateAtScope method. 2114type TagsUpdateAtScopeOptions struct { 2115 // placeholder for future optional parameters 2116} 2117 2118// TargetResource - Target resource. 2119type TargetResource struct { 2120 // The ID of the resource. 2121 ID *string `json:"id,omitempty"` 2122 2123 // The name of the resource. 2124 ResourceName *string `json:"resourceName,omitempty"` 2125 2126 // The type of the resource. 2127 ResourceType *string `json:"resourceType,omitempty"` 2128} 2129 2130// TemplateHashResult - Result of the request to calculate template hash. It contains a string of minified template and its hash. 2131type TemplateHashResult struct { 2132 // The minified template string. 2133 MinifiedTemplate *string `json:"minifiedTemplate,omitempty"` 2134 2135 // The template hash. 2136 TemplateHash *string `json:"templateHash,omitempty"` 2137} 2138 2139// TemplateLink - Entity representing the reference to the template. 2140type TemplateLink struct { 2141 // If included, must match the ContentVersion in the template. 2142 ContentVersion *string `json:"contentVersion,omitempty"` 2143 2144 // The resource id of a Template Spec. Use either the id or uri property, but not both. 2145 ID *string `json:"id,omitempty"` 2146 2147 // The query string (for example, a SAS token) to be used with the templateLink URI. 2148 QueryString *string `json:"queryString,omitempty"` 2149 2150 // The relativePath property can be used to deploy a linked template at a location relative to the parent. If the parent template was linked with a TemplateSpec, 2151 // this will reference an artifact in the 2152 // TemplateSpec. If the parent was linked with a URI, the child deployment will be a combination of the parent and relativePath URIs 2153 RelativePath *string `json:"relativePath,omitempty"` 2154 2155 // The URI of the template to deploy. Use either the uri or id property, but not both. 2156 URI *string `json:"uri,omitempty"` 2157} 2158 2159// WhatIfChange - Information about a single resource change predicted by What-If operation. 2160type WhatIfChange struct { 2161 // REQUIRED; Type of change that will be made to the resource when the deployment is executed. 2162 ChangeType *ChangeType `json:"changeType,omitempty"` 2163 2164 // REQUIRED; Resource ID 2165 ResourceID *string `json:"resourceId,omitempty"` 2166 2167 // The predicted snapshot of the resource after the deployment is executed. 2168 After map[string]interface{} `json:"after,omitempty"` 2169 2170 // The snapshot of the resource before the deployment is executed. 2171 Before map[string]interface{} `json:"before,omitempty"` 2172 2173 // The predicted changes to resource properties. 2174 Delta []*WhatIfPropertyChange `json:"delta,omitempty"` 2175 2176 // The explanation about why the resource is unsupported by What-If. 2177 UnsupportedReason *string `json:"unsupportedReason,omitempty"` 2178} 2179 2180// MarshalJSON implements the json.Marshaller interface for type WhatIfChange. 2181func (w WhatIfChange) MarshalJSON() ([]byte, error) { 2182 objectMap := make(map[string]interface{}) 2183 populate(objectMap, "after", w.After) 2184 populate(objectMap, "before", w.Before) 2185 populate(objectMap, "changeType", w.ChangeType) 2186 populate(objectMap, "delta", w.Delta) 2187 populate(objectMap, "resourceId", w.ResourceID) 2188 populate(objectMap, "unsupportedReason", w.UnsupportedReason) 2189 return json.Marshal(objectMap) 2190} 2191 2192// WhatIfOperationProperties - Deployment operation properties. 2193type WhatIfOperationProperties struct { 2194 // List of resource changes predicted by What-If operation. 2195 Changes []*WhatIfChange `json:"changes,omitempty"` 2196} 2197 2198// MarshalJSON implements the json.Marshaller interface for type WhatIfOperationProperties. 2199func (w WhatIfOperationProperties) MarshalJSON() ([]byte, error) { 2200 objectMap := make(map[string]interface{}) 2201 populate(objectMap, "changes", w.Changes) 2202 return json.Marshal(objectMap) 2203} 2204 2205// WhatIfOperationResult - Result of the What-If operation. Contains a list of predicted changes and a URL link to get to the next set of results. 2206type WhatIfOperationResult struct { 2207 // Error when What-If operation fails. 2208 Error *ErrorResponse `json:"error,omitempty"` 2209 2210 // What-If operation properties. 2211 Properties *WhatIfOperationProperties `json:"properties,omitempty"` 2212 2213 // Status of the What-If operation. 2214 Status *string `json:"status,omitempty"` 2215} 2216 2217// WhatIfPropertyChange - The predicted change to the resource property. 2218type WhatIfPropertyChange struct { 2219 // REQUIRED; The path of the property. 2220 Path *string `json:"path,omitempty"` 2221 2222 // REQUIRED; The type of property change. 2223 PropertyChangeType *PropertyChangeType `json:"propertyChangeType,omitempty"` 2224 2225 // The value of the property after the deployment is executed. 2226 After map[string]interface{} `json:"after,omitempty"` 2227 2228 // The value of the property before the deployment is executed. 2229 Before map[string]interface{} `json:"before,omitempty"` 2230 2231 // Nested property changes. 2232 Children []*WhatIfPropertyChange `json:"children,omitempty"` 2233} 2234 2235// MarshalJSON implements the json.Marshaller interface for type WhatIfPropertyChange. 2236func (w WhatIfPropertyChange) MarshalJSON() ([]byte, error) { 2237 objectMap := make(map[string]interface{}) 2238 populate(objectMap, "after", w.After) 2239 populate(objectMap, "before", w.Before) 2240 populate(objectMap, "children", w.Children) 2241 populate(objectMap, "path", w.Path) 2242 populate(objectMap, "propertyChangeType", w.PropertyChangeType) 2243 return json.Marshal(objectMap) 2244} 2245 2246func populate(m map[string]interface{}, k string, v interface{}) { 2247 if v == nil { 2248 return 2249 } else if azcore.IsNullValue(v) { 2250 m[k] = nil 2251 } else if !reflect.ValueOf(v).IsNil() { 2252 m[k] = v 2253 } 2254} 2255 2256func unpopulate(data json.RawMessage, v interface{}) error { 2257 if data == nil { 2258 return nil 2259 } 2260 return json.Unmarshal(data, v) 2261} 2262