1package network 2 3// Copyright (c) Microsoft and contributors. All rights reserved. 4// 5// Licensed under the Apache License, Version 2.0 (the "License"); 6// you may not use this file except in compliance with the License. 7// You may obtain a copy of the License at 8// http://www.apache.org/licenses/LICENSE-2.0 9// 10// Unless required by applicable law or agreed to in writing, software 11// distributed under the License is distributed on an "AS IS" BASIS, 12// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13// 14// See the License for the specific language governing permissions and 15// limitations under the License. 16// 17// Code generated by Microsoft (R) AutoRest Code Generator. 18// Changes may cause incorrect behavior and will be lost if the code is regenerated. 19 20import ( 21 "context" 22 "encoding/json" 23 "github.com/Azure/go-autorest/autorest" 24 "github.com/Azure/go-autorest/autorest/azure" 25 "github.com/Azure/go-autorest/autorest/to" 26 "github.com/Azure/go-autorest/tracing" 27 "net/http" 28) 29 30// The package's fully qualified name. 31const fqdn = "github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-03-30/network" 32 33// AddressSpace addressSpace contains an array of IP address ranges that can be used by subnets 34type AddressSpace struct { 35 // AddressPrefixes - Gets or sets List of address blocks reserved for this virtual network in CIDR notation 36 AddressPrefixes *[]string `json:"addressPrefixes,omitempty"` 37} 38 39// ApplicationGateway applicationGateways resource 40type ApplicationGateway struct { 41 autorest.Response `json:"-"` 42 *ApplicationGatewayPropertiesFormat `json:"properties,omitempty"` 43 // Etag - Gets a unique read-only string that changes whenever the resource is updated 44 Etag *string `json:"etag,omitempty"` 45 // ID - Resource Id 46 ID *string `json:"id,omitempty"` 47 // Name - READ-ONLY; Resource name 48 Name *string `json:"name,omitempty"` 49 // Type - READ-ONLY; Resource type 50 Type *string `json:"type,omitempty"` 51 // Location - Resource location 52 Location *string `json:"location,omitempty"` 53 // Tags - Resource tags 54 Tags map[string]*string `json:"tags"` 55} 56 57// MarshalJSON is the custom marshaler for ApplicationGateway. 58func (ag ApplicationGateway) MarshalJSON() ([]byte, error) { 59 objectMap := make(map[string]interface{}) 60 if ag.ApplicationGatewayPropertiesFormat != nil { 61 objectMap["properties"] = ag.ApplicationGatewayPropertiesFormat 62 } 63 if ag.Etag != nil { 64 objectMap["etag"] = ag.Etag 65 } 66 if ag.ID != nil { 67 objectMap["id"] = ag.ID 68 } 69 if ag.Location != nil { 70 objectMap["location"] = ag.Location 71 } 72 if ag.Tags != nil { 73 objectMap["tags"] = ag.Tags 74 } 75 return json.Marshal(objectMap) 76} 77 78// UnmarshalJSON is the custom unmarshaler for ApplicationGateway struct. 79func (ag *ApplicationGateway) UnmarshalJSON(body []byte) error { 80 var m map[string]*json.RawMessage 81 err := json.Unmarshal(body, &m) 82 if err != nil { 83 return err 84 } 85 for k, v := range m { 86 switch k { 87 case "properties": 88 if v != nil { 89 var applicationGatewayPropertiesFormat ApplicationGatewayPropertiesFormat 90 err = json.Unmarshal(*v, &applicationGatewayPropertiesFormat) 91 if err != nil { 92 return err 93 } 94 ag.ApplicationGatewayPropertiesFormat = &applicationGatewayPropertiesFormat 95 } 96 case "etag": 97 if v != nil { 98 var etag string 99 err = json.Unmarshal(*v, &etag) 100 if err != nil { 101 return err 102 } 103 ag.Etag = &etag 104 } 105 case "id": 106 if v != nil { 107 var ID string 108 err = json.Unmarshal(*v, &ID) 109 if err != nil { 110 return err 111 } 112 ag.ID = &ID 113 } 114 case "name": 115 if v != nil { 116 var name string 117 err = json.Unmarshal(*v, &name) 118 if err != nil { 119 return err 120 } 121 ag.Name = &name 122 } 123 case "type": 124 if v != nil { 125 var typeVar string 126 err = json.Unmarshal(*v, &typeVar) 127 if err != nil { 128 return err 129 } 130 ag.Type = &typeVar 131 } 132 case "location": 133 if v != nil { 134 var location string 135 err = json.Unmarshal(*v, &location) 136 if err != nil { 137 return err 138 } 139 ag.Location = &location 140 } 141 case "tags": 142 if v != nil { 143 var tags map[string]*string 144 err = json.Unmarshal(*v, &tags) 145 if err != nil { 146 return err 147 } 148 ag.Tags = tags 149 } 150 } 151 } 152 153 return nil 154} 155 156// ApplicationGatewayBackendAddress backend Address of application gateway 157type ApplicationGatewayBackendAddress struct { 158 // Fqdn - Gets or sets the dns name 159 Fqdn *string `json:"fqdn,omitempty"` 160 // IPAddress - Gets or sets the ip address 161 IPAddress *string `json:"ipAddress,omitempty"` 162} 163 164// ApplicationGatewayBackendAddressPool backend Address Pool of application gateway 165type ApplicationGatewayBackendAddressPool struct { 166 *ApplicationGatewayBackendAddressPoolPropertiesFormat `json:"properties,omitempty"` 167 // Name - Gets name of the resource that is unique within a resource group. This name can be used to access the resource 168 Name *string `json:"name,omitempty"` 169 // Etag - A unique read-only string that changes whenever the resource is updated 170 Etag *string `json:"etag,omitempty"` 171 // ID - Resource Id 172 ID *string `json:"id,omitempty"` 173} 174 175// MarshalJSON is the custom marshaler for ApplicationGatewayBackendAddressPool. 176func (agbap ApplicationGatewayBackendAddressPool) MarshalJSON() ([]byte, error) { 177 objectMap := make(map[string]interface{}) 178 if agbap.ApplicationGatewayBackendAddressPoolPropertiesFormat != nil { 179 objectMap["properties"] = agbap.ApplicationGatewayBackendAddressPoolPropertiesFormat 180 } 181 if agbap.Name != nil { 182 objectMap["name"] = agbap.Name 183 } 184 if agbap.Etag != nil { 185 objectMap["etag"] = agbap.Etag 186 } 187 if agbap.ID != nil { 188 objectMap["id"] = agbap.ID 189 } 190 return json.Marshal(objectMap) 191} 192 193// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayBackendAddressPool struct. 194func (agbap *ApplicationGatewayBackendAddressPool) UnmarshalJSON(body []byte) error { 195 var m map[string]*json.RawMessage 196 err := json.Unmarshal(body, &m) 197 if err != nil { 198 return err 199 } 200 for k, v := range m { 201 switch k { 202 case "properties": 203 if v != nil { 204 var applicationGatewayBackendAddressPoolPropertiesFormat ApplicationGatewayBackendAddressPoolPropertiesFormat 205 err = json.Unmarshal(*v, &applicationGatewayBackendAddressPoolPropertiesFormat) 206 if err != nil { 207 return err 208 } 209 agbap.ApplicationGatewayBackendAddressPoolPropertiesFormat = &applicationGatewayBackendAddressPoolPropertiesFormat 210 } 211 case "name": 212 if v != nil { 213 var name string 214 err = json.Unmarshal(*v, &name) 215 if err != nil { 216 return err 217 } 218 agbap.Name = &name 219 } 220 case "etag": 221 if v != nil { 222 var etag string 223 err = json.Unmarshal(*v, &etag) 224 if err != nil { 225 return err 226 } 227 agbap.Etag = &etag 228 } 229 case "id": 230 if v != nil { 231 var ID string 232 err = json.Unmarshal(*v, &ID) 233 if err != nil { 234 return err 235 } 236 agbap.ID = &ID 237 } 238 } 239 } 240 241 return nil 242} 243 244// ApplicationGatewayBackendAddressPoolPropertiesFormat properties of Backend Address Pool of application 245// gateway 246type ApplicationGatewayBackendAddressPoolPropertiesFormat struct { 247 // BackendIPConfigurations - Gets collection of references to IPs defined in NICs 248 BackendIPConfigurations *[]InterfaceIPConfiguration `json:"backendIPConfigurations,omitempty"` 249 // BackendAddresses - Gets or sets the backend addresses 250 BackendAddresses *[]ApplicationGatewayBackendAddress `json:"backendAddresses,omitempty"` 251 // ProvisioningState - Gets or sets Provisioning state of the backend address pool resource Updating/Deleting/Failed 252 ProvisioningState *string `json:"provisioningState,omitempty"` 253} 254 255// ApplicationGatewayBackendHTTPSettings backend address pool settings of application gateway 256type ApplicationGatewayBackendHTTPSettings struct { 257 *ApplicationGatewayBackendHTTPSettingsPropertiesFormat `json:"properties,omitempty"` 258 // Name - Gets name of the resource that is unique within a resource group. This name can be used to access the resource 259 Name *string `json:"name,omitempty"` 260 // Etag - A unique read-only string that changes whenever the resource is updated 261 Etag *string `json:"etag,omitempty"` 262 // ID - Resource Id 263 ID *string `json:"id,omitempty"` 264} 265 266// MarshalJSON is the custom marshaler for ApplicationGatewayBackendHTTPSettings. 267func (agbhs ApplicationGatewayBackendHTTPSettings) MarshalJSON() ([]byte, error) { 268 objectMap := make(map[string]interface{}) 269 if agbhs.ApplicationGatewayBackendHTTPSettingsPropertiesFormat != nil { 270 objectMap["properties"] = agbhs.ApplicationGatewayBackendHTTPSettingsPropertiesFormat 271 } 272 if agbhs.Name != nil { 273 objectMap["name"] = agbhs.Name 274 } 275 if agbhs.Etag != nil { 276 objectMap["etag"] = agbhs.Etag 277 } 278 if agbhs.ID != nil { 279 objectMap["id"] = agbhs.ID 280 } 281 return json.Marshal(objectMap) 282} 283 284// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayBackendHTTPSettings struct. 285func (agbhs *ApplicationGatewayBackendHTTPSettings) UnmarshalJSON(body []byte) error { 286 var m map[string]*json.RawMessage 287 err := json.Unmarshal(body, &m) 288 if err != nil { 289 return err 290 } 291 for k, v := range m { 292 switch k { 293 case "properties": 294 if v != nil { 295 var applicationGatewayBackendHTTPSettingsPropertiesFormat ApplicationGatewayBackendHTTPSettingsPropertiesFormat 296 err = json.Unmarshal(*v, &applicationGatewayBackendHTTPSettingsPropertiesFormat) 297 if err != nil { 298 return err 299 } 300 agbhs.ApplicationGatewayBackendHTTPSettingsPropertiesFormat = &applicationGatewayBackendHTTPSettingsPropertiesFormat 301 } 302 case "name": 303 if v != nil { 304 var name string 305 err = json.Unmarshal(*v, &name) 306 if err != nil { 307 return err 308 } 309 agbhs.Name = &name 310 } 311 case "etag": 312 if v != nil { 313 var etag string 314 err = json.Unmarshal(*v, &etag) 315 if err != nil { 316 return err 317 } 318 agbhs.Etag = &etag 319 } 320 case "id": 321 if v != nil { 322 var ID string 323 err = json.Unmarshal(*v, &ID) 324 if err != nil { 325 return err 326 } 327 agbhs.ID = &ID 328 } 329 } 330 } 331 332 return nil 333} 334 335// ApplicationGatewayBackendHTTPSettingsPropertiesFormat properties of Backend address pool settings of 336// application gateway 337type ApplicationGatewayBackendHTTPSettingsPropertiesFormat struct { 338 // Port - Gets or sets the port 339 Port *int32 `json:"port,omitempty"` 340 // Protocol - Gets or sets the protocol. Possible values include: 'HTTP', 'HTTPS' 341 Protocol ApplicationGatewayProtocol `json:"protocol,omitempty"` 342 // CookieBasedAffinity - Gets or sets the cookie affinity. Possible values include: 'Enabled', 'Disabled' 343 CookieBasedAffinity ApplicationGatewayCookieBasedAffinity `json:"cookieBasedAffinity,omitempty"` 344 // RequestTimeout - Gets or sets request timeout 345 RequestTimeout *int32 `json:"requestTimeout,omitempty"` 346 // Probe - Gets or sets probe resource of application gateway 347 Probe *SubResource `json:"probe,omitempty"` 348 // ProvisioningState - Gets or sets Provisioning state of the backend http settings resource Updating/Deleting/Failed 349 ProvisioningState *string `json:"provisioningState,omitempty"` 350} 351 352// ApplicationGatewayFrontendIPConfiguration frontend IP configuration of application gateway 353type ApplicationGatewayFrontendIPConfiguration struct { 354 *ApplicationGatewayFrontendIPConfigurationPropertiesFormat `json:"properties,omitempty"` 355 // Name - Gets name of the resource that is unique within a resource group. This name can be used to access the resource 356 Name *string `json:"name,omitempty"` 357 // Etag - A unique read-only string that changes whenever the resource is updated 358 Etag *string `json:"etag,omitempty"` 359 // ID - Resource Id 360 ID *string `json:"id,omitempty"` 361} 362 363// MarshalJSON is the custom marshaler for ApplicationGatewayFrontendIPConfiguration. 364func (agfic ApplicationGatewayFrontendIPConfiguration) MarshalJSON() ([]byte, error) { 365 objectMap := make(map[string]interface{}) 366 if agfic.ApplicationGatewayFrontendIPConfigurationPropertiesFormat != nil { 367 objectMap["properties"] = agfic.ApplicationGatewayFrontendIPConfigurationPropertiesFormat 368 } 369 if agfic.Name != nil { 370 objectMap["name"] = agfic.Name 371 } 372 if agfic.Etag != nil { 373 objectMap["etag"] = agfic.Etag 374 } 375 if agfic.ID != nil { 376 objectMap["id"] = agfic.ID 377 } 378 return json.Marshal(objectMap) 379} 380 381// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayFrontendIPConfiguration struct. 382func (agfic *ApplicationGatewayFrontendIPConfiguration) UnmarshalJSON(body []byte) error { 383 var m map[string]*json.RawMessage 384 err := json.Unmarshal(body, &m) 385 if err != nil { 386 return err 387 } 388 for k, v := range m { 389 switch k { 390 case "properties": 391 if v != nil { 392 var applicationGatewayFrontendIPConfigurationPropertiesFormat ApplicationGatewayFrontendIPConfigurationPropertiesFormat 393 err = json.Unmarshal(*v, &applicationGatewayFrontendIPConfigurationPropertiesFormat) 394 if err != nil { 395 return err 396 } 397 agfic.ApplicationGatewayFrontendIPConfigurationPropertiesFormat = &applicationGatewayFrontendIPConfigurationPropertiesFormat 398 } 399 case "name": 400 if v != nil { 401 var name string 402 err = json.Unmarshal(*v, &name) 403 if err != nil { 404 return err 405 } 406 agfic.Name = &name 407 } 408 case "etag": 409 if v != nil { 410 var etag string 411 err = json.Unmarshal(*v, &etag) 412 if err != nil { 413 return err 414 } 415 agfic.Etag = &etag 416 } 417 case "id": 418 if v != nil { 419 var ID string 420 err = json.Unmarshal(*v, &ID) 421 if err != nil { 422 return err 423 } 424 agfic.ID = &ID 425 } 426 } 427 } 428 429 return nil 430} 431 432// ApplicationGatewayFrontendIPConfigurationPropertiesFormat properties of Frontend IP configuration of 433// application gateway 434type ApplicationGatewayFrontendIPConfigurationPropertiesFormat struct { 435 // PrivateIPAddress - Gets or sets the privateIPAddress of the Network Interface IP Configuration 436 PrivateIPAddress *string `json:"privateIPAddress,omitempty"` 437 // PrivateIPAllocationMethod - Gets or sets PrivateIP allocation method (Static/Dynamic). Possible values include: 'Static', 'Dynamic' 438 PrivateIPAllocationMethod IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"` 439 // Subnet - Gets or sets the reference of the subnet resource 440 Subnet *SubResource `json:"subnet,omitempty"` 441 // PublicIPAddress - Gets or sets the reference of the PublicIP resource 442 PublicIPAddress *SubResource `json:"publicIPAddress,omitempty"` 443 // ProvisioningState - Gets or sets Provisioning state of the PublicIP resource Updating/Deleting/Failed 444 ProvisioningState *string `json:"provisioningState,omitempty"` 445} 446 447// ApplicationGatewayFrontendPort frontend Port of application gateway 448type ApplicationGatewayFrontendPort struct { 449 *ApplicationGatewayFrontendPortPropertiesFormat `json:"properties,omitempty"` 450 // Name - Gets name of the resource that is unique within a resource group. This name can be used to access the resource 451 Name *string `json:"name,omitempty"` 452 // Etag - A unique read-only string that changes whenever the resource is updated 453 Etag *string `json:"etag,omitempty"` 454 // ID - Resource Id 455 ID *string `json:"id,omitempty"` 456} 457 458// MarshalJSON is the custom marshaler for ApplicationGatewayFrontendPort. 459func (agfp ApplicationGatewayFrontendPort) MarshalJSON() ([]byte, error) { 460 objectMap := make(map[string]interface{}) 461 if agfp.ApplicationGatewayFrontendPortPropertiesFormat != nil { 462 objectMap["properties"] = agfp.ApplicationGatewayFrontendPortPropertiesFormat 463 } 464 if agfp.Name != nil { 465 objectMap["name"] = agfp.Name 466 } 467 if agfp.Etag != nil { 468 objectMap["etag"] = agfp.Etag 469 } 470 if agfp.ID != nil { 471 objectMap["id"] = agfp.ID 472 } 473 return json.Marshal(objectMap) 474} 475 476// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayFrontendPort struct. 477func (agfp *ApplicationGatewayFrontendPort) UnmarshalJSON(body []byte) error { 478 var m map[string]*json.RawMessage 479 err := json.Unmarshal(body, &m) 480 if err != nil { 481 return err 482 } 483 for k, v := range m { 484 switch k { 485 case "properties": 486 if v != nil { 487 var applicationGatewayFrontendPortPropertiesFormat ApplicationGatewayFrontendPortPropertiesFormat 488 err = json.Unmarshal(*v, &applicationGatewayFrontendPortPropertiesFormat) 489 if err != nil { 490 return err 491 } 492 agfp.ApplicationGatewayFrontendPortPropertiesFormat = &applicationGatewayFrontendPortPropertiesFormat 493 } 494 case "name": 495 if v != nil { 496 var name string 497 err = json.Unmarshal(*v, &name) 498 if err != nil { 499 return err 500 } 501 agfp.Name = &name 502 } 503 case "etag": 504 if v != nil { 505 var etag string 506 err = json.Unmarshal(*v, &etag) 507 if err != nil { 508 return err 509 } 510 agfp.Etag = &etag 511 } 512 case "id": 513 if v != nil { 514 var ID string 515 err = json.Unmarshal(*v, &ID) 516 if err != nil { 517 return err 518 } 519 agfp.ID = &ID 520 } 521 } 522 } 523 524 return nil 525} 526 527// ApplicationGatewayFrontendPortPropertiesFormat properties of Frontend Port of application gateway 528type ApplicationGatewayFrontendPortPropertiesFormat struct { 529 // Port - Gets or sets the frontend port 530 Port *int32 `json:"port,omitempty"` 531 // ProvisioningState - Gets or sets Provisioning state of the frontend port resource Updating/Deleting/Failed 532 ProvisioningState *string `json:"provisioningState,omitempty"` 533} 534 535// ApplicationGatewayHTTPListener http listener of application gateway 536type ApplicationGatewayHTTPListener struct { 537 *ApplicationGatewayHTTPListenerPropertiesFormat `json:"properties,omitempty"` 538 // Name - Gets name of the resource that is unique within a resource group. This name can be used to access the resource 539 Name *string `json:"name,omitempty"` 540 // Etag - A unique read-only string that changes whenever the resource is updated 541 Etag *string `json:"etag,omitempty"` 542 // ID - Resource Id 543 ID *string `json:"id,omitempty"` 544} 545 546// MarshalJSON is the custom marshaler for ApplicationGatewayHTTPListener. 547func (aghl ApplicationGatewayHTTPListener) MarshalJSON() ([]byte, error) { 548 objectMap := make(map[string]interface{}) 549 if aghl.ApplicationGatewayHTTPListenerPropertiesFormat != nil { 550 objectMap["properties"] = aghl.ApplicationGatewayHTTPListenerPropertiesFormat 551 } 552 if aghl.Name != nil { 553 objectMap["name"] = aghl.Name 554 } 555 if aghl.Etag != nil { 556 objectMap["etag"] = aghl.Etag 557 } 558 if aghl.ID != nil { 559 objectMap["id"] = aghl.ID 560 } 561 return json.Marshal(objectMap) 562} 563 564// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayHTTPListener struct. 565func (aghl *ApplicationGatewayHTTPListener) UnmarshalJSON(body []byte) error { 566 var m map[string]*json.RawMessage 567 err := json.Unmarshal(body, &m) 568 if err != nil { 569 return err 570 } 571 for k, v := range m { 572 switch k { 573 case "properties": 574 if v != nil { 575 var applicationGatewayHTTPListenerPropertiesFormat ApplicationGatewayHTTPListenerPropertiesFormat 576 err = json.Unmarshal(*v, &applicationGatewayHTTPListenerPropertiesFormat) 577 if err != nil { 578 return err 579 } 580 aghl.ApplicationGatewayHTTPListenerPropertiesFormat = &applicationGatewayHTTPListenerPropertiesFormat 581 } 582 case "name": 583 if v != nil { 584 var name string 585 err = json.Unmarshal(*v, &name) 586 if err != nil { 587 return err 588 } 589 aghl.Name = &name 590 } 591 case "etag": 592 if v != nil { 593 var etag string 594 err = json.Unmarshal(*v, &etag) 595 if err != nil { 596 return err 597 } 598 aghl.Etag = &etag 599 } 600 case "id": 601 if v != nil { 602 var ID string 603 err = json.Unmarshal(*v, &ID) 604 if err != nil { 605 return err 606 } 607 aghl.ID = &ID 608 } 609 } 610 } 611 612 return nil 613} 614 615// ApplicationGatewayHTTPListenerPropertiesFormat properties of Http listener of application gateway 616type ApplicationGatewayHTTPListenerPropertiesFormat struct { 617 // FrontendIPConfiguration - Gets or sets frontend IP configuration resource of application gateway 618 FrontendIPConfiguration *SubResource `json:"frontendIPConfiguration,omitempty"` 619 // FrontendPort - Gets or sets frontend port resource of application gateway 620 FrontendPort *SubResource `json:"frontendPort,omitempty"` 621 // Protocol - Gets or sets the protocol. Possible values include: 'HTTP', 'HTTPS' 622 Protocol ApplicationGatewayProtocol `json:"protocol,omitempty"` 623 // HostName - Gets or sets the host name of http listener 624 HostName *string `json:"hostName,omitempty"` 625 // SslCertificate - Gets or sets ssl certificate resource of application gateway 626 SslCertificate *SubResource `json:"sslCertificate,omitempty"` 627 // RequireServerNameIndication - Gets or sets the requireServerNameIndication of http listener 628 RequireServerNameIndication *bool `json:"requireServerNameIndication,omitempty"` 629 // ProvisioningState - Gets or sets Provisioning state of the http listener resource Updating/Deleting/Failed 630 ProvisioningState *string `json:"provisioningState,omitempty"` 631} 632 633// ApplicationGatewayIPConfiguration IP configuration of application gateway 634type ApplicationGatewayIPConfiguration struct { 635 *ApplicationGatewayIPConfigurationPropertiesFormat `json:"properties,omitempty"` 636 // Name - Gets name of the resource that is unique within a resource group. This name can be used to access the resource 637 Name *string `json:"name,omitempty"` 638 // Etag - A unique read-only string that changes whenever the resource is updated 639 Etag *string `json:"etag,omitempty"` 640 // ID - Resource Id 641 ID *string `json:"id,omitempty"` 642} 643 644// MarshalJSON is the custom marshaler for ApplicationGatewayIPConfiguration. 645func (agic ApplicationGatewayIPConfiguration) MarshalJSON() ([]byte, error) { 646 objectMap := make(map[string]interface{}) 647 if agic.ApplicationGatewayIPConfigurationPropertiesFormat != nil { 648 objectMap["properties"] = agic.ApplicationGatewayIPConfigurationPropertiesFormat 649 } 650 if agic.Name != nil { 651 objectMap["name"] = agic.Name 652 } 653 if agic.Etag != nil { 654 objectMap["etag"] = agic.Etag 655 } 656 if agic.ID != nil { 657 objectMap["id"] = agic.ID 658 } 659 return json.Marshal(objectMap) 660} 661 662// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayIPConfiguration struct. 663func (agic *ApplicationGatewayIPConfiguration) UnmarshalJSON(body []byte) error { 664 var m map[string]*json.RawMessage 665 err := json.Unmarshal(body, &m) 666 if err != nil { 667 return err 668 } 669 for k, v := range m { 670 switch k { 671 case "properties": 672 if v != nil { 673 var applicationGatewayIPConfigurationPropertiesFormat ApplicationGatewayIPConfigurationPropertiesFormat 674 err = json.Unmarshal(*v, &applicationGatewayIPConfigurationPropertiesFormat) 675 if err != nil { 676 return err 677 } 678 agic.ApplicationGatewayIPConfigurationPropertiesFormat = &applicationGatewayIPConfigurationPropertiesFormat 679 } 680 case "name": 681 if v != nil { 682 var name string 683 err = json.Unmarshal(*v, &name) 684 if err != nil { 685 return err 686 } 687 agic.Name = &name 688 } 689 case "etag": 690 if v != nil { 691 var etag string 692 err = json.Unmarshal(*v, &etag) 693 if err != nil { 694 return err 695 } 696 agic.Etag = &etag 697 } 698 case "id": 699 if v != nil { 700 var ID string 701 err = json.Unmarshal(*v, &ID) 702 if err != nil { 703 return err 704 } 705 agic.ID = &ID 706 } 707 } 708 } 709 710 return nil 711} 712 713// ApplicationGatewayIPConfigurationPropertiesFormat properties of IP configuration of application gateway 714type ApplicationGatewayIPConfigurationPropertiesFormat struct { 715 // Subnet - Gets or sets the reference of the subnet resource.A subnet from where application gateway gets its private address 716 Subnet *SubResource `json:"subnet,omitempty"` 717 // ProvisioningState - Gets or sets Provisioning state of the application gateway subnet resource Updating/Deleting/Failed 718 ProvisioningState *string `json:"provisioningState,omitempty"` 719} 720 721// ApplicationGatewayListResult response for ListLoadBalancers Api service call 722type ApplicationGatewayListResult struct { 723 autorest.Response `json:"-"` 724 // Value - Gets a list of ApplicationGateways in a resource group 725 Value *[]ApplicationGateway `json:"value,omitempty"` 726 // NextLink - Gets the URL to get the next set of results. 727 NextLink *string `json:"nextLink,omitempty"` 728} 729 730// ApplicationGatewayListResultIterator provides access to a complete listing of ApplicationGateway values. 731type ApplicationGatewayListResultIterator struct { 732 i int 733 page ApplicationGatewayListResultPage 734} 735 736// NextWithContext advances to the next value. If there was an error making 737// the request the iterator does not advance and the error is returned. 738func (iter *ApplicationGatewayListResultIterator) NextWithContext(ctx context.Context) (err error) { 739 if tracing.IsEnabled() { 740 ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationGatewayListResultIterator.NextWithContext") 741 defer func() { 742 sc := -1 743 if iter.Response().Response.Response != nil { 744 sc = iter.Response().Response.Response.StatusCode 745 } 746 tracing.EndSpan(ctx, sc, err) 747 }() 748 } 749 iter.i++ 750 if iter.i < len(iter.page.Values()) { 751 return nil 752 } 753 err = iter.page.NextWithContext(ctx) 754 if err != nil { 755 iter.i-- 756 return err 757 } 758 iter.i = 0 759 return nil 760} 761 762// Next advances to the next value. If there was an error making 763// the request the iterator does not advance and the error is returned. 764// Deprecated: Use NextWithContext() instead. 765func (iter *ApplicationGatewayListResultIterator) Next() error { 766 return iter.NextWithContext(context.Background()) 767} 768 769// NotDone returns true if the enumeration should be started or is not yet complete. 770func (iter ApplicationGatewayListResultIterator) NotDone() bool { 771 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 772} 773 774// Response returns the raw server response from the last page request. 775func (iter ApplicationGatewayListResultIterator) Response() ApplicationGatewayListResult { 776 return iter.page.Response() 777} 778 779// Value returns the current value or a zero-initialized value if the 780// iterator has advanced beyond the end of the collection. 781func (iter ApplicationGatewayListResultIterator) Value() ApplicationGateway { 782 if !iter.page.NotDone() { 783 return ApplicationGateway{} 784 } 785 return iter.page.Values()[iter.i] 786} 787 788// Creates a new instance of the ApplicationGatewayListResultIterator type. 789func NewApplicationGatewayListResultIterator(page ApplicationGatewayListResultPage) ApplicationGatewayListResultIterator { 790 return ApplicationGatewayListResultIterator{page: page} 791} 792 793// IsEmpty returns true if the ListResult contains no values. 794func (aglr ApplicationGatewayListResult) IsEmpty() bool { 795 return aglr.Value == nil || len(*aglr.Value) == 0 796} 797 798// hasNextLink returns true if the NextLink is not empty. 799func (aglr ApplicationGatewayListResult) hasNextLink() bool { 800 return aglr.NextLink != nil && len(*aglr.NextLink) != 0 801} 802 803// applicationGatewayListResultPreparer prepares a request to retrieve the next set of results. 804// It returns nil if no more results exist. 805func (aglr ApplicationGatewayListResult) applicationGatewayListResultPreparer(ctx context.Context) (*http.Request, error) { 806 if !aglr.hasNextLink() { 807 return nil, nil 808 } 809 return autorest.Prepare((&http.Request{}).WithContext(ctx), 810 autorest.AsJSON(), 811 autorest.AsGet(), 812 autorest.WithBaseURL(to.String(aglr.NextLink))) 813} 814 815// ApplicationGatewayListResultPage contains a page of ApplicationGateway values. 816type ApplicationGatewayListResultPage struct { 817 fn func(context.Context, ApplicationGatewayListResult) (ApplicationGatewayListResult, error) 818 aglr ApplicationGatewayListResult 819} 820 821// NextWithContext advances to the next page of values. If there was an error making 822// the request the page does not advance and the error is returned. 823func (page *ApplicationGatewayListResultPage) NextWithContext(ctx context.Context) (err error) { 824 if tracing.IsEnabled() { 825 ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationGatewayListResultPage.NextWithContext") 826 defer func() { 827 sc := -1 828 if page.Response().Response.Response != nil { 829 sc = page.Response().Response.Response.StatusCode 830 } 831 tracing.EndSpan(ctx, sc, err) 832 }() 833 } 834 for { 835 next, err := page.fn(ctx, page.aglr) 836 if err != nil { 837 return err 838 } 839 page.aglr = next 840 if !next.hasNextLink() || !next.IsEmpty() { 841 break 842 } 843 } 844 return nil 845} 846 847// Next advances to the next page of values. If there was an error making 848// the request the page does not advance and the error is returned. 849// Deprecated: Use NextWithContext() instead. 850func (page *ApplicationGatewayListResultPage) Next() error { 851 return page.NextWithContext(context.Background()) 852} 853 854// NotDone returns true if the page enumeration should be started or is not yet complete. 855func (page ApplicationGatewayListResultPage) NotDone() bool { 856 return !page.aglr.IsEmpty() 857} 858 859// Response returns the raw server response from the last page request. 860func (page ApplicationGatewayListResultPage) Response() ApplicationGatewayListResult { 861 return page.aglr 862} 863 864// Values returns the slice of values for the current page or nil if there are no values. 865func (page ApplicationGatewayListResultPage) Values() []ApplicationGateway { 866 if page.aglr.IsEmpty() { 867 return nil 868 } 869 return *page.aglr.Value 870} 871 872// Creates a new instance of the ApplicationGatewayListResultPage type. 873func NewApplicationGatewayListResultPage(cur ApplicationGatewayListResult, getNextPage func(context.Context, ApplicationGatewayListResult) (ApplicationGatewayListResult, error)) ApplicationGatewayListResultPage { 874 return ApplicationGatewayListResultPage{ 875 fn: getNextPage, 876 aglr: cur, 877 } 878} 879 880// ApplicationGatewayPathRule path rule of URL path map of application gateway 881type ApplicationGatewayPathRule struct { 882 *ApplicationGatewayPathRulePropertiesFormat `json:"properties,omitempty"` 883 // Name - Gets name of the resource that is unique within a resource group. This name can be used to access the resource 884 Name *string `json:"name,omitempty"` 885 // Etag - A unique read-only string that changes whenever the resource is updated 886 Etag *string `json:"etag,omitempty"` 887 // ID - Resource Id 888 ID *string `json:"id,omitempty"` 889} 890 891// MarshalJSON is the custom marshaler for ApplicationGatewayPathRule. 892func (agpr ApplicationGatewayPathRule) MarshalJSON() ([]byte, error) { 893 objectMap := make(map[string]interface{}) 894 if agpr.ApplicationGatewayPathRulePropertiesFormat != nil { 895 objectMap["properties"] = agpr.ApplicationGatewayPathRulePropertiesFormat 896 } 897 if agpr.Name != nil { 898 objectMap["name"] = agpr.Name 899 } 900 if agpr.Etag != nil { 901 objectMap["etag"] = agpr.Etag 902 } 903 if agpr.ID != nil { 904 objectMap["id"] = agpr.ID 905 } 906 return json.Marshal(objectMap) 907} 908 909// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayPathRule struct. 910func (agpr *ApplicationGatewayPathRule) UnmarshalJSON(body []byte) error { 911 var m map[string]*json.RawMessage 912 err := json.Unmarshal(body, &m) 913 if err != nil { 914 return err 915 } 916 for k, v := range m { 917 switch k { 918 case "properties": 919 if v != nil { 920 var applicationGatewayPathRulePropertiesFormat ApplicationGatewayPathRulePropertiesFormat 921 err = json.Unmarshal(*v, &applicationGatewayPathRulePropertiesFormat) 922 if err != nil { 923 return err 924 } 925 agpr.ApplicationGatewayPathRulePropertiesFormat = &applicationGatewayPathRulePropertiesFormat 926 } 927 case "name": 928 if v != nil { 929 var name string 930 err = json.Unmarshal(*v, &name) 931 if err != nil { 932 return err 933 } 934 agpr.Name = &name 935 } 936 case "etag": 937 if v != nil { 938 var etag string 939 err = json.Unmarshal(*v, &etag) 940 if err != nil { 941 return err 942 } 943 agpr.Etag = &etag 944 } 945 case "id": 946 if v != nil { 947 var ID string 948 err = json.Unmarshal(*v, &ID) 949 if err != nil { 950 return err 951 } 952 agpr.ID = &ID 953 } 954 } 955 } 956 957 return nil 958} 959 960// ApplicationGatewayPathRulePropertiesFormat properties of probe of application gateway 961type ApplicationGatewayPathRulePropertiesFormat struct { 962 // Paths - Gets or sets the path rules of URL path map 963 Paths *[]string `json:"paths,omitempty"` 964 // BackendAddressPool - Gets or sets backend address pool resource of URL path map 965 BackendAddressPool *SubResource `json:"backendAddressPool,omitempty"` 966 // BackendHTTPSettings - Gets or sets backend http settings resource of URL path map 967 BackendHTTPSettings *SubResource `json:"backendHttpSettings,omitempty"` 968 // ProvisioningState - Gets or sets path rule of URL path map resource Updating/Deleting/Failed 969 ProvisioningState *string `json:"provisioningState,omitempty"` 970} 971 972// ApplicationGatewayProbe probe of application gateway 973type ApplicationGatewayProbe struct { 974 *ApplicationGatewayProbePropertiesFormat `json:"properties,omitempty"` 975 // Name - Gets name of the resource that is unique within a resource group. This name can be used to access the resource 976 Name *string `json:"name,omitempty"` 977 // Etag - A unique read-only string that changes whenever the resource is updated 978 Etag *string `json:"etag,omitempty"` 979 // ID - Resource Id 980 ID *string `json:"id,omitempty"` 981} 982 983// MarshalJSON is the custom marshaler for ApplicationGatewayProbe. 984func (agp ApplicationGatewayProbe) MarshalJSON() ([]byte, error) { 985 objectMap := make(map[string]interface{}) 986 if agp.ApplicationGatewayProbePropertiesFormat != nil { 987 objectMap["properties"] = agp.ApplicationGatewayProbePropertiesFormat 988 } 989 if agp.Name != nil { 990 objectMap["name"] = agp.Name 991 } 992 if agp.Etag != nil { 993 objectMap["etag"] = agp.Etag 994 } 995 if agp.ID != nil { 996 objectMap["id"] = agp.ID 997 } 998 return json.Marshal(objectMap) 999} 1000 1001// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayProbe struct. 1002func (agp *ApplicationGatewayProbe) UnmarshalJSON(body []byte) error { 1003 var m map[string]*json.RawMessage 1004 err := json.Unmarshal(body, &m) 1005 if err != nil { 1006 return err 1007 } 1008 for k, v := range m { 1009 switch k { 1010 case "properties": 1011 if v != nil { 1012 var applicationGatewayProbePropertiesFormat ApplicationGatewayProbePropertiesFormat 1013 err = json.Unmarshal(*v, &applicationGatewayProbePropertiesFormat) 1014 if err != nil { 1015 return err 1016 } 1017 agp.ApplicationGatewayProbePropertiesFormat = &applicationGatewayProbePropertiesFormat 1018 } 1019 case "name": 1020 if v != nil { 1021 var name string 1022 err = json.Unmarshal(*v, &name) 1023 if err != nil { 1024 return err 1025 } 1026 agp.Name = &name 1027 } 1028 case "etag": 1029 if v != nil { 1030 var etag string 1031 err = json.Unmarshal(*v, &etag) 1032 if err != nil { 1033 return err 1034 } 1035 agp.Etag = &etag 1036 } 1037 case "id": 1038 if v != nil { 1039 var ID string 1040 err = json.Unmarshal(*v, &ID) 1041 if err != nil { 1042 return err 1043 } 1044 agp.ID = &ID 1045 } 1046 } 1047 } 1048 1049 return nil 1050} 1051 1052// ApplicationGatewayProbePropertiesFormat properties of probe of application gateway 1053type ApplicationGatewayProbePropertiesFormat struct { 1054 // Protocol - Gets or sets the protocol. Possible values include: 'HTTP', 'HTTPS' 1055 Protocol ApplicationGatewayProtocol `json:"protocol,omitempty"` 1056 // Host - Gets or sets the host to send probe to 1057 Host *string `json:"host,omitempty"` 1058 // Path - Gets or sets the relative path of probe 1059 Path *string `json:"path,omitempty"` 1060 // Interval - Gets or sets probing interval in seconds 1061 Interval *int32 `json:"interval,omitempty"` 1062 // Timeout - Gets or sets probing timeout in seconds 1063 Timeout *int32 `json:"timeout,omitempty"` 1064 // UnhealthyThreshold - Gets or sets probing unhealthy threshold 1065 UnhealthyThreshold *int32 `json:"unhealthyThreshold,omitempty"` 1066 // ProvisioningState - Gets or sets Provisioning state of the backend http settings resource Updating/Deleting/Failed 1067 ProvisioningState *string `json:"provisioningState,omitempty"` 1068} 1069 1070// ApplicationGatewayPropertiesFormat properties of Application Gateway 1071type ApplicationGatewayPropertiesFormat struct { 1072 // Sku - Gets or sets sku of application gateway resource 1073 Sku *ApplicationGatewaySku `json:"sku,omitempty"` 1074 // OperationalState - READ-ONLY; Gets operational state of application gateway resource. Possible values include: 'Stopped', 'Starting', 'Running', 'Stopping' 1075 OperationalState ApplicationGatewayOperationalState `json:"operationalState,omitempty"` 1076 // GatewayIPConfigurations - Gets or sets subnets of application gateway resource 1077 GatewayIPConfigurations *[]ApplicationGatewayIPConfiguration `json:"gatewayIPConfigurations,omitempty"` 1078 // SslCertificates - Gets or sets ssl certificates of application gateway resource 1079 SslCertificates *[]ApplicationGatewaySslCertificate `json:"sslCertificates,omitempty"` 1080 // FrontendIPConfigurations - Gets or sets frontend IP addresses of application gateway resource 1081 FrontendIPConfigurations *[]ApplicationGatewayFrontendIPConfiguration `json:"frontendIPConfigurations,omitempty"` 1082 // FrontendPorts - Gets or sets frontend ports of application gateway resource 1083 FrontendPorts *[]ApplicationGatewayFrontendPort `json:"frontendPorts,omitempty"` 1084 // Probes - Gets or sets probes of application gateway resource 1085 Probes *[]ApplicationGatewayProbe `json:"probes,omitempty"` 1086 // BackendAddressPools - Gets or sets backend address pool of application gateway resource 1087 BackendAddressPools *[]ApplicationGatewayBackendAddressPool `json:"backendAddressPools,omitempty"` 1088 // BackendHTTPSettingsCollection - Gets or sets backend http settings of application gateway resource 1089 BackendHTTPSettingsCollection *[]ApplicationGatewayBackendHTTPSettings `json:"backendHttpSettingsCollection,omitempty"` 1090 // HTTPListeners - Gets or sets HTTP listeners of application gateway resource 1091 HTTPListeners *[]ApplicationGatewayHTTPListener `json:"httpListeners,omitempty"` 1092 // URLPathMaps - Gets or sets URL path map of application gateway resource 1093 URLPathMaps *[]ApplicationGatewayURLPathMap `json:"urlPathMaps,omitempty"` 1094 // RequestRoutingRules - Gets or sets request routing rules of application gateway resource 1095 RequestRoutingRules *[]ApplicationGatewayRequestRoutingRule `json:"requestRoutingRules,omitempty"` 1096 // ResourceGUID - Gets or sets resource GUID property of the ApplicationGateway resource 1097 ResourceGUID *string `json:"resourceGuid,omitempty"` 1098 // ProvisioningState - Gets or sets Provisioning state of the ApplicationGateway resource Updating/Deleting/Failed 1099 ProvisioningState *string `json:"provisioningState,omitempty"` 1100} 1101 1102// MarshalJSON is the custom marshaler for ApplicationGatewayPropertiesFormat. 1103func (agpf ApplicationGatewayPropertiesFormat) MarshalJSON() ([]byte, error) { 1104 objectMap := make(map[string]interface{}) 1105 if agpf.Sku != nil { 1106 objectMap["sku"] = agpf.Sku 1107 } 1108 if agpf.GatewayIPConfigurations != nil { 1109 objectMap["gatewayIPConfigurations"] = agpf.GatewayIPConfigurations 1110 } 1111 if agpf.SslCertificates != nil { 1112 objectMap["sslCertificates"] = agpf.SslCertificates 1113 } 1114 if agpf.FrontendIPConfigurations != nil { 1115 objectMap["frontendIPConfigurations"] = agpf.FrontendIPConfigurations 1116 } 1117 if agpf.FrontendPorts != nil { 1118 objectMap["frontendPorts"] = agpf.FrontendPorts 1119 } 1120 if agpf.Probes != nil { 1121 objectMap["probes"] = agpf.Probes 1122 } 1123 if agpf.BackendAddressPools != nil { 1124 objectMap["backendAddressPools"] = agpf.BackendAddressPools 1125 } 1126 if agpf.BackendHTTPSettingsCollection != nil { 1127 objectMap["backendHttpSettingsCollection"] = agpf.BackendHTTPSettingsCollection 1128 } 1129 if agpf.HTTPListeners != nil { 1130 objectMap["httpListeners"] = agpf.HTTPListeners 1131 } 1132 if agpf.URLPathMaps != nil { 1133 objectMap["urlPathMaps"] = agpf.URLPathMaps 1134 } 1135 if agpf.RequestRoutingRules != nil { 1136 objectMap["requestRoutingRules"] = agpf.RequestRoutingRules 1137 } 1138 if agpf.ResourceGUID != nil { 1139 objectMap["resourceGuid"] = agpf.ResourceGUID 1140 } 1141 if agpf.ProvisioningState != nil { 1142 objectMap["provisioningState"] = agpf.ProvisioningState 1143 } 1144 return json.Marshal(objectMap) 1145} 1146 1147// ApplicationGatewayRequestRoutingRule request routing rule of application gateway 1148type ApplicationGatewayRequestRoutingRule struct { 1149 *ApplicationGatewayRequestRoutingRulePropertiesFormat `json:"properties,omitempty"` 1150 // Name - Gets name of the resource that is unique within a resource group. This name can be used to access the resource 1151 Name *string `json:"name,omitempty"` 1152 // Etag - A unique read-only string that changes whenever the resource is updated 1153 Etag *string `json:"etag,omitempty"` 1154 // ID - Resource Id 1155 ID *string `json:"id,omitempty"` 1156} 1157 1158// MarshalJSON is the custom marshaler for ApplicationGatewayRequestRoutingRule. 1159func (agrrr ApplicationGatewayRequestRoutingRule) MarshalJSON() ([]byte, error) { 1160 objectMap := make(map[string]interface{}) 1161 if agrrr.ApplicationGatewayRequestRoutingRulePropertiesFormat != nil { 1162 objectMap["properties"] = agrrr.ApplicationGatewayRequestRoutingRulePropertiesFormat 1163 } 1164 if agrrr.Name != nil { 1165 objectMap["name"] = agrrr.Name 1166 } 1167 if agrrr.Etag != nil { 1168 objectMap["etag"] = agrrr.Etag 1169 } 1170 if agrrr.ID != nil { 1171 objectMap["id"] = agrrr.ID 1172 } 1173 return json.Marshal(objectMap) 1174} 1175 1176// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayRequestRoutingRule struct. 1177func (agrrr *ApplicationGatewayRequestRoutingRule) UnmarshalJSON(body []byte) error { 1178 var m map[string]*json.RawMessage 1179 err := json.Unmarshal(body, &m) 1180 if err != nil { 1181 return err 1182 } 1183 for k, v := range m { 1184 switch k { 1185 case "properties": 1186 if v != nil { 1187 var applicationGatewayRequestRoutingRulePropertiesFormat ApplicationGatewayRequestRoutingRulePropertiesFormat 1188 err = json.Unmarshal(*v, &applicationGatewayRequestRoutingRulePropertiesFormat) 1189 if err != nil { 1190 return err 1191 } 1192 agrrr.ApplicationGatewayRequestRoutingRulePropertiesFormat = &applicationGatewayRequestRoutingRulePropertiesFormat 1193 } 1194 case "name": 1195 if v != nil { 1196 var name string 1197 err = json.Unmarshal(*v, &name) 1198 if err != nil { 1199 return err 1200 } 1201 agrrr.Name = &name 1202 } 1203 case "etag": 1204 if v != nil { 1205 var etag string 1206 err = json.Unmarshal(*v, &etag) 1207 if err != nil { 1208 return err 1209 } 1210 agrrr.Etag = &etag 1211 } 1212 case "id": 1213 if v != nil { 1214 var ID string 1215 err = json.Unmarshal(*v, &ID) 1216 if err != nil { 1217 return err 1218 } 1219 agrrr.ID = &ID 1220 } 1221 } 1222 } 1223 1224 return nil 1225} 1226 1227// ApplicationGatewayRequestRoutingRulePropertiesFormat properties of Request routing rule of application 1228// gateway 1229type ApplicationGatewayRequestRoutingRulePropertiesFormat struct { 1230 // RuleType - Gets or sets the rule type. Possible values include: 'Basic', 'PathBasedRouting' 1231 RuleType ApplicationGatewayRequestRoutingRuleType `json:"ruleType,omitempty"` 1232 // BackendAddressPool - Gets or sets backend address pool resource of application gateway 1233 BackendAddressPool *SubResource `json:"backendAddressPool,omitempty"` 1234 // BackendHTTPSettings - Gets or sets frontend port resource of application gateway 1235 BackendHTTPSettings *SubResource `json:"backendHttpSettings,omitempty"` 1236 // HTTPListener - Gets or sets http listener resource of application gateway 1237 HTTPListener *SubResource `json:"httpListener,omitempty"` 1238 // URLPathMap - Gets or sets url path map resource of application gateway 1239 URLPathMap *SubResource `json:"urlPathMap,omitempty"` 1240 // ProvisioningState - Gets or sets Provisioning state of the request routing rule resource Updating/Deleting/Failed 1241 ProvisioningState *string `json:"provisioningState,omitempty"` 1242} 1243 1244// ApplicationGatewaysCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a 1245// long-running operation. 1246type ApplicationGatewaysCreateOrUpdateFuture struct { 1247 azure.FutureAPI 1248 // Result returns the result of the asynchronous operation. 1249 // If the operation has not completed it will return an error. 1250 Result func(ApplicationGatewaysClient) (ApplicationGateway, error) 1251} 1252 1253// ApplicationGatewaysDeleteFuture an abstraction for monitoring and retrieving the results of a 1254// long-running operation. 1255type ApplicationGatewaysDeleteFuture struct { 1256 azure.FutureAPI 1257 // Result returns the result of the asynchronous operation. 1258 // If the operation has not completed it will return an error. 1259 Result func(ApplicationGatewaysClient) (autorest.Response, error) 1260} 1261 1262// ApplicationGatewaySku SKU of application gateway 1263type ApplicationGatewaySku struct { 1264 // Name - Gets or sets name of application gateway SKU. Possible values include: 'StandardSmall', 'StandardMedium', 'StandardLarge' 1265 Name ApplicationGatewaySkuName `json:"name,omitempty"` 1266 // Tier - Gets or sets tier of application gateway. Possible values include: 'Standard' 1267 Tier ApplicationGatewayTier `json:"tier,omitempty"` 1268 // Capacity - Gets or sets capacity (instance count) of application gateway 1269 Capacity *int32 `json:"capacity,omitempty"` 1270} 1271 1272// ApplicationGatewaySslCertificate SSL certificates of application gateway 1273type ApplicationGatewaySslCertificate struct { 1274 *ApplicationGatewaySslCertificatePropertiesFormat `json:"properties,omitempty"` 1275 // Name - Gets name of the resource that is unique within a resource group. This name can be used to access the resource 1276 Name *string `json:"name,omitempty"` 1277 // Etag - A unique read-only string that changes whenever the resource is updated 1278 Etag *string `json:"etag,omitempty"` 1279 // ID - Resource Id 1280 ID *string `json:"id,omitempty"` 1281} 1282 1283// MarshalJSON is the custom marshaler for ApplicationGatewaySslCertificate. 1284func (agsc ApplicationGatewaySslCertificate) MarshalJSON() ([]byte, error) { 1285 objectMap := make(map[string]interface{}) 1286 if agsc.ApplicationGatewaySslCertificatePropertiesFormat != nil { 1287 objectMap["properties"] = agsc.ApplicationGatewaySslCertificatePropertiesFormat 1288 } 1289 if agsc.Name != nil { 1290 objectMap["name"] = agsc.Name 1291 } 1292 if agsc.Etag != nil { 1293 objectMap["etag"] = agsc.Etag 1294 } 1295 if agsc.ID != nil { 1296 objectMap["id"] = agsc.ID 1297 } 1298 return json.Marshal(objectMap) 1299} 1300 1301// UnmarshalJSON is the custom unmarshaler for ApplicationGatewaySslCertificate struct. 1302func (agsc *ApplicationGatewaySslCertificate) UnmarshalJSON(body []byte) error { 1303 var m map[string]*json.RawMessage 1304 err := json.Unmarshal(body, &m) 1305 if err != nil { 1306 return err 1307 } 1308 for k, v := range m { 1309 switch k { 1310 case "properties": 1311 if v != nil { 1312 var applicationGatewaySslCertificatePropertiesFormat ApplicationGatewaySslCertificatePropertiesFormat 1313 err = json.Unmarshal(*v, &applicationGatewaySslCertificatePropertiesFormat) 1314 if err != nil { 1315 return err 1316 } 1317 agsc.ApplicationGatewaySslCertificatePropertiesFormat = &applicationGatewaySslCertificatePropertiesFormat 1318 } 1319 case "name": 1320 if v != nil { 1321 var name string 1322 err = json.Unmarshal(*v, &name) 1323 if err != nil { 1324 return err 1325 } 1326 agsc.Name = &name 1327 } 1328 case "etag": 1329 if v != nil { 1330 var etag string 1331 err = json.Unmarshal(*v, &etag) 1332 if err != nil { 1333 return err 1334 } 1335 agsc.Etag = &etag 1336 } 1337 case "id": 1338 if v != nil { 1339 var ID string 1340 err = json.Unmarshal(*v, &ID) 1341 if err != nil { 1342 return err 1343 } 1344 agsc.ID = &ID 1345 } 1346 } 1347 } 1348 1349 return nil 1350} 1351 1352// ApplicationGatewaySslCertificatePropertiesFormat properties of SSL certificates of application gateway 1353type ApplicationGatewaySslCertificatePropertiesFormat struct { 1354 // Data - Gets or sets the certificate data 1355 Data *string `json:"data,omitempty"` 1356 // Password - Gets or sets the certificate password 1357 Password *string `json:"password,omitempty"` 1358 // PublicCertData - Gets or sets the certificate public data 1359 PublicCertData *string `json:"publicCertData,omitempty"` 1360 // ProvisioningState - Gets or sets Provisioning state of the ssl certificate resource Updating/Deleting/Failed 1361 ProvisioningState *string `json:"provisioningState,omitempty"` 1362} 1363 1364// ApplicationGatewaysStartFuture an abstraction for monitoring and retrieving the results of a 1365// long-running operation. 1366type ApplicationGatewaysStartFuture struct { 1367 azure.FutureAPI 1368 // Result returns the result of the asynchronous operation. 1369 // If the operation has not completed it will return an error. 1370 Result func(ApplicationGatewaysClient) (autorest.Response, error) 1371} 1372 1373// ApplicationGatewaysStopFuture an abstraction for monitoring and retrieving the results of a long-running 1374// operation. 1375type ApplicationGatewaysStopFuture struct { 1376 azure.FutureAPI 1377 // Result returns the result of the asynchronous operation. 1378 // If the operation has not completed it will return an error. 1379 Result func(ApplicationGatewaysClient) (autorest.Response, error) 1380} 1381 1382// ApplicationGatewayURLPathMap urlPathMap of application gateway 1383type ApplicationGatewayURLPathMap struct { 1384 *ApplicationGatewayURLPathMapPropertiesFormat `json:"properties,omitempty"` 1385 // Name - Gets name of the resource that is unique within a resource group. This name can be used to access the resource 1386 Name *string `json:"name,omitempty"` 1387 // Etag - A unique read-only string that changes whenever the resource is updated 1388 Etag *string `json:"etag,omitempty"` 1389 // ID - Resource Id 1390 ID *string `json:"id,omitempty"` 1391} 1392 1393// MarshalJSON is the custom marshaler for ApplicationGatewayURLPathMap. 1394func (agupm ApplicationGatewayURLPathMap) MarshalJSON() ([]byte, error) { 1395 objectMap := make(map[string]interface{}) 1396 if agupm.ApplicationGatewayURLPathMapPropertiesFormat != nil { 1397 objectMap["properties"] = agupm.ApplicationGatewayURLPathMapPropertiesFormat 1398 } 1399 if agupm.Name != nil { 1400 objectMap["name"] = agupm.Name 1401 } 1402 if agupm.Etag != nil { 1403 objectMap["etag"] = agupm.Etag 1404 } 1405 if agupm.ID != nil { 1406 objectMap["id"] = agupm.ID 1407 } 1408 return json.Marshal(objectMap) 1409} 1410 1411// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayURLPathMap struct. 1412func (agupm *ApplicationGatewayURLPathMap) UnmarshalJSON(body []byte) error { 1413 var m map[string]*json.RawMessage 1414 err := json.Unmarshal(body, &m) 1415 if err != nil { 1416 return err 1417 } 1418 for k, v := range m { 1419 switch k { 1420 case "properties": 1421 if v != nil { 1422 var applicationGatewayURLPathMapPropertiesFormat ApplicationGatewayURLPathMapPropertiesFormat 1423 err = json.Unmarshal(*v, &applicationGatewayURLPathMapPropertiesFormat) 1424 if err != nil { 1425 return err 1426 } 1427 agupm.ApplicationGatewayURLPathMapPropertiesFormat = &applicationGatewayURLPathMapPropertiesFormat 1428 } 1429 case "name": 1430 if v != nil { 1431 var name string 1432 err = json.Unmarshal(*v, &name) 1433 if err != nil { 1434 return err 1435 } 1436 agupm.Name = &name 1437 } 1438 case "etag": 1439 if v != nil { 1440 var etag string 1441 err = json.Unmarshal(*v, &etag) 1442 if err != nil { 1443 return err 1444 } 1445 agupm.Etag = &etag 1446 } 1447 case "id": 1448 if v != nil { 1449 var ID string 1450 err = json.Unmarshal(*v, &ID) 1451 if err != nil { 1452 return err 1453 } 1454 agupm.ID = &ID 1455 } 1456 } 1457 } 1458 1459 return nil 1460} 1461 1462// ApplicationGatewayURLPathMapPropertiesFormat properties of probe of application gateway 1463type ApplicationGatewayURLPathMapPropertiesFormat struct { 1464 // DefaultBackendAddressPool - Gets or sets default backend address pool resource of URL path map 1465 DefaultBackendAddressPool *SubResource `json:"defaultBackendAddressPool,omitempty"` 1466 // DefaultBackendHTTPSettings - Gets or sets default backend http settings resource of URL path map 1467 DefaultBackendHTTPSettings *SubResource `json:"defaultBackendHttpSettings,omitempty"` 1468 // PathRules - Gets or sets path rule of URL path map resource 1469 PathRules *[]ApplicationGatewayPathRule `json:"pathRules,omitempty"` 1470 // ProvisioningState - Gets or sets Provisioning state of the backend http settings resource Updating/Deleting/Failed 1471 ProvisioningState *string `json:"provisioningState,omitempty"` 1472} 1473 1474// AuthorizationListResult response for ListAuthorizations Api service callRetrieves all authorizations 1475// that belongs to an ExpressRouteCircuit 1476type AuthorizationListResult struct { 1477 autorest.Response `json:"-"` 1478 // Value - Gets the authorizations in an ExpressRoute Circuit 1479 Value *[]ExpressRouteCircuitAuthorization `json:"value,omitempty"` 1480 // NextLink - Gets the URL to get the next set of results. 1481 NextLink *string `json:"nextLink,omitempty"` 1482} 1483 1484// AuthorizationListResultIterator provides access to a complete listing of 1485// ExpressRouteCircuitAuthorization values. 1486type AuthorizationListResultIterator struct { 1487 i int 1488 page AuthorizationListResultPage 1489} 1490 1491// NextWithContext advances to the next value. If there was an error making 1492// the request the iterator does not advance and the error is returned. 1493func (iter *AuthorizationListResultIterator) NextWithContext(ctx context.Context) (err error) { 1494 if tracing.IsEnabled() { 1495 ctx = tracing.StartSpan(ctx, fqdn+"/AuthorizationListResultIterator.NextWithContext") 1496 defer func() { 1497 sc := -1 1498 if iter.Response().Response.Response != nil { 1499 sc = iter.Response().Response.Response.StatusCode 1500 } 1501 tracing.EndSpan(ctx, sc, err) 1502 }() 1503 } 1504 iter.i++ 1505 if iter.i < len(iter.page.Values()) { 1506 return nil 1507 } 1508 err = iter.page.NextWithContext(ctx) 1509 if err != nil { 1510 iter.i-- 1511 return err 1512 } 1513 iter.i = 0 1514 return nil 1515} 1516 1517// Next advances to the next value. If there was an error making 1518// the request the iterator does not advance and the error is returned. 1519// Deprecated: Use NextWithContext() instead. 1520func (iter *AuthorizationListResultIterator) Next() error { 1521 return iter.NextWithContext(context.Background()) 1522} 1523 1524// NotDone returns true if the enumeration should be started or is not yet complete. 1525func (iter AuthorizationListResultIterator) NotDone() bool { 1526 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 1527} 1528 1529// Response returns the raw server response from the last page request. 1530func (iter AuthorizationListResultIterator) Response() AuthorizationListResult { 1531 return iter.page.Response() 1532} 1533 1534// Value returns the current value or a zero-initialized value if the 1535// iterator has advanced beyond the end of the collection. 1536func (iter AuthorizationListResultIterator) Value() ExpressRouteCircuitAuthorization { 1537 if !iter.page.NotDone() { 1538 return ExpressRouteCircuitAuthorization{} 1539 } 1540 return iter.page.Values()[iter.i] 1541} 1542 1543// Creates a new instance of the AuthorizationListResultIterator type. 1544func NewAuthorizationListResultIterator(page AuthorizationListResultPage) AuthorizationListResultIterator { 1545 return AuthorizationListResultIterator{page: page} 1546} 1547 1548// IsEmpty returns true if the ListResult contains no values. 1549func (alr AuthorizationListResult) IsEmpty() bool { 1550 return alr.Value == nil || len(*alr.Value) == 0 1551} 1552 1553// hasNextLink returns true if the NextLink is not empty. 1554func (alr AuthorizationListResult) hasNextLink() bool { 1555 return alr.NextLink != nil && len(*alr.NextLink) != 0 1556} 1557 1558// authorizationListResultPreparer prepares a request to retrieve the next set of results. 1559// It returns nil if no more results exist. 1560func (alr AuthorizationListResult) authorizationListResultPreparer(ctx context.Context) (*http.Request, error) { 1561 if !alr.hasNextLink() { 1562 return nil, nil 1563 } 1564 return autorest.Prepare((&http.Request{}).WithContext(ctx), 1565 autorest.AsJSON(), 1566 autorest.AsGet(), 1567 autorest.WithBaseURL(to.String(alr.NextLink))) 1568} 1569 1570// AuthorizationListResultPage contains a page of ExpressRouteCircuitAuthorization values. 1571type AuthorizationListResultPage struct { 1572 fn func(context.Context, AuthorizationListResult) (AuthorizationListResult, error) 1573 alr AuthorizationListResult 1574} 1575 1576// NextWithContext advances to the next page of values. If there was an error making 1577// the request the page does not advance and the error is returned. 1578func (page *AuthorizationListResultPage) NextWithContext(ctx context.Context) (err error) { 1579 if tracing.IsEnabled() { 1580 ctx = tracing.StartSpan(ctx, fqdn+"/AuthorizationListResultPage.NextWithContext") 1581 defer func() { 1582 sc := -1 1583 if page.Response().Response.Response != nil { 1584 sc = page.Response().Response.Response.StatusCode 1585 } 1586 tracing.EndSpan(ctx, sc, err) 1587 }() 1588 } 1589 for { 1590 next, err := page.fn(ctx, page.alr) 1591 if err != nil { 1592 return err 1593 } 1594 page.alr = next 1595 if !next.hasNextLink() || !next.IsEmpty() { 1596 break 1597 } 1598 } 1599 return nil 1600} 1601 1602// Next advances to the next page of values. If there was an error making 1603// the request the page does not advance and the error is returned. 1604// Deprecated: Use NextWithContext() instead. 1605func (page *AuthorizationListResultPage) Next() error { 1606 return page.NextWithContext(context.Background()) 1607} 1608 1609// NotDone returns true if the page enumeration should be started or is not yet complete. 1610func (page AuthorizationListResultPage) NotDone() bool { 1611 return !page.alr.IsEmpty() 1612} 1613 1614// Response returns the raw server response from the last page request. 1615func (page AuthorizationListResultPage) Response() AuthorizationListResult { 1616 return page.alr 1617} 1618 1619// Values returns the slice of values for the current page or nil if there are no values. 1620func (page AuthorizationListResultPage) Values() []ExpressRouteCircuitAuthorization { 1621 if page.alr.IsEmpty() { 1622 return nil 1623 } 1624 return *page.alr.Value 1625} 1626 1627// Creates a new instance of the AuthorizationListResultPage type. 1628func NewAuthorizationListResultPage(cur AuthorizationListResult, getNextPage func(context.Context, AuthorizationListResult) (AuthorizationListResult, error)) AuthorizationListResultPage { 1629 return AuthorizationListResultPage{ 1630 fn: getNextPage, 1631 alr: cur, 1632 } 1633} 1634 1635// AuthorizationPropertiesFormat ... 1636type AuthorizationPropertiesFormat struct { 1637 // AuthorizationKey - Gets or sets the authorization key 1638 AuthorizationKey *string `json:"authorizationKey,omitempty"` 1639 // AuthorizationUseStatus - Gets or sets AuthorizationUseStatus. Possible values include: 'Available', 'InUse' 1640 AuthorizationUseStatus AuthorizationUseStatus `json:"authorizationUseStatus,omitempty"` 1641 // ProvisioningState - Gets or sets Provisioning state of the PublicIP resource Updating/Deleting/Failed 1642 ProvisioningState *string `json:"provisioningState,omitempty"` 1643} 1644 1645// AzureAsyncOperationResult the response body contains the status of the specified asynchronous operation, 1646// indicating whether it has succeeded, is in progress, or has failed. Note that this status is distinct 1647// from the HTTP status code returned for the Get Operation Status operation itself. If the asynchronous 1648// operation succeeded, the response body includes the HTTP status code for the successful request. If the 1649// asynchronous operation failed, the response body includes the HTTP status code for the failed request 1650// and error information regarding the failure. 1651type AzureAsyncOperationResult struct { 1652 // Status - Status of the AzureAsyncOperation. Possible values include: 'InProgress', 'Succeeded', 'Failed' 1653 Status OperationStatus `json:"status,omitempty"` 1654 Error *Error `json:"error,omitempty"` 1655} 1656 1657// BackendAddressPool pool of backend IP addresses 1658type BackendAddressPool struct { 1659 *BackendAddressPoolPropertiesFormat `json:"properties,omitempty"` 1660 // Name - Gets name of the resource that is unique within a resource group. This name can be used to access the resource 1661 Name *string `json:"name,omitempty"` 1662 // Etag - A unique read-only string that changes whenever the resource is updated 1663 Etag *string `json:"etag,omitempty"` 1664 // ID - Resource Id 1665 ID *string `json:"id,omitempty"` 1666} 1667 1668// MarshalJSON is the custom marshaler for BackendAddressPool. 1669func (bap BackendAddressPool) MarshalJSON() ([]byte, error) { 1670 objectMap := make(map[string]interface{}) 1671 if bap.BackendAddressPoolPropertiesFormat != nil { 1672 objectMap["properties"] = bap.BackendAddressPoolPropertiesFormat 1673 } 1674 if bap.Name != nil { 1675 objectMap["name"] = bap.Name 1676 } 1677 if bap.Etag != nil { 1678 objectMap["etag"] = bap.Etag 1679 } 1680 if bap.ID != nil { 1681 objectMap["id"] = bap.ID 1682 } 1683 return json.Marshal(objectMap) 1684} 1685 1686// UnmarshalJSON is the custom unmarshaler for BackendAddressPool struct. 1687func (bap *BackendAddressPool) UnmarshalJSON(body []byte) error { 1688 var m map[string]*json.RawMessage 1689 err := json.Unmarshal(body, &m) 1690 if err != nil { 1691 return err 1692 } 1693 for k, v := range m { 1694 switch k { 1695 case "properties": 1696 if v != nil { 1697 var backendAddressPoolPropertiesFormat BackendAddressPoolPropertiesFormat 1698 err = json.Unmarshal(*v, &backendAddressPoolPropertiesFormat) 1699 if err != nil { 1700 return err 1701 } 1702 bap.BackendAddressPoolPropertiesFormat = &backendAddressPoolPropertiesFormat 1703 } 1704 case "name": 1705 if v != nil { 1706 var name string 1707 err = json.Unmarshal(*v, &name) 1708 if err != nil { 1709 return err 1710 } 1711 bap.Name = &name 1712 } 1713 case "etag": 1714 if v != nil { 1715 var etag string 1716 err = json.Unmarshal(*v, &etag) 1717 if err != nil { 1718 return err 1719 } 1720 bap.Etag = &etag 1721 } 1722 case "id": 1723 if v != nil { 1724 var ID string 1725 err = json.Unmarshal(*v, &ID) 1726 if err != nil { 1727 return err 1728 } 1729 bap.ID = &ID 1730 } 1731 } 1732 } 1733 1734 return nil 1735} 1736 1737// BackendAddressPoolPropertiesFormat properties of BackendAddressPool 1738type BackendAddressPoolPropertiesFormat struct { 1739 // BackendIPConfigurations - Gets collection of references to IPs defined in NICs 1740 BackendIPConfigurations *[]InterfaceIPConfiguration `json:"backendIPConfigurations,omitempty"` 1741 // LoadBalancingRules - Gets Load Balancing rules that use this Backend Address Pool 1742 LoadBalancingRules *[]SubResource `json:"loadBalancingRules,omitempty"` 1743 // OutboundNatRule - Gets outbound rules that use this Backend Address Pool 1744 OutboundNatRule *SubResource `json:"outboundNatRule,omitempty"` 1745 // ProvisioningState - Provisioning state of the PublicIP resource Updating/Deleting/Failed 1746 ProvisioningState *string `json:"provisioningState,omitempty"` 1747} 1748 1749// BgpSettings ... 1750type BgpSettings struct { 1751 // Asn - Gets or sets this BGP speaker's ASN 1752 Asn *int64 `json:"asn,omitempty"` 1753 // BgpPeeringAddress - Gets or sets the BGP peering address and BGP identifier of this BGP speaker 1754 BgpPeeringAddress *string `json:"bgpPeeringAddress,omitempty"` 1755 // PeerWeight - Gets or sets the weight added to routes learned from this BGP speaker 1756 PeerWeight *int32 `json:"peerWeight,omitempty"` 1757} 1758 1759// ConnectionResetSharedKey ... 1760type ConnectionResetSharedKey struct { 1761 autorest.Response `json:"-"` 1762 // KeyLength - The virtual network connection reset shared key length 1763 KeyLength *int64 `json:"keyLength,omitempty"` 1764} 1765 1766// ConnectionSharedKey response for GetConnectionSharedKey Api service call 1767type ConnectionSharedKey struct { 1768 autorest.Response `json:"-"` 1769 // Value - The virtual network connection shared key value 1770 Value *string `json:"value,omitempty"` 1771} 1772 1773// ConnectionSharedKeyResult response for CheckConnectionSharedKey Api service call 1774type ConnectionSharedKeyResult struct { 1775 autorest.Response `json:"-"` 1776 // Value - The virtual network connection shared key value 1777 Value *string `json:"value,omitempty"` 1778} 1779 1780// DhcpOptions dHCPOptions contains an array of DNS servers available to VMs deployed in the virtual 1781// networkStandard DHCP option for a subnet overrides VNET DHCP options. 1782type DhcpOptions struct { 1783 // DNSServers - Gets or sets list of DNS servers IP addresses 1784 DNSServers *[]string `json:"dnsServers,omitempty"` 1785} 1786 1787// DNSNameAvailabilityResult response for CheckDnsNameAvailability Api service call 1788type DNSNameAvailabilityResult struct { 1789 autorest.Response `json:"-"` 1790 // Available - Domain availability (True/False) 1791 Available *bool `json:"available,omitempty"` 1792} 1793 1794// Error ... 1795type Error struct { 1796 Code *string `json:"code,omitempty"` 1797 Message *string `json:"message,omitempty"` 1798 Target *string `json:"target,omitempty"` 1799 Details *[]ErrorDetails `json:"details,omitempty"` 1800 InnerError *string `json:"innerError,omitempty"` 1801} 1802 1803// ErrorDetails ... 1804type ErrorDetails struct { 1805 Code *string `json:"code,omitempty"` 1806 Target *string `json:"target,omitempty"` 1807 Message *string `json:"message,omitempty"` 1808} 1809 1810// ExpressRouteCircuit expressRouteCircuit resource 1811type ExpressRouteCircuit struct { 1812 autorest.Response `json:"-"` 1813 // Sku - Gets or sets sku 1814 Sku *ExpressRouteCircuitSku `json:"sku,omitempty"` 1815 *ExpressRouteCircuitPropertiesFormat `json:"properties,omitempty"` 1816 // Etag - Gets a unique read-only string that changes whenever the resource is updated 1817 Etag *string `json:"etag,omitempty"` 1818 // ID - Resource Id 1819 ID *string `json:"id,omitempty"` 1820 // Name - READ-ONLY; Resource name 1821 Name *string `json:"name,omitempty"` 1822 // Type - READ-ONLY; Resource type 1823 Type *string `json:"type,omitempty"` 1824 // Location - Resource location 1825 Location *string `json:"location,omitempty"` 1826 // Tags - Resource tags 1827 Tags map[string]*string `json:"tags"` 1828} 1829 1830// MarshalJSON is the custom marshaler for ExpressRouteCircuit. 1831func (erc ExpressRouteCircuit) MarshalJSON() ([]byte, error) { 1832 objectMap := make(map[string]interface{}) 1833 if erc.Sku != nil { 1834 objectMap["sku"] = erc.Sku 1835 } 1836 if erc.ExpressRouteCircuitPropertiesFormat != nil { 1837 objectMap["properties"] = erc.ExpressRouteCircuitPropertiesFormat 1838 } 1839 if erc.Etag != nil { 1840 objectMap["etag"] = erc.Etag 1841 } 1842 if erc.ID != nil { 1843 objectMap["id"] = erc.ID 1844 } 1845 if erc.Location != nil { 1846 objectMap["location"] = erc.Location 1847 } 1848 if erc.Tags != nil { 1849 objectMap["tags"] = erc.Tags 1850 } 1851 return json.Marshal(objectMap) 1852} 1853 1854// UnmarshalJSON is the custom unmarshaler for ExpressRouteCircuit struct. 1855func (erc *ExpressRouteCircuit) UnmarshalJSON(body []byte) error { 1856 var m map[string]*json.RawMessage 1857 err := json.Unmarshal(body, &m) 1858 if err != nil { 1859 return err 1860 } 1861 for k, v := range m { 1862 switch k { 1863 case "sku": 1864 if v != nil { 1865 var sku ExpressRouteCircuitSku 1866 err = json.Unmarshal(*v, &sku) 1867 if err != nil { 1868 return err 1869 } 1870 erc.Sku = &sku 1871 } 1872 case "properties": 1873 if v != nil { 1874 var expressRouteCircuitPropertiesFormat ExpressRouteCircuitPropertiesFormat 1875 err = json.Unmarshal(*v, &expressRouteCircuitPropertiesFormat) 1876 if err != nil { 1877 return err 1878 } 1879 erc.ExpressRouteCircuitPropertiesFormat = &expressRouteCircuitPropertiesFormat 1880 } 1881 case "etag": 1882 if v != nil { 1883 var etag string 1884 err = json.Unmarshal(*v, &etag) 1885 if err != nil { 1886 return err 1887 } 1888 erc.Etag = &etag 1889 } 1890 case "id": 1891 if v != nil { 1892 var ID string 1893 err = json.Unmarshal(*v, &ID) 1894 if err != nil { 1895 return err 1896 } 1897 erc.ID = &ID 1898 } 1899 case "name": 1900 if v != nil { 1901 var name string 1902 err = json.Unmarshal(*v, &name) 1903 if err != nil { 1904 return err 1905 } 1906 erc.Name = &name 1907 } 1908 case "type": 1909 if v != nil { 1910 var typeVar string 1911 err = json.Unmarshal(*v, &typeVar) 1912 if err != nil { 1913 return err 1914 } 1915 erc.Type = &typeVar 1916 } 1917 case "location": 1918 if v != nil { 1919 var location string 1920 err = json.Unmarshal(*v, &location) 1921 if err != nil { 1922 return err 1923 } 1924 erc.Location = &location 1925 } 1926 case "tags": 1927 if v != nil { 1928 var tags map[string]*string 1929 err = json.Unmarshal(*v, &tags) 1930 if err != nil { 1931 return err 1932 } 1933 erc.Tags = tags 1934 } 1935 } 1936 } 1937 1938 return nil 1939} 1940 1941// ExpressRouteCircuitArpTable the arp table associated with the ExpressRouteCircuit 1942type ExpressRouteCircuitArpTable struct { 1943 // Age - Age. 1944 Age *int32 `json:"age,omitempty"` 1945 // Interface - Interface. 1946 Interface *string `json:"interface,omitempty"` 1947 // IPAddress - Gets ipAddress. 1948 IPAddress *string `json:"ipAddress,omitempty"` 1949 // MacAddress - Gets macAddress. 1950 MacAddress *string `json:"macAddress,omitempty"` 1951} 1952 1953// ExpressRouteCircuitAuthorization authorization in a ExpressRouteCircuit resource 1954type ExpressRouteCircuitAuthorization struct { 1955 autorest.Response `json:"-"` 1956 *AuthorizationPropertiesFormat `json:"properties,omitempty"` 1957 // Name - Gets name of the resource that is unique within a resource group. This name can be used to access the resource 1958 Name *string `json:"name,omitempty"` 1959 // Etag - A unique read-only string that changes whenever the resource is updated 1960 Etag *string `json:"etag,omitempty"` 1961 // ID - Resource Id 1962 ID *string `json:"id,omitempty"` 1963} 1964 1965// MarshalJSON is the custom marshaler for ExpressRouteCircuitAuthorization. 1966func (erca ExpressRouteCircuitAuthorization) MarshalJSON() ([]byte, error) { 1967 objectMap := make(map[string]interface{}) 1968 if erca.AuthorizationPropertiesFormat != nil { 1969 objectMap["properties"] = erca.AuthorizationPropertiesFormat 1970 } 1971 if erca.Name != nil { 1972 objectMap["name"] = erca.Name 1973 } 1974 if erca.Etag != nil { 1975 objectMap["etag"] = erca.Etag 1976 } 1977 if erca.ID != nil { 1978 objectMap["id"] = erca.ID 1979 } 1980 return json.Marshal(objectMap) 1981} 1982 1983// UnmarshalJSON is the custom unmarshaler for ExpressRouteCircuitAuthorization struct. 1984func (erca *ExpressRouteCircuitAuthorization) UnmarshalJSON(body []byte) error { 1985 var m map[string]*json.RawMessage 1986 err := json.Unmarshal(body, &m) 1987 if err != nil { 1988 return err 1989 } 1990 for k, v := range m { 1991 switch k { 1992 case "properties": 1993 if v != nil { 1994 var authorizationPropertiesFormat AuthorizationPropertiesFormat 1995 err = json.Unmarshal(*v, &authorizationPropertiesFormat) 1996 if err != nil { 1997 return err 1998 } 1999 erca.AuthorizationPropertiesFormat = &authorizationPropertiesFormat 2000 } 2001 case "name": 2002 if v != nil { 2003 var name string 2004 err = json.Unmarshal(*v, &name) 2005 if err != nil { 2006 return err 2007 } 2008 erca.Name = &name 2009 } 2010 case "etag": 2011 if v != nil { 2012 var etag string 2013 err = json.Unmarshal(*v, &etag) 2014 if err != nil { 2015 return err 2016 } 2017 erca.Etag = &etag 2018 } 2019 case "id": 2020 if v != nil { 2021 var ID string 2022 err = json.Unmarshal(*v, &ID) 2023 if err != nil { 2024 return err 2025 } 2026 erca.ID = &ID 2027 } 2028 } 2029 } 2030 2031 return nil 2032} 2033 2034// ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture an abstraction for monitoring and retrieving the 2035// results of a long-running operation. 2036type ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture struct { 2037 azure.FutureAPI 2038 // Result returns the result of the asynchronous operation. 2039 // If the operation has not completed it will return an error. 2040 Result func(ExpressRouteCircuitAuthorizationsClient) (ExpressRouteCircuitAuthorization, error) 2041} 2042 2043// ExpressRouteCircuitAuthorizationsDeleteFuture an abstraction for monitoring and retrieving the results 2044// of a long-running operation. 2045type ExpressRouteCircuitAuthorizationsDeleteFuture struct { 2046 azure.FutureAPI 2047 // Result returns the result of the asynchronous operation. 2048 // If the operation has not completed it will return an error. 2049 Result func(ExpressRouteCircuitAuthorizationsClient) (autorest.Response, error) 2050} 2051 2052// ExpressRouteCircuitListResult response for ListExpressRouteCircuit Api service call 2053type ExpressRouteCircuitListResult struct { 2054 autorest.Response `json:"-"` 2055 // Value - Gets a list of ExpressRouteCircuits in a resource group 2056 Value *[]ExpressRouteCircuit `json:"value,omitempty"` 2057 // NextLink - Gets the URL to get the next set of results. 2058 NextLink *string `json:"nextLink,omitempty"` 2059} 2060 2061// ExpressRouteCircuitListResultIterator provides access to a complete listing of ExpressRouteCircuit 2062// values. 2063type ExpressRouteCircuitListResultIterator struct { 2064 i int 2065 page ExpressRouteCircuitListResultPage 2066} 2067 2068// NextWithContext advances to the next value. If there was an error making 2069// the request the iterator does not advance and the error is returned. 2070func (iter *ExpressRouteCircuitListResultIterator) NextWithContext(ctx context.Context) (err error) { 2071 if tracing.IsEnabled() { 2072 ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitListResultIterator.NextWithContext") 2073 defer func() { 2074 sc := -1 2075 if iter.Response().Response.Response != nil { 2076 sc = iter.Response().Response.Response.StatusCode 2077 } 2078 tracing.EndSpan(ctx, sc, err) 2079 }() 2080 } 2081 iter.i++ 2082 if iter.i < len(iter.page.Values()) { 2083 return nil 2084 } 2085 err = iter.page.NextWithContext(ctx) 2086 if err != nil { 2087 iter.i-- 2088 return err 2089 } 2090 iter.i = 0 2091 return nil 2092} 2093 2094// Next advances to the next value. If there was an error making 2095// the request the iterator does not advance and the error is returned. 2096// Deprecated: Use NextWithContext() instead. 2097func (iter *ExpressRouteCircuitListResultIterator) Next() error { 2098 return iter.NextWithContext(context.Background()) 2099} 2100 2101// NotDone returns true if the enumeration should be started or is not yet complete. 2102func (iter ExpressRouteCircuitListResultIterator) NotDone() bool { 2103 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 2104} 2105 2106// Response returns the raw server response from the last page request. 2107func (iter ExpressRouteCircuitListResultIterator) Response() ExpressRouteCircuitListResult { 2108 return iter.page.Response() 2109} 2110 2111// Value returns the current value or a zero-initialized value if the 2112// iterator has advanced beyond the end of the collection. 2113func (iter ExpressRouteCircuitListResultIterator) Value() ExpressRouteCircuit { 2114 if !iter.page.NotDone() { 2115 return ExpressRouteCircuit{} 2116 } 2117 return iter.page.Values()[iter.i] 2118} 2119 2120// Creates a new instance of the ExpressRouteCircuitListResultIterator type. 2121func NewExpressRouteCircuitListResultIterator(page ExpressRouteCircuitListResultPage) ExpressRouteCircuitListResultIterator { 2122 return ExpressRouteCircuitListResultIterator{page: page} 2123} 2124 2125// IsEmpty returns true if the ListResult contains no values. 2126func (erclr ExpressRouteCircuitListResult) IsEmpty() bool { 2127 return erclr.Value == nil || len(*erclr.Value) == 0 2128} 2129 2130// hasNextLink returns true if the NextLink is not empty. 2131func (erclr ExpressRouteCircuitListResult) hasNextLink() bool { 2132 return erclr.NextLink != nil && len(*erclr.NextLink) != 0 2133} 2134 2135// expressRouteCircuitListResultPreparer prepares a request to retrieve the next set of results. 2136// It returns nil if no more results exist. 2137func (erclr ExpressRouteCircuitListResult) expressRouteCircuitListResultPreparer(ctx context.Context) (*http.Request, error) { 2138 if !erclr.hasNextLink() { 2139 return nil, nil 2140 } 2141 return autorest.Prepare((&http.Request{}).WithContext(ctx), 2142 autorest.AsJSON(), 2143 autorest.AsGet(), 2144 autorest.WithBaseURL(to.String(erclr.NextLink))) 2145} 2146 2147// ExpressRouteCircuitListResultPage contains a page of ExpressRouteCircuit values. 2148type ExpressRouteCircuitListResultPage struct { 2149 fn func(context.Context, ExpressRouteCircuitListResult) (ExpressRouteCircuitListResult, error) 2150 erclr ExpressRouteCircuitListResult 2151} 2152 2153// NextWithContext advances to the next page of values. If there was an error making 2154// the request the page does not advance and the error is returned. 2155func (page *ExpressRouteCircuitListResultPage) NextWithContext(ctx context.Context) (err error) { 2156 if tracing.IsEnabled() { 2157 ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitListResultPage.NextWithContext") 2158 defer func() { 2159 sc := -1 2160 if page.Response().Response.Response != nil { 2161 sc = page.Response().Response.Response.StatusCode 2162 } 2163 tracing.EndSpan(ctx, sc, err) 2164 }() 2165 } 2166 for { 2167 next, err := page.fn(ctx, page.erclr) 2168 if err != nil { 2169 return err 2170 } 2171 page.erclr = next 2172 if !next.hasNextLink() || !next.IsEmpty() { 2173 break 2174 } 2175 } 2176 return nil 2177} 2178 2179// Next advances to the next page of values. If there was an error making 2180// the request the page does not advance and the error is returned. 2181// Deprecated: Use NextWithContext() instead. 2182func (page *ExpressRouteCircuitListResultPage) Next() error { 2183 return page.NextWithContext(context.Background()) 2184} 2185 2186// NotDone returns true if the page enumeration should be started or is not yet complete. 2187func (page ExpressRouteCircuitListResultPage) NotDone() bool { 2188 return !page.erclr.IsEmpty() 2189} 2190 2191// Response returns the raw server response from the last page request. 2192func (page ExpressRouteCircuitListResultPage) Response() ExpressRouteCircuitListResult { 2193 return page.erclr 2194} 2195 2196// Values returns the slice of values for the current page or nil if there are no values. 2197func (page ExpressRouteCircuitListResultPage) Values() []ExpressRouteCircuit { 2198 if page.erclr.IsEmpty() { 2199 return nil 2200 } 2201 return *page.erclr.Value 2202} 2203 2204// Creates a new instance of the ExpressRouteCircuitListResultPage type. 2205func NewExpressRouteCircuitListResultPage(cur ExpressRouteCircuitListResult, getNextPage func(context.Context, ExpressRouteCircuitListResult) (ExpressRouteCircuitListResult, error)) ExpressRouteCircuitListResultPage { 2206 return ExpressRouteCircuitListResultPage{ 2207 fn: getNextPage, 2208 erclr: cur, 2209 } 2210} 2211 2212// ExpressRouteCircuitPeering peering in a ExpressRouteCircuit resource 2213type ExpressRouteCircuitPeering struct { 2214 autorest.Response `json:"-"` 2215 *ExpressRouteCircuitPeeringPropertiesFormat `json:"properties,omitempty"` 2216 // Name - Gets name of the resource that is unique within a resource group. This name can be used to access the resource 2217 Name *string `json:"name,omitempty"` 2218 // Etag - A unique read-only string that changes whenever the resource is updated 2219 Etag *string `json:"etag,omitempty"` 2220 // ID - Resource Id 2221 ID *string `json:"id,omitempty"` 2222} 2223 2224// MarshalJSON is the custom marshaler for ExpressRouteCircuitPeering. 2225func (ercp ExpressRouteCircuitPeering) MarshalJSON() ([]byte, error) { 2226 objectMap := make(map[string]interface{}) 2227 if ercp.ExpressRouteCircuitPeeringPropertiesFormat != nil { 2228 objectMap["properties"] = ercp.ExpressRouteCircuitPeeringPropertiesFormat 2229 } 2230 if ercp.Name != nil { 2231 objectMap["name"] = ercp.Name 2232 } 2233 if ercp.Etag != nil { 2234 objectMap["etag"] = ercp.Etag 2235 } 2236 if ercp.ID != nil { 2237 objectMap["id"] = ercp.ID 2238 } 2239 return json.Marshal(objectMap) 2240} 2241 2242// UnmarshalJSON is the custom unmarshaler for ExpressRouteCircuitPeering struct. 2243func (ercp *ExpressRouteCircuitPeering) UnmarshalJSON(body []byte) error { 2244 var m map[string]*json.RawMessage 2245 err := json.Unmarshal(body, &m) 2246 if err != nil { 2247 return err 2248 } 2249 for k, v := range m { 2250 switch k { 2251 case "properties": 2252 if v != nil { 2253 var expressRouteCircuitPeeringPropertiesFormat ExpressRouteCircuitPeeringPropertiesFormat 2254 err = json.Unmarshal(*v, &expressRouteCircuitPeeringPropertiesFormat) 2255 if err != nil { 2256 return err 2257 } 2258 ercp.ExpressRouteCircuitPeeringPropertiesFormat = &expressRouteCircuitPeeringPropertiesFormat 2259 } 2260 case "name": 2261 if v != nil { 2262 var name string 2263 err = json.Unmarshal(*v, &name) 2264 if err != nil { 2265 return err 2266 } 2267 ercp.Name = &name 2268 } 2269 case "etag": 2270 if v != nil { 2271 var etag string 2272 err = json.Unmarshal(*v, &etag) 2273 if err != nil { 2274 return err 2275 } 2276 ercp.Etag = &etag 2277 } 2278 case "id": 2279 if v != nil { 2280 var ID string 2281 err = json.Unmarshal(*v, &ID) 2282 if err != nil { 2283 return err 2284 } 2285 ercp.ID = &ID 2286 } 2287 } 2288 } 2289 2290 return nil 2291} 2292 2293// ExpressRouteCircuitPeeringConfig specifies the peering config 2294type ExpressRouteCircuitPeeringConfig struct { 2295 // AdvertisedPublicPrefixes - Gets or sets the reference of AdvertisedPublicPrefixes 2296 AdvertisedPublicPrefixes *[]string `json:"advertisedPublicPrefixes,omitempty"` 2297 // AdvertisedPublicPrefixesState - Gets or sets AdvertisedPublicPrefixState of the Peering resource. Possible values include: 'NotConfigured', 'Configuring', 'Configured', 'ValidationNeeded' 2298 AdvertisedPublicPrefixesState ExpressRouteCircuitPeeringAdvertisedPublicPrefixState `json:"advertisedPublicPrefixesState,omitempty"` 2299 // CustomerASN - Gets or Sets CustomerAsn of the peering. 2300 CustomerASN *int32 `json:"customerASN,omitempty"` 2301 // RoutingRegistryName - Gets or Sets RoutingRegistryName of the config. 2302 RoutingRegistryName *string `json:"routingRegistryName,omitempty"` 2303} 2304 2305// ExpressRouteCircuitPeeringListResult response for ListPeering Api service callRetrieves all Peerings 2306// that belongs to an ExpressRouteCircuit 2307type ExpressRouteCircuitPeeringListResult struct { 2308 autorest.Response `json:"-"` 2309 // Value - Gets the peerings in an express route circuit 2310 Value *[]ExpressRouteCircuitPeering `json:"value,omitempty"` 2311 // NextLink - Gets the URL to get the next set of results. 2312 NextLink *string `json:"nextLink,omitempty"` 2313} 2314 2315// ExpressRouteCircuitPeeringListResultIterator provides access to a complete listing of 2316// ExpressRouteCircuitPeering values. 2317type ExpressRouteCircuitPeeringListResultIterator struct { 2318 i int 2319 page ExpressRouteCircuitPeeringListResultPage 2320} 2321 2322// NextWithContext advances to the next value. If there was an error making 2323// the request the iterator does not advance and the error is returned. 2324func (iter *ExpressRouteCircuitPeeringListResultIterator) NextWithContext(ctx context.Context) (err error) { 2325 if tracing.IsEnabled() { 2326 ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitPeeringListResultIterator.NextWithContext") 2327 defer func() { 2328 sc := -1 2329 if iter.Response().Response.Response != nil { 2330 sc = iter.Response().Response.Response.StatusCode 2331 } 2332 tracing.EndSpan(ctx, sc, err) 2333 }() 2334 } 2335 iter.i++ 2336 if iter.i < len(iter.page.Values()) { 2337 return nil 2338 } 2339 err = iter.page.NextWithContext(ctx) 2340 if err != nil { 2341 iter.i-- 2342 return err 2343 } 2344 iter.i = 0 2345 return nil 2346} 2347 2348// Next advances to the next value. If there was an error making 2349// the request the iterator does not advance and the error is returned. 2350// Deprecated: Use NextWithContext() instead. 2351func (iter *ExpressRouteCircuitPeeringListResultIterator) Next() error { 2352 return iter.NextWithContext(context.Background()) 2353} 2354 2355// NotDone returns true if the enumeration should be started or is not yet complete. 2356func (iter ExpressRouteCircuitPeeringListResultIterator) NotDone() bool { 2357 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 2358} 2359 2360// Response returns the raw server response from the last page request. 2361func (iter ExpressRouteCircuitPeeringListResultIterator) Response() ExpressRouteCircuitPeeringListResult { 2362 return iter.page.Response() 2363} 2364 2365// Value returns the current value or a zero-initialized value if the 2366// iterator has advanced beyond the end of the collection. 2367func (iter ExpressRouteCircuitPeeringListResultIterator) Value() ExpressRouteCircuitPeering { 2368 if !iter.page.NotDone() { 2369 return ExpressRouteCircuitPeering{} 2370 } 2371 return iter.page.Values()[iter.i] 2372} 2373 2374// Creates a new instance of the ExpressRouteCircuitPeeringListResultIterator type. 2375func NewExpressRouteCircuitPeeringListResultIterator(page ExpressRouteCircuitPeeringListResultPage) ExpressRouteCircuitPeeringListResultIterator { 2376 return ExpressRouteCircuitPeeringListResultIterator{page: page} 2377} 2378 2379// IsEmpty returns true if the ListResult contains no values. 2380func (ercplr ExpressRouteCircuitPeeringListResult) IsEmpty() bool { 2381 return ercplr.Value == nil || len(*ercplr.Value) == 0 2382} 2383 2384// hasNextLink returns true if the NextLink is not empty. 2385func (ercplr ExpressRouteCircuitPeeringListResult) hasNextLink() bool { 2386 return ercplr.NextLink != nil && len(*ercplr.NextLink) != 0 2387} 2388 2389// expressRouteCircuitPeeringListResultPreparer prepares a request to retrieve the next set of results. 2390// It returns nil if no more results exist. 2391func (ercplr ExpressRouteCircuitPeeringListResult) expressRouteCircuitPeeringListResultPreparer(ctx context.Context) (*http.Request, error) { 2392 if !ercplr.hasNextLink() { 2393 return nil, nil 2394 } 2395 return autorest.Prepare((&http.Request{}).WithContext(ctx), 2396 autorest.AsJSON(), 2397 autorest.AsGet(), 2398 autorest.WithBaseURL(to.String(ercplr.NextLink))) 2399} 2400 2401// ExpressRouteCircuitPeeringListResultPage contains a page of ExpressRouteCircuitPeering values. 2402type ExpressRouteCircuitPeeringListResultPage struct { 2403 fn func(context.Context, ExpressRouteCircuitPeeringListResult) (ExpressRouteCircuitPeeringListResult, error) 2404 ercplr ExpressRouteCircuitPeeringListResult 2405} 2406 2407// NextWithContext advances to the next page of values. If there was an error making 2408// the request the page does not advance and the error is returned. 2409func (page *ExpressRouteCircuitPeeringListResultPage) NextWithContext(ctx context.Context) (err error) { 2410 if tracing.IsEnabled() { 2411 ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitPeeringListResultPage.NextWithContext") 2412 defer func() { 2413 sc := -1 2414 if page.Response().Response.Response != nil { 2415 sc = page.Response().Response.Response.StatusCode 2416 } 2417 tracing.EndSpan(ctx, sc, err) 2418 }() 2419 } 2420 for { 2421 next, err := page.fn(ctx, page.ercplr) 2422 if err != nil { 2423 return err 2424 } 2425 page.ercplr = next 2426 if !next.hasNextLink() || !next.IsEmpty() { 2427 break 2428 } 2429 } 2430 return nil 2431} 2432 2433// Next advances to the next page of values. If there was an error making 2434// the request the page does not advance and the error is returned. 2435// Deprecated: Use NextWithContext() instead. 2436func (page *ExpressRouteCircuitPeeringListResultPage) Next() error { 2437 return page.NextWithContext(context.Background()) 2438} 2439 2440// NotDone returns true if the page enumeration should be started or is not yet complete. 2441func (page ExpressRouteCircuitPeeringListResultPage) NotDone() bool { 2442 return !page.ercplr.IsEmpty() 2443} 2444 2445// Response returns the raw server response from the last page request. 2446func (page ExpressRouteCircuitPeeringListResultPage) Response() ExpressRouteCircuitPeeringListResult { 2447 return page.ercplr 2448} 2449 2450// Values returns the slice of values for the current page or nil if there are no values. 2451func (page ExpressRouteCircuitPeeringListResultPage) Values() []ExpressRouteCircuitPeering { 2452 if page.ercplr.IsEmpty() { 2453 return nil 2454 } 2455 return *page.ercplr.Value 2456} 2457 2458// Creates a new instance of the ExpressRouteCircuitPeeringListResultPage type. 2459func NewExpressRouteCircuitPeeringListResultPage(cur ExpressRouteCircuitPeeringListResult, getNextPage func(context.Context, ExpressRouteCircuitPeeringListResult) (ExpressRouteCircuitPeeringListResult, error)) ExpressRouteCircuitPeeringListResultPage { 2460 return ExpressRouteCircuitPeeringListResultPage{ 2461 fn: getNextPage, 2462 ercplr: cur, 2463 } 2464} 2465 2466// ExpressRouteCircuitPeeringPropertiesFormat ... 2467type ExpressRouteCircuitPeeringPropertiesFormat struct { 2468 // PeeringType - Gets or sets PeeringType. Possible values include: 'AzurePublicPeering', 'AzurePrivatePeering', 'MicrosoftPeering' 2469 PeeringType ExpressRouteCircuitPeeringType `json:"peeringType,omitempty"` 2470 // State - Gets or sets state of Peering. Possible values include: 'ExpressRouteCircuitPeeringStateDisabled', 'ExpressRouteCircuitPeeringStateEnabled' 2471 State ExpressRouteCircuitPeeringState `json:"state,omitempty"` 2472 // AzureASN - Gets or sets the azure ASN 2473 AzureASN *int32 `json:"azureASN,omitempty"` 2474 // PeerASN - Gets or sets the peer ASN 2475 PeerASN *int32 `json:"peerASN,omitempty"` 2476 // PrimaryPeerAddressPrefix - Gets or sets the primary address prefix 2477 PrimaryPeerAddressPrefix *string `json:"primaryPeerAddressPrefix,omitempty"` 2478 // SecondaryPeerAddressPrefix - Gets or sets the secondary address prefix 2479 SecondaryPeerAddressPrefix *string `json:"secondaryPeerAddressPrefix,omitempty"` 2480 // PrimaryAzurePort - Gets or sets the primary port 2481 PrimaryAzurePort *string `json:"primaryAzurePort,omitempty"` 2482 // SecondaryAzurePort - Gets or sets the secondary port 2483 SecondaryAzurePort *string `json:"secondaryAzurePort,omitempty"` 2484 // SharedKey - Gets or sets the shared key 2485 SharedKey *string `json:"sharedKey,omitempty"` 2486 // VlanID - Gets or sets the vlan id 2487 VlanID *int32 `json:"vlanId,omitempty"` 2488 // MicrosoftPeeringConfig - Gets or sets the Microsoft peering config 2489 MicrosoftPeeringConfig *ExpressRouteCircuitPeeringConfig `json:"microsoftPeeringConfig,omitempty"` 2490 // Stats - Gets or peering stats 2491 Stats *ExpressRouteCircuitStats `json:"stats,omitempty"` 2492 // ProvisioningState - Gets or sets Provisioning state of the PublicIP resource Updating/Deleting/Failed 2493 ProvisioningState *string `json:"provisioningState,omitempty"` 2494} 2495 2496// ExpressRouteCircuitPeeringsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results 2497// of a long-running operation. 2498type ExpressRouteCircuitPeeringsCreateOrUpdateFuture struct { 2499 azure.FutureAPI 2500 // Result returns the result of the asynchronous operation. 2501 // If the operation has not completed it will return an error. 2502 Result func(ExpressRouteCircuitPeeringsClient) (ExpressRouteCircuitPeering, error) 2503} 2504 2505// ExpressRouteCircuitPeeringsDeleteFuture an abstraction for monitoring and retrieving the results of a 2506// long-running operation. 2507type ExpressRouteCircuitPeeringsDeleteFuture struct { 2508 azure.FutureAPI 2509 // Result returns the result of the asynchronous operation. 2510 // If the operation has not completed it will return an error. 2511 Result func(ExpressRouteCircuitPeeringsClient) (autorest.Response, error) 2512} 2513 2514// ExpressRouteCircuitPropertiesFormat properties of ExpressRouteCircuit 2515type ExpressRouteCircuitPropertiesFormat struct { 2516 // AllowClassicOperations - allow classic operations 2517 AllowClassicOperations *bool `json:"allowClassicOperations,omitempty"` 2518 // CircuitProvisioningState - Gets or sets CircuitProvisioningState state of the resource 2519 CircuitProvisioningState *string `json:"circuitProvisioningState,omitempty"` 2520 // ServiceProviderProvisioningState - Gets or sets ServiceProviderProvisioningState state of the resource. Possible values include: 'NotProvisioned', 'Provisioning', 'Provisioned', 'Deprovisioning' 2521 ServiceProviderProvisioningState ServiceProviderProvisioningState `json:"serviceProviderProvisioningState,omitempty"` 2522 // Authorizations - Gets or sets list of authorizations 2523 Authorizations *[]ExpressRouteCircuitAuthorization `json:"authorizations,omitempty"` 2524 // Peerings - Gets or sets list of peerings 2525 Peerings *[]ExpressRouteCircuitPeering `json:"peerings,omitempty"` 2526 // ServiceKey - Gets or sets ServiceKey 2527 ServiceKey *string `json:"serviceKey,omitempty"` 2528 // ServiceProviderNotes - Gets or sets ServiceProviderNotes 2529 ServiceProviderNotes *string `json:"serviceProviderNotes,omitempty"` 2530 // ServiceProviderProperties - Gets or sets ServiceProviderProperties 2531 ServiceProviderProperties *ExpressRouteCircuitServiceProviderProperties `json:"serviceProviderProperties,omitempty"` 2532 // ProvisioningState - Gets or sets Provisioning state of the PublicIP resource Updating/Deleting/Failed 2533 ProvisioningState *string `json:"provisioningState,omitempty"` 2534} 2535 2536// ExpressRouteCircuitRoutesTable the routes table associated with the ExpressRouteCircuit 2537type ExpressRouteCircuitRoutesTable struct { 2538 // NetworkProperty - network. 2539 NetworkProperty *string `json:"network,omitempty"` 2540 // NextHop - nextHop 2541 NextHop *string `json:"nextHop,omitempty"` 2542 // LocPrf - locPrf. 2543 LocPrf *string `json:"locPrf,omitempty"` 2544 // Weight - weight. 2545 Weight *int32 `json:"weight,omitempty"` 2546 // Path - path . 2547 Path *string `json:"path,omitempty"` 2548} 2549 2550// ExpressRouteCircuitRoutesTableSummary the routes table associated with the ExpressRouteCircuit 2551type ExpressRouteCircuitRoutesTableSummary struct { 2552 // Neighbor - Neighbor. 2553 Neighbor *string `json:"neighbor,omitempty"` 2554 // V - BGP version number spoken to the neighbor. 2555 V *int32 `json:"v,omitempty"` 2556 // As - Autonomous system number. 2557 As *int32 `json:"as,omitempty"` 2558 // UpDown - The length of time that the BGP session has been in the Established state, or the current status if not in the Established state. 2559 UpDown *string `json:"upDown,omitempty"` 2560 // StatePfxRcd - Current state of the BGP session, and the number of prefixes that have been received from a neighbor or peer group. 2561 StatePfxRcd *string `json:"statePfxRcd,omitempty"` 2562} 2563 2564// ExpressRouteCircuitsArpTableListResult response for ListArpTable associated with the Express Route 2565// Circuits Api 2566type ExpressRouteCircuitsArpTableListResult struct { 2567 autorest.Response `json:"-"` 2568 // Value - Gets List of ArpTable 2569 Value *[]ExpressRouteCircuitArpTable `json:"value,omitempty"` 2570 // NextLink - Gets the URL to get the next set of results. 2571 NextLink *string `json:"nextLink,omitempty"` 2572} 2573 2574// ExpressRouteCircuitsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a 2575// long-running operation. 2576type ExpressRouteCircuitsCreateOrUpdateFuture struct { 2577 azure.FutureAPI 2578 // Result returns the result of the asynchronous operation. 2579 // If the operation has not completed it will return an error. 2580 Result func(ExpressRouteCircuitsClient) (ExpressRouteCircuit, error) 2581} 2582 2583// ExpressRouteCircuitsDeleteFuture an abstraction for monitoring and retrieving the results of a 2584// long-running operation. 2585type ExpressRouteCircuitsDeleteFuture struct { 2586 azure.FutureAPI 2587 // Result returns the result of the asynchronous operation. 2588 // If the operation has not completed it will return an error. 2589 Result func(ExpressRouteCircuitsClient) (autorest.Response, error) 2590} 2591 2592// ExpressRouteCircuitServiceProviderProperties contains ServiceProviderProperties in an 2593// ExpressRouteCircuit 2594type ExpressRouteCircuitServiceProviderProperties struct { 2595 // ServiceProviderName - Gets or sets serviceProviderName. 2596 ServiceProviderName *string `json:"serviceProviderName,omitempty"` 2597 // PeeringLocation - Gets or sets peering location. 2598 PeeringLocation *string `json:"peeringLocation,omitempty"` 2599 // BandwidthInMbps - Gets or sets BandwidthInMbps. 2600 BandwidthInMbps *int32 `json:"bandwidthInMbps,omitempty"` 2601} 2602 2603// ExpressRouteCircuitSku contains sku in an ExpressRouteCircuit 2604type ExpressRouteCircuitSku struct { 2605 // Name - Gets or sets name of the sku. 2606 Name *string `json:"name,omitempty"` 2607 // Tier - Gets or sets tier of the sku. Possible values include: 'ExpressRouteCircuitSkuTierStandard', 'ExpressRouteCircuitSkuTierPremium' 2608 Tier ExpressRouteCircuitSkuTier `json:"tier,omitempty"` 2609 // Family - Gets or sets family of the sku. Possible values include: 'UnlimitedData', 'MeteredData' 2610 Family ExpressRouteCircuitSkuFamily `json:"family,omitempty"` 2611} 2612 2613// ExpressRouteCircuitsListArpTableFuture an abstraction for monitoring and retrieving the results of a 2614// long-running operation. 2615type ExpressRouteCircuitsListArpTableFuture struct { 2616 azure.FutureAPI 2617 // Result returns the result of the asynchronous operation. 2618 // If the operation has not completed it will return an error. 2619 Result func(ExpressRouteCircuitsClient) (ExpressRouteCircuitsArpTableListResult, error) 2620} 2621 2622// ExpressRouteCircuitsListRoutesTableFuture an abstraction for monitoring and retrieving the results of a 2623// long-running operation. 2624type ExpressRouteCircuitsListRoutesTableFuture struct { 2625 azure.FutureAPI 2626 // Result returns the result of the asynchronous operation. 2627 // If the operation has not completed it will return an error. 2628 Result func(ExpressRouteCircuitsClient) (ExpressRouteCircuitsRoutesTableListResult, error) 2629} 2630 2631// ExpressRouteCircuitsListRoutesTableSummaryFuture an abstraction for monitoring and retrieving the 2632// results of a long-running operation. 2633type ExpressRouteCircuitsListRoutesTableSummaryFuture struct { 2634 azure.FutureAPI 2635 // Result returns the result of the asynchronous operation. 2636 // If the operation has not completed it will return an error. 2637 Result func(ExpressRouteCircuitsClient) (ExpressRouteCircuitsRoutesTableSummaryListResult, error) 2638} 2639 2640// ExpressRouteCircuitsRoutesTableListResult response for ListRoutesTable associated with the Express Route 2641// Circuits Api 2642type ExpressRouteCircuitsRoutesTableListResult struct { 2643 autorest.Response `json:"-"` 2644 // Value - Gets List of RoutesTable 2645 Value *[]ExpressRouteCircuitRoutesTable `json:"value,omitempty"` 2646 // NextLink - Gets the URL to get the next set of results. 2647 NextLink *string `json:"nextLink,omitempty"` 2648} 2649 2650// ExpressRouteCircuitsRoutesTableSummaryListResult response for ListRoutesTable associated with the 2651// Express Route Circuits Api 2652type ExpressRouteCircuitsRoutesTableSummaryListResult struct { 2653 autorest.Response `json:"-"` 2654 // Value - Gets List of RoutesTable 2655 Value *[]ExpressRouteCircuitRoutesTableSummary `json:"value,omitempty"` 2656 // NextLink - Gets the URL to get the next set of results. 2657 NextLink *string `json:"nextLink,omitempty"` 2658} 2659 2660// ExpressRouteCircuitStats contains Stats associated with the peering 2661type ExpressRouteCircuitStats struct { 2662 autorest.Response `json:"-"` 2663 // PrimarybytesIn - Gets BytesIn of the peering. 2664 PrimarybytesIn *int64 `json:"primarybytesIn,omitempty"` 2665 // PrimarybytesOut - Gets BytesOut of the peering. 2666 PrimarybytesOut *int64 `json:"primarybytesOut,omitempty"` 2667 // SecondarybytesIn - Gets BytesIn of the peering. 2668 SecondarybytesIn *int64 `json:"secondarybytesIn,omitempty"` 2669 // SecondarybytesOut - Gets BytesOut of the peering. 2670 SecondarybytesOut *int64 `json:"secondarybytesOut,omitempty"` 2671} 2672 2673// ExpressRouteServiceProvider expressRouteResourceProvider object 2674type ExpressRouteServiceProvider struct { 2675 *ExpressRouteServiceProviderPropertiesFormat `json:"properties,omitempty"` 2676 // ID - Resource Id 2677 ID *string `json:"id,omitempty"` 2678 // Name - READ-ONLY; Resource name 2679 Name *string `json:"name,omitempty"` 2680 // Type - READ-ONLY; Resource type 2681 Type *string `json:"type,omitempty"` 2682 // Location - Resource location 2683 Location *string `json:"location,omitempty"` 2684 // Tags - Resource tags 2685 Tags map[string]*string `json:"tags"` 2686} 2687 2688// MarshalJSON is the custom marshaler for ExpressRouteServiceProvider. 2689func (ersp ExpressRouteServiceProvider) MarshalJSON() ([]byte, error) { 2690 objectMap := make(map[string]interface{}) 2691 if ersp.ExpressRouteServiceProviderPropertiesFormat != nil { 2692 objectMap["properties"] = ersp.ExpressRouteServiceProviderPropertiesFormat 2693 } 2694 if ersp.ID != nil { 2695 objectMap["id"] = ersp.ID 2696 } 2697 if ersp.Location != nil { 2698 objectMap["location"] = ersp.Location 2699 } 2700 if ersp.Tags != nil { 2701 objectMap["tags"] = ersp.Tags 2702 } 2703 return json.Marshal(objectMap) 2704} 2705 2706// UnmarshalJSON is the custom unmarshaler for ExpressRouteServiceProvider struct. 2707func (ersp *ExpressRouteServiceProvider) UnmarshalJSON(body []byte) error { 2708 var m map[string]*json.RawMessage 2709 err := json.Unmarshal(body, &m) 2710 if err != nil { 2711 return err 2712 } 2713 for k, v := range m { 2714 switch k { 2715 case "properties": 2716 if v != nil { 2717 var expressRouteServiceProviderPropertiesFormat ExpressRouteServiceProviderPropertiesFormat 2718 err = json.Unmarshal(*v, &expressRouteServiceProviderPropertiesFormat) 2719 if err != nil { 2720 return err 2721 } 2722 ersp.ExpressRouteServiceProviderPropertiesFormat = &expressRouteServiceProviderPropertiesFormat 2723 } 2724 case "id": 2725 if v != nil { 2726 var ID string 2727 err = json.Unmarshal(*v, &ID) 2728 if err != nil { 2729 return err 2730 } 2731 ersp.ID = &ID 2732 } 2733 case "name": 2734 if v != nil { 2735 var name string 2736 err = json.Unmarshal(*v, &name) 2737 if err != nil { 2738 return err 2739 } 2740 ersp.Name = &name 2741 } 2742 case "type": 2743 if v != nil { 2744 var typeVar string 2745 err = json.Unmarshal(*v, &typeVar) 2746 if err != nil { 2747 return err 2748 } 2749 ersp.Type = &typeVar 2750 } 2751 case "location": 2752 if v != nil { 2753 var location string 2754 err = json.Unmarshal(*v, &location) 2755 if err != nil { 2756 return err 2757 } 2758 ersp.Location = &location 2759 } 2760 case "tags": 2761 if v != nil { 2762 var tags map[string]*string 2763 err = json.Unmarshal(*v, &tags) 2764 if err != nil { 2765 return err 2766 } 2767 ersp.Tags = tags 2768 } 2769 } 2770 } 2771 2772 return nil 2773} 2774 2775// ExpressRouteServiceProviderBandwidthsOffered contains Bandwidths offered in ExpressRouteServiceProviders 2776type ExpressRouteServiceProviderBandwidthsOffered struct { 2777 // OfferName - Gets the OfferName 2778 OfferName *string `json:"offerName,omitempty"` 2779 // ValueInMbps - Gets the ValueInMbps. 2780 ValueInMbps *int32 `json:"valueInMbps,omitempty"` 2781} 2782 2783// ExpressRouteServiceProviderListResult response for ListExpressRouteServiceProvider Api service call 2784type ExpressRouteServiceProviderListResult struct { 2785 autorest.Response `json:"-"` 2786 // Value - Gets List of ExpressRouteResourceProvider 2787 Value *[]ExpressRouteServiceProvider `json:"value,omitempty"` 2788 // NextLink - Gets the URL to get the next set of results. 2789 NextLink *string `json:"nextLink,omitempty"` 2790} 2791 2792// ExpressRouteServiceProviderListResultIterator provides access to a complete listing of 2793// ExpressRouteServiceProvider values. 2794type ExpressRouteServiceProviderListResultIterator struct { 2795 i int 2796 page ExpressRouteServiceProviderListResultPage 2797} 2798 2799// NextWithContext advances to the next value. If there was an error making 2800// the request the iterator does not advance and the error is returned. 2801func (iter *ExpressRouteServiceProviderListResultIterator) NextWithContext(ctx context.Context) (err error) { 2802 if tracing.IsEnabled() { 2803 ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteServiceProviderListResultIterator.NextWithContext") 2804 defer func() { 2805 sc := -1 2806 if iter.Response().Response.Response != nil { 2807 sc = iter.Response().Response.Response.StatusCode 2808 } 2809 tracing.EndSpan(ctx, sc, err) 2810 }() 2811 } 2812 iter.i++ 2813 if iter.i < len(iter.page.Values()) { 2814 return nil 2815 } 2816 err = iter.page.NextWithContext(ctx) 2817 if err != nil { 2818 iter.i-- 2819 return err 2820 } 2821 iter.i = 0 2822 return nil 2823} 2824 2825// Next advances to the next value. If there was an error making 2826// the request the iterator does not advance and the error is returned. 2827// Deprecated: Use NextWithContext() instead. 2828func (iter *ExpressRouteServiceProviderListResultIterator) Next() error { 2829 return iter.NextWithContext(context.Background()) 2830} 2831 2832// NotDone returns true if the enumeration should be started or is not yet complete. 2833func (iter ExpressRouteServiceProviderListResultIterator) NotDone() bool { 2834 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 2835} 2836 2837// Response returns the raw server response from the last page request. 2838func (iter ExpressRouteServiceProviderListResultIterator) Response() ExpressRouteServiceProviderListResult { 2839 return iter.page.Response() 2840} 2841 2842// Value returns the current value or a zero-initialized value if the 2843// iterator has advanced beyond the end of the collection. 2844func (iter ExpressRouteServiceProviderListResultIterator) Value() ExpressRouteServiceProvider { 2845 if !iter.page.NotDone() { 2846 return ExpressRouteServiceProvider{} 2847 } 2848 return iter.page.Values()[iter.i] 2849} 2850 2851// Creates a new instance of the ExpressRouteServiceProviderListResultIterator type. 2852func NewExpressRouteServiceProviderListResultIterator(page ExpressRouteServiceProviderListResultPage) ExpressRouteServiceProviderListResultIterator { 2853 return ExpressRouteServiceProviderListResultIterator{page: page} 2854} 2855 2856// IsEmpty returns true if the ListResult contains no values. 2857func (ersplr ExpressRouteServiceProviderListResult) IsEmpty() bool { 2858 return ersplr.Value == nil || len(*ersplr.Value) == 0 2859} 2860 2861// hasNextLink returns true if the NextLink is not empty. 2862func (ersplr ExpressRouteServiceProviderListResult) hasNextLink() bool { 2863 return ersplr.NextLink != nil && len(*ersplr.NextLink) != 0 2864} 2865 2866// expressRouteServiceProviderListResultPreparer prepares a request to retrieve the next set of results. 2867// It returns nil if no more results exist. 2868func (ersplr ExpressRouteServiceProviderListResult) expressRouteServiceProviderListResultPreparer(ctx context.Context) (*http.Request, error) { 2869 if !ersplr.hasNextLink() { 2870 return nil, nil 2871 } 2872 return autorest.Prepare((&http.Request{}).WithContext(ctx), 2873 autorest.AsJSON(), 2874 autorest.AsGet(), 2875 autorest.WithBaseURL(to.String(ersplr.NextLink))) 2876} 2877 2878// ExpressRouteServiceProviderListResultPage contains a page of ExpressRouteServiceProvider values. 2879type ExpressRouteServiceProviderListResultPage struct { 2880 fn func(context.Context, ExpressRouteServiceProviderListResult) (ExpressRouteServiceProviderListResult, error) 2881 ersplr ExpressRouteServiceProviderListResult 2882} 2883 2884// NextWithContext advances to the next page of values. If there was an error making 2885// the request the page does not advance and the error is returned. 2886func (page *ExpressRouteServiceProviderListResultPage) NextWithContext(ctx context.Context) (err error) { 2887 if tracing.IsEnabled() { 2888 ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteServiceProviderListResultPage.NextWithContext") 2889 defer func() { 2890 sc := -1 2891 if page.Response().Response.Response != nil { 2892 sc = page.Response().Response.Response.StatusCode 2893 } 2894 tracing.EndSpan(ctx, sc, err) 2895 }() 2896 } 2897 for { 2898 next, err := page.fn(ctx, page.ersplr) 2899 if err != nil { 2900 return err 2901 } 2902 page.ersplr = next 2903 if !next.hasNextLink() || !next.IsEmpty() { 2904 break 2905 } 2906 } 2907 return nil 2908} 2909 2910// Next advances to the next page of values. If there was an error making 2911// the request the page does not advance and the error is returned. 2912// Deprecated: Use NextWithContext() instead. 2913func (page *ExpressRouteServiceProviderListResultPage) Next() error { 2914 return page.NextWithContext(context.Background()) 2915} 2916 2917// NotDone returns true if the page enumeration should be started or is not yet complete. 2918func (page ExpressRouteServiceProviderListResultPage) NotDone() bool { 2919 return !page.ersplr.IsEmpty() 2920} 2921 2922// Response returns the raw server response from the last page request. 2923func (page ExpressRouteServiceProviderListResultPage) Response() ExpressRouteServiceProviderListResult { 2924 return page.ersplr 2925} 2926 2927// Values returns the slice of values for the current page or nil if there are no values. 2928func (page ExpressRouteServiceProviderListResultPage) Values() []ExpressRouteServiceProvider { 2929 if page.ersplr.IsEmpty() { 2930 return nil 2931 } 2932 return *page.ersplr.Value 2933} 2934 2935// Creates a new instance of the ExpressRouteServiceProviderListResultPage type. 2936func NewExpressRouteServiceProviderListResultPage(cur ExpressRouteServiceProviderListResult, getNextPage func(context.Context, ExpressRouteServiceProviderListResult) (ExpressRouteServiceProviderListResult, error)) ExpressRouteServiceProviderListResultPage { 2937 return ExpressRouteServiceProviderListResultPage{ 2938 fn: getNextPage, 2939 ersplr: cur, 2940 } 2941} 2942 2943// ExpressRouteServiceProviderPropertiesFormat properties of ExpressRouteServiceProvider 2944type ExpressRouteServiceProviderPropertiesFormat struct { 2945 // PeeringLocations - Gets or list of peering locations 2946 PeeringLocations *[]string `json:"peeringLocations,omitempty"` 2947 // BandwidthsOffered - Gets or bandwidths offered 2948 BandwidthsOffered *[]ExpressRouteServiceProviderBandwidthsOffered `json:"bandwidthsOffered,omitempty"` 2949 // ProvisioningState - Gets or sets Provisioning state of the resource 2950 ProvisioningState *string `json:"provisioningState,omitempty"` 2951} 2952 2953// FrontendIPConfiguration frontend IP address of the load balancer 2954type FrontendIPConfiguration struct { 2955 *FrontendIPConfigurationPropertiesFormat `json:"properties,omitempty"` 2956 // Name - Gets name of the resource that is unique within a resource group. This name can be used to access the resource 2957 Name *string `json:"name,omitempty"` 2958 // Etag - A unique read-only string that changes whenever the resource is updated 2959 Etag *string `json:"etag,omitempty"` 2960 // ID - Resource Id 2961 ID *string `json:"id,omitempty"` 2962} 2963 2964// MarshalJSON is the custom marshaler for FrontendIPConfiguration. 2965func (fic FrontendIPConfiguration) MarshalJSON() ([]byte, error) { 2966 objectMap := make(map[string]interface{}) 2967 if fic.FrontendIPConfigurationPropertiesFormat != nil { 2968 objectMap["properties"] = fic.FrontendIPConfigurationPropertiesFormat 2969 } 2970 if fic.Name != nil { 2971 objectMap["name"] = fic.Name 2972 } 2973 if fic.Etag != nil { 2974 objectMap["etag"] = fic.Etag 2975 } 2976 if fic.ID != nil { 2977 objectMap["id"] = fic.ID 2978 } 2979 return json.Marshal(objectMap) 2980} 2981 2982// UnmarshalJSON is the custom unmarshaler for FrontendIPConfiguration struct. 2983func (fic *FrontendIPConfiguration) UnmarshalJSON(body []byte) error { 2984 var m map[string]*json.RawMessage 2985 err := json.Unmarshal(body, &m) 2986 if err != nil { 2987 return err 2988 } 2989 for k, v := range m { 2990 switch k { 2991 case "properties": 2992 if v != nil { 2993 var frontendIPConfigurationPropertiesFormat FrontendIPConfigurationPropertiesFormat 2994 err = json.Unmarshal(*v, &frontendIPConfigurationPropertiesFormat) 2995 if err != nil { 2996 return err 2997 } 2998 fic.FrontendIPConfigurationPropertiesFormat = &frontendIPConfigurationPropertiesFormat 2999 } 3000 case "name": 3001 if v != nil { 3002 var name string 3003 err = json.Unmarshal(*v, &name) 3004 if err != nil { 3005 return err 3006 } 3007 fic.Name = &name 3008 } 3009 case "etag": 3010 if v != nil { 3011 var etag string 3012 err = json.Unmarshal(*v, &etag) 3013 if err != nil { 3014 return err 3015 } 3016 fic.Etag = &etag 3017 } 3018 case "id": 3019 if v != nil { 3020 var ID string 3021 err = json.Unmarshal(*v, &ID) 3022 if err != nil { 3023 return err 3024 } 3025 fic.ID = &ID 3026 } 3027 } 3028 } 3029 3030 return nil 3031} 3032 3033// FrontendIPConfigurationPropertiesFormat properties of Frontend IP Configuration of the load balancer 3034type FrontendIPConfigurationPropertiesFormat struct { 3035 // InboundNatRules - Read only.Inbound rules URIs that use this frontend IP 3036 InboundNatRules *[]SubResource `json:"inboundNatRules,omitempty"` 3037 // InboundNatPools - Read only.Inbound pools URIs that use this frontend IP 3038 InboundNatPools *[]SubResource `json:"inboundNatPools,omitempty"` 3039 // OutboundNatRules - Read only.Outbound rules URIs that use this frontend IP 3040 OutboundNatRules *[]SubResource `json:"outboundNatRules,omitempty"` 3041 // LoadBalancingRules - Gets Load Balancing rules URIs that use this frontend IP 3042 LoadBalancingRules *[]SubResource `json:"loadBalancingRules,omitempty"` 3043 // PrivateIPAddress - Gets or sets the privateIPAddress of the IP Configuration 3044 PrivateIPAddress *string `json:"privateIPAddress,omitempty"` 3045 // PrivateIPAllocationMethod - Gets or sets PrivateIP allocation method (Static/Dynamic). Possible values include: 'Static', 'Dynamic' 3046 PrivateIPAllocationMethod IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"` 3047 // Subnet - Gets or sets the reference of the subnet resource 3048 Subnet *Subnet `json:"subnet,omitempty"` 3049 // PublicIPAddress - Gets or sets the reference of the PublicIP resource 3050 PublicIPAddress *PublicIPAddress `json:"publicIPAddress,omitempty"` 3051 // ProvisioningState - Gets or sets Provisioning state of the PublicIP resource Updating/Deleting/Failed 3052 ProvisioningState *string `json:"provisioningState,omitempty"` 3053} 3054 3055// InboundNatPool inbound NAT pool of the loadbalancer 3056type InboundNatPool struct { 3057 *InboundNatPoolPropertiesFormat `json:"properties,omitempty"` 3058 // Name - Gets name of the resource that is unique within a resource group. This name can be used to access the resource 3059 Name *string `json:"name,omitempty"` 3060 // Etag - A unique read-only string that changes whenever the resource is updated 3061 Etag *string `json:"etag,omitempty"` 3062 // ID - Resource Id 3063 ID *string `json:"id,omitempty"` 3064} 3065 3066// MarshalJSON is the custom marshaler for InboundNatPool. 3067func (inp InboundNatPool) MarshalJSON() ([]byte, error) { 3068 objectMap := make(map[string]interface{}) 3069 if inp.InboundNatPoolPropertiesFormat != nil { 3070 objectMap["properties"] = inp.InboundNatPoolPropertiesFormat 3071 } 3072 if inp.Name != nil { 3073 objectMap["name"] = inp.Name 3074 } 3075 if inp.Etag != nil { 3076 objectMap["etag"] = inp.Etag 3077 } 3078 if inp.ID != nil { 3079 objectMap["id"] = inp.ID 3080 } 3081 return json.Marshal(objectMap) 3082} 3083 3084// UnmarshalJSON is the custom unmarshaler for InboundNatPool struct. 3085func (inp *InboundNatPool) UnmarshalJSON(body []byte) error { 3086 var m map[string]*json.RawMessage 3087 err := json.Unmarshal(body, &m) 3088 if err != nil { 3089 return err 3090 } 3091 for k, v := range m { 3092 switch k { 3093 case "properties": 3094 if v != nil { 3095 var inboundNatPoolPropertiesFormat InboundNatPoolPropertiesFormat 3096 err = json.Unmarshal(*v, &inboundNatPoolPropertiesFormat) 3097 if err != nil { 3098 return err 3099 } 3100 inp.InboundNatPoolPropertiesFormat = &inboundNatPoolPropertiesFormat 3101 } 3102 case "name": 3103 if v != nil { 3104 var name string 3105 err = json.Unmarshal(*v, &name) 3106 if err != nil { 3107 return err 3108 } 3109 inp.Name = &name 3110 } 3111 case "etag": 3112 if v != nil { 3113 var etag string 3114 err = json.Unmarshal(*v, &etag) 3115 if err != nil { 3116 return err 3117 } 3118 inp.Etag = &etag 3119 } 3120 case "id": 3121 if v != nil { 3122 var ID string 3123 err = json.Unmarshal(*v, &ID) 3124 if err != nil { 3125 return err 3126 } 3127 inp.ID = &ID 3128 } 3129 } 3130 } 3131 3132 return nil 3133} 3134 3135// InboundNatPoolPropertiesFormat properties of Inbound NAT pool 3136type InboundNatPoolPropertiesFormat struct { 3137 // FrontendIPConfiguration - Gets or sets a reference to frontend IP Addresses 3138 FrontendIPConfiguration *SubResource `json:"frontendIPConfiguration,omitempty"` 3139 // Protocol - Gets or sets the transport protocol for the external endpoint. Possible values are Udp or Tcp. Possible values include: 'TransportProtocolUDP', 'TransportProtocolTCP' 3140 Protocol TransportProtocol `json:"protocol,omitempty"` 3141 // FrontendPortRangeStart - Gets or sets the starting port range for the NAT pool. You can specify any port number you choose, but the port numbers specified for each role in the service must be unique. Possible values range between 1 and 65535, inclusive 3142 FrontendPortRangeStart *int32 `json:"frontendPortRangeStart,omitempty"` 3143 // FrontendPortRangeEnd - Gets or sets the ending port range for the NAT pool. You can specify any port number you choose, but the port numbers specified for each role in the service must be unique. Possible values range between 1 and 65535, inclusive 3144 FrontendPortRangeEnd *int32 `json:"frontendPortRangeEnd,omitempty"` 3145 // BackendPort - Gets or sets a port used for internal connections on the endpoint. The localPort attribute maps the eternal port of the endpoint to an internal port on a role. This is useful in scenarios where a role must communicate to an internal component on a port that is different from the one that is exposed externally. If not specified, the value of localPort is the same as the port attribute. Set the value of localPort to '*' to automatically assign an unallocated port that is discoverable using the runtime API 3146 BackendPort *int32 `json:"backendPort,omitempty"` 3147 // ProvisioningState - Gets or sets Provisioning state of the PublicIP resource Updating/Deleting/Failed 3148 ProvisioningState *string `json:"provisioningState,omitempty"` 3149} 3150 3151// InboundNatRule inbound NAT rule of the loadbalancer 3152type InboundNatRule struct { 3153 *InboundNatRulePropertiesFormat `json:"properties,omitempty"` 3154 // Name - Gets name of the resource that is unique within a resource group. This name can be used to access the resource 3155 Name *string `json:"name,omitempty"` 3156 // Etag - A unique read-only string that changes whenever the resource is updated 3157 Etag *string `json:"etag,omitempty"` 3158 // ID - Resource Id 3159 ID *string `json:"id,omitempty"` 3160} 3161 3162// MarshalJSON is the custom marshaler for InboundNatRule. 3163func (inr InboundNatRule) MarshalJSON() ([]byte, error) { 3164 objectMap := make(map[string]interface{}) 3165 if inr.InboundNatRulePropertiesFormat != nil { 3166 objectMap["properties"] = inr.InboundNatRulePropertiesFormat 3167 } 3168 if inr.Name != nil { 3169 objectMap["name"] = inr.Name 3170 } 3171 if inr.Etag != nil { 3172 objectMap["etag"] = inr.Etag 3173 } 3174 if inr.ID != nil { 3175 objectMap["id"] = inr.ID 3176 } 3177 return json.Marshal(objectMap) 3178} 3179 3180// UnmarshalJSON is the custom unmarshaler for InboundNatRule struct. 3181func (inr *InboundNatRule) UnmarshalJSON(body []byte) error { 3182 var m map[string]*json.RawMessage 3183 err := json.Unmarshal(body, &m) 3184 if err != nil { 3185 return err 3186 } 3187 for k, v := range m { 3188 switch k { 3189 case "properties": 3190 if v != nil { 3191 var inboundNatRulePropertiesFormat InboundNatRulePropertiesFormat 3192 err = json.Unmarshal(*v, &inboundNatRulePropertiesFormat) 3193 if err != nil { 3194 return err 3195 } 3196 inr.InboundNatRulePropertiesFormat = &inboundNatRulePropertiesFormat 3197 } 3198 case "name": 3199 if v != nil { 3200 var name string 3201 err = json.Unmarshal(*v, &name) 3202 if err != nil { 3203 return err 3204 } 3205 inr.Name = &name 3206 } 3207 case "etag": 3208 if v != nil { 3209 var etag string 3210 err = json.Unmarshal(*v, &etag) 3211 if err != nil { 3212 return err 3213 } 3214 inr.Etag = &etag 3215 } 3216 case "id": 3217 if v != nil { 3218 var ID string 3219 err = json.Unmarshal(*v, &ID) 3220 if err != nil { 3221 return err 3222 } 3223 inr.ID = &ID 3224 } 3225 } 3226 } 3227 3228 return nil 3229} 3230 3231// InboundNatRulePropertiesFormat properties of Inbound NAT rule 3232type InboundNatRulePropertiesFormat struct { 3233 // FrontendIPConfiguration - Gets or sets a reference to frontend IP Addresses 3234 FrontendIPConfiguration *SubResource `json:"frontendIPConfiguration,omitempty"` 3235 // BackendIPConfiguration - Gets or sets a reference to a private ip address defined on a NetworkInterface of a VM. Traffic sent to frontendPort of each of the frontendIPConfigurations is forwarded to the backed IP 3236 BackendIPConfiguration *InterfaceIPConfiguration `json:"backendIPConfiguration,omitempty"` 3237 // Protocol - Gets or sets the transport protocol for the external endpoint. Possible values are Udp or Tcp. Possible values include: 'TransportProtocolUDP', 'TransportProtocolTCP' 3238 Protocol TransportProtocol `json:"protocol,omitempty"` 3239 // FrontendPort - Gets or sets the port for the external endpoint. You can specify any port number you choose, but the port numbers specified for each role in the service must be unique. Possible values range between 1 and 65535, inclusive 3240 FrontendPort *int32 `json:"frontendPort,omitempty"` 3241 // BackendPort - Gets or sets a port used for internal connections on the endpoint. The localPort attribute maps the eternal port of the endpoint to an internal port on a role. This is useful in scenarios where a role must communicate to an internal component on a port that is different from the one that is exposed externally. If not specified, the value of localPort is the same as the port attribute. Set the value of localPort to '*' to automatically assign an unallocated port that is discoverable using the runtime API 3242 BackendPort *int32 `json:"backendPort,omitempty"` 3243 // IdleTimeoutInMinutes - Gets or sets the timeout for the Tcp idle connection. The value can be set between 4 and 30 minutes. The default value is 4 minutes. This element is only used when the protocol is set to Tcp 3244 IdleTimeoutInMinutes *int32 `json:"idleTimeoutInMinutes,omitempty"` 3245 // EnableFloatingIP - Configures a virtual machine's endpoint for the floating IP capability required to configure a SQL AlwaysOn availability Group. This setting is required when using the SQL Always ON availability Groups in SQL server. This setting can't be changed after you create the endpoint 3246 EnableFloatingIP *bool `json:"enableFloatingIP,omitempty"` 3247 // ProvisioningState - Gets or sets Provisioning state of the PublicIP resource Updating/Deleting/Failed 3248 ProvisioningState *string `json:"provisioningState,omitempty"` 3249} 3250 3251// Interface a NetworkInterface in a resource group 3252type Interface struct { 3253 autorest.Response `json:"-"` 3254 *InterfacePropertiesFormat `json:"properties,omitempty"` 3255 // Etag - Gets a unique read-only string that changes whenever the resource is updated 3256 Etag *string `json:"etag,omitempty"` 3257 // ID - Resource Id 3258 ID *string `json:"id,omitempty"` 3259 // Name - READ-ONLY; Resource name 3260 Name *string `json:"name,omitempty"` 3261 // Type - READ-ONLY; Resource type 3262 Type *string `json:"type,omitempty"` 3263 // Location - Resource location 3264 Location *string `json:"location,omitempty"` 3265 // Tags - Resource tags 3266 Tags map[string]*string `json:"tags"` 3267} 3268 3269// MarshalJSON is the custom marshaler for Interface. 3270func (i Interface) MarshalJSON() ([]byte, error) { 3271 objectMap := make(map[string]interface{}) 3272 if i.InterfacePropertiesFormat != nil { 3273 objectMap["properties"] = i.InterfacePropertiesFormat 3274 } 3275 if i.Etag != nil { 3276 objectMap["etag"] = i.Etag 3277 } 3278 if i.ID != nil { 3279 objectMap["id"] = i.ID 3280 } 3281 if i.Location != nil { 3282 objectMap["location"] = i.Location 3283 } 3284 if i.Tags != nil { 3285 objectMap["tags"] = i.Tags 3286 } 3287 return json.Marshal(objectMap) 3288} 3289 3290// UnmarshalJSON is the custom unmarshaler for Interface struct. 3291func (i *Interface) UnmarshalJSON(body []byte) error { 3292 var m map[string]*json.RawMessage 3293 err := json.Unmarshal(body, &m) 3294 if err != nil { 3295 return err 3296 } 3297 for k, v := range m { 3298 switch k { 3299 case "properties": 3300 if v != nil { 3301 var interfacePropertiesFormat InterfacePropertiesFormat 3302 err = json.Unmarshal(*v, &interfacePropertiesFormat) 3303 if err != nil { 3304 return err 3305 } 3306 i.InterfacePropertiesFormat = &interfacePropertiesFormat 3307 } 3308 case "etag": 3309 if v != nil { 3310 var etag string 3311 err = json.Unmarshal(*v, &etag) 3312 if err != nil { 3313 return err 3314 } 3315 i.Etag = &etag 3316 } 3317 case "id": 3318 if v != nil { 3319 var ID string 3320 err = json.Unmarshal(*v, &ID) 3321 if err != nil { 3322 return err 3323 } 3324 i.ID = &ID 3325 } 3326 case "name": 3327 if v != nil { 3328 var name string 3329 err = json.Unmarshal(*v, &name) 3330 if err != nil { 3331 return err 3332 } 3333 i.Name = &name 3334 } 3335 case "type": 3336 if v != nil { 3337 var typeVar string 3338 err = json.Unmarshal(*v, &typeVar) 3339 if err != nil { 3340 return err 3341 } 3342 i.Type = &typeVar 3343 } 3344 case "location": 3345 if v != nil { 3346 var location string 3347 err = json.Unmarshal(*v, &location) 3348 if err != nil { 3349 return err 3350 } 3351 i.Location = &location 3352 } 3353 case "tags": 3354 if v != nil { 3355 var tags map[string]*string 3356 err = json.Unmarshal(*v, &tags) 3357 if err != nil { 3358 return err 3359 } 3360 i.Tags = tags 3361 } 3362 } 3363 } 3364 3365 return nil 3366} 3367 3368// InterfaceDNSSettings dns Settings of a network interface 3369type InterfaceDNSSettings struct { 3370 // DNSServers - Gets or sets list of DNS servers IP addresses 3371 DNSServers *[]string `json:"dnsServers,omitempty"` 3372 // AppliedDNSServers - Gets or sets list of Applied DNS servers IP addresses 3373 AppliedDNSServers *[]string `json:"appliedDnsServers,omitempty"` 3374 // InternalDNSNameLabel - Gets or sets the Internal DNS name 3375 InternalDNSNameLabel *string `json:"internalDnsNameLabel,omitempty"` 3376 // InternalFqdn - Gets or sets the internal FQDN. 3377 InternalFqdn *string `json:"internalFqdn,omitempty"` 3378 // InternalDomainNameSuffix - Gets or sets internal domain name suffix of the NIC. 3379 InternalDomainNameSuffix *string `json:"internalDomainNameSuffix,omitempty"` 3380} 3381 3382// InterfaceIPConfiguration iPConfiguration in a NetworkInterface 3383type InterfaceIPConfiguration struct { 3384 *InterfaceIPConfigurationPropertiesFormat `json:"properties,omitempty"` 3385 // Name - Gets name of the resource that is unique within a resource group. This name can be used to access the resource 3386 Name *string `json:"name,omitempty"` 3387 // Etag - A unique read-only string that changes whenever the resource is updated 3388 Etag *string `json:"etag,omitempty"` 3389 // ID - Resource Id 3390 ID *string `json:"id,omitempty"` 3391} 3392 3393// MarshalJSON is the custom marshaler for InterfaceIPConfiguration. 3394func (iic InterfaceIPConfiguration) MarshalJSON() ([]byte, error) { 3395 objectMap := make(map[string]interface{}) 3396 if iic.InterfaceIPConfigurationPropertiesFormat != nil { 3397 objectMap["properties"] = iic.InterfaceIPConfigurationPropertiesFormat 3398 } 3399 if iic.Name != nil { 3400 objectMap["name"] = iic.Name 3401 } 3402 if iic.Etag != nil { 3403 objectMap["etag"] = iic.Etag 3404 } 3405 if iic.ID != nil { 3406 objectMap["id"] = iic.ID 3407 } 3408 return json.Marshal(objectMap) 3409} 3410 3411// UnmarshalJSON is the custom unmarshaler for InterfaceIPConfiguration struct. 3412func (iic *InterfaceIPConfiguration) UnmarshalJSON(body []byte) error { 3413 var m map[string]*json.RawMessage 3414 err := json.Unmarshal(body, &m) 3415 if err != nil { 3416 return err 3417 } 3418 for k, v := range m { 3419 switch k { 3420 case "properties": 3421 if v != nil { 3422 var interfaceIPConfigurationPropertiesFormat InterfaceIPConfigurationPropertiesFormat 3423 err = json.Unmarshal(*v, &interfaceIPConfigurationPropertiesFormat) 3424 if err != nil { 3425 return err 3426 } 3427 iic.InterfaceIPConfigurationPropertiesFormat = &interfaceIPConfigurationPropertiesFormat 3428 } 3429 case "name": 3430 if v != nil { 3431 var name string 3432 err = json.Unmarshal(*v, &name) 3433 if err != nil { 3434 return err 3435 } 3436 iic.Name = &name 3437 } 3438 case "etag": 3439 if v != nil { 3440 var etag string 3441 err = json.Unmarshal(*v, &etag) 3442 if err != nil { 3443 return err 3444 } 3445 iic.Etag = &etag 3446 } 3447 case "id": 3448 if v != nil { 3449 var ID string 3450 err = json.Unmarshal(*v, &ID) 3451 if err != nil { 3452 return err 3453 } 3454 iic.ID = &ID 3455 } 3456 } 3457 } 3458 3459 return nil 3460} 3461 3462// InterfaceIPConfigurationPropertiesFormat properties of IPConfiguration 3463type InterfaceIPConfigurationPropertiesFormat struct { 3464 // ApplicationGatewayBackendAddressPools - Gets or sets the reference of ApplicationGatewayBackendAddressPool resource 3465 ApplicationGatewayBackendAddressPools *[]ApplicationGatewayBackendAddressPool `json:"applicationGatewayBackendAddressPools,omitempty"` 3466 // LoadBalancerBackendAddressPools - Gets or sets the reference of LoadBalancerBackendAddressPool resource 3467 LoadBalancerBackendAddressPools *[]BackendAddressPool `json:"loadBalancerBackendAddressPools,omitempty"` 3468 // LoadBalancerInboundNatRules - Gets or sets list of references of LoadBalancerInboundNatRules 3469 LoadBalancerInboundNatRules *[]InboundNatRule `json:"loadBalancerInboundNatRules,omitempty"` 3470 PrivateIPAddress *string `json:"privateIPAddress,omitempty"` 3471 // PrivateIPAllocationMethod - Gets or sets PrivateIP allocation method (Static/Dynamic). Possible values include: 'Static', 'Dynamic' 3472 PrivateIPAllocationMethod IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"` 3473 // PrivateIPAddressVersion - Gets or sets PrivateIP address version (IPv4/IPv6). Possible values include: 'IPv4', 'IPv6' 3474 PrivateIPAddressVersion IPVersion `json:"privateIPAddressVersion,omitempty"` 3475 Subnet *Subnet `json:"subnet,omitempty"` 3476 // Primary - Gets whether this is a primary customer address on the NIC 3477 Primary *bool `json:"primary,omitempty"` 3478 PublicIPAddress *PublicIPAddress `json:"publicIPAddress,omitempty"` 3479 ProvisioningState *string `json:"provisioningState,omitempty"` 3480} 3481 3482// InterfaceListResult response for ListNetworkInterface Api service call 3483type InterfaceListResult struct { 3484 autorest.Response `json:"-"` 3485 // Value - Gets or sets list of NetworkInterfaces in a resource group 3486 Value *[]Interface `json:"value,omitempty"` 3487 // NextLink - Gets the URL to get the next set of results. 3488 NextLink *string `json:"nextLink,omitempty"` 3489} 3490 3491// InterfaceListResultIterator provides access to a complete listing of Interface values. 3492type InterfaceListResultIterator struct { 3493 i int 3494 page InterfaceListResultPage 3495} 3496 3497// NextWithContext advances to the next value. If there was an error making 3498// the request the iterator does not advance and the error is returned. 3499func (iter *InterfaceListResultIterator) NextWithContext(ctx context.Context) (err error) { 3500 if tracing.IsEnabled() { 3501 ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceListResultIterator.NextWithContext") 3502 defer func() { 3503 sc := -1 3504 if iter.Response().Response.Response != nil { 3505 sc = iter.Response().Response.Response.StatusCode 3506 } 3507 tracing.EndSpan(ctx, sc, err) 3508 }() 3509 } 3510 iter.i++ 3511 if iter.i < len(iter.page.Values()) { 3512 return nil 3513 } 3514 err = iter.page.NextWithContext(ctx) 3515 if err != nil { 3516 iter.i-- 3517 return err 3518 } 3519 iter.i = 0 3520 return nil 3521} 3522 3523// Next advances to the next value. If there was an error making 3524// the request the iterator does not advance and the error is returned. 3525// Deprecated: Use NextWithContext() instead. 3526func (iter *InterfaceListResultIterator) Next() error { 3527 return iter.NextWithContext(context.Background()) 3528} 3529 3530// NotDone returns true if the enumeration should be started or is not yet complete. 3531func (iter InterfaceListResultIterator) NotDone() bool { 3532 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 3533} 3534 3535// Response returns the raw server response from the last page request. 3536func (iter InterfaceListResultIterator) Response() InterfaceListResult { 3537 return iter.page.Response() 3538} 3539 3540// Value returns the current value or a zero-initialized value if the 3541// iterator has advanced beyond the end of the collection. 3542func (iter InterfaceListResultIterator) Value() Interface { 3543 if !iter.page.NotDone() { 3544 return Interface{} 3545 } 3546 return iter.page.Values()[iter.i] 3547} 3548 3549// Creates a new instance of the InterfaceListResultIterator type. 3550func NewInterfaceListResultIterator(page InterfaceListResultPage) InterfaceListResultIterator { 3551 return InterfaceListResultIterator{page: page} 3552} 3553 3554// IsEmpty returns true if the ListResult contains no values. 3555func (ilr InterfaceListResult) IsEmpty() bool { 3556 return ilr.Value == nil || len(*ilr.Value) == 0 3557} 3558 3559// hasNextLink returns true if the NextLink is not empty. 3560func (ilr InterfaceListResult) hasNextLink() bool { 3561 return ilr.NextLink != nil && len(*ilr.NextLink) != 0 3562} 3563 3564// interfaceListResultPreparer prepares a request to retrieve the next set of results. 3565// It returns nil if no more results exist. 3566func (ilr InterfaceListResult) interfaceListResultPreparer(ctx context.Context) (*http.Request, error) { 3567 if !ilr.hasNextLink() { 3568 return nil, nil 3569 } 3570 return autorest.Prepare((&http.Request{}).WithContext(ctx), 3571 autorest.AsJSON(), 3572 autorest.AsGet(), 3573 autorest.WithBaseURL(to.String(ilr.NextLink))) 3574} 3575 3576// InterfaceListResultPage contains a page of Interface values. 3577type InterfaceListResultPage struct { 3578 fn func(context.Context, InterfaceListResult) (InterfaceListResult, error) 3579 ilr InterfaceListResult 3580} 3581 3582// NextWithContext advances to the next page of values. If there was an error making 3583// the request the page does not advance and the error is returned. 3584func (page *InterfaceListResultPage) NextWithContext(ctx context.Context) (err error) { 3585 if tracing.IsEnabled() { 3586 ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceListResultPage.NextWithContext") 3587 defer func() { 3588 sc := -1 3589 if page.Response().Response.Response != nil { 3590 sc = page.Response().Response.Response.StatusCode 3591 } 3592 tracing.EndSpan(ctx, sc, err) 3593 }() 3594 } 3595 for { 3596 next, err := page.fn(ctx, page.ilr) 3597 if err != nil { 3598 return err 3599 } 3600 page.ilr = next 3601 if !next.hasNextLink() || !next.IsEmpty() { 3602 break 3603 } 3604 } 3605 return nil 3606} 3607 3608// Next advances to the next page of values. If there was an error making 3609// the request the page does not advance and the error is returned. 3610// Deprecated: Use NextWithContext() instead. 3611func (page *InterfaceListResultPage) Next() error { 3612 return page.NextWithContext(context.Background()) 3613} 3614 3615// NotDone returns true if the page enumeration should be started or is not yet complete. 3616func (page InterfaceListResultPage) NotDone() bool { 3617 return !page.ilr.IsEmpty() 3618} 3619 3620// Response returns the raw server response from the last page request. 3621func (page InterfaceListResultPage) Response() InterfaceListResult { 3622 return page.ilr 3623} 3624 3625// Values returns the slice of values for the current page or nil if there are no values. 3626func (page InterfaceListResultPage) Values() []Interface { 3627 if page.ilr.IsEmpty() { 3628 return nil 3629 } 3630 return *page.ilr.Value 3631} 3632 3633// Creates a new instance of the InterfaceListResultPage type. 3634func NewInterfaceListResultPage(cur InterfaceListResult, getNextPage func(context.Context, InterfaceListResult) (InterfaceListResult, error)) InterfaceListResultPage { 3635 return InterfaceListResultPage{ 3636 fn: getNextPage, 3637 ilr: cur, 3638 } 3639} 3640 3641// InterfacePropertiesFormat networkInterface properties. 3642type InterfacePropertiesFormat struct { 3643 // VirtualMachine - Gets or sets the reference of a VirtualMachine 3644 VirtualMachine *SubResource `json:"virtualMachine,omitempty"` 3645 // NetworkSecurityGroup - Gets or sets the reference of the NetworkSecurityGroup resource 3646 NetworkSecurityGroup *SecurityGroup `json:"networkSecurityGroup,omitempty"` 3647 // IPConfigurations - Gets or sets list of IPConfigurations of the NetworkInterface 3648 IPConfigurations *[]InterfaceIPConfiguration `json:"ipConfigurations,omitempty"` 3649 // DNSSettings - Gets or sets DNS Settings in NetworkInterface 3650 DNSSettings *InterfaceDNSSettings `json:"dnsSettings,omitempty"` 3651 // MacAddress - Gets the MAC Address of the network interface 3652 MacAddress *string `json:"macAddress,omitempty"` 3653 // Primary - Gets whether this is a primary NIC on a virtual machine 3654 Primary *bool `json:"primary,omitempty"` 3655 // EnableIPForwarding - Gets or sets whether IPForwarding is enabled on the NIC 3656 EnableIPForwarding *bool `json:"enableIPForwarding,omitempty"` 3657 // ResourceGUID - Gets or sets resource GUID property of the network interface resource 3658 ResourceGUID *string `json:"resourceGuid,omitempty"` 3659 // ProvisioningState - Gets or sets Provisioning state of the PublicIP resource Updating/Deleting/Failed 3660 ProvisioningState *string `json:"provisioningState,omitempty"` 3661} 3662 3663// InterfacesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a 3664// long-running operation. 3665type InterfacesCreateOrUpdateFuture struct { 3666 azure.FutureAPI 3667 // Result returns the result of the asynchronous operation. 3668 // If the operation has not completed it will return an error. 3669 Result func(InterfacesClient) (Interface, error) 3670} 3671 3672// InterfacesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running 3673// operation. 3674type InterfacesDeleteFuture struct { 3675 azure.FutureAPI 3676 // Result returns the result of the asynchronous operation. 3677 // If the operation has not completed it will return an error. 3678 Result func(InterfacesClient) (autorest.Response, error) 3679} 3680 3681// IPConfiguration iPConfiguration 3682type IPConfiguration struct { 3683 *IPConfigurationPropertiesFormat `json:"properties,omitempty"` 3684 // Name - Gets name of the resource that is unique within a resource group. This name can be used to access the resource 3685 Name *string `json:"name,omitempty"` 3686 // Etag - A unique read-only string that changes whenever the resource is updated 3687 Etag *string `json:"etag,omitempty"` 3688 // ID - Resource Id 3689 ID *string `json:"id,omitempty"` 3690} 3691 3692// MarshalJSON is the custom marshaler for IPConfiguration. 3693func (ic IPConfiguration) MarshalJSON() ([]byte, error) { 3694 objectMap := make(map[string]interface{}) 3695 if ic.IPConfigurationPropertiesFormat != nil { 3696 objectMap["properties"] = ic.IPConfigurationPropertiesFormat 3697 } 3698 if ic.Name != nil { 3699 objectMap["name"] = ic.Name 3700 } 3701 if ic.Etag != nil { 3702 objectMap["etag"] = ic.Etag 3703 } 3704 if ic.ID != nil { 3705 objectMap["id"] = ic.ID 3706 } 3707 return json.Marshal(objectMap) 3708} 3709 3710// UnmarshalJSON is the custom unmarshaler for IPConfiguration struct. 3711func (ic *IPConfiguration) UnmarshalJSON(body []byte) error { 3712 var m map[string]*json.RawMessage 3713 err := json.Unmarshal(body, &m) 3714 if err != nil { 3715 return err 3716 } 3717 for k, v := range m { 3718 switch k { 3719 case "properties": 3720 if v != nil { 3721 var IPConfigurationPropertiesFormat IPConfigurationPropertiesFormat 3722 err = json.Unmarshal(*v, &IPConfigurationPropertiesFormat) 3723 if err != nil { 3724 return err 3725 } 3726 ic.IPConfigurationPropertiesFormat = &IPConfigurationPropertiesFormat 3727 } 3728 case "name": 3729 if v != nil { 3730 var name string 3731 err = json.Unmarshal(*v, &name) 3732 if err != nil { 3733 return err 3734 } 3735 ic.Name = &name 3736 } 3737 case "etag": 3738 if v != nil { 3739 var etag string 3740 err = json.Unmarshal(*v, &etag) 3741 if err != nil { 3742 return err 3743 } 3744 ic.Etag = &etag 3745 } 3746 case "id": 3747 if v != nil { 3748 var ID string 3749 err = json.Unmarshal(*v, &ID) 3750 if err != nil { 3751 return err 3752 } 3753 ic.ID = &ID 3754 } 3755 } 3756 } 3757 3758 return nil 3759} 3760 3761// IPConfigurationPropertiesFormat properties of IPConfiguration 3762type IPConfigurationPropertiesFormat struct { 3763 // PrivateIPAddress - Gets or sets the privateIPAddress of the IP Configuration 3764 PrivateIPAddress *string `json:"privateIPAddress,omitempty"` 3765 // PrivateIPAllocationMethod - Gets or sets PrivateIP allocation method (Static/Dynamic). Possible values include: 'Static', 'Dynamic' 3766 PrivateIPAllocationMethod IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"` 3767 // Subnet - Gets or sets the reference of the subnet resource 3768 Subnet *Subnet `json:"subnet,omitempty"` 3769 // PublicIPAddress - Gets or sets the reference of the PublicIP resource 3770 PublicIPAddress *PublicIPAddress `json:"publicIPAddress,omitempty"` 3771 // ProvisioningState - Gets or sets Provisioning state of the PublicIP resource Updating/Deleting/Failed 3772 ProvisioningState *string `json:"provisioningState,omitempty"` 3773} 3774 3775// LoadBalancer loadBalancer resource 3776type LoadBalancer struct { 3777 autorest.Response `json:"-"` 3778 *LoadBalancerPropertiesFormat `json:"properties,omitempty"` 3779 // Etag - Gets a unique read-only string that changes whenever the resource is updated 3780 Etag *string `json:"etag,omitempty"` 3781 // ID - Resource Id 3782 ID *string `json:"id,omitempty"` 3783 // Name - READ-ONLY; Resource name 3784 Name *string `json:"name,omitempty"` 3785 // Type - READ-ONLY; Resource type 3786 Type *string `json:"type,omitempty"` 3787 // Location - Resource location 3788 Location *string `json:"location,omitempty"` 3789 // Tags - Resource tags 3790 Tags map[string]*string `json:"tags"` 3791} 3792 3793// MarshalJSON is the custom marshaler for LoadBalancer. 3794func (lb LoadBalancer) MarshalJSON() ([]byte, error) { 3795 objectMap := make(map[string]interface{}) 3796 if lb.LoadBalancerPropertiesFormat != nil { 3797 objectMap["properties"] = lb.LoadBalancerPropertiesFormat 3798 } 3799 if lb.Etag != nil { 3800 objectMap["etag"] = lb.Etag 3801 } 3802 if lb.ID != nil { 3803 objectMap["id"] = lb.ID 3804 } 3805 if lb.Location != nil { 3806 objectMap["location"] = lb.Location 3807 } 3808 if lb.Tags != nil { 3809 objectMap["tags"] = lb.Tags 3810 } 3811 return json.Marshal(objectMap) 3812} 3813 3814// UnmarshalJSON is the custom unmarshaler for LoadBalancer struct. 3815func (lb *LoadBalancer) UnmarshalJSON(body []byte) error { 3816 var m map[string]*json.RawMessage 3817 err := json.Unmarshal(body, &m) 3818 if err != nil { 3819 return err 3820 } 3821 for k, v := range m { 3822 switch k { 3823 case "properties": 3824 if v != nil { 3825 var loadBalancerPropertiesFormat LoadBalancerPropertiesFormat 3826 err = json.Unmarshal(*v, &loadBalancerPropertiesFormat) 3827 if err != nil { 3828 return err 3829 } 3830 lb.LoadBalancerPropertiesFormat = &loadBalancerPropertiesFormat 3831 } 3832 case "etag": 3833 if v != nil { 3834 var etag string 3835 err = json.Unmarshal(*v, &etag) 3836 if err != nil { 3837 return err 3838 } 3839 lb.Etag = &etag 3840 } 3841 case "id": 3842 if v != nil { 3843 var ID string 3844 err = json.Unmarshal(*v, &ID) 3845 if err != nil { 3846 return err 3847 } 3848 lb.ID = &ID 3849 } 3850 case "name": 3851 if v != nil { 3852 var name string 3853 err = json.Unmarshal(*v, &name) 3854 if err != nil { 3855 return err 3856 } 3857 lb.Name = &name 3858 } 3859 case "type": 3860 if v != nil { 3861 var typeVar string 3862 err = json.Unmarshal(*v, &typeVar) 3863 if err != nil { 3864 return err 3865 } 3866 lb.Type = &typeVar 3867 } 3868 case "location": 3869 if v != nil { 3870 var location string 3871 err = json.Unmarshal(*v, &location) 3872 if err != nil { 3873 return err 3874 } 3875 lb.Location = &location 3876 } 3877 case "tags": 3878 if v != nil { 3879 var tags map[string]*string 3880 err = json.Unmarshal(*v, &tags) 3881 if err != nil { 3882 return err 3883 } 3884 lb.Tags = tags 3885 } 3886 } 3887 } 3888 3889 return nil 3890} 3891 3892// LoadBalancerListResult response for ListLoadBalancers Api service call 3893type LoadBalancerListResult struct { 3894 autorest.Response `json:"-"` 3895 // Value - Gets a list of LoadBalancers in a resource group 3896 Value *[]LoadBalancer `json:"value,omitempty"` 3897 // NextLink - Gets the URL to get the next set of results. 3898 NextLink *string `json:"nextLink,omitempty"` 3899} 3900 3901// LoadBalancerListResultIterator provides access to a complete listing of LoadBalancer values. 3902type LoadBalancerListResultIterator struct { 3903 i int 3904 page LoadBalancerListResultPage 3905} 3906 3907// NextWithContext advances to the next value. If there was an error making 3908// the request the iterator does not advance and the error is returned. 3909func (iter *LoadBalancerListResultIterator) NextWithContext(ctx context.Context) (err error) { 3910 if tracing.IsEnabled() { 3911 ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerListResultIterator.NextWithContext") 3912 defer func() { 3913 sc := -1 3914 if iter.Response().Response.Response != nil { 3915 sc = iter.Response().Response.Response.StatusCode 3916 } 3917 tracing.EndSpan(ctx, sc, err) 3918 }() 3919 } 3920 iter.i++ 3921 if iter.i < len(iter.page.Values()) { 3922 return nil 3923 } 3924 err = iter.page.NextWithContext(ctx) 3925 if err != nil { 3926 iter.i-- 3927 return err 3928 } 3929 iter.i = 0 3930 return nil 3931} 3932 3933// Next advances to the next value. If there was an error making 3934// the request the iterator does not advance and the error is returned. 3935// Deprecated: Use NextWithContext() instead. 3936func (iter *LoadBalancerListResultIterator) Next() error { 3937 return iter.NextWithContext(context.Background()) 3938} 3939 3940// NotDone returns true if the enumeration should be started or is not yet complete. 3941func (iter LoadBalancerListResultIterator) NotDone() bool { 3942 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 3943} 3944 3945// Response returns the raw server response from the last page request. 3946func (iter LoadBalancerListResultIterator) Response() LoadBalancerListResult { 3947 return iter.page.Response() 3948} 3949 3950// Value returns the current value or a zero-initialized value if the 3951// iterator has advanced beyond the end of the collection. 3952func (iter LoadBalancerListResultIterator) Value() LoadBalancer { 3953 if !iter.page.NotDone() { 3954 return LoadBalancer{} 3955 } 3956 return iter.page.Values()[iter.i] 3957} 3958 3959// Creates a new instance of the LoadBalancerListResultIterator type. 3960func NewLoadBalancerListResultIterator(page LoadBalancerListResultPage) LoadBalancerListResultIterator { 3961 return LoadBalancerListResultIterator{page: page} 3962} 3963 3964// IsEmpty returns true if the ListResult contains no values. 3965func (lblr LoadBalancerListResult) IsEmpty() bool { 3966 return lblr.Value == nil || len(*lblr.Value) == 0 3967} 3968 3969// hasNextLink returns true if the NextLink is not empty. 3970func (lblr LoadBalancerListResult) hasNextLink() bool { 3971 return lblr.NextLink != nil && len(*lblr.NextLink) != 0 3972} 3973 3974// loadBalancerListResultPreparer prepares a request to retrieve the next set of results. 3975// It returns nil if no more results exist. 3976func (lblr LoadBalancerListResult) loadBalancerListResultPreparer(ctx context.Context) (*http.Request, error) { 3977 if !lblr.hasNextLink() { 3978 return nil, nil 3979 } 3980 return autorest.Prepare((&http.Request{}).WithContext(ctx), 3981 autorest.AsJSON(), 3982 autorest.AsGet(), 3983 autorest.WithBaseURL(to.String(lblr.NextLink))) 3984} 3985 3986// LoadBalancerListResultPage contains a page of LoadBalancer values. 3987type LoadBalancerListResultPage struct { 3988 fn func(context.Context, LoadBalancerListResult) (LoadBalancerListResult, error) 3989 lblr LoadBalancerListResult 3990} 3991 3992// NextWithContext advances to the next page of values. If there was an error making 3993// the request the page does not advance and the error is returned. 3994func (page *LoadBalancerListResultPage) NextWithContext(ctx context.Context) (err error) { 3995 if tracing.IsEnabled() { 3996 ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerListResultPage.NextWithContext") 3997 defer func() { 3998 sc := -1 3999 if page.Response().Response.Response != nil { 4000 sc = page.Response().Response.Response.StatusCode 4001 } 4002 tracing.EndSpan(ctx, sc, err) 4003 }() 4004 } 4005 for { 4006 next, err := page.fn(ctx, page.lblr) 4007 if err != nil { 4008 return err 4009 } 4010 page.lblr = next 4011 if !next.hasNextLink() || !next.IsEmpty() { 4012 break 4013 } 4014 } 4015 return nil 4016} 4017 4018// Next advances to the next page of values. If there was an error making 4019// the request the page does not advance and the error is returned. 4020// Deprecated: Use NextWithContext() instead. 4021func (page *LoadBalancerListResultPage) Next() error { 4022 return page.NextWithContext(context.Background()) 4023} 4024 4025// NotDone returns true if the page enumeration should be started or is not yet complete. 4026func (page LoadBalancerListResultPage) NotDone() bool { 4027 return !page.lblr.IsEmpty() 4028} 4029 4030// Response returns the raw server response from the last page request. 4031func (page LoadBalancerListResultPage) Response() LoadBalancerListResult { 4032 return page.lblr 4033} 4034 4035// Values returns the slice of values for the current page or nil if there are no values. 4036func (page LoadBalancerListResultPage) Values() []LoadBalancer { 4037 if page.lblr.IsEmpty() { 4038 return nil 4039 } 4040 return *page.lblr.Value 4041} 4042 4043// Creates a new instance of the LoadBalancerListResultPage type. 4044func NewLoadBalancerListResultPage(cur LoadBalancerListResult, getNextPage func(context.Context, LoadBalancerListResult) (LoadBalancerListResult, error)) LoadBalancerListResultPage { 4045 return LoadBalancerListResultPage{ 4046 fn: getNextPage, 4047 lblr: cur, 4048 } 4049} 4050 4051// LoadBalancerPropertiesFormat properties of Load Balancer 4052type LoadBalancerPropertiesFormat struct { 4053 // FrontendIPConfigurations - Gets or sets frontend IP addresses of the load balancer 4054 FrontendIPConfigurations *[]FrontendIPConfiguration `json:"frontendIPConfigurations,omitempty"` 4055 // BackendAddressPools - Gets or sets Pools of backend IP addresses 4056 BackendAddressPools *[]BackendAddressPool `json:"backendAddressPools,omitempty"` 4057 // LoadBalancingRules - Gets or sets load balancing rules 4058 LoadBalancingRules *[]LoadBalancingRule `json:"loadBalancingRules,omitempty"` 4059 // Probes - Gets or sets list of Load balancer probes 4060 Probes *[]Probe `json:"probes,omitempty"` 4061 // InboundNatRules - Gets or sets list of inbound rules 4062 InboundNatRules *[]InboundNatRule `json:"inboundNatRules,omitempty"` 4063 // InboundNatPools - Gets or sets inbound NAT pools 4064 InboundNatPools *[]InboundNatPool `json:"inboundNatPools,omitempty"` 4065 // OutboundNatRules - Gets or sets outbound NAT rules 4066 OutboundNatRules *[]OutboundNatRule `json:"outboundNatRules,omitempty"` 4067 // ResourceGUID - Gets or sets resource GUID property of the Load balancer resource 4068 ResourceGUID *string `json:"resourceGuid,omitempty"` 4069 // ProvisioningState - Gets or sets Provisioning state of the PublicIP resource Updating/Deleting/Failed 4070 ProvisioningState *string `json:"provisioningState,omitempty"` 4071} 4072 4073// LoadBalancersCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a 4074// long-running operation. 4075type LoadBalancersCreateOrUpdateFuture struct { 4076 azure.FutureAPI 4077 // Result returns the result of the asynchronous operation. 4078 // If the operation has not completed it will return an error. 4079 Result func(LoadBalancersClient) (LoadBalancer, error) 4080} 4081 4082// LoadBalancersDeleteFuture an abstraction for monitoring and retrieving the results of a long-running 4083// operation. 4084type LoadBalancersDeleteFuture struct { 4085 azure.FutureAPI 4086 // Result returns the result of the asynchronous operation. 4087 // If the operation has not completed it will return an error. 4088 Result func(LoadBalancersClient) (autorest.Response, error) 4089} 4090 4091// LoadBalancingRule rules of the load balancer 4092type LoadBalancingRule struct { 4093 *LoadBalancingRulePropertiesFormat `json:"properties,omitempty"` 4094 // Name - Gets name of the resource that is unique within a resource group. This name can be used to access the resource 4095 Name *string `json:"name,omitempty"` 4096 // Etag - A unique read-only string that changes whenever the resource is updated 4097 Etag *string `json:"etag,omitempty"` 4098 // ID - Resource Id 4099 ID *string `json:"id,omitempty"` 4100} 4101 4102// MarshalJSON is the custom marshaler for LoadBalancingRule. 4103func (lbr LoadBalancingRule) MarshalJSON() ([]byte, error) { 4104 objectMap := make(map[string]interface{}) 4105 if lbr.LoadBalancingRulePropertiesFormat != nil { 4106 objectMap["properties"] = lbr.LoadBalancingRulePropertiesFormat 4107 } 4108 if lbr.Name != nil { 4109 objectMap["name"] = lbr.Name 4110 } 4111 if lbr.Etag != nil { 4112 objectMap["etag"] = lbr.Etag 4113 } 4114 if lbr.ID != nil { 4115 objectMap["id"] = lbr.ID 4116 } 4117 return json.Marshal(objectMap) 4118} 4119 4120// UnmarshalJSON is the custom unmarshaler for LoadBalancingRule struct. 4121func (lbr *LoadBalancingRule) UnmarshalJSON(body []byte) error { 4122 var m map[string]*json.RawMessage 4123 err := json.Unmarshal(body, &m) 4124 if err != nil { 4125 return err 4126 } 4127 for k, v := range m { 4128 switch k { 4129 case "properties": 4130 if v != nil { 4131 var loadBalancingRulePropertiesFormat LoadBalancingRulePropertiesFormat 4132 err = json.Unmarshal(*v, &loadBalancingRulePropertiesFormat) 4133 if err != nil { 4134 return err 4135 } 4136 lbr.LoadBalancingRulePropertiesFormat = &loadBalancingRulePropertiesFormat 4137 } 4138 case "name": 4139 if v != nil { 4140 var name string 4141 err = json.Unmarshal(*v, &name) 4142 if err != nil { 4143 return err 4144 } 4145 lbr.Name = &name 4146 } 4147 case "etag": 4148 if v != nil { 4149 var etag string 4150 err = json.Unmarshal(*v, &etag) 4151 if err != nil { 4152 return err 4153 } 4154 lbr.Etag = &etag 4155 } 4156 case "id": 4157 if v != nil { 4158 var ID string 4159 err = json.Unmarshal(*v, &ID) 4160 if err != nil { 4161 return err 4162 } 4163 lbr.ID = &ID 4164 } 4165 } 4166 } 4167 4168 return nil 4169} 4170 4171// LoadBalancingRulePropertiesFormat properties of the load balancer 4172type LoadBalancingRulePropertiesFormat struct { 4173 // FrontendIPConfiguration - Gets or sets a reference to frontend IP Addresses 4174 FrontendIPConfiguration *SubResource `json:"frontendIPConfiguration,omitempty"` 4175 // BackendAddressPool - Gets or sets a reference to a pool of DIPs. Inbound traffic is randomly load balanced across IPs in the backend IPs 4176 BackendAddressPool *SubResource `json:"backendAddressPool,omitempty"` 4177 // Probe - Gets or sets the reference of the load balancer probe used by the Load Balancing rule. 4178 Probe *SubResource `json:"probe,omitempty"` 4179 // Protocol - Gets or sets the transport protocol for the external endpoint. Possible values are Udp or Tcp. Possible values include: 'TransportProtocolUDP', 'TransportProtocolTCP' 4180 Protocol TransportProtocol `json:"protocol,omitempty"` 4181 // LoadDistribution - Gets or sets the load distribution policy for this rule. Possible values include: 'Default', 'SourceIP', 'SourceIPProtocol' 4182 LoadDistribution LoadDistribution `json:"loadDistribution,omitempty"` 4183 // FrontendPort - Gets or sets the port for the external endpoint. You can specify any port number you choose, but the port numbers specified for each role in the service must be unique. Possible values range between 1 and 65535, inclusive 4184 FrontendPort *int32 `json:"frontendPort,omitempty"` 4185 // BackendPort - Gets or sets a port used for internal connections on the endpoint. The localPort attribute maps the eternal port of the endpoint to an internal port on a role. This is useful in scenarios where a role must communicate to an internal component on a port that is different from the one that is exposed externally. If not specified, the value of localPort is the same as the port attribute. Set the value of localPort to '*' to automatically assign an unallocated port that is discoverable using the runtime API 4186 BackendPort *int32 `json:"backendPort,omitempty"` 4187 // IdleTimeoutInMinutes - Gets or sets the timeout for the Tcp idle connection. The value can be set between 4 and 30 minutes. The default value is 4 minutes. This element is only used when the protocol is set to Tcp 4188 IdleTimeoutInMinutes *int32 `json:"idleTimeoutInMinutes,omitempty"` 4189 // EnableFloatingIP - Configures a virtual machine's endpoint for the floating IP capability required to configure a SQL AlwaysOn availability Group. This setting is required when using the SQL Always ON availability Groups in SQL server. This setting can't be changed after you create the endpoint 4190 EnableFloatingIP *bool `json:"enableFloatingIP,omitempty"` 4191 // ProvisioningState - Gets or sets Provisioning state of the PublicIP resource Updating/Deleting/Failed 4192 ProvisioningState *string `json:"provisioningState,omitempty"` 4193} 4194 4195// LocalNetworkGateway a common class for general resource information 4196type LocalNetworkGateway struct { 4197 autorest.Response `json:"-"` 4198 *LocalNetworkGatewayPropertiesFormat `json:"properties,omitempty"` 4199 // Etag - Gets a unique read-only string that changes whenever the resource is updated 4200 Etag *string `json:"etag,omitempty"` 4201 // ID - Resource Id 4202 ID *string `json:"id,omitempty"` 4203 // Name - READ-ONLY; Resource name 4204 Name *string `json:"name,omitempty"` 4205 // Type - READ-ONLY; Resource type 4206 Type *string `json:"type,omitempty"` 4207 // Location - Resource location 4208 Location *string `json:"location,omitempty"` 4209 // Tags - Resource tags 4210 Tags map[string]*string `json:"tags"` 4211} 4212 4213// MarshalJSON is the custom marshaler for LocalNetworkGateway. 4214func (lng LocalNetworkGateway) MarshalJSON() ([]byte, error) { 4215 objectMap := make(map[string]interface{}) 4216 if lng.LocalNetworkGatewayPropertiesFormat != nil { 4217 objectMap["properties"] = lng.LocalNetworkGatewayPropertiesFormat 4218 } 4219 if lng.Etag != nil { 4220 objectMap["etag"] = lng.Etag 4221 } 4222 if lng.ID != nil { 4223 objectMap["id"] = lng.ID 4224 } 4225 if lng.Location != nil { 4226 objectMap["location"] = lng.Location 4227 } 4228 if lng.Tags != nil { 4229 objectMap["tags"] = lng.Tags 4230 } 4231 return json.Marshal(objectMap) 4232} 4233 4234// UnmarshalJSON is the custom unmarshaler for LocalNetworkGateway struct. 4235func (lng *LocalNetworkGateway) UnmarshalJSON(body []byte) error { 4236 var m map[string]*json.RawMessage 4237 err := json.Unmarshal(body, &m) 4238 if err != nil { 4239 return err 4240 } 4241 for k, v := range m { 4242 switch k { 4243 case "properties": 4244 if v != nil { 4245 var localNetworkGatewayPropertiesFormat LocalNetworkGatewayPropertiesFormat 4246 err = json.Unmarshal(*v, &localNetworkGatewayPropertiesFormat) 4247 if err != nil { 4248 return err 4249 } 4250 lng.LocalNetworkGatewayPropertiesFormat = &localNetworkGatewayPropertiesFormat 4251 } 4252 case "etag": 4253 if v != nil { 4254 var etag string 4255 err = json.Unmarshal(*v, &etag) 4256 if err != nil { 4257 return err 4258 } 4259 lng.Etag = &etag 4260 } 4261 case "id": 4262 if v != nil { 4263 var ID string 4264 err = json.Unmarshal(*v, &ID) 4265 if err != nil { 4266 return err 4267 } 4268 lng.ID = &ID 4269 } 4270 case "name": 4271 if v != nil { 4272 var name string 4273 err = json.Unmarshal(*v, &name) 4274 if err != nil { 4275 return err 4276 } 4277 lng.Name = &name 4278 } 4279 case "type": 4280 if v != nil { 4281 var typeVar string 4282 err = json.Unmarshal(*v, &typeVar) 4283 if err != nil { 4284 return err 4285 } 4286 lng.Type = &typeVar 4287 } 4288 case "location": 4289 if v != nil { 4290 var location string 4291 err = json.Unmarshal(*v, &location) 4292 if err != nil { 4293 return err 4294 } 4295 lng.Location = &location 4296 } 4297 case "tags": 4298 if v != nil { 4299 var tags map[string]*string 4300 err = json.Unmarshal(*v, &tags) 4301 if err != nil { 4302 return err 4303 } 4304 lng.Tags = tags 4305 } 4306 } 4307 } 4308 4309 return nil 4310} 4311 4312// LocalNetworkGatewayListResult response for ListLocalNetworkGateways Api service call 4313type LocalNetworkGatewayListResult struct { 4314 autorest.Response `json:"-"` 4315 // Value - Gets List of LocalNetworkGateways that exists in a resource group 4316 Value *[]LocalNetworkGateway `json:"value,omitempty"` 4317 // NextLink - Gets the URL to get the next set of results. 4318 NextLink *string `json:"nextLink,omitempty"` 4319} 4320 4321// LocalNetworkGatewayListResultIterator provides access to a complete listing of LocalNetworkGateway 4322// values. 4323type LocalNetworkGatewayListResultIterator struct { 4324 i int 4325 page LocalNetworkGatewayListResultPage 4326} 4327 4328// NextWithContext advances to the next value. If there was an error making 4329// the request the iterator does not advance and the error is returned. 4330func (iter *LocalNetworkGatewayListResultIterator) NextWithContext(ctx context.Context) (err error) { 4331 if tracing.IsEnabled() { 4332 ctx = tracing.StartSpan(ctx, fqdn+"/LocalNetworkGatewayListResultIterator.NextWithContext") 4333 defer func() { 4334 sc := -1 4335 if iter.Response().Response.Response != nil { 4336 sc = iter.Response().Response.Response.StatusCode 4337 } 4338 tracing.EndSpan(ctx, sc, err) 4339 }() 4340 } 4341 iter.i++ 4342 if iter.i < len(iter.page.Values()) { 4343 return nil 4344 } 4345 err = iter.page.NextWithContext(ctx) 4346 if err != nil { 4347 iter.i-- 4348 return err 4349 } 4350 iter.i = 0 4351 return nil 4352} 4353 4354// Next advances to the next value. If there was an error making 4355// the request the iterator does not advance and the error is returned. 4356// Deprecated: Use NextWithContext() instead. 4357func (iter *LocalNetworkGatewayListResultIterator) Next() error { 4358 return iter.NextWithContext(context.Background()) 4359} 4360 4361// NotDone returns true if the enumeration should be started or is not yet complete. 4362func (iter LocalNetworkGatewayListResultIterator) NotDone() bool { 4363 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 4364} 4365 4366// Response returns the raw server response from the last page request. 4367func (iter LocalNetworkGatewayListResultIterator) Response() LocalNetworkGatewayListResult { 4368 return iter.page.Response() 4369} 4370 4371// Value returns the current value or a zero-initialized value if the 4372// iterator has advanced beyond the end of the collection. 4373func (iter LocalNetworkGatewayListResultIterator) Value() LocalNetworkGateway { 4374 if !iter.page.NotDone() { 4375 return LocalNetworkGateway{} 4376 } 4377 return iter.page.Values()[iter.i] 4378} 4379 4380// Creates a new instance of the LocalNetworkGatewayListResultIterator type. 4381func NewLocalNetworkGatewayListResultIterator(page LocalNetworkGatewayListResultPage) LocalNetworkGatewayListResultIterator { 4382 return LocalNetworkGatewayListResultIterator{page: page} 4383} 4384 4385// IsEmpty returns true if the ListResult contains no values. 4386func (lnglr LocalNetworkGatewayListResult) IsEmpty() bool { 4387 return lnglr.Value == nil || len(*lnglr.Value) == 0 4388} 4389 4390// hasNextLink returns true if the NextLink is not empty. 4391func (lnglr LocalNetworkGatewayListResult) hasNextLink() bool { 4392 return lnglr.NextLink != nil && len(*lnglr.NextLink) != 0 4393} 4394 4395// localNetworkGatewayListResultPreparer prepares a request to retrieve the next set of results. 4396// It returns nil if no more results exist. 4397func (lnglr LocalNetworkGatewayListResult) localNetworkGatewayListResultPreparer(ctx context.Context) (*http.Request, error) { 4398 if !lnglr.hasNextLink() { 4399 return nil, nil 4400 } 4401 return autorest.Prepare((&http.Request{}).WithContext(ctx), 4402 autorest.AsJSON(), 4403 autorest.AsGet(), 4404 autorest.WithBaseURL(to.String(lnglr.NextLink))) 4405} 4406 4407// LocalNetworkGatewayListResultPage contains a page of LocalNetworkGateway values. 4408type LocalNetworkGatewayListResultPage struct { 4409 fn func(context.Context, LocalNetworkGatewayListResult) (LocalNetworkGatewayListResult, error) 4410 lnglr LocalNetworkGatewayListResult 4411} 4412 4413// NextWithContext advances to the next page of values. If there was an error making 4414// the request the page does not advance and the error is returned. 4415func (page *LocalNetworkGatewayListResultPage) NextWithContext(ctx context.Context) (err error) { 4416 if tracing.IsEnabled() { 4417 ctx = tracing.StartSpan(ctx, fqdn+"/LocalNetworkGatewayListResultPage.NextWithContext") 4418 defer func() { 4419 sc := -1 4420 if page.Response().Response.Response != nil { 4421 sc = page.Response().Response.Response.StatusCode 4422 } 4423 tracing.EndSpan(ctx, sc, err) 4424 }() 4425 } 4426 for { 4427 next, err := page.fn(ctx, page.lnglr) 4428 if err != nil { 4429 return err 4430 } 4431 page.lnglr = next 4432 if !next.hasNextLink() || !next.IsEmpty() { 4433 break 4434 } 4435 } 4436 return nil 4437} 4438 4439// Next advances to the next page of values. If there was an error making 4440// the request the page does not advance and the error is returned. 4441// Deprecated: Use NextWithContext() instead. 4442func (page *LocalNetworkGatewayListResultPage) Next() error { 4443 return page.NextWithContext(context.Background()) 4444} 4445 4446// NotDone returns true if the page enumeration should be started or is not yet complete. 4447func (page LocalNetworkGatewayListResultPage) NotDone() bool { 4448 return !page.lnglr.IsEmpty() 4449} 4450 4451// Response returns the raw server response from the last page request. 4452func (page LocalNetworkGatewayListResultPage) Response() LocalNetworkGatewayListResult { 4453 return page.lnglr 4454} 4455 4456// Values returns the slice of values for the current page or nil if there are no values. 4457func (page LocalNetworkGatewayListResultPage) Values() []LocalNetworkGateway { 4458 if page.lnglr.IsEmpty() { 4459 return nil 4460 } 4461 return *page.lnglr.Value 4462} 4463 4464// Creates a new instance of the LocalNetworkGatewayListResultPage type. 4465func NewLocalNetworkGatewayListResultPage(cur LocalNetworkGatewayListResult, getNextPage func(context.Context, LocalNetworkGatewayListResult) (LocalNetworkGatewayListResult, error)) LocalNetworkGatewayListResultPage { 4466 return LocalNetworkGatewayListResultPage{ 4467 fn: getNextPage, 4468 lnglr: cur, 4469 } 4470} 4471 4472// LocalNetworkGatewayPropertiesFormat localNetworkGateway properties 4473type LocalNetworkGatewayPropertiesFormat struct { 4474 // LocalNetworkAddressSpace - Local network site Address space 4475 LocalNetworkAddressSpace *AddressSpace `json:"localNetworkAddressSpace,omitempty"` 4476 // GatewayIPAddress - IP address of local network gateway. 4477 GatewayIPAddress *string `json:"gatewayIpAddress,omitempty"` 4478 // BgpSettings - Local network gateway's BGP speaker settings 4479 BgpSettings *BgpSettings `json:"bgpSettings,omitempty"` 4480 // ResourceGUID - Gets or sets resource GUID property of the LocalNetworkGateway resource 4481 ResourceGUID *string `json:"resourceGuid,omitempty"` 4482 // ProvisioningState - Gets or sets Provisioning state of the LocalNetworkGateway resource Updating/Deleting/Failed 4483 ProvisioningState *string `json:"provisioningState,omitempty"` 4484} 4485 4486// LocalNetworkGatewaysCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a 4487// long-running operation. 4488type LocalNetworkGatewaysCreateOrUpdateFuture struct { 4489 azure.FutureAPI 4490 // Result returns the result of the asynchronous operation. 4491 // If the operation has not completed it will return an error. 4492 Result func(LocalNetworkGatewaysClient) (LocalNetworkGateway, error) 4493} 4494 4495// LocalNetworkGatewaysDeleteFuture an abstraction for monitoring and retrieving the results of a 4496// long-running operation. 4497type LocalNetworkGatewaysDeleteFuture struct { 4498 azure.FutureAPI 4499 // Result returns the result of the asynchronous operation. 4500 // If the operation has not completed it will return an error. 4501 Result func(LocalNetworkGatewaysClient) (autorest.Response, error) 4502} 4503 4504// OutboundNatRule outbound NAT pool of the loadbalancer 4505type OutboundNatRule struct { 4506 *OutboundNatRulePropertiesFormat `json:"properties,omitempty"` 4507 // Name - Gets name of the resource that is unique within a resource group. This name can be used to access the resource 4508 Name *string `json:"name,omitempty"` 4509 // Etag - A unique read-only string that changes whenever the resource is updated 4510 Etag *string `json:"etag,omitempty"` 4511 // ID - Resource Id 4512 ID *string `json:"id,omitempty"` 4513} 4514 4515// MarshalJSON is the custom marshaler for OutboundNatRule. 4516func (onr OutboundNatRule) MarshalJSON() ([]byte, error) { 4517 objectMap := make(map[string]interface{}) 4518 if onr.OutboundNatRulePropertiesFormat != nil { 4519 objectMap["properties"] = onr.OutboundNatRulePropertiesFormat 4520 } 4521 if onr.Name != nil { 4522 objectMap["name"] = onr.Name 4523 } 4524 if onr.Etag != nil { 4525 objectMap["etag"] = onr.Etag 4526 } 4527 if onr.ID != nil { 4528 objectMap["id"] = onr.ID 4529 } 4530 return json.Marshal(objectMap) 4531} 4532 4533// UnmarshalJSON is the custom unmarshaler for OutboundNatRule struct. 4534func (onr *OutboundNatRule) UnmarshalJSON(body []byte) error { 4535 var m map[string]*json.RawMessage 4536 err := json.Unmarshal(body, &m) 4537 if err != nil { 4538 return err 4539 } 4540 for k, v := range m { 4541 switch k { 4542 case "properties": 4543 if v != nil { 4544 var outboundNatRulePropertiesFormat OutboundNatRulePropertiesFormat 4545 err = json.Unmarshal(*v, &outboundNatRulePropertiesFormat) 4546 if err != nil { 4547 return err 4548 } 4549 onr.OutboundNatRulePropertiesFormat = &outboundNatRulePropertiesFormat 4550 } 4551 case "name": 4552 if v != nil { 4553 var name string 4554 err = json.Unmarshal(*v, &name) 4555 if err != nil { 4556 return err 4557 } 4558 onr.Name = &name 4559 } 4560 case "etag": 4561 if v != nil { 4562 var etag string 4563 err = json.Unmarshal(*v, &etag) 4564 if err != nil { 4565 return err 4566 } 4567 onr.Etag = &etag 4568 } 4569 case "id": 4570 if v != nil { 4571 var ID string 4572 err = json.Unmarshal(*v, &ID) 4573 if err != nil { 4574 return err 4575 } 4576 onr.ID = &ID 4577 } 4578 } 4579 } 4580 4581 return nil 4582} 4583 4584// OutboundNatRulePropertiesFormat outbound NAT pool of the loadbalancer 4585type OutboundNatRulePropertiesFormat struct { 4586 // AllocatedOutboundPorts - Gets or sets the number of outbound ports to be used for SNAT 4587 AllocatedOutboundPorts *int32 `json:"allocatedOutboundPorts,omitempty"` 4588 // FrontendIPConfigurations - Gets or sets Frontend IP addresses of the load balancer 4589 FrontendIPConfigurations *[]SubResource `json:"frontendIPConfigurations,omitempty"` 4590 // BackendAddressPool - Gets or sets a reference to a pool of DIPs. Outbound traffic is randomly load balanced across IPs in the backend IPs 4591 BackendAddressPool *SubResource `json:"backendAddressPool,omitempty"` 4592 // ProvisioningState - Gets or sets Provisioning state of the PublicIP resource Updating/Deleting/Failed 4593 ProvisioningState *string `json:"provisioningState,omitempty"` 4594} 4595 4596// Probe load balancer Probe 4597type Probe struct { 4598 *ProbePropertiesFormat `json:"properties,omitempty"` 4599 // Name - Gets name of the resource that is unique within a resource group. This name can be used to access the resource 4600 Name *string `json:"name,omitempty"` 4601 // Etag - A unique read-only string that changes whenever the resource is updated 4602 Etag *string `json:"etag,omitempty"` 4603 // ID - Resource Id 4604 ID *string `json:"id,omitempty"` 4605} 4606 4607// MarshalJSON is the custom marshaler for Probe. 4608func (p Probe) MarshalJSON() ([]byte, error) { 4609 objectMap := make(map[string]interface{}) 4610 if p.ProbePropertiesFormat != nil { 4611 objectMap["properties"] = p.ProbePropertiesFormat 4612 } 4613 if p.Name != nil { 4614 objectMap["name"] = p.Name 4615 } 4616 if p.Etag != nil { 4617 objectMap["etag"] = p.Etag 4618 } 4619 if p.ID != nil { 4620 objectMap["id"] = p.ID 4621 } 4622 return json.Marshal(objectMap) 4623} 4624 4625// UnmarshalJSON is the custom unmarshaler for Probe struct. 4626func (p *Probe) UnmarshalJSON(body []byte) error { 4627 var m map[string]*json.RawMessage 4628 err := json.Unmarshal(body, &m) 4629 if err != nil { 4630 return err 4631 } 4632 for k, v := range m { 4633 switch k { 4634 case "properties": 4635 if v != nil { 4636 var probePropertiesFormat ProbePropertiesFormat 4637 err = json.Unmarshal(*v, &probePropertiesFormat) 4638 if err != nil { 4639 return err 4640 } 4641 p.ProbePropertiesFormat = &probePropertiesFormat 4642 } 4643 case "name": 4644 if v != nil { 4645 var name string 4646 err = json.Unmarshal(*v, &name) 4647 if err != nil { 4648 return err 4649 } 4650 p.Name = &name 4651 } 4652 case "etag": 4653 if v != nil { 4654 var etag string 4655 err = json.Unmarshal(*v, &etag) 4656 if err != nil { 4657 return err 4658 } 4659 p.Etag = &etag 4660 } 4661 case "id": 4662 if v != nil { 4663 var ID string 4664 err = json.Unmarshal(*v, &ID) 4665 if err != nil { 4666 return err 4667 } 4668 p.ID = &ID 4669 } 4670 } 4671 } 4672 4673 return nil 4674} 4675 4676// ProbePropertiesFormat ... 4677type ProbePropertiesFormat struct { 4678 // LoadBalancingRules - Gets Load balancer rules that use this probe 4679 LoadBalancingRules *[]SubResource `json:"loadBalancingRules,omitempty"` 4680 // Protocol - Gets or sets the protocol of the end point. Possible values are http pr Tcp. If Tcp is specified, a received ACK is required for the probe to be successful. If http is specified,a 200 OK response from the specifies URI is required for the probe to be successful. Possible values include: 'ProbeProtocolHTTP', 'ProbeProtocolTCP' 4681 Protocol ProbeProtocol `json:"protocol,omitempty"` 4682 // Port - Gets or sets Port for communicating the probe. Possible values range from 1 to 65535, inclusive. 4683 Port *int32 `json:"port,omitempty"` 4684 // IntervalInSeconds - Gets or sets the interval, in seconds, for how frequently to probe the endpoint for health status. Typically, the interval is slightly less than half the allocated timeout period (in seconds) which allows two full probes before taking the instance out of rotation. The default value is 15, the minimum value is 5 4685 IntervalInSeconds *int32 `json:"intervalInSeconds,omitempty"` 4686 // NumberOfProbes - Gets or sets the number of probes where if no response, will result in stopping further traffic from being delivered to the endpoint. This values allows endpoints to be taken out of rotation faster or slower than the typical times used in Azure. 4687 NumberOfProbes *int32 `json:"numberOfProbes,omitempty"` 4688 // RequestPath - Gets or sets the URI used for requesting health status from the VM. Path is required if a protocol is set to http. Otherwise, it is not allowed. There is no default value 4689 RequestPath *string `json:"requestPath,omitempty"` 4690 // ProvisioningState - Gets or sets Provisioning state of the PublicIP resource Updating/Deleting/Failed 4691 ProvisioningState *string `json:"provisioningState,omitempty"` 4692} 4693 4694// PublicIPAddress publicIPAddress resource 4695type PublicIPAddress struct { 4696 autorest.Response `json:"-"` 4697 *PublicIPAddressPropertiesFormat `json:"properties,omitempty"` 4698 // Etag - Gets a unique read-only string that changes whenever the resource is updated 4699 Etag *string `json:"etag,omitempty"` 4700 // ID - Resource Id 4701 ID *string `json:"id,omitempty"` 4702 // Name - READ-ONLY; Resource name 4703 Name *string `json:"name,omitempty"` 4704 // Type - READ-ONLY; Resource type 4705 Type *string `json:"type,omitempty"` 4706 // Location - Resource location 4707 Location *string `json:"location,omitempty"` 4708 // Tags - Resource tags 4709 Tags map[string]*string `json:"tags"` 4710} 4711 4712// MarshalJSON is the custom marshaler for PublicIPAddress. 4713func (pia PublicIPAddress) MarshalJSON() ([]byte, error) { 4714 objectMap := make(map[string]interface{}) 4715 if pia.PublicIPAddressPropertiesFormat != nil { 4716 objectMap["properties"] = pia.PublicIPAddressPropertiesFormat 4717 } 4718 if pia.Etag != nil { 4719 objectMap["etag"] = pia.Etag 4720 } 4721 if pia.ID != nil { 4722 objectMap["id"] = pia.ID 4723 } 4724 if pia.Location != nil { 4725 objectMap["location"] = pia.Location 4726 } 4727 if pia.Tags != nil { 4728 objectMap["tags"] = pia.Tags 4729 } 4730 return json.Marshal(objectMap) 4731} 4732 4733// UnmarshalJSON is the custom unmarshaler for PublicIPAddress struct. 4734func (pia *PublicIPAddress) UnmarshalJSON(body []byte) error { 4735 var m map[string]*json.RawMessage 4736 err := json.Unmarshal(body, &m) 4737 if err != nil { 4738 return err 4739 } 4740 for k, v := range m { 4741 switch k { 4742 case "properties": 4743 if v != nil { 4744 var publicIPAddressPropertiesFormat PublicIPAddressPropertiesFormat 4745 err = json.Unmarshal(*v, &publicIPAddressPropertiesFormat) 4746 if err != nil { 4747 return err 4748 } 4749 pia.PublicIPAddressPropertiesFormat = &publicIPAddressPropertiesFormat 4750 } 4751 case "etag": 4752 if v != nil { 4753 var etag string 4754 err = json.Unmarshal(*v, &etag) 4755 if err != nil { 4756 return err 4757 } 4758 pia.Etag = &etag 4759 } 4760 case "id": 4761 if v != nil { 4762 var ID string 4763 err = json.Unmarshal(*v, &ID) 4764 if err != nil { 4765 return err 4766 } 4767 pia.ID = &ID 4768 } 4769 case "name": 4770 if v != nil { 4771 var name string 4772 err = json.Unmarshal(*v, &name) 4773 if err != nil { 4774 return err 4775 } 4776 pia.Name = &name 4777 } 4778 case "type": 4779 if v != nil { 4780 var typeVar string 4781 err = json.Unmarshal(*v, &typeVar) 4782 if err != nil { 4783 return err 4784 } 4785 pia.Type = &typeVar 4786 } 4787 case "location": 4788 if v != nil { 4789 var location string 4790 err = json.Unmarshal(*v, &location) 4791 if err != nil { 4792 return err 4793 } 4794 pia.Location = &location 4795 } 4796 case "tags": 4797 if v != nil { 4798 var tags map[string]*string 4799 err = json.Unmarshal(*v, &tags) 4800 if err != nil { 4801 return err 4802 } 4803 pia.Tags = tags 4804 } 4805 } 4806 } 4807 4808 return nil 4809} 4810 4811// PublicIPAddressDNSSettings contains FQDN of the DNS record associated with the public IP address 4812type PublicIPAddressDNSSettings struct { 4813 // DomainNameLabel - Gets or sets the Domain name label.The concatenation of the domain name label and the regionalized DNS zone make up the fully qualified domain name associated with the public IP address. If a domain name label is specified, an A DNS record is created for the public IP in the Microsoft Azure DNS system. 4814 DomainNameLabel *string `json:"domainNameLabel,omitempty"` 4815 // Fqdn - Gets the FQDN, Fully qualified domain name of the A DNS record associated with the public IP. This is the concatenation of the domainNameLabel and the regionalized DNS zone. 4816 Fqdn *string `json:"fqdn,omitempty"` 4817 // ReverseFqdn - Gets or Sets the Reverse FQDN. A user-visible, fully qualified domain name that resolves to this public IP address. If the reverseFqdn is specified, then a PTR DNS record is created pointing from the IP address in the in-addr.arpa domain to the reverse FQDN. 4818 ReverseFqdn *string `json:"reverseFqdn,omitempty"` 4819} 4820 4821// PublicIPAddressesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a 4822// long-running operation. 4823type PublicIPAddressesCreateOrUpdateFuture struct { 4824 azure.FutureAPI 4825 // Result returns the result of the asynchronous operation. 4826 // If the operation has not completed it will return an error. 4827 Result func(PublicIPAddressesClient) (PublicIPAddress, error) 4828} 4829 4830// PublicIPAddressesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running 4831// operation. 4832type PublicIPAddressesDeleteFuture struct { 4833 azure.FutureAPI 4834 // Result returns the result of the asynchronous operation. 4835 // If the operation has not completed it will return an error. 4836 Result func(PublicIPAddressesClient) (autorest.Response, error) 4837} 4838 4839// PublicIPAddressListResult response for ListPublicIpAddresses Api service call 4840type PublicIPAddressListResult struct { 4841 autorest.Response `json:"-"` 4842 // Value - Gets List of publicIP addresses that exists in a resource group 4843 Value *[]PublicIPAddress `json:"value,omitempty"` 4844 // NextLink - Gets the URL to get the next set of results. 4845 NextLink *string `json:"nextLink,omitempty"` 4846} 4847 4848// PublicIPAddressListResultIterator provides access to a complete listing of PublicIPAddress values. 4849type PublicIPAddressListResultIterator struct { 4850 i int 4851 page PublicIPAddressListResultPage 4852} 4853 4854// NextWithContext advances to the next value. If there was an error making 4855// the request the iterator does not advance and the error is returned. 4856func (iter *PublicIPAddressListResultIterator) NextWithContext(ctx context.Context) (err error) { 4857 if tracing.IsEnabled() { 4858 ctx = tracing.StartSpan(ctx, fqdn+"/PublicIPAddressListResultIterator.NextWithContext") 4859 defer func() { 4860 sc := -1 4861 if iter.Response().Response.Response != nil { 4862 sc = iter.Response().Response.Response.StatusCode 4863 } 4864 tracing.EndSpan(ctx, sc, err) 4865 }() 4866 } 4867 iter.i++ 4868 if iter.i < len(iter.page.Values()) { 4869 return nil 4870 } 4871 err = iter.page.NextWithContext(ctx) 4872 if err != nil { 4873 iter.i-- 4874 return err 4875 } 4876 iter.i = 0 4877 return nil 4878} 4879 4880// Next advances to the next value. If there was an error making 4881// the request the iterator does not advance and the error is returned. 4882// Deprecated: Use NextWithContext() instead. 4883func (iter *PublicIPAddressListResultIterator) Next() error { 4884 return iter.NextWithContext(context.Background()) 4885} 4886 4887// NotDone returns true if the enumeration should be started or is not yet complete. 4888func (iter PublicIPAddressListResultIterator) NotDone() bool { 4889 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 4890} 4891 4892// Response returns the raw server response from the last page request. 4893func (iter PublicIPAddressListResultIterator) Response() PublicIPAddressListResult { 4894 return iter.page.Response() 4895} 4896 4897// Value returns the current value or a zero-initialized value if the 4898// iterator has advanced beyond the end of the collection. 4899func (iter PublicIPAddressListResultIterator) Value() PublicIPAddress { 4900 if !iter.page.NotDone() { 4901 return PublicIPAddress{} 4902 } 4903 return iter.page.Values()[iter.i] 4904} 4905 4906// Creates a new instance of the PublicIPAddressListResultIterator type. 4907func NewPublicIPAddressListResultIterator(page PublicIPAddressListResultPage) PublicIPAddressListResultIterator { 4908 return PublicIPAddressListResultIterator{page: page} 4909} 4910 4911// IsEmpty returns true if the ListResult contains no values. 4912func (pialr PublicIPAddressListResult) IsEmpty() bool { 4913 return pialr.Value == nil || len(*pialr.Value) == 0 4914} 4915 4916// hasNextLink returns true if the NextLink is not empty. 4917func (pialr PublicIPAddressListResult) hasNextLink() bool { 4918 return pialr.NextLink != nil && len(*pialr.NextLink) != 0 4919} 4920 4921// publicIPAddressListResultPreparer prepares a request to retrieve the next set of results. 4922// It returns nil if no more results exist. 4923func (pialr PublicIPAddressListResult) publicIPAddressListResultPreparer(ctx context.Context) (*http.Request, error) { 4924 if !pialr.hasNextLink() { 4925 return nil, nil 4926 } 4927 return autorest.Prepare((&http.Request{}).WithContext(ctx), 4928 autorest.AsJSON(), 4929 autorest.AsGet(), 4930 autorest.WithBaseURL(to.String(pialr.NextLink))) 4931} 4932 4933// PublicIPAddressListResultPage contains a page of PublicIPAddress values. 4934type PublicIPAddressListResultPage struct { 4935 fn func(context.Context, PublicIPAddressListResult) (PublicIPAddressListResult, error) 4936 pialr PublicIPAddressListResult 4937} 4938 4939// NextWithContext advances to the next page of values. If there was an error making 4940// the request the page does not advance and the error is returned. 4941func (page *PublicIPAddressListResultPage) NextWithContext(ctx context.Context) (err error) { 4942 if tracing.IsEnabled() { 4943 ctx = tracing.StartSpan(ctx, fqdn+"/PublicIPAddressListResultPage.NextWithContext") 4944 defer func() { 4945 sc := -1 4946 if page.Response().Response.Response != nil { 4947 sc = page.Response().Response.Response.StatusCode 4948 } 4949 tracing.EndSpan(ctx, sc, err) 4950 }() 4951 } 4952 for { 4953 next, err := page.fn(ctx, page.pialr) 4954 if err != nil { 4955 return err 4956 } 4957 page.pialr = next 4958 if !next.hasNextLink() || !next.IsEmpty() { 4959 break 4960 } 4961 } 4962 return nil 4963} 4964 4965// Next advances to the next page of values. If there was an error making 4966// the request the page does not advance and the error is returned. 4967// Deprecated: Use NextWithContext() instead. 4968func (page *PublicIPAddressListResultPage) Next() error { 4969 return page.NextWithContext(context.Background()) 4970} 4971 4972// NotDone returns true if the page enumeration should be started or is not yet complete. 4973func (page PublicIPAddressListResultPage) NotDone() bool { 4974 return !page.pialr.IsEmpty() 4975} 4976 4977// Response returns the raw server response from the last page request. 4978func (page PublicIPAddressListResultPage) Response() PublicIPAddressListResult { 4979 return page.pialr 4980} 4981 4982// Values returns the slice of values for the current page or nil if there are no values. 4983func (page PublicIPAddressListResultPage) Values() []PublicIPAddress { 4984 if page.pialr.IsEmpty() { 4985 return nil 4986 } 4987 return *page.pialr.Value 4988} 4989 4990// Creates a new instance of the PublicIPAddressListResultPage type. 4991func NewPublicIPAddressListResultPage(cur PublicIPAddressListResult, getNextPage func(context.Context, PublicIPAddressListResult) (PublicIPAddressListResult, error)) PublicIPAddressListResultPage { 4992 return PublicIPAddressListResultPage{ 4993 fn: getNextPage, 4994 pialr: cur, 4995 } 4996} 4997 4998// PublicIPAddressPropertiesFormat publicIpAddress properties 4999type PublicIPAddressPropertiesFormat struct { 5000 // PublicIPAllocationMethod - Gets or sets PublicIP allocation method (Static/Dynamic). Possible values include: 'Static', 'Dynamic' 5001 PublicIPAllocationMethod IPAllocationMethod `json:"publicIPAllocationMethod,omitempty"` 5002 // PublicIPAddressVersion - Gets or sets PublicIP address version (IPv4/IPv6). Possible values include: 'IPv4', 'IPv6' 5003 PublicIPAddressVersion IPVersion `json:"publicIPAddressVersion,omitempty"` 5004 IPConfiguration *IPConfiguration `json:"ipConfiguration,omitempty"` 5005 // DNSSettings - Gets or sets FQDN of the DNS record associated with the public IP address 5006 DNSSettings *PublicIPAddressDNSSettings `json:"dnsSettings,omitempty"` 5007 IPAddress *string `json:"ipAddress,omitempty"` 5008 // IdleTimeoutInMinutes - Gets or sets the idle timeout of the public IP address 5009 IdleTimeoutInMinutes *int32 `json:"idleTimeoutInMinutes,omitempty"` 5010 // ResourceGUID - Gets or sets resource GUID property of the PublicIP resource 5011 ResourceGUID *string `json:"resourceGuid,omitempty"` 5012 // ProvisioningState - Gets or sets Provisioning state of the PublicIP resource Updating/Deleting/Failed 5013 ProvisioningState *string `json:"provisioningState,omitempty"` 5014} 5015 5016// Resource ... 5017type Resource struct { 5018 // ID - Resource Id 5019 ID *string `json:"id,omitempty"` 5020 // Name - READ-ONLY; Resource name 5021 Name *string `json:"name,omitempty"` 5022 // Type - READ-ONLY; Resource type 5023 Type *string `json:"type,omitempty"` 5024 // Location - Resource location 5025 Location *string `json:"location,omitempty"` 5026 // Tags - Resource tags 5027 Tags map[string]*string `json:"tags"` 5028} 5029 5030// MarshalJSON is the custom marshaler for Resource. 5031func (r Resource) MarshalJSON() ([]byte, error) { 5032 objectMap := make(map[string]interface{}) 5033 if r.ID != nil { 5034 objectMap["id"] = r.ID 5035 } 5036 if r.Location != nil { 5037 objectMap["location"] = r.Location 5038 } 5039 if r.Tags != nil { 5040 objectMap["tags"] = r.Tags 5041 } 5042 return json.Marshal(objectMap) 5043} 5044 5045// Route route resource 5046type Route struct { 5047 autorest.Response `json:"-"` 5048 *RoutePropertiesFormat `json:"properties,omitempty"` 5049 // Name - Gets name of the resource that is unique within a resource group. This name can be used to access the resource 5050 Name *string `json:"name,omitempty"` 5051 // Etag - A unique read-only string that changes whenever the resource is updated 5052 Etag *string `json:"etag,omitempty"` 5053 // ID - Resource Id 5054 ID *string `json:"id,omitempty"` 5055} 5056 5057// MarshalJSON is the custom marshaler for Route. 5058func (r Route) MarshalJSON() ([]byte, error) { 5059 objectMap := make(map[string]interface{}) 5060 if r.RoutePropertiesFormat != nil { 5061 objectMap["properties"] = r.RoutePropertiesFormat 5062 } 5063 if r.Name != nil { 5064 objectMap["name"] = r.Name 5065 } 5066 if r.Etag != nil { 5067 objectMap["etag"] = r.Etag 5068 } 5069 if r.ID != nil { 5070 objectMap["id"] = r.ID 5071 } 5072 return json.Marshal(objectMap) 5073} 5074 5075// UnmarshalJSON is the custom unmarshaler for Route struct. 5076func (r *Route) UnmarshalJSON(body []byte) error { 5077 var m map[string]*json.RawMessage 5078 err := json.Unmarshal(body, &m) 5079 if err != nil { 5080 return err 5081 } 5082 for k, v := range m { 5083 switch k { 5084 case "properties": 5085 if v != nil { 5086 var routePropertiesFormat RoutePropertiesFormat 5087 err = json.Unmarshal(*v, &routePropertiesFormat) 5088 if err != nil { 5089 return err 5090 } 5091 r.RoutePropertiesFormat = &routePropertiesFormat 5092 } 5093 case "name": 5094 if v != nil { 5095 var name string 5096 err = json.Unmarshal(*v, &name) 5097 if err != nil { 5098 return err 5099 } 5100 r.Name = &name 5101 } 5102 case "etag": 5103 if v != nil { 5104 var etag string 5105 err = json.Unmarshal(*v, &etag) 5106 if err != nil { 5107 return err 5108 } 5109 r.Etag = &etag 5110 } 5111 case "id": 5112 if v != nil { 5113 var ID string 5114 err = json.Unmarshal(*v, &ID) 5115 if err != nil { 5116 return err 5117 } 5118 r.ID = &ID 5119 } 5120 } 5121 } 5122 5123 return nil 5124} 5125 5126// RouteListResult response for ListRoute Api service call 5127type RouteListResult struct { 5128 autorest.Response `json:"-"` 5129 // Value - Gets List of Routes in a resource group 5130 Value *[]Route `json:"value,omitempty"` 5131 // NextLink - Gets the URL to get the next set of results. 5132 NextLink *string `json:"nextLink,omitempty"` 5133} 5134 5135// RouteListResultIterator provides access to a complete listing of Route values. 5136type RouteListResultIterator struct { 5137 i int 5138 page RouteListResultPage 5139} 5140 5141// NextWithContext advances to the next value. If there was an error making 5142// the request the iterator does not advance and the error is returned. 5143func (iter *RouteListResultIterator) NextWithContext(ctx context.Context) (err error) { 5144 if tracing.IsEnabled() { 5145 ctx = tracing.StartSpan(ctx, fqdn+"/RouteListResultIterator.NextWithContext") 5146 defer func() { 5147 sc := -1 5148 if iter.Response().Response.Response != nil { 5149 sc = iter.Response().Response.Response.StatusCode 5150 } 5151 tracing.EndSpan(ctx, sc, err) 5152 }() 5153 } 5154 iter.i++ 5155 if iter.i < len(iter.page.Values()) { 5156 return nil 5157 } 5158 err = iter.page.NextWithContext(ctx) 5159 if err != nil { 5160 iter.i-- 5161 return err 5162 } 5163 iter.i = 0 5164 return nil 5165} 5166 5167// Next advances to the next value. If there was an error making 5168// the request the iterator does not advance and the error is returned. 5169// Deprecated: Use NextWithContext() instead. 5170func (iter *RouteListResultIterator) Next() error { 5171 return iter.NextWithContext(context.Background()) 5172} 5173 5174// NotDone returns true if the enumeration should be started or is not yet complete. 5175func (iter RouteListResultIterator) NotDone() bool { 5176 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 5177} 5178 5179// Response returns the raw server response from the last page request. 5180func (iter RouteListResultIterator) Response() RouteListResult { 5181 return iter.page.Response() 5182} 5183 5184// Value returns the current value or a zero-initialized value if the 5185// iterator has advanced beyond the end of the collection. 5186func (iter RouteListResultIterator) Value() Route { 5187 if !iter.page.NotDone() { 5188 return Route{} 5189 } 5190 return iter.page.Values()[iter.i] 5191} 5192 5193// Creates a new instance of the RouteListResultIterator type. 5194func NewRouteListResultIterator(page RouteListResultPage) RouteListResultIterator { 5195 return RouteListResultIterator{page: page} 5196} 5197 5198// IsEmpty returns true if the ListResult contains no values. 5199func (rlr RouteListResult) IsEmpty() bool { 5200 return rlr.Value == nil || len(*rlr.Value) == 0 5201} 5202 5203// hasNextLink returns true if the NextLink is not empty. 5204func (rlr RouteListResult) hasNextLink() bool { 5205 return rlr.NextLink != nil && len(*rlr.NextLink) != 0 5206} 5207 5208// routeListResultPreparer prepares a request to retrieve the next set of results. 5209// It returns nil if no more results exist. 5210func (rlr RouteListResult) routeListResultPreparer(ctx context.Context) (*http.Request, error) { 5211 if !rlr.hasNextLink() { 5212 return nil, nil 5213 } 5214 return autorest.Prepare((&http.Request{}).WithContext(ctx), 5215 autorest.AsJSON(), 5216 autorest.AsGet(), 5217 autorest.WithBaseURL(to.String(rlr.NextLink))) 5218} 5219 5220// RouteListResultPage contains a page of Route values. 5221type RouteListResultPage struct { 5222 fn func(context.Context, RouteListResult) (RouteListResult, error) 5223 rlr RouteListResult 5224} 5225 5226// NextWithContext advances to the next page of values. If there was an error making 5227// the request the page does not advance and the error is returned. 5228func (page *RouteListResultPage) NextWithContext(ctx context.Context) (err error) { 5229 if tracing.IsEnabled() { 5230 ctx = tracing.StartSpan(ctx, fqdn+"/RouteListResultPage.NextWithContext") 5231 defer func() { 5232 sc := -1 5233 if page.Response().Response.Response != nil { 5234 sc = page.Response().Response.Response.StatusCode 5235 } 5236 tracing.EndSpan(ctx, sc, err) 5237 }() 5238 } 5239 for { 5240 next, err := page.fn(ctx, page.rlr) 5241 if err != nil { 5242 return err 5243 } 5244 page.rlr = next 5245 if !next.hasNextLink() || !next.IsEmpty() { 5246 break 5247 } 5248 } 5249 return nil 5250} 5251 5252// Next advances to the next page of values. If there was an error making 5253// the request the page does not advance and the error is returned. 5254// Deprecated: Use NextWithContext() instead. 5255func (page *RouteListResultPage) Next() error { 5256 return page.NextWithContext(context.Background()) 5257} 5258 5259// NotDone returns true if the page enumeration should be started or is not yet complete. 5260func (page RouteListResultPage) NotDone() bool { 5261 return !page.rlr.IsEmpty() 5262} 5263 5264// Response returns the raw server response from the last page request. 5265func (page RouteListResultPage) Response() RouteListResult { 5266 return page.rlr 5267} 5268 5269// Values returns the slice of values for the current page or nil if there are no values. 5270func (page RouteListResultPage) Values() []Route { 5271 if page.rlr.IsEmpty() { 5272 return nil 5273 } 5274 return *page.rlr.Value 5275} 5276 5277// Creates a new instance of the RouteListResultPage type. 5278func NewRouteListResultPage(cur RouteListResult, getNextPage func(context.Context, RouteListResult) (RouteListResult, error)) RouteListResultPage { 5279 return RouteListResultPage{ 5280 fn: getNextPage, 5281 rlr: cur, 5282 } 5283} 5284 5285// RoutePropertiesFormat route resource 5286type RoutePropertiesFormat struct { 5287 // AddressPrefix - Gets or sets the destination CIDR to which the route applies. 5288 AddressPrefix *string `json:"addressPrefix,omitempty"` 5289 // NextHopType - Gets or sets the type of Azure hop the packet should be sent to. Possible values include: 'RouteNextHopTypeVirtualNetworkGateway', 'RouteNextHopTypeVnetLocal', 'RouteNextHopTypeInternet', 'RouteNextHopTypeVirtualAppliance', 'RouteNextHopTypeNone' 5290 NextHopType RouteNextHopType `json:"nextHopType,omitempty"` 5291 // NextHopIPAddress - Gets or sets the IP address packets should be forwarded to. Next hop values are only allowed in routes where the next hop type is VirtualAppliance. 5292 NextHopIPAddress *string `json:"nextHopIpAddress,omitempty"` 5293 // ProvisioningState - Gets or sets Provisioning state of the resource Updating/Deleting/Failed 5294 ProvisioningState *string `json:"provisioningState,omitempty"` 5295} 5296 5297// RoutesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running 5298// operation. 5299type RoutesCreateOrUpdateFuture struct { 5300 azure.FutureAPI 5301 // Result returns the result of the asynchronous operation. 5302 // If the operation has not completed it will return an error. 5303 Result func(RoutesClient) (Route, error) 5304} 5305 5306// RoutesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation. 5307type RoutesDeleteFuture struct { 5308 azure.FutureAPI 5309 // Result returns the result of the asynchronous operation. 5310 // If the operation has not completed it will return an error. 5311 Result func(RoutesClient) (autorest.Response, error) 5312} 5313 5314// RouteTable routeTable resource 5315type RouteTable struct { 5316 autorest.Response `json:"-"` 5317 *RouteTablePropertiesFormat `json:"properties,omitempty"` 5318 // Etag - Gets a unique read-only string that changes whenever the resource is updated 5319 Etag *string `json:"etag,omitempty"` 5320 // ID - Resource Id 5321 ID *string `json:"id,omitempty"` 5322 // Name - READ-ONLY; Resource name 5323 Name *string `json:"name,omitempty"` 5324 // Type - READ-ONLY; Resource type 5325 Type *string `json:"type,omitempty"` 5326 // Location - Resource location 5327 Location *string `json:"location,omitempty"` 5328 // Tags - Resource tags 5329 Tags map[string]*string `json:"tags"` 5330} 5331 5332// MarshalJSON is the custom marshaler for RouteTable. 5333func (rt RouteTable) MarshalJSON() ([]byte, error) { 5334 objectMap := make(map[string]interface{}) 5335 if rt.RouteTablePropertiesFormat != nil { 5336 objectMap["properties"] = rt.RouteTablePropertiesFormat 5337 } 5338 if rt.Etag != nil { 5339 objectMap["etag"] = rt.Etag 5340 } 5341 if rt.ID != nil { 5342 objectMap["id"] = rt.ID 5343 } 5344 if rt.Location != nil { 5345 objectMap["location"] = rt.Location 5346 } 5347 if rt.Tags != nil { 5348 objectMap["tags"] = rt.Tags 5349 } 5350 return json.Marshal(objectMap) 5351} 5352 5353// UnmarshalJSON is the custom unmarshaler for RouteTable struct. 5354func (rt *RouteTable) UnmarshalJSON(body []byte) error { 5355 var m map[string]*json.RawMessage 5356 err := json.Unmarshal(body, &m) 5357 if err != nil { 5358 return err 5359 } 5360 for k, v := range m { 5361 switch k { 5362 case "properties": 5363 if v != nil { 5364 var routeTablePropertiesFormat RouteTablePropertiesFormat 5365 err = json.Unmarshal(*v, &routeTablePropertiesFormat) 5366 if err != nil { 5367 return err 5368 } 5369 rt.RouteTablePropertiesFormat = &routeTablePropertiesFormat 5370 } 5371 case "etag": 5372 if v != nil { 5373 var etag string 5374 err = json.Unmarshal(*v, &etag) 5375 if err != nil { 5376 return err 5377 } 5378 rt.Etag = &etag 5379 } 5380 case "id": 5381 if v != nil { 5382 var ID string 5383 err = json.Unmarshal(*v, &ID) 5384 if err != nil { 5385 return err 5386 } 5387 rt.ID = &ID 5388 } 5389 case "name": 5390 if v != nil { 5391 var name string 5392 err = json.Unmarshal(*v, &name) 5393 if err != nil { 5394 return err 5395 } 5396 rt.Name = &name 5397 } 5398 case "type": 5399 if v != nil { 5400 var typeVar string 5401 err = json.Unmarshal(*v, &typeVar) 5402 if err != nil { 5403 return err 5404 } 5405 rt.Type = &typeVar 5406 } 5407 case "location": 5408 if v != nil { 5409 var location string 5410 err = json.Unmarshal(*v, &location) 5411 if err != nil { 5412 return err 5413 } 5414 rt.Location = &location 5415 } 5416 case "tags": 5417 if v != nil { 5418 var tags map[string]*string 5419 err = json.Unmarshal(*v, &tags) 5420 if err != nil { 5421 return err 5422 } 5423 rt.Tags = tags 5424 } 5425 } 5426 } 5427 5428 return nil 5429} 5430 5431// RouteTableListResult response for ListRouteTable Api service call 5432type RouteTableListResult struct { 5433 autorest.Response `json:"-"` 5434 // Value - Gets List of RouteTables in a resource group 5435 Value *[]RouteTable `json:"value,omitempty"` 5436 // NextLink - Gets the URL to get the next set of results. 5437 NextLink *string `json:"nextLink,omitempty"` 5438} 5439 5440// RouteTableListResultIterator provides access to a complete listing of RouteTable values. 5441type RouteTableListResultIterator struct { 5442 i int 5443 page RouteTableListResultPage 5444} 5445 5446// NextWithContext advances to the next value. If there was an error making 5447// the request the iterator does not advance and the error is returned. 5448func (iter *RouteTableListResultIterator) NextWithContext(ctx context.Context) (err error) { 5449 if tracing.IsEnabled() { 5450 ctx = tracing.StartSpan(ctx, fqdn+"/RouteTableListResultIterator.NextWithContext") 5451 defer func() { 5452 sc := -1 5453 if iter.Response().Response.Response != nil { 5454 sc = iter.Response().Response.Response.StatusCode 5455 } 5456 tracing.EndSpan(ctx, sc, err) 5457 }() 5458 } 5459 iter.i++ 5460 if iter.i < len(iter.page.Values()) { 5461 return nil 5462 } 5463 err = iter.page.NextWithContext(ctx) 5464 if err != nil { 5465 iter.i-- 5466 return err 5467 } 5468 iter.i = 0 5469 return nil 5470} 5471 5472// Next advances to the next value. If there was an error making 5473// the request the iterator does not advance and the error is returned. 5474// Deprecated: Use NextWithContext() instead. 5475func (iter *RouteTableListResultIterator) Next() error { 5476 return iter.NextWithContext(context.Background()) 5477} 5478 5479// NotDone returns true if the enumeration should be started or is not yet complete. 5480func (iter RouteTableListResultIterator) NotDone() bool { 5481 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 5482} 5483 5484// Response returns the raw server response from the last page request. 5485func (iter RouteTableListResultIterator) Response() RouteTableListResult { 5486 return iter.page.Response() 5487} 5488 5489// Value returns the current value or a zero-initialized value if the 5490// iterator has advanced beyond the end of the collection. 5491func (iter RouteTableListResultIterator) Value() RouteTable { 5492 if !iter.page.NotDone() { 5493 return RouteTable{} 5494 } 5495 return iter.page.Values()[iter.i] 5496} 5497 5498// Creates a new instance of the RouteTableListResultIterator type. 5499func NewRouteTableListResultIterator(page RouteTableListResultPage) RouteTableListResultIterator { 5500 return RouteTableListResultIterator{page: page} 5501} 5502 5503// IsEmpty returns true if the ListResult contains no values. 5504func (rtlr RouteTableListResult) IsEmpty() bool { 5505 return rtlr.Value == nil || len(*rtlr.Value) == 0 5506} 5507 5508// hasNextLink returns true if the NextLink is not empty. 5509func (rtlr RouteTableListResult) hasNextLink() bool { 5510 return rtlr.NextLink != nil && len(*rtlr.NextLink) != 0 5511} 5512 5513// routeTableListResultPreparer prepares a request to retrieve the next set of results. 5514// It returns nil if no more results exist. 5515func (rtlr RouteTableListResult) routeTableListResultPreparer(ctx context.Context) (*http.Request, error) { 5516 if !rtlr.hasNextLink() { 5517 return nil, nil 5518 } 5519 return autorest.Prepare((&http.Request{}).WithContext(ctx), 5520 autorest.AsJSON(), 5521 autorest.AsGet(), 5522 autorest.WithBaseURL(to.String(rtlr.NextLink))) 5523} 5524 5525// RouteTableListResultPage contains a page of RouteTable values. 5526type RouteTableListResultPage struct { 5527 fn func(context.Context, RouteTableListResult) (RouteTableListResult, error) 5528 rtlr RouteTableListResult 5529} 5530 5531// NextWithContext advances to the next page of values. If there was an error making 5532// the request the page does not advance and the error is returned. 5533func (page *RouteTableListResultPage) NextWithContext(ctx context.Context) (err error) { 5534 if tracing.IsEnabled() { 5535 ctx = tracing.StartSpan(ctx, fqdn+"/RouteTableListResultPage.NextWithContext") 5536 defer func() { 5537 sc := -1 5538 if page.Response().Response.Response != nil { 5539 sc = page.Response().Response.Response.StatusCode 5540 } 5541 tracing.EndSpan(ctx, sc, err) 5542 }() 5543 } 5544 for { 5545 next, err := page.fn(ctx, page.rtlr) 5546 if err != nil { 5547 return err 5548 } 5549 page.rtlr = next 5550 if !next.hasNextLink() || !next.IsEmpty() { 5551 break 5552 } 5553 } 5554 return nil 5555} 5556 5557// Next advances to the next page of values. If there was an error making 5558// the request the page does not advance and the error is returned. 5559// Deprecated: Use NextWithContext() instead. 5560func (page *RouteTableListResultPage) Next() error { 5561 return page.NextWithContext(context.Background()) 5562} 5563 5564// NotDone returns true if the page enumeration should be started or is not yet complete. 5565func (page RouteTableListResultPage) NotDone() bool { 5566 return !page.rtlr.IsEmpty() 5567} 5568 5569// Response returns the raw server response from the last page request. 5570func (page RouteTableListResultPage) Response() RouteTableListResult { 5571 return page.rtlr 5572} 5573 5574// Values returns the slice of values for the current page or nil if there are no values. 5575func (page RouteTableListResultPage) Values() []RouteTable { 5576 if page.rtlr.IsEmpty() { 5577 return nil 5578 } 5579 return *page.rtlr.Value 5580} 5581 5582// Creates a new instance of the RouteTableListResultPage type. 5583func NewRouteTableListResultPage(cur RouteTableListResult, getNextPage func(context.Context, RouteTableListResult) (RouteTableListResult, error)) RouteTableListResultPage { 5584 return RouteTableListResultPage{ 5585 fn: getNextPage, 5586 rtlr: cur, 5587 } 5588} 5589 5590// RouteTablePropertiesFormat route Table resource 5591type RouteTablePropertiesFormat struct { 5592 // Routes - Gets or sets Routes in a Route Table 5593 Routes *[]Route `json:"routes,omitempty"` 5594 // Subnets - Gets collection of references to subnets 5595 Subnets *[]Subnet `json:"subnets,omitempty"` 5596 // ProvisioningState - Gets or sets Provisioning state of the resource Updating/Deleting/Failed 5597 ProvisioningState *string `json:"provisioningState,omitempty"` 5598} 5599 5600// RouteTablesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a 5601// long-running operation. 5602type RouteTablesCreateOrUpdateFuture struct { 5603 azure.FutureAPI 5604 // Result returns the result of the asynchronous operation. 5605 // If the operation has not completed it will return an error. 5606 Result func(RouteTablesClient) (RouteTable, error) 5607} 5608 5609// RouteTablesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running 5610// operation. 5611type RouteTablesDeleteFuture struct { 5612 azure.FutureAPI 5613 // Result returns the result of the asynchronous operation. 5614 // If the operation has not completed it will return an error. 5615 Result func(RouteTablesClient) (autorest.Response, error) 5616} 5617 5618// SecurityGroup networkSecurityGroup resource 5619type SecurityGroup struct { 5620 autorest.Response `json:"-"` 5621 *SecurityGroupPropertiesFormat `json:"properties,omitempty"` 5622 // Etag - Gets a unique read-only string that changes whenever the resource is updated 5623 Etag *string `json:"etag,omitempty"` 5624 // ID - Resource Id 5625 ID *string `json:"id,omitempty"` 5626 // Name - READ-ONLY; Resource name 5627 Name *string `json:"name,omitempty"` 5628 // Type - READ-ONLY; Resource type 5629 Type *string `json:"type,omitempty"` 5630 // Location - Resource location 5631 Location *string `json:"location,omitempty"` 5632 // Tags - Resource tags 5633 Tags map[string]*string `json:"tags"` 5634} 5635 5636// MarshalJSON is the custom marshaler for SecurityGroup. 5637func (sg SecurityGroup) MarshalJSON() ([]byte, error) { 5638 objectMap := make(map[string]interface{}) 5639 if sg.SecurityGroupPropertiesFormat != nil { 5640 objectMap["properties"] = sg.SecurityGroupPropertiesFormat 5641 } 5642 if sg.Etag != nil { 5643 objectMap["etag"] = sg.Etag 5644 } 5645 if sg.ID != nil { 5646 objectMap["id"] = sg.ID 5647 } 5648 if sg.Location != nil { 5649 objectMap["location"] = sg.Location 5650 } 5651 if sg.Tags != nil { 5652 objectMap["tags"] = sg.Tags 5653 } 5654 return json.Marshal(objectMap) 5655} 5656 5657// UnmarshalJSON is the custom unmarshaler for SecurityGroup struct. 5658func (sg *SecurityGroup) UnmarshalJSON(body []byte) error { 5659 var m map[string]*json.RawMessage 5660 err := json.Unmarshal(body, &m) 5661 if err != nil { 5662 return err 5663 } 5664 for k, v := range m { 5665 switch k { 5666 case "properties": 5667 if v != nil { 5668 var securityGroupPropertiesFormat SecurityGroupPropertiesFormat 5669 err = json.Unmarshal(*v, &securityGroupPropertiesFormat) 5670 if err != nil { 5671 return err 5672 } 5673 sg.SecurityGroupPropertiesFormat = &securityGroupPropertiesFormat 5674 } 5675 case "etag": 5676 if v != nil { 5677 var etag string 5678 err = json.Unmarshal(*v, &etag) 5679 if err != nil { 5680 return err 5681 } 5682 sg.Etag = &etag 5683 } 5684 case "id": 5685 if v != nil { 5686 var ID string 5687 err = json.Unmarshal(*v, &ID) 5688 if err != nil { 5689 return err 5690 } 5691 sg.ID = &ID 5692 } 5693 case "name": 5694 if v != nil { 5695 var name string 5696 err = json.Unmarshal(*v, &name) 5697 if err != nil { 5698 return err 5699 } 5700 sg.Name = &name 5701 } 5702 case "type": 5703 if v != nil { 5704 var typeVar string 5705 err = json.Unmarshal(*v, &typeVar) 5706 if err != nil { 5707 return err 5708 } 5709 sg.Type = &typeVar 5710 } 5711 case "location": 5712 if v != nil { 5713 var location string 5714 err = json.Unmarshal(*v, &location) 5715 if err != nil { 5716 return err 5717 } 5718 sg.Location = &location 5719 } 5720 case "tags": 5721 if v != nil { 5722 var tags map[string]*string 5723 err = json.Unmarshal(*v, &tags) 5724 if err != nil { 5725 return err 5726 } 5727 sg.Tags = tags 5728 } 5729 } 5730 } 5731 5732 return nil 5733} 5734 5735// SecurityGroupListResult response for ListNetworkSecurityGroups Api service call 5736type SecurityGroupListResult struct { 5737 autorest.Response `json:"-"` 5738 // Value - Gets List of NetworkSecurityGroups in a resource group 5739 Value *[]SecurityGroup `json:"value,omitempty"` 5740 // NextLink - Gets the URL to get the next set of results. 5741 NextLink *string `json:"nextLink,omitempty"` 5742} 5743 5744// SecurityGroupListResultIterator provides access to a complete listing of SecurityGroup values. 5745type SecurityGroupListResultIterator struct { 5746 i int 5747 page SecurityGroupListResultPage 5748} 5749 5750// NextWithContext advances to the next value. If there was an error making 5751// the request the iterator does not advance and the error is returned. 5752func (iter *SecurityGroupListResultIterator) NextWithContext(ctx context.Context) (err error) { 5753 if tracing.IsEnabled() { 5754 ctx = tracing.StartSpan(ctx, fqdn+"/SecurityGroupListResultIterator.NextWithContext") 5755 defer func() { 5756 sc := -1 5757 if iter.Response().Response.Response != nil { 5758 sc = iter.Response().Response.Response.StatusCode 5759 } 5760 tracing.EndSpan(ctx, sc, err) 5761 }() 5762 } 5763 iter.i++ 5764 if iter.i < len(iter.page.Values()) { 5765 return nil 5766 } 5767 err = iter.page.NextWithContext(ctx) 5768 if err != nil { 5769 iter.i-- 5770 return err 5771 } 5772 iter.i = 0 5773 return nil 5774} 5775 5776// Next advances to the next value. If there was an error making 5777// the request the iterator does not advance and the error is returned. 5778// Deprecated: Use NextWithContext() instead. 5779func (iter *SecurityGroupListResultIterator) Next() error { 5780 return iter.NextWithContext(context.Background()) 5781} 5782 5783// NotDone returns true if the enumeration should be started or is not yet complete. 5784func (iter SecurityGroupListResultIterator) NotDone() bool { 5785 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 5786} 5787 5788// Response returns the raw server response from the last page request. 5789func (iter SecurityGroupListResultIterator) Response() SecurityGroupListResult { 5790 return iter.page.Response() 5791} 5792 5793// Value returns the current value or a zero-initialized value if the 5794// iterator has advanced beyond the end of the collection. 5795func (iter SecurityGroupListResultIterator) Value() SecurityGroup { 5796 if !iter.page.NotDone() { 5797 return SecurityGroup{} 5798 } 5799 return iter.page.Values()[iter.i] 5800} 5801 5802// Creates a new instance of the SecurityGroupListResultIterator type. 5803func NewSecurityGroupListResultIterator(page SecurityGroupListResultPage) SecurityGroupListResultIterator { 5804 return SecurityGroupListResultIterator{page: page} 5805} 5806 5807// IsEmpty returns true if the ListResult contains no values. 5808func (sglr SecurityGroupListResult) IsEmpty() bool { 5809 return sglr.Value == nil || len(*sglr.Value) == 0 5810} 5811 5812// hasNextLink returns true if the NextLink is not empty. 5813func (sglr SecurityGroupListResult) hasNextLink() bool { 5814 return sglr.NextLink != nil && len(*sglr.NextLink) != 0 5815} 5816 5817// securityGroupListResultPreparer prepares a request to retrieve the next set of results. 5818// It returns nil if no more results exist. 5819func (sglr SecurityGroupListResult) securityGroupListResultPreparer(ctx context.Context) (*http.Request, error) { 5820 if !sglr.hasNextLink() { 5821 return nil, nil 5822 } 5823 return autorest.Prepare((&http.Request{}).WithContext(ctx), 5824 autorest.AsJSON(), 5825 autorest.AsGet(), 5826 autorest.WithBaseURL(to.String(sglr.NextLink))) 5827} 5828 5829// SecurityGroupListResultPage contains a page of SecurityGroup values. 5830type SecurityGroupListResultPage struct { 5831 fn func(context.Context, SecurityGroupListResult) (SecurityGroupListResult, error) 5832 sglr SecurityGroupListResult 5833} 5834 5835// NextWithContext advances to the next page of values. If there was an error making 5836// the request the page does not advance and the error is returned. 5837func (page *SecurityGroupListResultPage) NextWithContext(ctx context.Context) (err error) { 5838 if tracing.IsEnabled() { 5839 ctx = tracing.StartSpan(ctx, fqdn+"/SecurityGroupListResultPage.NextWithContext") 5840 defer func() { 5841 sc := -1 5842 if page.Response().Response.Response != nil { 5843 sc = page.Response().Response.Response.StatusCode 5844 } 5845 tracing.EndSpan(ctx, sc, err) 5846 }() 5847 } 5848 for { 5849 next, err := page.fn(ctx, page.sglr) 5850 if err != nil { 5851 return err 5852 } 5853 page.sglr = next 5854 if !next.hasNextLink() || !next.IsEmpty() { 5855 break 5856 } 5857 } 5858 return nil 5859} 5860 5861// Next advances to the next page of values. If there was an error making 5862// the request the page does not advance and the error is returned. 5863// Deprecated: Use NextWithContext() instead. 5864func (page *SecurityGroupListResultPage) Next() error { 5865 return page.NextWithContext(context.Background()) 5866} 5867 5868// NotDone returns true if the page enumeration should be started or is not yet complete. 5869func (page SecurityGroupListResultPage) NotDone() bool { 5870 return !page.sglr.IsEmpty() 5871} 5872 5873// Response returns the raw server response from the last page request. 5874func (page SecurityGroupListResultPage) Response() SecurityGroupListResult { 5875 return page.sglr 5876} 5877 5878// Values returns the slice of values for the current page or nil if there are no values. 5879func (page SecurityGroupListResultPage) Values() []SecurityGroup { 5880 if page.sglr.IsEmpty() { 5881 return nil 5882 } 5883 return *page.sglr.Value 5884} 5885 5886// Creates a new instance of the SecurityGroupListResultPage type. 5887func NewSecurityGroupListResultPage(cur SecurityGroupListResult, getNextPage func(context.Context, SecurityGroupListResult) (SecurityGroupListResult, error)) SecurityGroupListResultPage { 5888 return SecurityGroupListResultPage{ 5889 fn: getNextPage, 5890 sglr: cur, 5891 } 5892} 5893 5894// SecurityGroupPropertiesFormat network Security Group resource 5895type SecurityGroupPropertiesFormat struct { 5896 // SecurityRules - Gets or sets Security rules of network security group 5897 SecurityRules *[]SecurityRule `json:"securityRules,omitempty"` 5898 // DefaultSecurityRules - Gets or sets Default security rules of network security group 5899 DefaultSecurityRules *[]SecurityRule `json:"defaultSecurityRules,omitempty"` 5900 // NetworkInterfaces - Gets collection of references to Network Interfaces 5901 NetworkInterfaces *[]Interface `json:"networkInterfaces,omitempty"` 5902 // Subnets - Gets collection of references to subnets 5903 Subnets *[]Subnet `json:"subnets,omitempty"` 5904 // ResourceGUID - Gets or sets resource GUID property of the network security group resource 5905 ResourceGUID *string `json:"resourceGuid,omitempty"` 5906 // ProvisioningState - Gets or sets Provisioning state of the PublicIP resource Updating/Deleting/Failed 5907 ProvisioningState *string `json:"provisioningState,omitempty"` 5908} 5909 5910// SecurityGroupsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a 5911// long-running operation. 5912type SecurityGroupsCreateOrUpdateFuture struct { 5913 azure.FutureAPI 5914 // Result returns the result of the asynchronous operation. 5915 // If the operation has not completed it will return an error. 5916 Result func(SecurityGroupsClient) (SecurityGroup, error) 5917} 5918 5919// SecurityGroupsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running 5920// operation. 5921type SecurityGroupsDeleteFuture struct { 5922 azure.FutureAPI 5923 // Result returns the result of the asynchronous operation. 5924 // If the operation has not completed it will return an error. 5925 Result func(SecurityGroupsClient) (autorest.Response, error) 5926} 5927 5928// SecurityRule network security rule 5929type SecurityRule struct { 5930 autorest.Response `json:"-"` 5931 *SecurityRulePropertiesFormat `json:"properties,omitempty"` 5932 // Name - Gets name of the resource that is unique within a resource group. This name can be used to access the resource 5933 Name *string `json:"name,omitempty"` 5934 // Etag - A unique read-only string that changes whenever the resource is updated 5935 Etag *string `json:"etag,omitempty"` 5936 // ID - Resource Id 5937 ID *string `json:"id,omitempty"` 5938} 5939 5940// MarshalJSON is the custom marshaler for SecurityRule. 5941func (sr SecurityRule) MarshalJSON() ([]byte, error) { 5942 objectMap := make(map[string]interface{}) 5943 if sr.SecurityRulePropertiesFormat != nil { 5944 objectMap["properties"] = sr.SecurityRulePropertiesFormat 5945 } 5946 if sr.Name != nil { 5947 objectMap["name"] = sr.Name 5948 } 5949 if sr.Etag != nil { 5950 objectMap["etag"] = sr.Etag 5951 } 5952 if sr.ID != nil { 5953 objectMap["id"] = sr.ID 5954 } 5955 return json.Marshal(objectMap) 5956} 5957 5958// UnmarshalJSON is the custom unmarshaler for SecurityRule struct. 5959func (sr *SecurityRule) UnmarshalJSON(body []byte) error { 5960 var m map[string]*json.RawMessage 5961 err := json.Unmarshal(body, &m) 5962 if err != nil { 5963 return err 5964 } 5965 for k, v := range m { 5966 switch k { 5967 case "properties": 5968 if v != nil { 5969 var securityRulePropertiesFormat SecurityRulePropertiesFormat 5970 err = json.Unmarshal(*v, &securityRulePropertiesFormat) 5971 if err != nil { 5972 return err 5973 } 5974 sr.SecurityRulePropertiesFormat = &securityRulePropertiesFormat 5975 } 5976 case "name": 5977 if v != nil { 5978 var name string 5979 err = json.Unmarshal(*v, &name) 5980 if err != nil { 5981 return err 5982 } 5983 sr.Name = &name 5984 } 5985 case "etag": 5986 if v != nil { 5987 var etag string 5988 err = json.Unmarshal(*v, &etag) 5989 if err != nil { 5990 return err 5991 } 5992 sr.Etag = &etag 5993 } 5994 case "id": 5995 if v != nil { 5996 var ID string 5997 err = json.Unmarshal(*v, &ID) 5998 if err != nil { 5999 return err 6000 } 6001 sr.ID = &ID 6002 } 6003 } 6004 } 6005 6006 return nil 6007} 6008 6009// SecurityRuleListResult response for ListSecurityRule Api service callRetrieves all security rules that 6010// belongs to a network security group 6011type SecurityRuleListResult struct { 6012 autorest.Response `json:"-"` 6013 // Value - Gets security rules in a network security group 6014 Value *[]SecurityRule `json:"value,omitempty"` 6015 // NextLink - Gets the URL to get the next set of results. 6016 NextLink *string `json:"nextLink,omitempty"` 6017} 6018 6019// SecurityRuleListResultIterator provides access to a complete listing of SecurityRule values. 6020type SecurityRuleListResultIterator struct { 6021 i int 6022 page SecurityRuleListResultPage 6023} 6024 6025// NextWithContext advances to the next value. If there was an error making 6026// the request the iterator does not advance and the error is returned. 6027func (iter *SecurityRuleListResultIterator) NextWithContext(ctx context.Context) (err error) { 6028 if tracing.IsEnabled() { 6029 ctx = tracing.StartSpan(ctx, fqdn+"/SecurityRuleListResultIterator.NextWithContext") 6030 defer func() { 6031 sc := -1 6032 if iter.Response().Response.Response != nil { 6033 sc = iter.Response().Response.Response.StatusCode 6034 } 6035 tracing.EndSpan(ctx, sc, err) 6036 }() 6037 } 6038 iter.i++ 6039 if iter.i < len(iter.page.Values()) { 6040 return nil 6041 } 6042 err = iter.page.NextWithContext(ctx) 6043 if err != nil { 6044 iter.i-- 6045 return err 6046 } 6047 iter.i = 0 6048 return nil 6049} 6050 6051// Next advances to the next value. If there was an error making 6052// the request the iterator does not advance and the error is returned. 6053// Deprecated: Use NextWithContext() instead. 6054func (iter *SecurityRuleListResultIterator) Next() error { 6055 return iter.NextWithContext(context.Background()) 6056} 6057 6058// NotDone returns true if the enumeration should be started or is not yet complete. 6059func (iter SecurityRuleListResultIterator) NotDone() bool { 6060 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 6061} 6062 6063// Response returns the raw server response from the last page request. 6064func (iter SecurityRuleListResultIterator) Response() SecurityRuleListResult { 6065 return iter.page.Response() 6066} 6067 6068// Value returns the current value or a zero-initialized value if the 6069// iterator has advanced beyond the end of the collection. 6070func (iter SecurityRuleListResultIterator) Value() SecurityRule { 6071 if !iter.page.NotDone() { 6072 return SecurityRule{} 6073 } 6074 return iter.page.Values()[iter.i] 6075} 6076 6077// Creates a new instance of the SecurityRuleListResultIterator type. 6078func NewSecurityRuleListResultIterator(page SecurityRuleListResultPage) SecurityRuleListResultIterator { 6079 return SecurityRuleListResultIterator{page: page} 6080} 6081 6082// IsEmpty returns true if the ListResult contains no values. 6083func (srlr SecurityRuleListResult) IsEmpty() bool { 6084 return srlr.Value == nil || len(*srlr.Value) == 0 6085} 6086 6087// hasNextLink returns true if the NextLink is not empty. 6088func (srlr SecurityRuleListResult) hasNextLink() bool { 6089 return srlr.NextLink != nil && len(*srlr.NextLink) != 0 6090} 6091 6092// securityRuleListResultPreparer prepares a request to retrieve the next set of results. 6093// It returns nil if no more results exist. 6094func (srlr SecurityRuleListResult) securityRuleListResultPreparer(ctx context.Context) (*http.Request, error) { 6095 if !srlr.hasNextLink() { 6096 return nil, nil 6097 } 6098 return autorest.Prepare((&http.Request{}).WithContext(ctx), 6099 autorest.AsJSON(), 6100 autorest.AsGet(), 6101 autorest.WithBaseURL(to.String(srlr.NextLink))) 6102} 6103 6104// SecurityRuleListResultPage contains a page of SecurityRule values. 6105type SecurityRuleListResultPage struct { 6106 fn func(context.Context, SecurityRuleListResult) (SecurityRuleListResult, error) 6107 srlr SecurityRuleListResult 6108} 6109 6110// NextWithContext advances to the next page of values. If there was an error making 6111// the request the page does not advance and the error is returned. 6112func (page *SecurityRuleListResultPage) NextWithContext(ctx context.Context) (err error) { 6113 if tracing.IsEnabled() { 6114 ctx = tracing.StartSpan(ctx, fqdn+"/SecurityRuleListResultPage.NextWithContext") 6115 defer func() { 6116 sc := -1 6117 if page.Response().Response.Response != nil { 6118 sc = page.Response().Response.Response.StatusCode 6119 } 6120 tracing.EndSpan(ctx, sc, err) 6121 }() 6122 } 6123 for { 6124 next, err := page.fn(ctx, page.srlr) 6125 if err != nil { 6126 return err 6127 } 6128 page.srlr = next 6129 if !next.hasNextLink() || !next.IsEmpty() { 6130 break 6131 } 6132 } 6133 return nil 6134} 6135 6136// Next advances to the next page of values. If there was an error making 6137// the request the page does not advance and the error is returned. 6138// Deprecated: Use NextWithContext() instead. 6139func (page *SecurityRuleListResultPage) Next() error { 6140 return page.NextWithContext(context.Background()) 6141} 6142 6143// NotDone returns true if the page enumeration should be started or is not yet complete. 6144func (page SecurityRuleListResultPage) NotDone() bool { 6145 return !page.srlr.IsEmpty() 6146} 6147 6148// Response returns the raw server response from the last page request. 6149func (page SecurityRuleListResultPage) Response() SecurityRuleListResult { 6150 return page.srlr 6151} 6152 6153// Values returns the slice of values for the current page or nil if there are no values. 6154func (page SecurityRuleListResultPage) Values() []SecurityRule { 6155 if page.srlr.IsEmpty() { 6156 return nil 6157 } 6158 return *page.srlr.Value 6159} 6160 6161// Creates a new instance of the SecurityRuleListResultPage type. 6162func NewSecurityRuleListResultPage(cur SecurityRuleListResult, getNextPage func(context.Context, SecurityRuleListResult) (SecurityRuleListResult, error)) SecurityRuleListResultPage { 6163 return SecurityRuleListResultPage{ 6164 fn: getNextPage, 6165 srlr: cur, 6166 } 6167} 6168 6169// SecurityRulePropertiesFormat ... 6170type SecurityRulePropertiesFormat struct { 6171 // Description - Gets or sets a description for this rule. Restricted to 140 chars. 6172 Description *string `json:"description,omitempty"` 6173 // Protocol - Gets or sets Network protocol this rule applies to. Can be Tcp, Udp or All(*). Possible values include: 'TCP', 'UDP', 'Asterisk' 6174 Protocol SecurityRuleProtocol `json:"protocol,omitempty"` 6175 // SourcePortRange - Gets or sets Source Port or Range. Integer or range between 0 and 65535. Asterisk '*' can also be used to match all ports. 6176 SourcePortRange *string `json:"sourcePortRange,omitempty"` 6177 // DestinationPortRange - Gets or sets Destination Port or Range. Integer or range between 0 and 65535. Asterisk '*' can also be used to match all ports. 6178 DestinationPortRange *string `json:"destinationPortRange,omitempty"` 6179 // SourceAddressPrefix - Gets or sets source address prefix. CIDR or source IP range. Asterisk '*' can also be used to match all source IPs. Default tags such as 'VirtualNetwork', 'AzureLoadBalancer' and 'Internet' can also be used. If this is an ingress rule, specifies where network traffic originates from. 6180 SourceAddressPrefix *string `json:"sourceAddressPrefix,omitempty"` 6181 // DestinationAddressPrefix - Gets or sets destination address prefix. CIDR or source IP range. Asterisk '*' can also be used to match all source IPs. Default tags such as 'VirtualNetwork', 'AzureLoadBalancer' and 'Internet' can also be used. 6182 DestinationAddressPrefix *string `json:"destinationAddressPrefix,omitempty"` 6183 // Access - Gets or sets network traffic is allowed or denied. Possible values are 'Allow' and 'Deny'. Possible values include: 'Allow', 'Deny' 6184 Access SecurityRuleAccess `json:"access,omitempty"` 6185 // Priority - Gets or sets the priority of the rule. The value can be between 100 and 4096. The priority number must be unique for each rule in the collection. The lower the priority number, the higher the priority of the rule. 6186 Priority *int32 `json:"priority,omitempty"` 6187 // Direction - Gets or sets the direction of the rule.InBound or Outbound. The direction specifies if rule will be evaluated on incoming or outgoing traffic. Possible values include: 'Inbound', 'Outbound' 6188 Direction SecurityRuleDirection `json:"direction,omitempty"` 6189 // ProvisioningState - Gets or sets Provisioning state of the PublicIP resource Updating/Deleting/Failed 6190 ProvisioningState *string `json:"provisioningState,omitempty"` 6191} 6192 6193// SecurityRulesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a 6194// long-running operation. 6195type SecurityRulesCreateOrUpdateFuture struct { 6196 azure.FutureAPI 6197 // Result returns the result of the asynchronous operation. 6198 // If the operation has not completed it will return an error. 6199 Result func(SecurityRulesClient) (SecurityRule, error) 6200} 6201 6202// SecurityRulesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running 6203// operation. 6204type SecurityRulesDeleteFuture struct { 6205 azure.FutureAPI 6206 // Result returns the result of the asynchronous operation. 6207 // If the operation has not completed it will return an error. 6208 Result func(SecurityRulesClient) (autorest.Response, error) 6209} 6210 6211// String ... 6212type String struct { 6213 autorest.Response `json:"-"` 6214 Value *string `json:"value,omitempty"` 6215} 6216 6217// Subnet subnet in a VirtualNetwork resource 6218type Subnet struct { 6219 autorest.Response `json:"-"` 6220 *SubnetPropertiesFormat `json:"properties,omitempty"` 6221 // Name - Gets name of the resource that is unique within a resource group. This name can be used to access the resource 6222 Name *string `json:"name,omitempty"` 6223 // Etag - A unique read-only string that changes whenever the resource is updated 6224 Etag *string `json:"etag,omitempty"` 6225 // ID - Resource Id 6226 ID *string `json:"id,omitempty"` 6227} 6228 6229// MarshalJSON is the custom marshaler for Subnet. 6230func (s Subnet) MarshalJSON() ([]byte, error) { 6231 objectMap := make(map[string]interface{}) 6232 if s.SubnetPropertiesFormat != nil { 6233 objectMap["properties"] = s.SubnetPropertiesFormat 6234 } 6235 if s.Name != nil { 6236 objectMap["name"] = s.Name 6237 } 6238 if s.Etag != nil { 6239 objectMap["etag"] = s.Etag 6240 } 6241 if s.ID != nil { 6242 objectMap["id"] = s.ID 6243 } 6244 return json.Marshal(objectMap) 6245} 6246 6247// UnmarshalJSON is the custom unmarshaler for Subnet struct. 6248func (s *Subnet) UnmarshalJSON(body []byte) error { 6249 var m map[string]*json.RawMessage 6250 err := json.Unmarshal(body, &m) 6251 if err != nil { 6252 return err 6253 } 6254 for k, v := range m { 6255 switch k { 6256 case "properties": 6257 if v != nil { 6258 var subnetPropertiesFormat SubnetPropertiesFormat 6259 err = json.Unmarshal(*v, &subnetPropertiesFormat) 6260 if err != nil { 6261 return err 6262 } 6263 s.SubnetPropertiesFormat = &subnetPropertiesFormat 6264 } 6265 case "name": 6266 if v != nil { 6267 var name string 6268 err = json.Unmarshal(*v, &name) 6269 if err != nil { 6270 return err 6271 } 6272 s.Name = &name 6273 } 6274 case "etag": 6275 if v != nil { 6276 var etag string 6277 err = json.Unmarshal(*v, &etag) 6278 if err != nil { 6279 return err 6280 } 6281 s.Etag = &etag 6282 } 6283 case "id": 6284 if v != nil { 6285 var ID string 6286 err = json.Unmarshal(*v, &ID) 6287 if err != nil { 6288 return err 6289 } 6290 s.ID = &ID 6291 } 6292 } 6293 } 6294 6295 return nil 6296} 6297 6298// SubnetListResult response for ListSubnets Api service callRetrieves all subnet that belongs to a virtual 6299// network 6300type SubnetListResult struct { 6301 autorest.Response `json:"-"` 6302 // Value - Gets the subnets in a virtual network 6303 Value *[]Subnet `json:"value,omitempty"` 6304 // NextLink - Gets the URL to get the next set of results. 6305 NextLink *string `json:"nextLink,omitempty"` 6306} 6307 6308// SubnetListResultIterator provides access to a complete listing of Subnet values. 6309type SubnetListResultIterator struct { 6310 i int 6311 page SubnetListResultPage 6312} 6313 6314// NextWithContext advances to the next value. If there was an error making 6315// the request the iterator does not advance and the error is returned. 6316func (iter *SubnetListResultIterator) NextWithContext(ctx context.Context) (err error) { 6317 if tracing.IsEnabled() { 6318 ctx = tracing.StartSpan(ctx, fqdn+"/SubnetListResultIterator.NextWithContext") 6319 defer func() { 6320 sc := -1 6321 if iter.Response().Response.Response != nil { 6322 sc = iter.Response().Response.Response.StatusCode 6323 } 6324 tracing.EndSpan(ctx, sc, err) 6325 }() 6326 } 6327 iter.i++ 6328 if iter.i < len(iter.page.Values()) { 6329 return nil 6330 } 6331 err = iter.page.NextWithContext(ctx) 6332 if err != nil { 6333 iter.i-- 6334 return err 6335 } 6336 iter.i = 0 6337 return nil 6338} 6339 6340// Next advances to the next value. If there was an error making 6341// the request the iterator does not advance and the error is returned. 6342// Deprecated: Use NextWithContext() instead. 6343func (iter *SubnetListResultIterator) Next() error { 6344 return iter.NextWithContext(context.Background()) 6345} 6346 6347// NotDone returns true if the enumeration should be started or is not yet complete. 6348func (iter SubnetListResultIterator) NotDone() bool { 6349 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 6350} 6351 6352// Response returns the raw server response from the last page request. 6353func (iter SubnetListResultIterator) Response() SubnetListResult { 6354 return iter.page.Response() 6355} 6356 6357// Value returns the current value or a zero-initialized value if the 6358// iterator has advanced beyond the end of the collection. 6359func (iter SubnetListResultIterator) Value() Subnet { 6360 if !iter.page.NotDone() { 6361 return Subnet{} 6362 } 6363 return iter.page.Values()[iter.i] 6364} 6365 6366// Creates a new instance of the SubnetListResultIterator type. 6367func NewSubnetListResultIterator(page SubnetListResultPage) SubnetListResultIterator { 6368 return SubnetListResultIterator{page: page} 6369} 6370 6371// IsEmpty returns true if the ListResult contains no values. 6372func (slr SubnetListResult) IsEmpty() bool { 6373 return slr.Value == nil || len(*slr.Value) == 0 6374} 6375 6376// hasNextLink returns true if the NextLink is not empty. 6377func (slr SubnetListResult) hasNextLink() bool { 6378 return slr.NextLink != nil && len(*slr.NextLink) != 0 6379} 6380 6381// subnetListResultPreparer prepares a request to retrieve the next set of results. 6382// It returns nil if no more results exist. 6383func (slr SubnetListResult) subnetListResultPreparer(ctx context.Context) (*http.Request, error) { 6384 if !slr.hasNextLink() { 6385 return nil, nil 6386 } 6387 return autorest.Prepare((&http.Request{}).WithContext(ctx), 6388 autorest.AsJSON(), 6389 autorest.AsGet(), 6390 autorest.WithBaseURL(to.String(slr.NextLink))) 6391} 6392 6393// SubnetListResultPage contains a page of Subnet values. 6394type SubnetListResultPage struct { 6395 fn func(context.Context, SubnetListResult) (SubnetListResult, error) 6396 slr SubnetListResult 6397} 6398 6399// NextWithContext advances to the next page of values. If there was an error making 6400// the request the page does not advance and the error is returned. 6401func (page *SubnetListResultPage) NextWithContext(ctx context.Context) (err error) { 6402 if tracing.IsEnabled() { 6403 ctx = tracing.StartSpan(ctx, fqdn+"/SubnetListResultPage.NextWithContext") 6404 defer func() { 6405 sc := -1 6406 if page.Response().Response.Response != nil { 6407 sc = page.Response().Response.Response.StatusCode 6408 } 6409 tracing.EndSpan(ctx, sc, err) 6410 }() 6411 } 6412 for { 6413 next, err := page.fn(ctx, page.slr) 6414 if err != nil { 6415 return err 6416 } 6417 page.slr = next 6418 if !next.hasNextLink() || !next.IsEmpty() { 6419 break 6420 } 6421 } 6422 return nil 6423} 6424 6425// Next advances to the next page of values. If there was an error making 6426// the request the page does not advance and the error is returned. 6427// Deprecated: Use NextWithContext() instead. 6428func (page *SubnetListResultPage) Next() error { 6429 return page.NextWithContext(context.Background()) 6430} 6431 6432// NotDone returns true if the page enumeration should be started or is not yet complete. 6433func (page SubnetListResultPage) NotDone() bool { 6434 return !page.slr.IsEmpty() 6435} 6436 6437// Response returns the raw server response from the last page request. 6438func (page SubnetListResultPage) Response() SubnetListResult { 6439 return page.slr 6440} 6441 6442// Values returns the slice of values for the current page or nil if there are no values. 6443func (page SubnetListResultPage) Values() []Subnet { 6444 if page.slr.IsEmpty() { 6445 return nil 6446 } 6447 return *page.slr.Value 6448} 6449 6450// Creates a new instance of the SubnetListResultPage type. 6451func NewSubnetListResultPage(cur SubnetListResult, getNextPage func(context.Context, SubnetListResult) (SubnetListResult, error)) SubnetListResultPage { 6452 return SubnetListResultPage{ 6453 fn: getNextPage, 6454 slr: cur, 6455 } 6456} 6457 6458// SubnetPropertiesFormat ... 6459type SubnetPropertiesFormat struct { 6460 // AddressPrefix - Gets or sets Address prefix for the subnet. 6461 AddressPrefix *string `json:"addressPrefix,omitempty"` 6462 // NetworkSecurityGroup - Gets or sets the reference of the NetworkSecurityGroup resource 6463 NetworkSecurityGroup *SecurityGroup `json:"networkSecurityGroup,omitempty"` 6464 // RouteTable - Gets or sets the reference of the RouteTable resource 6465 RouteTable *RouteTable `json:"routeTable,omitempty"` 6466 // IPConfigurations - Gets array of references to the network interface IP configurations using subnet 6467 IPConfigurations *[]IPConfiguration `json:"ipConfigurations,omitempty"` 6468 // ProvisioningState - Gets or sets Provisioning state of the PublicIP resource Updating/Deleting/Failed 6469 ProvisioningState *string `json:"provisioningState,omitempty"` 6470} 6471 6472// SubnetsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running 6473// operation. 6474type SubnetsCreateOrUpdateFuture struct { 6475 azure.FutureAPI 6476 // Result returns the result of the asynchronous operation. 6477 // If the operation has not completed it will return an error. 6478 Result func(SubnetsClient) (Subnet, error) 6479} 6480 6481// SubnetsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running 6482// operation. 6483type SubnetsDeleteFuture struct { 6484 azure.FutureAPI 6485 // Result returns the result of the asynchronous operation. 6486 // If the operation has not completed it will return an error. 6487 Result func(SubnetsClient) (autorest.Response, error) 6488} 6489 6490// SubResource ... 6491type SubResource struct { 6492 // ID - Resource Id 6493 ID *string `json:"id,omitempty"` 6494} 6495 6496// Usage describes Network Resource Usage. 6497type Usage struct { 6498 // Unit - Gets or sets an enum describing the unit of measurement. 6499 Unit *string `json:"unit,omitempty"` 6500 // CurrentValue - Gets or sets the current value of the usage. 6501 CurrentValue *int64 `json:"currentValue,omitempty"` 6502 // Limit - Gets or sets the limit of usage. 6503 Limit *int64 `json:"limit,omitempty"` 6504 // Name - Gets or sets the name of the type of usage. 6505 Name *UsageName `json:"name,omitempty"` 6506} 6507 6508// UsageName the Usage Names. 6509type UsageName struct { 6510 // Value - Gets or sets a string describing the resource name. 6511 Value *string `json:"value,omitempty"` 6512 // LocalizedValue - Gets or sets a localized string describing the resource name. 6513 LocalizedValue *string `json:"localizedValue,omitempty"` 6514} 6515 6516// UsagesListResult the List Usages operation response. 6517type UsagesListResult struct { 6518 autorest.Response `json:"-"` 6519 // Value - Gets or sets the list Network Resource Usages. 6520 Value *[]Usage `json:"value,omitempty"` 6521} 6522 6523// VirtualNetwork virtual Network resource 6524type VirtualNetwork struct { 6525 autorest.Response `json:"-"` 6526 *VirtualNetworkPropertiesFormat `json:"properties,omitempty"` 6527 // Etag - Gets a unique read-only string that changes whenever the resource is updated 6528 Etag *string `json:"etag,omitempty"` 6529 // ID - Resource Id 6530 ID *string `json:"id,omitempty"` 6531 // Name - READ-ONLY; Resource name 6532 Name *string `json:"name,omitempty"` 6533 // Type - READ-ONLY; Resource type 6534 Type *string `json:"type,omitempty"` 6535 // Location - Resource location 6536 Location *string `json:"location,omitempty"` 6537 // Tags - Resource tags 6538 Tags map[string]*string `json:"tags"` 6539} 6540 6541// MarshalJSON is the custom marshaler for VirtualNetwork. 6542func (vn VirtualNetwork) MarshalJSON() ([]byte, error) { 6543 objectMap := make(map[string]interface{}) 6544 if vn.VirtualNetworkPropertiesFormat != nil { 6545 objectMap["properties"] = vn.VirtualNetworkPropertiesFormat 6546 } 6547 if vn.Etag != nil { 6548 objectMap["etag"] = vn.Etag 6549 } 6550 if vn.ID != nil { 6551 objectMap["id"] = vn.ID 6552 } 6553 if vn.Location != nil { 6554 objectMap["location"] = vn.Location 6555 } 6556 if vn.Tags != nil { 6557 objectMap["tags"] = vn.Tags 6558 } 6559 return json.Marshal(objectMap) 6560} 6561 6562// UnmarshalJSON is the custom unmarshaler for VirtualNetwork struct. 6563func (vn *VirtualNetwork) UnmarshalJSON(body []byte) error { 6564 var m map[string]*json.RawMessage 6565 err := json.Unmarshal(body, &m) 6566 if err != nil { 6567 return err 6568 } 6569 for k, v := range m { 6570 switch k { 6571 case "properties": 6572 if v != nil { 6573 var virtualNetworkPropertiesFormat VirtualNetworkPropertiesFormat 6574 err = json.Unmarshal(*v, &virtualNetworkPropertiesFormat) 6575 if err != nil { 6576 return err 6577 } 6578 vn.VirtualNetworkPropertiesFormat = &virtualNetworkPropertiesFormat 6579 } 6580 case "etag": 6581 if v != nil { 6582 var etag string 6583 err = json.Unmarshal(*v, &etag) 6584 if err != nil { 6585 return err 6586 } 6587 vn.Etag = &etag 6588 } 6589 case "id": 6590 if v != nil { 6591 var ID string 6592 err = json.Unmarshal(*v, &ID) 6593 if err != nil { 6594 return err 6595 } 6596 vn.ID = &ID 6597 } 6598 case "name": 6599 if v != nil { 6600 var name string 6601 err = json.Unmarshal(*v, &name) 6602 if err != nil { 6603 return err 6604 } 6605 vn.Name = &name 6606 } 6607 case "type": 6608 if v != nil { 6609 var typeVar string 6610 err = json.Unmarshal(*v, &typeVar) 6611 if err != nil { 6612 return err 6613 } 6614 vn.Type = &typeVar 6615 } 6616 case "location": 6617 if v != nil { 6618 var location string 6619 err = json.Unmarshal(*v, &location) 6620 if err != nil { 6621 return err 6622 } 6623 vn.Location = &location 6624 } 6625 case "tags": 6626 if v != nil { 6627 var tags map[string]*string 6628 err = json.Unmarshal(*v, &tags) 6629 if err != nil { 6630 return err 6631 } 6632 vn.Tags = tags 6633 } 6634 } 6635 } 6636 6637 return nil 6638} 6639 6640// VirtualNetworkGateway a common class for general resource information 6641type VirtualNetworkGateway struct { 6642 autorest.Response `json:"-"` 6643 *VirtualNetworkGatewayPropertiesFormat `json:"properties,omitempty"` 6644 // Etag - Gets a unique read-only string that changes whenever the resource is updated 6645 Etag *string `json:"etag,omitempty"` 6646 // ID - Resource Id 6647 ID *string `json:"id,omitempty"` 6648 // Name - READ-ONLY; Resource name 6649 Name *string `json:"name,omitempty"` 6650 // Type - READ-ONLY; Resource type 6651 Type *string `json:"type,omitempty"` 6652 // Location - Resource location 6653 Location *string `json:"location,omitempty"` 6654 // Tags - Resource tags 6655 Tags map[string]*string `json:"tags"` 6656} 6657 6658// MarshalJSON is the custom marshaler for VirtualNetworkGateway. 6659func (vng VirtualNetworkGateway) MarshalJSON() ([]byte, error) { 6660 objectMap := make(map[string]interface{}) 6661 if vng.VirtualNetworkGatewayPropertiesFormat != nil { 6662 objectMap["properties"] = vng.VirtualNetworkGatewayPropertiesFormat 6663 } 6664 if vng.Etag != nil { 6665 objectMap["etag"] = vng.Etag 6666 } 6667 if vng.ID != nil { 6668 objectMap["id"] = vng.ID 6669 } 6670 if vng.Location != nil { 6671 objectMap["location"] = vng.Location 6672 } 6673 if vng.Tags != nil { 6674 objectMap["tags"] = vng.Tags 6675 } 6676 return json.Marshal(objectMap) 6677} 6678 6679// UnmarshalJSON is the custom unmarshaler for VirtualNetworkGateway struct. 6680func (vng *VirtualNetworkGateway) UnmarshalJSON(body []byte) error { 6681 var m map[string]*json.RawMessage 6682 err := json.Unmarshal(body, &m) 6683 if err != nil { 6684 return err 6685 } 6686 for k, v := range m { 6687 switch k { 6688 case "properties": 6689 if v != nil { 6690 var virtualNetworkGatewayPropertiesFormat VirtualNetworkGatewayPropertiesFormat 6691 err = json.Unmarshal(*v, &virtualNetworkGatewayPropertiesFormat) 6692 if err != nil { 6693 return err 6694 } 6695 vng.VirtualNetworkGatewayPropertiesFormat = &virtualNetworkGatewayPropertiesFormat 6696 } 6697 case "etag": 6698 if v != nil { 6699 var etag string 6700 err = json.Unmarshal(*v, &etag) 6701 if err != nil { 6702 return err 6703 } 6704 vng.Etag = &etag 6705 } 6706 case "id": 6707 if v != nil { 6708 var ID string 6709 err = json.Unmarshal(*v, &ID) 6710 if err != nil { 6711 return err 6712 } 6713 vng.ID = &ID 6714 } 6715 case "name": 6716 if v != nil { 6717 var name string 6718 err = json.Unmarshal(*v, &name) 6719 if err != nil { 6720 return err 6721 } 6722 vng.Name = &name 6723 } 6724 case "type": 6725 if v != nil { 6726 var typeVar string 6727 err = json.Unmarshal(*v, &typeVar) 6728 if err != nil { 6729 return err 6730 } 6731 vng.Type = &typeVar 6732 } 6733 case "location": 6734 if v != nil { 6735 var location string 6736 err = json.Unmarshal(*v, &location) 6737 if err != nil { 6738 return err 6739 } 6740 vng.Location = &location 6741 } 6742 case "tags": 6743 if v != nil { 6744 var tags map[string]*string 6745 err = json.Unmarshal(*v, &tags) 6746 if err != nil { 6747 return err 6748 } 6749 vng.Tags = tags 6750 } 6751 } 6752 } 6753 6754 return nil 6755} 6756 6757// VirtualNetworkGatewayConnection a common class for general resource information 6758type VirtualNetworkGatewayConnection struct { 6759 autorest.Response `json:"-"` 6760 *VirtualNetworkGatewayConnectionPropertiesFormat `json:"properties,omitempty"` 6761 // Etag - Gets a unique read-only string that changes whenever the resource is updated 6762 Etag *string `json:"etag,omitempty"` 6763 // ID - Resource Id 6764 ID *string `json:"id,omitempty"` 6765 // Name - READ-ONLY; Resource name 6766 Name *string `json:"name,omitempty"` 6767 // Type - READ-ONLY; Resource type 6768 Type *string `json:"type,omitempty"` 6769 // Location - Resource location 6770 Location *string `json:"location,omitempty"` 6771 // Tags - Resource tags 6772 Tags map[string]*string `json:"tags"` 6773} 6774 6775// MarshalJSON is the custom marshaler for VirtualNetworkGatewayConnection. 6776func (vngc VirtualNetworkGatewayConnection) MarshalJSON() ([]byte, error) { 6777 objectMap := make(map[string]interface{}) 6778 if vngc.VirtualNetworkGatewayConnectionPropertiesFormat != nil { 6779 objectMap["properties"] = vngc.VirtualNetworkGatewayConnectionPropertiesFormat 6780 } 6781 if vngc.Etag != nil { 6782 objectMap["etag"] = vngc.Etag 6783 } 6784 if vngc.ID != nil { 6785 objectMap["id"] = vngc.ID 6786 } 6787 if vngc.Location != nil { 6788 objectMap["location"] = vngc.Location 6789 } 6790 if vngc.Tags != nil { 6791 objectMap["tags"] = vngc.Tags 6792 } 6793 return json.Marshal(objectMap) 6794} 6795 6796// UnmarshalJSON is the custom unmarshaler for VirtualNetworkGatewayConnection struct. 6797func (vngc *VirtualNetworkGatewayConnection) UnmarshalJSON(body []byte) error { 6798 var m map[string]*json.RawMessage 6799 err := json.Unmarshal(body, &m) 6800 if err != nil { 6801 return err 6802 } 6803 for k, v := range m { 6804 switch k { 6805 case "properties": 6806 if v != nil { 6807 var virtualNetworkGatewayConnectionPropertiesFormat VirtualNetworkGatewayConnectionPropertiesFormat 6808 err = json.Unmarshal(*v, &virtualNetworkGatewayConnectionPropertiesFormat) 6809 if err != nil { 6810 return err 6811 } 6812 vngc.VirtualNetworkGatewayConnectionPropertiesFormat = &virtualNetworkGatewayConnectionPropertiesFormat 6813 } 6814 case "etag": 6815 if v != nil { 6816 var etag string 6817 err = json.Unmarshal(*v, &etag) 6818 if err != nil { 6819 return err 6820 } 6821 vngc.Etag = &etag 6822 } 6823 case "id": 6824 if v != nil { 6825 var ID string 6826 err = json.Unmarshal(*v, &ID) 6827 if err != nil { 6828 return err 6829 } 6830 vngc.ID = &ID 6831 } 6832 case "name": 6833 if v != nil { 6834 var name string 6835 err = json.Unmarshal(*v, &name) 6836 if err != nil { 6837 return err 6838 } 6839 vngc.Name = &name 6840 } 6841 case "type": 6842 if v != nil { 6843 var typeVar string 6844 err = json.Unmarshal(*v, &typeVar) 6845 if err != nil { 6846 return err 6847 } 6848 vngc.Type = &typeVar 6849 } 6850 case "location": 6851 if v != nil { 6852 var location string 6853 err = json.Unmarshal(*v, &location) 6854 if err != nil { 6855 return err 6856 } 6857 vngc.Location = &location 6858 } 6859 case "tags": 6860 if v != nil { 6861 var tags map[string]*string 6862 err = json.Unmarshal(*v, &tags) 6863 if err != nil { 6864 return err 6865 } 6866 vngc.Tags = tags 6867 } 6868 } 6869 } 6870 6871 return nil 6872} 6873 6874// VirtualNetworkGatewayConnectionListResult response for ListVirtualNetworkGatewayConnections Api service 6875// call 6876type VirtualNetworkGatewayConnectionListResult struct { 6877 autorest.Response `json:"-"` 6878 // Value - Gets List of VirtualNetworkGatewayConnections that exists in a resource group 6879 Value *[]VirtualNetworkGatewayConnection `json:"value,omitempty"` 6880 // NextLink - Gets the URL to get the next set of results. 6881 NextLink *string `json:"nextLink,omitempty"` 6882} 6883 6884// VirtualNetworkGatewayConnectionListResultIterator provides access to a complete listing of 6885// VirtualNetworkGatewayConnection values. 6886type VirtualNetworkGatewayConnectionListResultIterator struct { 6887 i int 6888 page VirtualNetworkGatewayConnectionListResultPage 6889} 6890 6891// NextWithContext advances to the next value. If there was an error making 6892// the request the iterator does not advance and the error is returned. 6893func (iter *VirtualNetworkGatewayConnectionListResultIterator) NextWithContext(ctx context.Context) (err error) { 6894 if tracing.IsEnabled() { 6895 ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewayConnectionListResultIterator.NextWithContext") 6896 defer func() { 6897 sc := -1 6898 if iter.Response().Response.Response != nil { 6899 sc = iter.Response().Response.Response.StatusCode 6900 } 6901 tracing.EndSpan(ctx, sc, err) 6902 }() 6903 } 6904 iter.i++ 6905 if iter.i < len(iter.page.Values()) { 6906 return nil 6907 } 6908 err = iter.page.NextWithContext(ctx) 6909 if err != nil { 6910 iter.i-- 6911 return err 6912 } 6913 iter.i = 0 6914 return nil 6915} 6916 6917// Next advances to the next value. If there was an error making 6918// the request the iterator does not advance and the error is returned. 6919// Deprecated: Use NextWithContext() instead. 6920func (iter *VirtualNetworkGatewayConnectionListResultIterator) Next() error { 6921 return iter.NextWithContext(context.Background()) 6922} 6923 6924// NotDone returns true if the enumeration should be started or is not yet complete. 6925func (iter VirtualNetworkGatewayConnectionListResultIterator) NotDone() bool { 6926 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 6927} 6928 6929// Response returns the raw server response from the last page request. 6930func (iter VirtualNetworkGatewayConnectionListResultIterator) Response() VirtualNetworkGatewayConnectionListResult { 6931 return iter.page.Response() 6932} 6933 6934// Value returns the current value or a zero-initialized value if the 6935// iterator has advanced beyond the end of the collection. 6936func (iter VirtualNetworkGatewayConnectionListResultIterator) Value() VirtualNetworkGatewayConnection { 6937 if !iter.page.NotDone() { 6938 return VirtualNetworkGatewayConnection{} 6939 } 6940 return iter.page.Values()[iter.i] 6941} 6942 6943// Creates a new instance of the VirtualNetworkGatewayConnectionListResultIterator type. 6944func NewVirtualNetworkGatewayConnectionListResultIterator(page VirtualNetworkGatewayConnectionListResultPage) VirtualNetworkGatewayConnectionListResultIterator { 6945 return VirtualNetworkGatewayConnectionListResultIterator{page: page} 6946} 6947 6948// IsEmpty returns true if the ListResult contains no values. 6949func (vngclr VirtualNetworkGatewayConnectionListResult) IsEmpty() bool { 6950 return vngclr.Value == nil || len(*vngclr.Value) == 0 6951} 6952 6953// hasNextLink returns true if the NextLink is not empty. 6954func (vngclr VirtualNetworkGatewayConnectionListResult) hasNextLink() bool { 6955 return vngclr.NextLink != nil && len(*vngclr.NextLink) != 0 6956} 6957 6958// virtualNetworkGatewayConnectionListResultPreparer prepares a request to retrieve the next set of results. 6959// It returns nil if no more results exist. 6960func (vngclr VirtualNetworkGatewayConnectionListResult) virtualNetworkGatewayConnectionListResultPreparer(ctx context.Context) (*http.Request, error) { 6961 if !vngclr.hasNextLink() { 6962 return nil, nil 6963 } 6964 return autorest.Prepare((&http.Request{}).WithContext(ctx), 6965 autorest.AsJSON(), 6966 autorest.AsGet(), 6967 autorest.WithBaseURL(to.String(vngclr.NextLink))) 6968} 6969 6970// VirtualNetworkGatewayConnectionListResultPage contains a page of VirtualNetworkGatewayConnection values. 6971type VirtualNetworkGatewayConnectionListResultPage struct { 6972 fn func(context.Context, VirtualNetworkGatewayConnectionListResult) (VirtualNetworkGatewayConnectionListResult, error) 6973 vngclr VirtualNetworkGatewayConnectionListResult 6974} 6975 6976// NextWithContext advances to the next page of values. If there was an error making 6977// the request the page does not advance and the error is returned. 6978func (page *VirtualNetworkGatewayConnectionListResultPage) NextWithContext(ctx context.Context) (err error) { 6979 if tracing.IsEnabled() { 6980 ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewayConnectionListResultPage.NextWithContext") 6981 defer func() { 6982 sc := -1 6983 if page.Response().Response.Response != nil { 6984 sc = page.Response().Response.Response.StatusCode 6985 } 6986 tracing.EndSpan(ctx, sc, err) 6987 }() 6988 } 6989 for { 6990 next, err := page.fn(ctx, page.vngclr) 6991 if err != nil { 6992 return err 6993 } 6994 page.vngclr = next 6995 if !next.hasNextLink() || !next.IsEmpty() { 6996 break 6997 } 6998 } 6999 return nil 7000} 7001 7002// Next advances to the next page of values. If there was an error making 7003// the request the page does not advance and the error is returned. 7004// Deprecated: Use NextWithContext() instead. 7005func (page *VirtualNetworkGatewayConnectionListResultPage) Next() error { 7006 return page.NextWithContext(context.Background()) 7007} 7008 7009// NotDone returns true if the page enumeration should be started or is not yet complete. 7010func (page VirtualNetworkGatewayConnectionListResultPage) NotDone() bool { 7011 return !page.vngclr.IsEmpty() 7012} 7013 7014// Response returns the raw server response from the last page request. 7015func (page VirtualNetworkGatewayConnectionListResultPage) Response() VirtualNetworkGatewayConnectionListResult { 7016 return page.vngclr 7017} 7018 7019// Values returns the slice of values for the current page or nil if there are no values. 7020func (page VirtualNetworkGatewayConnectionListResultPage) Values() []VirtualNetworkGatewayConnection { 7021 if page.vngclr.IsEmpty() { 7022 return nil 7023 } 7024 return *page.vngclr.Value 7025} 7026 7027// Creates a new instance of the VirtualNetworkGatewayConnectionListResultPage type. 7028func NewVirtualNetworkGatewayConnectionListResultPage(cur VirtualNetworkGatewayConnectionListResult, getNextPage func(context.Context, VirtualNetworkGatewayConnectionListResult) (VirtualNetworkGatewayConnectionListResult, error)) VirtualNetworkGatewayConnectionListResultPage { 7029 return VirtualNetworkGatewayConnectionListResultPage{ 7030 fn: getNextPage, 7031 vngclr: cur, 7032 } 7033} 7034 7035// VirtualNetworkGatewayConnectionPropertiesFormat virtualNetworkGatewayConnection properties 7036type VirtualNetworkGatewayConnectionPropertiesFormat struct { 7037 // AuthorizationKey - The authorizationKey. 7038 AuthorizationKey *string `json:"authorizationKey,omitempty"` 7039 VirtualNetworkGateway1 *VirtualNetworkGateway `json:"virtualNetworkGateway1,omitempty"` 7040 VirtualNetworkGateway2 *VirtualNetworkGateway `json:"virtualNetworkGateway2,omitempty"` 7041 LocalNetworkGateway2 *LocalNetworkGateway `json:"localNetworkGateway2,omitempty"` 7042 // ConnectionType - Gateway connection type IPsec/Dedicated/VpnClient/Vnet2Vnet. Possible values include: 'IPsec', 'Vnet2Vnet', 'ExpressRoute', 'VPNClient' 7043 ConnectionType VirtualNetworkGatewayConnectionType `json:"connectionType,omitempty"` 7044 // RoutingWeight - The Routing weight. 7045 RoutingWeight *int32 `json:"routingWeight,omitempty"` 7046 // SharedKey - The IPsec share key. 7047 SharedKey *string `json:"sharedKey,omitempty"` 7048 // ConnectionStatus - Virtual network Gateway connection status. Possible values include: 'Unknown', 'Connecting', 'Connected', 'NotConnected' 7049 ConnectionStatus VirtualNetworkGatewayConnectionStatus `json:"connectionStatus,omitempty"` 7050 // EgressBytesTransferred - The Egress Bytes Transferred in this connection 7051 EgressBytesTransferred *int64 `json:"egressBytesTransferred,omitempty"` 7052 // IngressBytesTransferred - The Ingress Bytes Transferred in this connection 7053 IngressBytesTransferred *int64 `json:"ingressBytesTransferred,omitempty"` 7054 // Peer - The reference to peerings resource. 7055 Peer *SubResource `json:"peer,omitempty"` 7056 // EnableBgp - EnableBgp Flag 7057 EnableBgp *bool `json:"enableBgp,omitempty"` 7058 // ResourceGUID - Gets or sets resource GUID property of the VirtualNetworkGatewayConnection resource 7059 ResourceGUID *string `json:"resourceGuid,omitempty"` 7060 // ProvisioningState - Gets or sets Provisioning state of the VirtualNetworkGatewayConnection resource Updating/Deleting/Failed 7061 ProvisioningState *string `json:"provisioningState,omitempty"` 7062} 7063 7064// VirtualNetworkGatewayConnectionsCreateOrUpdateFuture an abstraction for monitoring and retrieving the 7065// results of a long-running operation. 7066type VirtualNetworkGatewayConnectionsCreateOrUpdateFuture struct { 7067 azure.FutureAPI 7068 // Result returns the result of the asynchronous operation. 7069 // If the operation has not completed it will return an error. 7070 Result func(VirtualNetworkGatewayConnectionsClient) (VirtualNetworkGatewayConnection, error) 7071} 7072 7073// VirtualNetworkGatewayConnectionsDeleteFuture an abstraction for monitoring and retrieving the results of 7074// a long-running operation. 7075type VirtualNetworkGatewayConnectionsDeleteFuture struct { 7076 azure.FutureAPI 7077 // Result returns the result of the asynchronous operation. 7078 // If the operation has not completed it will return an error. 7079 Result func(VirtualNetworkGatewayConnectionsClient) (autorest.Response, error) 7080} 7081 7082// VirtualNetworkGatewayConnectionsResetSharedKeyFuture an abstraction for monitoring and retrieving the 7083// results of a long-running operation. 7084type VirtualNetworkGatewayConnectionsResetSharedKeyFuture struct { 7085 azure.FutureAPI 7086 // Result returns the result of the asynchronous operation. 7087 // If the operation has not completed it will return an error. 7088 Result func(VirtualNetworkGatewayConnectionsClient) (ConnectionResetSharedKey, error) 7089} 7090 7091// VirtualNetworkGatewayConnectionsSetSharedKeyFuture an abstraction for monitoring and retrieving the 7092// results of a long-running operation. 7093type VirtualNetworkGatewayConnectionsSetSharedKeyFuture struct { 7094 azure.FutureAPI 7095 // Result returns the result of the asynchronous operation. 7096 // If the operation has not completed it will return an error. 7097 Result func(VirtualNetworkGatewayConnectionsClient) (ConnectionSharedKey, error) 7098} 7099 7100// VirtualNetworkGatewayIPConfiguration ipConfiguration for Virtual network gateway 7101type VirtualNetworkGatewayIPConfiguration struct { 7102 *VirtualNetworkGatewayIPConfigurationPropertiesFormat `json:"properties,omitempty"` 7103 // Name - Gets name of the resource that is unique within a resource group. This name can be used to access the resource 7104 Name *string `json:"name,omitempty"` 7105 // Etag - A unique read-only string that changes whenever the resource is updated 7106 Etag *string `json:"etag,omitempty"` 7107 // ID - Resource Id 7108 ID *string `json:"id,omitempty"` 7109} 7110 7111// MarshalJSON is the custom marshaler for VirtualNetworkGatewayIPConfiguration. 7112func (vngic VirtualNetworkGatewayIPConfiguration) MarshalJSON() ([]byte, error) { 7113 objectMap := make(map[string]interface{}) 7114 if vngic.VirtualNetworkGatewayIPConfigurationPropertiesFormat != nil { 7115 objectMap["properties"] = vngic.VirtualNetworkGatewayIPConfigurationPropertiesFormat 7116 } 7117 if vngic.Name != nil { 7118 objectMap["name"] = vngic.Name 7119 } 7120 if vngic.Etag != nil { 7121 objectMap["etag"] = vngic.Etag 7122 } 7123 if vngic.ID != nil { 7124 objectMap["id"] = vngic.ID 7125 } 7126 return json.Marshal(objectMap) 7127} 7128 7129// UnmarshalJSON is the custom unmarshaler for VirtualNetworkGatewayIPConfiguration struct. 7130func (vngic *VirtualNetworkGatewayIPConfiguration) UnmarshalJSON(body []byte) error { 7131 var m map[string]*json.RawMessage 7132 err := json.Unmarshal(body, &m) 7133 if err != nil { 7134 return err 7135 } 7136 for k, v := range m { 7137 switch k { 7138 case "properties": 7139 if v != nil { 7140 var virtualNetworkGatewayIPConfigurationPropertiesFormat VirtualNetworkGatewayIPConfigurationPropertiesFormat 7141 err = json.Unmarshal(*v, &virtualNetworkGatewayIPConfigurationPropertiesFormat) 7142 if err != nil { 7143 return err 7144 } 7145 vngic.VirtualNetworkGatewayIPConfigurationPropertiesFormat = &virtualNetworkGatewayIPConfigurationPropertiesFormat 7146 } 7147 case "name": 7148 if v != nil { 7149 var name string 7150 err = json.Unmarshal(*v, &name) 7151 if err != nil { 7152 return err 7153 } 7154 vngic.Name = &name 7155 } 7156 case "etag": 7157 if v != nil { 7158 var etag string 7159 err = json.Unmarshal(*v, &etag) 7160 if err != nil { 7161 return err 7162 } 7163 vngic.Etag = &etag 7164 } 7165 case "id": 7166 if v != nil { 7167 var ID string 7168 err = json.Unmarshal(*v, &ID) 7169 if err != nil { 7170 return err 7171 } 7172 vngic.ID = &ID 7173 } 7174 } 7175 } 7176 7177 return nil 7178} 7179 7180// VirtualNetworkGatewayIPConfigurationPropertiesFormat properties of VirtualNetworkGatewayIPConfiguration 7181type VirtualNetworkGatewayIPConfigurationPropertiesFormat struct { 7182 // PrivateIPAddress - Gets or sets the privateIPAddress of the IP Configuration 7183 PrivateIPAddress *string `json:"privateIPAddress,omitempty"` 7184 // PrivateIPAllocationMethod - Gets or sets PrivateIP allocation method (Static/Dynamic). Possible values include: 'Static', 'Dynamic' 7185 PrivateIPAllocationMethod IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"` 7186 // Subnet - Gets or sets the reference of the subnet resource 7187 Subnet *SubResource `json:"subnet,omitempty"` 7188 // PublicIPAddress - Gets or sets the reference of the PublicIP resource 7189 PublicIPAddress *SubResource `json:"publicIPAddress,omitempty"` 7190 // ProvisioningState - Gets or sets Provisioning state of the PublicIP resource Updating/Deleting/Failed 7191 ProvisioningState *string `json:"provisioningState,omitempty"` 7192} 7193 7194// VirtualNetworkGatewayListResult response for ListVirtualNetworkGateways Api service call 7195type VirtualNetworkGatewayListResult struct { 7196 autorest.Response `json:"-"` 7197 // Value - Gets List of VirtualNetworkGateways that exists in a resource group 7198 Value *[]VirtualNetworkGateway `json:"value,omitempty"` 7199 // NextLink - Gets the URL to get the next set of results. 7200 NextLink *string `json:"nextLink,omitempty"` 7201} 7202 7203// VirtualNetworkGatewayListResultIterator provides access to a complete listing of VirtualNetworkGateway 7204// values. 7205type VirtualNetworkGatewayListResultIterator struct { 7206 i int 7207 page VirtualNetworkGatewayListResultPage 7208} 7209 7210// NextWithContext advances to the next value. If there was an error making 7211// the request the iterator does not advance and the error is returned. 7212func (iter *VirtualNetworkGatewayListResultIterator) NextWithContext(ctx context.Context) (err error) { 7213 if tracing.IsEnabled() { 7214 ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewayListResultIterator.NextWithContext") 7215 defer func() { 7216 sc := -1 7217 if iter.Response().Response.Response != nil { 7218 sc = iter.Response().Response.Response.StatusCode 7219 } 7220 tracing.EndSpan(ctx, sc, err) 7221 }() 7222 } 7223 iter.i++ 7224 if iter.i < len(iter.page.Values()) { 7225 return nil 7226 } 7227 err = iter.page.NextWithContext(ctx) 7228 if err != nil { 7229 iter.i-- 7230 return err 7231 } 7232 iter.i = 0 7233 return nil 7234} 7235 7236// Next advances to the next value. If there was an error making 7237// the request the iterator does not advance and the error is returned. 7238// Deprecated: Use NextWithContext() instead. 7239func (iter *VirtualNetworkGatewayListResultIterator) Next() error { 7240 return iter.NextWithContext(context.Background()) 7241} 7242 7243// NotDone returns true if the enumeration should be started or is not yet complete. 7244func (iter VirtualNetworkGatewayListResultIterator) NotDone() bool { 7245 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 7246} 7247 7248// Response returns the raw server response from the last page request. 7249func (iter VirtualNetworkGatewayListResultIterator) Response() VirtualNetworkGatewayListResult { 7250 return iter.page.Response() 7251} 7252 7253// Value returns the current value or a zero-initialized value if the 7254// iterator has advanced beyond the end of the collection. 7255func (iter VirtualNetworkGatewayListResultIterator) Value() VirtualNetworkGateway { 7256 if !iter.page.NotDone() { 7257 return VirtualNetworkGateway{} 7258 } 7259 return iter.page.Values()[iter.i] 7260} 7261 7262// Creates a new instance of the VirtualNetworkGatewayListResultIterator type. 7263func NewVirtualNetworkGatewayListResultIterator(page VirtualNetworkGatewayListResultPage) VirtualNetworkGatewayListResultIterator { 7264 return VirtualNetworkGatewayListResultIterator{page: page} 7265} 7266 7267// IsEmpty returns true if the ListResult contains no values. 7268func (vnglr VirtualNetworkGatewayListResult) IsEmpty() bool { 7269 return vnglr.Value == nil || len(*vnglr.Value) == 0 7270} 7271 7272// hasNextLink returns true if the NextLink is not empty. 7273func (vnglr VirtualNetworkGatewayListResult) hasNextLink() bool { 7274 return vnglr.NextLink != nil && len(*vnglr.NextLink) != 0 7275} 7276 7277// virtualNetworkGatewayListResultPreparer prepares a request to retrieve the next set of results. 7278// It returns nil if no more results exist. 7279func (vnglr VirtualNetworkGatewayListResult) virtualNetworkGatewayListResultPreparer(ctx context.Context) (*http.Request, error) { 7280 if !vnglr.hasNextLink() { 7281 return nil, nil 7282 } 7283 return autorest.Prepare((&http.Request{}).WithContext(ctx), 7284 autorest.AsJSON(), 7285 autorest.AsGet(), 7286 autorest.WithBaseURL(to.String(vnglr.NextLink))) 7287} 7288 7289// VirtualNetworkGatewayListResultPage contains a page of VirtualNetworkGateway values. 7290type VirtualNetworkGatewayListResultPage struct { 7291 fn func(context.Context, VirtualNetworkGatewayListResult) (VirtualNetworkGatewayListResult, error) 7292 vnglr VirtualNetworkGatewayListResult 7293} 7294 7295// NextWithContext advances to the next page of values. If there was an error making 7296// the request the page does not advance and the error is returned. 7297func (page *VirtualNetworkGatewayListResultPage) NextWithContext(ctx context.Context) (err error) { 7298 if tracing.IsEnabled() { 7299 ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewayListResultPage.NextWithContext") 7300 defer func() { 7301 sc := -1 7302 if page.Response().Response.Response != nil { 7303 sc = page.Response().Response.Response.StatusCode 7304 } 7305 tracing.EndSpan(ctx, sc, err) 7306 }() 7307 } 7308 for { 7309 next, err := page.fn(ctx, page.vnglr) 7310 if err != nil { 7311 return err 7312 } 7313 page.vnglr = next 7314 if !next.hasNextLink() || !next.IsEmpty() { 7315 break 7316 } 7317 } 7318 return nil 7319} 7320 7321// Next advances to the next page of values. If there was an error making 7322// the request the page does not advance and the error is returned. 7323// Deprecated: Use NextWithContext() instead. 7324func (page *VirtualNetworkGatewayListResultPage) Next() error { 7325 return page.NextWithContext(context.Background()) 7326} 7327 7328// NotDone returns true if the page enumeration should be started or is not yet complete. 7329func (page VirtualNetworkGatewayListResultPage) NotDone() bool { 7330 return !page.vnglr.IsEmpty() 7331} 7332 7333// Response returns the raw server response from the last page request. 7334func (page VirtualNetworkGatewayListResultPage) Response() VirtualNetworkGatewayListResult { 7335 return page.vnglr 7336} 7337 7338// Values returns the slice of values for the current page or nil if there are no values. 7339func (page VirtualNetworkGatewayListResultPage) Values() []VirtualNetworkGateway { 7340 if page.vnglr.IsEmpty() { 7341 return nil 7342 } 7343 return *page.vnglr.Value 7344} 7345 7346// Creates a new instance of the VirtualNetworkGatewayListResultPage type. 7347func NewVirtualNetworkGatewayListResultPage(cur VirtualNetworkGatewayListResult, getNextPage func(context.Context, VirtualNetworkGatewayListResult) (VirtualNetworkGatewayListResult, error)) VirtualNetworkGatewayListResultPage { 7348 return VirtualNetworkGatewayListResultPage{ 7349 fn: getNextPage, 7350 vnglr: cur, 7351 } 7352} 7353 7354// VirtualNetworkGatewayPropertiesFormat virtualNetworkGateway properties 7355type VirtualNetworkGatewayPropertiesFormat struct { 7356 // IPConfigurations - IpConfigurations for Virtual network gateway. 7357 IPConfigurations *[]VirtualNetworkGatewayIPConfiguration `json:"ipConfigurations,omitempty"` 7358 // GatewayType - The type of this virtual network gateway. Possible values include: 'VirtualNetworkGatewayTypeVpn', 'VirtualNetworkGatewayTypeExpressRoute' 7359 GatewayType VirtualNetworkGatewayType `json:"gatewayType,omitempty"` 7360 // VpnType - The type of this virtual network gateway. Possible values include: 'PolicyBased', 'RouteBased' 7361 VpnType VpnType `json:"vpnType,omitempty"` 7362 // EnableBgp - EnableBgp Flag 7363 EnableBgp *bool `json:"enableBgp,omitempty"` 7364 // GatewayDefaultSite - Gets or sets the reference of the LocalNetworkGateway resource which represents Local network site having default routes. Assign Null value in case of removing existing default site setting. 7365 GatewayDefaultSite *SubResource `json:"gatewayDefaultSite,omitempty"` 7366 // Sku - Gets or sets the reference of the VirtualNetworkGatewaySku resource which represents the sku selected for Virtual network gateway. 7367 Sku *VirtualNetworkGatewaySku `json:"sku,omitempty"` 7368 // VpnClientConfiguration - Gets or sets the reference of the VpnClientConfiguration resource which represents the P2S VpnClient configurations. 7369 VpnClientConfiguration *VpnClientConfiguration `json:"vpnClientConfiguration,omitempty"` 7370 // BgpSettings - Virtual network gateway's BGP speaker settings 7371 BgpSettings *BgpSettings `json:"bgpSettings,omitempty"` 7372 // ResourceGUID - Gets or sets resource GUID property of the VirtualNetworkGateway resource 7373 ResourceGUID *string `json:"resourceGuid,omitempty"` 7374 // ProvisioningState - Gets or sets Provisioning state of the VirtualNetworkGateway resource Updating/Deleting/Failed 7375 ProvisioningState *string `json:"provisioningState,omitempty"` 7376} 7377 7378// VirtualNetworkGatewaysCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a 7379// long-running operation. 7380type VirtualNetworkGatewaysCreateOrUpdateFuture struct { 7381 azure.FutureAPI 7382 // Result returns the result of the asynchronous operation. 7383 // If the operation has not completed it will return an error. 7384 Result func(VirtualNetworkGatewaysClient) (VirtualNetworkGateway, error) 7385} 7386 7387// VirtualNetworkGatewaysDeleteFuture an abstraction for monitoring and retrieving the results of a 7388// long-running operation. 7389type VirtualNetworkGatewaysDeleteFuture struct { 7390 azure.FutureAPI 7391 // Result returns the result of the asynchronous operation. 7392 // If the operation has not completed it will return an error. 7393 Result func(VirtualNetworkGatewaysClient) (autorest.Response, error) 7394} 7395 7396// VirtualNetworkGatewaySku virtualNetworkGatewaySku details 7397type VirtualNetworkGatewaySku struct { 7398 // Name - Gateway sku name -Basic/HighPerformance/Standard. Possible values include: 'VirtualNetworkGatewaySkuNameBasic', 'VirtualNetworkGatewaySkuNameHighPerformance', 'VirtualNetworkGatewaySkuNameStandard' 7399 Name VirtualNetworkGatewaySkuName `json:"name,omitempty"` 7400 // Tier - Gateway sku tier -Basic/HighPerformance/Standard. Possible values include: 'VirtualNetworkGatewaySkuTierBasic', 'VirtualNetworkGatewaySkuTierHighPerformance', 'VirtualNetworkGatewaySkuTierStandard' 7401 Tier VirtualNetworkGatewaySkuTier `json:"tier,omitempty"` 7402 // Capacity - The capacity 7403 Capacity *int32 `json:"capacity,omitempty"` 7404} 7405 7406// VirtualNetworkGatewaysResetFuture an abstraction for monitoring and retrieving the results of a 7407// long-running operation. 7408type VirtualNetworkGatewaysResetFuture struct { 7409 azure.FutureAPI 7410 // Result returns the result of the asynchronous operation. 7411 // If the operation has not completed it will return an error. 7412 Result func(VirtualNetworkGatewaysClient) (VirtualNetworkGateway, error) 7413} 7414 7415// VirtualNetworkListResult response for ListVirtualNetworks Api service call 7416type VirtualNetworkListResult struct { 7417 autorest.Response `json:"-"` 7418 // Value - Gets list of VirtualNetworks in a resource group 7419 Value *[]VirtualNetwork `json:"value,omitempty"` 7420 // NextLink - Gets the URL to get the next set of results. 7421 NextLink *string `json:"nextLink,omitempty"` 7422} 7423 7424// VirtualNetworkListResultIterator provides access to a complete listing of VirtualNetwork values. 7425type VirtualNetworkListResultIterator struct { 7426 i int 7427 page VirtualNetworkListResultPage 7428} 7429 7430// NextWithContext advances to the next value. If there was an error making 7431// the request the iterator does not advance and the error is returned. 7432func (iter *VirtualNetworkListResultIterator) NextWithContext(ctx context.Context) (err error) { 7433 if tracing.IsEnabled() { 7434 ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkListResultIterator.NextWithContext") 7435 defer func() { 7436 sc := -1 7437 if iter.Response().Response.Response != nil { 7438 sc = iter.Response().Response.Response.StatusCode 7439 } 7440 tracing.EndSpan(ctx, sc, err) 7441 }() 7442 } 7443 iter.i++ 7444 if iter.i < len(iter.page.Values()) { 7445 return nil 7446 } 7447 err = iter.page.NextWithContext(ctx) 7448 if err != nil { 7449 iter.i-- 7450 return err 7451 } 7452 iter.i = 0 7453 return nil 7454} 7455 7456// Next advances to the next value. If there was an error making 7457// the request the iterator does not advance and the error is returned. 7458// Deprecated: Use NextWithContext() instead. 7459func (iter *VirtualNetworkListResultIterator) Next() error { 7460 return iter.NextWithContext(context.Background()) 7461} 7462 7463// NotDone returns true if the enumeration should be started or is not yet complete. 7464func (iter VirtualNetworkListResultIterator) NotDone() bool { 7465 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 7466} 7467 7468// Response returns the raw server response from the last page request. 7469func (iter VirtualNetworkListResultIterator) Response() VirtualNetworkListResult { 7470 return iter.page.Response() 7471} 7472 7473// Value returns the current value or a zero-initialized value if the 7474// iterator has advanced beyond the end of the collection. 7475func (iter VirtualNetworkListResultIterator) Value() VirtualNetwork { 7476 if !iter.page.NotDone() { 7477 return VirtualNetwork{} 7478 } 7479 return iter.page.Values()[iter.i] 7480} 7481 7482// Creates a new instance of the VirtualNetworkListResultIterator type. 7483func NewVirtualNetworkListResultIterator(page VirtualNetworkListResultPage) VirtualNetworkListResultIterator { 7484 return VirtualNetworkListResultIterator{page: page} 7485} 7486 7487// IsEmpty returns true if the ListResult contains no values. 7488func (vnlr VirtualNetworkListResult) IsEmpty() bool { 7489 return vnlr.Value == nil || len(*vnlr.Value) == 0 7490} 7491 7492// hasNextLink returns true if the NextLink is not empty. 7493func (vnlr VirtualNetworkListResult) hasNextLink() bool { 7494 return vnlr.NextLink != nil && len(*vnlr.NextLink) != 0 7495} 7496 7497// virtualNetworkListResultPreparer prepares a request to retrieve the next set of results. 7498// It returns nil if no more results exist. 7499func (vnlr VirtualNetworkListResult) virtualNetworkListResultPreparer(ctx context.Context) (*http.Request, error) { 7500 if !vnlr.hasNextLink() { 7501 return nil, nil 7502 } 7503 return autorest.Prepare((&http.Request{}).WithContext(ctx), 7504 autorest.AsJSON(), 7505 autorest.AsGet(), 7506 autorest.WithBaseURL(to.String(vnlr.NextLink))) 7507} 7508 7509// VirtualNetworkListResultPage contains a page of VirtualNetwork values. 7510type VirtualNetworkListResultPage struct { 7511 fn func(context.Context, VirtualNetworkListResult) (VirtualNetworkListResult, error) 7512 vnlr VirtualNetworkListResult 7513} 7514 7515// NextWithContext advances to the next page of values. If there was an error making 7516// the request the page does not advance and the error is returned. 7517func (page *VirtualNetworkListResultPage) NextWithContext(ctx context.Context) (err error) { 7518 if tracing.IsEnabled() { 7519 ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkListResultPage.NextWithContext") 7520 defer func() { 7521 sc := -1 7522 if page.Response().Response.Response != nil { 7523 sc = page.Response().Response.Response.StatusCode 7524 } 7525 tracing.EndSpan(ctx, sc, err) 7526 }() 7527 } 7528 for { 7529 next, err := page.fn(ctx, page.vnlr) 7530 if err != nil { 7531 return err 7532 } 7533 page.vnlr = next 7534 if !next.hasNextLink() || !next.IsEmpty() { 7535 break 7536 } 7537 } 7538 return nil 7539} 7540 7541// Next advances to the next page of values. If there was an error making 7542// the request the page does not advance and the error is returned. 7543// Deprecated: Use NextWithContext() instead. 7544func (page *VirtualNetworkListResultPage) Next() error { 7545 return page.NextWithContext(context.Background()) 7546} 7547 7548// NotDone returns true if the page enumeration should be started or is not yet complete. 7549func (page VirtualNetworkListResultPage) NotDone() bool { 7550 return !page.vnlr.IsEmpty() 7551} 7552 7553// Response returns the raw server response from the last page request. 7554func (page VirtualNetworkListResultPage) Response() VirtualNetworkListResult { 7555 return page.vnlr 7556} 7557 7558// Values returns the slice of values for the current page or nil if there are no values. 7559func (page VirtualNetworkListResultPage) Values() []VirtualNetwork { 7560 if page.vnlr.IsEmpty() { 7561 return nil 7562 } 7563 return *page.vnlr.Value 7564} 7565 7566// Creates a new instance of the VirtualNetworkListResultPage type. 7567func NewVirtualNetworkListResultPage(cur VirtualNetworkListResult, getNextPage func(context.Context, VirtualNetworkListResult) (VirtualNetworkListResult, error)) VirtualNetworkListResultPage { 7568 return VirtualNetworkListResultPage{ 7569 fn: getNextPage, 7570 vnlr: cur, 7571 } 7572} 7573 7574// VirtualNetworkPropertiesFormat ... 7575type VirtualNetworkPropertiesFormat struct { 7576 // AddressSpace - Gets or sets AddressSpace that contains an array of IP address ranges that can be used by subnets 7577 AddressSpace *AddressSpace `json:"addressSpace,omitempty"` 7578 // DhcpOptions - Gets or sets DHCPOptions that contains an array of DNS servers available to VMs deployed in the virtual network 7579 DhcpOptions *DhcpOptions `json:"dhcpOptions,omitempty"` 7580 // Subnets - Gets or sets List of subnets in a VirtualNetwork 7581 Subnets *[]Subnet `json:"subnets,omitempty"` 7582 // ResourceGUID - Gets or sets resource GUID property of the VirtualNetwork resource 7583 ResourceGUID *string `json:"resourceGuid,omitempty"` 7584 // ProvisioningState - Gets or sets Provisioning state of the PublicIP resource Updating/Deleting/Failed 7585 ProvisioningState *string `json:"provisioningState,omitempty"` 7586} 7587 7588// VirtualNetworksCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a 7589// long-running operation. 7590type VirtualNetworksCreateOrUpdateFuture struct { 7591 azure.FutureAPI 7592 // Result returns the result of the asynchronous operation. 7593 // If the operation has not completed it will return an error. 7594 Result func(VirtualNetworksClient) (VirtualNetwork, error) 7595} 7596 7597// VirtualNetworksDeleteFuture an abstraction for monitoring and retrieving the results of a long-running 7598// operation. 7599type VirtualNetworksDeleteFuture struct { 7600 azure.FutureAPI 7601 // Result returns the result of the asynchronous operation. 7602 // If the operation has not completed it will return an error. 7603 Result func(VirtualNetworksClient) (autorest.Response, error) 7604} 7605 7606// VpnClientConfiguration vpnClientConfiguration for P2S client 7607type VpnClientConfiguration struct { 7608 // VpnClientAddressPool - Gets or sets the reference of the Address space resource which represents Address space for P2S VpnClient. 7609 VpnClientAddressPool *AddressSpace `json:"vpnClientAddressPool,omitempty"` 7610 // VpnClientRootCertificates - VpnClientRootCertificate for Virtual network gateway. 7611 VpnClientRootCertificates *[]VpnClientRootCertificate `json:"vpnClientRootCertificates,omitempty"` 7612 // VpnClientRevokedCertificates - VpnClientRevokedCertificate for Virtual network gateway. 7613 VpnClientRevokedCertificates *[]VpnClientRevokedCertificate `json:"vpnClientRevokedCertificates,omitempty"` 7614} 7615 7616// VpnClientParameters vpnClientParameters 7617type VpnClientParameters struct { 7618 // ProcessorArchitecture - VPN client Processor Architecture -Amd64/X86. Possible values include: 'Amd64', 'X86' 7619 ProcessorArchitecture ProcessorArchitecture `json:"ProcessorArchitecture,omitempty"` 7620} 7621 7622// VpnClientRevokedCertificate VPN client revoked certificate of virtual network gateway 7623type VpnClientRevokedCertificate struct { 7624 *VpnClientRevokedCertificatePropertiesFormat `json:"properties,omitempty"` 7625 // Name - Gets name of the resource that is unique within a resource group. This name can be used to access the resource 7626 Name *string `json:"name,omitempty"` 7627 // Etag - A unique read-only string that changes whenever the resource is updated 7628 Etag *string `json:"etag,omitempty"` 7629 // ID - Resource Id 7630 ID *string `json:"id,omitempty"` 7631} 7632 7633// MarshalJSON is the custom marshaler for VpnClientRevokedCertificate. 7634func (vcrc VpnClientRevokedCertificate) MarshalJSON() ([]byte, error) { 7635 objectMap := make(map[string]interface{}) 7636 if vcrc.VpnClientRevokedCertificatePropertiesFormat != nil { 7637 objectMap["properties"] = vcrc.VpnClientRevokedCertificatePropertiesFormat 7638 } 7639 if vcrc.Name != nil { 7640 objectMap["name"] = vcrc.Name 7641 } 7642 if vcrc.Etag != nil { 7643 objectMap["etag"] = vcrc.Etag 7644 } 7645 if vcrc.ID != nil { 7646 objectMap["id"] = vcrc.ID 7647 } 7648 return json.Marshal(objectMap) 7649} 7650 7651// UnmarshalJSON is the custom unmarshaler for VpnClientRevokedCertificate struct. 7652func (vcrc *VpnClientRevokedCertificate) UnmarshalJSON(body []byte) error { 7653 var m map[string]*json.RawMessage 7654 err := json.Unmarshal(body, &m) 7655 if err != nil { 7656 return err 7657 } 7658 for k, v := range m { 7659 switch k { 7660 case "properties": 7661 if v != nil { 7662 var vpnClientRevokedCertificatePropertiesFormat VpnClientRevokedCertificatePropertiesFormat 7663 err = json.Unmarshal(*v, &vpnClientRevokedCertificatePropertiesFormat) 7664 if err != nil { 7665 return err 7666 } 7667 vcrc.VpnClientRevokedCertificatePropertiesFormat = &vpnClientRevokedCertificatePropertiesFormat 7668 } 7669 case "name": 7670 if v != nil { 7671 var name string 7672 err = json.Unmarshal(*v, &name) 7673 if err != nil { 7674 return err 7675 } 7676 vcrc.Name = &name 7677 } 7678 case "etag": 7679 if v != nil { 7680 var etag string 7681 err = json.Unmarshal(*v, &etag) 7682 if err != nil { 7683 return err 7684 } 7685 vcrc.Etag = &etag 7686 } 7687 case "id": 7688 if v != nil { 7689 var ID string 7690 err = json.Unmarshal(*v, &ID) 7691 if err != nil { 7692 return err 7693 } 7694 vcrc.ID = &ID 7695 } 7696 } 7697 } 7698 7699 return nil 7700} 7701 7702// VpnClientRevokedCertificatePropertiesFormat properties of the revoked VPN client certificate of virtual 7703// network gateway 7704type VpnClientRevokedCertificatePropertiesFormat struct { 7705 // Thumbprint - Gets or sets the revoked Vpn client certificate thumbprint 7706 Thumbprint *string `json:"thumbprint,omitempty"` 7707 // ProvisioningState - Gets or sets Provisioning state of the VPN client revoked certificate resource Updating/Deleting/Failed 7708 ProvisioningState *string `json:"provisioningState,omitempty"` 7709} 7710 7711// VpnClientRootCertificate VPN client root certificate of virtual network gateway 7712type VpnClientRootCertificate struct { 7713 *VpnClientRootCertificatePropertiesFormat `json:"properties,omitempty"` 7714 // Name - Gets name of the resource that is unique within a resource group. This name can be used to access the resource 7715 Name *string `json:"name,omitempty"` 7716 // Etag - A unique read-only string that changes whenever the resource is updated 7717 Etag *string `json:"etag,omitempty"` 7718 // ID - Resource Id 7719 ID *string `json:"id,omitempty"` 7720} 7721 7722// MarshalJSON is the custom marshaler for VpnClientRootCertificate. 7723func (vcrc VpnClientRootCertificate) MarshalJSON() ([]byte, error) { 7724 objectMap := make(map[string]interface{}) 7725 if vcrc.VpnClientRootCertificatePropertiesFormat != nil { 7726 objectMap["properties"] = vcrc.VpnClientRootCertificatePropertiesFormat 7727 } 7728 if vcrc.Name != nil { 7729 objectMap["name"] = vcrc.Name 7730 } 7731 if vcrc.Etag != nil { 7732 objectMap["etag"] = vcrc.Etag 7733 } 7734 if vcrc.ID != nil { 7735 objectMap["id"] = vcrc.ID 7736 } 7737 return json.Marshal(objectMap) 7738} 7739 7740// UnmarshalJSON is the custom unmarshaler for VpnClientRootCertificate struct. 7741func (vcrc *VpnClientRootCertificate) UnmarshalJSON(body []byte) error { 7742 var m map[string]*json.RawMessage 7743 err := json.Unmarshal(body, &m) 7744 if err != nil { 7745 return err 7746 } 7747 for k, v := range m { 7748 switch k { 7749 case "properties": 7750 if v != nil { 7751 var vpnClientRootCertificatePropertiesFormat VpnClientRootCertificatePropertiesFormat 7752 err = json.Unmarshal(*v, &vpnClientRootCertificatePropertiesFormat) 7753 if err != nil { 7754 return err 7755 } 7756 vcrc.VpnClientRootCertificatePropertiesFormat = &vpnClientRootCertificatePropertiesFormat 7757 } 7758 case "name": 7759 if v != nil { 7760 var name string 7761 err = json.Unmarshal(*v, &name) 7762 if err != nil { 7763 return err 7764 } 7765 vcrc.Name = &name 7766 } 7767 case "etag": 7768 if v != nil { 7769 var etag string 7770 err = json.Unmarshal(*v, &etag) 7771 if err != nil { 7772 return err 7773 } 7774 vcrc.Etag = &etag 7775 } 7776 case "id": 7777 if v != nil { 7778 var ID string 7779 err = json.Unmarshal(*v, &ID) 7780 if err != nil { 7781 return err 7782 } 7783 vcrc.ID = &ID 7784 } 7785 } 7786 } 7787 7788 return nil 7789} 7790 7791// VpnClientRootCertificatePropertiesFormat properties of SSL certificates of application gateway 7792type VpnClientRootCertificatePropertiesFormat struct { 7793 // PublicCertData - Gets or sets the certificate public data 7794 PublicCertData *string `json:"publicCertData,omitempty"` 7795 // ProvisioningState - Gets or sets Provisioning state of the VPN client root certificate resource Updating/Deleting/Failed 7796 ProvisioningState *string `json:"provisioningState,omitempty"` 7797} 7798