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/date" 26 "github.com/Azure/go-autorest/autorest/to" 27 "github.com/Azure/go-autorest/tracing" 28 "net/http" 29) 30 31// The package's fully qualified name. 32const fqdn = "github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-10-01/network" 33 34// Access enumerates the values for access. 35type Access string 36 37const ( 38 // Allow ... 39 Allow Access = "Allow" 40 // Deny ... 41 Deny Access = "Deny" 42) 43 44// PossibleAccessValues returns an array of possible values for the Access const type. 45func PossibleAccessValues() []Access { 46 return []Access{Allow, Deny} 47} 48 49// ApplicationGatewayBackendHealthServerHealth enumerates the values for application gateway backend health 50// server health. 51type ApplicationGatewayBackendHealthServerHealth string 52 53const ( 54 // Down ... 55 Down ApplicationGatewayBackendHealthServerHealth = "Down" 56 // Draining ... 57 Draining ApplicationGatewayBackendHealthServerHealth = "Draining" 58 // Partial ... 59 Partial ApplicationGatewayBackendHealthServerHealth = "Partial" 60 // Unknown ... 61 Unknown ApplicationGatewayBackendHealthServerHealth = "Unknown" 62 // Up ... 63 Up ApplicationGatewayBackendHealthServerHealth = "Up" 64) 65 66// PossibleApplicationGatewayBackendHealthServerHealthValues returns an array of possible values for the ApplicationGatewayBackendHealthServerHealth const type. 67func PossibleApplicationGatewayBackendHealthServerHealthValues() []ApplicationGatewayBackendHealthServerHealth { 68 return []ApplicationGatewayBackendHealthServerHealth{Down, Draining, Partial, Unknown, Up} 69} 70 71// ApplicationGatewayCookieBasedAffinity enumerates the values for application gateway cookie based affinity. 72type ApplicationGatewayCookieBasedAffinity string 73 74const ( 75 // Disabled ... 76 Disabled ApplicationGatewayCookieBasedAffinity = "Disabled" 77 // Enabled ... 78 Enabled ApplicationGatewayCookieBasedAffinity = "Enabled" 79) 80 81// PossibleApplicationGatewayCookieBasedAffinityValues returns an array of possible values for the ApplicationGatewayCookieBasedAffinity const type. 82func PossibleApplicationGatewayCookieBasedAffinityValues() []ApplicationGatewayCookieBasedAffinity { 83 return []ApplicationGatewayCookieBasedAffinity{Disabled, Enabled} 84} 85 86// ApplicationGatewayFirewallMode enumerates the values for application gateway firewall mode. 87type ApplicationGatewayFirewallMode string 88 89const ( 90 // Detection ... 91 Detection ApplicationGatewayFirewallMode = "Detection" 92 // Prevention ... 93 Prevention ApplicationGatewayFirewallMode = "Prevention" 94) 95 96// PossibleApplicationGatewayFirewallModeValues returns an array of possible values for the ApplicationGatewayFirewallMode const type. 97func PossibleApplicationGatewayFirewallModeValues() []ApplicationGatewayFirewallMode { 98 return []ApplicationGatewayFirewallMode{Detection, Prevention} 99} 100 101// ApplicationGatewayOperationalState enumerates the values for application gateway operational state. 102type ApplicationGatewayOperationalState string 103 104const ( 105 // Running ... 106 Running ApplicationGatewayOperationalState = "Running" 107 // Starting ... 108 Starting ApplicationGatewayOperationalState = "Starting" 109 // Stopped ... 110 Stopped ApplicationGatewayOperationalState = "Stopped" 111 // Stopping ... 112 Stopping ApplicationGatewayOperationalState = "Stopping" 113) 114 115// PossibleApplicationGatewayOperationalStateValues returns an array of possible values for the ApplicationGatewayOperationalState const type. 116func PossibleApplicationGatewayOperationalStateValues() []ApplicationGatewayOperationalState { 117 return []ApplicationGatewayOperationalState{Running, Starting, Stopped, Stopping} 118} 119 120// ApplicationGatewayProtocol enumerates the values for application gateway protocol. 121type ApplicationGatewayProtocol string 122 123const ( 124 // HTTP ... 125 HTTP ApplicationGatewayProtocol = "Http" 126 // HTTPS ... 127 HTTPS ApplicationGatewayProtocol = "Https" 128) 129 130// PossibleApplicationGatewayProtocolValues returns an array of possible values for the ApplicationGatewayProtocol const type. 131func PossibleApplicationGatewayProtocolValues() []ApplicationGatewayProtocol { 132 return []ApplicationGatewayProtocol{HTTP, HTTPS} 133} 134 135// ApplicationGatewayRedirectType enumerates the values for application gateway redirect type. 136type ApplicationGatewayRedirectType string 137 138const ( 139 // Found ... 140 Found ApplicationGatewayRedirectType = "Found" 141 // Permanent ... 142 Permanent ApplicationGatewayRedirectType = "Permanent" 143 // SeeOther ... 144 SeeOther ApplicationGatewayRedirectType = "SeeOther" 145 // Temporary ... 146 Temporary ApplicationGatewayRedirectType = "Temporary" 147) 148 149// PossibleApplicationGatewayRedirectTypeValues returns an array of possible values for the ApplicationGatewayRedirectType const type. 150func PossibleApplicationGatewayRedirectTypeValues() []ApplicationGatewayRedirectType { 151 return []ApplicationGatewayRedirectType{Found, Permanent, SeeOther, Temporary} 152} 153 154// ApplicationGatewayRequestRoutingRuleType enumerates the values for application gateway request routing rule 155// type. 156type ApplicationGatewayRequestRoutingRuleType string 157 158const ( 159 // Basic ... 160 Basic ApplicationGatewayRequestRoutingRuleType = "Basic" 161 // PathBasedRouting ... 162 PathBasedRouting ApplicationGatewayRequestRoutingRuleType = "PathBasedRouting" 163) 164 165// PossibleApplicationGatewayRequestRoutingRuleTypeValues returns an array of possible values for the ApplicationGatewayRequestRoutingRuleType const type. 166func PossibleApplicationGatewayRequestRoutingRuleTypeValues() []ApplicationGatewayRequestRoutingRuleType { 167 return []ApplicationGatewayRequestRoutingRuleType{Basic, PathBasedRouting} 168} 169 170// ApplicationGatewaySkuName enumerates the values for application gateway sku name. 171type ApplicationGatewaySkuName string 172 173const ( 174 // StandardLarge ... 175 StandardLarge ApplicationGatewaySkuName = "Standard_Large" 176 // StandardMedium ... 177 StandardMedium ApplicationGatewaySkuName = "Standard_Medium" 178 // StandardSmall ... 179 StandardSmall ApplicationGatewaySkuName = "Standard_Small" 180 // WAFLarge ... 181 WAFLarge ApplicationGatewaySkuName = "WAF_Large" 182 // WAFMedium ... 183 WAFMedium ApplicationGatewaySkuName = "WAF_Medium" 184) 185 186// PossibleApplicationGatewaySkuNameValues returns an array of possible values for the ApplicationGatewaySkuName const type. 187func PossibleApplicationGatewaySkuNameValues() []ApplicationGatewaySkuName { 188 return []ApplicationGatewaySkuName{StandardLarge, StandardMedium, StandardSmall, WAFLarge, WAFMedium} 189} 190 191// ApplicationGatewaySslCipherSuite enumerates the values for application gateway ssl cipher suite. 192type ApplicationGatewaySslCipherSuite string 193 194const ( 195 // TLSDHEDSSWITH3DESEDECBCSHA ... 196 TLSDHEDSSWITH3DESEDECBCSHA ApplicationGatewaySslCipherSuite = "TLS_DHE_DSS_WITH_3DES_EDE_CBC_SHA" 197 // TLSDHEDSSWITHAES128CBCSHA ... 198 TLSDHEDSSWITHAES128CBCSHA ApplicationGatewaySslCipherSuite = "TLS_DHE_DSS_WITH_AES_128_CBC_SHA" 199 // TLSDHEDSSWITHAES128CBCSHA256 ... 200 TLSDHEDSSWITHAES128CBCSHA256 ApplicationGatewaySslCipherSuite = "TLS_DHE_DSS_WITH_AES_128_CBC_SHA256" 201 // TLSDHEDSSWITHAES256CBCSHA ... 202 TLSDHEDSSWITHAES256CBCSHA ApplicationGatewaySslCipherSuite = "TLS_DHE_DSS_WITH_AES_256_CBC_SHA" 203 // TLSDHEDSSWITHAES256CBCSHA256 ... 204 TLSDHEDSSWITHAES256CBCSHA256 ApplicationGatewaySslCipherSuite = "TLS_DHE_DSS_WITH_AES_256_CBC_SHA256" 205 // TLSDHERSAWITHAES128CBCSHA ... 206 TLSDHERSAWITHAES128CBCSHA ApplicationGatewaySslCipherSuite = "TLS_DHE_RSA_WITH_AES_128_CBC_SHA" 207 // TLSDHERSAWITHAES128GCMSHA256 ... 208 TLSDHERSAWITHAES128GCMSHA256 ApplicationGatewaySslCipherSuite = "TLS_DHE_RSA_WITH_AES_128_GCM_SHA256" 209 // TLSDHERSAWITHAES256CBCSHA ... 210 TLSDHERSAWITHAES256CBCSHA ApplicationGatewaySslCipherSuite = "TLS_DHE_RSA_WITH_AES_256_CBC_SHA" 211 // TLSDHERSAWITHAES256GCMSHA384 ... 212 TLSDHERSAWITHAES256GCMSHA384 ApplicationGatewaySslCipherSuite = "TLS_DHE_RSA_WITH_AES_256_GCM_SHA384" 213 // TLSECDHEECDSAWITHAES128CBCSHA ... 214 TLSECDHEECDSAWITHAES128CBCSHA ApplicationGatewaySslCipherSuite = "TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA" 215 // TLSECDHEECDSAWITHAES128CBCSHA256 ... 216 TLSECDHEECDSAWITHAES128CBCSHA256 ApplicationGatewaySslCipherSuite = "TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256" 217 // TLSECDHEECDSAWITHAES128GCMSHA256 ... 218 TLSECDHEECDSAWITHAES128GCMSHA256 ApplicationGatewaySslCipherSuite = "TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256" 219 // TLSECDHEECDSAWITHAES256CBCSHA ... 220 TLSECDHEECDSAWITHAES256CBCSHA ApplicationGatewaySslCipherSuite = "TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA" 221 // TLSECDHEECDSAWITHAES256CBCSHA384 ... 222 TLSECDHEECDSAWITHAES256CBCSHA384 ApplicationGatewaySslCipherSuite = "TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384" 223 // TLSECDHEECDSAWITHAES256GCMSHA384 ... 224 TLSECDHEECDSAWITHAES256GCMSHA384 ApplicationGatewaySslCipherSuite = "TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384" 225 // TLSECDHERSAWITHAES128CBCSHA ... 226 TLSECDHERSAWITHAES128CBCSHA ApplicationGatewaySslCipherSuite = "TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA" 227 // TLSECDHERSAWITHAES128CBCSHA256 ... 228 TLSECDHERSAWITHAES128CBCSHA256 ApplicationGatewaySslCipherSuite = "TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256" 229 // TLSECDHERSAWITHAES128GCMSHA256 ... 230 TLSECDHERSAWITHAES128GCMSHA256 ApplicationGatewaySslCipherSuite = "TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256" 231 // TLSECDHERSAWITHAES256CBCSHA ... 232 TLSECDHERSAWITHAES256CBCSHA ApplicationGatewaySslCipherSuite = "TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA" 233 // TLSECDHERSAWITHAES256CBCSHA384 ... 234 TLSECDHERSAWITHAES256CBCSHA384 ApplicationGatewaySslCipherSuite = "TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384" 235 // TLSECDHERSAWITHAES256GCMSHA384 ... 236 TLSECDHERSAWITHAES256GCMSHA384 ApplicationGatewaySslCipherSuite = "TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384" 237 // TLSRSAWITH3DESEDECBCSHA ... 238 TLSRSAWITH3DESEDECBCSHA ApplicationGatewaySslCipherSuite = "TLS_RSA_WITH_3DES_EDE_CBC_SHA" 239 // TLSRSAWITHAES128CBCSHA ... 240 TLSRSAWITHAES128CBCSHA ApplicationGatewaySslCipherSuite = "TLS_RSA_WITH_AES_128_CBC_SHA" 241 // TLSRSAWITHAES128CBCSHA256 ... 242 TLSRSAWITHAES128CBCSHA256 ApplicationGatewaySslCipherSuite = "TLS_RSA_WITH_AES_128_CBC_SHA256" 243 // TLSRSAWITHAES128GCMSHA256 ... 244 TLSRSAWITHAES128GCMSHA256 ApplicationGatewaySslCipherSuite = "TLS_RSA_WITH_AES_128_GCM_SHA256" 245 // TLSRSAWITHAES256CBCSHA ... 246 TLSRSAWITHAES256CBCSHA ApplicationGatewaySslCipherSuite = "TLS_RSA_WITH_AES_256_CBC_SHA" 247 // TLSRSAWITHAES256CBCSHA256 ... 248 TLSRSAWITHAES256CBCSHA256 ApplicationGatewaySslCipherSuite = "TLS_RSA_WITH_AES_256_CBC_SHA256" 249 // TLSRSAWITHAES256GCMSHA384 ... 250 TLSRSAWITHAES256GCMSHA384 ApplicationGatewaySslCipherSuite = "TLS_RSA_WITH_AES_256_GCM_SHA384" 251) 252 253// PossibleApplicationGatewaySslCipherSuiteValues returns an array of possible values for the ApplicationGatewaySslCipherSuite const type. 254func PossibleApplicationGatewaySslCipherSuiteValues() []ApplicationGatewaySslCipherSuite { 255 return []ApplicationGatewaySslCipherSuite{TLSDHEDSSWITH3DESEDECBCSHA, TLSDHEDSSWITHAES128CBCSHA, TLSDHEDSSWITHAES128CBCSHA256, TLSDHEDSSWITHAES256CBCSHA, TLSDHEDSSWITHAES256CBCSHA256, TLSDHERSAWITHAES128CBCSHA, TLSDHERSAWITHAES128GCMSHA256, TLSDHERSAWITHAES256CBCSHA, TLSDHERSAWITHAES256GCMSHA384, TLSECDHEECDSAWITHAES128CBCSHA, TLSECDHEECDSAWITHAES128CBCSHA256, TLSECDHEECDSAWITHAES128GCMSHA256, TLSECDHEECDSAWITHAES256CBCSHA, TLSECDHEECDSAWITHAES256CBCSHA384, TLSECDHEECDSAWITHAES256GCMSHA384, TLSECDHERSAWITHAES128CBCSHA, TLSECDHERSAWITHAES128CBCSHA256, TLSECDHERSAWITHAES128GCMSHA256, TLSECDHERSAWITHAES256CBCSHA, TLSECDHERSAWITHAES256CBCSHA384, TLSECDHERSAWITHAES256GCMSHA384, TLSRSAWITH3DESEDECBCSHA, TLSRSAWITHAES128CBCSHA, TLSRSAWITHAES128CBCSHA256, TLSRSAWITHAES128GCMSHA256, TLSRSAWITHAES256CBCSHA, TLSRSAWITHAES256CBCSHA256, TLSRSAWITHAES256GCMSHA384} 256} 257 258// ApplicationGatewaySslPolicyName enumerates the values for application gateway ssl policy name. 259type ApplicationGatewaySslPolicyName string 260 261const ( 262 // AppGwSslPolicy20150501 ... 263 AppGwSslPolicy20150501 ApplicationGatewaySslPolicyName = "AppGwSslPolicy20150501" 264 // AppGwSslPolicy20170401 ... 265 AppGwSslPolicy20170401 ApplicationGatewaySslPolicyName = "AppGwSslPolicy20170401" 266 // AppGwSslPolicy20170401S ... 267 AppGwSslPolicy20170401S ApplicationGatewaySslPolicyName = "AppGwSslPolicy20170401S" 268) 269 270// PossibleApplicationGatewaySslPolicyNameValues returns an array of possible values for the ApplicationGatewaySslPolicyName const type. 271func PossibleApplicationGatewaySslPolicyNameValues() []ApplicationGatewaySslPolicyName { 272 return []ApplicationGatewaySslPolicyName{AppGwSslPolicy20150501, AppGwSslPolicy20170401, AppGwSslPolicy20170401S} 273} 274 275// ApplicationGatewaySslPolicyType enumerates the values for application gateway ssl policy type. 276type ApplicationGatewaySslPolicyType string 277 278const ( 279 // Custom ... 280 Custom ApplicationGatewaySslPolicyType = "Custom" 281 // Predefined ... 282 Predefined ApplicationGatewaySslPolicyType = "Predefined" 283) 284 285// PossibleApplicationGatewaySslPolicyTypeValues returns an array of possible values for the ApplicationGatewaySslPolicyType const type. 286func PossibleApplicationGatewaySslPolicyTypeValues() []ApplicationGatewaySslPolicyType { 287 return []ApplicationGatewaySslPolicyType{Custom, Predefined} 288} 289 290// ApplicationGatewaySslProtocol enumerates the values for application gateway ssl protocol. 291type ApplicationGatewaySslProtocol string 292 293const ( 294 // TLSv10 ... 295 TLSv10 ApplicationGatewaySslProtocol = "TLSv1_0" 296 // TLSv11 ... 297 TLSv11 ApplicationGatewaySslProtocol = "TLSv1_1" 298 // TLSv12 ... 299 TLSv12 ApplicationGatewaySslProtocol = "TLSv1_2" 300) 301 302// PossibleApplicationGatewaySslProtocolValues returns an array of possible values for the ApplicationGatewaySslProtocol const type. 303func PossibleApplicationGatewaySslProtocolValues() []ApplicationGatewaySslProtocol { 304 return []ApplicationGatewaySslProtocol{TLSv10, TLSv11, TLSv12} 305} 306 307// ApplicationGatewayTier enumerates the values for application gateway tier. 308type ApplicationGatewayTier string 309 310const ( 311 // Standard ... 312 Standard ApplicationGatewayTier = "Standard" 313 // WAF ... 314 WAF ApplicationGatewayTier = "WAF" 315) 316 317// PossibleApplicationGatewayTierValues returns an array of possible values for the ApplicationGatewayTier const type. 318func PossibleApplicationGatewayTierValues() []ApplicationGatewayTier { 319 return []ApplicationGatewayTier{Standard, WAF} 320} 321 322// AssociationType enumerates the values for association type. 323type AssociationType string 324 325const ( 326 // Associated ... 327 Associated AssociationType = "Associated" 328 // Contains ... 329 Contains AssociationType = "Contains" 330) 331 332// PossibleAssociationTypeValues returns an array of possible values for the AssociationType const type. 333func PossibleAssociationTypeValues() []AssociationType { 334 return []AssociationType{Associated, Contains} 335} 336 337// AuthenticationMethod enumerates the values for authentication method. 338type AuthenticationMethod string 339 340const ( 341 // EAPMSCHAPv2 ... 342 EAPMSCHAPv2 AuthenticationMethod = "EAPMSCHAPv2" 343 // EAPTLS ... 344 EAPTLS AuthenticationMethod = "EAPTLS" 345) 346 347// PossibleAuthenticationMethodValues returns an array of possible values for the AuthenticationMethod const type. 348func PossibleAuthenticationMethodValues() []AuthenticationMethod { 349 return []AuthenticationMethod{EAPMSCHAPv2, EAPTLS} 350} 351 352// AuthorizationUseStatus enumerates the values for authorization use status. 353type AuthorizationUseStatus string 354 355const ( 356 // Available ... 357 Available AuthorizationUseStatus = "Available" 358 // InUse ... 359 InUse AuthorizationUseStatus = "InUse" 360) 361 362// PossibleAuthorizationUseStatusValues returns an array of possible values for the AuthorizationUseStatus const type. 363func PossibleAuthorizationUseStatusValues() []AuthorizationUseStatus { 364 return []AuthorizationUseStatus{Available, InUse} 365} 366 367// BgpPeerState enumerates the values for bgp peer state. 368type BgpPeerState string 369 370const ( 371 // BgpPeerStateConnected ... 372 BgpPeerStateConnected BgpPeerState = "Connected" 373 // BgpPeerStateConnecting ... 374 BgpPeerStateConnecting BgpPeerState = "Connecting" 375 // BgpPeerStateIdle ... 376 BgpPeerStateIdle BgpPeerState = "Idle" 377 // BgpPeerStateStopped ... 378 BgpPeerStateStopped BgpPeerState = "Stopped" 379 // BgpPeerStateUnknown ... 380 BgpPeerStateUnknown BgpPeerState = "Unknown" 381) 382 383// PossibleBgpPeerStateValues returns an array of possible values for the BgpPeerState const type. 384func PossibleBgpPeerStateValues() []BgpPeerState { 385 return []BgpPeerState{BgpPeerStateConnected, BgpPeerStateConnecting, BgpPeerStateIdle, BgpPeerStateStopped, BgpPeerStateUnknown} 386} 387 388// ConnectionState enumerates the values for connection state. 389type ConnectionState string 390 391const ( 392 // ConnectionStateReachable ... 393 ConnectionStateReachable ConnectionState = "Reachable" 394 // ConnectionStateUnknown ... 395 ConnectionStateUnknown ConnectionState = "Unknown" 396 // ConnectionStateUnreachable ... 397 ConnectionStateUnreachable ConnectionState = "Unreachable" 398) 399 400// PossibleConnectionStateValues returns an array of possible values for the ConnectionState const type. 401func PossibleConnectionStateValues() []ConnectionState { 402 return []ConnectionState{ConnectionStateReachable, ConnectionStateUnknown, ConnectionStateUnreachable} 403} 404 405// ConnectionStatus enumerates the values for connection status. 406type ConnectionStatus string 407 408const ( 409 // ConnectionStatusConnected ... 410 ConnectionStatusConnected ConnectionStatus = "Connected" 411 // ConnectionStatusDegraded ... 412 ConnectionStatusDegraded ConnectionStatus = "Degraded" 413 // ConnectionStatusDisconnected ... 414 ConnectionStatusDisconnected ConnectionStatus = "Disconnected" 415 // ConnectionStatusUnknown ... 416 ConnectionStatusUnknown ConnectionStatus = "Unknown" 417) 418 419// PossibleConnectionStatusValues returns an array of possible values for the ConnectionStatus const type. 420func PossibleConnectionStatusValues() []ConnectionStatus { 421 return []ConnectionStatus{ConnectionStatusConnected, ConnectionStatusDegraded, ConnectionStatusDisconnected, ConnectionStatusUnknown} 422} 423 424// DhGroup enumerates the values for dh group. 425type DhGroup string 426 427const ( 428 // DHGroup1 ... 429 DHGroup1 DhGroup = "DHGroup1" 430 // DHGroup14 ... 431 DHGroup14 DhGroup = "DHGroup14" 432 // DHGroup2 ... 433 DHGroup2 DhGroup = "DHGroup2" 434 // DHGroup2048 ... 435 DHGroup2048 DhGroup = "DHGroup2048" 436 // DHGroup24 ... 437 DHGroup24 DhGroup = "DHGroup24" 438 // ECP256 ... 439 ECP256 DhGroup = "ECP256" 440 // ECP384 ... 441 ECP384 DhGroup = "ECP384" 442 // None ... 443 None DhGroup = "None" 444) 445 446// PossibleDhGroupValues returns an array of possible values for the DhGroup const type. 447func PossibleDhGroupValues() []DhGroup { 448 return []DhGroup{DHGroup1, DHGroup14, DHGroup2, DHGroup2048, DHGroup24, ECP256, ECP384, None} 449} 450 451// Direction enumerates the values for direction. 452type Direction string 453 454const ( 455 // Inbound ... 456 Inbound Direction = "Inbound" 457 // Outbound ... 458 Outbound Direction = "Outbound" 459) 460 461// PossibleDirectionValues returns an array of possible values for the Direction const type. 462func PossibleDirectionValues() []Direction { 463 return []Direction{Inbound, Outbound} 464} 465 466// EffectiveRouteSource enumerates the values for effective route source. 467type EffectiveRouteSource string 468 469const ( 470 // EffectiveRouteSourceDefault ... 471 EffectiveRouteSourceDefault EffectiveRouteSource = "Default" 472 // EffectiveRouteSourceUnknown ... 473 EffectiveRouteSourceUnknown EffectiveRouteSource = "Unknown" 474 // EffectiveRouteSourceUser ... 475 EffectiveRouteSourceUser EffectiveRouteSource = "User" 476 // EffectiveRouteSourceVirtualNetworkGateway ... 477 EffectiveRouteSourceVirtualNetworkGateway EffectiveRouteSource = "VirtualNetworkGateway" 478) 479 480// PossibleEffectiveRouteSourceValues returns an array of possible values for the EffectiveRouteSource const type. 481func PossibleEffectiveRouteSourceValues() []EffectiveRouteSource { 482 return []EffectiveRouteSource{EffectiveRouteSourceDefault, EffectiveRouteSourceUnknown, EffectiveRouteSourceUser, EffectiveRouteSourceVirtualNetworkGateway} 483} 484 485// EffectiveRouteState enumerates the values for effective route state. 486type EffectiveRouteState string 487 488const ( 489 // Active ... 490 Active EffectiveRouteState = "Active" 491 // Invalid ... 492 Invalid EffectiveRouteState = "Invalid" 493) 494 495// PossibleEffectiveRouteStateValues returns an array of possible values for the EffectiveRouteState const type. 496func PossibleEffectiveRouteStateValues() []EffectiveRouteState { 497 return []EffectiveRouteState{Active, Invalid} 498} 499 500// EffectiveSecurityRuleProtocol enumerates the values for effective security rule protocol. 501type EffectiveSecurityRuleProtocol string 502 503const ( 504 // All ... 505 All EffectiveSecurityRuleProtocol = "All" 506 // TCP ... 507 TCP EffectiveSecurityRuleProtocol = "Tcp" 508 // UDP ... 509 UDP EffectiveSecurityRuleProtocol = "Udp" 510) 511 512// PossibleEffectiveSecurityRuleProtocolValues returns an array of possible values for the EffectiveSecurityRuleProtocol const type. 513func PossibleEffectiveSecurityRuleProtocolValues() []EffectiveSecurityRuleProtocol { 514 return []EffectiveSecurityRuleProtocol{All, TCP, UDP} 515} 516 517// EvaluationState enumerates the values for evaluation state. 518type EvaluationState string 519 520const ( 521 // Completed ... 522 Completed EvaluationState = "Completed" 523 // InProgress ... 524 InProgress EvaluationState = "InProgress" 525 // NotStarted ... 526 NotStarted EvaluationState = "NotStarted" 527) 528 529// PossibleEvaluationStateValues returns an array of possible values for the EvaluationState const type. 530func PossibleEvaluationStateValues() []EvaluationState { 531 return []EvaluationState{Completed, InProgress, NotStarted} 532} 533 534// ExpressRouteCircuitPeeringAdvertisedPublicPrefixState enumerates the values for express route circuit 535// peering advertised public prefix state. 536type ExpressRouteCircuitPeeringAdvertisedPublicPrefixState string 537 538const ( 539 // Configured ... 540 Configured ExpressRouteCircuitPeeringAdvertisedPublicPrefixState = "Configured" 541 // Configuring ... 542 Configuring ExpressRouteCircuitPeeringAdvertisedPublicPrefixState = "Configuring" 543 // NotConfigured ... 544 NotConfigured ExpressRouteCircuitPeeringAdvertisedPublicPrefixState = "NotConfigured" 545 // ValidationNeeded ... 546 ValidationNeeded ExpressRouteCircuitPeeringAdvertisedPublicPrefixState = "ValidationNeeded" 547) 548 549// PossibleExpressRouteCircuitPeeringAdvertisedPublicPrefixStateValues returns an array of possible values for the ExpressRouteCircuitPeeringAdvertisedPublicPrefixState const type. 550func PossibleExpressRouteCircuitPeeringAdvertisedPublicPrefixStateValues() []ExpressRouteCircuitPeeringAdvertisedPublicPrefixState { 551 return []ExpressRouteCircuitPeeringAdvertisedPublicPrefixState{Configured, Configuring, NotConfigured, ValidationNeeded} 552} 553 554// ExpressRouteCircuitPeeringState enumerates the values for express route circuit peering state. 555type ExpressRouteCircuitPeeringState string 556 557const ( 558 // ExpressRouteCircuitPeeringStateDisabled ... 559 ExpressRouteCircuitPeeringStateDisabled ExpressRouteCircuitPeeringState = "Disabled" 560 // ExpressRouteCircuitPeeringStateEnabled ... 561 ExpressRouteCircuitPeeringStateEnabled ExpressRouteCircuitPeeringState = "Enabled" 562) 563 564// PossibleExpressRouteCircuitPeeringStateValues returns an array of possible values for the ExpressRouteCircuitPeeringState const type. 565func PossibleExpressRouteCircuitPeeringStateValues() []ExpressRouteCircuitPeeringState { 566 return []ExpressRouteCircuitPeeringState{ExpressRouteCircuitPeeringStateDisabled, ExpressRouteCircuitPeeringStateEnabled} 567} 568 569// ExpressRouteCircuitPeeringType enumerates the values for express route circuit peering type. 570type ExpressRouteCircuitPeeringType string 571 572const ( 573 // AzurePrivatePeering ... 574 AzurePrivatePeering ExpressRouteCircuitPeeringType = "AzurePrivatePeering" 575 // AzurePublicPeering ... 576 AzurePublicPeering ExpressRouteCircuitPeeringType = "AzurePublicPeering" 577 // MicrosoftPeering ... 578 MicrosoftPeering ExpressRouteCircuitPeeringType = "MicrosoftPeering" 579) 580 581// PossibleExpressRouteCircuitPeeringTypeValues returns an array of possible values for the ExpressRouteCircuitPeeringType const type. 582func PossibleExpressRouteCircuitPeeringTypeValues() []ExpressRouteCircuitPeeringType { 583 return []ExpressRouteCircuitPeeringType{AzurePrivatePeering, AzurePublicPeering, MicrosoftPeering} 584} 585 586// ExpressRouteCircuitSkuFamily enumerates the values for express route circuit sku family. 587type ExpressRouteCircuitSkuFamily string 588 589const ( 590 // MeteredData ... 591 MeteredData ExpressRouteCircuitSkuFamily = "MeteredData" 592 // UnlimitedData ... 593 UnlimitedData ExpressRouteCircuitSkuFamily = "UnlimitedData" 594) 595 596// PossibleExpressRouteCircuitSkuFamilyValues returns an array of possible values for the ExpressRouteCircuitSkuFamily const type. 597func PossibleExpressRouteCircuitSkuFamilyValues() []ExpressRouteCircuitSkuFamily { 598 return []ExpressRouteCircuitSkuFamily{MeteredData, UnlimitedData} 599} 600 601// ExpressRouteCircuitSkuTier enumerates the values for express route circuit sku tier. 602type ExpressRouteCircuitSkuTier string 603 604const ( 605 // ExpressRouteCircuitSkuTierPremium ... 606 ExpressRouteCircuitSkuTierPremium ExpressRouteCircuitSkuTier = "Premium" 607 // ExpressRouteCircuitSkuTierStandard ... 608 ExpressRouteCircuitSkuTierStandard ExpressRouteCircuitSkuTier = "Standard" 609) 610 611// PossibleExpressRouteCircuitSkuTierValues returns an array of possible values for the ExpressRouteCircuitSkuTier const type. 612func PossibleExpressRouteCircuitSkuTierValues() []ExpressRouteCircuitSkuTier { 613 return []ExpressRouteCircuitSkuTier{ExpressRouteCircuitSkuTierPremium, ExpressRouteCircuitSkuTierStandard} 614} 615 616// IkeEncryption enumerates the values for ike encryption. 617type IkeEncryption string 618 619const ( 620 // AES128 ... 621 AES128 IkeEncryption = "AES128" 622 // AES192 ... 623 AES192 IkeEncryption = "AES192" 624 // AES256 ... 625 AES256 IkeEncryption = "AES256" 626 // DES ... 627 DES IkeEncryption = "DES" 628 // DES3 ... 629 DES3 IkeEncryption = "DES3" 630) 631 632// PossibleIkeEncryptionValues returns an array of possible values for the IkeEncryption const type. 633func PossibleIkeEncryptionValues() []IkeEncryption { 634 return []IkeEncryption{AES128, AES192, AES256, DES, DES3} 635} 636 637// IkeIntegrity enumerates the values for ike integrity. 638type IkeIntegrity string 639 640const ( 641 // MD5 ... 642 MD5 IkeIntegrity = "MD5" 643 // SHA1 ... 644 SHA1 IkeIntegrity = "SHA1" 645 // SHA256 ... 646 SHA256 IkeIntegrity = "SHA256" 647 // SHA384 ... 648 SHA384 IkeIntegrity = "SHA384" 649) 650 651// PossibleIkeIntegrityValues returns an array of possible values for the IkeIntegrity const type. 652func PossibleIkeIntegrityValues() []IkeIntegrity { 653 return []IkeIntegrity{MD5, SHA1, SHA256, SHA384} 654} 655 656// IPAllocationMethod enumerates the values for ip allocation method. 657type IPAllocationMethod string 658 659const ( 660 // Dynamic ... 661 Dynamic IPAllocationMethod = "Dynamic" 662 // Static ... 663 Static IPAllocationMethod = "Static" 664) 665 666// PossibleIPAllocationMethodValues returns an array of possible values for the IPAllocationMethod const type. 667func PossibleIPAllocationMethodValues() []IPAllocationMethod { 668 return []IPAllocationMethod{Dynamic, Static} 669} 670 671// IpsecEncryption enumerates the values for ipsec encryption. 672type IpsecEncryption string 673 674const ( 675 // IpsecEncryptionAES128 ... 676 IpsecEncryptionAES128 IpsecEncryption = "AES128" 677 // IpsecEncryptionAES192 ... 678 IpsecEncryptionAES192 IpsecEncryption = "AES192" 679 // IpsecEncryptionAES256 ... 680 IpsecEncryptionAES256 IpsecEncryption = "AES256" 681 // IpsecEncryptionDES ... 682 IpsecEncryptionDES IpsecEncryption = "DES" 683 // IpsecEncryptionDES3 ... 684 IpsecEncryptionDES3 IpsecEncryption = "DES3" 685 // IpsecEncryptionGCMAES128 ... 686 IpsecEncryptionGCMAES128 IpsecEncryption = "GCMAES128" 687 // IpsecEncryptionGCMAES192 ... 688 IpsecEncryptionGCMAES192 IpsecEncryption = "GCMAES192" 689 // IpsecEncryptionGCMAES256 ... 690 IpsecEncryptionGCMAES256 IpsecEncryption = "GCMAES256" 691 // IpsecEncryptionNone ... 692 IpsecEncryptionNone IpsecEncryption = "None" 693) 694 695// PossibleIpsecEncryptionValues returns an array of possible values for the IpsecEncryption const type. 696func PossibleIpsecEncryptionValues() []IpsecEncryption { 697 return []IpsecEncryption{IpsecEncryptionAES128, IpsecEncryptionAES192, IpsecEncryptionAES256, IpsecEncryptionDES, IpsecEncryptionDES3, IpsecEncryptionGCMAES128, IpsecEncryptionGCMAES192, IpsecEncryptionGCMAES256, IpsecEncryptionNone} 698} 699 700// IpsecIntegrity enumerates the values for ipsec integrity. 701type IpsecIntegrity string 702 703const ( 704 // IpsecIntegrityGCMAES128 ... 705 IpsecIntegrityGCMAES128 IpsecIntegrity = "GCMAES128" 706 // IpsecIntegrityGCMAES192 ... 707 IpsecIntegrityGCMAES192 IpsecIntegrity = "GCMAES192" 708 // IpsecIntegrityGCMAES256 ... 709 IpsecIntegrityGCMAES256 IpsecIntegrity = "GCMAES256" 710 // IpsecIntegrityMD5 ... 711 IpsecIntegrityMD5 IpsecIntegrity = "MD5" 712 // IpsecIntegritySHA1 ... 713 IpsecIntegritySHA1 IpsecIntegrity = "SHA1" 714 // IpsecIntegritySHA256 ... 715 IpsecIntegritySHA256 IpsecIntegrity = "SHA256" 716) 717 718// PossibleIpsecIntegrityValues returns an array of possible values for the IpsecIntegrity const type. 719func PossibleIpsecIntegrityValues() []IpsecIntegrity { 720 return []IpsecIntegrity{IpsecIntegrityGCMAES128, IpsecIntegrityGCMAES192, IpsecIntegrityGCMAES256, IpsecIntegrityMD5, IpsecIntegritySHA1, IpsecIntegritySHA256} 721} 722 723// IPVersion enumerates the values for ip version. 724type IPVersion string 725 726const ( 727 // IPv4 ... 728 IPv4 IPVersion = "IPv4" 729 // IPv6 ... 730 IPv6 IPVersion = "IPv6" 731) 732 733// PossibleIPVersionValues returns an array of possible values for the IPVersion const type. 734func PossibleIPVersionValues() []IPVersion { 735 return []IPVersion{IPv4, IPv6} 736} 737 738// IssueType enumerates the values for issue type. 739type IssueType string 740 741const ( 742 // IssueTypeAgentStopped ... 743 IssueTypeAgentStopped IssueType = "AgentStopped" 744 // IssueTypeDNSResolution ... 745 IssueTypeDNSResolution IssueType = "DnsResolution" 746 // IssueTypeGuestFirewall ... 747 IssueTypeGuestFirewall IssueType = "GuestFirewall" 748 // IssueTypeNetworkSecurityRule ... 749 IssueTypeNetworkSecurityRule IssueType = "NetworkSecurityRule" 750 // IssueTypePlatform ... 751 IssueTypePlatform IssueType = "Platform" 752 // IssueTypePortThrottled ... 753 IssueTypePortThrottled IssueType = "PortThrottled" 754 // IssueTypeSocketBind ... 755 IssueTypeSocketBind IssueType = "SocketBind" 756 // IssueTypeUnknown ... 757 IssueTypeUnknown IssueType = "Unknown" 758 // IssueTypeUserDefinedRoute ... 759 IssueTypeUserDefinedRoute IssueType = "UserDefinedRoute" 760) 761 762// PossibleIssueTypeValues returns an array of possible values for the IssueType const type. 763func PossibleIssueTypeValues() []IssueType { 764 return []IssueType{IssueTypeAgentStopped, IssueTypeDNSResolution, IssueTypeGuestFirewall, IssueTypeNetworkSecurityRule, IssueTypePlatform, IssueTypePortThrottled, IssueTypeSocketBind, IssueTypeUnknown, IssueTypeUserDefinedRoute} 765} 766 767// LoadBalancerSkuName enumerates the values for load balancer sku name. 768type LoadBalancerSkuName string 769 770const ( 771 // LoadBalancerSkuNameBasic ... 772 LoadBalancerSkuNameBasic LoadBalancerSkuName = "Basic" 773 // LoadBalancerSkuNameStandard ... 774 LoadBalancerSkuNameStandard LoadBalancerSkuName = "Standard" 775) 776 777// PossibleLoadBalancerSkuNameValues returns an array of possible values for the LoadBalancerSkuName const type. 778func PossibleLoadBalancerSkuNameValues() []LoadBalancerSkuName { 779 return []LoadBalancerSkuName{LoadBalancerSkuNameBasic, LoadBalancerSkuNameStandard} 780} 781 782// LoadDistribution enumerates the values for load distribution. 783type LoadDistribution string 784 785const ( 786 // Default ... 787 Default LoadDistribution = "Default" 788 // SourceIP ... 789 SourceIP LoadDistribution = "SourceIP" 790 // SourceIPProtocol ... 791 SourceIPProtocol LoadDistribution = "SourceIPProtocol" 792) 793 794// PossibleLoadDistributionValues returns an array of possible values for the LoadDistribution const type. 795func PossibleLoadDistributionValues() []LoadDistribution { 796 return []LoadDistribution{Default, SourceIP, SourceIPProtocol} 797} 798 799// NextHopType enumerates the values for next hop type. 800type NextHopType string 801 802const ( 803 // NextHopTypeHyperNetGateway ... 804 NextHopTypeHyperNetGateway NextHopType = "HyperNetGateway" 805 // NextHopTypeInternet ... 806 NextHopTypeInternet NextHopType = "Internet" 807 // NextHopTypeNone ... 808 NextHopTypeNone NextHopType = "None" 809 // NextHopTypeVirtualAppliance ... 810 NextHopTypeVirtualAppliance NextHopType = "VirtualAppliance" 811 // NextHopTypeVirtualNetworkGateway ... 812 NextHopTypeVirtualNetworkGateway NextHopType = "VirtualNetworkGateway" 813 // NextHopTypeVnetLocal ... 814 NextHopTypeVnetLocal NextHopType = "VnetLocal" 815) 816 817// PossibleNextHopTypeValues returns an array of possible values for the NextHopType const type. 818func PossibleNextHopTypeValues() []NextHopType { 819 return []NextHopType{NextHopTypeHyperNetGateway, NextHopTypeInternet, NextHopTypeNone, NextHopTypeVirtualAppliance, NextHopTypeVirtualNetworkGateway, NextHopTypeVnetLocal} 820} 821 822// OperationStatus enumerates the values for operation status. 823type OperationStatus string 824 825const ( 826 // OperationStatusFailed ... 827 OperationStatusFailed OperationStatus = "Failed" 828 // OperationStatusInProgress ... 829 OperationStatusInProgress OperationStatus = "InProgress" 830 // OperationStatusSucceeded ... 831 OperationStatusSucceeded OperationStatus = "Succeeded" 832) 833 834// PossibleOperationStatusValues returns an array of possible values for the OperationStatus const type. 835func PossibleOperationStatusValues() []OperationStatus { 836 return []OperationStatus{OperationStatusFailed, OperationStatusInProgress, OperationStatusSucceeded} 837} 838 839// Origin enumerates the values for origin. 840type Origin string 841 842const ( 843 // OriginInbound ... 844 OriginInbound Origin = "Inbound" 845 // OriginLocal ... 846 OriginLocal Origin = "Local" 847 // OriginOutbound ... 848 OriginOutbound Origin = "Outbound" 849) 850 851// PossibleOriginValues returns an array of possible values for the Origin const type. 852func PossibleOriginValues() []Origin { 853 return []Origin{OriginInbound, OriginLocal, OriginOutbound} 854} 855 856// PcError enumerates the values for pc error. 857type PcError string 858 859const ( 860 // AgentStopped ... 861 AgentStopped PcError = "AgentStopped" 862 // CaptureFailed ... 863 CaptureFailed PcError = "CaptureFailed" 864 // InternalError ... 865 InternalError PcError = "InternalError" 866 // LocalFileFailed ... 867 LocalFileFailed PcError = "LocalFileFailed" 868 // StorageFailed ... 869 StorageFailed PcError = "StorageFailed" 870) 871 872// PossiblePcErrorValues returns an array of possible values for the PcError const type. 873func PossiblePcErrorValues() []PcError { 874 return []PcError{AgentStopped, CaptureFailed, InternalError, LocalFileFailed, StorageFailed} 875} 876 877// PcProtocol enumerates the values for pc protocol. 878type PcProtocol string 879 880const ( 881 // PcProtocolAny ... 882 PcProtocolAny PcProtocol = "Any" 883 // PcProtocolTCP ... 884 PcProtocolTCP PcProtocol = "TCP" 885 // PcProtocolUDP ... 886 PcProtocolUDP PcProtocol = "UDP" 887) 888 889// PossiblePcProtocolValues returns an array of possible values for the PcProtocol const type. 890func PossiblePcProtocolValues() []PcProtocol { 891 return []PcProtocol{PcProtocolAny, PcProtocolTCP, PcProtocolUDP} 892} 893 894// PcStatus enumerates the values for pc status. 895type PcStatus string 896 897const ( 898 // PcStatusError ... 899 PcStatusError PcStatus = "Error" 900 // PcStatusNotStarted ... 901 PcStatusNotStarted PcStatus = "NotStarted" 902 // PcStatusRunning ... 903 PcStatusRunning PcStatus = "Running" 904 // PcStatusStopped ... 905 PcStatusStopped PcStatus = "Stopped" 906 // PcStatusUnknown ... 907 PcStatusUnknown PcStatus = "Unknown" 908) 909 910// PossiblePcStatusValues returns an array of possible values for the PcStatus const type. 911func PossiblePcStatusValues() []PcStatus { 912 return []PcStatus{PcStatusError, PcStatusNotStarted, PcStatusRunning, PcStatusStopped, PcStatusUnknown} 913} 914 915// PfsGroup enumerates the values for pfs group. 916type PfsGroup string 917 918const ( 919 // PfsGroupECP256 ... 920 PfsGroupECP256 PfsGroup = "ECP256" 921 // PfsGroupECP384 ... 922 PfsGroupECP384 PfsGroup = "ECP384" 923 // PfsGroupNone ... 924 PfsGroupNone PfsGroup = "None" 925 // PfsGroupPFS1 ... 926 PfsGroupPFS1 PfsGroup = "PFS1" 927 // PfsGroupPFS2 ... 928 PfsGroupPFS2 PfsGroup = "PFS2" 929 // PfsGroupPFS2048 ... 930 PfsGroupPFS2048 PfsGroup = "PFS2048" 931 // PfsGroupPFS24 ... 932 PfsGroupPFS24 PfsGroup = "PFS24" 933) 934 935// PossiblePfsGroupValues returns an array of possible values for the PfsGroup const type. 936func PossiblePfsGroupValues() []PfsGroup { 937 return []PfsGroup{PfsGroupECP256, PfsGroupECP384, PfsGroupNone, PfsGroupPFS1, PfsGroupPFS2, PfsGroupPFS2048, PfsGroupPFS24} 938} 939 940// ProbeProtocol enumerates the values for probe protocol. 941type ProbeProtocol string 942 943const ( 944 // ProbeProtocolHTTP ... 945 ProbeProtocolHTTP ProbeProtocol = "Http" 946 // ProbeProtocolTCP ... 947 ProbeProtocolTCP ProbeProtocol = "Tcp" 948) 949 950// PossibleProbeProtocolValues returns an array of possible values for the ProbeProtocol const type. 951func PossibleProbeProtocolValues() []ProbeProtocol { 952 return []ProbeProtocol{ProbeProtocolHTTP, ProbeProtocolTCP} 953} 954 955// ProcessorArchitecture enumerates the values for processor architecture. 956type ProcessorArchitecture string 957 958const ( 959 // Amd64 ... 960 Amd64 ProcessorArchitecture = "Amd64" 961 // X86 ... 962 X86 ProcessorArchitecture = "X86" 963) 964 965// PossibleProcessorArchitectureValues returns an array of possible values for the ProcessorArchitecture const type. 966func PossibleProcessorArchitectureValues() []ProcessorArchitecture { 967 return []ProcessorArchitecture{Amd64, X86} 968} 969 970// Protocol enumerates the values for protocol. 971type Protocol string 972 973const ( 974 // ProtocolTCP ... 975 ProtocolTCP Protocol = "TCP" 976 // ProtocolUDP ... 977 ProtocolUDP Protocol = "UDP" 978) 979 980// PossibleProtocolValues returns an array of possible values for the Protocol const type. 981func PossibleProtocolValues() []Protocol { 982 return []Protocol{ProtocolTCP, ProtocolUDP} 983} 984 985// ProvisioningState enumerates the values for provisioning state. 986type ProvisioningState string 987 988const ( 989 // Deleting ... 990 Deleting ProvisioningState = "Deleting" 991 // Failed ... 992 Failed ProvisioningState = "Failed" 993 // Succeeded ... 994 Succeeded ProvisioningState = "Succeeded" 995 // Updating ... 996 Updating ProvisioningState = "Updating" 997) 998 999// PossibleProvisioningStateValues returns an array of possible values for the ProvisioningState const type. 1000func PossibleProvisioningStateValues() []ProvisioningState { 1001 return []ProvisioningState{Deleting, Failed, Succeeded, Updating} 1002} 1003 1004// PublicIPAddressSkuName enumerates the values for public ip address sku name. 1005type PublicIPAddressSkuName string 1006 1007const ( 1008 // PublicIPAddressSkuNameBasic ... 1009 PublicIPAddressSkuNameBasic PublicIPAddressSkuName = "Basic" 1010 // PublicIPAddressSkuNameStandard ... 1011 PublicIPAddressSkuNameStandard PublicIPAddressSkuName = "Standard" 1012) 1013 1014// PossiblePublicIPAddressSkuNameValues returns an array of possible values for the PublicIPAddressSkuName const type. 1015func PossiblePublicIPAddressSkuNameValues() []PublicIPAddressSkuName { 1016 return []PublicIPAddressSkuName{PublicIPAddressSkuNameBasic, PublicIPAddressSkuNameStandard} 1017} 1018 1019// RouteNextHopType enumerates the values for route next hop type. 1020type RouteNextHopType string 1021 1022const ( 1023 // RouteNextHopTypeInternet ... 1024 RouteNextHopTypeInternet RouteNextHopType = "Internet" 1025 // RouteNextHopTypeNone ... 1026 RouteNextHopTypeNone RouteNextHopType = "None" 1027 // RouteNextHopTypeVirtualAppliance ... 1028 RouteNextHopTypeVirtualAppliance RouteNextHopType = "VirtualAppliance" 1029 // RouteNextHopTypeVirtualNetworkGateway ... 1030 RouteNextHopTypeVirtualNetworkGateway RouteNextHopType = "VirtualNetworkGateway" 1031 // RouteNextHopTypeVnetLocal ... 1032 RouteNextHopTypeVnetLocal RouteNextHopType = "VnetLocal" 1033) 1034 1035// PossibleRouteNextHopTypeValues returns an array of possible values for the RouteNextHopType const type. 1036func PossibleRouteNextHopTypeValues() []RouteNextHopType { 1037 return []RouteNextHopType{RouteNextHopTypeInternet, RouteNextHopTypeNone, RouteNextHopTypeVirtualAppliance, RouteNextHopTypeVirtualNetworkGateway, RouteNextHopTypeVnetLocal} 1038} 1039 1040// SecurityRuleAccess enumerates the values for security rule access. 1041type SecurityRuleAccess string 1042 1043const ( 1044 // SecurityRuleAccessAllow ... 1045 SecurityRuleAccessAllow SecurityRuleAccess = "Allow" 1046 // SecurityRuleAccessDeny ... 1047 SecurityRuleAccessDeny SecurityRuleAccess = "Deny" 1048) 1049 1050// PossibleSecurityRuleAccessValues returns an array of possible values for the SecurityRuleAccess const type. 1051func PossibleSecurityRuleAccessValues() []SecurityRuleAccess { 1052 return []SecurityRuleAccess{SecurityRuleAccessAllow, SecurityRuleAccessDeny} 1053} 1054 1055// SecurityRuleDirection enumerates the values for security rule direction. 1056type SecurityRuleDirection string 1057 1058const ( 1059 // SecurityRuleDirectionInbound ... 1060 SecurityRuleDirectionInbound SecurityRuleDirection = "Inbound" 1061 // SecurityRuleDirectionOutbound ... 1062 SecurityRuleDirectionOutbound SecurityRuleDirection = "Outbound" 1063) 1064 1065// PossibleSecurityRuleDirectionValues returns an array of possible values for the SecurityRuleDirection const type. 1066func PossibleSecurityRuleDirectionValues() []SecurityRuleDirection { 1067 return []SecurityRuleDirection{SecurityRuleDirectionInbound, SecurityRuleDirectionOutbound} 1068} 1069 1070// SecurityRuleProtocol enumerates the values for security rule protocol. 1071type SecurityRuleProtocol string 1072 1073const ( 1074 // SecurityRuleProtocolAsterisk ... 1075 SecurityRuleProtocolAsterisk SecurityRuleProtocol = "*" 1076 // SecurityRuleProtocolTCP ... 1077 SecurityRuleProtocolTCP SecurityRuleProtocol = "Tcp" 1078 // SecurityRuleProtocolUDP ... 1079 SecurityRuleProtocolUDP SecurityRuleProtocol = "Udp" 1080) 1081 1082// PossibleSecurityRuleProtocolValues returns an array of possible values for the SecurityRuleProtocol const type. 1083func PossibleSecurityRuleProtocolValues() []SecurityRuleProtocol { 1084 return []SecurityRuleProtocol{SecurityRuleProtocolAsterisk, SecurityRuleProtocolTCP, SecurityRuleProtocolUDP} 1085} 1086 1087// ServiceProviderProvisioningState enumerates the values for service provider provisioning state. 1088type ServiceProviderProvisioningState string 1089 1090const ( 1091 // Deprovisioning ... 1092 Deprovisioning ServiceProviderProvisioningState = "Deprovisioning" 1093 // NotProvisioned ... 1094 NotProvisioned ServiceProviderProvisioningState = "NotProvisioned" 1095 // Provisioned ... 1096 Provisioned ServiceProviderProvisioningState = "Provisioned" 1097 // Provisioning ... 1098 Provisioning ServiceProviderProvisioningState = "Provisioning" 1099) 1100 1101// PossibleServiceProviderProvisioningStateValues returns an array of possible values for the ServiceProviderProvisioningState const type. 1102func PossibleServiceProviderProvisioningStateValues() []ServiceProviderProvisioningState { 1103 return []ServiceProviderProvisioningState{Deprovisioning, NotProvisioned, Provisioned, Provisioning} 1104} 1105 1106// Severity enumerates the values for severity. 1107type Severity string 1108 1109const ( 1110 // SeverityError ... 1111 SeverityError Severity = "Error" 1112 // SeverityWarning ... 1113 SeverityWarning Severity = "Warning" 1114) 1115 1116// PossibleSeverityValues returns an array of possible values for the Severity const type. 1117func PossibleSeverityValues() []Severity { 1118 return []Severity{SeverityError, SeverityWarning} 1119} 1120 1121// TransportProtocol enumerates the values for transport protocol. 1122type TransportProtocol string 1123 1124const ( 1125 // TransportProtocolAll ... 1126 TransportProtocolAll TransportProtocol = "All" 1127 // TransportProtocolTCP ... 1128 TransportProtocolTCP TransportProtocol = "Tcp" 1129 // TransportProtocolUDP ... 1130 TransportProtocolUDP TransportProtocol = "Udp" 1131) 1132 1133// PossibleTransportProtocolValues returns an array of possible values for the TransportProtocol const type. 1134func PossibleTransportProtocolValues() []TransportProtocol { 1135 return []TransportProtocol{TransportProtocolAll, TransportProtocolTCP, TransportProtocolUDP} 1136} 1137 1138// VirtualNetworkGatewayConnectionStatus enumerates the values for virtual network gateway connection status. 1139type VirtualNetworkGatewayConnectionStatus string 1140 1141const ( 1142 // VirtualNetworkGatewayConnectionStatusConnected ... 1143 VirtualNetworkGatewayConnectionStatusConnected VirtualNetworkGatewayConnectionStatus = "Connected" 1144 // VirtualNetworkGatewayConnectionStatusConnecting ... 1145 VirtualNetworkGatewayConnectionStatusConnecting VirtualNetworkGatewayConnectionStatus = "Connecting" 1146 // VirtualNetworkGatewayConnectionStatusNotConnected ... 1147 VirtualNetworkGatewayConnectionStatusNotConnected VirtualNetworkGatewayConnectionStatus = "NotConnected" 1148 // VirtualNetworkGatewayConnectionStatusUnknown ... 1149 VirtualNetworkGatewayConnectionStatusUnknown VirtualNetworkGatewayConnectionStatus = "Unknown" 1150) 1151 1152// PossibleVirtualNetworkGatewayConnectionStatusValues returns an array of possible values for the VirtualNetworkGatewayConnectionStatus const type. 1153func PossibleVirtualNetworkGatewayConnectionStatusValues() []VirtualNetworkGatewayConnectionStatus { 1154 return []VirtualNetworkGatewayConnectionStatus{VirtualNetworkGatewayConnectionStatusConnected, VirtualNetworkGatewayConnectionStatusConnecting, VirtualNetworkGatewayConnectionStatusNotConnected, VirtualNetworkGatewayConnectionStatusUnknown} 1155} 1156 1157// VirtualNetworkGatewayConnectionType enumerates the values for virtual network gateway connection type. 1158type VirtualNetworkGatewayConnectionType string 1159 1160const ( 1161 // ExpressRoute ... 1162 ExpressRoute VirtualNetworkGatewayConnectionType = "ExpressRoute" 1163 // IPsec ... 1164 IPsec VirtualNetworkGatewayConnectionType = "IPsec" 1165 // Vnet2Vnet ... 1166 Vnet2Vnet VirtualNetworkGatewayConnectionType = "Vnet2Vnet" 1167 // VPNClient ... 1168 VPNClient VirtualNetworkGatewayConnectionType = "VPNClient" 1169) 1170 1171// PossibleVirtualNetworkGatewayConnectionTypeValues returns an array of possible values for the VirtualNetworkGatewayConnectionType const type. 1172func PossibleVirtualNetworkGatewayConnectionTypeValues() []VirtualNetworkGatewayConnectionType { 1173 return []VirtualNetworkGatewayConnectionType{ExpressRoute, IPsec, Vnet2Vnet, VPNClient} 1174} 1175 1176// VirtualNetworkGatewaySkuName enumerates the values for virtual network gateway sku name. 1177type VirtualNetworkGatewaySkuName string 1178 1179const ( 1180 // VirtualNetworkGatewaySkuNameBasic ... 1181 VirtualNetworkGatewaySkuNameBasic VirtualNetworkGatewaySkuName = "Basic" 1182 // VirtualNetworkGatewaySkuNameHighPerformance ... 1183 VirtualNetworkGatewaySkuNameHighPerformance VirtualNetworkGatewaySkuName = "HighPerformance" 1184 // VirtualNetworkGatewaySkuNameStandard ... 1185 VirtualNetworkGatewaySkuNameStandard VirtualNetworkGatewaySkuName = "Standard" 1186 // VirtualNetworkGatewaySkuNameUltraPerformance ... 1187 VirtualNetworkGatewaySkuNameUltraPerformance VirtualNetworkGatewaySkuName = "UltraPerformance" 1188 // VirtualNetworkGatewaySkuNameVpnGw1 ... 1189 VirtualNetworkGatewaySkuNameVpnGw1 VirtualNetworkGatewaySkuName = "VpnGw1" 1190 // VirtualNetworkGatewaySkuNameVpnGw2 ... 1191 VirtualNetworkGatewaySkuNameVpnGw2 VirtualNetworkGatewaySkuName = "VpnGw2" 1192 // VirtualNetworkGatewaySkuNameVpnGw3 ... 1193 VirtualNetworkGatewaySkuNameVpnGw3 VirtualNetworkGatewaySkuName = "VpnGw3" 1194) 1195 1196// PossibleVirtualNetworkGatewaySkuNameValues returns an array of possible values for the VirtualNetworkGatewaySkuName const type. 1197func PossibleVirtualNetworkGatewaySkuNameValues() []VirtualNetworkGatewaySkuName { 1198 return []VirtualNetworkGatewaySkuName{VirtualNetworkGatewaySkuNameBasic, VirtualNetworkGatewaySkuNameHighPerformance, VirtualNetworkGatewaySkuNameStandard, VirtualNetworkGatewaySkuNameUltraPerformance, VirtualNetworkGatewaySkuNameVpnGw1, VirtualNetworkGatewaySkuNameVpnGw2, VirtualNetworkGatewaySkuNameVpnGw3} 1199} 1200 1201// VirtualNetworkGatewaySkuTier enumerates the values for virtual network gateway sku tier. 1202type VirtualNetworkGatewaySkuTier string 1203 1204const ( 1205 // VirtualNetworkGatewaySkuTierBasic ... 1206 VirtualNetworkGatewaySkuTierBasic VirtualNetworkGatewaySkuTier = "Basic" 1207 // VirtualNetworkGatewaySkuTierHighPerformance ... 1208 VirtualNetworkGatewaySkuTierHighPerformance VirtualNetworkGatewaySkuTier = "HighPerformance" 1209 // VirtualNetworkGatewaySkuTierStandard ... 1210 VirtualNetworkGatewaySkuTierStandard VirtualNetworkGatewaySkuTier = "Standard" 1211 // VirtualNetworkGatewaySkuTierUltraPerformance ... 1212 VirtualNetworkGatewaySkuTierUltraPerformance VirtualNetworkGatewaySkuTier = "UltraPerformance" 1213 // VirtualNetworkGatewaySkuTierVpnGw1 ... 1214 VirtualNetworkGatewaySkuTierVpnGw1 VirtualNetworkGatewaySkuTier = "VpnGw1" 1215 // VirtualNetworkGatewaySkuTierVpnGw2 ... 1216 VirtualNetworkGatewaySkuTierVpnGw2 VirtualNetworkGatewaySkuTier = "VpnGw2" 1217 // VirtualNetworkGatewaySkuTierVpnGw3 ... 1218 VirtualNetworkGatewaySkuTierVpnGw3 VirtualNetworkGatewaySkuTier = "VpnGw3" 1219) 1220 1221// PossibleVirtualNetworkGatewaySkuTierValues returns an array of possible values for the VirtualNetworkGatewaySkuTier const type. 1222func PossibleVirtualNetworkGatewaySkuTierValues() []VirtualNetworkGatewaySkuTier { 1223 return []VirtualNetworkGatewaySkuTier{VirtualNetworkGatewaySkuTierBasic, VirtualNetworkGatewaySkuTierHighPerformance, VirtualNetworkGatewaySkuTierStandard, VirtualNetworkGatewaySkuTierUltraPerformance, VirtualNetworkGatewaySkuTierVpnGw1, VirtualNetworkGatewaySkuTierVpnGw2, VirtualNetworkGatewaySkuTierVpnGw3} 1224} 1225 1226// VirtualNetworkGatewayType enumerates the values for virtual network gateway type. 1227type VirtualNetworkGatewayType string 1228 1229const ( 1230 // VirtualNetworkGatewayTypeExpressRoute ... 1231 VirtualNetworkGatewayTypeExpressRoute VirtualNetworkGatewayType = "ExpressRoute" 1232 // VirtualNetworkGatewayTypeVpn ... 1233 VirtualNetworkGatewayTypeVpn VirtualNetworkGatewayType = "Vpn" 1234) 1235 1236// PossibleVirtualNetworkGatewayTypeValues returns an array of possible values for the VirtualNetworkGatewayType const type. 1237func PossibleVirtualNetworkGatewayTypeValues() []VirtualNetworkGatewayType { 1238 return []VirtualNetworkGatewayType{VirtualNetworkGatewayTypeExpressRoute, VirtualNetworkGatewayTypeVpn} 1239} 1240 1241// VirtualNetworkPeeringState enumerates the values for virtual network peering state. 1242type VirtualNetworkPeeringState string 1243 1244const ( 1245 // Connected ... 1246 Connected VirtualNetworkPeeringState = "Connected" 1247 // Disconnected ... 1248 Disconnected VirtualNetworkPeeringState = "Disconnected" 1249 // Initiated ... 1250 Initiated VirtualNetworkPeeringState = "Initiated" 1251) 1252 1253// PossibleVirtualNetworkPeeringStateValues returns an array of possible values for the VirtualNetworkPeeringState const type. 1254func PossibleVirtualNetworkPeeringStateValues() []VirtualNetworkPeeringState { 1255 return []VirtualNetworkPeeringState{Connected, Disconnected, Initiated} 1256} 1257 1258// VpnClientProtocol enumerates the values for vpn client protocol. 1259type VpnClientProtocol string 1260 1261const ( 1262 // IkeV2 ... 1263 IkeV2 VpnClientProtocol = "IkeV2" 1264 // SSTP ... 1265 SSTP VpnClientProtocol = "SSTP" 1266) 1267 1268// PossibleVpnClientProtocolValues returns an array of possible values for the VpnClientProtocol const type. 1269func PossibleVpnClientProtocolValues() []VpnClientProtocol { 1270 return []VpnClientProtocol{IkeV2, SSTP} 1271} 1272 1273// VpnType enumerates the values for vpn type. 1274type VpnType string 1275 1276const ( 1277 // PolicyBased ... 1278 PolicyBased VpnType = "PolicyBased" 1279 // RouteBased ... 1280 RouteBased VpnType = "RouteBased" 1281) 1282 1283// PossibleVpnTypeValues returns an array of possible values for the VpnType const type. 1284func PossibleVpnTypeValues() []VpnType { 1285 return []VpnType{PolicyBased, RouteBased} 1286} 1287 1288// AddressSpace addressSpace contains an array of IP address ranges that can be used by subnets of the 1289// virtual network. 1290type AddressSpace struct { 1291 // AddressPrefixes - A list of address blocks reserved for this virtual network in CIDR notation. 1292 AddressPrefixes *[]string `json:"addressPrefixes,omitempty"` 1293} 1294 1295// ApplicationGateway application gateway resource 1296type ApplicationGateway struct { 1297 autorest.Response `json:"-"` 1298 *ApplicationGatewayPropertiesFormat `json:"properties,omitempty"` 1299 // Etag - A unique read-only string that changes whenever the resource is updated. 1300 Etag *string `json:"etag,omitempty"` 1301 // ID - Resource ID. 1302 ID *string `json:"id,omitempty"` 1303 // Name - READ-ONLY; Resource name. 1304 Name *string `json:"name,omitempty"` 1305 // Type - READ-ONLY; Resource type. 1306 Type *string `json:"type,omitempty"` 1307 // Location - Resource location. 1308 Location *string `json:"location,omitempty"` 1309 // Tags - Resource tags. 1310 Tags map[string]*string `json:"tags"` 1311} 1312 1313// MarshalJSON is the custom marshaler for ApplicationGateway. 1314func (ag ApplicationGateway) MarshalJSON() ([]byte, error) { 1315 objectMap := make(map[string]interface{}) 1316 if ag.ApplicationGatewayPropertiesFormat != nil { 1317 objectMap["properties"] = ag.ApplicationGatewayPropertiesFormat 1318 } 1319 if ag.Etag != nil { 1320 objectMap["etag"] = ag.Etag 1321 } 1322 if ag.ID != nil { 1323 objectMap["id"] = ag.ID 1324 } 1325 if ag.Location != nil { 1326 objectMap["location"] = ag.Location 1327 } 1328 if ag.Tags != nil { 1329 objectMap["tags"] = ag.Tags 1330 } 1331 return json.Marshal(objectMap) 1332} 1333 1334// UnmarshalJSON is the custom unmarshaler for ApplicationGateway struct. 1335func (ag *ApplicationGateway) UnmarshalJSON(body []byte) error { 1336 var m map[string]*json.RawMessage 1337 err := json.Unmarshal(body, &m) 1338 if err != nil { 1339 return err 1340 } 1341 for k, v := range m { 1342 switch k { 1343 case "properties": 1344 if v != nil { 1345 var applicationGatewayPropertiesFormat ApplicationGatewayPropertiesFormat 1346 err = json.Unmarshal(*v, &applicationGatewayPropertiesFormat) 1347 if err != nil { 1348 return err 1349 } 1350 ag.ApplicationGatewayPropertiesFormat = &applicationGatewayPropertiesFormat 1351 } 1352 case "etag": 1353 if v != nil { 1354 var etag string 1355 err = json.Unmarshal(*v, &etag) 1356 if err != nil { 1357 return err 1358 } 1359 ag.Etag = &etag 1360 } 1361 case "id": 1362 if v != nil { 1363 var ID string 1364 err = json.Unmarshal(*v, &ID) 1365 if err != nil { 1366 return err 1367 } 1368 ag.ID = &ID 1369 } 1370 case "name": 1371 if v != nil { 1372 var name string 1373 err = json.Unmarshal(*v, &name) 1374 if err != nil { 1375 return err 1376 } 1377 ag.Name = &name 1378 } 1379 case "type": 1380 if v != nil { 1381 var typeVar string 1382 err = json.Unmarshal(*v, &typeVar) 1383 if err != nil { 1384 return err 1385 } 1386 ag.Type = &typeVar 1387 } 1388 case "location": 1389 if v != nil { 1390 var location string 1391 err = json.Unmarshal(*v, &location) 1392 if err != nil { 1393 return err 1394 } 1395 ag.Location = &location 1396 } 1397 case "tags": 1398 if v != nil { 1399 var tags map[string]*string 1400 err = json.Unmarshal(*v, &tags) 1401 if err != nil { 1402 return err 1403 } 1404 ag.Tags = tags 1405 } 1406 } 1407 } 1408 1409 return nil 1410} 1411 1412// ApplicationGatewayAuthenticationCertificate authentication certificates of an application gateway. 1413type ApplicationGatewayAuthenticationCertificate struct { 1414 *ApplicationGatewayAuthenticationCertificatePropertiesFormat `json:"properties,omitempty"` 1415 // Name - Name of the resource that is unique within a resource group. This name can be used to access the resource. 1416 Name *string `json:"name,omitempty"` 1417 // Etag - A unique read-only string that changes whenever the resource is updated. 1418 Etag *string `json:"etag,omitempty"` 1419 // Type - Type of the resource. 1420 Type *string `json:"type,omitempty"` 1421 // ID - Resource ID. 1422 ID *string `json:"id,omitempty"` 1423} 1424 1425// MarshalJSON is the custom marshaler for ApplicationGatewayAuthenticationCertificate. 1426func (agac ApplicationGatewayAuthenticationCertificate) MarshalJSON() ([]byte, error) { 1427 objectMap := make(map[string]interface{}) 1428 if agac.ApplicationGatewayAuthenticationCertificatePropertiesFormat != nil { 1429 objectMap["properties"] = agac.ApplicationGatewayAuthenticationCertificatePropertiesFormat 1430 } 1431 if agac.Name != nil { 1432 objectMap["name"] = agac.Name 1433 } 1434 if agac.Etag != nil { 1435 objectMap["etag"] = agac.Etag 1436 } 1437 if agac.Type != nil { 1438 objectMap["type"] = agac.Type 1439 } 1440 if agac.ID != nil { 1441 objectMap["id"] = agac.ID 1442 } 1443 return json.Marshal(objectMap) 1444} 1445 1446// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayAuthenticationCertificate struct. 1447func (agac *ApplicationGatewayAuthenticationCertificate) UnmarshalJSON(body []byte) error { 1448 var m map[string]*json.RawMessage 1449 err := json.Unmarshal(body, &m) 1450 if err != nil { 1451 return err 1452 } 1453 for k, v := range m { 1454 switch k { 1455 case "properties": 1456 if v != nil { 1457 var applicationGatewayAuthenticationCertificatePropertiesFormat ApplicationGatewayAuthenticationCertificatePropertiesFormat 1458 err = json.Unmarshal(*v, &applicationGatewayAuthenticationCertificatePropertiesFormat) 1459 if err != nil { 1460 return err 1461 } 1462 agac.ApplicationGatewayAuthenticationCertificatePropertiesFormat = &applicationGatewayAuthenticationCertificatePropertiesFormat 1463 } 1464 case "name": 1465 if v != nil { 1466 var name string 1467 err = json.Unmarshal(*v, &name) 1468 if err != nil { 1469 return err 1470 } 1471 agac.Name = &name 1472 } 1473 case "etag": 1474 if v != nil { 1475 var etag string 1476 err = json.Unmarshal(*v, &etag) 1477 if err != nil { 1478 return err 1479 } 1480 agac.Etag = &etag 1481 } 1482 case "type": 1483 if v != nil { 1484 var typeVar string 1485 err = json.Unmarshal(*v, &typeVar) 1486 if err != nil { 1487 return err 1488 } 1489 agac.Type = &typeVar 1490 } 1491 case "id": 1492 if v != nil { 1493 var ID string 1494 err = json.Unmarshal(*v, &ID) 1495 if err != nil { 1496 return err 1497 } 1498 agac.ID = &ID 1499 } 1500 } 1501 } 1502 1503 return nil 1504} 1505 1506// ApplicationGatewayAuthenticationCertificatePropertiesFormat authentication certificates properties of an 1507// application gateway. 1508type ApplicationGatewayAuthenticationCertificatePropertiesFormat struct { 1509 // Data - Certificate public data. 1510 Data *string `json:"data,omitempty"` 1511 // ProvisioningState - Provisioning state of the authentication certificate resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. 1512 ProvisioningState *string `json:"provisioningState,omitempty"` 1513} 1514 1515// ApplicationGatewayAvailableSslOptions response for ApplicationGatewayAvailableSslOptions API service 1516// call. 1517type ApplicationGatewayAvailableSslOptions struct { 1518 autorest.Response `json:"-"` 1519 *ApplicationGatewayAvailableSslOptionsPropertiesFormat `json:"properties,omitempty"` 1520 // ID - Resource ID. 1521 ID *string `json:"id,omitempty"` 1522 // Name - READ-ONLY; Resource name. 1523 Name *string `json:"name,omitempty"` 1524 // Type - READ-ONLY; Resource type. 1525 Type *string `json:"type,omitempty"` 1526 // Location - Resource location. 1527 Location *string `json:"location,omitempty"` 1528 // Tags - Resource tags. 1529 Tags map[string]*string `json:"tags"` 1530} 1531 1532// MarshalJSON is the custom marshaler for ApplicationGatewayAvailableSslOptions. 1533func (agaso ApplicationGatewayAvailableSslOptions) MarshalJSON() ([]byte, error) { 1534 objectMap := make(map[string]interface{}) 1535 if agaso.ApplicationGatewayAvailableSslOptionsPropertiesFormat != nil { 1536 objectMap["properties"] = agaso.ApplicationGatewayAvailableSslOptionsPropertiesFormat 1537 } 1538 if agaso.ID != nil { 1539 objectMap["id"] = agaso.ID 1540 } 1541 if agaso.Location != nil { 1542 objectMap["location"] = agaso.Location 1543 } 1544 if agaso.Tags != nil { 1545 objectMap["tags"] = agaso.Tags 1546 } 1547 return json.Marshal(objectMap) 1548} 1549 1550// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayAvailableSslOptions struct. 1551func (agaso *ApplicationGatewayAvailableSslOptions) UnmarshalJSON(body []byte) error { 1552 var m map[string]*json.RawMessage 1553 err := json.Unmarshal(body, &m) 1554 if err != nil { 1555 return err 1556 } 1557 for k, v := range m { 1558 switch k { 1559 case "properties": 1560 if v != nil { 1561 var applicationGatewayAvailableSslOptionsPropertiesFormat ApplicationGatewayAvailableSslOptionsPropertiesFormat 1562 err = json.Unmarshal(*v, &applicationGatewayAvailableSslOptionsPropertiesFormat) 1563 if err != nil { 1564 return err 1565 } 1566 agaso.ApplicationGatewayAvailableSslOptionsPropertiesFormat = &applicationGatewayAvailableSslOptionsPropertiesFormat 1567 } 1568 case "id": 1569 if v != nil { 1570 var ID string 1571 err = json.Unmarshal(*v, &ID) 1572 if err != nil { 1573 return err 1574 } 1575 agaso.ID = &ID 1576 } 1577 case "name": 1578 if v != nil { 1579 var name string 1580 err = json.Unmarshal(*v, &name) 1581 if err != nil { 1582 return err 1583 } 1584 agaso.Name = &name 1585 } 1586 case "type": 1587 if v != nil { 1588 var typeVar string 1589 err = json.Unmarshal(*v, &typeVar) 1590 if err != nil { 1591 return err 1592 } 1593 agaso.Type = &typeVar 1594 } 1595 case "location": 1596 if v != nil { 1597 var location string 1598 err = json.Unmarshal(*v, &location) 1599 if err != nil { 1600 return err 1601 } 1602 agaso.Location = &location 1603 } 1604 case "tags": 1605 if v != nil { 1606 var tags map[string]*string 1607 err = json.Unmarshal(*v, &tags) 1608 if err != nil { 1609 return err 1610 } 1611 agaso.Tags = tags 1612 } 1613 } 1614 } 1615 1616 return nil 1617} 1618 1619// ApplicationGatewayAvailableSslOptionsPropertiesFormat properties of 1620// ApplicationGatewayAvailableSslOptions 1621type ApplicationGatewayAvailableSslOptionsPropertiesFormat struct { 1622 // PredefinedPolicies - List of available Ssl predefined policy. 1623 PredefinedPolicies *[]SubResource `json:"predefinedPolicies,omitempty"` 1624 // DefaultPolicy - Name of the Ssl predefined policy applied by default to application gateway. Possible values include: 'AppGwSslPolicy20150501', 'AppGwSslPolicy20170401', 'AppGwSslPolicy20170401S' 1625 DefaultPolicy ApplicationGatewaySslPolicyName `json:"defaultPolicy,omitempty"` 1626 // AvailableCipherSuites - List of available Ssl cipher suites. 1627 AvailableCipherSuites *[]ApplicationGatewaySslCipherSuite `json:"availableCipherSuites,omitempty"` 1628 // AvailableProtocols - List of available Ssl protocols. 1629 AvailableProtocols *[]ApplicationGatewaySslProtocol `json:"availableProtocols,omitempty"` 1630} 1631 1632// ApplicationGatewayAvailableSslPredefinedPolicies response for ApplicationGatewayAvailableSslOptions API 1633// service call. 1634type ApplicationGatewayAvailableSslPredefinedPolicies struct { 1635 autorest.Response `json:"-"` 1636 // Value - List of available Ssl predefined policy. 1637 Value *[]ApplicationGatewaySslPredefinedPolicy `json:"value,omitempty"` 1638 // NextLink - URL to get the next set of results. 1639 NextLink *string `json:"nextLink,omitempty"` 1640} 1641 1642// ApplicationGatewayAvailableSslPredefinedPoliciesIterator provides access to a complete listing of 1643// ApplicationGatewaySslPredefinedPolicy values. 1644type ApplicationGatewayAvailableSslPredefinedPoliciesIterator struct { 1645 i int 1646 page ApplicationGatewayAvailableSslPredefinedPoliciesPage 1647} 1648 1649// NextWithContext advances to the next value. If there was an error making 1650// the request the iterator does not advance and the error is returned. 1651func (iter *ApplicationGatewayAvailableSslPredefinedPoliciesIterator) NextWithContext(ctx context.Context) (err error) { 1652 if tracing.IsEnabled() { 1653 ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationGatewayAvailableSslPredefinedPoliciesIterator.NextWithContext") 1654 defer func() { 1655 sc := -1 1656 if iter.Response().Response.Response != nil { 1657 sc = iter.Response().Response.Response.StatusCode 1658 } 1659 tracing.EndSpan(ctx, sc, err) 1660 }() 1661 } 1662 iter.i++ 1663 if iter.i < len(iter.page.Values()) { 1664 return nil 1665 } 1666 err = iter.page.NextWithContext(ctx) 1667 if err != nil { 1668 iter.i-- 1669 return err 1670 } 1671 iter.i = 0 1672 return nil 1673} 1674 1675// Next advances to the next value. If there was an error making 1676// the request the iterator does not advance and the error is returned. 1677// Deprecated: Use NextWithContext() instead. 1678func (iter *ApplicationGatewayAvailableSslPredefinedPoliciesIterator) Next() error { 1679 return iter.NextWithContext(context.Background()) 1680} 1681 1682// NotDone returns true if the enumeration should be started or is not yet complete. 1683func (iter ApplicationGatewayAvailableSslPredefinedPoliciesIterator) NotDone() bool { 1684 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 1685} 1686 1687// Response returns the raw server response from the last page request. 1688func (iter ApplicationGatewayAvailableSslPredefinedPoliciesIterator) Response() ApplicationGatewayAvailableSslPredefinedPolicies { 1689 return iter.page.Response() 1690} 1691 1692// Value returns the current value or a zero-initialized value if the 1693// iterator has advanced beyond the end of the collection. 1694func (iter ApplicationGatewayAvailableSslPredefinedPoliciesIterator) Value() ApplicationGatewaySslPredefinedPolicy { 1695 if !iter.page.NotDone() { 1696 return ApplicationGatewaySslPredefinedPolicy{} 1697 } 1698 return iter.page.Values()[iter.i] 1699} 1700 1701// Creates a new instance of the ApplicationGatewayAvailableSslPredefinedPoliciesIterator type. 1702func NewApplicationGatewayAvailableSslPredefinedPoliciesIterator(page ApplicationGatewayAvailableSslPredefinedPoliciesPage) ApplicationGatewayAvailableSslPredefinedPoliciesIterator { 1703 return ApplicationGatewayAvailableSslPredefinedPoliciesIterator{page: page} 1704} 1705 1706// IsEmpty returns true if the ListResult contains no values. 1707func (agaspp ApplicationGatewayAvailableSslPredefinedPolicies) IsEmpty() bool { 1708 return agaspp.Value == nil || len(*agaspp.Value) == 0 1709} 1710 1711// applicationGatewayAvailableSslPredefinedPoliciesPreparer prepares a request to retrieve the next set of results. 1712// It returns nil if no more results exist. 1713func (agaspp ApplicationGatewayAvailableSslPredefinedPolicies) applicationGatewayAvailableSslPredefinedPoliciesPreparer(ctx context.Context) (*http.Request, error) { 1714 if agaspp.NextLink == nil || len(to.String(agaspp.NextLink)) < 1 { 1715 return nil, nil 1716 } 1717 return autorest.Prepare((&http.Request{}).WithContext(ctx), 1718 autorest.AsJSON(), 1719 autorest.AsGet(), 1720 autorest.WithBaseURL(to.String(agaspp.NextLink))) 1721} 1722 1723// ApplicationGatewayAvailableSslPredefinedPoliciesPage contains a page of 1724// ApplicationGatewaySslPredefinedPolicy values. 1725type ApplicationGatewayAvailableSslPredefinedPoliciesPage struct { 1726 fn func(context.Context, ApplicationGatewayAvailableSslPredefinedPolicies) (ApplicationGatewayAvailableSslPredefinedPolicies, error) 1727 agaspp ApplicationGatewayAvailableSslPredefinedPolicies 1728} 1729 1730// NextWithContext advances to the next page of values. If there was an error making 1731// the request the page does not advance and the error is returned. 1732func (page *ApplicationGatewayAvailableSslPredefinedPoliciesPage) NextWithContext(ctx context.Context) (err error) { 1733 if tracing.IsEnabled() { 1734 ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationGatewayAvailableSslPredefinedPoliciesPage.NextWithContext") 1735 defer func() { 1736 sc := -1 1737 if page.Response().Response.Response != nil { 1738 sc = page.Response().Response.Response.StatusCode 1739 } 1740 tracing.EndSpan(ctx, sc, err) 1741 }() 1742 } 1743 next, err := page.fn(ctx, page.agaspp) 1744 if err != nil { 1745 return err 1746 } 1747 page.agaspp = next 1748 return nil 1749} 1750 1751// Next advances to the next page of values. If there was an error making 1752// the request the page does not advance and the error is returned. 1753// Deprecated: Use NextWithContext() instead. 1754func (page *ApplicationGatewayAvailableSslPredefinedPoliciesPage) Next() error { 1755 return page.NextWithContext(context.Background()) 1756} 1757 1758// NotDone returns true if the page enumeration should be started or is not yet complete. 1759func (page ApplicationGatewayAvailableSslPredefinedPoliciesPage) NotDone() bool { 1760 return !page.agaspp.IsEmpty() 1761} 1762 1763// Response returns the raw server response from the last page request. 1764func (page ApplicationGatewayAvailableSslPredefinedPoliciesPage) Response() ApplicationGatewayAvailableSslPredefinedPolicies { 1765 return page.agaspp 1766} 1767 1768// Values returns the slice of values for the current page or nil if there are no values. 1769func (page ApplicationGatewayAvailableSslPredefinedPoliciesPage) Values() []ApplicationGatewaySslPredefinedPolicy { 1770 if page.agaspp.IsEmpty() { 1771 return nil 1772 } 1773 return *page.agaspp.Value 1774} 1775 1776// Creates a new instance of the ApplicationGatewayAvailableSslPredefinedPoliciesPage type. 1777func NewApplicationGatewayAvailableSslPredefinedPoliciesPage(getNextPage func(context.Context, ApplicationGatewayAvailableSslPredefinedPolicies) (ApplicationGatewayAvailableSslPredefinedPolicies, error)) ApplicationGatewayAvailableSslPredefinedPoliciesPage { 1778 return ApplicationGatewayAvailableSslPredefinedPoliciesPage{fn: getNextPage} 1779} 1780 1781// ApplicationGatewayAvailableWafRuleSetsResult response for ApplicationGatewayAvailableWafRuleSets API 1782// service call. 1783type ApplicationGatewayAvailableWafRuleSetsResult struct { 1784 autorest.Response `json:"-"` 1785 // Value - The list of application gateway rule sets. 1786 Value *[]ApplicationGatewayFirewallRuleSet `json:"value,omitempty"` 1787} 1788 1789// ApplicationGatewayBackendAddress backend address of an application gateway. 1790type ApplicationGatewayBackendAddress struct { 1791 // Fqdn - Fully qualified domain name (FQDN). 1792 Fqdn *string `json:"fqdn,omitempty"` 1793 // IPAddress - IP address 1794 IPAddress *string `json:"ipAddress,omitempty"` 1795} 1796 1797// ApplicationGatewayBackendAddressPool backend Address Pool of an application gateway. 1798type ApplicationGatewayBackendAddressPool struct { 1799 *ApplicationGatewayBackendAddressPoolPropertiesFormat `json:"properties,omitempty"` 1800 // Name - Resource that is unique within a resource group. This name can be used to access the resource. 1801 Name *string `json:"name,omitempty"` 1802 // Etag - A unique read-only string that changes whenever the resource is updated. 1803 Etag *string `json:"etag,omitempty"` 1804 // Type - Type of the resource. 1805 Type *string `json:"type,omitempty"` 1806 // ID - Resource ID. 1807 ID *string `json:"id,omitempty"` 1808} 1809 1810// MarshalJSON is the custom marshaler for ApplicationGatewayBackendAddressPool. 1811func (agbap ApplicationGatewayBackendAddressPool) MarshalJSON() ([]byte, error) { 1812 objectMap := make(map[string]interface{}) 1813 if agbap.ApplicationGatewayBackendAddressPoolPropertiesFormat != nil { 1814 objectMap["properties"] = agbap.ApplicationGatewayBackendAddressPoolPropertiesFormat 1815 } 1816 if agbap.Name != nil { 1817 objectMap["name"] = agbap.Name 1818 } 1819 if agbap.Etag != nil { 1820 objectMap["etag"] = agbap.Etag 1821 } 1822 if agbap.Type != nil { 1823 objectMap["type"] = agbap.Type 1824 } 1825 if agbap.ID != nil { 1826 objectMap["id"] = agbap.ID 1827 } 1828 return json.Marshal(objectMap) 1829} 1830 1831// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayBackendAddressPool struct. 1832func (agbap *ApplicationGatewayBackendAddressPool) UnmarshalJSON(body []byte) error { 1833 var m map[string]*json.RawMessage 1834 err := json.Unmarshal(body, &m) 1835 if err != nil { 1836 return err 1837 } 1838 for k, v := range m { 1839 switch k { 1840 case "properties": 1841 if v != nil { 1842 var applicationGatewayBackendAddressPoolPropertiesFormat ApplicationGatewayBackendAddressPoolPropertiesFormat 1843 err = json.Unmarshal(*v, &applicationGatewayBackendAddressPoolPropertiesFormat) 1844 if err != nil { 1845 return err 1846 } 1847 agbap.ApplicationGatewayBackendAddressPoolPropertiesFormat = &applicationGatewayBackendAddressPoolPropertiesFormat 1848 } 1849 case "name": 1850 if v != nil { 1851 var name string 1852 err = json.Unmarshal(*v, &name) 1853 if err != nil { 1854 return err 1855 } 1856 agbap.Name = &name 1857 } 1858 case "etag": 1859 if v != nil { 1860 var etag string 1861 err = json.Unmarshal(*v, &etag) 1862 if err != nil { 1863 return err 1864 } 1865 agbap.Etag = &etag 1866 } 1867 case "type": 1868 if v != nil { 1869 var typeVar string 1870 err = json.Unmarshal(*v, &typeVar) 1871 if err != nil { 1872 return err 1873 } 1874 agbap.Type = &typeVar 1875 } 1876 case "id": 1877 if v != nil { 1878 var ID string 1879 err = json.Unmarshal(*v, &ID) 1880 if err != nil { 1881 return err 1882 } 1883 agbap.ID = &ID 1884 } 1885 } 1886 } 1887 1888 return nil 1889} 1890 1891// ApplicationGatewayBackendAddressPoolPropertiesFormat properties of Backend Address Pool of an 1892// application gateway. 1893type ApplicationGatewayBackendAddressPoolPropertiesFormat struct { 1894 // BackendIPConfigurations - Collection of references to IPs defined in network interfaces. 1895 BackendIPConfigurations *[]InterfaceIPConfiguration `json:"backendIPConfigurations,omitempty"` 1896 // BackendAddresses - Backend addresses 1897 BackendAddresses *[]ApplicationGatewayBackendAddress `json:"backendAddresses,omitempty"` 1898 // ProvisioningState - Provisioning state of the backend address pool resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. 1899 ProvisioningState *string `json:"provisioningState,omitempty"` 1900} 1901 1902// ApplicationGatewayBackendHealth list of ApplicationGatewayBackendHealthPool resources. 1903type ApplicationGatewayBackendHealth struct { 1904 autorest.Response `json:"-"` 1905 BackendAddressPools *[]ApplicationGatewayBackendHealthPool `json:"backendAddressPools,omitempty"` 1906} 1907 1908// ApplicationGatewayBackendHealthHTTPSettings application gateway BackendHealthHttp settings. 1909type ApplicationGatewayBackendHealthHTTPSettings struct { 1910 // BackendHTTPSettings - Reference of an ApplicationGatewayBackendHttpSettings resource. 1911 BackendHTTPSettings *ApplicationGatewayBackendHTTPSettings `json:"backendHttpSettings,omitempty"` 1912 // Servers - List of ApplicationGatewayBackendHealthServer resources. 1913 Servers *[]ApplicationGatewayBackendHealthServer `json:"servers,omitempty"` 1914} 1915 1916// ApplicationGatewayBackendHealthPool application gateway BackendHealth pool. 1917type ApplicationGatewayBackendHealthPool struct { 1918 // BackendAddressPool - Reference of an ApplicationGatewayBackendAddressPool resource. 1919 BackendAddressPool *ApplicationGatewayBackendAddressPool `json:"backendAddressPool,omitempty"` 1920 // BackendHTTPSettingsCollection - List of ApplicationGatewayBackendHealthHttpSettings resources. 1921 BackendHTTPSettingsCollection *[]ApplicationGatewayBackendHealthHTTPSettings `json:"backendHttpSettingsCollection,omitempty"` 1922} 1923 1924// ApplicationGatewayBackendHealthServer application gateway backendhealth http settings. 1925type ApplicationGatewayBackendHealthServer struct { 1926 // Address - IP address or FQDN of backend server. 1927 Address *string `json:"address,omitempty"` 1928 // IPConfiguration - Reference of IP configuration of backend server. 1929 IPConfiguration *InterfaceIPConfiguration `json:"ipConfiguration,omitempty"` 1930 // Health - Health of backend server. Possible values include: 'Unknown', 'Up', 'Down', 'Partial', 'Draining' 1931 Health ApplicationGatewayBackendHealthServerHealth `json:"health,omitempty"` 1932} 1933 1934// ApplicationGatewayBackendHTTPSettings backend address pool settings of an application gateway. 1935type ApplicationGatewayBackendHTTPSettings struct { 1936 *ApplicationGatewayBackendHTTPSettingsPropertiesFormat `json:"properties,omitempty"` 1937 // Name - Name of the resource that is unique within a resource group. This name can be used to access the resource. 1938 Name *string `json:"name,omitempty"` 1939 // Etag - A unique read-only string that changes whenever the resource is updated. 1940 Etag *string `json:"etag,omitempty"` 1941 // Type - Type of the resource. 1942 Type *string `json:"type,omitempty"` 1943 // ID - Resource ID. 1944 ID *string `json:"id,omitempty"` 1945} 1946 1947// MarshalJSON is the custom marshaler for ApplicationGatewayBackendHTTPSettings. 1948func (agbhs ApplicationGatewayBackendHTTPSettings) MarshalJSON() ([]byte, error) { 1949 objectMap := make(map[string]interface{}) 1950 if agbhs.ApplicationGatewayBackendHTTPSettingsPropertiesFormat != nil { 1951 objectMap["properties"] = agbhs.ApplicationGatewayBackendHTTPSettingsPropertiesFormat 1952 } 1953 if agbhs.Name != nil { 1954 objectMap["name"] = agbhs.Name 1955 } 1956 if agbhs.Etag != nil { 1957 objectMap["etag"] = agbhs.Etag 1958 } 1959 if agbhs.Type != nil { 1960 objectMap["type"] = agbhs.Type 1961 } 1962 if agbhs.ID != nil { 1963 objectMap["id"] = agbhs.ID 1964 } 1965 return json.Marshal(objectMap) 1966} 1967 1968// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayBackendHTTPSettings struct. 1969func (agbhs *ApplicationGatewayBackendHTTPSettings) UnmarshalJSON(body []byte) error { 1970 var m map[string]*json.RawMessage 1971 err := json.Unmarshal(body, &m) 1972 if err != nil { 1973 return err 1974 } 1975 for k, v := range m { 1976 switch k { 1977 case "properties": 1978 if v != nil { 1979 var applicationGatewayBackendHTTPSettingsPropertiesFormat ApplicationGatewayBackendHTTPSettingsPropertiesFormat 1980 err = json.Unmarshal(*v, &applicationGatewayBackendHTTPSettingsPropertiesFormat) 1981 if err != nil { 1982 return err 1983 } 1984 agbhs.ApplicationGatewayBackendHTTPSettingsPropertiesFormat = &applicationGatewayBackendHTTPSettingsPropertiesFormat 1985 } 1986 case "name": 1987 if v != nil { 1988 var name string 1989 err = json.Unmarshal(*v, &name) 1990 if err != nil { 1991 return err 1992 } 1993 agbhs.Name = &name 1994 } 1995 case "etag": 1996 if v != nil { 1997 var etag string 1998 err = json.Unmarshal(*v, &etag) 1999 if err != nil { 2000 return err 2001 } 2002 agbhs.Etag = &etag 2003 } 2004 case "type": 2005 if v != nil { 2006 var typeVar string 2007 err = json.Unmarshal(*v, &typeVar) 2008 if err != nil { 2009 return err 2010 } 2011 agbhs.Type = &typeVar 2012 } 2013 case "id": 2014 if v != nil { 2015 var ID string 2016 err = json.Unmarshal(*v, &ID) 2017 if err != nil { 2018 return err 2019 } 2020 agbhs.ID = &ID 2021 } 2022 } 2023 } 2024 2025 return nil 2026} 2027 2028// ApplicationGatewayBackendHTTPSettingsPropertiesFormat properties of Backend address pool settings of an 2029// application gateway. 2030type ApplicationGatewayBackendHTTPSettingsPropertiesFormat struct { 2031 // Port - Port 2032 Port *int32 `json:"port,omitempty"` 2033 // Protocol - Protocol. Possible values include: 'HTTP', 'HTTPS' 2034 Protocol ApplicationGatewayProtocol `json:"protocol,omitempty"` 2035 // CookieBasedAffinity - Cookie based affinity. Possible values include: 'Enabled', 'Disabled' 2036 CookieBasedAffinity ApplicationGatewayCookieBasedAffinity `json:"cookieBasedAffinity,omitempty"` 2037 // RequestTimeout - Request timeout in seconds. Application Gateway will fail the request if response is not received within RequestTimeout. Acceptable values are from 1 second to 86400 seconds. 2038 RequestTimeout *int32 `json:"requestTimeout,omitempty"` 2039 // Probe - Probe resource of an application gateway. 2040 Probe *SubResource `json:"probe,omitempty"` 2041 // AuthenticationCertificates - Array of references to application gateway authentication certificates. 2042 AuthenticationCertificates *[]SubResource `json:"authenticationCertificates,omitempty"` 2043 // ConnectionDraining - Connection draining of the backend http settings resource. 2044 ConnectionDraining *ApplicationGatewayConnectionDraining `json:"connectionDraining,omitempty"` 2045 // HostName - Host header to be sent to the backend servers. 2046 HostName *string `json:"hostName,omitempty"` 2047 // PickHostNameFromBackendAddress - Whether to pick host header should be picked from the host name of the backend server. Default value is false. 2048 PickHostNameFromBackendAddress *bool `json:"pickHostNameFromBackendAddress,omitempty"` 2049 // AffinityCookieName - Cookie name to use for the affinity cookie. 2050 AffinityCookieName *string `json:"affinityCookieName,omitempty"` 2051 // ProbeEnabled - Whether the probe is enabled. Default value is false. 2052 ProbeEnabled *bool `json:"probeEnabled,omitempty"` 2053 // Path - Path which should be used as a prefix for all HTTP requests. Null means no path will be prefixed. Default value is null. 2054 Path *string `json:"path,omitempty"` 2055 // ProvisioningState - Provisioning state of the backend http settings resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. 2056 ProvisioningState *string `json:"provisioningState,omitempty"` 2057} 2058 2059// ApplicationGatewayConnectionDraining connection draining allows open connections to a backend server to 2060// be active for a specified time after the backend server got removed from the configuration. 2061type ApplicationGatewayConnectionDraining struct { 2062 // Enabled - Whether connection draining is enabled or not. 2063 Enabled *bool `json:"enabled,omitempty"` 2064 // DrainTimeoutInSec - The number of seconds connection draining is active. Acceptable values are from 1 second to 3600 seconds. 2065 DrainTimeoutInSec *int32 `json:"drainTimeoutInSec,omitempty"` 2066} 2067 2068// ApplicationGatewayFirewallDisabledRuleGroup allows to disable rules within a rule group or an entire 2069// rule group. 2070type ApplicationGatewayFirewallDisabledRuleGroup struct { 2071 // RuleGroupName - The name of the rule group that will be disabled. 2072 RuleGroupName *string `json:"ruleGroupName,omitempty"` 2073 // Rules - The list of rules that will be disabled. If null, all rules of the rule group will be disabled. 2074 Rules *[]int32 `json:"rules,omitempty"` 2075} 2076 2077// ApplicationGatewayFirewallRule a web application firewall rule. 2078type ApplicationGatewayFirewallRule struct { 2079 // RuleID - The identifier of the web application firewall rule. 2080 RuleID *int32 `json:"ruleId,omitempty"` 2081 // Description - The description of the web application firewall rule. 2082 Description *string `json:"description,omitempty"` 2083} 2084 2085// ApplicationGatewayFirewallRuleGroup a web application firewall rule group. 2086type ApplicationGatewayFirewallRuleGroup struct { 2087 // RuleGroupName - The name of the web application firewall rule group. 2088 RuleGroupName *string `json:"ruleGroupName,omitempty"` 2089 // Description - The description of the web application firewall rule group. 2090 Description *string `json:"description,omitempty"` 2091 // Rules - The rules of the web application firewall rule group. 2092 Rules *[]ApplicationGatewayFirewallRule `json:"rules,omitempty"` 2093} 2094 2095// ApplicationGatewayFirewallRuleSet a web application firewall rule set. 2096type ApplicationGatewayFirewallRuleSet struct { 2097 *ApplicationGatewayFirewallRuleSetPropertiesFormat `json:"properties,omitempty"` 2098 // ID - Resource ID. 2099 ID *string `json:"id,omitempty"` 2100 // Name - READ-ONLY; Resource name. 2101 Name *string `json:"name,omitempty"` 2102 // Type - READ-ONLY; Resource type. 2103 Type *string `json:"type,omitempty"` 2104 // Location - Resource location. 2105 Location *string `json:"location,omitempty"` 2106 // Tags - Resource tags. 2107 Tags map[string]*string `json:"tags"` 2108} 2109 2110// MarshalJSON is the custom marshaler for ApplicationGatewayFirewallRuleSet. 2111func (agfrs ApplicationGatewayFirewallRuleSet) MarshalJSON() ([]byte, error) { 2112 objectMap := make(map[string]interface{}) 2113 if agfrs.ApplicationGatewayFirewallRuleSetPropertiesFormat != nil { 2114 objectMap["properties"] = agfrs.ApplicationGatewayFirewallRuleSetPropertiesFormat 2115 } 2116 if agfrs.ID != nil { 2117 objectMap["id"] = agfrs.ID 2118 } 2119 if agfrs.Location != nil { 2120 objectMap["location"] = agfrs.Location 2121 } 2122 if agfrs.Tags != nil { 2123 objectMap["tags"] = agfrs.Tags 2124 } 2125 return json.Marshal(objectMap) 2126} 2127 2128// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayFirewallRuleSet struct. 2129func (agfrs *ApplicationGatewayFirewallRuleSet) UnmarshalJSON(body []byte) error { 2130 var m map[string]*json.RawMessage 2131 err := json.Unmarshal(body, &m) 2132 if err != nil { 2133 return err 2134 } 2135 for k, v := range m { 2136 switch k { 2137 case "properties": 2138 if v != nil { 2139 var applicationGatewayFirewallRuleSetPropertiesFormat ApplicationGatewayFirewallRuleSetPropertiesFormat 2140 err = json.Unmarshal(*v, &applicationGatewayFirewallRuleSetPropertiesFormat) 2141 if err != nil { 2142 return err 2143 } 2144 agfrs.ApplicationGatewayFirewallRuleSetPropertiesFormat = &applicationGatewayFirewallRuleSetPropertiesFormat 2145 } 2146 case "id": 2147 if v != nil { 2148 var ID string 2149 err = json.Unmarshal(*v, &ID) 2150 if err != nil { 2151 return err 2152 } 2153 agfrs.ID = &ID 2154 } 2155 case "name": 2156 if v != nil { 2157 var name string 2158 err = json.Unmarshal(*v, &name) 2159 if err != nil { 2160 return err 2161 } 2162 agfrs.Name = &name 2163 } 2164 case "type": 2165 if v != nil { 2166 var typeVar string 2167 err = json.Unmarshal(*v, &typeVar) 2168 if err != nil { 2169 return err 2170 } 2171 agfrs.Type = &typeVar 2172 } 2173 case "location": 2174 if v != nil { 2175 var location string 2176 err = json.Unmarshal(*v, &location) 2177 if err != nil { 2178 return err 2179 } 2180 agfrs.Location = &location 2181 } 2182 case "tags": 2183 if v != nil { 2184 var tags map[string]*string 2185 err = json.Unmarshal(*v, &tags) 2186 if err != nil { 2187 return err 2188 } 2189 agfrs.Tags = tags 2190 } 2191 } 2192 } 2193 2194 return nil 2195} 2196 2197// ApplicationGatewayFirewallRuleSetPropertiesFormat properties of the web application firewall rule set. 2198type ApplicationGatewayFirewallRuleSetPropertiesFormat struct { 2199 // ProvisioningState - The provisioning state of the web application firewall rule set. 2200 ProvisioningState *string `json:"provisioningState,omitempty"` 2201 // RuleSetType - The type of the web application firewall rule set. 2202 RuleSetType *string `json:"ruleSetType,omitempty"` 2203 // RuleSetVersion - The version of the web application firewall rule set type. 2204 RuleSetVersion *string `json:"ruleSetVersion,omitempty"` 2205 // RuleGroups - The rule groups of the web application firewall rule set. 2206 RuleGroups *[]ApplicationGatewayFirewallRuleGroup `json:"ruleGroups,omitempty"` 2207} 2208 2209// ApplicationGatewayFrontendIPConfiguration frontend IP configuration of an application gateway. 2210type ApplicationGatewayFrontendIPConfiguration struct { 2211 *ApplicationGatewayFrontendIPConfigurationPropertiesFormat `json:"properties,omitempty"` 2212 // Name - Name of the resource that is unique within a resource group. This name can be used to access the resource. 2213 Name *string `json:"name,omitempty"` 2214 // Etag - A unique read-only string that changes whenever the resource is updated. 2215 Etag *string `json:"etag,omitempty"` 2216 // Type - Type of the resource. 2217 Type *string `json:"type,omitempty"` 2218 // ID - Resource ID. 2219 ID *string `json:"id,omitempty"` 2220} 2221 2222// MarshalJSON is the custom marshaler for ApplicationGatewayFrontendIPConfiguration. 2223func (agfic ApplicationGatewayFrontendIPConfiguration) MarshalJSON() ([]byte, error) { 2224 objectMap := make(map[string]interface{}) 2225 if agfic.ApplicationGatewayFrontendIPConfigurationPropertiesFormat != nil { 2226 objectMap["properties"] = agfic.ApplicationGatewayFrontendIPConfigurationPropertiesFormat 2227 } 2228 if agfic.Name != nil { 2229 objectMap["name"] = agfic.Name 2230 } 2231 if agfic.Etag != nil { 2232 objectMap["etag"] = agfic.Etag 2233 } 2234 if agfic.Type != nil { 2235 objectMap["type"] = agfic.Type 2236 } 2237 if agfic.ID != nil { 2238 objectMap["id"] = agfic.ID 2239 } 2240 return json.Marshal(objectMap) 2241} 2242 2243// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayFrontendIPConfiguration struct. 2244func (agfic *ApplicationGatewayFrontendIPConfiguration) UnmarshalJSON(body []byte) error { 2245 var m map[string]*json.RawMessage 2246 err := json.Unmarshal(body, &m) 2247 if err != nil { 2248 return err 2249 } 2250 for k, v := range m { 2251 switch k { 2252 case "properties": 2253 if v != nil { 2254 var applicationGatewayFrontendIPConfigurationPropertiesFormat ApplicationGatewayFrontendIPConfigurationPropertiesFormat 2255 err = json.Unmarshal(*v, &applicationGatewayFrontendIPConfigurationPropertiesFormat) 2256 if err != nil { 2257 return err 2258 } 2259 agfic.ApplicationGatewayFrontendIPConfigurationPropertiesFormat = &applicationGatewayFrontendIPConfigurationPropertiesFormat 2260 } 2261 case "name": 2262 if v != nil { 2263 var name string 2264 err = json.Unmarshal(*v, &name) 2265 if err != nil { 2266 return err 2267 } 2268 agfic.Name = &name 2269 } 2270 case "etag": 2271 if v != nil { 2272 var etag string 2273 err = json.Unmarshal(*v, &etag) 2274 if err != nil { 2275 return err 2276 } 2277 agfic.Etag = &etag 2278 } 2279 case "type": 2280 if v != nil { 2281 var typeVar string 2282 err = json.Unmarshal(*v, &typeVar) 2283 if err != nil { 2284 return err 2285 } 2286 agfic.Type = &typeVar 2287 } 2288 case "id": 2289 if v != nil { 2290 var ID string 2291 err = json.Unmarshal(*v, &ID) 2292 if err != nil { 2293 return err 2294 } 2295 agfic.ID = &ID 2296 } 2297 } 2298 } 2299 2300 return nil 2301} 2302 2303// ApplicationGatewayFrontendIPConfigurationPropertiesFormat properties of Frontend IP configuration of an 2304// application gateway. 2305type ApplicationGatewayFrontendIPConfigurationPropertiesFormat struct { 2306 // PrivateIPAddress - PrivateIPAddress of the network interface IP Configuration. 2307 PrivateIPAddress *string `json:"privateIPAddress,omitempty"` 2308 // PrivateIPAllocationMethod - PrivateIP allocation method. Possible values include: 'Static', 'Dynamic' 2309 PrivateIPAllocationMethod IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"` 2310 // Subnet - Reference of the subnet resource. 2311 Subnet *SubResource `json:"subnet,omitempty"` 2312 // PublicIPAddress - Reference of the PublicIP resource. 2313 PublicIPAddress *SubResource `json:"publicIPAddress,omitempty"` 2314 // ProvisioningState - Provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. 2315 ProvisioningState *string `json:"provisioningState,omitempty"` 2316} 2317 2318// ApplicationGatewayFrontendPort frontend port of an application gateway. 2319type ApplicationGatewayFrontendPort struct { 2320 *ApplicationGatewayFrontendPortPropertiesFormat `json:"properties,omitempty"` 2321 // Name - Name of the resource that is unique within a resource group. This name can be used to access the resource. 2322 Name *string `json:"name,omitempty"` 2323 // Etag - A unique read-only string that changes whenever the resource is updated. 2324 Etag *string `json:"etag,omitempty"` 2325 // Type - Type of the resource. 2326 Type *string `json:"type,omitempty"` 2327 // ID - Resource ID. 2328 ID *string `json:"id,omitempty"` 2329} 2330 2331// MarshalJSON is the custom marshaler for ApplicationGatewayFrontendPort. 2332func (agfp ApplicationGatewayFrontendPort) MarshalJSON() ([]byte, error) { 2333 objectMap := make(map[string]interface{}) 2334 if agfp.ApplicationGatewayFrontendPortPropertiesFormat != nil { 2335 objectMap["properties"] = agfp.ApplicationGatewayFrontendPortPropertiesFormat 2336 } 2337 if agfp.Name != nil { 2338 objectMap["name"] = agfp.Name 2339 } 2340 if agfp.Etag != nil { 2341 objectMap["etag"] = agfp.Etag 2342 } 2343 if agfp.Type != nil { 2344 objectMap["type"] = agfp.Type 2345 } 2346 if agfp.ID != nil { 2347 objectMap["id"] = agfp.ID 2348 } 2349 return json.Marshal(objectMap) 2350} 2351 2352// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayFrontendPort struct. 2353func (agfp *ApplicationGatewayFrontendPort) UnmarshalJSON(body []byte) error { 2354 var m map[string]*json.RawMessage 2355 err := json.Unmarshal(body, &m) 2356 if err != nil { 2357 return err 2358 } 2359 for k, v := range m { 2360 switch k { 2361 case "properties": 2362 if v != nil { 2363 var applicationGatewayFrontendPortPropertiesFormat ApplicationGatewayFrontendPortPropertiesFormat 2364 err = json.Unmarshal(*v, &applicationGatewayFrontendPortPropertiesFormat) 2365 if err != nil { 2366 return err 2367 } 2368 agfp.ApplicationGatewayFrontendPortPropertiesFormat = &applicationGatewayFrontendPortPropertiesFormat 2369 } 2370 case "name": 2371 if v != nil { 2372 var name string 2373 err = json.Unmarshal(*v, &name) 2374 if err != nil { 2375 return err 2376 } 2377 agfp.Name = &name 2378 } 2379 case "etag": 2380 if v != nil { 2381 var etag string 2382 err = json.Unmarshal(*v, &etag) 2383 if err != nil { 2384 return err 2385 } 2386 agfp.Etag = &etag 2387 } 2388 case "type": 2389 if v != nil { 2390 var typeVar string 2391 err = json.Unmarshal(*v, &typeVar) 2392 if err != nil { 2393 return err 2394 } 2395 agfp.Type = &typeVar 2396 } 2397 case "id": 2398 if v != nil { 2399 var ID string 2400 err = json.Unmarshal(*v, &ID) 2401 if err != nil { 2402 return err 2403 } 2404 agfp.ID = &ID 2405 } 2406 } 2407 } 2408 2409 return nil 2410} 2411 2412// ApplicationGatewayFrontendPortPropertiesFormat properties of Frontend port of an application gateway. 2413type ApplicationGatewayFrontendPortPropertiesFormat struct { 2414 // Port - Frontend port 2415 Port *int32 `json:"port,omitempty"` 2416 // ProvisioningState - Provisioning state of the frontend port resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. 2417 ProvisioningState *string `json:"provisioningState,omitempty"` 2418} 2419 2420// ApplicationGatewayHTTPListener http listener of an application gateway. 2421type ApplicationGatewayHTTPListener struct { 2422 *ApplicationGatewayHTTPListenerPropertiesFormat `json:"properties,omitempty"` 2423 // Name - Name of the resource that is unique within a resource group. This name can be used to access the resource. 2424 Name *string `json:"name,omitempty"` 2425 // Etag - A unique read-only string that changes whenever the resource is updated. 2426 Etag *string `json:"etag,omitempty"` 2427 // Type - Type of the resource. 2428 Type *string `json:"type,omitempty"` 2429 // ID - Resource ID. 2430 ID *string `json:"id,omitempty"` 2431} 2432 2433// MarshalJSON is the custom marshaler for ApplicationGatewayHTTPListener. 2434func (aghl ApplicationGatewayHTTPListener) MarshalJSON() ([]byte, error) { 2435 objectMap := make(map[string]interface{}) 2436 if aghl.ApplicationGatewayHTTPListenerPropertiesFormat != nil { 2437 objectMap["properties"] = aghl.ApplicationGatewayHTTPListenerPropertiesFormat 2438 } 2439 if aghl.Name != nil { 2440 objectMap["name"] = aghl.Name 2441 } 2442 if aghl.Etag != nil { 2443 objectMap["etag"] = aghl.Etag 2444 } 2445 if aghl.Type != nil { 2446 objectMap["type"] = aghl.Type 2447 } 2448 if aghl.ID != nil { 2449 objectMap["id"] = aghl.ID 2450 } 2451 return json.Marshal(objectMap) 2452} 2453 2454// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayHTTPListener struct. 2455func (aghl *ApplicationGatewayHTTPListener) UnmarshalJSON(body []byte) error { 2456 var m map[string]*json.RawMessage 2457 err := json.Unmarshal(body, &m) 2458 if err != nil { 2459 return err 2460 } 2461 for k, v := range m { 2462 switch k { 2463 case "properties": 2464 if v != nil { 2465 var applicationGatewayHTTPListenerPropertiesFormat ApplicationGatewayHTTPListenerPropertiesFormat 2466 err = json.Unmarshal(*v, &applicationGatewayHTTPListenerPropertiesFormat) 2467 if err != nil { 2468 return err 2469 } 2470 aghl.ApplicationGatewayHTTPListenerPropertiesFormat = &applicationGatewayHTTPListenerPropertiesFormat 2471 } 2472 case "name": 2473 if v != nil { 2474 var name string 2475 err = json.Unmarshal(*v, &name) 2476 if err != nil { 2477 return err 2478 } 2479 aghl.Name = &name 2480 } 2481 case "etag": 2482 if v != nil { 2483 var etag string 2484 err = json.Unmarshal(*v, &etag) 2485 if err != nil { 2486 return err 2487 } 2488 aghl.Etag = &etag 2489 } 2490 case "type": 2491 if v != nil { 2492 var typeVar string 2493 err = json.Unmarshal(*v, &typeVar) 2494 if err != nil { 2495 return err 2496 } 2497 aghl.Type = &typeVar 2498 } 2499 case "id": 2500 if v != nil { 2501 var ID string 2502 err = json.Unmarshal(*v, &ID) 2503 if err != nil { 2504 return err 2505 } 2506 aghl.ID = &ID 2507 } 2508 } 2509 } 2510 2511 return nil 2512} 2513 2514// ApplicationGatewayHTTPListenerPropertiesFormat properties of HTTP listener of an application gateway. 2515type ApplicationGatewayHTTPListenerPropertiesFormat struct { 2516 // FrontendIPConfiguration - Frontend IP configuration resource of an application gateway. 2517 FrontendIPConfiguration *SubResource `json:"frontendIPConfiguration,omitempty"` 2518 // FrontendPort - Frontend port resource of an application gateway. 2519 FrontendPort *SubResource `json:"frontendPort,omitempty"` 2520 // Protocol - Protocol. Possible values include: 'HTTP', 'HTTPS' 2521 Protocol ApplicationGatewayProtocol `json:"protocol,omitempty"` 2522 // HostName - Host name of HTTP listener. 2523 HostName *string `json:"hostName,omitempty"` 2524 // SslCertificate - SSL certificate resource of an application gateway. 2525 SslCertificate *SubResource `json:"sslCertificate,omitempty"` 2526 // RequireServerNameIndication - Applicable only if protocol is https. Enables SNI for multi-hosting. 2527 RequireServerNameIndication *bool `json:"requireServerNameIndication,omitempty"` 2528 // ProvisioningState - Provisioning state of the HTTP listener resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. 2529 ProvisioningState *string `json:"provisioningState,omitempty"` 2530} 2531 2532// ApplicationGatewayIPConfiguration IP configuration of an application gateway. Currently 1 public and 1 2533// private IP configuration is allowed. 2534type ApplicationGatewayIPConfiguration struct { 2535 *ApplicationGatewayIPConfigurationPropertiesFormat `json:"properties,omitempty"` 2536 // Name - Name of the resource that is unique within a resource group. This name can be used to access the resource. 2537 Name *string `json:"name,omitempty"` 2538 // Etag - A unique read-only string that changes whenever the resource is updated. 2539 Etag *string `json:"etag,omitempty"` 2540 // Type - Type of the resource. 2541 Type *string `json:"type,omitempty"` 2542 // ID - Resource ID. 2543 ID *string `json:"id,omitempty"` 2544} 2545 2546// MarshalJSON is the custom marshaler for ApplicationGatewayIPConfiguration. 2547func (agic ApplicationGatewayIPConfiguration) MarshalJSON() ([]byte, error) { 2548 objectMap := make(map[string]interface{}) 2549 if agic.ApplicationGatewayIPConfigurationPropertiesFormat != nil { 2550 objectMap["properties"] = agic.ApplicationGatewayIPConfigurationPropertiesFormat 2551 } 2552 if agic.Name != nil { 2553 objectMap["name"] = agic.Name 2554 } 2555 if agic.Etag != nil { 2556 objectMap["etag"] = agic.Etag 2557 } 2558 if agic.Type != nil { 2559 objectMap["type"] = agic.Type 2560 } 2561 if agic.ID != nil { 2562 objectMap["id"] = agic.ID 2563 } 2564 return json.Marshal(objectMap) 2565} 2566 2567// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayIPConfiguration struct. 2568func (agic *ApplicationGatewayIPConfiguration) UnmarshalJSON(body []byte) error { 2569 var m map[string]*json.RawMessage 2570 err := json.Unmarshal(body, &m) 2571 if err != nil { 2572 return err 2573 } 2574 for k, v := range m { 2575 switch k { 2576 case "properties": 2577 if v != nil { 2578 var applicationGatewayIPConfigurationPropertiesFormat ApplicationGatewayIPConfigurationPropertiesFormat 2579 err = json.Unmarshal(*v, &applicationGatewayIPConfigurationPropertiesFormat) 2580 if err != nil { 2581 return err 2582 } 2583 agic.ApplicationGatewayIPConfigurationPropertiesFormat = &applicationGatewayIPConfigurationPropertiesFormat 2584 } 2585 case "name": 2586 if v != nil { 2587 var name string 2588 err = json.Unmarshal(*v, &name) 2589 if err != nil { 2590 return err 2591 } 2592 agic.Name = &name 2593 } 2594 case "etag": 2595 if v != nil { 2596 var etag string 2597 err = json.Unmarshal(*v, &etag) 2598 if err != nil { 2599 return err 2600 } 2601 agic.Etag = &etag 2602 } 2603 case "type": 2604 if v != nil { 2605 var typeVar string 2606 err = json.Unmarshal(*v, &typeVar) 2607 if err != nil { 2608 return err 2609 } 2610 agic.Type = &typeVar 2611 } 2612 case "id": 2613 if v != nil { 2614 var ID string 2615 err = json.Unmarshal(*v, &ID) 2616 if err != nil { 2617 return err 2618 } 2619 agic.ID = &ID 2620 } 2621 } 2622 } 2623 2624 return nil 2625} 2626 2627// ApplicationGatewayIPConfigurationPropertiesFormat properties of IP configuration of an application 2628// gateway. 2629type ApplicationGatewayIPConfigurationPropertiesFormat struct { 2630 // Subnet - Reference of the subnet resource. A subnet from where application gateway gets its private address. 2631 Subnet *SubResource `json:"subnet,omitempty"` 2632 // ProvisioningState - Provisioning state of the application gateway subnet resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. 2633 ProvisioningState *string `json:"provisioningState,omitempty"` 2634} 2635 2636// ApplicationGatewayListResult response for ListApplicationGateways API service call. 2637type ApplicationGatewayListResult struct { 2638 autorest.Response `json:"-"` 2639 // Value - List of an application gateways in a resource group. 2640 Value *[]ApplicationGateway `json:"value,omitempty"` 2641 // NextLink - URL to get the next set of results. 2642 NextLink *string `json:"nextLink,omitempty"` 2643} 2644 2645// ApplicationGatewayListResultIterator provides access to a complete listing of ApplicationGateway values. 2646type ApplicationGatewayListResultIterator struct { 2647 i int 2648 page ApplicationGatewayListResultPage 2649} 2650 2651// NextWithContext advances to the next value. If there was an error making 2652// the request the iterator does not advance and the error is returned. 2653func (iter *ApplicationGatewayListResultIterator) NextWithContext(ctx context.Context) (err error) { 2654 if tracing.IsEnabled() { 2655 ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationGatewayListResultIterator.NextWithContext") 2656 defer func() { 2657 sc := -1 2658 if iter.Response().Response.Response != nil { 2659 sc = iter.Response().Response.Response.StatusCode 2660 } 2661 tracing.EndSpan(ctx, sc, err) 2662 }() 2663 } 2664 iter.i++ 2665 if iter.i < len(iter.page.Values()) { 2666 return nil 2667 } 2668 err = iter.page.NextWithContext(ctx) 2669 if err != nil { 2670 iter.i-- 2671 return err 2672 } 2673 iter.i = 0 2674 return nil 2675} 2676 2677// Next advances to the next value. If there was an error making 2678// the request the iterator does not advance and the error is returned. 2679// Deprecated: Use NextWithContext() instead. 2680func (iter *ApplicationGatewayListResultIterator) Next() error { 2681 return iter.NextWithContext(context.Background()) 2682} 2683 2684// NotDone returns true if the enumeration should be started or is not yet complete. 2685func (iter ApplicationGatewayListResultIterator) NotDone() bool { 2686 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 2687} 2688 2689// Response returns the raw server response from the last page request. 2690func (iter ApplicationGatewayListResultIterator) Response() ApplicationGatewayListResult { 2691 return iter.page.Response() 2692} 2693 2694// Value returns the current value or a zero-initialized value if the 2695// iterator has advanced beyond the end of the collection. 2696func (iter ApplicationGatewayListResultIterator) Value() ApplicationGateway { 2697 if !iter.page.NotDone() { 2698 return ApplicationGateway{} 2699 } 2700 return iter.page.Values()[iter.i] 2701} 2702 2703// Creates a new instance of the ApplicationGatewayListResultIterator type. 2704func NewApplicationGatewayListResultIterator(page ApplicationGatewayListResultPage) ApplicationGatewayListResultIterator { 2705 return ApplicationGatewayListResultIterator{page: page} 2706} 2707 2708// IsEmpty returns true if the ListResult contains no values. 2709func (aglr ApplicationGatewayListResult) IsEmpty() bool { 2710 return aglr.Value == nil || len(*aglr.Value) == 0 2711} 2712 2713// applicationGatewayListResultPreparer prepares a request to retrieve the next set of results. 2714// It returns nil if no more results exist. 2715func (aglr ApplicationGatewayListResult) applicationGatewayListResultPreparer(ctx context.Context) (*http.Request, error) { 2716 if aglr.NextLink == nil || len(to.String(aglr.NextLink)) < 1 { 2717 return nil, nil 2718 } 2719 return autorest.Prepare((&http.Request{}).WithContext(ctx), 2720 autorest.AsJSON(), 2721 autorest.AsGet(), 2722 autorest.WithBaseURL(to.String(aglr.NextLink))) 2723} 2724 2725// ApplicationGatewayListResultPage contains a page of ApplicationGateway values. 2726type ApplicationGatewayListResultPage struct { 2727 fn func(context.Context, ApplicationGatewayListResult) (ApplicationGatewayListResult, error) 2728 aglr ApplicationGatewayListResult 2729} 2730 2731// NextWithContext advances to the next page of values. If there was an error making 2732// the request the page does not advance and the error is returned. 2733func (page *ApplicationGatewayListResultPage) NextWithContext(ctx context.Context) (err error) { 2734 if tracing.IsEnabled() { 2735 ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationGatewayListResultPage.NextWithContext") 2736 defer func() { 2737 sc := -1 2738 if page.Response().Response.Response != nil { 2739 sc = page.Response().Response.Response.StatusCode 2740 } 2741 tracing.EndSpan(ctx, sc, err) 2742 }() 2743 } 2744 next, err := page.fn(ctx, page.aglr) 2745 if err != nil { 2746 return err 2747 } 2748 page.aglr = next 2749 return nil 2750} 2751 2752// Next advances to the next page of values. If there was an error making 2753// the request the page does not advance and the error is returned. 2754// Deprecated: Use NextWithContext() instead. 2755func (page *ApplicationGatewayListResultPage) Next() error { 2756 return page.NextWithContext(context.Background()) 2757} 2758 2759// NotDone returns true if the page enumeration should be started or is not yet complete. 2760func (page ApplicationGatewayListResultPage) NotDone() bool { 2761 return !page.aglr.IsEmpty() 2762} 2763 2764// Response returns the raw server response from the last page request. 2765func (page ApplicationGatewayListResultPage) Response() ApplicationGatewayListResult { 2766 return page.aglr 2767} 2768 2769// Values returns the slice of values for the current page or nil if there are no values. 2770func (page ApplicationGatewayListResultPage) Values() []ApplicationGateway { 2771 if page.aglr.IsEmpty() { 2772 return nil 2773 } 2774 return *page.aglr.Value 2775} 2776 2777// Creates a new instance of the ApplicationGatewayListResultPage type. 2778func NewApplicationGatewayListResultPage(getNextPage func(context.Context, ApplicationGatewayListResult) (ApplicationGatewayListResult, error)) ApplicationGatewayListResultPage { 2779 return ApplicationGatewayListResultPage{fn: getNextPage} 2780} 2781 2782// ApplicationGatewayPathRule path rule of URL path map of an application gateway. 2783type ApplicationGatewayPathRule struct { 2784 *ApplicationGatewayPathRulePropertiesFormat `json:"properties,omitempty"` 2785 // Name - Name of the resource that is unique within a resource group. This name can be used to access the resource. 2786 Name *string `json:"name,omitempty"` 2787 // Etag - A unique read-only string that changes whenever the resource is updated. 2788 Etag *string `json:"etag,omitempty"` 2789 // Type - Type of the resource. 2790 Type *string `json:"type,omitempty"` 2791 // ID - Resource ID. 2792 ID *string `json:"id,omitempty"` 2793} 2794 2795// MarshalJSON is the custom marshaler for ApplicationGatewayPathRule. 2796func (agpr ApplicationGatewayPathRule) MarshalJSON() ([]byte, error) { 2797 objectMap := make(map[string]interface{}) 2798 if agpr.ApplicationGatewayPathRulePropertiesFormat != nil { 2799 objectMap["properties"] = agpr.ApplicationGatewayPathRulePropertiesFormat 2800 } 2801 if agpr.Name != nil { 2802 objectMap["name"] = agpr.Name 2803 } 2804 if agpr.Etag != nil { 2805 objectMap["etag"] = agpr.Etag 2806 } 2807 if agpr.Type != nil { 2808 objectMap["type"] = agpr.Type 2809 } 2810 if agpr.ID != nil { 2811 objectMap["id"] = agpr.ID 2812 } 2813 return json.Marshal(objectMap) 2814} 2815 2816// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayPathRule struct. 2817func (agpr *ApplicationGatewayPathRule) UnmarshalJSON(body []byte) error { 2818 var m map[string]*json.RawMessage 2819 err := json.Unmarshal(body, &m) 2820 if err != nil { 2821 return err 2822 } 2823 for k, v := range m { 2824 switch k { 2825 case "properties": 2826 if v != nil { 2827 var applicationGatewayPathRulePropertiesFormat ApplicationGatewayPathRulePropertiesFormat 2828 err = json.Unmarshal(*v, &applicationGatewayPathRulePropertiesFormat) 2829 if err != nil { 2830 return err 2831 } 2832 agpr.ApplicationGatewayPathRulePropertiesFormat = &applicationGatewayPathRulePropertiesFormat 2833 } 2834 case "name": 2835 if v != nil { 2836 var name string 2837 err = json.Unmarshal(*v, &name) 2838 if err != nil { 2839 return err 2840 } 2841 agpr.Name = &name 2842 } 2843 case "etag": 2844 if v != nil { 2845 var etag string 2846 err = json.Unmarshal(*v, &etag) 2847 if err != nil { 2848 return err 2849 } 2850 agpr.Etag = &etag 2851 } 2852 case "type": 2853 if v != nil { 2854 var typeVar string 2855 err = json.Unmarshal(*v, &typeVar) 2856 if err != nil { 2857 return err 2858 } 2859 agpr.Type = &typeVar 2860 } 2861 case "id": 2862 if v != nil { 2863 var ID string 2864 err = json.Unmarshal(*v, &ID) 2865 if err != nil { 2866 return err 2867 } 2868 agpr.ID = &ID 2869 } 2870 } 2871 } 2872 2873 return nil 2874} 2875 2876// ApplicationGatewayPathRulePropertiesFormat properties of path rule of an application gateway. 2877type ApplicationGatewayPathRulePropertiesFormat struct { 2878 // Paths - Path rules of URL path map. 2879 Paths *[]string `json:"paths,omitempty"` 2880 // BackendAddressPool - Backend address pool resource of URL path map path rule. 2881 BackendAddressPool *SubResource `json:"backendAddressPool,omitempty"` 2882 // BackendHTTPSettings - Backend http settings resource of URL path map path rule. 2883 BackendHTTPSettings *SubResource `json:"backendHttpSettings,omitempty"` 2884 // RedirectConfiguration - Redirect configuration resource of URL path map path rule. 2885 RedirectConfiguration *SubResource `json:"redirectConfiguration,omitempty"` 2886 // ProvisioningState - Path rule of URL path map resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. 2887 ProvisioningState *string `json:"provisioningState,omitempty"` 2888} 2889 2890// ApplicationGatewayProbe probe of the application gateway. 2891type ApplicationGatewayProbe struct { 2892 *ApplicationGatewayProbePropertiesFormat `json:"properties,omitempty"` 2893 // Name - Name of the resource that is unique within a resource group. This name can be used to access the resource. 2894 Name *string `json:"name,omitempty"` 2895 // Etag - A unique read-only string that changes whenever the resource is updated. 2896 Etag *string `json:"etag,omitempty"` 2897 // Type - Type of the resource. 2898 Type *string `json:"type,omitempty"` 2899 // ID - Resource ID. 2900 ID *string `json:"id,omitempty"` 2901} 2902 2903// MarshalJSON is the custom marshaler for ApplicationGatewayProbe. 2904func (agp ApplicationGatewayProbe) MarshalJSON() ([]byte, error) { 2905 objectMap := make(map[string]interface{}) 2906 if agp.ApplicationGatewayProbePropertiesFormat != nil { 2907 objectMap["properties"] = agp.ApplicationGatewayProbePropertiesFormat 2908 } 2909 if agp.Name != nil { 2910 objectMap["name"] = agp.Name 2911 } 2912 if agp.Etag != nil { 2913 objectMap["etag"] = agp.Etag 2914 } 2915 if agp.Type != nil { 2916 objectMap["type"] = agp.Type 2917 } 2918 if agp.ID != nil { 2919 objectMap["id"] = agp.ID 2920 } 2921 return json.Marshal(objectMap) 2922} 2923 2924// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayProbe struct. 2925func (agp *ApplicationGatewayProbe) UnmarshalJSON(body []byte) error { 2926 var m map[string]*json.RawMessage 2927 err := json.Unmarshal(body, &m) 2928 if err != nil { 2929 return err 2930 } 2931 for k, v := range m { 2932 switch k { 2933 case "properties": 2934 if v != nil { 2935 var applicationGatewayProbePropertiesFormat ApplicationGatewayProbePropertiesFormat 2936 err = json.Unmarshal(*v, &applicationGatewayProbePropertiesFormat) 2937 if err != nil { 2938 return err 2939 } 2940 agp.ApplicationGatewayProbePropertiesFormat = &applicationGatewayProbePropertiesFormat 2941 } 2942 case "name": 2943 if v != nil { 2944 var name string 2945 err = json.Unmarshal(*v, &name) 2946 if err != nil { 2947 return err 2948 } 2949 agp.Name = &name 2950 } 2951 case "etag": 2952 if v != nil { 2953 var etag string 2954 err = json.Unmarshal(*v, &etag) 2955 if err != nil { 2956 return err 2957 } 2958 agp.Etag = &etag 2959 } 2960 case "type": 2961 if v != nil { 2962 var typeVar string 2963 err = json.Unmarshal(*v, &typeVar) 2964 if err != nil { 2965 return err 2966 } 2967 agp.Type = &typeVar 2968 } 2969 case "id": 2970 if v != nil { 2971 var ID string 2972 err = json.Unmarshal(*v, &ID) 2973 if err != nil { 2974 return err 2975 } 2976 agp.ID = &ID 2977 } 2978 } 2979 } 2980 2981 return nil 2982} 2983 2984// ApplicationGatewayProbeHealthResponseMatch application gateway probe health response match 2985type ApplicationGatewayProbeHealthResponseMatch struct { 2986 // Body - Body that must be contained in the health response. Default value is empty. 2987 Body *string `json:"body,omitempty"` 2988 // StatusCodes - Allowed ranges of healthy status codes. Default range of healthy status codes is 200-399. 2989 StatusCodes *[]string `json:"statusCodes,omitempty"` 2990} 2991 2992// ApplicationGatewayProbePropertiesFormat properties of probe of an application gateway. 2993type ApplicationGatewayProbePropertiesFormat struct { 2994 // Protocol - Protocol. Possible values include: 'HTTP', 'HTTPS' 2995 Protocol ApplicationGatewayProtocol `json:"protocol,omitempty"` 2996 // Host - Host name to send the probe to. 2997 Host *string `json:"host,omitempty"` 2998 // Path - Relative path of probe. Valid path starts from '/'. Probe is sent to <Protocol>://<host>:<port><path> 2999 Path *string `json:"path,omitempty"` 3000 // Interval - The probing interval in seconds. This is the time interval between two consecutive probes. Acceptable values are from 1 second to 86400 seconds. 3001 Interval *int32 `json:"interval,omitempty"` 3002 // Timeout - the probe timeout in seconds. Probe marked as failed if valid response is not received with this timeout period. Acceptable values are from 1 second to 86400 seconds. 3003 Timeout *int32 `json:"timeout,omitempty"` 3004 // UnhealthyThreshold - The probe retry count. Backend server is marked down after consecutive probe failure count reaches UnhealthyThreshold. Acceptable values are from 1 second to 20. 3005 UnhealthyThreshold *int32 `json:"unhealthyThreshold,omitempty"` 3006 // PickHostNameFromBackendHTTPSettings - Whether the host header should be picked from the backend http settings. Default value is false. 3007 PickHostNameFromBackendHTTPSettings *bool `json:"pickHostNameFromBackendHttpSettings,omitempty"` 3008 // MinServers - Minimum number of servers that are always marked healthy. Default value is 0. 3009 MinServers *int32 `json:"minServers,omitempty"` 3010 // Match - Criterion for classifying a healthy probe response. 3011 Match *ApplicationGatewayProbeHealthResponseMatch `json:"match,omitempty"` 3012 // ProvisioningState - Provisioning state of the backend http settings resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. 3013 ProvisioningState *string `json:"provisioningState,omitempty"` 3014} 3015 3016// ApplicationGatewayPropertiesFormat properties of the application gateway. 3017type ApplicationGatewayPropertiesFormat struct { 3018 // Sku - SKU of the application gateway resource. 3019 Sku *ApplicationGatewaySku `json:"sku,omitempty"` 3020 // SslPolicy - SSL policy of the application gateway resource. 3021 SslPolicy *ApplicationGatewaySslPolicy `json:"sslPolicy,omitempty"` 3022 // OperationalState - READ-ONLY; Operational state of the application gateway resource. Possible values include: 'Stopped', 'Starting', 'Running', 'Stopping' 3023 OperationalState ApplicationGatewayOperationalState `json:"operationalState,omitempty"` 3024 // GatewayIPConfigurations - Subnets of application the gateway resource. 3025 GatewayIPConfigurations *[]ApplicationGatewayIPConfiguration `json:"gatewayIPConfigurations,omitempty"` 3026 // AuthenticationCertificates - Authentication certificates of the application gateway resource. 3027 AuthenticationCertificates *[]ApplicationGatewayAuthenticationCertificate `json:"authenticationCertificates,omitempty"` 3028 // SslCertificates - SSL certificates of the application gateway resource. 3029 SslCertificates *[]ApplicationGatewaySslCertificate `json:"sslCertificates,omitempty"` 3030 // FrontendIPConfigurations - Frontend IP addresses of the application gateway resource. 3031 FrontendIPConfigurations *[]ApplicationGatewayFrontendIPConfiguration `json:"frontendIPConfigurations,omitempty"` 3032 // FrontendPorts - Frontend ports of the application gateway resource. 3033 FrontendPorts *[]ApplicationGatewayFrontendPort `json:"frontendPorts,omitempty"` 3034 // Probes - Probes of the application gateway resource. 3035 Probes *[]ApplicationGatewayProbe `json:"probes,omitempty"` 3036 // BackendAddressPools - Backend address pool of the application gateway resource. 3037 BackendAddressPools *[]ApplicationGatewayBackendAddressPool `json:"backendAddressPools,omitempty"` 3038 // BackendHTTPSettingsCollection - Backend http settings of the application gateway resource. 3039 BackendHTTPSettingsCollection *[]ApplicationGatewayBackendHTTPSettings `json:"backendHttpSettingsCollection,omitempty"` 3040 // HTTPListeners - Http listeners of the application gateway resource. 3041 HTTPListeners *[]ApplicationGatewayHTTPListener `json:"httpListeners,omitempty"` 3042 // URLPathMaps - URL path map of the application gateway resource. 3043 URLPathMaps *[]ApplicationGatewayURLPathMap `json:"urlPathMaps,omitempty"` 3044 // RequestRoutingRules - Request routing rules of the application gateway resource. 3045 RequestRoutingRules *[]ApplicationGatewayRequestRoutingRule `json:"requestRoutingRules,omitempty"` 3046 // RedirectConfigurations - Redirect configurations of the application gateway resource. 3047 RedirectConfigurations *[]ApplicationGatewayRedirectConfiguration `json:"redirectConfigurations,omitempty"` 3048 // WebApplicationFirewallConfiguration - Web application firewall configuration. 3049 WebApplicationFirewallConfiguration *ApplicationGatewayWebApplicationFirewallConfiguration `json:"webApplicationFirewallConfiguration,omitempty"` 3050 // EnableHTTP2 - Whether HTTP2 is enabled on the application gateway resource. 3051 EnableHTTP2 *bool `json:"enableHttp2,omitempty"` 3052 // ResourceGUID - Resource GUID property of the application gateway resource. 3053 ResourceGUID *string `json:"resourceGuid,omitempty"` 3054 // ProvisioningState - Provisioning state of the application gateway resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. 3055 ProvisioningState *string `json:"provisioningState,omitempty"` 3056} 3057 3058// ApplicationGatewayRedirectConfiguration redirect configuration of an application gateway. 3059type ApplicationGatewayRedirectConfiguration struct { 3060 *ApplicationGatewayRedirectConfigurationPropertiesFormat `json:"properties,omitempty"` 3061 // Name - Name of the resource that is unique within a resource group. This name can be used to access the resource. 3062 Name *string `json:"name,omitempty"` 3063 // Etag - A unique read-only string that changes whenever the resource is updated. 3064 Etag *string `json:"etag,omitempty"` 3065 // Type - Type of the resource. 3066 Type *string `json:"type,omitempty"` 3067 // ID - Resource ID. 3068 ID *string `json:"id,omitempty"` 3069} 3070 3071// MarshalJSON is the custom marshaler for ApplicationGatewayRedirectConfiguration. 3072func (agrc ApplicationGatewayRedirectConfiguration) MarshalJSON() ([]byte, error) { 3073 objectMap := make(map[string]interface{}) 3074 if agrc.ApplicationGatewayRedirectConfigurationPropertiesFormat != nil { 3075 objectMap["properties"] = agrc.ApplicationGatewayRedirectConfigurationPropertiesFormat 3076 } 3077 if agrc.Name != nil { 3078 objectMap["name"] = agrc.Name 3079 } 3080 if agrc.Etag != nil { 3081 objectMap["etag"] = agrc.Etag 3082 } 3083 if agrc.Type != nil { 3084 objectMap["type"] = agrc.Type 3085 } 3086 if agrc.ID != nil { 3087 objectMap["id"] = agrc.ID 3088 } 3089 return json.Marshal(objectMap) 3090} 3091 3092// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayRedirectConfiguration struct. 3093func (agrc *ApplicationGatewayRedirectConfiguration) UnmarshalJSON(body []byte) error { 3094 var m map[string]*json.RawMessage 3095 err := json.Unmarshal(body, &m) 3096 if err != nil { 3097 return err 3098 } 3099 for k, v := range m { 3100 switch k { 3101 case "properties": 3102 if v != nil { 3103 var applicationGatewayRedirectConfigurationPropertiesFormat ApplicationGatewayRedirectConfigurationPropertiesFormat 3104 err = json.Unmarshal(*v, &applicationGatewayRedirectConfigurationPropertiesFormat) 3105 if err != nil { 3106 return err 3107 } 3108 agrc.ApplicationGatewayRedirectConfigurationPropertiesFormat = &applicationGatewayRedirectConfigurationPropertiesFormat 3109 } 3110 case "name": 3111 if v != nil { 3112 var name string 3113 err = json.Unmarshal(*v, &name) 3114 if err != nil { 3115 return err 3116 } 3117 agrc.Name = &name 3118 } 3119 case "etag": 3120 if v != nil { 3121 var etag string 3122 err = json.Unmarshal(*v, &etag) 3123 if err != nil { 3124 return err 3125 } 3126 agrc.Etag = &etag 3127 } 3128 case "type": 3129 if v != nil { 3130 var typeVar string 3131 err = json.Unmarshal(*v, &typeVar) 3132 if err != nil { 3133 return err 3134 } 3135 agrc.Type = &typeVar 3136 } 3137 case "id": 3138 if v != nil { 3139 var ID string 3140 err = json.Unmarshal(*v, &ID) 3141 if err != nil { 3142 return err 3143 } 3144 agrc.ID = &ID 3145 } 3146 } 3147 } 3148 3149 return nil 3150} 3151 3152// ApplicationGatewayRedirectConfigurationPropertiesFormat properties of redirect configuration of the 3153// application gateway. 3154type ApplicationGatewayRedirectConfigurationPropertiesFormat struct { 3155 // RedirectType - Supported http redirection types - Permanent, Temporary, Found, SeeOther. Possible values include: 'Permanent', 'Found', 'SeeOther', 'Temporary' 3156 RedirectType ApplicationGatewayRedirectType `json:"redirectType,omitempty"` 3157 // TargetListener - Reference to a listener to redirect the request to. 3158 TargetListener *SubResource `json:"targetListener,omitempty"` 3159 // TargetURL - Url to redirect the request to. 3160 TargetURL *string `json:"targetUrl,omitempty"` 3161 // IncludePath - Include path in the redirected url. 3162 IncludePath *bool `json:"includePath,omitempty"` 3163 // IncludeQueryString - Include query string in the redirected url. 3164 IncludeQueryString *bool `json:"includeQueryString,omitempty"` 3165 // RequestRoutingRules - Request routing specifying redirect configuration. 3166 RequestRoutingRules *[]SubResource `json:"requestRoutingRules,omitempty"` 3167 // URLPathMaps - Url path maps specifying default redirect configuration. 3168 URLPathMaps *[]SubResource `json:"urlPathMaps,omitempty"` 3169 // PathRules - Path rules specifying redirect configuration. 3170 PathRules *[]SubResource `json:"pathRules,omitempty"` 3171} 3172 3173// ApplicationGatewayRequestRoutingRule request routing rule of an application gateway. 3174type ApplicationGatewayRequestRoutingRule struct { 3175 *ApplicationGatewayRequestRoutingRulePropertiesFormat `json:"properties,omitempty"` 3176 // Name - Name of the resource that is unique within a resource group. This name can be used to access the resource. 3177 Name *string `json:"name,omitempty"` 3178 // Etag - A unique read-only string that changes whenever the resource is updated. 3179 Etag *string `json:"etag,omitempty"` 3180 // Type - Type of the resource. 3181 Type *string `json:"type,omitempty"` 3182 // ID - Resource ID. 3183 ID *string `json:"id,omitempty"` 3184} 3185 3186// MarshalJSON is the custom marshaler for ApplicationGatewayRequestRoutingRule. 3187func (agrrr ApplicationGatewayRequestRoutingRule) MarshalJSON() ([]byte, error) { 3188 objectMap := make(map[string]interface{}) 3189 if agrrr.ApplicationGatewayRequestRoutingRulePropertiesFormat != nil { 3190 objectMap["properties"] = agrrr.ApplicationGatewayRequestRoutingRulePropertiesFormat 3191 } 3192 if agrrr.Name != nil { 3193 objectMap["name"] = agrrr.Name 3194 } 3195 if agrrr.Etag != nil { 3196 objectMap["etag"] = agrrr.Etag 3197 } 3198 if agrrr.Type != nil { 3199 objectMap["type"] = agrrr.Type 3200 } 3201 if agrrr.ID != nil { 3202 objectMap["id"] = agrrr.ID 3203 } 3204 return json.Marshal(objectMap) 3205} 3206 3207// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayRequestRoutingRule struct. 3208func (agrrr *ApplicationGatewayRequestRoutingRule) UnmarshalJSON(body []byte) error { 3209 var m map[string]*json.RawMessage 3210 err := json.Unmarshal(body, &m) 3211 if err != nil { 3212 return err 3213 } 3214 for k, v := range m { 3215 switch k { 3216 case "properties": 3217 if v != nil { 3218 var applicationGatewayRequestRoutingRulePropertiesFormat ApplicationGatewayRequestRoutingRulePropertiesFormat 3219 err = json.Unmarshal(*v, &applicationGatewayRequestRoutingRulePropertiesFormat) 3220 if err != nil { 3221 return err 3222 } 3223 agrrr.ApplicationGatewayRequestRoutingRulePropertiesFormat = &applicationGatewayRequestRoutingRulePropertiesFormat 3224 } 3225 case "name": 3226 if v != nil { 3227 var name string 3228 err = json.Unmarshal(*v, &name) 3229 if err != nil { 3230 return err 3231 } 3232 agrrr.Name = &name 3233 } 3234 case "etag": 3235 if v != nil { 3236 var etag string 3237 err = json.Unmarshal(*v, &etag) 3238 if err != nil { 3239 return err 3240 } 3241 agrrr.Etag = &etag 3242 } 3243 case "type": 3244 if v != nil { 3245 var typeVar string 3246 err = json.Unmarshal(*v, &typeVar) 3247 if err != nil { 3248 return err 3249 } 3250 agrrr.Type = &typeVar 3251 } 3252 case "id": 3253 if v != nil { 3254 var ID string 3255 err = json.Unmarshal(*v, &ID) 3256 if err != nil { 3257 return err 3258 } 3259 agrrr.ID = &ID 3260 } 3261 } 3262 } 3263 3264 return nil 3265} 3266 3267// ApplicationGatewayRequestRoutingRulePropertiesFormat properties of request routing rule of the 3268// application gateway. 3269type ApplicationGatewayRequestRoutingRulePropertiesFormat struct { 3270 // RuleType - Rule type. Possible values include: 'Basic', 'PathBasedRouting' 3271 RuleType ApplicationGatewayRequestRoutingRuleType `json:"ruleType,omitempty"` 3272 // BackendAddressPool - Backend address pool resource of the application gateway. 3273 BackendAddressPool *SubResource `json:"backendAddressPool,omitempty"` 3274 // BackendHTTPSettings - Frontend port resource of the application gateway. 3275 BackendHTTPSettings *SubResource `json:"backendHttpSettings,omitempty"` 3276 // HTTPListener - Http listener resource of the application gateway. 3277 HTTPListener *SubResource `json:"httpListener,omitempty"` 3278 // URLPathMap - URL path map resource of the application gateway. 3279 URLPathMap *SubResource `json:"urlPathMap,omitempty"` 3280 // RedirectConfiguration - Redirect configuration resource of the application gateway. 3281 RedirectConfiguration *SubResource `json:"redirectConfiguration,omitempty"` 3282 // ProvisioningState - Provisioning state of the request routing rule resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. 3283 ProvisioningState *string `json:"provisioningState,omitempty"` 3284} 3285 3286// ApplicationGatewaysBackendHealthFuture an abstraction for monitoring and retrieving the results of a 3287// long-running operation. 3288type ApplicationGatewaysBackendHealthFuture struct { 3289 azure.Future 3290} 3291 3292// Result returns the result of the asynchronous operation. 3293// If the operation has not completed it will return an error. 3294func (future *ApplicationGatewaysBackendHealthFuture) Result(client ApplicationGatewaysClient) (agbh ApplicationGatewayBackendHealth, err error) { 3295 var done bool 3296 done, err = future.DoneWithContext(context.Background(), client) 3297 if err != nil { 3298 err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysBackendHealthFuture", "Result", future.Response(), "Polling failure") 3299 return 3300 } 3301 if !done { 3302 err = azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysBackendHealthFuture") 3303 return 3304 } 3305 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 3306 if agbh.Response.Response, err = future.GetResult(sender); err == nil && agbh.Response.Response.StatusCode != http.StatusNoContent { 3307 agbh, err = client.BackendHealthResponder(agbh.Response.Response) 3308 if err != nil { 3309 err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysBackendHealthFuture", "Result", agbh.Response.Response, "Failure responding to request") 3310 } 3311 } 3312 return 3313} 3314 3315// ApplicationGatewaysCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a 3316// long-running operation. 3317type ApplicationGatewaysCreateOrUpdateFuture struct { 3318 azure.Future 3319} 3320 3321// Result returns the result of the asynchronous operation. 3322// If the operation has not completed it will return an error. 3323func (future *ApplicationGatewaysCreateOrUpdateFuture) Result(client ApplicationGatewaysClient) (ag ApplicationGateway, err error) { 3324 var done bool 3325 done, err = future.DoneWithContext(context.Background(), client) 3326 if err != nil { 3327 err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") 3328 return 3329 } 3330 if !done { 3331 err = azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysCreateOrUpdateFuture") 3332 return 3333 } 3334 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 3335 if ag.Response.Response, err = future.GetResult(sender); err == nil && ag.Response.Response.StatusCode != http.StatusNoContent { 3336 ag, err = client.CreateOrUpdateResponder(ag.Response.Response) 3337 if err != nil { 3338 err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysCreateOrUpdateFuture", "Result", ag.Response.Response, "Failure responding to request") 3339 } 3340 } 3341 return 3342} 3343 3344// ApplicationGatewaysDeleteFuture an abstraction for monitoring and retrieving the results of a 3345// long-running operation. 3346type ApplicationGatewaysDeleteFuture struct { 3347 azure.Future 3348} 3349 3350// Result returns the result of the asynchronous operation. 3351// If the operation has not completed it will return an error. 3352func (future *ApplicationGatewaysDeleteFuture) Result(client ApplicationGatewaysClient) (ar autorest.Response, err error) { 3353 var done bool 3354 done, err = future.DoneWithContext(context.Background(), client) 3355 if err != nil { 3356 err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysDeleteFuture", "Result", future.Response(), "Polling failure") 3357 return 3358 } 3359 if !done { 3360 err = azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysDeleteFuture") 3361 return 3362 } 3363 ar.Response = future.Response() 3364 return 3365} 3366 3367// ApplicationGatewaySku SKU of an application gateway 3368type ApplicationGatewaySku struct { 3369 // Name - Name of an application gateway SKU. Possible values include: 'StandardSmall', 'StandardMedium', 'StandardLarge', 'WAFMedium', 'WAFLarge' 3370 Name ApplicationGatewaySkuName `json:"name,omitempty"` 3371 // Tier - Tier of an application gateway. Possible values include: 'Standard', 'WAF' 3372 Tier ApplicationGatewayTier `json:"tier,omitempty"` 3373 // Capacity - Capacity (instance count) of an application gateway. 3374 Capacity *int32 `json:"capacity,omitempty"` 3375} 3376 3377// ApplicationGatewaySslCertificate SSL certificates of an application gateway. 3378type ApplicationGatewaySslCertificate struct { 3379 *ApplicationGatewaySslCertificatePropertiesFormat `json:"properties,omitempty"` 3380 // Name - Name of the resource that is unique within a resource group. This name can be used to access the resource. 3381 Name *string `json:"name,omitempty"` 3382 // Etag - A unique read-only string that changes whenever the resource is updated. 3383 Etag *string `json:"etag,omitempty"` 3384 // Type - Type of the resource. 3385 Type *string `json:"type,omitempty"` 3386 // ID - Resource ID. 3387 ID *string `json:"id,omitempty"` 3388} 3389 3390// MarshalJSON is the custom marshaler for ApplicationGatewaySslCertificate. 3391func (agsc ApplicationGatewaySslCertificate) MarshalJSON() ([]byte, error) { 3392 objectMap := make(map[string]interface{}) 3393 if agsc.ApplicationGatewaySslCertificatePropertiesFormat != nil { 3394 objectMap["properties"] = agsc.ApplicationGatewaySslCertificatePropertiesFormat 3395 } 3396 if agsc.Name != nil { 3397 objectMap["name"] = agsc.Name 3398 } 3399 if agsc.Etag != nil { 3400 objectMap["etag"] = agsc.Etag 3401 } 3402 if agsc.Type != nil { 3403 objectMap["type"] = agsc.Type 3404 } 3405 if agsc.ID != nil { 3406 objectMap["id"] = agsc.ID 3407 } 3408 return json.Marshal(objectMap) 3409} 3410 3411// UnmarshalJSON is the custom unmarshaler for ApplicationGatewaySslCertificate struct. 3412func (agsc *ApplicationGatewaySslCertificate) 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 applicationGatewaySslCertificatePropertiesFormat ApplicationGatewaySslCertificatePropertiesFormat 3423 err = json.Unmarshal(*v, &applicationGatewaySslCertificatePropertiesFormat) 3424 if err != nil { 3425 return err 3426 } 3427 agsc.ApplicationGatewaySslCertificatePropertiesFormat = &applicationGatewaySslCertificatePropertiesFormat 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 agsc.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 agsc.Etag = &etag 3446 } 3447 case "type": 3448 if v != nil { 3449 var typeVar string 3450 err = json.Unmarshal(*v, &typeVar) 3451 if err != nil { 3452 return err 3453 } 3454 agsc.Type = &typeVar 3455 } 3456 case "id": 3457 if v != nil { 3458 var ID string 3459 err = json.Unmarshal(*v, &ID) 3460 if err != nil { 3461 return err 3462 } 3463 agsc.ID = &ID 3464 } 3465 } 3466 } 3467 3468 return nil 3469} 3470 3471// ApplicationGatewaySslCertificatePropertiesFormat properties of SSL certificates of an application 3472// gateway. 3473type ApplicationGatewaySslCertificatePropertiesFormat struct { 3474 // Data - Base-64 encoded pfx certificate. Only applicable in PUT Request. 3475 Data *string `json:"data,omitempty"` 3476 // Password - Password for the pfx file specified in data. Only applicable in PUT request. 3477 Password *string `json:"password,omitempty"` 3478 // PublicCertData - Base-64 encoded Public cert data corresponding to pfx specified in data. Only applicable in GET request. 3479 PublicCertData *string `json:"publicCertData,omitempty"` 3480 // ProvisioningState - Provisioning state of the SSL certificate resource Possible values are: 'Updating', 'Deleting', and 'Failed'. 3481 ProvisioningState *string `json:"provisioningState,omitempty"` 3482} 3483 3484// ApplicationGatewaySslPolicy application Gateway Ssl policy. 3485type ApplicationGatewaySslPolicy struct { 3486 // DisabledSslProtocols - Ssl protocols to be disabled on application gateway. 3487 DisabledSslProtocols *[]ApplicationGatewaySslProtocol `json:"disabledSslProtocols,omitempty"` 3488 // PolicyType - Type of Ssl Policy. Possible values include: 'Predefined', 'Custom' 3489 PolicyType ApplicationGatewaySslPolicyType `json:"policyType,omitempty"` 3490 // PolicyName - Name of Ssl predefined policy. Possible values include: 'AppGwSslPolicy20150501', 'AppGwSslPolicy20170401', 'AppGwSslPolicy20170401S' 3491 PolicyName ApplicationGatewaySslPolicyName `json:"policyName,omitempty"` 3492 // CipherSuites - Ssl cipher suites to be enabled in the specified order to application gateway. 3493 CipherSuites *[]ApplicationGatewaySslCipherSuite `json:"cipherSuites,omitempty"` 3494 // MinProtocolVersion - Minimum version of Ssl protocol to be supported on application gateway. Possible values include: 'TLSv10', 'TLSv11', 'TLSv12' 3495 MinProtocolVersion ApplicationGatewaySslProtocol `json:"minProtocolVersion,omitempty"` 3496} 3497 3498// ApplicationGatewaySslPredefinedPolicy an Ssl predefined policy 3499type ApplicationGatewaySslPredefinedPolicy struct { 3500 autorest.Response `json:"-"` 3501 // Name - Name of Ssl predefined policy. 3502 Name *string `json:"name,omitempty"` 3503 *ApplicationGatewaySslPredefinedPolicyPropertiesFormat `json:"properties,omitempty"` 3504 // ID - Resource ID. 3505 ID *string `json:"id,omitempty"` 3506} 3507 3508// MarshalJSON is the custom marshaler for ApplicationGatewaySslPredefinedPolicy. 3509func (agspp ApplicationGatewaySslPredefinedPolicy) MarshalJSON() ([]byte, error) { 3510 objectMap := make(map[string]interface{}) 3511 if agspp.Name != nil { 3512 objectMap["name"] = agspp.Name 3513 } 3514 if agspp.ApplicationGatewaySslPredefinedPolicyPropertiesFormat != nil { 3515 objectMap["properties"] = agspp.ApplicationGatewaySslPredefinedPolicyPropertiesFormat 3516 } 3517 if agspp.ID != nil { 3518 objectMap["id"] = agspp.ID 3519 } 3520 return json.Marshal(objectMap) 3521} 3522 3523// UnmarshalJSON is the custom unmarshaler for ApplicationGatewaySslPredefinedPolicy struct. 3524func (agspp *ApplicationGatewaySslPredefinedPolicy) UnmarshalJSON(body []byte) error { 3525 var m map[string]*json.RawMessage 3526 err := json.Unmarshal(body, &m) 3527 if err != nil { 3528 return err 3529 } 3530 for k, v := range m { 3531 switch k { 3532 case "name": 3533 if v != nil { 3534 var name string 3535 err = json.Unmarshal(*v, &name) 3536 if err != nil { 3537 return err 3538 } 3539 agspp.Name = &name 3540 } 3541 case "properties": 3542 if v != nil { 3543 var applicationGatewaySslPredefinedPolicyPropertiesFormat ApplicationGatewaySslPredefinedPolicyPropertiesFormat 3544 err = json.Unmarshal(*v, &applicationGatewaySslPredefinedPolicyPropertiesFormat) 3545 if err != nil { 3546 return err 3547 } 3548 agspp.ApplicationGatewaySslPredefinedPolicyPropertiesFormat = &applicationGatewaySslPredefinedPolicyPropertiesFormat 3549 } 3550 case "id": 3551 if v != nil { 3552 var ID string 3553 err = json.Unmarshal(*v, &ID) 3554 if err != nil { 3555 return err 3556 } 3557 agspp.ID = &ID 3558 } 3559 } 3560 } 3561 3562 return nil 3563} 3564 3565// ApplicationGatewaySslPredefinedPolicyPropertiesFormat properties of 3566// ApplicationGatewaySslPredefinedPolicy 3567type ApplicationGatewaySslPredefinedPolicyPropertiesFormat struct { 3568 // CipherSuites - Ssl cipher suites to be enabled in the specified order for application gateway. 3569 CipherSuites *[]ApplicationGatewaySslCipherSuite `json:"cipherSuites,omitempty"` 3570 // MinProtocolVersion - Minimum version of Ssl protocol to be supported on application gateway. Possible values include: 'TLSv10', 'TLSv11', 'TLSv12' 3571 MinProtocolVersion ApplicationGatewaySslProtocol `json:"minProtocolVersion,omitempty"` 3572} 3573 3574// ApplicationGatewaysStartFuture an abstraction for monitoring and retrieving the results of a 3575// long-running operation. 3576type ApplicationGatewaysStartFuture struct { 3577 azure.Future 3578} 3579 3580// Result returns the result of the asynchronous operation. 3581// If the operation has not completed it will return an error. 3582func (future *ApplicationGatewaysStartFuture) Result(client ApplicationGatewaysClient) (ar autorest.Response, err error) { 3583 var done bool 3584 done, err = future.DoneWithContext(context.Background(), client) 3585 if err != nil { 3586 err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysStartFuture", "Result", future.Response(), "Polling failure") 3587 return 3588 } 3589 if !done { 3590 err = azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysStartFuture") 3591 return 3592 } 3593 ar.Response = future.Response() 3594 return 3595} 3596 3597// ApplicationGatewaysStopFuture an abstraction for monitoring and retrieving the results of a long-running 3598// operation. 3599type ApplicationGatewaysStopFuture struct { 3600 azure.Future 3601} 3602 3603// Result returns the result of the asynchronous operation. 3604// If the operation has not completed it will return an error. 3605func (future *ApplicationGatewaysStopFuture) Result(client ApplicationGatewaysClient) (ar autorest.Response, err error) { 3606 var done bool 3607 done, err = future.DoneWithContext(context.Background(), client) 3608 if err != nil { 3609 err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysStopFuture", "Result", future.Response(), "Polling failure") 3610 return 3611 } 3612 if !done { 3613 err = azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysStopFuture") 3614 return 3615 } 3616 ar.Response = future.Response() 3617 return 3618} 3619 3620// ApplicationGatewaysUpdateTagsFuture an abstraction for monitoring and retrieving the results of a 3621// long-running operation. 3622type ApplicationGatewaysUpdateTagsFuture struct { 3623 azure.Future 3624} 3625 3626// Result returns the result of the asynchronous operation. 3627// If the operation has not completed it will return an error. 3628func (future *ApplicationGatewaysUpdateTagsFuture) Result(client ApplicationGatewaysClient) (ag ApplicationGateway, err error) { 3629 var done bool 3630 done, err = future.DoneWithContext(context.Background(), client) 3631 if err != nil { 3632 err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysUpdateTagsFuture", "Result", future.Response(), "Polling failure") 3633 return 3634 } 3635 if !done { 3636 err = azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysUpdateTagsFuture") 3637 return 3638 } 3639 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 3640 if ag.Response.Response, err = future.GetResult(sender); err == nil && ag.Response.Response.StatusCode != http.StatusNoContent { 3641 ag, err = client.UpdateTagsResponder(ag.Response.Response) 3642 if err != nil { 3643 err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysUpdateTagsFuture", "Result", ag.Response.Response, "Failure responding to request") 3644 } 3645 } 3646 return 3647} 3648 3649// ApplicationGatewayURLPathMap urlPathMaps give a url path to the backend mapping information for 3650// PathBasedRouting. 3651type ApplicationGatewayURLPathMap struct { 3652 *ApplicationGatewayURLPathMapPropertiesFormat `json:"properties,omitempty"` 3653 // Name - Name of the resource that is unique within a resource group. This name can be used to access the resource. 3654 Name *string `json:"name,omitempty"` 3655 // Etag - A unique read-only string that changes whenever the resource is updated. 3656 Etag *string `json:"etag,omitempty"` 3657 // Type - Type of the resource. 3658 Type *string `json:"type,omitempty"` 3659 // ID - Resource ID. 3660 ID *string `json:"id,omitempty"` 3661} 3662 3663// MarshalJSON is the custom marshaler for ApplicationGatewayURLPathMap. 3664func (agupm ApplicationGatewayURLPathMap) MarshalJSON() ([]byte, error) { 3665 objectMap := make(map[string]interface{}) 3666 if agupm.ApplicationGatewayURLPathMapPropertiesFormat != nil { 3667 objectMap["properties"] = agupm.ApplicationGatewayURLPathMapPropertiesFormat 3668 } 3669 if agupm.Name != nil { 3670 objectMap["name"] = agupm.Name 3671 } 3672 if agupm.Etag != nil { 3673 objectMap["etag"] = agupm.Etag 3674 } 3675 if agupm.Type != nil { 3676 objectMap["type"] = agupm.Type 3677 } 3678 if agupm.ID != nil { 3679 objectMap["id"] = agupm.ID 3680 } 3681 return json.Marshal(objectMap) 3682} 3683 3684// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayURLPathMap struct. 3685func (agupm *ApplicationGatewayURLPathMap) UnmarshalJSON(body []byte) error { 3686 var m map[string]*json.RawMessage 3687 err := json.Unmarshal(body, &m) 3688 if err != nil { 3689 return err 3690 } 3691 for k, v := range m { 3692 switch k { 3693 case "properties": 3694 if v != nil { 3695 var applicationGatewayURLPathMapPropertiesFormat ApplicationGatewayURLPathMapPropertiesFormat 3696 err = json.Unmarshal(*v, &applicationGatewayURLPathMapPropertiesFormat) 3697 if err != nil { 3698 return err 3699 } 3700 agupm.ApplicationGatewayURLPathMapPropertiesFormat = &applicationGatewayURLPathMapPropertiesFormat 3701 } 3702 case "name": 3703 if v != nil { 3704 var name string 3705 err = json.Unmarshal(*v, &name) 3706 if err != nil { 3707 return err 3708 } 3709 agupm.Name = &name 3710 } 3711 case "etag": 3712 if v != nil { 3713 var etag string 3714 err = json.Unmarshal(*v, &etag) 3715 if err != nil { 3716 return err 3717 } 3718 agupm.Etag = &etag 3719 } 3720 case "type": 3721 if v != nil { 3722 var typeVar string 3723 err = json.Unmarshal(*v, &typeVar) 3724 if err != nil { 3725 return err 3726 } 3727 agupm.Type = &typeVar 3728 } 3729 case "id": 3730 if v != nil { 3731 var ID string 3732 err = json.Unmarshal(*v, &ID) 3733 if err != nil { 3734 return err 3735 } 3736 agupm.ID = &ID 3737 } 3738 } 3739 } 3740 3741 return nil 3742} 3743 3744// ApplicationGatewayURLPathMapPropertiesFormat properties of UrlPathMap of the application gateway. 3745type ApplicationGatewayURLPathMapPropertiesFormat struct { 3746 // DefaultBackendAddressPool - Default backend address pool resource of URL path map. 3747 DefaultBackendAddressPool *SubResource `json:"defaultBackendAddressPool,omitempty"` 3748 // DefaultBackendHTTPSettings - Default backend http settings resource of URL path map. 3749 DefaultBackendHTTPSettings *SubResource `json:"defaultBackendHttpSettings,omitempty"` 3750 // DefaultRedirectConfiguration - Default redirect configuration resource of URL path map. 3751 DefaultRedirectConfiguration *SubResource `json:"defaultRedirectConfiguration,omitempty"` 3752 // PathRules - Path rule of URL path map resource. 3753 PathRules *[]ApplicationGatewayPathRule `json:"pathRules,omitempty"` 3754 // ProvisioningState - Provisioning state of the backend http settings resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. 3755 ProvisioningState *string `json:"provisioningState,omitempty"` 3756} 3757 3758// ApplicationGatewayWebApplicationFirewallConfiguration application gateway web application firewall 3759// configuration. 3760type ApplicationGatewayWebApplicationFirewallConfiguration struct { 3761 // Enabled - Whether the web application firewall is enabled or not. 3762 Enabled *bool `json:"enabled,omitempty"` 3763 // FirewallMode - Web application firewall mode. Possible values include: 'Detection', 'Prevention' 3764 FirewallMode ApplicationGatewayFirewallMode `json:"firewallMode,omitempty"` 3765 // RuleSetType - The type of the web application firewall rule set. Possible values are: 'OWASP'. 3766 RuleSetType *string `json:"ruleSetType,omitempty"` 3767 // RuleSetVersion - The version of the rule set type. 3768 RuleSetVersion *string `json:"ruleSetVersion,omitempty"` 3769 // DisabledRuleGroups - The disabled rule groups. 3770 DisabledRuleGroups *[]ApplicationGatewayFirewallDisabledRuleGroup `json:"disabledRuleGroups,omitempty"` 3771} 3772 3773// ApplicationSecurityGroup an application security group in a resource group. 3774type ApplicationSecurityGroup struct { 3775 autorest.Response `json:"-"` 3776 // ApplicationSecurityGroupPropertiesFormat - Properties of the application security group. 3777 *ApplicationSecurityGroupPropertiesFormat `json:"properties,omitempty"` 3778 // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated. 3779 Etag *string `json:"etag,omitempty"` 3780 // ID - Resource ID. 3781 ID *string `json:"id,omitempty"` 3782 // Name - READ-ONLY; Resource name. 3783 Name *string `json:"name,omitempty"` 3784 // Type - READ-ONLY; Resource type. 3785 Type *string `json:"type,omitempty"` 3786 // Location - Resource location. 3787 Location *string `json:"location,omitempty"` 3788 // Tags - Resource tags. 3789 Tags map[string]*string `json:"tags"` 3790} 3791 3792// MarshalJSON is the custom marshaler for ApplicationSecurityGroup. 3793func (asg ApplicationSecurityGroup) MarshalJSON() ([]byte, error) { 3794 objectMap := make(map[string]interface{}) 3795 if asg.ApplicationSecurityGroupPropertiesFormat != nil { 3796 objectMap["properties"] = asg.ApplicationSecurityGroupPropertiesFormat 3797 } 3798 if asg.ID != nil { 3799 objectMap["id"] = asg.ID 3800 } 3801 if asg.Location != nil { 3802 objectMap["location"] = asg.Location 3803 } 3804 if asg.Tags != nil { 3805 objectMap["tags"] = asg.Tags 3806 } 3807 return json.Marshal(objectMap) 3808} 3809 3810// UnmarshalJSON is the custom unmarshaler for ApplicationSecurityGroup struct. 3811func (asg *ApplicationSecurityGroup) UnmarshalJSON(body []byte) error { 3812 var m map[string]*json.RawMessage 3813 err := json.Unmarshal(body, &m) 3814 if err != nil { 3815 return err 3816 } 3817 for k, v := range m { 3818 switch k { 3819 case "properties": 3820 if v != nil { 3821 var applicationSecurityGroupPropertiesFormat ApplicationSecurityGroupPropertiesFormat 3822 err = json.Unmarshal(*v, &applicationSecurityGroupPropertiesFormat) 3823 if err != nil { 3824 return err 3825 } 3826 asg.ApplicationSecurityGroupPropertiesFormat = &applicationSecurityGroupPropertiesFormat 3827 } 3828 case "etag": 3829 if v != nil { 3830 var etag string 3831 err = json.Unmarshal(*v, &etag) 3832 if err != nil { 3833 return err 3834 } 3835 asg.Etag = &etag 3836 } 3837 case "id": 3838 if v != nil { 3839 var ID string 3840 err = json.Unmarshal(*v, &ID) 3841 if err != nil { 3842 return err 3843 } 3844 asg.ID = &ID 3845 } 3846 case "name": 3847 if v != nil { 3848 var name string 3849 err = json.Unmarshal(*v, &name) 3850 if err != nil { 3851 return err 3852 } 3853 asg.Name = &name 3854 } 3855 case "type": 3856 if v != nil { 3857 var typeVar string 3858 err = json.Unmarshal(*v, &typeVar) 3859 if err != nil { 3860 return err 3861 } 3862 asg.Type = &typeVar 3863 } 3864 case "location": 3865 if v != nil { 3866 var location string 3867 err = json.Unmarshal(*v, &location) 3868 if err != nil { 3869 return err 3870 } 3871 asg.Location = &location 3872 } 3873 case "tags": 3874 if v != nil { 3875 var tags map[string]*string 3876 err = json.Unmarshal(*v, &tags) 3877 if err != nil { 3878 return err 3879 } 3880 asg.Tags = tags 3881 } 3882 } 3883 } 3884 3885 return nil 3886} 3887 3888// ApplicationSecurityGroupListResult a list of application security groups. 3889type ApplicationSecurityGroupListResult struct { 3890 autorest.Response `json:"-"` 3891 // Value - A list of application security groups. 3892 Value *[]ApplicationSecurityGroup `json:"value,omitempty"` 3893 // NextLink - READ-ONLY; The URL to get the next set of results. 3894 NextLink *string `json:"nextLink,omitempty"` 3895} 3896 3897// ApplicationSecurityGroupListResultIterator provides access to a complete listing of 3898// ApplicationSecurityGroup values. 3899type ApplicationSecurityGroupListResultIterator struct { 3900 i int 3901 page ApplicationSecurityGroupListResultPage 3902} 3903 3904// NextWithContext advances to the next value. If there was an error making 3905// the request the iterator does not advance and the error is returned. 3906func (iter *ApplicationSecurityGroupListResultIterator) NextWithContext(ctx context.Context) (err error) { 3907 if tracing.IsEnabled() { 3908 ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationSecurityGroupListResultIterator.NextWithContext") 3909 defer func() { 3910 sc := -1 3911 if iter.Response().Response.Response != nil { 3912 sc = iter.Response().Response.Response.StatusCode 3913 } 3914 tracing.EndSpan(ctx, sc, err) 3915 }() 3916 } 3917 iter.i++ 3918 if iter.i < len(iter.page.Values()) { 3919 return nil 3920 } 3921 err = iter.page.NextWithContext(ctx) 3922 if err != nil { 3923 iter.i-- 3924 return err 3925 } 3926 iter.i = 0 3927 return nil 3928} 3929 3930// Next advances to the next value. If there was an error making 3931// the request the iterator does not advance and the error is returned. 3932// Deprecated: Use NextWithContext() instead. 3933func (iter *ApplicationSecurityGroupListResultIterator) Next() error { 3934 return iter.NextWithContext(context.Background()) 3935} 3936 3937// NotDone returns true if the enumeration should be started or is not yet complete. 3938func (iter ApplicationSecurityGroupListResultIterator) NotDone() bool { 3939 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 3940} 3941 3942// Response returns the raw server response from the last page request. 3943func (iter ApplicationSecurityGroupListResultIterator) Response() ApplicationSecurityGroupListResult { 3944 return iter.page.Response() 3945} 3946 3947// Value returns the current value or a zero-initialized value if the 3948// iterator has advanced beyond the end of the collection. 3949func (iter ApplicationSecurityGroupListResultIterator) Value() ApplicationSecurityGroup { 3950 if !iter.page.NotDone() { 3951 return ApplicationSecurityGroup{} 3952 } 3953 return iter.page.Values()[iter.i] 3954} 3955 3956// Creates a new instance of the ApplicationSecurityGroupListResultIterator type. 3957func NewApplicationSecurityGroupListResultIterator(page ApplicationSecurityGroupListResultPage) ApplicationSecurityGroupListResultIterator { 3958 return ApplicationSecurityGroupListResultIterator{page: page} 3959} 3960 3961// IsEmpty returns true if the ListResult contains no values. 3962func (asglr ApplicationSecurityGroupListResult) IsEmpty() bool { 3963 return asglr.Value == nil || len(*asglr.Value) == 0 3964} 3965 3966// applicationSecurityGroupListResultPreparer prepares a request to retrieve the next set of results. 3967// It returns nil if no more results exist. 3968func (asglr ApplicationSecurityGroupListResult) applicationSecurityGroupListResultPreparer(ctx context.Context) (*http.Request, error) { 3969 if asglr.NextLink == nil || len(to.String(asglr.NextLink)) < 1 { 3970 return nil, nil 3971 } 3972 return autorest.Prepare((&http.Request{}).WithContext(ctx), 3973 autorest.AsJSON(), 3974 autorest.AsGet(), 3975 autorest.WithBaseURL(to.String(asglr.NextLink))) 3976} 3977 3978// ApplicationSecurityGroupListResultPage contains a page of ApplicationSecurityGroup values. 3979type ApplicationSecurityGroupListResultPage struct { 3980 fn func(context.Context, ApplicationSecurityGroupListResult) (ApplicationSecurityGroupListResult, error) 3981 asglr ApplicationSecurityGroupListResult 3982} 3983 3984// NextWithContext advances to the next page of values. If there was an error making 3985// the request the page does not advance and the error is returned. 3986func (page *ApplicationSecurityGroupListResultPage) NextWithContext(ctx context.Context) (err error) { 3987 if tracing.IsEnabled() { 3988 ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationSecurityGroupListResultPage.NextWithContext") 3989 defer func() { 3990 sc := -1 3991 if page.Response().Response.Response != nil { 3992 sc = page.Response().Response.Response.StatusCode 3993 } 3994 tracing.EndSpan(ctx, sc, err) 3995 }() 3996 } 3997 next, err := page.fn(ctx, page.asglr) 3998 if err != nil { 3999 return err 4000 } 4001 page.asglr = next 4002 return nil 4003} 4004 4005// Next advances to the next page of values. If there was an error making 4006// the request the page does not advance and the error is returned. 4007// Deprecated: Use NextWithContext() instead. 4008func (page *ApplicationSecurityGroupListResultPage) Next() error { 4009 return page.NextWithContext(context.Background()) 4010} 4011 4012// NotDone returns true if the page enumeration should be started or is not yet complete. 4013func (page ApplicationSecurityGroupListResultPage) NotDone() bool { 4014 return !page.asglr.IsEmpty() 4015} 4016 4017// Response returns the raw server response from the last page request. 4018func (page ApplicationSecurityGroupListResultPage) Response() ApplicationSecurityGroupListResult { 4019 return page.asglr 4020} 4021 4022// Values returns the slice of values for the current page or nil if there are no values. 4023func (page ApplicationSecurityGroupListResultPage) Values() []ApplicationSecurityGroup { 4024 if page.asglr.IsEmpty() { 4025 return nil 4026 } 4027 return *page.asglr.Value 4028} 4029 4030// Creates a new instance of the ApplicationSecurityGroupListResultPage type. 4031func NewApplicationSecurityGroupListResultPage(getNextPage func(context.Context, ApplicationSecurityGroupListResult) (ApplicationSecurityGroupListResult, error)) ApplicationSecurityGroupListResultPage { 4032 return ApplicationSecurityGroupListResultPage{fn: getNextPage} 4033} 4034 4035// ApplicationSecurityGroupPropertiesFormat application security group properties. 4036type ApplicationSecurityGroupPropertiesFormat struct { 4037 // ResourceGUID - READ-ONLY; The resource GUID property of the application security group resource. It uniquely identifies a resource, even if the user changes its name or migrate the resource across subscriptions or resource groups. 4038 ResourceGUID *string `json:"resourceGuid,omitempty"` 4039 // ProvisioningState - READ-ONLY; The provisioning state of the application security group resource. Possible values are: 'Succeeded', 'Updating', 'Deleting', and 'Failed'. 4040 ProvisioningState *string `json:"provisioningState,omitempty"` 4041} 4042 4043// ApplicationSecurityGroupsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results 4044// of a long-running operation. 4045type ApplicationSecurityGroupsCreateOrUpdateFuture struct { 4046 azure.Future 4047} 4048 4049// Result returns the result of the asynchronous operation. 4050// If the operation has not completed it will return an error. 4051func (future *ApplicationSecurityGroupsCreateOrUpdateFuture) Result(client ApplicationSecurityGroupsClient) (asg ApplicationSecurityGroup, err error) { 4052 var done bool 4053 done, err = future.DoneWithContext(context.Background(), client) 4054 if err != nil { 4055 err = autorest.NewErrorWithError(err, "network.ApplicationSecurityGroupsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") 4056 return 4057 } 4058 if !done { 4059 err = azure.NewAsyncOpIncompleteError("network.ApplicationSecurityGroupsCreateOrUpdateFuture") 4060 return 4061 } 4062 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 4063 if asg.Response.Response, err = future.GetResult(sender); err == nil && asg.Response.Response.StatusCode != http.StatusNoContent { 4064 asg, err = client.CreateOrUpdateResponder(asg.Response.Response) 4065 if err != nil { 4066 err = autorest.NewErrorWithError(err, "network.ApplicationSecurityGroupsCreateOrUpdateFuture", "Result", asg.Response.Response, "Failure responding to request") 4067 } 4068 } 4069 return 4070} 4071 4072// ApplicationSecurityGroupsDeleteFuture an abstraction for monitoring and retrieving the results of a 4073// long-running operation. 4074type ApplicationSecurityGroupsDeleteFuture struct { 4075 azure.Future 4076} 4077 4078// Result returns the result of the asynchronous operation. 4079// If the operation has not completed it will return an error. 4080func (future *ApplicationSecurityGroupsDeleteFuture) Result(client ApplicationSecurityGroupsClient) (ar autorest.Response, err error) { 4081 var done bool 4082 done, err = future.DoneWithContext(context.Background(), client) 4083 if err != nil { 4084 err = autorest.NewErrorWithError(err, "network.ApplicationSecurityGroupsDeleteFuture", "Result", future.Response(), "Polling failure") 4085 return 4086 } 4087 if !done { 4088 err = azure.NewAsyncOpIncompleteError("network.ApplicationSecurityGroupsDeleteFuture") 4089 return 4090 } 4091 ar.Response = future.Response() 4092 return 4093} 4094 4095// AuthorizationListResult response for ListAuthorizations API service call retrieves all authorizations 4096// that belongs to an ExpressRouteCircuit. 4097type AuthorizationListResult struct { 4098 autorest.Response `json:"-"` 4099 // Value - The authorizations in an ExpressRoute Circuit. 4100 Value *[]ExpressRouteCircuitAuthorization `json:"value,omitempty"` 4101 // NextLink - The URL to get the next set of results. 4102 NextLink *string `json:"nextLink,omitempty"` 4103} 4104 4105// AuthorizationListResultIterator provides access to a complete listing of 4106// ExpressRouteCircuitAuthorization values. 4107type AuthorizationListResultIterator struct { 4108 i int 4109 page AuthorizationListResultPage 4110} 4111 4112// NextWithContext advances to the next value. If there was an error making 4113// the request the iterator does not advance and the error is returned. 4114func (iter *AuthorizationListResultIterator) NextWithContext(ctx context.Context) (err error) { 4115 if tracing.IsEnabled() { 4116 ctx = tracing.StartSpan(ctx, fqdn+"/AuthorizationListResultIterator.NextWithContext") 4117 defer func() { 4118 sc := -1 4119 if iter.Response().Response.Response != nil { 4120 sc = iter.Response().Response.Response.StatusCode 4121 } 4122 tracing.EndSpan(ctx, sc, err) 4123 }() 4124 } 4125 iter.i++ 4126 if iter.i < len(iter.page.Values()) { 4127 return nil 4128 } 4129 err = iter.page.NextWithContext(ctx) 4130 if err != nil { 4131 iter.i-- 4132 return err 4133 } 4134 iter.i = 0 4135 return nil 4136} 4137 4138// Next advances to the next value. If there was an error making 4139// the request the iterator does not advance and the error is returned. 4140// Deprecated: Use NextWithContext() instead. 4141func (iter *AuthorizationListResultIterator) Next() error { 4142 return iter.NextWithContext(context.Background()) 4143} 4144 4145// NotDone returns true if the enumeration should be started or is not yet complete. 4146func (iter AuthorizationListResultIterator) NotDone() bool { 4147 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 4148} 4149 4150// Response returns the raw server response from the last page request. 4151func (iter AuthorizationListResultIterator) Response() AuthorizationListResult { 4152 return iter.page.Response() 4153} 4154 4155// Value returns the current value or a zero-initialized value if the 4156// iterator has advanced beyond the end of the collection. 4157func (iter AuthorizationListResultIterator) Value() ExpressRouteCircuitAuthorization { 4158 if !iter.page.NotDone() { 4159 return ExpressRouteCircuitAuthorization{} 4160 } 4161 return iter.page.Values()[iter.i] 4162} 4163 4164// Creates a new instance of the AuthorizationListResultIterator type. 4165func NewAuthorizationListResultIterator(page AuthorizationListResultPage) AuthorizationListResultIterator { 4166 return AuthorizationListResultIterator{page: page} 4167} 4168 4169// IsEmpty returns true if the ListResult contains no values. 4170func (alr AuthorizationListResult) IsEmpty() bool { 4171 return alr.Value == nil || len(*alr.Value) == 0 4172} 4173 4174// authorizationListResultPreparer prepares a request to retrieve the next set of results. 4175// It returns nil if no more results exist. 4176func (alr AuthorizationListResult) authorizationListResultPreparer(ctx context.Context) (*http.Request, error) { 4177 if alr.NextLink == nil || len(to.String(alr.NextLink)) < 1 { 4178 return nil, nil 4179 } 4180 return autorest.Prepare((&http.Request{}).WithContext(ctx), 4181 autorest.AsJSON(), 4182 autorest.AsGet(), 4183 autorest.WithBaseURL(to.String(alr.NextLink))) 4184} 4185 4186// AuthorizationListResultPage contains a page of ExpressRouteCircuitAuthorization values. 4187type AuthorizationListResultPage struct { 4188 fn func(context.Context, AuthorizationListResult) (AuthorizationListResult, error) 4189 alr AuthorizationListResult 4190} 4191 4192// NextWithContext advances to the next page of values. If there was an error making 4193// the request the page does not advance and the error is returned. 4194func (page *AuthorizationListResultPage) NextWithContext(ctx context.Context) (err error) { 4195 if tracing.IsEnabled() { 4196 ctx = tracing.StartSpan(ctx, fqdn+"/AuthorizationListResultPage.NextWithContext") 4197 defer func() { 4198 sc := -1 4199 if page.Response().Response.Response != nil { 4200 sc = page.Response().Response.Response.StatusCode 4201 } 4202 tracing.EndSpan(ctx, sc, err) 4203 }() 4204 } 4205 next, err := page.fn(ctx, page.alr) 4206 if err != nil { 4207 return err 4208 } 4209 page.alr = next 4210 return nil 4211} 4212 4213// Next advances to the next page of values. If there was an error making 4214// the request the page does not advance and the error is returned. 4215// Deprecated: Use NextWithContext() instead. 4216func (page *AuthorizationListResultPage) Next() error { 4217 return page.NextWithContext(context.Background()) 4218} 4219 4220// NotDone returns true if the page enumeration should be started or is not yet complete. 4221func (page AuthorizationListResultPage) NotDone() bool { 4222 return !page.alr.IsEmpty() 4223} 4224 4225// Response returns the raw server response from the last page request. 4226func (page AuthorizationListResultPage) Response() AuthorizationListResult { 4227 return page.alr 4228} 4229 4230// Values returns the slice of values for the current page or nil if there are no values. 4231func (page AuthorizationListResultPage) Values() []ExpressRouteCircuitAuthorization { 4232 if page.alr.IsEmpty() { 4233 return nil 4234 } 4235 return *page.alr.Value 4236} 4237 4238// Creates a new instance of the AuthorizationListResultPage type. 4239func NewAuthorizationListResultPage(getNextPage func(context.Context, AuthorizationListResult) (AuthorizationListResult, error)) AuthorizationListResultPage { 4240 return AuthorizationListResultPage{fn: getNextPage} 4241} 4242 4243// AuthorizationPropertiesFormat ... 4244type AuthorizationPropertiesFormat struct { 4245 // AuthorizationKey - The authorization key. 4246 AuthorizationKey *string `json:"authorizationKey,omitempty"` 4247 // AuthorizationUseStatus - AuthorizationUseStatus. Possible values are: 'Available' and 'InUse'. Possible values include: 'Available', 'InUse' 4248 AuthorizationUseStatus AuthorizationUseStatus `json:"authorizationUseStatus,omitempty"` 4249 // ProvisioningState - Gets the provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. 4250 ProvisioningState *string `json:"provisioningState,omitempty"` 4251} 4252 4253// Availability availability of the metric. 4254type Availability struct { 4255 // TimeGrain - The time grain of the availability. 4256 TimeGrain *string `json:"timeGrain,omitempty"` 4257 // Retention - The retention of the availability. 4258 Retention *string `json:"retention,omitempty"` 4259 // BlobDuration - Duration of the availability blob. 4260 BlobDuration *string `json:"blobDuration,omitempty"` 4261} 4262 4263// AvailableProvidersList list of available countries with details. 4264type AvailableProvidersList struct { 4265 autorest.Response `json:"-"` 4266 // Countries - List of available countries. 4267 Countries *[]AvailableProvidersListCountry `json:"countries,omitempty"` 4268} 4269 4270// AvailableProvidersListCity city or town details. 4271type AvailableProvidersListCity struct { 4272 // CityName - The city or town name. 4273 CityName *string `json:"cityName,omitempty"` 4274 // Providers - A list of Internet service providers. 4275 Providers *[]string `json:"providers,omitempty"` 4276} 4277 4278// AvailableProvidersListCountry country details. 4279type AvailableProvidersListCountry struct { 4280 // CountryName - The country name. 4281 CountryName *string `json:"countryName,omitempty"` 4282 // Providers - A list of Internet service providers. 4283 Providers *[]string `json:"providers,omitempty"` 4284 // States - List of available states in the country. 4285 States *[]AvailableProvidersListState `json:"states,omitempty"` 4286} 4287 4288// AvailableProvidersListParameters constraints that determine the list of available Internet service 4289// providers. 4290type AvailableProvidersListParameters struct { 4291 // AzureLocations - A list of Azure regions. 4292 AzureLocations *[]string `json:"azureLocations,omitempty"` 4293 // Country - The country for available providers list. 4294 Country *string `json:"country,omitempty"` 4295 // State - The state for available providers list. 4296 State *string `json:"state,omitempty"` 4297 // City - The city or town for available providers list. 4298 City *string `json:"city,omitempty"` 4299} 4300 4301// AvailableProvidersListState state details. 4302type AvailableProvidersListState struct { 4303 // StateName - The state name. 4304 StateName *string `json:"stateName,omitempty"` 4305 // Providers - A list of Internet service providers. 4306 Providers *[]string `json:"providers,omitempty"` 4307 // Cities - List of available cities or towns in the state. 4308 Cities *[]AvailableProvidersListCity `json:"cities,omitempty"` 4309} 4310 4311// AzureAsyncOperationResult the response body contains the status of the specified asynchronous operation, 4312// indicating whether it has succeeded, is in progress, or has failed. Note that this status is distinct 4313// from the HTTP status code returned for the Get Operation Status operation itself. If the asynchronous 4314// operation succeeded, the response body includes the HTTP status code for the successful request. If the 4315// asynchronous operation failed, the response body includes the HTTP status code for the failed request 4316// and error information regarding the failure. 4317type AzureAsyncOperationResult struct { 4318 // Status - Status of the Azure async operation. Possible values are: 'InProgress', 'Succeeded', and 'Failed'. Possible values include: 'OperationStatusInProgress', 'OperationStatusSucceeded', 'OperationStatusFailed' 4319 Status OperationStatus `json:"status,omitempty"` 4320 Error *Error `json:"error,omitempty"` 4321} 4322 4323// AzureReachabilityReport azure reachability report details. 4324type AzureReachabilityReport struct { 4325 autorest.Response `json:"-"` 4326 // AggregationLevel - The aggregation level of Azure reachability report. Can be Country, State or City. 4327 AggregationLevel *string `json:"aggregationLevel,omitempty"` 4328 ProviderLocation *AzureReachabilityReportLocation `json:"providerLocation,omitempty"` 4329 // ReachabilityReport - List of Azure reachability report items. 4330 ReachabilityReport *[]AzureReachabilityReportItem `json:"reachabilityReport,omitempty"` 4331} 4332 4333// AzureReachabilityReportItem azure reachability report details for a given provider location. 4334type AzureReachabilityReportItem struct { 4335 // Provider - The Internet service provider. 4336 Provider *string `json:"provider,omitempty"` 4337 // AzureLocation - The Azure region. 4338 AzureLocation *string `json:"azureLocation,omitempty"` 4339 // Latencies - List of latency details for each of the time series. 4340 Latencies *[]AzureReachabilityReportLatencyInfo `json:"latencies,omitempty"` 4341} 4342 4343// AzureReachabilityReportLatencyInfo details on latency for a time series. 4344type AzureReachabilityReportLatencyInfo struct { 4345 // TimeStamp - The time stamp. 4346 TimeStamp *date.Time `json:"timeStamp,omitempty"` 4347 // Score - The relative latency score between 1 and 100, higher values indicating a faster connection. 4348 Score *int32 `json:"score,omitempty"` 4349} 4350 4351// AzureReachabilityReportLocation parameters that define a geographic location. 4352type AzureReachabilityReportLocation struct { 4353 // Country - The name of the country. 4354 Country *string `json:"country,omitempty"` 4355 // State - The name of the state. 4356 State *string `json:"state,omitempty"` 4357 // City - The name of the city or town. 4358 City *string `json:"city,omitempty"` 4359} 4360 4361// AzureReachabilityReportParameters geographic and time constraints for Azure reachability report. 4362type AzureReachabilityReportParameters struct { 4363 ProviderLocation *AzureReachabilityReportLocation `json:"providerLocation,omitempty"` 4364 // Providers - List of Internet service providers. 4365 Providers *[]string `json:"providers,omitempty"` 4366 // AzureLocations - Optional Azure regions to scope the query to. 4367 AzureLocations *[]string `json:"azureLocations,omitempty"` 4368 // StartTime - The start time for the Azure reachability report. 4369 StartTime *date.Time `json:"startTime,omitempty"` 4370 // EndTime - The end time for the Azure reachability report. 4371 EndTime *date.Time `json:"endTime,omitempty"` 4372} 4373 4374// BackendAddressPool pool of backend IP addresses. 4375type BackendAddressPool struct { 4376 autorest.Response `json:"-"` 4377 // BackendAddressPoolPropertiesFormat - Properties of load balancer backend address pool. 4378 *BackendAddressPoolPropertiesFormat `json:"properties,omitempty"` 4379 // Name - Gets name of the resource that is unique within a resource group. This name can be used to access the resource. 4380 Name *string `json:"name,omitempty"` 4381 // Etag - A unique read-only string that changes whenever the resource is updated. 4382 Etag *string `json:"etag,omitempty"` 4383 // ID - Resource ID. 4384 ID *string `json:"id,omitempty"` 4385} 4386 4387// MarshalJSON is the custom marshaler for BackendAddressPool. 4388func (bap BackendAddressPool) MarshalJSON() ([]byte, error) { 4389 objectMap := make(map[string]interface{}) 4390 if bap.BackendAddressPoolPropertiesFormat != nil { 4391 objectMap["properties"] = bap.BackendAddressPoolPropertiesFormat 4392 } 4393 if bap.Name != nil { 4394 objectMap["name"] = bap.Name 4395 } 4396 if bap.Etag != nil { 4397 objectMap["etag"] = bap.Etag 4398 } 4399 if bap.ID != nil { 4400 objectMap["id"] = bap.ID 4401 } 4402 return json.Marshal(objectMap) 4403} 4404 4405// UnmarshalJSON is the custom unmarshaler for BackendAddressPool struct. 4406func (bap *BackendAddressPool) UnmarshalJSON(body []byte) error { 4407 var m map[string]*json.RawMessage 4408 err := json.Unmarshal(body, &m) 4409 if err != nil { 4410 return err 4411 } 4412 for k, v := range m { 4413 switch k { 4414 case "properties": 4415 if v != nil { 4416 var backendAddressPoolPropertiesFormat BackendAddressPoolPropertiesFormat 4417 err = json.Unmarshal(*v, &backendAddressPoolPropertiesFormat) 4418 if err != nil { 4419 return err 4420 } 4421 bap.BackendAddressPoolPropertiesFormat = &backendAddressPoolPropertiesFormat 4422 } 4423 case "name": 4424 if v != nil { 4425 var name string 4426 err = json.Unmarshal(*v, &name) 4427 if err != nil { 4428 return err 4429 } 4430 bap.Name = &name 4431 } 4432 case "etag": 4433 if v != nil { 4434 var etag string 4435 err = json.Unmarshal(*v, &etag) 4436 if err != nil { 4437 return err 4438 } 4439 bap.Etag = &etag 4440 } 4441 case "id": 4442 if v != nil { 4443 var ID string 4444 err = json.Unmarshal(*v, &ID) 4445 if err != nil { 4446 return err 4447 } 4448 bap.ID = &ID 4449 } 4450 } 4451 } 4452 4453 return nil 4454} 4455 4456// BackendAddressPoolPropertiesFormat properties of the backend address pool. 4457type BackendAddressPoolPropertiesFormat struct { 4458 // BackendIPConfigurations - READ-ONLY; Gets collection of references to IP addresses defined in network interfaces. 4459 BackendIPConfigurations *[]InterfaceIPConfiguration `json:"backendIPConfigurations,omitempty"` 4460 // LoadBalancingRules - READ-ONLY; Gets load balancing rules that use this backend address pool. 4461 LoadBalancingRules *[]SubResource `json:"loadBalancingRules,omitempty"` 4462 // OutboundNatRule - READ-ONLY; Gets outbound rules that use this backend address pool. 4463 OutboundNatRule *SubResource `json:"outboundNatRule,omitempty"` 4464 // ProvisioningState - Get provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. 4465 ProvisioningState *string `json:"provisioningState,omitempty"` 4466} 4467 4468// BGPCommunity contains bgp community information offered in Service Community resources. 4469type BGPCommunity struct { 4470 // ServiceSupportedRegion - The region which the service support. e.g. For O365, region is Global. 4471 ServiceSupportedRegion *string `json:"serviceSupportedRegion,omitempty"` 4472 // CommunityName - The name of the bgp community. e.g. Skype. 4473 CommunityName *string `json:"communityName,omitempty"` 4474 // CommunityValue - The value of the bgp community. For more information: https://docs.microsoft.com/en-us/azure/expressroute/expressroute-routing. 4475 CommunityValue *string `json:"communityValue,omitempty"` 4476 // CommunityPrefixes - The prefixes that the bgp community contains. 4477 CommunityPrefixes *[]string `json:"communityPrefixes,omitempty"` 4478 // IsAuthorizedToUse - Customer is authorized to use bgp community or not. 4479 IsAuthorizedToUse *bool `json:"isAuthorizedToUse,omitempty"` 4480 // ServiceGroup - The service group of the bgp community contains. 4481 ServiceGroup *string `json:"serviceGroup,omitempty"` 4482} 4483 4484// BgpPeerStatus BGP peer status details 4485type BgpPeerStatus struct { 4486 // LocalAddress - READ-ONLY; The virtual network gateway's local address 4487 LocalAddress *string `json:"localAddress,omitempty"` 4488 // Neighbor - READ-ONLY; The remote BGP peer 4489 Neighbor *string `json:"neighbor,omitempty"` 4490 // Asn - READ-ONLY; The autonomous system number of the remote BGP peer 4491 Asn *int32 `json:"asn,omitempty"` 4492 // State - READ-ONLY; The BGP peer state. Possible values include: 'BgpPeerStateUnknown', 'BgpPeerStateStopped', 'BgpPeerStateIdle', 'BgpPeerStateConnecting', 'BgpPeerStateConnected' 4493 State BgpPeerState `json:"state,omitempty"` 4494 // ConnectedDuration - READ-ONLY; For how long the peering has been up 4495 ConnectedDuration *string `json:"connectedDuration,omitempty"` 4496 // RoutesReceived - READ-ONLY; The number of routes learned from this peer 4497 RoutesReceived *int64 `json:"routesReceived,omitempty"` 4498 // MessagesSent - READ-ONLY; The number of BGP messages sent 4499 MessagesSent *int64 `json:"messagesSent,omitempty"` 4500 // MessagesReceived - READ-ONLY; The number of BGP messages received 4501 MessagesReceived *int64 `json:"messagesReceived,omitempty"` 4502} 4503 4504// BgpPeerStatusListResult response for list BGP peer status API service call 4505type BgpPeerStatusListResult struct { 4506 autorest.Response `json:"-"` 4507 // Value - List of BGP peers 4508 Value *[]BgpPeerStatus `json:"value,omitempty"` 4509} 4510 4511// BgpServiceCommunity service Community Properties. 4512type BgpServiceCommunity struct { 4513 *BgpServiceCommunityPropertiesFormat `json:"properties,omitempty"` 4514 // ID - Resource ID. 4515 ID *string `json:"id,omitempty"` 4516 // Name - READ-ONLY; Resource name. 4517 Name *string `json:"name,omitempty"` 4518 // Type - READ-ONLY; Resource type. 4519 Type *string `json:"type,omitempty"` 4520 // Location - Resource location. 4521 Location *string `json:"location,omitempty"` 4522 // Tags - Resource tags. 4523 Tags map[string]*string `json:"tags"` 4524} 4525 4526// MarshalJSON is the custom marshaler for BgpServiceCommunity. 4527func (bsc BgpServiceCommunity) MarshalJSON() ([]byte, error) { 4528 objectMap := make(map[string]interface{}) 4529 if bsc.BgpServiceCommunityPropertiesFormat != nil { 4530 objectMap["properties"] = bsc.BgpServiceCommunityPropertiesFormat 4531 } 4532 if bsc.ID != nil { 4533 objectMap["id"] = bsc.ID 4534 } 4535 if bsc.Location != nil { 4536 objectMap["location"] = bsc.Location 4537 } 4538 if bsc.Tags != nil { 4539 objectMap["tags"] = bsc.Tags 4540 } 4541 return json.Marshal(objectMap) 4542} 4543 4544// UnmarshalJSON is the custom unmarshaler for BgpServiceCommunity struct. 4545func (bsc *BgpServiceCommunity) UnmarshalJSON(body []byte) error { 4546 var m map[string]*json.RawMessage 4547 err := json.Unmarshal(body, &m) 4548 if err != nil { 4549 return err 4550 } 4551 for k, v := range m { 4552 switch k { 4553 case "properties": 4554 if v != nil { 4555 var bgpServiceCommunityPropertiesFormat BgpServiceCommunityPropertiesFormat 4556 err = json.Unmarshal(*v, &bgpServiceCommunityPropertiesFormat) 4557 if err != nil { 4558 return err 4559 } 4560 bsc.BgpServiceCommunityPropertiesFormat = &bgpServiceCommunityPropertiesFormat 4561 } 4562 case "id": 4563 if v != nil { 4564 var ID string 4565 err = json.Unmarshal(*v, &ID) 4566 if err != nil { 4567 return err 4568 } 4569 bsc.ID = &ID 4570 } 4571 case "name": 4572 if v != nil { 4573 var name string 4574 err = json.Unmarshal(*v, &name) 4575 if err != nil { 4576 return err 4577 } 4578 bsc.Name = &name 4579 } 4580 case "type": 4581 if v != nil { 4582 var typeVar string 4583 err = json.Unmarshal(*v, &typeVar) 4584 if err != nil { 4585 return err 4586 } 4587 bsc.Type = &typeVar 4588 } 4589 case "location": 4590 if v != nil { 4591 var location string 4592 err = json.Unmarshal(*v, &location) 4593 if err != nil { 4594 return err 4595 } 4596 bsc.Location = &location 4597 } 4598 case "tags": 4599 if v != nil { 4600 var tags map[string]*string 4601 err = json.Unmarshal(*v, &tags) 4602 if err != nil { 4603 return err 4604 } 4605 bsc.Tags = tags 4606 } 4607 } 4608 } 4609 4610 return nil 4611} 4612 4613// BgpServiceCommunityListResult response for the ListServiceCommunity API service call. 4614type BgpServiceCommunityListResult struct { 4615 autorest.Response `json:"-"` 4616 // Value - A list of service community resources. 4617 Value *[]BgpServiceCommunity `json:"value,omitempty"` 4618 // NextLink - The URL to get the next set of results. 4619 NextLink *string `json:"nextLink,omitempty"` 4620} 4621 4622// BgpServiceCommunityListResultIterator provides access to a complete listing of BgpServiceCommunity 4623// values. 4624type BgpServiceCommunityListResultIterator struct { 4625 i int 4626 page BgpServiceCommunityListResultPage 4627} 4628 4629// NextWithContext advances to the next value. If there was an error making 4630// the request the iterator does not advance and the error is returned. 4631func (iter *BgpServiceCommunityListResultIterator) NextWithContext(ctx context.Context) (err error) { 4632 if tracing.IsEnabled() { 4633 ctx = tracing.StartSpan(ctx, fqdn+"/BgpServiceCommunityListResultIterator.NextWithContext") 4634 defer func() { 4635 sc := -1 4636 if iter.Response().Response.Response != nil { 4637 sc = iter.Response().Response.Response.StatusCode 4638 } 4639 tracing.EndSpan(ctx, sc, err) 4640 }() 4641 } 4642 iter.i++ 4643 if iter.i < len(iter.page.Values()) { 4644 return nil 4645 } 4646 err = iter.page.NextWithContext(ctx) 4647 if err != nil { 4648 iter.i-- 4649 return err 4650 } 4651 iter.i = 0 4652 return nil 4653} 4654 4655// Next advances to the next value. If there was an error making 4656// the request the iterator does not advance and the error is returned. 4657// Deprecated: Use NextWithContext() instead. 4658func (iter *BgpServiceCommunityListResultIterator) Next() error { 4659 return iter.NextWithContext(context.Background()) 4660} 4661 4662// NotDone returns true if the enumeration should be started or is not yet complete. 4663func (iter BgpServiceCommunityListResultIterator) NotDone() bool { 4664 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 4665} 4666 4667// Response returns the raw server response from the last page request. 4668func (iter BgpServiceCommunityListResultIterator) Response() BgpServiceCommunityListResult { 4669 return iter.page.Response() 4670} 4671 4672// Value returns the current value or a zero-initialized value if the 4673// iterator has advanced beyond the end of the collection. 4674func (iter BgpServiceCommunityListResultIterator) Value() BgpServiceCommunity { 4675 if !iter.page.NotDone() { 4676 return BgpServiceCommunity{} 4677 } 4678 return iter.page.Values()[iter.i] 4679} 4680 4681// Creates a new instance of the BgpServiceCommunityListResultIterator type. 4682func NewBgpServiceCommunityListResultIterator(page BgpServiceCommunityListResultPage) BgpServiceCommunityListResultIterator { 4683 return BgpServiceCommunityListResultIterator{page: page} 4684} 4685 4686// IsEmpty returns true if the ListResult contains no values. 4687func (bsclr BgpServiceCommunityListResult) IsEmpty() bool { 4688 return bsclr.Value == nil || len(*bsclr.Value) == 0 4689} 4690 4691// bgpServiceCommunityListResultPreparer prepares a request to retrieve the next set of results. 4692// It returns nil if no more results exist. 4693func (bsclr BgpServiceCommunityListResult) bgpServiceCommunityListResultPreparer(ctx context.Context) (*http.Request, error) { 4694 if bsclr.NextLink == nil || len(to.String(bsclr.NextLink)) < 1 { 4695 return nil, nil 4696 } 4697 return autorest.Prepare((&http.Request{}).WithContext(ctx), 4698 autorest.AsJSON(), 4699 autorest.AsGet(), 4700 autorest.WithBaseURL(to.String(bsclr.NextLink))) 4701} 4702 4703// BgpServiceCommunityListResultPage contains a page of BgpServiceCommunity values. 4704type BgpServiceCommunityListResultPage struct { 4705 fn func(context.Context, BgpServiceCommunityListResult) (BgpServiceCommunityListResult, error) 4706 bsclr BgpServiceCommunityListResult 4707} 4708 4709// NextWithContext advances to the next page of values. If there was an error making 4710// the request the page does not advance and the error is returned. 4711func (page *BgpServiceCommunityListResultPage) NextWithContext(ctx context.Context) (err error) { 4712 if tracing.IsEnabled() { 4713 ctx = tracing.StartSpan(ctx, fqdn+"/BgpServiceCommunityListResultPage.NextWithContext") 4714 defer func() { 4715 sc := -1 4716 if page.Response().Response.Response != nil { 4717 sc = page.Response().Response.Response.StatusCode 4718 } 4719 tracing.EndSpan(ctx, sc, err) 4720 }() 4721 } 4722 next, err := page.fn(ctx, page.bsclr) 4723 if err != nil { 4724 return err 4725 } 4726 page.bsclr = next 4727 return nil 4728} 4729 4730// Next advances to the next page of values. If there was an error making 4731// the request the page does not advance and the error is returned. 4732// Deprecated: Use NextWithContext() instead. 4733func (page *BgpServiceCommunityListResultPage) Next() error { 4734 return page.NextWithContext(context.Background()) 4735} 4736 4737// NotDone returns true if the page enumeration should be started or is not yet complete. 4738func (page BgpServiceCommunityListResultPage) NotDone() bool { 4739 return !page.bsclr.IsEmpty() 4740} 4741 4742// Response returns the raw server response from the last page request. 4743func (page BgpServiceCommunityListResultPage) Response() BgpServiceCommunityListResult { 4744 return page.bsclr 4745} 4746 4747// Values returns the slice of values for the current page or nil if there are no values. 4748func (page BgpServiceCommunityListResultPage) Values() []BgpServiceCommunity { 4749 if page.bsclr.IsEmpty() { 4750 return nil 4751 } 4752 return *page.bsclr.Value 4753} 4754 4755// Creates a new instance of the BgpServiceCommunityListResultPage type. 4756func NewBgpServiceCommunityListResultPage(getNextPage func(context.Context, BgpServiceCommunityListResult) (BgpServiceCommunityListResult, error)) BgpServiceCommunityListResultPage { 4757 return BgpServiceCommunityListResultPage{fn: getNextPage} 4758} 4759 4760// BgpServiceCommunityPropertiesFormat properties of Service Community. 4761type BgpServiceCommunityPropertiesFormat struct { 4762 // ServiceName - The name of the bgp community. e.g. Skype. 4763 ServiceName *string `json:"serviceName,omitempty"` 4764 // BgpCommunities - Get a list of bgp communities. 4765 BgpCommunities *[]BGPCommunity `json:"bgpCommunities,omitempty"` 4766} 4767 4768// BgpSettings BGP settings details 4769type BgpSettings struct { 4770 // Asn - The BGP speaker's ASN. 4771 Asn *int64 `json:"asn,omitempty"` 4772 // BgpPeeringAddress - The BGP peering address and BGP identifier of this BGP speaker. 4773 BgpPeeringAddress *string `json:"bgpPeeringAddress,omitempty"` 4774 // PeerWeight - The weight added to routes learned from this BGP speaker. 4775 PeerWeight *int32 `json:"peerWeight,omitempty"` 4776} 4777 4778// ConnectionMonitor parameters that define the operation to create a connection monitor. 4779type ConnectionMonitor struct { 4780 // Location - Connection monitor location. 4781 Location *string `json:"location,omitempty"` 4782 // Tags - Connection monitor tags. 4783 Tags map[string]*string `json:"tags"` 4784 *ConnectionMonitorParameters `json:"properties,omitempty"` 4785} 4786 4787// MarshalJSON is the custom marshaler for ConnectionMonitor. 4788func (cm ConnectionMonitor) MarshalJSON() ([]byte, error) { 4789 objectMap := make(map[string]interface{}) 4790 if cm.Location != nil { 4791 objectMap["location"] = cm.Location 4792 } 4793 if cm.Tags != nil { 4794 objectMap["tags"] = cm.Tags 4795 } 4796 if cm.ConnectionMonitorParameters != nil { 4797 objectMap["properties"] = cm.ConnectionMonitorParameters 4798 } 4799 return json.Marshal(objectMap) 4800} 4801 4802// UnmarshalJSON is the custom unmarshaler for ConnectionMonitor struct. 4803func (cm *ConnectionMonitor) UnmarshalJSON(body []byte) error { 4804 var m map[string]*json.RawMessage 4805 err := json.Unmarshal(body, &m) 4806 if err != nil { 4807 return err 4808 } 4809 for k, v := range m { 4810 switch k { 4811 case "location": 4812 if v != nil { 4813 var location string 4814 err = json.Unmarshal(*v, &location) 4815 if err != nil { 4816 return err 4817 } 4818 cm.Location = &location 4819 } 4820 case "tags": 4821 if v != nil { 4822 var tags map[string]*string 4823 err = json.Unmarshal(*v, &tags) 4824 if err != nil { 4825 return err 4826 } 4827 cm.Tags = tags 4828 } 4829 case "properties": 4830 if v != nil { 4831 var connectionMonitorParameters ConnectionMonitorParameters 4832 err = json.Unmarshal(*v, &connectionMonitorParameters) 4833 if err != nil { 4834 return err 4835 } 4836 cm.ConnectionMonitorParameters = &connectionMonitorParameters 4837 } 4838 } 4839 } 4840 4841 return nil 4842} 4843 4844// ConnectionMonitorDestination describes the destination of connection monitor. 4845type ConnectionMonitorDestination struct { 4846 // ResourceID - The ID of the resource used as the destination by connection monitor. 4847 ResourceID *string `json:"resourceId,omitempty"` 4848 // Address - Address of the connection monitor destination (IP or domain name). 4849 Address *string `json:"address,omitempty"` 4850 // Port - The destination port used by connection monitor. 4851 Port *int32 `json:"port,omitempty"` 4852} 4853 4854// ConnectionMonitorListResult list of connection monitors. 4855type ConnectionMonitorListResult struct { 4856 autorest.Response `json:"-"` 4857 // Value - Information about connection monitors. 4858 Value *[]ConnectionMonitorResult `json:"value,omitempty"` 4859} 4860 4861// ConnectionMonitorParameters parameters that define the operation to create a connection monitor. 4862type ConnectionMonitorParameters struct { 4863 Source *ConnectionMonitorSource `json:"source,omitempty"` 4864 Destination *ConnectionMonitorDestination `json:"destination,omitempty"` 4865 // AutoStart - Determines if the connection monitor will start automatically once created. 4866 AutoStart *bool `json:"autoStart,omitempty"` 4867 // MonitoringIntervalInSeconds - Monitoring interval in seconds. 4868 MonitoringIntervalInSeconds *int32 `json:"monitoringIntervalInSeconds,omitempty"` 4869} 4870 4871// ConnectionMonitorQueryResult list of connection states snapshots. 4872type ConnectionMonitorQueryResult struct { 4873 autorest.Response `json:"-"` 4874 // States - Information about connection states. 4875 States *[]ConnectionStateSnapshot `json:"states,omitempty"` 4876} 4877 4878// ConnectionMonitorResult information about the connection monitor. 4879type ConnectionMonitorResult struct { 4880 autorest.Response `json:"-"` 4881 // Name - READ-ONLY; Name of the connection monitor. 4882 Name *string `json:"name,omitempty"` 4883 // ID - READ-ONLY; ID of the connection monitor. 4884 ID *string `json:"id,omitempty"` 4885 Etag *string `json:"etag,omitempty"` 4886 // Type - READ-ONLY; Connection monitor type. 4887 Type *string `json:"type,omitempty"` 4888 // Location - Connection monitor location. 4889 Location *string `json:"location,omitempty"` 4890 // Tags - Connection monitor tags. 4891 Tags map[string]*string `json:"tags"` 4892 *ConnectionMonitorResultProperties `json:"properties,omitempty"` 4893} 4894 4895// MarshalJSON is the custom marshaler for ConnectionMonitorResult. 4896func (cmr ConnectionMonitorResult) MarshalJSON() ([]byte, error) { 4897 objectMap := make(map[string]interface{}) 4898 if cmr.Etag != nil { 4899 objectMap["etag"] = cmr.Etag 4900 } 4901 if cmr.Location != nil { 4902 objectMap["location"] = cmr.Location 4903 } 4904 if cmr.Tags != nil { 4905 objectMap["tags"] = cmr.Tags 4906 } 4907 if cmr.ConnectionMonitorResultProperties != nil { 4908 objectMap["properties"] = cmr.ConnectionMonitorResultProperties 4909 } 4910 return json.Marshal(objectMap) 4911} 4912 4913// UnmarshalJSON is the custom unmarshaler for ConnectionMonitorResult struct. 4914func (cmr *ConnectionMonitorResult) UnmarshalJSON(body []byte) error { 4915 var m map[string]*json.RawMessage 4916 err := json.Unmarshal(body, &m) 4917 if err != nil { 4918 return err 4919 } 4920 for k, v := range m { 4921 switch k { 4922 case "name": 4923 if v != nil { 4924 var name string 4925 err = json.Unmarshal(*v, &name) 4926 if err != nil { 4927 return err 4928 } 4929 cmr.Name = &name 4930 } 4931 case "id": 4932 if v != nil { 4933 var ID string 4934 err = json.Unmarshal(*v, &ID) 4935 if err != nil { 4936 return err 4937 } 4938 cmr.ID = &ID 4939 } 4940 case "etag": 4941 if v != nil { 4942 var etag string 4943 err = json.Unmarshal(*v, &etag) 4944 if err != nil { 4945 return err 4946 } 4947 cmr.Etag = &etag 4948 } 4949 case "type": 4950 if v != nil { 4951 var typeVar string 4952 err = json.Unmarshal(*v, &typeVar) 4953 if err != nil { 4954 return err 4955 } 4956 cmr.Type = &typeVar 4957 } 4958 case "location": 4959 if v != nil { 4960 var location string 4961 err = json.Unmarshal(*v, &location) 4962 if err != nil { 4963 return err 4964 } 4965 cmr.Location = &location 4966 } 4967 case "tags": 4968 if v != nil { 4969 var tags map[string]*string 4970 err = json.Unmarshal(*v, &tags) 4971 if err != nil { 4972 return err 4973 } 4974 cmr.Tags = tags 4975 } 4976 case "properties": 4977 if v != nil { 4978 var connectionMonitorResultProperties ConnectionMonitorResultProperties 4979 err = json.Unmarshal(*v, &connectionMonitorResultProperties) 4980 if err != nil { 4981 return err 4982 } 4983 cmr.ConnectionMonitorResultProperties = &connectionMonitorResultProperties 4984 } 4985 } 4986 } 4987 4988 return nil 4989} 4990 4991// ConnectionMonitorResultProperties describes the properties of a connection monitor. 4992type ConnectionMonitorResultProperties struct { 4993 // ProvisioningState - The provisioning state of the connection monitor. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed' 4994 ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` 4995 // StartTime - The date and time when the connection monitor was started. 4996 StartTime *date.Time `json:"startTime,omitempty"` 4997 // MonitoringStatus - The monitoring status of the connection monitor. 4998 MonitoringStatus *string `json:"monitoringStatus,omitempty"` 4999 Source *ConnectionMonitorSource `json:"source,omitempty"` 5000 Destination *ConnectionMonitorDestination `json:"destination,omitempty"` 5001 // AutoStart - Determines if the connection monitor will start automatically once created. 5002 AutoStart *bool `json:"autoStart,omitempty"` 5003 // MonitoringIntervalInSeconds - Monitoring interval in seconds. 5004 MonitoringIntervalInSeconds *int32 `json:"monitoringIntervalInSeconds,omitempty"` 5005} 5006 5007// ConnectionMonitorsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a 5008// long-running operation. 5009type ConnectionMonitorsCreateOrUpdateFuture struct { 5010 azure.Future 5011} 5012 5013// Result returns the result of the asynchronous operation. 5014// If the operation has not completed it will return an error. 5015func (future *ConnectionMonitorsCreateOrUpdateFuture) Result(client ConnectionMonitorsClient) (cmr ConnectionMonitorResult, err error) { 5016 var done bool 5017 done, err = future.DoneWithContext(context.Background(), client) 5018 if err != nil { 5019 err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") 5020 return 5021 } 5022 if !done { 5023 err = azure.NewAsyncOpIncompleteError("network.ConnectionMonitorsCreateOrUpdateFuture") 5024 return 5025 } 5026 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 5027 if cmr.Response.Response, err = future.GetResult(sender); err == nil && cmr.Response.Response.StatusCode != http.StatusNoContent { 5028 cmr, err = client.CreateOrUpdateResponder(cmr.Response.Response) 5029 if err != nil { 5030 err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsCreateOrUpdateFuture", "Result", cmr.Response.Response, "Failure responding to request") 5031 } 5032 } 5033 return 5034} 5035 5036// ConnectionMonitorsDeleteFuture an abstraction for monitoring and retrieving the results of a 5037// long-running operation. 5038type ConnectionMonitorsDeleteFuture struct { 5039 azure.Future 5040} 5041 5042// Result returns the result of the asynchronous operation. 5043// If the operation has not completed it will return an error. 5044func (future *ConnectionMonitorsDeleteFuture) Result(client ConnectionMonitorsClient) (ar autorest.Response, err error) { 5045 var done bool 5046 done, err = future.DoneWithContext(context.Background(), client) 5047 if err != nil { 5048 err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsDeleteFuture", "Result", future.Response(), "Polling failure") 5049 return 5050 } 5051 if !done { 5052 err = azure.NewAsyncOpIncompleteError("network.ConnectionMonitorsDeleteFuture") 5053 return 5054 } 5055 ar.Response = future.Response() 5056 return 5057} 5058 5059// ConnectionMonitorSource describes the source of connection monitor. 5060type ConnectionMonitorSource struct { 5061 // ResourceID - The ID of the resource used as the source by connection monitor. 5062 ResourceID *string `json:"resourceId,omitempty"` 5063 // Port - The source port used by connection monitor. 5064 Port *int32 `json:"port,omitempty"` 5065} 5066 5067// ConnectionMonitorsQueryFuture an abstraction for monitoring and retrieving the results of a long-running 5068// operation. 5069type ConnectionMonitorsQueryFuture struct { 5070 azure.Future 5071} 5072 5073// Result returns the result of the asynchronous operation. 5074// If the operation has not completed it will return an error. 5075func (future *ConnectionMonitorsQueryFuture) Result(client ConnectionMonitorsClient) (cmqr ConnectionMonitorQueryResult, err error) { 5076 var done bool 5077 done, err = future.DoneWithContext(context.Background(), client) 5078 if err != nil { 5079 err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsQueryFuture", "Result", future.Response(), "Polling failure") 5080 return 5081 } 5082 if !done { 5083 err = azure.NewAsyncOpIncompleteError("network.ConnectionMonitorsQueryFuture") 5084 return 5085 } 5086 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 5087 if cmqr.Response.Response, err = future.GetResult(sender); err == nil && cmqr.Response.Response.StatusCode != http.StatusNoContent { 5088 cmqr, err = client.QueryResponder(cmqr.Response.Response) 5089 if err != nil { 5090 err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsQueryFuture", "Result", cmqr.Response.Response, "Failure responding to request") 5091 } 5092 } 5093 return 5094} 5095 5096// ConnectionMonitorsStartFuture an abstraction for monitoring and retrieving the results of a long-running 5097// operation. 5098type ConnectionMonitorsStartFuture struct { 5099 azure.Future 5100} 5101 5102// Result returns the result of the asynchronous operation. 5103// If the operation has not completed it will return an error. 5104func (future *ConnectionMonitorsStartFuture) Result(client ConnectionMonitorsClient) (ar autorest.Response, err error) { 5105 var done bool 5106 done, err = future.DoneWithContext(context.Background(), client) 5107 if err != nil { 5108 err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsStartFuture", "Result", future.Response(), "Polling failure") 5109 return 5110 } 5111 if !done { 5112 err = azure.NewAsyncOpIncompleteError("network.ConnectionMonitorsStartFuture") 5113 return 5114 } 5115 ar.Response = future.Response() 5116 return 5117} 5118 5119// ConnectionMonitorsStopFuture an abstraction for monitoring and retrieving the results of a long-running 5120// operation. 5121type ConnectionMonitorsStopFuture struct { 5122 azure.Future 5123} 5124 5125// Result returns the result of the asynchronous operation. 5126// If the operation has not completed it will return an error. 5127func (future *ConnectionMonitorsStopFuture) Result(client ConnectionMonitorsClient) (ar autorest.Response, err error) { 5128 var done bool 5129 done, err = future.DoneWithContext(context.Background(), client) 5130 if err != nil { 5131 err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsStopFuture", "Result", future.Response(), "Polling failure") 5132 return 5133 } 5134 if !done { 5135 err = azure.NewAsyncOpIncompleteError("network.ConnectionMonitorsStopFuture") 5136 return 5137 } 5138 ar.Response = future.Response() 5139 return 5140} 5141 5142// ConnectionResetSharedKey the virtual network connection reset shared key 5143type ConnectionResetSharedKey struct { 5144 autorest.Response `json:"-"` 5145 // KeyLength - The virtual network connection reset shared key length, should between 1 and 128. 5146 KeyLength *int32 `json:"keyLength,omitempty"` 5147} 5148 5149// ConnectionSharedKey response for GetConnectionSharedKey API service call 5150type ConnectionSharedKey struct { 5151 autorest.Response `json:"-"` 5152 // Value - The virtual network connection shared key value. 5153 Value *string `json:"value,omitempty"` 5154} 5155 5156// ConnectionStateSnapshot connection state snapshot. 5157type ConnectionStateSnapshot struct { 5158 // ConnectionState - The connection state. Possible values include: 'ConnectionStateReachable', 'ConnectionStateUnreachable', 'ConnectionStateUnknown' 5159 ConnectionState ConnectionState `json:"connectionState,omitempty"` 5160 // StartTime - The start time of the connection snapshot. 5161 StartTime *date.Time `json:"startTime,omitempty"` 5162 // EndTime - The end time of the connection snapshot. 5163 EndTime *date.Time `json:"endTime,omitempty"` 5164 // EvaluationState - Connectivity analysis evaluation state. Possible values include: 'NotStarted', 'InProgress', 'Completed' 5165 EvaluationState EvaluationState `json:"evaluationState,omitempty"` 5166 // Hops - READ-ONLY; List of hops between the source and the destination. 5167 Hops *[]ConnectivityHop `json:"hops,omitempty"` 5168} 5169 5170// ConnectivityDestination parameters that define destination of connection. 5171type ConnectivityDestination struct { 5172 // ResourceID - The ID of the resource to which a connection attempt will be made. 5173 ResourceID *string `json:"resourceId,omitempty"` 5174 // Address - The IP address or URI the resource to which a connection attempt will be made. 5175 Address *string `json:"address,omitempty"` 5176 // Port - Port on which check connectivity will be performed. 5177 Port *int32 `json:"port,omitempty"` 5178} 5179 5180// ConnectivityHop information about a hop between the source and the destination. 5181type ConnectivityHop struct { 5182 // Type - READ-ONLY; The type of the hop. 5183 Type *string `json:"type,omitempty"` 5184 // ID - READ-ONLY; The ID of the hop. 5185 ID *string `json:"id,omitempty"` 5186 // Address - READ-ONLY; The IP address of the hop. 5187 Address *string `json:"address,omitempty"` 5188 // ResourceID - READ-ONLY; The ID of the resource corresponding to this hop. 5189 ResourceID *string `json:"resourceId,omitempty"` 5190 // NextHopIds - READ-ONLY; List of next hop identifiers. 5191 NextHopIds *[]string `json:"nextHopIds,omitempty"` 5192 // Issues - READ-ONLY; List of issues. 5193 Issues *[]ConnectivityIssue `json:"issues,omitempty"` 5194} 5195 5196// ConnectivityInformation information on the connectivity status. 5197type ConnectivityInformation struct { 5198 autorest.Response `json:"-"` 5199 // Hops - READ-ONLY; List of hops between the source and the destination. 5200 Hops *[]ConnectivityHop `json:"hops,omitempty"` 5201 // ConnectionStatus - READ-ONLY; The connection status. Possible values include: 'ConnectionStatusUnknown', 'ConnectionStatusConnected', 'ConnectionStatusDisconnected', 'ConnectionStatusDegraded' 5202 ConnectionStatus ConnectionStatus `json:"connectionStatus,omitempty"` 5203 // AvgLatencyInMs - READ-ONLY; Average latency in milliseconds. 5204 AvgLatencyInMs *int32 `json:"avgLatencyInMs,omitempty"` 5205 // MinLatencyInMs - READ-ONLY; Minimum latency in milliseconds. 5206 MinLatencyInMs *int32 `json:"minLatencyInMs,omitempty"` 5207 // MaxLatencyInMs - READ-ONLY; Maximum latency in milliseconds. 5208 MaxLatencyInMs *int32 `json:"maxLatencyInMs,omitempty"` 5209 // ProbesSent - READ-ONLY; Total number of probes sent. 5210 ProbesSent *int32 `json:"probesSent,omitempty"` 5211 // ProbesFailed - READ-ONLY; Number of failed probes. 5212 ProbesFailed *int32 `json:"probesFailed,omitempty"` 5213} 5214 5215// ConnectivityIssue information about an issue encountered in the process of checking for connectivity. 5216type ConnectivityIssue struct { 5217 // Origin - READ-ONLY; The origin of the issue. Possible values include: 'OriginLocal', 'OriginInbound', 'OriginOutbound' 5218 Origin Origin `json:"origin,omitempty"` 5219 // Severity - READ-ONLY; The severity of the issue. Possible values include: 'SeverityError', 'SeverityWarning' 5220 Severity Severity `json:"severity,omitempty"` 5221 // Type - READ-ONLY; The type of issue. Possible values include: 'IssueTypeUnknown', 'IssueTypeAgentStopped', 'IssueTypeGuestFirewall', 'IssueTypeDNSResolution', 'IssueTypeSocketBind', 'IssueTypeNetworkSecurityRule', 'IssueTypeUserDefinedRoute', 'IssueTypePortThrottled', 'IssueTypePlatform' 5222 Type IssueType `json:"type,omitempty"` 5223 // Context - READ-ONLY; Provides additional context on the issue. 5224 Context *[]map[string]*string `json:"context,omitempty"` 5225} 5226 5227// ConnectivityParameters parameters that determine how the connectivity check will be performed. 5228type ConnectivityParameters struct { 5229 Source *ConnectivitySource `json:"source,omitempty"` 5230 Destination *ConnectivityDestination `json:"destination,omitempty"` 5231} 5232 5233// ConnectivitySource parameters that define the source of the connection. 5234type ConnectivitySource struct { 5235 // ResourceID - The ID of the resource from which a connectivity check will be initiated. 5236 ResourceID *string `json:"resourceId,omitempty"` 5237 // Port - The source port from which a connectivity check will be performed. 5238 Port *int32 `json:"port,omitempty"` 5239} 5240 5241// DhcpOptions dhcpOptions contains an array of DNS servers available to VMs deployed in the virtual 5242// network. Standard DHCP option for a subnet overrides VNET DHCP options. 5243type DhcpOptions struct { 5244 // DNSServers - The list of DNS servers IP addresses. 5245 DNSServers *[]string `json:"dnsServers,omitempty"` 5246} 5247 5248// Dimension dimension of the metric. 5249type Dimension struct { 5250 // Name - The name of the dimension. 5251 Name *string `json:"name,omitempty"` 5252 // DisplayName - The display name of the dimension. 5253 DisplayName *string `json:"displayName,omitempty"` 5254 // InternalName - The internal name of the dimension. 5255 InternalName *string `json:"internalName,omitempty"` 5256} 5257 5258// DNSNameAvailabilityResult response for the CheckDnsNameAvailability API service call. 5259type DNSNameAvailabilityResult struct { 5260 autorest.Response `json:"-"` 5261 // Available - Domain availability (True/False). 5262 Available *bool `json:"available,omitempty"` 5263} 5264 5265// EffectiveNetworkSecurityGroup effective network security group. 5266type EffectiveNetworkSecurityGroup struct { 5267 // NetworkSecurityGroup - The ID of network security group that is applied. 5268 NetworkSecurityGroup *SubResource `json:"networkSecurityGroup,omitempty"` 5269 // Association - Associated resources. 5270 Association *EffectiveNetworkSecurityGroupAssociation `json:"association,omitempty"` 5271 // EffectiveSecurityRules - A collection of effective security rules. 5272 EffectiveSecurityRules *[]EffectiveNetworkSecurityRule `json:"effectiveSecurityRules,omitempty"` 5273 // TagMap - Mapping of tags to list of IP Addresses included within the tag. 5274 TagMap map[string][]string `json:"tagMap"` 5275} 5276 5277// MarshalJSON is the custom marshaler for EffectiveNetworkSecurityGroup. 5278func (ensg EffectiveNetworkSecurityGroup) MarshalJSON() ([]byte, error) { 5279 objectMap := make(map[string]interface{}) 5280 if ensg.NetworkSecurityGroup != nil { 5281 objectMap["networkSecurityGroup"] = ensg.NetworkSecurityGroup 5282 } 5283 if ensg.Association != nil { 5284 objectMap["association"] = ensg.Association 5285 } 5286 if ensg.EffectiveSecurityRules != nil { 5287 objectMap["effectiveSecurityRules"] = ensg.EffectiveSecurityRules 5288 } 5289 if ensg.TagMap != nil { 5290 objectMap["tagMap"] = ensg.TagMap 5291 } 5292 return json.Marshal(objectMap) 5293} 5294 5295// EffectiveNetworkSecurityGroupAssociation the effective network security group association. 5296type EffectiveNetworkSecurityGroupAssociation struct { 5297 // Subnet - The ID of the subnet if assigned. 5298 Subnet *SubResource `json:"subnet,omitempty"` 5299 // NetworkInterface - The ID of the network interface if assigned. 5300 NetworkInterface *SubResource `json:"networkInterface,omitempty"` 5301} 5302 5303// EffectiveNetworkSecurityGroupListResult response for list effective network security groups API service 5304// call. 5305type EffectiveNetworkSecurityGroupListResult struct { 5306 autorest.Response `json:"-"` 5307 // Value - A list of effective network security groups. 5308 Value *[]EffectiveNetworkSecurityGroup `json:"value,omitempty"` 5309 // NextLink - READ-ONLY; The URL to get the next set of results. 5310 NextLink *string `json:"nextLink,omitempty"` 5311} 5312 5313// EffectiveNetworkSecurityRule effective network security rules. 5314type EffectiveNetworkSecurityRule struct { 5315 // Name - The name of the security rule specified by the user (if created by the user). 5316 Name *string `json:"name,omitempty"` 5317 // Protocol - The network protocol this rule applies to. Possible values are: 'Tcp', 'Udp', and 'All'. Possible values include: 'TCP', 'UDP', 'All' 5318 Protocol EffectiveSecurityRuleProtocol `json:"protocol,omitempty"` 5319 // SourcePortRange - The source port or range. 5320 SourcePortRange *string `json:"sourcePortRange,omitempty"` 5321 // DestinationPortRange - The destination port or range. 5322 DestinationPortRange *string `json:"destinationPortRange,omitempty"` 5323 // SourcePortRanges - The source port ranges. Expected values include a single integer between 0 and 65535, a range using '-' as separator (e.g. 100-400), or an asterisk (*) 5324 SourcePortRanges *[]string `json:"sourcePortRanges,omitempty"` 5325 // DestinationPortRanges - The destination port ranges. Expected values include a single integer between 0 and 65535, a range using '-' as separator (e.g. 100-400), or an asterisk (*) 5326 DestinationPortRanges *[]string `json:"destinationPortRanges,omitempty"` 5327 // SourceAddressPrefix - The source address prefix. 5328 SourceAddressPrefix *string `json:"sourceAddressPrefix,omitempty"` 5329 // DestinationAddressPrefix - The destination address prefix. 5330 DestinationAddressPrefix *string `json:"destinationAddressPrefix,omitempty"` 5331 // SourceAddressPrefixes - The source address prefixes. Expected values include CIDR IP ranges, Default Tags (VirtualNetwork, AzureLoadBalancer, Internet), System Tags, and the asterisk (*). 5332 SourceAddressPrefixes *[]string `json:"sourceAddressPrefixes,omitempty"` 5333 // DestinationAddressPrefixes - The destination address prefixes. Expected values include CIDR IP ranges, Default Tags (VirtualNetwork, AzureLoadBalancer, Internet), System Tags, and the asterisk (*). 5334 DestinationAddressPrefixes *[]string `json:"destinationAddressPrefixes,omitempty"` 5335 // ExpandedSourceAddressPrefix - The expanded source address prefix. 5336 ExpandedSourceAddressPrefix *[]string `json:"expandedSourceAddressPrefix,omitempty"` 5337 // ExpandedDestinationAddressPrefix - Expanded destination address prefix. 5338 ExpandedDestinationAddressPrefix *[]string `json:"expandedDestinationAddressPrefix,omitempty"` 5339 // Access - Whether network traffic is allowed or denied. Possible values are: 'Allow' and 'Deny'. Possible values include: 'SecurityRuleAccessAllow', 'SecurityRuleAccessDeny' 5340 Access SecurityRuleAccess `json:"access,omitempty"` 5341 // Priority - The priority of the rule. 5342 Priority *int32 `json:"priority,omitempty"` 5343 // Direction - The direction of the rule. Possible values are: 'Inbound and Outbound'. Possible values include: 'SecurityRuleDirectionInbound', 'SecurityRuleDirectionOutbound' 5344 Direction SecurityRuleDirection `json:"direction,omitempty"` 5345} 5346 5347// EffectiveRoute effective Route 5348type EffectiveRoute struct { 5349 // Name - The name of the user defined route. This is optional. 5350 Name *string `json:"name,omitempty"` 5351 // Source - Who created the route. Possible values are: 'Unknown', 'User', 'VirtualNetworkGateway', and 'Default'. Possible values include: 'EffectiveRouteSourceUnknown', 'EffectiveRouteSourceUser', 'EffectiveRouteSourceVirtualNetworkGateway', 'EffectiveRouteSourceDefault' 5352 Source EffectiveRouteSource `json:"source,omitempty"` 5353 // State - The value of effective route. Possible values are: 'Active' and 'Invalid'. Possible values include: 'Active', 'Invalid' 5354 State EffectiveRouteState `json:"state,omitempty"` 5355 // AddressPrefix - The address prefixes of the effective routes in CIDR notation. 5356 AddressPrefix *[]string `json:"addressPrefix,omitempty"` 5357 // NextHopIPAddress - The IP address of the next hop of the effective route. 5358 NextHopIPAddress *[]string `json:"nextHopIpAddress,omitempty"` 5359 // NextHopType - The type of Azure hop the packet should be sent to. Possible values are: 'VirtualNetworkGateway', 'VnetLocal', 'Internet', 'VirtualAppliance', and 'None'. Possible values include: 'RouteNextHopTypeVirtualNetworkGateway', 'RouteNextHopTypeVnetLocal', 'RouteNextHopTypeInternet', 'RouteNextHopTypeVirtualAppliance', 'RouteNextHopTypeNone' 5360 NextHopType RouteNextHopType `json:"nextHopType,omitempty"` 5361} 5362 5363// EffectiveRouteListResult response for list effective route API service call. 5364type EffectiveRouteListResult struct { 5365 autorest.Response `json:"-"` 5366 // Value - A list of effective routes. 5367 Value *[]EffectiveRoute `json:"value,omitempty"` 5368 // NextLink - READ-ONLY; The URL to get the next set of results. 5369 NextLink *string `json:"nextLink,omitempty"` 5370} 5371 5372// EndpointServiceResult endpoint service. 5373type EndpointServiceResult struct { 5374 // Name - READ-ONLY; Name of the endpoint service. 5375 Name *string `json:"name,omitempty"` 5376 // Type - READ-ONLY; Type of the endpoint service. 5377 Type *string `json:"type,omitempty"` 5378 // ID - Resource ID. 5379 ID *string `json:"id,omitempty"` 5380} 5381 5382// EndpointServicesListResult response for the ListAvailableEndpointServices API service call. 5383type EndpointServicesListResult struct { 5384 autorest.Response `json:"-"` 5385 // Value - List of available endpoint services in a region. 5386 Value *[]EndpointServiceResult `json:"value,omitempty"` 5387 // NextLink - The URL to get the next set of results. 5388 NextLink *string `json:"nextLink,omitempty"` 5389} 5390 5391// EndpointServicesListResultIterator provides access to a complete listing of EndpointServiceResult 5392// values. 5393type EndpointServicesListResultIterator struct { 5394 i int 5395 page EndpointServicesListResultPage 5396} 5397 5398// NextWithContext advances to the next value. If there was an error making 5399// the request the iterator does not advance and the error is returned. 5400func (iter *EndpointServicesListResultIterator) NextWithContext(ctx context.Context) (err error) { 5401 if tracing.IsEnabled() { 5402 ctx = tracing.StartSpan(ctx, fqdn+"/EndpointServicesListResultIterator.NextWithContext") 5403 defer func() { 5404 sc := -1 5405 if iter.Response().Response.Response != nil { 5406 sc = iter.Response().Response.Response.StatusCode 5407 } 5408 tracing.EndSpan(ctx, sc, err) 5409 }() 5410 } 5411 iter.i++ 5412 if iter.i < len(iter.page.Values()) { 5413 return nil 5414 } 5415 err = iter.page.NextWithContext(ctx) 5416 if err != nil { 5417 iter.i-- 5418 return err 5419 } 5420 iter.i = 0 5421 return nil 5422} 5423 5424// Next advances to the next value. If there was an error making 5425// the request the iterator does not advance and the error is returned. 5426// Deprecated: Use NextWithContext() instead. 5427func (iter *EndpointServicesListResultIterator) Next() error { 5428 return iter.NextWithContext(context.Background()) 5429} 5430 5431// NotDone returns true if the enumeration should be started or is not yet complete. 5432func (iter EndpointServicesListResultIterator) NotDone() bool { 5433 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 5434} 5435 5436// Response returns the raw server response from the last page request. 5437func (iter EndpointServicesListResultIterator) Response() EndpointServicesListResult { 5438 return iter.page.Response() 5439} 5440 5441// Value returns the current value or a zero-initialized value if the 5442// iterator has advanced beyond the end of the collection. 5443func (iter EndpointServicesListResultIterator) Value() EndpointServiceResult { 5444 if !iter.page.NotDone() { 5445 return EndpointServiceResult{} 5446 } 5447 return iter.page.Values()[iter.i] 5448} 5449 5450// Creates a new instance of the EndpointServicesListResultIterator type. 5451func NewEndpointServicesListResultIterator(page EndpointServicesListResultPage) EndpointServicesListResultIterator { 5452 return EndpointServicesListResultIterator{page: page} 5453} 5454 5455// IsEmpty returns true if the ListResult contains no values. 5456func (eslr EndpointServicesListResult) IsEmpty() bool { 5457 return eslr.Value == nil || len(*eslr.Value) == 0 5458} 5459 5460// endpointServicesListResultPreparer prepares a request to retrieve the next set of results. 5461// It returns nil if no more results exist. 5462func (eslr EndpointServicesListResult) endpointServicesListResultPreparer(ctx context.Context) (*http.Request, error) { 5463 if eslr.NextLink == nil || len(to.String(eslr.NextLink)) < 1 { 5464 return nil, nil 5465 } 5466 return autorest.Prepare((&http.Request{}).WithContext(ctx), 5467 autorest.AsJSON(), 5468 autorest.AsGet(), 5469 autorest.WithBaseURL(to.String(eslr.NextLink))) 5470} 5471 5472// EndpointServicesListResultPage contains a page of EndpointServiceResult values. 5473type EndpointServicesListResultPage struct { 5474 fn func(context.Context, EndpointServicesListResult) (EndpointServicesListResult, error) 5475 eslr EndpointServicesListResult 5476} 5477 5478// NextWithContext advances to the next page of values. If there was an error making 5479// the request the page does not advance and the error is returned. 5480func (page *EndpointServicesListResultPage) NextWithContext(ctx context.Context) (err error) { 5481 if tracing.IsEnabled() { 5482 ctx = tracing.StartSpan(ctx, fqdn+"/EndpointServicesListResultPage.NextWithContext") 5483 defer func() { 5484 sc := -1 5485 if page.Response().Response.Response != nil { 5486 sc = page.Response().Response.Response.StatusCode 5487 } 5488 tracing.EndSpan(ctx, sc, err) 5489 }() 5490 } 5491 next, err := page.fn(ctx, page.eslr) 5492 if err != nil { 5493 return err 5494 } 5495 page.eslr = next 5496 return nil 5497} 5498 5499// Next advances to the next page of values. If there was an error making 5500// the request the page does not advance and the error is returned. 5501// Deprecated: Use NextWithContext() instead. 5502func (page *EndpointServicesListResultPage) Next() error { 5503 return page.NextWithContext(context.Background()) 5504} 5505 5506// NotDone returns true if the page enumeration should be started or is not yet complete. 5507func (page EndpointServicesListResultPage) NotDone() bool { 5508 return !page.eslr.IsEmpty() 5509} 5510 5511// Response returns the raw server response from the last page request. 5512func (page EndpointServicesListResultPage) Response() EndpointServicesListResult { 5513 return page.eslr 5514} 5515 5516// Values returns the slice of values for the current page or nil if there are no values. 5517func (page EndpointServicesListResultPage) Values() []EndpointServiceResult { 5518 if page.eslr.IsEmpty() { 5519 return nil 5520 } 5521 return *page.eslr.Value 5522} 5523 5524// Creates a new instance of the EndpointServicesListResultPage type. 5525func NewEndpointServicesListResultPage(getNextPage func(context.Context, EndpointServicesListResult) (EndpointServicesListResult, error)) EndpointServicesListResultPage { 5526 return EndpointServicesListResultPage{fn: getNextPage} 5527} 5528 5529// Error ... 5530type Error struct { 5531 Code *string `json:"code,omitempty"` 5532 Message *string `json:"message,omitempty"` 5533 Target *string `json:"target,omitempty"` 5534 Details *[]ErrorDetails `json:"details,omitempty"` 5535 InnerError *string `json:"innerError,omitempty"` 5536} 5537 5538// ErrorDetails ... 5539type ErrorDetails struct { 5540 Code *string `json:"code,omitempty"` 5541 Target *string `json:"target,omitempty"` 5542 Message *string `json:"message,omitempty"` 5543} 5544 5545// ExpressRouteCircuit expressRouteCircuit resource 5546type ExpressRouteCircuit struct { 5547 autorest.Response `json:"-"` 5548 // Sku - The SKU. 5549 Sku *ExpressRouteCircuitSku `json:"sku,omitempty"` 5550 *ExpressRouteCircuitPropertiesFormat `json:"properties,omitempty"` 5551 // Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated. 5552 Etag *string `json:"etag,omitempty"` 5553 // ID - Resource ID. 5554 ID *string `json:"id,omitempty"` 5555 // Name - READ-ONLY; Resource name. 5556 Name *string `json:"name,omitempty"` 5557 // Type - READ-ONLY; Resource type. 5558 Type *string `json:"type,omitempty"` 5559 // Location - Resource location. 5560 Location *string `json:"location,omitempty"` 5561 // Tags - Resource tags. 5562 Tags map[string]*string `json:"tags"` 5563} 5564 5565// MarshalJSON is the custom marshaler for ExpressRouteCircuit. 5566func (erc ExpressRouteCircuit) MarshalJSON() ([]byte, error) { 5567 objectMap := make(map[string]interface{}) 5568 if erc.Sku != nil { 5569 objectMap["sku"] = erc.Sku 5570 } 5571 if erc.ExpressRouteCircuitPropertiesFormat != nil { 5572 objectMap["properties"] = erc.ExpressRouteCircuitPropertiesFormat 5573 } 5574 if erc.ID != nil { 5575 objectMap["id"] = erc.ID 5576 } 5577 if erc.Location != nil { 5578 objectMap["location"] = erc.Location 5579 } 5580 if erc.Tags != nil { 5581 objectMap["tags"] = erc.Tags 5582 } 5583 return json.Marshal(objectMap) 5584} 5585 5586// UnmarshalJSON is the custom unmarshaler for ExpressRouteCircuit struct. 5587func (erc *ExpressRouteCircuit) UnmarshalJSON(body []byte) error { 5588 var m map[string]*json.RawMessage 5589 err := json.Unmarshal(body, &m) 5590 if err != nil { 5591 return err 5592 } 5593 for k, v := range m { 5594 switch k { 5595 case "sku": 5596 if v != nil { 5597 var sku ExpressRouteCircuitSku 5598 err = json.Unmarshal(*v, &sku) 5599 if err != nil { 5600 return err 5601 } 5602 erc.Sku = &sku 5603 } 5604 case "properties": 5605 if v != nil { 5606 var expressRouteCircuitPropertiesFormat ExpressRouteCircuitPropertiesFormat 5607 err = json.Unmarshal(*v, &expressRouteCircuitPropertiesFormat) 5608 if err != nil { 5609 return err 5610 } 5611 erc.ExpressRouteCircuitPropertiesFormat = &expressRouteCircuitPropertiesFormat 5612 } 5613 case "etag": 5614 if v != nil { 5615 var etag string 5616 err = json.Unmarshal(*v, &etag) 5617 if err != nil { 5618 return err 5619 } 5620 erc.Etag = &etag 5621 } 5622 case "id": 5623 if v != nil { 5624 var ID string 5625 err = json.Unmarshal(*v, &ID) 5626 if err != nil { 5627 return err 5628 } 5629 erc.ID = &ID 5630 } 5631 case "name": 5632 if v != nil { 5633 var name string 5634 err = json.Unmarshal(*v, &name) 5635 if err != nil { 5636 return err 5637 } 5638 erc.Name = &name 5639 } 5640 case "type": 5641 if v != nil { 5642 var typeVar string 5643 err = json.Unmarshal(*v, &typeVar) 5644 if err != nil { 5645 return err 5646 } 5647 erc.Type = &typeVar 5648 } 5649 case "location": 5650 if v != nil { 5651 var location string 5652 err = json.Unmarshal(*v, &location) 5653 if err != nil { 5654 return err 5655 } 5656 erc.Location = &location 5657 } 5658 case "tags": 5659 if v != nil { 5660 var tags map[string]*string 5661 err = json.Unmarshal(*v, &tags) 5662 if err != nil { 5663 return err 5664 } 5665 erc.Tags = tags 5666 } 5667 } 5668 } 5669 5670 return nil 5671} 5672 5673// ExpressRouteCircuitArpTable the ARP table associated with the ExpressRouteCircuit. 5674type ExpressRouteCircuitArpTable struct { 5675 // Age - Age 5676 Age *int32 `json:"age,omitempty"` 5677 // Interface - Interface 5678 Interface *string `json:"interface,omitempty"` 5679 // IPAddress - The IP address. 5680 IPAddress *string `json:"ipAddress,omitempty"` 5681 // MacAddress - The MAC address. 5682 MacAddress *string `json:"macAddress,omitempty"` 5683} 5684 5685// ExpressRouteCircuitAuthorization authorization in an ExpressRouteCircuit resource. 5686type ExpressRouteCircuitAuthorization struct { 5687 autorest.Response `json:"-"` 5688 *AuthorizationPropertiesFormat `json:"properties,omitempty"` 5689 // Name - Gets name of the resource that is unique within a resource group. This name can be used to access the resource. 5690 Name *string `json:"name,omitempty"` 5691 // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated. 5692 Etag *string `json:"etag,omitempty"` 5693 // ID - Resource ID. 5694 ID *string `json:"id,omitempty"` 5695} 5696 5697// MarshalJSON is the custom marshaler for ExpressRouteCircuitAuthorization. 5698func (erca ExpressRouteCircuitAuthorization) MarshalJSON() ([]byte, error) { 5699 objectMap := make(map[string]interface{}) 5700 if erca.AuthorizationPropertiesFormat != nil { 5701 objectMap["properties"] = erca.AuthorizationPropertiesFormat 5702 } 5703 if erca.Name != nil { 5704 objectMap["name"] = erca.Name 5705 } 5706 if erca.ID != nil { 5707 objectMap["id"] = erca.ID 5708 } 5709 return json.Marshal(objectMap) 5710} 5711 5712// UnmarshalJSON is the custom unmarshaler for ExpressRouteCircuitAuthorization struct. 5713func (erca *ExpressRouteCircuitAuthorization) UnmarshalJSON(body []byte) error { 5714 var m map[string]*json.RawMessage 5715 err := json.Unmarshal(body, &m) 5716 if err != nil { 5717 return err 5718 } 5719 for k, v := range m { 5720 switch k { 5721 case "properties": 5722 if v != nil { 5723 var authorizationPropertiesFormat AuthorizationPropertiesFormat 5724 err = json.Unmarshal(*v, &authorizationPropertiesFormat) 5725 if err != nil { 5726 return err 5727 } 5728 erca.AuthorizationPropertiesFormat = &authorizationPropertiesFormat 5729 } 5730 case "name": 5731 if v != nil { 5732 var name string 5733 err = json.Unmarshal(*v, &name) 5734 if err != nil { 5735 return err 5736 } 5737 erca.Name = &name 5738 } 5739 case "etag": 5740 if v != nil { 5741 var etag string 5742 err = json.Unmarshal(*v, &etag) 5743 if err != nil { 5744 return err 5745 } 5746 erca.Etag = &etag 5747 } 5748 case "id": 5749 if v != nil { 5750 var ID string 5751 err = json.Unmarshal(*v, &ID) 5752 if err != nil { 5753 return err 5754 } 5755 erca.ID = &ID 5756 } 5757 } 5758 } 5759 5760 return nil 5761} 5762 5763// ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture an abstraction for monitoring and retrieving the 5764// results of a long-running operation. 5765type ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture struct { 5766 azure.Future 5767} 5768 5769// Result returns the result of the asynchronous operation. 5770// If the operation has not completed it will return an error. 5771func (future *ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture) Result(client ExpressRouteCircuitAuthorizationsClient) (erca ExpressRouteCircuitAuthorization, err error) { 5772 var done bool 5773 done, err = future.DoneWithContext(context.Background(), client) 5774 if err != nil { 5775 err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") 5776 return 5777 } 5778 if !done { 5779 err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture") 5780 return 5781 } 5782 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 5783 if erca.Response.Response, err = future.GetResult(sender); err == nil && erca.Response.Response.StatusCode != http.StatusNoContent { 5784 erca, err = client.CreateOrUpdateResponder(erca.Response.Response) 5785 if err != nil { 5786 err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture", "Result", erca.Response.Response, "Failure responding to request") 5787 } 5788 } 5789 return 5790} 5791 5792// ExpressRouteCircuitAuthorizationsDeleteFuture an abstraction for monitoring and retrieving the results 5793// of a long-running operation. 5794type ExpressRouteCircuitAuthorizationsDeleteFuture struct { 5795 azure.Future 5796} 5797 5798// Result returns the result of the asynchronous operation. 5799// If the operation has not completed it will return an error. 5800func (future *ExpressRouteCircuitAuthorizationsDeleteFuture) Result(client ExpressRouteCircuitAuthorizationsClient) (ar autorest.Response, err error) { 5801 var done bool 5802 done, err = future.DoneWithContext(context.Background(), client) 5803 if err != nil { 5804 err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitAuthorizationsDeleteFuture", "Result", future.Response(), "Polling failure") 5805 return 5806 } 5807 if !done { 5808 err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitAuthorizationsDeleteFuture") 5809 return 5810 } 5811 ar.Response = future.Response() 5812 return 5813} 5814 5815// ExpressRouteCircuitListResult response for ListExpressRouteCircuit API service call. 5816type ExpressRouteCircuitListResult struct { 5817 autorest.Response `json:"-"` 5818 // Value - A list of ExpressRouteCircuits in a resource group. 5819 Value *[]ExpressRouteCircuit `json:"value,omitempty"` 5820 // NextLink - The URL to get the next set of results. 5821 NextLink *string `json:"nextLink,omitempty"` 5822} 5823 5824// ExpressRouteCircuitListResultIterator provides access to a complete listing of ExpressRouteCircuit 5825// values. 5826type ExpressRouteCircuitListResultIterator struct { 5827 i int 5828 page ExpressRouteCircuitListResultPage 5829} 5830 5831// NextWithContext advances to the next value. If there was an error making 5832// the request the iterator does not advance and the error is returned. 5833func (iter *ExpressRouteCircuitListResultIterator) NextWithContext(ctx context.Context) (err error) { 5834 if tracing.IsEnabled() { 5835 ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitListResultIterator.NextWithContext") 5836 defer func() { 5837 sc := -1 5838 if iter.Response().Response.Response != nil { 5839 sc = iter.Response().Response.Response.StatusCode 5840 } 5841 tracing.EndSpan(ctx, sc, err) 5842 }() 5843 } 5844 iter.i++ 5845 if iter.i < len(iter.page.Values()) { 5846 return nil 5847 } 5848 err = iter.page.NextWithContext(ctx) 5849 if err != nil { 5850 iter.i-- 5851 return err 5852 } 5853 iter.i = 0 5854 return nil 5855} 5856 5857// Next advances to the next value. If there was an error making 5858// the request the iterator does not advance and the error is returned. 5859// Deprecated: Use NextWithContext() instead. 5860func (iter *ExpressRouteCircuitListResultIterator) Next() error { 5861 return iter.NextWithContext(context.Background()) 5862} 5863 5864// NotDone returns true if the enumeration should be started or is not yet complete. 5865func (iter ExpressRouteCircuitListResultIterator) NotDone() bool { 5866 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 5867} 5868 5869// Response returns the raw server response from the last page request. 5870func (iter ExpressRouteCircuitListResultIterator) Response() ExpressRouteCircuitListResult { 5871 return iter.page.Response() 5872} 5873 5874// Value returns the current value or a zero-initialized value if the 5875// iterator has advanced beyond the end of the collection. 5876func (iter ExpressRouteCircuitListResultIterator) Value() ExpressRouteCircuit { 5877 if !iter.page.NotDone() { 5878 return ExpressRouteCircuit{} 5879 } 5880 return iter.page.Values()[iter.i] 5881} 5882 5883// Creates a new instance of the ExpressRouteCircuitListResultIterator type. 5884func NewExpressRouteCircuitListResultIterator(page ExpressRouteCircuitListResultPage) ExpressRouteCircuitListResultIterator { 5885 return ExpressRouteCircuitListResultIterator{page: page} 5886} 5887 5888// IsEmpty returns true if the ListResult contains no values. 5889func (erclr ExpressRouteCircuitListResult) IsEmpty() bool { 5890 return erclr.Value == nil || len(*erclr.Value) == 0 5891} 5892 5893// expressRouteCircuitListResultPreparer prepares a request to retrieve the next set of results. 5894// It returns nil if no more results exist. 5895func (erclr ExpressRouteCircuitListResult) expressRouteCircuitListResultPreparer(ctx context.Context) (*http.Request, error) { 5896 if erclr.NextLink == nil || len(to.String(erclr.NextLink)) < 1 { 5897 return nil, nil 5898 } 5899 return autorest.Prepare((&http.Request{}).WithContext(ctx), 5900 autorest.AsJSON(), 5901 autorest.AsGet(), 5902 autorest.WithBaseURL(to.String(erclr.NextLink))) 5903} 5904 5905// ExpressRouteCircuitListResultPage contains a page of ExpressRouteCircuit values. 5906type ExpressRouteCircuitListResultPage struct { 5907 fn func(context.Context, ExpressRouteCircuitListResult) (ExpressRouteCircuitListResult, error) 5908 erclr ExpressRouteCircuitListResult 5909} 5910 5911// NextWithContext advances to the next page of values. If there was an error making 5912// the request the page does not advance and the error is returned. 5913func (page *ExpressRouteCircuitListResultPage) NextWithContext(ctx context.Context) (err error) { 5914 if tracing.IsEnabled() { 5915 ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitListResultPage.NextWithContext") 5916 defer func() { 5917 sc := -1 5918 if page.Response().Response.Response != nil { 5919 sc = page.Response().Response.Response.StatusCode 5920 } 5921 tracing.EndSpan(ctx, sc, err) 5922 }() 5923 } 5924 next, err := page.fn(ctx, page.erclr) 5925 if err != nil { 5926 return err 5927 } 5928 page.erclr = next 5929 return nil 5930} 5931 5932// Next advances to the next page of values. If there was an error making 5933// the request the page does not advance and the error is returned. 5934// Deprecated: Use NextWithContext() instead. 5935func (page *ExpressRouteCircuitListResultPage) Next() error { 5936 return page.NextWithContext(context.Background()) 5937} 5938 5939// NotDone returns true if the page enumeration should be started or is not yet complete. 5940func (page ExpressRouteCircuitListResultPage) NotDone() bool { 5941 return !page.erclr.IsEmpty() 5942} 5943 5944// Response returns the raw server response from the last page request. 5945func (page ExpressRouteCircuitListResultPage) Response() ExpressRouteCircuitListResult { 5946 return page.erclr 5947} 5948 5949// Values returns the slice of values for the current page or nil if there are no values. 5950func (page ExpressRouteCircuitListResultPage) Values() []ExpressRouteCircuit { 5951 if page.erclr.IsEmpty() { 5952 return nil 5953 } 5954 return *page.erclr.Value 5955} 5956 5957// Creates a new instance of the ExpressRouteCircuitListResultPage type. 5958func NewExpressRouteCircuitListResultPage(getNextPage func(context.Context, ExpressRouteCircuitListResult) (ExpressRouteCircuitListResult, error)) ExpressRouteCircuitListResultPage { 5959 return ExpressRouteCircuitListResultPage{fn: getNextPage} 5960} 5961 5962// ExpressRouteCircuitPeering peering in an ExpressRouteCircuit resource. 5963type ExpressRouteCircuitPeering struct { 5964 autorest.Response `json:"-"` 5965 *ExpressRouteCircuitPeeringPropertiesFormat `json:"properties,omitempty"` 5966 // Name - Gets name of the resource that is unique within a resource group. This name can be used to access the resource. 5967 Name *string `json:"name,omitempty"` 5968 // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated. 5969 Etag *string `json:"etag,omitempty"` 5970 // ID - Resource ID. 5971 ID *string `json:"id,omitempty"` 5972} 5973 5974// MarshalJSON is the custom marshaler for ExpressRouteCircuitPeering. 5975func (ercp ExpressRouteCircuitPeering) MarshalJSON() ([]byte, error) { 5976 objectMap := make(map[string]interface{}) 5977 if ercp.ExpressRouteCircuitPeeringPropertiesFormat != nil { 5978 objectMap["properties"] = ercp.ExpressRouteCircuitPeeringPropertiesFormat 5979 } 5980 if ercp.Name != nil { 5981 objectMap["name"] = ercp.Name 5982 } 5983 if ercp.ID != nil { 5984 objectMap["id"] = ercp.ID 5985 } 5986 return json.Marshal(objectMap) 5987} 5988 5989// UnmarshalJSON is the custom unmarshaler for ExpressRouteCircuitPeering struct. 5990func (ercp *ExpressRouteCircuitPeering) UnmarshalJSON(body []byte) error { 5991 var m map[string]*json.RawMessage 5992 err := json.Unmarshal(body, &m) 5993 if err != nil { 5994 return err 5995 } 5996 for k, v := range m { 5997 switch k { 5998 case "properties": 5999 if v != nil { 6000 var expressRouteCircuitPeeringPropertiesFormat ExpressRouteCircuitPeeringPropertiesFormat 6001 err = json.Unmarshal(*v, &expressRouteCircuitPeeringPropertiesFormat) 6002 if err != nil { 6003 return err 6004 } 6005 ercp.ExpressRouteCircuitPeeringPropertiesFormat = &expressRouteCircuitPeeringPropertiesFormat 6006 } 6007 case "name": 6008 if v != nil { 6009 var name string 6010 err = json.Unmarshal(*v, &name) 6011 if err != nil { 6012 return err 6013 } 6014 ercp.Name = &name 6015 } 6016 case "etag": 6017 if v != nil { 6018 var etag string 6019 err = json.Unmarshal(*v, &etag) 6020 if err != nil { 6021 return err 6022 } 6023 ercp.Etag = &etag 6024 } 6025 case "id": 6026 if v != nil { 6027 var ID string 6028 err = json.Unmarshal(*v, &ID) 6029 if err != nil { 6030 return err 6031 } 6032 ercp.ID = &ID 6033 } 6034 } 6035 } 6036 6037 return nil 6038} 6039 6040// ExpressRouteCircuitPeeringConfig specifies the peering configuration. 6041type ExpressRouteCircuitPeeringConfig struct { 6042 // AdvertisedPublicPrefixes - The reference of AdvertisedPublicPrefixes. 6043 AdvertisedPublicPrefixes *[]string `json:"advertisedPublicPrefixes,omitempty"` 6044 // AdvertisedCommunities - The communities of bgp peering. Specified for microsoft peering 6045 AdvertisedCommunities *[]string `json:"advertisedCommunities,omitempty"` 6046 // AdvertisedPublicPrefixesState - AdvertisedPublicPrefixState of the Peering resource. Possible values are 'NotConfigured', 'Configuring', 'Configured', and 'ValidationNeeded'. Possible values include: 'NotConfigured', 'Configuring', 'Configured', 'ValidationNeeded' 6047 AdvertisedPublicPrefixesState ExpressRouteCircuitPeeringAdvertisedPublicPrefixState `json:"advertisedPublicPrefixesState,omitempty"` 6048 // LegacyMode - The legacy mode of the peering. 6049 LegacyMode *int32 `json:"legacyMode,omitempty"` 6050 // CustomerASN - The CustomerASN of the peering. 6051 CustomerASN *int32 `json:"customerASN,omitempty"` 6052 // RoutingRegistryName - The RoutingRegistryName of the configuration. 6053 RoutingRegistryName *string `json:"routingRegistryName,omitempty"` 6054} 6055 6056// ExpressRouteCircuitPeeringListResult response for ListPeering API service call retrieves all peerings 6057// that belong to an ExpressRouteCircuit. 6058type ExpressRouteCircuitPeeringListResult struct { 6059 autorest.Response `json:"-"` 6060 // Value - The peerings in an express route circuit. 6061 Value *[]ExpressRouteCircuitPeering `json:"value,omitempty"` 6062 // NextLink - The URL to get the next set of results. 6063 NextLink *string `json:"nextLink,omitempty"` 6064} 6065 6066// ExpressRouteCircuitPeeringListResultIterator provides access to a complete listing of 6067// ExpressRouteCircuitPeering values. 6068type ExpressRouteCircuitPeeringListResultIterator struct { 6069 i int 6070 page ExpressRouteCircuitPeeringListResultPage 6071} 6072 6073// NextWithContext advances to the next value. If there was an error making 6074// the request the iterator does not advance and the error is returned. 6075func (iter *ExpressRouteCircuitPeeringListResultIterator) NextWithContext(ctx context.Context) (err error) { 6076 if tracing.IsEnabled() { 6077 ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitPeeringListResultIterator.NextWithContext") 6078 defer func() { 6079 sc := -1 6080 if iter.Response().Response.Response != nil { 6081 sc = iter.Response().Response.Response.StatusCode 6082 } 6083 tracing.EndSpan(ctx, sc, err) 6084 }() 6085 } 6086 iter.i++ 6087 if iter.i < len(iter.page.Values()) { 6088 return nil 6089 } 6090 err = iter.page.NextWithContext(ctx) 6091 if err != nil { 6092 iter.i-- 6093 return err 6094 } 6095 iter.i = 0 6096 return nil 6097} 6098 6099// Next advances to the next value. If there was an error making 6100// the request the iterator does not advance and the error is returned. 6101// Deprecated: Use NextWithContext() instead. 6102func (iter *ExpressRouteCircuitPeeringListResultIterator) Next() error { 6103 return iter.NextWithContext(context.Background()) 6104} 6105 6106// NotDone returns true if the enumeration should be started or is not yet complete. 6107func (iter ExpressRouteCircuitPeeringListResultIterator) NotDone() bool { 6108 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 6109} 6110 6111// Response returns the raw server response from the last page request. 6112func (iter ExpressRouteCircuitPeeringListResultIterator) Response() ExpressRouteCircuitPeeringListResult { 6113 return iter.page.Response() 6114} 6115 6116// Value returns the current value or a zero-initialized value if the 6117// iterator has advanced beyond the end of the collection. 6118func (iter ExpressRouteCircuitPeeringListResultIterator) Value() ExpressRouteCircuitPeering { 6119 if !iter.page.NotDone() { 6120 return ExpressRouteCircuitPeering{} 6121 } 6122 return iter.page.Values()[iter.i] 6123} 6124 6125// Creates a new instance of the ExpressRouteCircuitPeeringListResultIterator type. 6126func NewExpressRouteCircuitPeeringListResultIterator(page ExpressRouteCircuitPeeringListResultPage) ExpressRouteCircuitPeeringListResultIterator { 6127 return ExpressRouteCircuitPeeringListResultIterator{page: page} 6128} 6129 6130// IsEmpty returns true if the ListResult contains no values. 6131func (ercplr ExpressRouteCircuitPeeringListResult) IsEmpty() bool { 6132 return ercplr.Value == nil || len(*ercplr.Value) == 0 6133} 6134 6135// expressRouteCircuitPeeringListResultPreparer prepares a request to retrieve the next set of results. 6136// It returns nil if no more results exist. 6137func (ercplr ExpressRouteCircuitPeeringListResult) expressRouteCircuitPeeringListResultPreparer(ctx context.Context) (*http.Request, error) { 6138 if ercplr.NextLink == nil || len(to.String(ercplr.NextLink)) < 1 { 6139 return nil, nil 6140 } 6141 return autorest.Prepare((&http.Request{}).WithContext(ctx), 6142 autorest.AsJSON(), 6143 autorest.AsGet(), 6144 autorest.WithBaseURL(to.String(ercplr.NextLink))) 6145} 6146 6147// ExpressRouteCircuitPeeringListResultPage contains a page of ExpressRouteCircuitPeering values. 6148type ExpressRouteCircuitPeeringListResultPage struct { 6149 fn func(context.Context, ExpressRouteCircuitPeeringListResult) (ExpressRouteCircuitPeeringListResult, error) 6150 ercplr ExpressRouteCircuitPeeringListResult 6151} 6152 6153// NextWithContext advances to the next page of values. If there was an error making 6154// the request the page does not advance and the error is returned. 6155func (page *ExpressRouteCircuitPeeringListResultPage) NextWithContext(ctx context.Context) (err error) { 6156 if tracing.IsEnabled() { 6157 ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitPeeringListResultPage.NextWithContext") 6158 defer func() { 6159 sc := -1 6160 if page.Response().Response.Response != nil { 6161 sc = page.Response().Response.Response.StatusCode 6162 } 6163 tracing.EndSpan(ctx, sc, err) 6164 }() 6165 } 6166 next, err := page.fn(ctx, page.ercplr) 6167 if err != nil { 6168 return err 6169 } 6170 page.ercplr = next 6171 return nil 6172} 6173 6174// Next advances to the next page of values. If there was an error making 6175// the request the page does not advance and the error is returned. 6176// Deprecated: Use NextWithContext() instead. 6177func (page *ExpressRouteCircuitPeeringListResultPage) Next() error { 6178 return page.NextWithContext(context.Background()) 6179} 6180 6181// NotDone returns true if the page enumeration should be started or is not yet complete. 6182func (page ExpressRouteCircuitPeeringListResultPage) NotDone() bool { 6183 return !page.ercplr.IsEmpty() 6184} 6185 6186// Response returns the raw server response from the last page request. 6187func (page ExpressRouteCircuitPeeringListResultPage) Response() ExpressRouteCircuitPeeringListResult { 6188 return page.ercplr 6189} 6190 6191// Values returns the slice of values for the current page or nil if there are no values. 6192func (page ExpressRouteCircuitPeeringListResultPage) Values() []ExpressRouteCircuitPeering { 6193 if page.ercplr.IsEmpty() { 6194 return nil 6195 } 6196 return *page.ercplr.Value 6197} 6198 6199// Creates a new instance of the ExpressRouteCircuitPeeringListResultPage type. 6200func NewExpressRouteCircuitPeeringListResultPage(getNextPage func(context.Context, ExpressRouteCircuitPeeringListResult) (ExpressRouteCircuitPeeringListResult, error)) ExpressRouteCircuitPeeringListResultPage { 6201 return ExpressRouteCircuitPeeringListResultPage{fn: getNextPage} 6202} 6203 6204// ExpressRouteCircuitPeeringPropertiesFormat ... 6205type ExpressRouteCircuitPeeringPropertiesFormat struct { 6206 // PeeringType - The PeeringType. Possible values are: 'AzurePublicPeering', 'AzurePrivatePeering', and 'MicrosoftPeering'. Possible values include: 'AzurePublicPeering', 'AzurePrivatePeering', 'MicrosoftPeering' 6207 PeeringType ExpressRouteCircuitPeeringType `json:"peeringType,omitempty"` 6208 // State - The state of peering. Possible values are: 'Disabled' and 'Enabled'. Possible values include: 'ExpressRouteCircuitPeeringStateDisabled', 'ExpressRouteCircuitPeeringStateEnabled' 6209 State ExpressRouteCircuitPeeringState `json:"state,omitempty"` 6210 // AzureASN - The Azure ASN. 6211 AzureASN *int32 `json:"azureASN,omitempty"` 6212 // PeerASN - The peer ASN. 6213 PeerASN *int64 `json:"peerASN,omitempty"` 6214 // PrimaryPeerAddressPrefix - The primary address prefix. 6215 PrimaryPeerAddressPrefix *string `json:"primaryPeerAddressPrefix,omitempty"` 6216 // SecondaryPeerAddressPrefix - The secondary address prefix. 6217 SecondaryPeerAddressPrefix *string `json:"secondaryPeerAddressPrefix,omitempty"` 6218 // PrimaryAzurePort - The primary port. 6219 PrimaryAzurePort *string `json:"primaryAzurePort,omitempty"` 6220 // SecondaryAzurePort - The secondary port. 6221 SecondaryAzurePort *string `json:"secondaryAzurePort,omitempty"` 6222 // SharedKey - The shared key. 6223 SharedKey *string `json:"sharedKey,omitempty"` 6224 // VlanID - The VLAN ID. 6225 VlanID *int32 `json:"vlanId,omitempty"` 6226 // MicrosoftPeeringConfig - The Microsoft peering configuration. 6227 MicrosoftPeeringConfig *ExpressRouteCircuitPeeringConfig `json:"microsoftPeeringConfig,omitempty"` 6228 // Stats - Gets peering stats. 6229 Stats *ExpressRouteCircuitStats `json:"stats,omitempty"` 6230 // ProvisioningState - Gets the provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. 6231 ProvisioningState *string `json:"provisioningState,omitempty"` 6232 // GatewayManagerEtag - The GatewayManager Etag. 6233 GatewayManagerEtag *string `json:"gatewayManagerEtag,omitempty"` 6234 // LastModifiedBy - Gets whether the provider or the customer last modified the peering. 6235 LastModifiedBy *string `json:"lastModifiedBy,omitempty"` 6236 // RouteFilter - The reference of the RouteFilter resource. 6237 RouteFilter *RouteFilter `json:"routeFilter,omitempty"` 6238 // Ipv6PeeringConfig - The IPv6 peering configuration. 6239 Ipv6PeeringConfig *Ipv6ExpressRouteCircuitPeeringConfig `json:"ipv6PeeringConfig,omitempty"` 6240} 6241 6242// ExpressRouteCircuitPeeringsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results 6243// of a long-running operation. 6244type ExpressRouteCircuitPeeringsCreateOrUpdateFuture struct { 6245 azure.Future 6246} 6247 6248// Result returns the result of the asynchronous operation. 6249// If the operation has not completed it will return an error. 6250func (future *ExpressRouteCircuitPeeringsCreateOrUpdateFuture) Result(client ExpressRouteCircuitPeeringsClient) (ercp ExpressRouteCircuitPeering, err error) { 6251 var done bool 6252 done, err = future.DoneWithContext(context.Background(), client) 6253 if err != nil { 6254 err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitPeeringsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") 6255 return 6256 } 6257 if !done { 6258 err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitPeeringsCreateOrUpdateFuture") 6259 return 6260 } 6261 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 6262 if ercp.Response.Response, err = future.GetResult(sender); err == nil && ercp.Response.Response.StatusCode != http.StatusNoContent { 6263 ercp, err = client.CreateOrUpdateResponder(ercp.Response.Response) 6264 if err != nil { 6265 err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitPeeringsCreateOrUpdateFuture", "Result", ercp.Response.Response, "Failure responding to request") 6266 } 6267 } 6268 return 6269} 6270 6271// ExpressRouteCircuitPeeringsDeleteFuture an abstraction for monitoring and retrieving the results of a 6272// long-running operation. 6273type ExpressRouteCircuitPeeringsDeleteFuture struct { 6274 azure.Future 6275} 6276 6277// Result returns the result of the asynchronous operation. 6278// If the operation has not completed it will return an error. 6279func (future *ExpressRouteCircuitPeeringsDeleteFuture) Result(client ExpressRouteCircuitPeeringsClient) (ar autorest.Response, err error) { 6280 var done bool 6281 done, err = future.DoneWithContext(context.Background(), client) 6282 if err != nil { 6283 err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitPeeringsDeleteFuture", "Result", future.Response(), "Polling failure") 6284 return 6285 } 6286 if !done { 6287 err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitPeeringsDeleteFuture") 6288 return 6289 } 6290 ar.Response = future.Response() 6291 return 6292} 6293 6294// ExpressRouteCircuitPropertiesFormat properties of ExpressRouteCircuit. 6295type ExpressRouteCircuitPropertiesFormat struct { 6296 // AllowClassicOperations - Allow classic operations 6297 AllowClassicOperations *bool `json:"allowClassicOperations,omitempty"` 6298 // CircuitProvisioningState - The CircuitProvisioningState state of the resource. 6299 CircuitProvisioningState *string `json:"circuitProvisioningState,omitempty"` 6300 // ServiceProviderProvisioningState - The ServiceProviderProvisioningState state of the resource. Possible values are 'NotProvisioned', 'Provisioning', 'Provisioned', and 'Deprovisioning'. Possible values include: 'NotProvisioned', 'Provisioning', 'Provisioned', 'Deprovisioning' 6301 ServiceProviderProvisioningState ServiceProviderProvisioningState `json:"serviceProviderProvisioningState,omitempty"` 6302 // Authorizations - The list of authorizations. 6303 Authorizations *[]ExpressRouteCircuitAuthorization `json:"authorizations,omitempty"` 6304 // Peerings - The list of peerings. 6305 Peerings *[]ExpressRouteCircuitPeering `json:"peerings,omitempty"` 6306 // ServiceKey - The ServiceKey. 6307 ServiceKey *string `json:"serviceKey,omitempty"` 6308 // ServiceProviderNotes - The ServiceProviderNotes. 6309 ServiceProviderNotes *string `json:"serviceProviderNotes,omitempty"` 6310 // ServiceProviderProperties - The ServiceProviderProperties. 6311 ServiceProviderProperties *ExpressRouteCircuitServiceProviderProperties `json:"serviceProviderProperties,omitempty"` 6312 // ProvisioningState - Gets the provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. 6313 ProvisioningState *string `json:"provisioningState,omitempty"` 6314 // GatewayManagerEtag - The GatewayManager Etag. 6315 GatewayManagerEtag *string `json:"gatewayManagerEtag,omitempty"` 6316} 6317 6318// ExpressRouteCircuitRoutesTable the routes table associated with the ExpressRouteCircuit 6319type ExpressRouteCircuitRoutesTable struct { 6320 // NetworkProperty - network 6321 NetworkProperty *string `json:"network,omitempty"` 6322 // NextHop - nextHop 6323 NextHop *string `json:"nextHop,omitempty"` 6324 // LocPrf - locPrf 6325 LocPrf *string `json:"locPrf,omitempty"` 6326 // Weight - weight. 6327 Weight *int32 `json:"weight,omitempty"` 6328 // Path - path 6329 Path *string `json:"path,omitempty"` 6330} 6331 6332// ExpressRouteCircuitRoutesTableSummary the routes table associated with the ExpressRouteCircuit. 6333type ExpressRouteCircuitRoutesTableSummary struct { 6334 // Neighbor - Neighbor 6335 Neighbor *string `json:"neighbor,omitempty"` 6336 // V - BGP version number spoken to the neighbor. 6337 V *int32 `json:"v,omitempty"` 6338 // As - Autonomous system number. 6339 As *int32 `json:"as,omitempty"` 6340 // 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. 6341 UpDown *string `json:"upDown,omitempty"` 6342 // StatePfxRcd - Current state of the BGP session, and the number of prefixes that have been received from a neighbor or peer group. 6343 StatePfxRcd *string `json:"statePfxRcd,omitempty"` 6344} 6345 6346// ExpressRouteCircuitsArpTableListResult response for ListArpTable associated with the Express Route 6347// Circuits API. 6348type ExpressRouteCircuitsArpTableListResult struct { 6349 autorest.Response `json:"-"` 6350 // Value - Gets list of the ARP table. 6351 Value *[]ExpressRouteCircuitArpTable `json:"value,omitempty"` 6352 // NextLink - The URL to get the next set of results. 6353 NextLink *string `json:"nextLink,omitempty"` 6354} 6355 6356// ExpressRouteCircuitsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a 6357// long-running operation. 6358type ExpressRouteCircuitsCreateOrUpdateFuture struct { 6359 azure.Future 6360} 6361 6362// Result returns the result of the asynchronous operation. 6363// If the operation has not completed it will return an error. 6364func (future *ExpressRouteCircuitsCreateOrUpdateFuture) Result(client ExpressRouteCircuitsClient) (erc ExpressRouteCircuit, err error) { 6365 var done bool 6366 done, err = future.DoneWithContext(context.Background(), client) 6367 if err != nil { 6368 err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") 6369 return 6370 } 6371 if !done { 6372 err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsCreateOrUpdateFuture") 6373 return 6374 } 6375 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 6376 if erc.Response.Response, err = future.GetResult(sender); err == nil && erc.Response.Response.StatusCode != http.StatusNoContent { 6377 erc, err = client.CreateOrUpdateResponder(erc.Response.Response) 6378 if err != nil { 6379 err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsCreateOrUpdateFuture", "Result", erc.Response.Response, "Failure responding to request") 6380 } 6381 } 6382 return 6383} 6384 6385// ExpressRouteCircuitsDeleteFuture an abstraction for monitoring and retrieving the results of a 6386// long-running operation. 6387type ExpressRouteCircuitsDeleteFuture struct { 6388 azure.Future 6389} 6390 6391// Result returns the result of the asynchronous operation. 6392// If the operation has not completed it will return an error. 6393func (future *ExpressRouteCircuitsDeleteFuture) Result(client ExpressRouteCircuitsClient) (ar autorest.Response, err error) { 6394 var done bool 6395 done, err = future.DoneWithContext(context.Background(), client) 6396 if err != nil { 6397 err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsDeleteFuture", "Result", future.Response(), "Polling failure") 6398 return 6399 } 6400 if !done { 6401 err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsDeleteFuture") 6402 return 6403 } 6404 ar.Response = future.Response() 6405 return 6406} 6407 6408// ExpressRouteCircuitServiceProviderProperties contains ServiceProviderProperties in an 6409// ExpressRouteCircuit. 6410type ExpressRouteCircuitServiceProviderProperties struct { 6411 // ServiceProviderName - The serviceProviderName. 6412 ServiceProviderName *string `json:"serviceProviderName,omitempty"` 6413 // PeeringLocation - The peering location. 6414 PeeringLocation *string `json:"peeringLocation,omitempty"` 6415 // BandwidthInMbps - The BandwidthInMbps. 6416 BandwidthInMbps *int32 `json:"bandwidthInMbps,omitempty"` 6417} 6418 6419// ExpressRouteCircuitSku contains SKU in an ExpressRouteCircuit. 6420type ExpressRouteCircuitSku struct { 6421 // Name - The name of the SKU. 6422 Name *string `json:"name,omitempty"` 6423 // Tier - The tier of the SKU. Possible values are 'Standard' and 'Premium'. Possible values include: 'ExpressRouteCircuitSkuTierStandard', 'ExpressRouteCircuitSkuTierPremium' 6424 Tier ExpressRouteCircuitSkuTier `json:"tier,omitempty"` 6425 // Family - The family of the SKU. Possible values are: 'UnlimitedData' and 'MeteredData'. Possible values include: 'UnlimitedData', 'MeteredData' 6426 Family ExpressRouteCircuitSkuFamily `json:"family,omitempty"` 6427} 6428 6429// ExpressRouteCircuitsListArpTableFuture an abstraction for monitoring and retrieving the results of a 6430// long-running operation. 6431type ExpressRouteCircuitsListArpTableFuture struct { 6432 azure.Future 6433} 6434 6435// Result returns the result of the asynchronous operation. 6436// If the operation has not completed it will return an error. 6437func (future *ExpressRouteCircuitsListArpTableFuture) Result(client ExpressRouteCircuitsClient) (ercatlr ExpressRouteCircuitsArpTableListResult, err error) { 6438 var done bool 6439 done, err = future.DoneWithContext(context.Background(), client) 6440 if err != nil { 6441 err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListArpTableFuture", "Result", future.Response(), "Polling failure") 6442 return 6443 } 6444 if !done { 6445 err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsListArpTableFuture") 6446 return 6447 } 6448 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 6449 if ercatlr.Response.Response, err = future.GetResult(sender); err == nil && ercatlr.Response.Response.StatusCode != http.StatusNoContent { 6450 ercatlr, err = client.ListArpTableResponder(ercatlr.Response.Response) 6451 if err != nil { 6452 err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListArpTableFuture", "Result", ercatlr.Response.Response, "Failure responding to request") 6453 } 6454 } 6455 return 6456} 6457 6458// ExpressRouteCircuitsListRoutesTableFuture an abstraction for monitoring and retrieving the results of a 6459// long-running operation. 6460type ExpressRouteCircuitsListRoutesTableFuture struct { 6461 azure.Future 6462} 6463 6464// Result returns the result of the asynchronous operation. 6465// If the operation has not completed it will return an error. 6466func (future *ExpressRouteCircuitsListRoutesTableFuture) Result(client ExpressRouteCircuitsClient) (ercrtlr ExpressRouteCircuitsRoutesTableListResult, err error) { 6467 var done bool 6468 done, err = future.DoneWithContext(context.Background(), client) 6469 if err != nil { 6470 err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListRoutesTableFuture", "Result", future.Response(), "Polling failure") 6471 return 6472 } 6473 if !done { 6474 err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsListRoutesTableFuture") 6475 return 6476 } 6477 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 6478 if ercrtlr.Response.Response, err = future.GetResult(sender); err == nil && ercrtlr.Response.Response.StatusCode != http.StatusNoContent { 6479 ercrtlr, err = client.ListRoutesTableResponder(ercrtlr.Response.Response) 6480 if err != nil { 6481 err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListRoutesTableFuture", "Result", ercrtlr.Response.Response, "Failure responding to request") 6482 } 6483 } 6484 return 6485} 6486 6487// ExpressRouteCircuitsListRoutesTableSummaryFuture an abstraction for monitoring and retrieving the 6488// results of a long-running operation. 6489type ExpressRouteCircuitsListRoutesTableSummaryFuture struct { 6490 azure.Future 6491} 6492 6493// Result returns the result of the asynchronous operation. 6494// If the operation has not completed it will return an error. 6495func (future *ExpressRouteCircuitsListRoutesTableSummaryFuture) Result(client ExpressRouteCircuitsClient) (ercrtslr ExpressRouteCircuitsRoutesTableSummaryListResult, err error) { 6496 var done bool 6497 done, err = future.DoneWithContext(context.Background(), client) 6498 if err != nil { 6499 err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListRoutesTableSummaryFuture", "Result", future.Response(), "Polling failure") 6500 return 6501 } 6502 if !done { 6503 err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsListRoutesTableSummaryFuture") 6504 return 6505 } 6506 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 6507 if ercrtslr.Response.Response, err = future.GetResult(sender); err == nil && ercrtslr.Response.Response.StatusCode != http.StatusNoContent { 6508 ercrtslr, err = client.ListRoutesTableSummaryResponder(ercrtslr.Response.Response) 6509 if err != nil { 6510 err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListRoutesTableSummaryFuture", "Result", ercrtslr.Response.Response, "Failure responding to request") 6511 } 6512 } 6513 return 6514} 6515 6516// ExpressRouteCircuitsRoutesTableListResult response for ListRoutesTable associated with the Express Route 6517// Circuits API. 6518type ExpressRouteCircuitsRoutesTableListResult struct { 6519 autorest.Response `json:"-"` 6520 // Value - The list of routes table. 6521 Value *[]ExpressRouteCircuitRoutesTable `json:"value,omitempty"` 6522 // NextLink - The URL to get the next set of results. 6523 NextLink *string `json:"nextLink,omitempty"` 6524} 6525 6526// ExpressRouteCircuitsRoutesTableSummaryListResult response for ListRoutesTable associated with the 6527// Express Route Circuits API. 6528type ExpressRouteCircuitsRoutesTableSummaryListResult struct { 6529 autorest.Response `json:"-"` 6530 // Value - A list of the routes table. 6531 Value *[]ExpressRouteCircuitRoutesTableSummary `json:"value,omitempty"` 6532 // NextLink - The URL to get the next set of results. 6533 NextLink *string `json:"nextLink,omitempty"` 6534} 6535 6536// ExpressRouteCircuitStats contains stats associated with the peering. 6537type ExpressRouteCircuitStats struct { 6538 autorest.Response `json:"-"` 6539 // PrimarybytesIn - Gets BytesIn of the peering. 6540 PrimarybytesIn *int64 `json:"primarybytesIn,omitempty"` 6541 // PrimarybytesOut - Gets BytesOut of the peering. 6542 PrimarybytesOut *int64 `json:"primarybytesOut,omitempty"` 6543 // SecondarybytesIn - Gets BytesIn of the peering. 6544 SecondarybytesIn *int64 `json:"secondarybytesIn,omitempty"` 6545 // SecondarybytesOut - Gets BytesOut of the peering. 6546 SecondarybytesOut *int64 `json:"secondarybytesOut,omitempty"` 6547} 6548 6549// ExpressRouteCircuitsUpdateTagsFuture an abstraction for monitoring and retrieving the results of a 6550// long-running operation. 6551type ExpressRouteCircuitsUpdateTagsFuture struct { 6552 azure.Future 6553} 6554 6555// Result returns the result of the asynchronous operation. 6556// If the operation has not completed it will return an error. 6557func (future *ExpressRouteCircuitsUpdateTagsFuture) Result(client ExpressRouteCircuitsClient) (erc ExpressRouteCircuit, err error) { 6558 var done bool 6559 done, err = future.DoneWithContext(context.Background(), client) 6560 if err != nil { 6561 err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsUpdateTagsFuture", "Result", future.Response(), "Polling failure") 6562 return 6563 } 6564 if !done { 6565 err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsUpdateTagsFuture") 6566 return 6567 } 6568 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 6569 if erc.Response.Response, err = future.GetResult(sender); err == nil && erc.Response.Response.StatusCode != http.StatusNoContent { 6570 erc, err = client.UpdateTagsResponder(erc.Response.Response) 6571 if err != nil { 6572 err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsUpdateTagsFuture", "Result", erc.Response.Response, "Failure responding to request") 6573 } 6574 } 6575 return 6576} 6577 6578// ExpressRouteServiceProvider a ExpressRouteResourceProvider object. 6579type ExpressRouteServiceProvider struct { 6580 *ExpressRouteServiceProviderPropertiesFormat `json:"properties,omitempty"` 6581 // ID - Resource ID. 6582 ID *string `json:"id,omitempty"` 6583 // Name - READ-ONLY; Resource name. 6584 Name *string `json:"name,omitempty"` 6585 // Type - READ-ONLY; Resource type. 6586 Type *string `json:"type,omitempty"` 6587 // Location - Resource location. 6588 Location *string `json:"location,omitempty"` 6589 // Tags - Resource tags. 6590 Tags map[string]*string `json:"tags"` 6591} 6592 6593// MarshalJSON is the custom marshaler for ExpressRouteServiceProvider. 6594func (ersp ExpressRouteServiceProvider) MarshalJSON() ([]byte, error) { 6595 objectMap := make(map[string]interface{}) 6596 if ersp.ExpressRouteServiceProviderPropertiesFormat != nil { 6597 objectMap["properties"] = ersp.ExpressRouteServiceProviderPropertiesFormat 6598 } 6599 if ersp.ID != nil { 6600 objectMap["id"] = ersp.ID 6601 } 6602 if ersp.Location != nil { 6603 objectMap["location"] = ersp.Location 6604 } 6605 if ersp.Tags != nil { 6606 objectMap["tags"] = ersp.Tags 6607 } 6608 return json.Marshal(objectMap) 6609} 6610 6611// UnmarshalJSON is the custom unmarshaler for ExpressRouteServiceProvider struct. 6612func (ersp *ExpressRouteServiceProvider) UnmarshalJSON(body []byte) error { 6613 var m map[string]*json.RawMessage 6614 err := json.Unmarshal(body, &m) 6615 if err != nil { 6616 return err 6617 } 6618 for k, v := range m { 6619 switch k { 6620 case "properties": 6621 if v != nil { 6622 var expressRouteServiceProviderPropertiesFormat ExpressRouteServiceProviderPropertiesFormat 6623 err = json.Unmarshal(*v, &expressRouteServiceProviderPropertiesFormat) 6624 if err != nil { 6625 return err 6626 } 6627 ersp.ExpressRouteServiceProviderPropertiesFormat = &expressRouteServiceProviderPropertiesFormat 6628 } 6629 case "id": 6630 if v != nil { 6631 var ID string 6632 err = json.Unmarshal(*v, &ID) 6633 if err != nil { 6634 return err 6635 } 6636 ersp.ID = &ID 6637 } 6638 case "name": 6639 if v != nil { 6640 var name string 6641 err = json.Unmarshal(*v, &name) 6642 if err != nil { 6643 return err 6644 } 6645 ersp.Name = &name 6646 } 6647 case "type": 6648 if v != nil { 6649 var typeVar string 6650 err = json.Unmarshal(*v, &typeVar) 6651 if err != nil { 6652 return err 6653 } 6654 ersp.Type = &typeVar 6655 } 6656 case "location": 6657 if v != nil { 6658 var location string 6659 err = json.Unmarshal(*v, &location) 6660 if err != nil { 6661 return err 6662 } 6663 ersp.Location = &location 6664 } 6665 case "tags": 6666 if v != nil { 6667 var tags map[string]*string 6668 err = json.Unmarshal(*v, &tags) 6669 if err != nil { 6670 return err 6671 } 6672 ersp.Tags = tags 6673 } 6674 } 6675 } 6676 6677 return nil 6678} 6679 6680// ExpressRouteServiceProviderBandwidthsOffered contains bandwidths offered in ExpressRouteServiceProvider 6681// resources. 6682type ExpressRouteServiceProviderBandwidthsOffered struct { 6683 // OfferName - The OfferName. 6684 OfferName *string `json:"offerName,omitempty"` 6685 // ValueInMbps - The ValueInMbps. 6686 ValueInMbps *int32 `json:"valueInMbps,omitempty"` 6687} 6688 6689// ExpressRouteServiceProviderListResult response for the ListExpressRouteServiceProvider API service call. 6690type ExpressRouteServiceProviderListResult struct { 6691 autorest.Response `json:"-"` 6692 // Value - A list of ExpressRouteResourceProvider resources. 6693 Value *[]ExpressRouteServiceProvider `json:"value,omitempty"` 6694 // NextLink - The URL to get the next set of results. 6695 NextLink *string `json:"nextLink,omitempty"` 6696} 6697 6698// ExpressRouteServiceProviderListResultIterator provides access to a complete listing of 6699// ExpressRouteServiceProvider values. 6700type ExpressRouteServiceProviderListResultIterator struct { 6701 i int 6702 page ExpressRouteServiceProviderListResultPage 6703} 6704 6705// NextWithContext advances to the next value. If there was an error making 6706// the request the iterator does not advance and the error is returned. 6707func (iter *ExpressRouteServiceProviderListResultIterator) NextWithContext(ctx context.Context) (err error) { 6708 if tracing.IsEnabled() { 6709 ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteServiceProviderListResultIterator.NextWithContext") 6710 defer func() { 6711 sc := -1 6712 if iter.Response().Response.Response != nil { 6713 sc = iter.Response().Response.Response.StatusCode 6714 } 6715 tracing.EndSpan(ctx, sc, err) 6716 }() 6717 } 6718 iter.i++ 6719 if iter.i < len(iter.page.Values()) { 6720 return nil 6721 } 6722 err = iter.page.NextWithContext(ctx) 6723 if err != nil { 6724 iter.i-- 6725 return err 6726 } 6727 iter.i = 0 6728 return nil 6729} 6730 6731// Next advances to the next value. If there was an error making 6732// the request the iterator does not advance and the error is returned. 6733// Deprecated: Use NextWithContext() instead. 6734func (iter *ExpressRouteServiceProviderListResultIterator) Next() error { 6735 return iter.NextWithContext(context.Background()) 6736} 6737 6738// NotDone returns true if the enumeration should be started or is not yet complete. 6739func (iter ExpressRouteServiceProviderListResultIterator) NotDone() bool { 6740 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 6741} 6742 6743// Response returns the raw server response from the last page request. 6744func (iter ExpressRouteServiceProviderListResultIterator) Response() ExpressRouteServiceProviderListResult { 6745 return iter.page.Response() 6746} 6747 6748// Value returns the current value or a zero-initialized value if the 6749// iterator has advanced beyond the end of the collection. 6750func (iter ExpressRouteServiceProviderListResultIterator) Value() ExpressRouteServiceProvider { 6751 if !iter.page.NotDone() { 6752 return ExpressRouteServiceProvider{} 6753 } 6754 return iter.page.Values()[iter.i] 6755} 6756 6757// Creates a new instance of the ExpressRouteServiceProviderListResultIterator type. 6758func NewExpressRouteServiceProviderListResultIterator(page ExpressRouteServiceProviderListResultPage) ExpressRouteServiceProviderListResultIterator { 6759 return ExpressRouteServiceProviderListResultIterator{page: page} 6760} 6761 6762// IsEmpty returns true if the ListResult contains no values. 6763func (ersplr ExpressRouteServiceProviderListResult) IsEmpty() bool { 6764 return ersplr.Value == nil || len(*ersplr.Value) == 0 6765} 6766 6767// expressRouteServiceProviderListResultPreparer prepares a request to retrieve the next set of results. 6768// It returns nil if no more results exist. 6769func (ersplr ExpressRouteServiceProviderListResult) expressRouteServiceProviderListResultPreparer(ctx context.Context) (*http.Request, error) { 6770 if ersplr.NextLink == nil || len(to.String(ersplr.NextLink)) < 1 { 6771 return nil, nil 6772 } 6773 return autorest.Prepare((&http.Request{}).WithContext(ctx), 6774 autorest.AsJSON(), 6775 autorest.AsGet(), 6776 autorest.WithBaseURL(to.String(ersplr.NextLink))) 6777} 6778 6779// ExpressRouteServiceProviderListResultPage contains a page of ExpressRouteServiceProvider values. 6780type ExpressRouteServiceProviderListResultPage struct { 6781 fn func(context.Context, ExpressRouteServiceProviderListResult) (ExpressRouteServiceProviderListResult, error) 6782 ersplr ExpressRouteServiceProviderListResult 6783} 6784 6785// NextWithContext advances to the next page of values. If there was an error making 6786// the request the page does not advance and the error is returned. 6787func (page *ExpressRouteServiceProviderListResultPage) NextWithContext(ctx context.Context) (err error) { 6788 if tracing.IsEnabled() { 6789 ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteServiceProviderListResultPage.NextWithContext") 6790 defer func() { 6791 sc := -1 6792 if page.Response().Response.Response != nil { 6793 sc = page.Response().Response.Response.StatusCode 6794 } 6795 tracing.EndSpan(ctx, sc, err) 6796 }() 6797 } 6798 next, err := page.fn(ctx, page.ersplr) 6799 if err != nil { 6800 return err 6801 } 6802 page.ersplr = next 6803 return nil 6804} 6805 6806// Next advances to the next page of values. If there was an error making 6807// the request the page does not advance and the error is returned. 6808// Deprecated: Use NextWithContext() instead. 6809func (page *ExpressRouteServiceProviderListResultPage) Next() error { 6810 return page.NextWithContext(context.Background()) 6811} 6812 6813// NotDone returns true if the page enumeration should be started or is not yet complete. 6814func (page ExpressRouteServiceProviderListResultPage) NotDone() bool { 6815 return !page.ersplr.IsEmpty() 6816} 6817 6818// Response returns the raw server response from the last page request. 6819func (page ExpressRouteServiceProviderListResultPage) Response() ExpressRouteServiceProviderListResult { 6820 return page.ersplr 6821} 6822 6823// Values returns the slice of values for the current page or nil if there are no values. 6824func (page ExpressRouteServiceProviderListResultPage) Values() []ExpressRouteServiceProvider { 6825 if page.ersplr.IsEmpty() { 6826 return nil 6827 } 6828 return *page.ersplr.Value 6829} 6830 6831// Creates a new instance of the ExpressRouteServiceProviderListResultPage type. 6832func NewExpressRouteServiceProviderListResultPage(getNextPage func(context.Context, ExpressRouteServiceProviderListResult) (ExpressRouteServiceProviderListResult, error)) ExpressRouteServiceProviderListResultPage { 6833 return ExpressRouteServiceProviderListResultPage{fn: getNextPage} 6834} 6835 6836// ExpressRouteServiceProviderPropertiesFormat properties of ExpressRouteServiceProvider. 6837type ExpressRouteServiceProviderPropertiesFormat struct { 6838 // PeeringLocations - Get a list of peering locations. 6839 PeeringLocations *[]string `json:"peeringLocations,omitempty"` 6840 // BandwidthsOffered - Gets bandwidths offered. 6841 BandwidthsOffered *[]ExpressRouteServiceProviderBandwidthsOffered `json:"bandwidthsOffered,omitempty"` 6842 // ProvisioningState - Gets the provisioning state of the resource. 6843 ProvisioningState *string `json:"provisioningState,omitempty"` 6844} 6845 6846// FlowLogInformation information on the configuration of flow log. 6847type FlowLogInformation struct { 6848 autorest.Response `json:"-"` 6849 // TargetResourceID - The ID of the resource to configure for flow logging. 6850 TargetResourceID *string `json:"targetResourceId,omitempty"` 6851 *FlowLogProperties `json:"properties,omitempty"` 6852} 6853 6854// MarshalJSON is the custom marshaler for FlowLogInformation. 6855func (fli FlowLogInformation) MarshalJSON() ([]byte, error) { 6856 objectMap := make(map[string]interface{}) 6857 if fli.TargetResourceID != nil { 6858 objectMap["targetResourceId"] = fli.TargetResourceID 6859 } 6860 if fli.FlowLogProperties != nil { 6861 objectMap["properties"] = fli.FlowLogProperties 6862 } 6863 return json.Marshal(objectMap) 6864} 6865 6866// UnmarshalJSON is the custom unmarshaler for FlowLogInformation struct. 6867func (fli *FlowLogInformation) UnmarshalJSON(body []byte) error { 6868 var m map[string]*json.RawMessage 6869 err := json.Unmarshal(body, &m) 6870 if err != nil { 6871 return err 6872 } 6873 for k, v := range m { 6874 switch k { 6875 case "targetResourceId": 6876 if v != nil { 6877 var targetResourceID string 6878 err = json.Unmarshal(*v, &targetResourceID) 6879 if err != nil { 6880 return err 6881 } 6882 fli.TargetResourceID = &targetResourceID 6883 } 6884 case "properties": 6885 if v != nil { 6886 var flowLogProperties FlowLogProperties 6887 err = json.Unmarshal(*v, &flowLogProperties) 6888 if err != nil { 6889 return err 6890 } 6891 fli.FlowLogProperties = &flowLogProperties 6892 } 6893 } 6894 } 6895 6896 return nil 6897} 6898 6899// FlowLogProperties parameters that define the configuration of flow log. 6900type FlowLogProperties struct { 6901 // StorageID - ID of the storage account which is used to store the flow log. 6902 StorageID *string `json:"storageId,omitempty"` 6903 // Enabled - Flag to enable/disable flow logging. 6904 Enabled *bool `json:"enabled,omitempty"` 6905 RetentionPolicy *RetentionPolicyParameters `json:"retentionPolicy,omitempty"` 6906} 6907 6908// FlowLogStatusParameters parameters that define a resource to query flow log status. 6909type FlowLogStatusParameters struct { 6910 // TargetResourceID - The target resource where getting the flow logging status. 6911 TargetResourceID *string `json:"targetResourceId,omitempty"` 6912} 6913 6914// FrontendIPConfiguration frontend IP address of the load balancer. 6915type FrontendIPConfiguration struct { 6916 autorest.Response `json:"-"` 6917 // FrontendIPConfigurationPropertiesFormat - Properties of the load balancer probe. 6918 *FrontendIPConfigurationPropertiesFormat `json:"properties,omitempty"` 6919 // Name - The name of the resource that is unique within a resource group. This name can be used to access the resource. 6920 Name *string `json:"name,omitempty"` 6921 // Etag - A unique read-only string that changes whenever the resource is updated. 6922 Etag *string `json:"etag,omitempty"` 6923 // Zones - A list of availability zones denoting the IP allocated for the resource needs to come from. 6924 Zones *[]string `json:"zones,omitempty"` 6925 // ID - Resource ID. 6926 ID *string `json:"id,omitempty"` 6927} 6928 6929// MarshalJSON is the custom marshaler for FrontendIPConfiguration. 6930func (fic FrontendIPConfiguration) MarshalJSON() ([]byte, error) { 6931 objectMap := make(map[string]interface{}) 6932 if fic.FrontendIPConfigurationPropertiesFormat != nil { 6933 objectMap["properties"] = fic.FrontendIPConfigurationPropertiesFormat 6934 } 6935 if fic.Name != nil { 6936 objectMap["name"] = fic.Name 6937 } 6938 if fic.Etag != nil { 6939 objectMap["etag"] = fic.Etag 6940 } 6941 if fic.Zones != nil { 6942 objectMap["zones"] = fic.Zones 6943 } 6944 if fic.ID != nil { 6945 objectMap["id"] = fic.ID 6946 } 6947 return json.Marshal(objectMap) 6948} 6949 6950// UnmarshalJSON is the custom unmarshaler for FrontendIPConfiguration struct. 6951func (fic *FrontendIPConfiguration) UnmarshalJSON(body []byte) error { 6952 var m map[string]*json.RawMessage 6953 err := json.Unmarshal(body, &m) 6954 if err != nil { 6955 return err 6956 } 6957 for k, v := range m { 6958 switch k { 6959 case "properties": 6960 if v != nil { 6961 var frontendIPConfigurationPropertiesFormat FrontendIPConfigurationPropertiesFormat 6962 err = json.Unmarshal(*v, &frontendIPConfigurationPropertiesFormat) 6963 if err != nil { 6964 return err 6965 } 6966 fic.FrontendIPConfigurationPropertiesFormat = &frontendIPConfigurationPropertiesFormat 6967 } 6968 case "name": 6969 if v != nil { 6970 var name string 6971 err = json.Unmarshal(*v, &name) 6972 if err != nil { 6973 return err 6974 } 6975 fic.Name = &name 6976 } 6977 case "etag": 6978 if v != nil { 6979 var etag string 6980 err = json.Unmarshal(*v, &etag) 6981 if err != nil { 6982 return err 6983 } 6984 fic.Etag = &etag 6985 } 6986 case "zones": 6987 if v != nil { 6988 var zones []string 6989 err = json.Unmarshal(*v, &zones) 6990 if err != nil { 6991 return err 6992 } 6993 fic.Zones = &zones 6994 } 6995 case "id": 6996 if v != nil { 6997 var ID string 6998 err = json.Unmarshal(*v, &ID) 6999 if err != nil { 7000 return err 7001 } 7002 fic.ID = &ID 7003 } 7004 } 7005 } 7006 7007 return nil 7008} 7009 7010// FrontendIPConfigurationPropertiesFormat properties of Frontend IP Configuration of the load balancer. 7011type FrontendIPConfigurationPropertiesFormat struct { 7012 // InboundNatRules - READ-ONLY; Read only. Inbound rules URIs that use this frontend IP. 7013 InboundNatRules *[]SubResource `json:"inboundNatRules,omitempty"` 7014 // InboundNatPools - READ-ONLY; Read only. Inbound pools URIs that use this frontend IP. 7015 InboundNatPools *[]SubResource `json:"inboundNatPools,omitempty"` 7016 // OutboundNatRules - READ-ONLY; Read only. Outbound rules URIs that use this frontend IP. 7017 OutboundNatRules *[]SubResource `json:"outboundNatRules,omitempty"` 7018 // LoadBalancingRules - READ-ONLY; Gets load balancing rules URIs that use this frontend IP. 7019 LoadBalancingRules *[]SubResource `json:"loadBalancingRules,omitempty"` 7020 // PrivateIPAddress - The private IP address of the IP configuration. 7021 PrivateIPAddress *string `json:"privateIPAddress,omitempty"` 7022 // PrivateIPAllocationMethod - The Private IP allocation method. Possible values are: 'Static' and 'Dynamic'. Possible values include: 'Static', 'Dynamic' 7023 PrivateIPAllocationMethod IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"` 7024 // Subnet - The reference of the subnet resource. 7025 Subnet *Subnet `json:"subnet,omitempty"` 7026 // PublicIPAddress - The reference of the Public IP resource. 7027 PublicIPAddress *PublicIPAddress `json:"publicIPAddress,omitempty"` 7028 // ProvisioningState - Gets the provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. 7029 ProvisioningState *string `json:"provisioningState,omitempty"` 7030} 7031 7032// GatewayRoute gateway routing details 7033type GatewayRoute struct { 7034 // LocalAddress - READ-ONLY; The gateway's local address 7035 LocalAddress *string `json:"localAddress,omitempty"` 7036 // NetworkProperty - READ-ONLY; The route's network prefix 7037 NetworkProperty *string `json:"network,omitempty"` 7038 // NextHop - READ-ONLY; The route's next hop 7039 NextHop *string `json:"nextHop,omitempty"` 7040 // SourcePeer - READ-ONLY; The peer this route was learned from 7041 SourcePeer *string `json:"sourcePeer,omitempty"` 7042 // Origin - READ-ONLY; The source this route was learned from 7043 Origin *string `json:"origin,omitempty"` 7044 // AsPath - READ-ONLY; The route's AS path sequence 7045 AsPath *string `json:"asPath,omitempty"` 7046 // Weight - READ-ONLY; The route's weight 7047 Weight *int32 `json:"weight,omitempty"` 7048} 7049 7050// GatewayRouteListResult list of virtual network gateway routes 7051type GatewayRouteListResult struct { 7052 autorest.Response `json:"-"` 7053 // Value - List of gateway routes 7054 Value *[]GatewayRoute `json:"value,omitempty"` 7055} 7056 7057// InboundNatPool inbound NAT pool of the load balancer. 7058type InboundNatPool struct { 7059 // InboundNatPoolPropertiesFormat - Properties of load balancer inbound nat pool. 7060 *InboundNatPoolPropertiesFormat `json:"properties,omitempty"` 7061 // Name - The name of the resource that is unique within a resource group. This name can be used to access the resource. 7062 Name *string `json:"name,omitempty"` 7063 // Etag - A unique read-only string that changes whenever the resource is updated. 7064 Etag *string `json:"etag,omitempty"` 7065 // ID - Resource ID. 7066 ID *string `json:"id,omitempty"` 7067} 7068 7069// MarshalJSON is the custom marshaler for InboundNatPool. 7070func (inp InboundNatPool) MarshalJSON() ([]byte, error) { 7071 objectMap := make(map[string]interface{}) 7072 if inp.InboundNatPoolPropertiesFormat != nil { 7073 objectMap["properties"] = inp.InboundNatPoolPropertiesFormat 7074 } 7075 if inp.Name != nil { 7076 objectMap["name"] = inp.Name 7077 } 7078 if inp.Etag != nil { 7079 objectMap["etag"] = inp.Etag 7080 } 7081 if inp.ID != nil { 7082 objectMap["id"] = inp.ID 7083 } 7084 return json.Marshal(objectMap) 7085} 7086 7087// UnmarshalJSON is the custom unmarshaler for InboundNatPool struct. 7088func (inp *InboundNatPool) UnmarshalJSON(body []byte) error { 7089 var m map[string]*json.RawMessage 7090 err := json.Unmarshal(body, &m) 7091 if err != nil { 7092 return err 7093 } 7094 for k, v := range m { 7095 switch k { 7096 case "properties": 7097 if v != nil { 7098 var inboundNatPoolPropertiesFormat InboundNatPoolPropertiesFormat 7099 err = json.Unmarshal(*v, &inboundNatPoolPropertiesFormat) 7100 if err != nil { 7101 return err 7102 } 7103 inp.InboundNatPoolPropertiesFormat = &inboundNatPoolPropertiesFormat 7104 } 7105 case "name": 7106 if v != nil { 7107 var name string 7108 err = json.Unmarshal(*v, &name) 7109 if err != nil { 7110 return err 7111 } 7112 inp.Name = &name 7113 } 7114 case "etag": 7115 if v != nil { 7116 var etag string 7117 err = json.Unmarshal(*v, &etag) 7118 if err != nil { 7119 return err 7120 } 7121 inp.Etag = &etag 7122 } 7123 case "id": 7124 if v != nil { 7125 var ID string 7126 err = json.Unmarshal(*v, &ID) 7127 if err != nil { 7128 return err 7129 } 7130 inp.ID = &ID 7131 } 7132 } 7133 } 7134 7135 return nil 7136} 7137 7138// InboundNatPoolPropertiesFormat properties of Inbound NAT pool. 7139type InboundNatPoolPropertiesFormat struct { 7140 // FrontendIPConfiguration - A reference to frontend IP addresses. 7141 FrontendIPConfiguration *SubResource `json:"frontendIPConfiguration,omitempty"` 7142 // Protocol - Possible values include: 'TransportProtocolUDP', 'TransportProtocolTCP', 'TransportProtocolAll' 7143 Protocol TransportProtocol `json:"protocol,omitempty"` 7144 // FrontendPortRangeStart - The first port number in the range of external ports that will be used to provide Inbound Nat to NICs associated with a load balancer. Acceptable values range between 1 and 65534. 7145 FrontendPortRangeStart *int32 `json:"frontendPortRangeStart,omitempty"` 7146 // FrontendPortRangeEnd - The last port number in the range of external ports that will be used to provide Inbound Nat to NICs associated with a load balancer. Acceptable values range between 1 and 65535. 7147 FrontendPortRangeEnd *int32 `json:"frontendPortRangeEnd,omitempty"` 7148 // BackendPort - The port used for internal connections on the endpoint. Acceptable values are between 1 and 65535. 7149 BackendPort *int32 `json:"backendPort,omitempty"` 7150 // ProvisioningState - Gets the provisioning state of the PublicIP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. 7151 ProvisioningState *string `json:"provisioningState,omitempty"` 7152} 7153 7154// InboundNatRule inbound NAT rule of the load balancer. 7155type InboundNatRule struct { 7156 autorest.Response `json:"-"` 7157 // InboundNatRulePropertiesFormat - Properties of load balancer inbound nat rule. 7158 *InboundNatRulePropertiesFormat `json:"properties,omitempty"` 7159 // Name - Gets name of the resource that is unique within a resource group. This name can be used to access the resource. 7160 Name *string `json:"name,omitempty"` 7161 // Etag - A unique read-only string that changes whenever the resource is updated. 7162 Etag *string `json:"etag,omitempty"` 7163 // ID - Resource ID. 7164 ID *string `json:"id,omitempty"` 7165} 7166 7167// MarshalJSON is the custom marshaler for InboundNatRule. 7168func (inr InboundNatRule) MarshalJSON() ([]byte, error) { 7169 objectMap := make(map[string]interface{}) 7170 if inr.InboundNatRulePropertiesFormat != nil { 7171 objectMap["properties"] = inr.InboundNatRulePropertiesFormat 7172 } 7173 if inr.Name != nil { 7174 objectMap["name"] = inr.Name 7175 } 7176 if inr.Etag != nil { 7177 objectMap["etag"] = inr.Etag 7178 } 7179 if inr.ID != nil { 7180 objectMap["id"] = inr.ID 7181 } 7182 return json.Marshal(objectMap) 7183} 7184 7185// UnmarshalJSON is the custom unmarshaler for InboundNatRule struct. 7186func (inr *InboundNatRule) UnmarshalJSON(body []byte) error { 7187 var m map[string]*json.RawMessage 7188 err := json.Unmarshal(body, &m) 7189 if err != nil { 7190 return err 7191 } 7192 for k, v := range m { 7193 switch k { 7194 case "properties": 7195 if v != nil { 7196 var inboundNatRulePropertiesFormat InboundNatRulePropertiesFormat 7197 err = json.Unmarshal(*v, &inboundNatRulePropertiesFormat) 7198 if err != nil { 7199 return err 7200 } 7201 inr.InboundNatRulePropertiesFormat = &inboundNatRulePropertiesFormat 7202 } 7203 case "name": 7204 if v != nil { 7205 var name string 7206 err = json.Unmarshal(*v, &name) 7207 if err != nil { 7208 return err 7209 } 7210 inr.Name = &name 7211 } 7212 case "etag": 7213 if v != nil { 7214 var etag string 7215 err = json.Unmarshal(*v, &etag) 7216 if err != nil { 7217 return err 7218 } 7219 inr.Etag = &etag 7220 } 7221 case "id": 7222 if v != nil { 7223 var ID string 7224 err = json.Unmarshal(*v, &ID) 7225 if err != nil { 7226 return err 7227 } 7228 inr.ID = &ID 7229 } 7230 } 7231 } 7232 7233 return nil 7234} 7235 7236// InboundNatRuleListResult response for ListInboundNatRule API service call. 7237type InboundNatRuleListResult struct { 7238 autorest.Response `json:"-"` 7239 // Value - A list of inbound nat rules in a load balancer. 7240 Value *[]InboundNatRule `json:"value,omitempty"` 7241 // NextLink - READ-ONLY; The URL to get the next set of results. 7242 NextLink *string `json:"nextLink,omitempty"` 7243} 7244 7245// InboundNatRuleListResultIterator provides access to a complete listing of InboundNatRule values. 7246type InboundNatRuleListResultIterator struct { 7247 i int 7248 page InboundNatRuleListResultPage 7249} 7250 7251// NextWithContext advances to the next value. If there was an error making 7252// the request the iterator does not advance and the error is returned. 7253func (iter *InboundNatRuleListResultIterator) NextWithContext(ctx context.Context) (err error) { 7254 if tracing.IsEnabled() { 7255 ctx = tracing.StartSpan(ctx, fqdn+"/InboundNatRuleListResultIterator.NextWithContext") 7256 defer func() { 7257 sc := -1 7258 if iter.Response().Response.Response != nil { 7259 sc = iter.Response().Response.Response.StatusCode 7260 } 7261 tracing.EndSpan(ctx, sc, err) 7262 }() 7263 } 7264 iter.i++ 7265 if iter.i < len(iter.page.Values()) { 7266 return nil 7267 } 7268 err = iter.page.NextWithContext(ctx) 7269 if err != nil { 7270 iter.i-- 7271 return err 7272 } 7273 iter.i = 0 7274 return nil 7275} 7276 7277// Next advances to the next value. If there was an error making 7278// the request the iterator does not advance and the error is returned. 7279// Deprecated: Use NextWithContext() instead. 7280func (iter *InboundNatRuleListResultIterator) Next() error { 7281 return iter.NextWithContext(context.Background()) 7282} 7283 7284// NotDone returns true if the enumeration should be started or is not yet complete. 7285func (iter InboundNatRuleListResultIterator) NotDone() bool { 7286 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 7287} 7288 7289// Response returns the raw server response from the last page request. 7290func (iter InboundNatRuleListResultIterator) Response() InboundNatRuleListResult { 7291 return iter.page.Response() 7292} 7293 7294// Value returns the current value or a zero-initialized value if the 7295// iterator has advanced beyond the end of the collection. 7296func (iter InboundNatRuleListResultIterator) Value() InboundNatRule { 7297 if !iter.page.NotDone() { 7298 return InboundNatRule{} 7299 } 7300 return iter.page.Values()[iter.i] 7301} 7302 7303// Creates a new instance of the InboundNatRuleListResultIterator type. 7304func NewInboundNatRuleListResultIterator(page InboundNatRuleListResultPage) InboundNatRuleListResultIterator { 7305 return InboundNatRuleListResultIterator{page: page} 7306} 7307 7308// IsEmpty returns true if the ListResult contains no values. 7309func (inrlr InboundNatRuleListResult) IsEmpty() bool { 7310 return inrlr.Value == nil || len(*inrlr.Value) == 0 7311} 7312 7313// inboundNatRuleListResultPreparer prepares a request to retrieve the next set of results. 7314// It returns nil if no more results exist. 7315func (inrlr InboundNatRuleListResult) inboundNatRuleListResultPreparer(ctx context.Context) (*http.Request, error) { 7316 if inrlr.NextLink == nil || len(to.String(inrlr.NextLink)) < 1 { 7317 return nil, nil 7318 } 7319 return autorest.Prepare((&http.Request{}).WithContext(ctx), 7320 autorest.AsJSON(), 7321 autorest.AsGet(), 7322 autorest.WithBaseURL(to.String(inrlr.NextLink))) 7323} 7324 7325// InboundNatRuleListResultPage contains a page of InboundNatRule values. 7326type InboundNatRuleListResultPage struct { 7327 fn func(context.Context, InboundNatRuleListResult) (InboundNatRuleListResult, error) 7328 inrlr InboundNatRuleListResult 7329} 7330 7331// NextWithContext advances to the next page of values. If there was an error making 7332// the request the page does not advance and the error is returned. 7333func (page *InboundNatRuleListResultPage) NextWithContext(ctx context.Context) (err error) { 7334 if tracing.IsEnabled() { 7335 ctx = tracing.StartSpan(ctx, fqdn+"/InboundNatRuleListResultPage.NextWithContext") 7336 defer func() { 7337 sc := -1 7338 if page.Response().Response.Response != nil { 7339 sc = page.Response().Response.Response.StatusCode 7340 } 7341 tracing.EndSpan(ctx, sc, err) 7342 }() 7343 } 7344 next, err := page.fn(ctx, page.inrlr) 7345 if err != nil { 7346 return err 7347 } 7348 page.inrlr = next 7349 return nil 7350} 7351 7352// Next advances to the next page of values. If there was an error making 7353// the request the page does not advance and the error is returned. 7354// Deprecated: Use NextWithContext() instead. 7355func (page *InboundNatRuleListResultPage) Next() error { 7356 return page.NextWithContext(context.Background()) 7357} 7358 7359// NotDone returns true if the page enumeration should be started or is not yet complete. 7360func (page InboundNatRuleListResultPage) NotDone() bool { 7361 return !page.inrlr.IsEmpty() 7362} 7363 7364// Response returns the raw server response from the last page request. 7365func (page InboundNatRuleListResultPage) Response() InboundNatRuleListResult { 7366 return page.inrlr 7367} 7368 7369// Values returns the slice of values for the current page or nil if there are no values. 7370func (page InboundNatRuleListResultPage) Values() []InboundNatRule { 7371 if page.inrlr.IsEmpty() { 7372 return nil 7373 } 7374 return *page.inrlr.Value 7375} 7376 7377// Creates a new instance of the InboundNatRuleListResultPage type. 7378func NewInboundNatRuleListResultPage(getNextPage func(context.Context, InboundNatRuleListResult) (InboundNatRuleListResult, error)) InboundNatRuleListResultPage { 7379 return InboundNatRuleListResultPage{fn: getNextPage} 7380} 7381 7382// InboundNatRulePropertiesFormat properties of the inbound NAT rule. 7383type InboundNatRulePropertiesFormat struct { 7384 // FrontendIPConfiguration - A reference to frontend IP addresses. 7385 FrontendIPConfiguration *SubResource `json:"frontendIPConfiguration,omitempty"` 7386 // BackendIPConfiguration - READ-ONLY; A reference to a private IP address defined on a network interface of a VM. Traffic sent to the frontend port of each of the frontend IP configurations is forwarded to the backend IP. 7387 BackendIPConfiguration *InterfaceIPConfiguration `json:"backendIPConfiguration,omitempty"` 7388 // Protocol - Possible values include: 'TransportProtocolUDP', 'TransportProtocolTCP', 'TransportProtocolAll' 7389 Protocol TransportProtocol `json:"protocol,omitempty"` 7390 // FrontendPort - The port for the external endpoint. Port numbers for each rule must be unique within the Load Balancer. Acceptable values range from 1 to 65534. 7391 FrontendPort *int32 `json:"frontendPort,omitempty"` 7392 // BackendPort - The port used for the internal endpoint. Acceptable values range from 1 to 65535. 7393 BackendPort *int32 `json:"backendPort,omitempty"` 7394 // IdleTimeoutInMinutes - 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. 7395 IdleTimeoutInMinutes *int32 `json:"idleTimeoutInMinutes,omitempty"` 7396 // 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 AlwaysOn Availability Groups in SQL server. This setting can't be changed after you create the endpoint. 7397 EnableFloatingIP *bool `json:"enableFloatingIP,omitempty"` 7398 // ProvisioningState - Gets the provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. 7399 ProvisioningState *string `json:"provisioningState,omitempty"` 7400} 7401 7402// InboundNatRulesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a 7403// long-running operation. 7404type InboundNatRulesCreateOrUpdateFuture struct { 7405 azure.Future 7406} 7407 7408// Result returns the result of the asynchronous operation. 7409// If the operation has not completed it will return an error. 7410func (future *InboundNatRulesCreateOrUpdateFuture) Result(client InboundNatRulesClient) (inr InboundNatRule, err error) { 7411 var done bool 7412 done, err = future.DoneWithContext(context.Background(), client) 7413 if err != nil { 7414 err = autorest.NewErrorWithError(err, "network.InboundNatRulesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") 7415 return 7416 } 7417 if !done { 7418 err = azure.NewAsyncOpIncompleteError("network.InboundNatRulesCreateOrUpdateFuture") 7419 return 7420 } 7421 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 7422 if inr.Response.Response, err = future.GetResult(sender); err == nil && inr.Response.Response.StatusCode != http.StatusNoContent { 7423 inr, err = client.CreateOrUpdateResponder(inr.Response.Response) 7424 if err != nil { 7425 err = autorest.NewErrorWithError(err, "network.InboundNatRulesCreateOrUpdateFuture", "Result", inr.Response.Response, "Failure responding to request") 7426 } 7427 } 7428 return 7429} 7430 7431// InboundNatRulesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running 7432// operation. 7433type InboundNatRulesDeleteFuture struct { 7434 azure.Future 7435} 7436 7437// Result returns the result of the asynchronous operation. 7438// If the operation has not completed it will return an error. 7439func (future *InboundNatRulesDeleteFuture) Result(client InboundNatRulesClient) (ar autorest.Response, err error) { 7440 var done bool 7441 done, err = future.DoneWithContext(context.Background(), client) 7442 if err != nil { 7443 err = autorest.NewErrorWithError(err, "network.InboundNatRulesDeleteFuture", "Result", future.Response(), "Polling failure") 7444 return 7445 } 7446 if !done { 7447 err = azure.NewAsyncOpIncompleteError("network.InboundNatRulesDeleteFuture") 7448 return 7449 } 7450 ar.Response = future.Response() 7451 return 7452} 7453 7454// Interface a network interface in a resource group. 7455type Interface struct { 7456 autorest.Response `json:"-"` 7457 // InterfacePropertiesFormat - Properties of the network interface. 7458 *InterfacePropertiesFormat `json:"properties,omitempty"` 7459 // Etag - A unique read-only string that changes whenever the resource is updated. 7460 Etag *string `json:"etag,omitempty"` 7461 // ID - Resource ID. 7462 ID *string `json:"id,omitempty"` 7463 // Name - READ-ONLY; Resource name. 7464 Name *string `json:"name,omitempty"` 7465 // Type - READ-ONLY; Resource type. 7466 Type *string `json:"type,omitempty"` 7467 // Location - Resource location. 7468 Location *string `json:"location,omitempty"` 7469 // Tags - Resource tags. 7470 Tags map[string]*string `json:"tags"` 7471} 7472 7473// MarshalJSON is the custom marshaler for Interface. 7474func (i Interface) MarshalJSON() ([]byte, error) { 7475 objectMap := make(map[string]interface{}) 7476 if i.InterfacePropertiesFormat != nil { 7477 objectMap["properties"] = i.InterfacePropertiesFormat 7478 } 7479 if i.Etag != nil { 7480 objectMap["etag"] = i.Etag 7481 } 7482 if i.ID != nil { 7483 objectMap["id"] = i.ID 7484 } 7485 if i.Location != nil { 7486 objectMap["location"] = i.Location 7487 } 7488 if i.Tags != nil { 7489 objectMap["tags"] = i.Tags 7490 } 7491 return json.Marshal(objectMap) 7492} 7493 7494// UnmarshalJSON is the custom unmarshaler for Interface struct. 7495func (i *Interface) UnmarshalJSON(body []byte) error { 7496 var m map[string]*json.RawMessage 7497 err := json.Unmarshal(body, &m) 7498 if err != nil { 7499 return err 7500 } 7501 for k, v := range m { 7502 switch k { 7503 case "properties": 7504 if v != nil { 7505 var interfacePropertiesFormat InterfacePropertiesFormat 7506 err = json.Unmarshal(*v, &interfacePropertiesFormat) 7507 if err != nil { 7508 return err 7509 } 7510 i.InterfacePropertiesFormat = &interfacePropertiesFormat 7511 } 7512 case "etag": 7513 if v != nil { 7514 var etag string 7515 err = json.Unmarshal(*v, &etag) 7516 if err != nil { 7517 return err 7518 } 7519 i.Etag = &etag 7520 } 7521 case "id": 7522 if v != nil { 7523 var ID string 7524 err = json.Unmarshal(*v, &ID) 7525 if err != nil { 7526 return err 7527 } 7528 i.ID = &ID 7529 } 7530 case "name": 7531 if v != nil { 7532 var name string 7533 err = json.Unmarshal(*v, &name) 7534 if err != nil { 7535 return err 7536 } 7537 i.Name = &name 7538 } 7539 case "type": 7540 if v != nil { 7541 var typeVar string 7542 err = json.Unmarshal(*v, &typeVar) 7543 if err != nil { 7544 return err 7545 } 7546 i.Type = &typeVar 7547 } 7548 case "location": 7549 if v != nil { 7550 var location string 7551 err = json.Unmarshal(*v, &location) 7552 if err != nil { 7553 return err 7554 } 7555 i.Location = &location 7556 } 7557 case "tags": 7558 if v != nil { 7559 var tags map[string]*string 7560 err = json.Unmarshal(*v, &tags) 7561 if err != nil { 7562 return err 7563 } 7564 i.Tags = tags 7565 } 7566 } 7567 } 7568 7569 return nil 7570} 7571 7572// InterfaceAssociation network interface and its custom security rules. 7573type InterfaceAssociation struct { 7574 // ID - READ-ONLY; Network interface ID. 7575 ID *string `json:"id,omitempty"` 7576 // SecurityRules - Collection of custom security rules. 7577 SecurityRules *[]SecurityRule `json:"securityRules,omitempty"` 7578} 7579 7580// InterfaceDNSSettings DNS settings of a network interface. 7581type InterfaceDNSSettings struct { 7582 // DNSServers - List of DNS servers IP addresses. Use 'AzureProvidedDNS' to switch to azure provided DNS resolution. 'AzureProvidedDNS' value cannot be combined with other IPs, it must be the only value in dnsServers collection. 7583 DNSServers *[]string `json:"dnsServers,omitempty"` 7584 // AppliedDNSServers - If the VM that uses this NIC is part of an Availability Set, then this list will have the union of all DNS servers from all NICs that are part of the Availability Set. This property is what is configured on each of those VMs. 7585 AppliedDNSServers *[]string `json:"appliedDnsServers,omitempty"` 7586 // InternalDNSNameLabel - Relative DNS name for this NIC used for internal communications between VMs in the same virtual network. 7587 InternalDNSNameLabel *string `json:"internalDnsNameLabel,omitempty"` 7588 // InternalFqdn - Fully qualified DNS name supporting internal communications between VMs in the same virtual network. 7589 InternalFqdn *string `json:"internalFqdn,omitempty"` 7590 // InternalDomainNameSuffix - Even if internalDnsNameLabel is not specified, a DNS entry is created for the primary NIC of the VM. This DNS name can be constructed by concatenating the VM name with the value of internalDomainNameSuffix. 7591 InternalDomainNameSuffix *string `json:"internalDomainNameSuffix,omitempty"` 7592} 7593 7594// InterfaceIPConfiguration iPConfiguration in a network interface. 7595type InterfaceIPConfiguration struct { 7596 autorest.Response `json:"-"` 7597 // InterfaceIPConfigurationPropertiesFormat - Network interface IP configuration properties. 7598 *InterfaceIPConfigurationPropertiesFormat `json:"properties,omitempty"` 7599 // Name - The name of the resource that is unique within a resource group. This name can be used to access the resource. 7600 Name *string `json:"name,omitempty"` 7601 // Etag - A unique read-only string that changes whenever the resource is updated. 7602 Etag *string `json:"etag,omitempty"` 7603 // ID - Resource ID. 7604 ID *string `json:"id,omitempty"` 7605} 7606 7607// MarshalJSON is the custom marshaler for InterfaceIPConfiguration. 7608func (iic InterfaceIPConfiguration) MarshalJSON() ([]byte, error) { 7609 objectMap := make(map[string]interface{}) 7610 if iic.InterfaceIPConfigurationPropertiesFormat != nil { 7611 objectMap["properties"] = iic.InterfaceIPConfigurationPropertiesFormat 7612 } 7613 if iic.Name != nil { 7614 objectMap["name"] = iic.Name 7615 } 7616 if iic.Etag != nil { 7617 objectMap["etag"] = iic.Etag 7618 } 7619 if iic.ID != nil { 7620 objectMap["id"] = iic.ID 7621 } 7622 return json.Marshal(objectMap) 7623} 7624 7625// UnmarshalJSON is the custom unmarshaler for InterfaceIPConfiguration struct. 7626func (iic *InterfaceIPConfiguration) UnmarshalJSON(body []byte) error { 7627 var m map[string]*json.RawMessage 7628 err := json.Unmarshal(body, &m) 7629 if err != nil { 7630 return err 7631 } 7632 for k, v := range m { 7633 switch k { 7634 case "properties": 7635 if v != nil { 7636 var interfaceIPConfigurationPropertiesFormat InterfaceIPConfigurationPropertiesFormat 7637 err = json.Unmarshal(*v, &interfaceIPConfigurationPropertiesFormat) 7638 if err != nil { 7639 return err 7640 } 7641 iic.InterfaceIPConfigurationPropertiesFormat = &interfaceIPConfigurationPropertiesFormat 7642 } 7643 case "name": 7644 if v != nil { 7645 var name string 7646 err = json.Unmarshal(*v, &name) 7647 if err != nil { 7648 return err 7649 } 7650 iic.Name = &name 7651 } 7652 case "etag": 7653 if v != nil { 7654 var etag string 7655 err = json.Unmarshal(*v, &etag) 7656 if err != nil { 7657 return err 7658 } 7659 iic.Etag = &etag 7660 } 7661 case "id": 7662 if v != nil { 7663 var ID string 7664 err = json.Unmarshal(*v, &ID) 7665 if err != nil { 7666 return err 7667 } 7668 iic.ID = &ID 7669 } 7670 } 7671 } 7672 7673 return nil 7674} 7675 7676// InterfaceIPConfigurationListResult response for list ip configurations API service call. 7677type InterfaceIPConfigurationListResult struct { 7678 autorest.Response `json:"-"` 7679 // Value - A list of ip configurations. 7680 Value *[]InterfaceIPConfiguration `json:"value,omitempty"` 7681 // NextLink - READ-ONLY; The URL to get the next set of results. 7682 NextLink *string `json:"nextLink,omitempty"` 7683} 7684 7685// InterfaceIPConfigurationListResultIterator provides access to a complete listing of 7686// InterfaceIPConfiguration values. 7687type InterfaceIPConfigurationListResultIterator struct { 7688 i int 7689 page InterfaceIPConfigurationListResultPage 7690} 7691 7692// NextWithContext advances to the next value. If there was an error making 7693// the request the iterator does not advance and the error is returned. 7694func (iter *InterfaceIPConfigurationListResultIterator) NextWithContext(ctx context.Context) (err error) { 7695 if tracing.IsEnabled() { 7696 ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceIPConfigurationListResultIterator.NextWithContext") 7697 defer func() { 7698 sc := -1 7699 if iter.Response().Response.Response != nil { 7700 sc = iter.Response().Response.Response.StatusCode 7701 } 7702 tracing.EndSpan(ctx, sc, err) 7703 }() 7704 } 7705 iter.i++ 7706 if iter.i < len(iter.page.Values()) { 7707 return nil 7708 } 7709 err = iter.page.NextWithContext(ctx) 7710 if err != nil { 7711 iter.i-- 7712 return err 7713 } 7714 iter.i = 0 7715 return nil 7716} 7717 7718// Next advances to the next value. If there was an error making 7719// the request the iterator does not advance and the error is returned. 7720// Deprecated: Use NextWithContext() instead. 7721func (iter *InterfaceIPConfigurationListResultIterator) Next() error { 7722 return iter.NextWithContext(context.Background()) 7723} 7724 7725// NotDone returns true if the enumeration should be started or is not yet complete. 7726func (iter InterfaceIPConfigurationListResultIterator) NotDone() bool { 7727 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 7728} 7729 7730// Response returns the raw server response from the last page request. 7731func (iter InterfaceIPConfigurationListResultIterator) Response() InterfaceIPConfigurationListResult { 7732 return iter.page.Response() 7733} 7734 7735// Value returns the current value or a zero-initialized value if the 7736// iterator has advanced beyond the end of the collection. 7737func (iter InterfaceIPConfigurationListResultIterator) Value() InterfaceIPConfiguration { 7738 if !iter.page.NotDone() { 7739 return InterfaceIPConfiguration{} 7740 } 7741 return iter.page.Values()[iter.i] 7742} 7743 7744// Creates a new instance of the InterfaceIPConfigurationListResultIterator type. 7745func NewInterfaceIPConfigurationListResultIterator(page InterfaceIPConfigurationListResultPage) InterfaceIPConfigurationListResultIterator { 7746 return InterfaceIPConfigurationListResultIterator{page: page} 7747} 7748 7749// IsEmpty returns true if the ListResult contains no values. 7750func (iiclr InterfaceIPConfigurationListResult) IsEmpty() bool { 7751 return iiclr.Value == nil || len(*iiclr.Value) == 0 7752} 7753 7754// interfaceIPConfigurationListResultPreparer prepares a request to retrieve the next set of results. 7755// It returns nil if no more results exist. 7756func (iiclr InterfaceIPConfigurationListResult) interfaceIPConfigurationListResultPreparer(ctx context.Context) (*http.Request, error) { 7757 if iiclr.NextLink == nil || len(to.String(iiclr.NextLink)) < 1 { 7758 return nil, nil 7759 } 7760 return autorest.Prepare((&http.Request{}).WithContext(ctx), 7761 autorest.AsJSON(), 7762 autorest.AsGet(), 7763 autorest.WithBaseURL(to.String(iiclr.NextLink))) 7764} 7765 7766// InterfaceIPConfigurationListResultPage contains a page of InterfaceIPConfiguration values. 7767type InterfaceIPConfigurationListResultPage struct { 7768 fn func(context.Context, InterfaceIPConfigurationListResult) (InterfaceIPConfigurationListResult, error) 7769 iiclr InterfaceIPConfigurationListResult 7770} 7771 7772// NextWithContext advances to the next page of values. If there was an error making 7773// the request the page does not advance and the error is returned. 7774func (page *InterfaceIPConfigurationListResultPage) NextWithContext(ctx context.Context) (err error) { 7775 if tracing.IsEnabled() { 7776 ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceIPConfigurationListResultPage.NextWithContext") 7777 defer func() { 7778 sc := -1 7779 if page.Response().Response.Response != nil { 7780 sc = page.Response().Response.Response.StatusCode 7781 } 7782 tracing.EndSpan(ctx, sc, err) 7783 }() 7784 } 7785 next, err := page.fn(ctx, page.iiclr) 7786 if err != nil { 7787 return err 7788 } 7789 page.iiclr = next 7790 return nil 7791} 7792 7793// Next advances to the next page of values. If there was an error making 7794// the request the page does not advance and the error is returned. 7795// Deprecated: Use NextWithContext() instead. 7796func (page *InterfaceIPConfigurationListResultPage) Next() error { 7797 return page.NextWithContext(context.Background()) 7798} 7799 7800// NotDone returns true if the page enumeration should be started or is not yet complete. 7801func (page InterfaceIPConfigurationListResultPage) NotDone() bool { 7802 return !page.iiclr.IsEmpty() 7803} 7804 7805// Response returns the raw server response from the last page request. 7806func (page InterfaceIPConfigurationListResultPage) Response() InterfaceIPConfigurationListResult { 7807 return page.iiclr 7808} 7809 7810// Values returns the slice of values for the current page or nil if there are no values. 7811func (page InterfaceIPConfigurationListResultPage) Values() []InterfaceIPConfiguration { 7812 if page.iiclr.IsEmpty() { 7813 return nil 7814 } 7815 return *page.iiclr.Value 7816} 7817 7818// Creates a new instance of the InterfaceIPConfigurationListResultPage type. 7819func NewInterfaceIPConfigurationListResultPage(getNextPage func(context.Context, InterfaceIPConfigurationListResult) (InterfaceIPConfigurationListResult, error)) InterfaceIPConfigurationListResultPage { 7820 return InterfaceIPConfigurationListResultPage{fn: getNextPage} 7821} 7822 7823// InterfaceIPConfigurationPropertiesFormat properties of IP configuration. 7824type InterfaceIPConfigurationPropertiesFormat struct { 7825 // ApplicationGatewayBackendAddressPools - The reference of ApplicationGatewayBackendAddressPool resource. 7826 ApplicationGatewayBackendAddressPools *[]ApplicationGatewayBackendAddressPool `json:"applicationGatewayBackendAddressPools,omitempty"` 7827 // LoadBalancerBackendAddressPools - The reference of LoadBalancerBackendAddressPool resource. 7828 LoadBalancerBackendAddressPools *[]BackendAddressPool `json:"loadBalancerBackendAddressPools,omitempty"` 7829 // LoadBalancerInboundNatRules - A list of references of LoadBalancerInboundNatRules. 7830 LoadBalancerInboundNatRules *[]InboundNatRule `json:"loadBalancerInboundNatRules,omitempty"` 7831 // PrivateIPAddress - Private IP address of the IP configuration. 7832 PrivateIPAddress *string `json:"privateIPAddress,omitempty"` 7833 // PrivateIPAllocationMethod - Defines how a private IP address is assigned. Possible values are: 'Static' and 'Dynamic'. Possible values include: 'Static', 'Dynamic' 7834 PrivateIPAllocationMethod IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"` 7835 // PrivateIPAddressVersion - Available from Api-Version 2016-03-30 onwards, it represents whether the specific ipconfiguration is IPv4 or IPv6. Default is taken as IPv4. Possible values are: 'IPv4' and 'IPv6'. Possible values include: 'IPv4', 'IPv6' 7836 PrivateIPAddressVersion IPVersion `json:"privateIPAddressVersion,omitempty"` 7837 // Subnet - Subnet bound to the IP configuration. 7838 Subnet *Subnet `json:"subnet,omitempty"` 7839 // Primary - Gets whether this is a primary customer address on the network interface. 7840 Primary *bool `json:"primary,omitempty"` 7841 // PublicIPAddress - Public IP address bound to the IP configuration. 7842 PublicIPAddress *PublicIPAddress `json:"publicIPAddress,omitempty"` 7843 // ApplicationSecurityGroups - Application security groups in which the IP configuration is included. 7844 ApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"applicationSecurityGroups,omitempty"` 7845 // ProvisioningState - The provisioning state of the network interface IP configuration. Possible values are: 'Updating', 'Deleting', and 'Failed'. 7846 ProvisioningState *string `json:"provisioningState,omitempty"` 7847} 7848 7849// InterfaceListResult response for the ListNetworkInterface API service call. 7850type InterfaceListResult struct { 7851 autorest.Response `json:"-"` 7852 // Value - A list of network interfaces in a resource group. 7853 Value *[]Interface `json:"value,omitempty"` 7854 // NextLink - READ-ONLY; The URL to get the next set of results. 7855 NextLink *string `json:"nextLink,omitempty"` 7856} 7857 7858// InterfaceListResultIterator provides access to a complete listing of Interface values. 7859type InterfaceListResultIterator struct { 7860 i int 7861 page InterfaceListResultPage 7862} 7863 7864// NextWithContext advances to the next value. If there was an error making 7865// the request the iterator does not advance and the error is returned. 7866func (iter *InterfaceListResultIterator) NextWithContext(ctx context.Context) (err error) { 7867 if tracing.IsEnabled() { 7868 ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceListResultIterator.NextWithContext") 7869 defer func() { 7870 sc := -1 7871 if iter.Response().Response.Response != nil { 7872 sc = iter.Response().Response.Response.StatusCode 7873 } 7874 tracing.EndSpan(ctx, sc, err) 7875 }() 7876 } 7877 iter.i++ 7878 if iter.i < len(iter.page.Values()) { 7879 return nil 7880 } 7881 err = iter.page.NextWithContext(ctx) 7882 if err != nil { 7883 iter.i-- 7884 return err 7885 } 7886 iter.i = 0 7887 return nil 7888} 7889 7890// Next advances to the next value. If there was an error making 7891// the request the iterator does not advance and the error is returned. 7892// Deprecated: Use NextWithContext() instead. 7893func (iter *InterfaceListResultIterator) Next() error { 7894 return iter.NextWithContext(context.Background()) 7895} 7896 7897// NotDone returns true if the enumeration should be started or is not yet complete. 7898func (iter InterfaceListResultIterator) NotDone() bool { 7899 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 7900} 7901 7902// Response returns the raw server response from the last page request. 7903func (iter InterfaceListResultIterator) Response() InterfaceListResult { 7904 return iter.page.Response() 7905} 7906 7907// Value returns the current value or a zero-initialized value if the 7908// iterator has advanced beyond the end of the collection. 7909func (iter InterfaceListResultIterator) Value() Interface { 7910 if !iter.page.NotDone() { 7911 return Interface{} 7912 } 7913 return iter.page.Values()[iter.i] 7914} 7915 7916// Creates a new instance of the InterfaceListResultIterator type. 7917func NewInterfaceListResultIterator(page InterfaceListResultPage) InterfaceListResultIterator { 7918 return InterfaceListResultIterator{page: page} 7919} 7920 7921// IsEmpty returns true if the ListResult contains no values. 7922func (ilr InterfaceListResult) IsEmpty() bool { 7923 return ilr.Value == nil || len(*ilr.Value) == 0 7924} 7925 7926// interfaceListResultPreparer prepares a request to retrieve the next set of results. 7927// It returns nil if no more results exist. 7928func (ilr InterfaceListResult) interfaceListResultPreparer(ctx context.Context) (*http.Request, error) { 7929 if ilr.NextLink == nil || len(to.String(ilr.NextLink)) < 1 { 7930 return nil, nil 7931 } 7932 return autorest.Prepare((&http.Request{}).WithContext(ctx), 7933 autorest.AsJSON(), 7934 autorest.AsGet(), 7935 autorest.WithBaseURL(to.String(ilr.NextLink))) 7936} 7937 7938// InterfaceListResultPage contains a page of Interface values. 7939type InterfaceListResultPage struct { 7940 fn func(context.Context, InterfaceListResult) (InterfaceListResult, error) 7941 ilr InterfaceListResult 7942} 7943 7944// NextWithContext advances to the next page of values. If there was an error making 7945// the request the page does not advance and the error is returned. 7946func (page *InterfaceListResultPage) NextWithContext(ctx context.Context) (err error) { 7947 if tracing.IsEnabled() { 7948 ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceListResultPage.NextWithContext") 7949 defer func() { 7950 sc := -1 7951 if page.Response().Response.Response != nil { 7952 sc = page.Response().Response.Response.StatusCode 7953 } 7954 tracing.EndSpan(ctx, sc, err) 7955 }() 7956 } 7957 next, err := page.fn(ctx, page.ilr) 7958 if err != nil { 7959 return err 7960 } 7961 page.ilr = next 7962 return nil 7963} 7964 7965// Next advances to the next page of values. If there was an error making 7966// the request the page does not advance and the error is returned. 7967// Deprecated: Use NextWithContext() instead. 7968func (page *InterfaceListResultPage) Next() error { 7969 return page.NextWithContext(context.Background()) 7970} 7971 7972// NotDone returns true if the page enumeration should be started or is not yet complete. 7973func (page InterfaceListResultPage) NotDone() bool { 7974 return !page.ilr.IsEmpty() 7975} 7976 7977// Response returns the raw server response from the last page request. 7978func (page InterfaceListResultPage) Response() InterfaceListResult { 7979 return page.ilr 7980} 7981 7982// Values returns the slice of values for the current page or nil if there are no values. 7983func (page InterfaceListResultPage) Values() []Interface { 7984 if page.ilr.IsEmpty() { 7985 return nil 7986 } 7987 return *page.ilr.Value 7988} 7989 7990// Creates a new instance of the InterfaceListResultPage type. 7991func NewInterfaceListResultPage(getNextPage func(context.Context, InterfaceListResult) (InterfaceListResult, error)) InterfaceListResultPage { 7992 return InterfaceListResultPage{fn: getNextPage} 7993} 7994 7995// InterfaceLoadBalancerListResult response for list ip configurations API service call. 7996type InterfaceLoadBalancerListResult struct { 7997 autorest.Response `json:"-"` 7998 // Value - A list of load balancers. 7999 Value *[]LoadBalancer `json:"value,omitempty"` 8000 // NextLink - READ-ONLY; The URL to get the next set of results. 8001 NextLink *string `json:"nextLink,omitempty"` 8002} 8003 8004// InterfaceLoadBalancerListResultIterator provides access to a complete listing of LoadBalancer values. 8005type InterfaceLoadBalancerListResultIterator struct { 8006 i int 8007 page InterfaceLoadBalancerListResultPage 8008} 8009 8010// NextWithContext advances to the next value. If there was an error making 8011// the request the iterator does not advance and the error is returned. 8012func (iter *InterfaceLoadBalancerListResultIterator) NextWithContext(ctx context.Context) (err error) { 8013 if tracing.IsEnabled() { 8014 ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceLoadBalancerListResultIterator.NextWithContext") 8015 defer func() { 8016 sc := -1 8017 if iter.Response().Response.Response != nil { 8018 sc = iter.Response().Response.Response.StatusCode 8019 } 8020 tracing.EndSpan(ctx, sc, err) 8021 }() 8022 } 8023 iter.i++ 8024 if iter.i < len(iter.page.Values()) { 8025 return nil 8026 } 8027 err = iter.page.NextWithContext(ctx) 8028 if err != nil { 8029 iter.i-- 8030 return err 8031 } 8032 iter.i = 0 8033 return nil 8034} 8035 8036// Next advances to the next value. If there was an error making 8037// the request the iterator does not advance and the error is returned. 8038// Deprecated: Use NextWithContext() instead. 8039func (iter *InterfaceLoadBalancerListResultIterator) Next() error { 8040 return iter.NextWithContext(context.Background()) 8041} 8042 8043// NotDone returns true if the enumeration should be started or is not yet complete. 8044func (iter InterfaceLoadBalancerListResultIterator) NotDone() bool { 8045 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 8046} 8047 8048// Response returns the raw server response from the last page request. 8049func (iter InterfaceLoadBalancerListResultIterator) Response() InterfaceLoadBalancerListResult { 8050 return iter.page.Response() 8051} 8052 8053// Value returns the current value or a zero-initialized value if the 8054// iterator has advanced beyond the end of the collection. 8055func (iter InterfaceLoadBalancerListResultIterator) Value() LoadBalancer { 8056 if !iter.page.NotDone() { 8057 return LoadBalancer{} 8058 } 8059 return iter.page.Values()[iter.i] 8060} 8061 8062// Creates a new instance of the InterfaceLoadBalancerListResultIterator type. 8063func NewInterfaceLoadBalancerListResultIterator(page InterfaceLoadBalancerListResultPage) InterfaceLoadBalancerListResultIterator { 8064 return InterfaceLoadBalancerListResultIterator{page: page} 8065} 8066 8067// IsEmpty returns true if the ListResult contains no values. 8068func (ilblr InterfaceLoadBalancerListResult) IsEmpty() bool { 8069 return ilblr.Value == nil || len(*ilblr.Value) == 0 8070} 8071 8072// interfaceLoadBalancerListResultPreparer prepares a request to retrieve the next set of results. 8073// It returns nil if no more results exist. 8074func (ilblr InterfaceLoadBalancerListResult) interfaceLoadBalancerListResultPreparer(ctx context.Context) (*http.Request, error) { 8075 if ilblr.NextLink == nil || len(to.String(ilblr.NextLink)) < 1 { 8076 return nil, nil 8077 } 8078 return autorest.Prepare((&http.Request{}).WithContext(ctx), 8079 autorest.AsJSON(), 8080 autorest.AsGet(), 8081 autorest.WithBaseURL(to.String(ilblr.NextLink))) 8082} 8083 8084// InterfaceLoadBalancerListResultPage contains a page of LoadBalancer values. 8085type InterfaceLoadBalancerListResultPage struct { 8086 fn func(context.Context, InterfaceLoadBalancerListResult) (InterfaceLoadBalancerListResult, error) 8087 ilblr InterfaceLoadBalancerListResult 8088} 8089 8090// NextWithContext advances to the next page of values. If there was an error making 8091// the request the page does not advance and the error is returned. 8092func (page *InterfaceLoadBalancerListResultPage) NextWithContext(ctx context.Context) (err error) { 8093 if tracing.IsEnabled() { 8094 ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceLoadBalancerListResultPage.NextWithContext") 8095 defer func() { 8096 sc := -1 8097 if page.Response().Response.Response != nil { 8098 sc = page.Response().Response.Response.StatusCode 8099 } 8100 tracing.EndSpan(ctx, sc, err) 8101 }() 8102 } 8103 next, err := page.fn(ctx, page.ilblr) 8104 if err != nil { 8105 return err 8106 } 8107 page.ilblr = next 8108 return nil 8109} 8110 8111// Next advances to the next page of values. If there was an error making 8112// the request the page does not advance and the error is returned. 8113// Deprecated: Use NextWithContext() instead. 8114func (page *InterfaceLoadBalancerListResultPage) Next() error { 8115 return page.NextWithContext(context.Background()) 8116} 8117 8118// NotDone returns true if the page enumeration should be started or is not yet complete. 8119func (page InterfaceLoadBalancerListResultPage) NotDone() bool { 8120 return !page.ilblr.IsEmpty() 8121} 8122 8123// Response returns the raw server response from the last page request. 8124func (page InterfaceLoadBalancerListResultPage) Response() InterfaceLoadBalancerListResult { 8125 return page.ilblr 8126} 8127 8128// Values returns the slice of values for the current page or nil if there are no values. 8129func (page InterfaceLoadBalancerListResultPage) Values() []LoadBalancer { 8130 if page.ilblr.IsEmpty() { 8131 return nil 8132 } 8133 return *page.ilblr.Value 8134} 8135 8136// Creates a new instance of the InterfaceLoadBalancerListResultPage type. 8137func NewInterfaceLoadBalancerListResultPage(getNextPage func(context.Context, InterfaceLoadBalancerListResult) (InterfaceLoadBalancerListResult, error)) InterfaceLoadBalancerListResultPage { 8138 return InterfaceLoadBalancerListResultPage{fn: getNextPage} 8139} 8140 8141// InterfacePropertiesFormat networkInterface properties. 8142type InterfacePropertiesFormat struct { 8143 // VirtualMachine - The reference of a virtual machine. 8144 VirtualMachine *SubResource `json:"virtualMachine,omitempty"` 8145 // NetworkSecurityGroup - The reference of the NetworkSecurityGroup resource. 8146 NetworkSecurityGroup *SecurityGroup `json:"networkSecurityGroup,omitempty"` 8147 // IPConfigurations - A list of IPConfigurations of the network interface. 8148 IPConfigurations *[]InterfaceIPConfiguration `json:"ipConfigurations,omitempty"` 8149 // DNSSettings - The DNS settings in network interface. 8150 DNSSettings *InterfaceDNSSettings `json:"dnsSettings,omitempty"` 8151 // MacAddress - The MAC address of the network interface. 8152 MacAddress *string `json:"macAddress,omitempty"` 8153 // Primary - Gets whether this is a primary network interface on a virtual machine. 8154 Primary *bool `json:"primary,omitempty"` 8155 // EnableAcceleratedNetworking - If the network interface is accelerated networking enabled. 8156 EnableAcceleratedNetworking *bool `json:"enableAcceleratedNetworking,omitempty"` 8157 // EnableIPForwarding - Indicates whether IP forwarding is enabled on this network interface. 8158 EnableIPForwarding *bool `json:"enableIPForwarding,omitempty"` 8159 // ResourceGUID - The resource GUID property of the network interface resource. 8160 ResourceGUID *string `json:"resourceGuid,omitempty"` 8161 // ProvisioningState - The provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. 8162 ProvisioningState *string `json:"provisioningState,omitempty"` 8163} 8164 8165// InterfacesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a 8166// long-running operation. 8167type InterfacesCreateOrUpdateFuture struct { 8168 azure.Future 8169} 8170 8171// Result returns the result of the asynchronous operation. 8172// If the operation has not completed it will return an error. 8173func (future *InterfacesCreateOrUpdateFuture) Result(client InterfacesClient) (i Interface, err error) { 8174 var done bool 8175 done, err = future.DoneWithContext(context.Background(), client) 8176 if err != nil { 8177 err = autorest.NewErrorWithError(err, "network.InterfacesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") 8178 return 8179 } 8180 if !done { 8181 err = azure.NewAsyncOpIncompleteError("network.InterfacesCreateOrUpdateFuture") 8182 return 8183 } 8184 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 8185 if i.Response.Response, err = future.GetResult(sender); err == nil && i.Response.Response.StatusCode != http.StatusNoContent { 8186 i, err = client.CreateOrUpdateResponder(i.Response.Response) 8187 if err != nil { 8188 err = autorest.NewErrorWithError(err, "network.InterfacesCreateOrUpdateFuture", "Result", i.Response.Response, "Failure responding to request") 8189 } 8190 } 8191 return 8192} 8193 8194// InterfacesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running 8195// operation. 8196type InterfacesDeleteFuture struct { 8197 azure.Future 8198} 8199 8200// Result returns the result of the asynchronous operation. 8201// If the operation has not completed it will return an error. 8202func (future *InterfacesDeleteFuture) Result(client InterfacesClient) (ar autorest.Response, err error) { 8203 var done bool 8204 done, err = future.DoneWithContext(context.Background(), client) 8205 if err != nil { 8206 err = autorest.NewErrorWithError(err, "network.InterfacesDeleteFuture", "Result", future.Response(), "Polling failure") 8207 return 8208 } 8209 if !done { 8210 err = azure.NewAsyncOpIncompleteError("network.InterfacesDeleteFuture") 8211 return 8212 } 8213 ar.Response = future.Response() 8214 return 8215} 8216 8217// InterfacesGetEffectiveRouteTableFuture an abstraction for monitoring and retrieving the results of a 8218// long-running operation. 8219type InterfacesGetEffectiveRouteTableFuture struct { 8220 azure.Future 8221} 8222 8223// Result returns the result of the asynchronous operation. 8224// If the operation has not completed it will return an error. 8225func (future *InterfacesGetEffectiveRouteTableFuture) Result(client InterfacesClient) (erlr EffectiveRouteListResult, err error) { 8226 var done bool 8227 done, err = future.DoneWithContext(context.Background(), client) 8228 if err != nil { 8229 err = autorest.NewErrorWithError(err, "network.InterfacesGetEffectiveRouteTableFuture", "Result", future.Response(), "Polling failure") 8230 return 8231 } 8232 if !done { 8233 err = azure.NewAsyncOpIncompleteError("network.InterfacesGetEffectiveRouteTableFuture") 8234 return 8235 } 8236 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 8237 if erlr.Response.Response, err = future.GetResult(sender); err == nil && erlr.Response.Response.StatusCode != http.StatusNoContent { 8238 erlr, err = client.GetEffectiveRouteTableResponder(erlr.Response.Response) 8239 if err != nil { 8240 err = autorest.NewErrorWithError(err, "network.InterfacesGetEffectiveRouteTableFuture", "Result", erlr.Response.Response, "Failure responding to request") 8241 } 8242 } 8243 return 8244} 8245 8246// InterfacesListEffectiveNetworkSecurityGroupsFuture an abstraction for monitoring and retrieving the 8247// results of a long-running operation. 8248type InterfacesListEffectiveNetworkSecurityGroupsFuture struct { 8249 azure.Future 8250} 8251 8252// Result returns the result of the asynchronous operation. 8253// If the operation has not completed it will return an error. 8254func (future *InterfacesListEffectiveNetworkSecurityGroupsFuture) Result(client InterfacesClient) (ensglr EffectiveNetworkSecurityGroupListResult, err error) { 8255 var done bool 8256 done, err = future.DoneWithContext(context.Background(), client) 8257 if err != nil { 8258 err = autorest.NewErrorWithError(err, "network.InterfacesListEffectiveNetworkSecurityGroupsFuture", "Result", future.Response(), "Polling failure") 8259 return 8260 } 8261 if !done { 8262 err = azure.NewAsyncOpIncompleteError("network.InterfacesListEffectiveNetworkSecurityGroupsFuture") 8263 return 8264 } 8265 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 8266 if ensglr.Response.Response, err = future.GetResult(sender); err == nil && ensglr.Response.Response.StatusCode != http.StatusNoContent { 8267 ensglr, err = client.ListEffectiveNetworkSecurityGroupsResponder(ensglr.Response.Response) 8268 if err != nil { 8269 err = autorest.NewErrorWithError(err, "network.InterfacesListEffectiveNetworkSecurityGroupsFuture", "Result", ensglr.Response.Response, "Failure responding to request") 8270 } 8271 } 8272 return 8273} 8274 8275// InterfacesUpdateTagsFuture an abstraction for monitoring and retrieving the results of a long-running 8276// operation. 8277type InterfacesUpdateTagsFuture struct { 8278 azure.Future 8279} 8280 8281// Result returns the result of the asynchronous operation. 8282// If the operation has not completed it will return an error. 8283func (future *InterfacesUpdateTagsFuture) Result(client InterfacesClient) (i Interface, err error) { 8284 var done bool 8285 done, err = future.DoneWithContext(context.Background(), client) 8286 if err != nil { 8287 err = autorest.NewErrorWithError(err, "network.InterfacesUpdateTagsFuture", "Result", future.Response(), "Polling failure") 8288 return 8289 } 8290 if !done { 8291 err = azure.NewAsyncOpIncompleteError("network.InterfacesUpdateTagsFuture") 8292 return 8293 } 8294 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 8295 if i.Response.Response, err = future.GetResult(sender); err == nil && i.Response.Response.StatusCode != http.StatusNoContent { 8296 i, err = client.UpdateTagsResponder(i.Response.Response) 8297 if err != nil { 8298 err = autorest.NewErrorWithError(err, "network.InterfacesUpdateTagsFuture", "Result", i.Response.Response, "Failure responding to request") 8299 } 8300 } 8301 return 8302} 8303 8304// IPAddressAvailabilityResult response for CheckIPAddressAvailability API service call 8305type IPAddressAvailabilityResult struct { 8306 autorest.Response `json:"-"` 8307 // Available - Private IP address availability. 8308 Available *bool `json:"available,omitempty"` 8309 // AvailableIPAddresses - Contains other available private IP addresses if the asked for address is taken. 8310 AvailableIPAddresses *[]string `json:"availableIPAddresses,omitempty"` 8311} 8312 8313// IPConfiguration IP configuration 8314type IPConfiguration struct { 8315 // IPConfigurationPropertiesFormat - Properties of the IP configuration 8316 *IPConfigurationPropertiesFormat `json:"properties,omitempty"` 8317 // Name - The name of the resource that is unique within a resource group. This name can be used to access the resource. 8318 Name *string `json:"name,omitempty"` 8319 // Etag - A unique read-only string that changes whenever the resource is updated. 8320 Etag *string `json:"etag,omitempty"` 8321 // ID - Resource ID. 8322 ID *string `json:"id,omitempty"` 8323} 8324 8325// MarshalJSON is the custom marshaler for IPConfiguration. 8326func (ic IPConfiguration) MarshalJSON() ([]byte, error) { 8327 objectMap := make(map[string]interface{}) 8328 if ic.IPConfigurationPropertiesFormat != nil { 8329 objectMap["properties"] = ic.IPConfigurationPropertiesFormat 8330 } 8331 if ic.Name != nil { 8332 objectMap["name"] = ic.Name 8333 } 8334 if ic.Etag != nil { 8335 objectMap["etag"] = ic.Etag 8336 } 8337 if ic.ID != nil { 8338 objectMap["id"] = ic.ID 8339 } 8340 return json.Marshal(objectMap) 8341} 8342 8343// UnmarshalJSON is the custom unmarshaler for IPConfiguration struct. 8344func (ic *IPConfiguration) UnmarshalJSON(body []byte) error { 8345 var m map[string]*json.RawMessage 8346 err := json.Unmarshal(body, &m) 8347 if err != nil { 8348 return err 8349 } 8350 for k, v := range m { 8351 switch k { 8352 case "properties": 8353 if v != nil { 8354 var IPConfigurationPropertiesFormat IPConfigurationPropertiesFormat 8355 err = json.Unmarshal(*v, &IPConfigurationPropertiesFormat) 8356 if err != nil { 8357 return err 8358 } 8359 ic.IPConfigurationPropertiesFormat = &IPConfigurationPropertiesFormat 8360 } 8361 case "name": 8362 if v != nil { 8363 var name string 8364 err = json.Unmarshal(*v, &name) 8365 if err != nil { 8366 return err 8367 } 8368 ic.Name = &name 8369 } 8370 case "etag": 8371 if v != nil { 8372 var etag string 8373 err = json.Unmarshal(*v, &etag) 8374 if err != nil { 8375 return err 8376 } 8377 ic.Etag = &etag 8378 } 8379 case "id": 8380 if v != nil { 8381 var ID string 8382 err = json.Unmarshal(*v, &ID) 8383 if err != nil { 8384 return err 8385 } 8386 ic.ID = &ID 8387 } 8388 } 8389 } 8390 8391 return nil 8392} 8393 8394// IPConfigurationPropertiesFormat properties of IP configuration. 8395type IPConfigurationPropertiesFormat struct { 8396 // PrivateIPAddress - The private IP address of the IP configuration. 8397 PrivateIPAddress *string `json:"privateIPAddress,omitempty"` 8398 // PrivateIPAllocationMethod - The private IP allocation method. Possible values are 'Static' and 'Dynamic'. Possible values include: 'Static', 'Dynamic' 8399 PrivateIPAllocationMethod IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"` 8400 // Subnet - The reference of the subnet resource. 8401 Subnet *Subnet `json:"subnet,omitempty"` 8402 // PublicIPAddress - The reference of the public IP resource. 8403 PublicIPAddress *PublicIPAddress `json:"publicIPAddress,omitempty"` 8404 // ProvisioningState - Gets the provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. 8405 ProvisioningState *string `json:"provisioningState,omitempty"` 8406} 8407 8408// IpsecPolicy an IPSec Policy configuration for a virtual network gateway connection 8409type IpsecPolicy struct { 8410 // SaLifeTimeSeconds - The IPSec Security Association (also called Quick Mode or Phase 2 SA) lifetime in seconds for a site to site VPN tunnel. 8411 SaLifeTimeSeconds *int32 `json:"saLifeTimeSeconds,omitempty"` 8412 // SaDataSizeKilobytes - The IPSec Security Association (also called Quick Mode or Phase 2 SA) payload size in KB for a site to site VPN tunnel. 8413 SaDataSizeKilobytes *int32 `json:"saDataSizeKilobytes,omitempty"` 8414 // IpsecEncryption - The IPSec encryption algorithm (IKE phase 1). Possible values include: 'IpsecEncryptionNone', 'IpsecEncryptionDES', 'IpsecEncryptionDES3', 'IpsecEncryptionAES128', 'IpsecEncryptionAES192', 'IpsecEncryptionAES256', 'IpsecEncryptionGCMAES128', 'IpsecEncryptionGCMAES192', 'IpsecEncryptionGCMAES256' 8415 IpsecEncryption IpsecEncryption `json:"ipsecEncryption,omitempty"` 8416 // IpsecIntegrity - The IPSec integrity algorithm (IKE phase 1). Possible values include: 'IpsecIntegrityMD5', 'IpsecIntegritySHA1', 'IpsecIntegritySHA256', 'IpsecIntegrityGCMAES128', 'IpsecIntegrityGCMAES192', 'IpsecIntegrityGCMAES256' 8417 IpsecIntegrity IpsecIntegrity `json:"ipsecIntegrity,omitempty"` 8418 // IkeEncryption - The IKE encryption algorithm (IKE phase 2). Possible values include: 'DES', 'DES3', 'AES128', 'AES192', 'AES256' 8419 IkeEncryption IkeEncryption `json:"ikeEncryption,omitempty"` 8420 // IkeIntegrity - The IKE integrity algorithm (IKE phase 2). Possible values include: 'MD5', 'SHA1', 'SHA256', 'SHA384' 8421 IkeIntegrity IkeIntegrity `json:"ikeIntegrity,omitempty"` 8422 // DhGroup - The DH Groups used in IKE Phase 1 for initial SA. Possible values include: 'None', 'DHGroup1', 'DHGroup2', 'DHGroup14', 'DHGroup2048', 'ECP256', 'ECP384', 'DHGroup24' 8423 DhGroup DhGroup `json:"dhGroup,omitempty"` 8424 // PfsGroup - The DH Groups used in IKE Phase 2 for new child SA. Possible values include: 'PfsGroupNone', 'PfsGroupPFS1', 'PfsGroupPFS2', 'PfsGroupPFS2048', 'PfsGroupECP256', 'PfsGroupECP384', 'PfsGroupPFS24' 8425 PfsGroup PfsGroup `json:"pfsGroup,omitempty"` 8426} 8427 8428// Ipv6ExpressRouteCircuitPeeringConfig contains IPv6 peering config. 8429type Ipv6ExpressRouteCircuitPeeringConfig struct { 8430 // PrimaryPeerAddressPrefix - The primary address prefix. 8431 PrimaryPeerAddressPrefix *string `json:"primaryPeerAddressPrefix,omitempty"` 8432 // SecondaryPeerAddressPrefix - The secondary address prefix. 8433 SecondaryPeerAddressPrefix *string `json:"secondaryPeerAddressPrefix,omitempty"` 8434 // MicrosoftPeeringConfig - The Microsoft peering configuration. 8435 MicrosoftPeeringConfig *ExpressRouteCircuitPeeringConfig `json:"microsoftPeeringConfig,omitempty"` 8436 // RouteFilter - The reference of the RouteFilter resource. 8437 RouteFilter *RouteFilter `json:"routeFilter,omitempty"` 8438 // State - The state of peering. Possible values are: 'Disabled' and 'Enabled'. Possible values include: 'ExpressRouteCircuitPeeringStateDisabled', 'ExpressRouteCircuitPeeringStateEnabled' 8439 State ExpressRouteCircuitPeeringState `json:"state,omitempty"` 8440} 8441 8442// LoadBalancer loadBalancer resource 8443type LoadBalancer struct { 8444 autorest.Response `json:"-"` 8445 // Sku - The load balancer SKU. 8446 Sku *LoadBalancerSku `json:"sku,omitempty"` 8447 // LoadBalancerPropertiesFormat - Properties of load balancer. 8448 *LoadBalancerPropertiesFormat `json:"properties,omitempty"` 8449 // Etag - A unique read-only string that changes whenever the resource is updated. 8450 Etag *string `json:"etag,omitempty"` 8451 // ID - Resource ID. 8452 ID *string `json:"id,omitempty"` 8453 // Name - READ-ONLY; Resource name. 8454 Name *string `json:"name,omitempty"` 8455 // Type - READ-ONLY; Resource type. 8456 Type *string `json:"type,omitempty"` 8457 // Location - Resource location. 8458 Location *string `json:"location,omitempty"` 8459 // Tags - Resource tags. 8460 Tags map[string]*string `json:"tags"` 8461} 8462 8463// MarshalJSON is the custom marshaler for LoadBalancer. 8464func (lb LoadBalancer) MarshalJSON() ([]byte, error) { 8465 objectMap := make(map[string]interface{}) 8466 if lb.Sku != nil { 8467 objectMap["sku"] = lb.Sku 8468 } 8469 if lb.LoadBalancerPropertiesFormat != nil { 8470 objectMap["properties"] = lb.LoadBalancerPropertiesFormat 8471 } 8472 if lb.Etag != nil { 8473 objectMap["etag"] = lb.Etag 8474 } 8475 if lb.ID != nil { 8476 objectMap["id"] = lb.ID 8477 } 8478 if lb.Location != nil { 8479 objectMap["location"] = lb.Location 8480 } 8481 if lb.Tags != nil { 8482 objectMap["tags"] = lb.Tags 8483 } 8484 return json.Marshal(objectMap) 8485} 8486 8487// UnmarshalJSON is the custom unmarshaler for LoadBalancer struct. 8488func (lb *LoadBalancer) UnmarshalJSON(body []byte) error { 8489 var m map[string]*json.RawMessage 8490 err := json.Unmarshal(body, &m) 8491 if err != nil { 8492 return err 8493 } 8494 for k, v := range m { 8495 switch k { 8496 case "sku": 8497 if v != nil { 8498 var sku LoadBalancerSku 8499 err = json.Unmarshal(*v, &sku) 8500 if err != nil { 8501 return err 8502 } 8503 lb.Sku = &sku 8504 } 8505 case "properties": 8506 if v != nil { 8507 var loadBalancerPropertiesFormat LoadBalancerPropertiesFormat 8508 err = json.Unmarshal(*v, &loadBalancerPropertiesFormat) 8509 if err != nil { 8510 return err 8511 } 8512 lb.LoadBalancerPropertiesFormat = &loadBalancerPropertiesFormat 8513 } 8514 case "etag": 8515 if v != nil { 8516 var etag string 8517 err = json.Unmarshal(*v, &etag) 8518 if err != nil { 8519 return err 8520 } 8521 lb.Etag = &etag 8522 } 8523 case "id": 8524 if v != nil { 8525 var ID string 8526 err = json.Unmarshal(*v, &ID) 8527 if err != nil { 8528 return err 8529 } 8530 lb.ID = &ID 8531 } 8532 case "name": 8533 if v != nil { 8534 var name string 8535 err = json.Unmarshal(*v, &name) 8536 if err != nil { 8537 return err 8538 } 8539 lb.Name = &name 8540 } 8541 case "type": 8542 if v != nil { 8543 var typeVar string 8544 err = json.Unmarshal(*v, &typeVar) 8545 if err != nil { 8546 return err 8547 } 8548 lb.Type = &typeVar 8549 } 8550 case "location": 8551 if v != nil { 8552 var location string 8553 err = json.Unmarshal(*v, &location) 8554 if err != nil { 8555 return err 8556 } 8557 lb.Location = &location 8558 } 8559 case "tags": 8560 if v != nil { 8561 var tags map[string]*string 8562 err = json.Unmarshal(*v, &tags) 8563 if err != nil { 8564 return err 8565 } 8566 lb.Tags = tags 8567 } 8568 } 8569 } 8570 8571 return nil 8572} 8573 8574// LoadBalancerBackendAddressPoolListResult response for ListBackendAddressPool API service call. 8575type LoadBalancerBackendAddressPoolListResult struct { 8576 autorest.Response `json:"-"` 8577 // Value - A list of backend address pools in a load balancer. 8578 Value *[]BackendAddressPool `json:"value,omitempty"` 8579 // NextLink - READ-ONLY; The URL to get the next set of results. 8580 NextLink *string `json:"nextLink,omitempty"` 8581} 8582 8583// LoadBalancerBackendAddressPoolListResultIterator provides access to a complete listing of 8584// BackendAddressPool values. 8585type LoadBalancerBackendAddressPoolListResultIterator struct { 8586 i int 8587 page LoadBalancerBackendAddressPoolListResultPage 8588} 8589 8590// NextWithContext advances to the next value. If there was an error making 8591// the request the iterator does not advance and the error is returned. 8592func (iter *LoadBalancerBackendAddressPoolListResultIterator) NextWithContext(ctx context.Context) (err error) { 8593 if tracing.IsEnabled() { 8594 ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerBackendAddressPoolListResultIterator.NextWithContext") 8595 defer func() { 8596 sc := -1 8597 if iter.Response().Response.Response != nil { 8598 sc = iter.Response().Response.Response.StatusCode 8599 } 8600 tracing.EndSpan(ctx, sc, err) 8601 }() 8602 } 8603 iter.i++ 8604 if iter.i < len(iter.page.Values()) { 8605 return nil 8606 } 8607 err = iter.page.NextWithContext(ctx) 8608 if err != nil { 8609 iter.i-- 8610 return err 8611 } 8612 iter.i = 0 8613 return nil 8614} 8615 8616// Next advances to the next value. If there was an error making 8617// the request the iterator does not advance and the error is returned. 8618// Deprecated: Use NextWithContext() instead. 8619func (iter *LoadBalancerBackendAddressPoolListResultIterator) Next() error { 8620 return iter.NextWithContext(context.Background()) 8621} 8622 8623// NotDone returns true if the enumeration should be started or is not yet complete. 8624func (iter LoadBalancerBackendAddressPoolListResultIterator) NotDone() bool { 8625 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 8626} 8627 8628// Response returns the raw server response from the last page request. 8629func (iter LoadBalancerBackendAddressPoolListResultIterator) Response() LoadBalancerBackendAddressPoolListResult { 8630 return iter.page.Response() 8631} 8632 8633// Value returns the current value or a zero-initialized value if the 8634// iterator has advanced beyond the end of the collection. 8635func (iter LoadBalancerBackendAddressPoolListResultIterator) Value() BackendAddressPool { 8636 if !iter.page.NotDone() { 8637 return BackendAddressPool{} 8638 } 8639 return iter.page.Values()[iter.i] 8640} 8641 8642// Creates a new instance of the LoadBalancerBackendAddressPoolListResultIterator type. 8643func NewLoadBalancerBackendAddressPoolListResultIterator(page LoadBalancerBackendAddressPoolListResultPage) LoadBalancerBackendAddressPoolListResultIterator { 8644 return LoadBalancerBackendAddressPoolListResultIterator{page: page} 8645} 8646 8647// IsEmpty returns true if the ListResult contains no values. 8648func (lbbaplr LoadBalancerBackendAddressPoolListResult) IsEmpty() bool { 8649 return lbbaplr.Value == nil || len(*lbbaplr.Value) == 0 8650} 8651 8652// loadBalancerBackendAddressPoolListResultPreparer prepares a request to retrieve the next set of results. 8653// It returns nil if no more results exist. 8654func (lbbaplr LoadBalancerBackendAddressPoolListResult) loadBalancerBackendAddressPoolListResultPreparer(ctx context.Context) (*http.Request, error) { 8655 if lbbaplr.NextLink == nil || len(to.String(lbbaplr.NextLink)) < 1 { 8656 return nil, nil 8657 } 8658 return autorest.Prepare((&http.Request{}).WithContext(ctx), 8659 autorest.AsJSON(), 8660 autorest.AsGet(), 8661 autorest.WithBaseURL(to.String(lbbaplr.NextLink))) 8662} 8663 8664// LoadBalancerBackendAddressPoolListResultPage contains a page of BackendAddressPool values. 8665type LoadBalancerBackendAddressPoolListResultPage struct { 8666 fn func(context.Context, LoadBalancerBackendAddressPoolListResult) (LoadBalancerBackendAddressPoolListResult, error) 8667 lbbaplr LoadBalancerBackendAddressPoolListResult 8668} 8669 8670// NextWithContext advances to the next page of values. If there was an error making 8671// the request the page does not advance and the error is returned. 8672func (page *LoadBalancerBackendAddressPoolListResultPage) NextWithContext(ctx context.Context) (err error) { 8673 if tracing.IsEnabled() { 8674 ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerBackendAddressPoolListResultPage.NextWithContext") 8675 defer func() { 8676 sc := -1 8677 if page.Response().Response.Response != nil { 8678 sc = page.Response().Response.Response.StatusCode 8679 } 8680 tracing.EndSpan(ctx, sc, err) 8681 }() 8682 } 8683 next, err := page.fn(ctx, page.lbbaplr) 8684 if err != nil { 8685 return err 8686 } 8687 page.lbbaplr = next 8688 return nil 8689} 8690 8691// Next advances to the next page of values. If there was an error making 8692// the request the page does not advance and the error is returned. 8693// Deprecated: Use NextWithContext() instead. 8694func (page *LoadBalancerBackendAddressPoolListResultPage) Next() error { 8695 return page.NextWithContext(context.Background()) 8696} 8697 8698// NotDone returns true if the page enumeration should be started or is not yet complete. 8699func (page LoadBalancerBackendAddressPoolListResultPage) NotDone() bool { 8700 return !page.lbbaplr.IsEmpty() 8701} 8702 8703// Response returns the raw server response from the last page request. 8704func (page LoadBalancerBackendAddressPoolListResultPage) Response() LoadBalancerBackendAddressPoolListResult { 8705 return page.lbbaplr 8706} 8707 8708// Values returns the slice of values for the current page or nil if there are no values. 8709func (page LoadBalancerBackendAddressPoolListResultPage) Values() []BackendAddressPool { 8710 if page.lbbaplr.IsEmpty() { 8711 return nil 8712 } 8713 return *page.lbbaplr.Value 8714} 8715 8716// Creates a new instance of the LoadBalancerBackendAddressPoolListResultPage type. 8717func NewLoadBalancerBackendAddressPoolListResultPage(getNextPage func(context.Context, LoadBalancerBackendAddressPoolListResult) (LoadBalancerBackendAddressPoolListResult, error)) LoadBalancerBackendAddressPoolListResultPage { 8718 return LoadBalancerBackendAddressPoolListResultPage{fn: getNextPage} 8719} 8720 8721// LoadBalancerFrontendIPConfigurationListResult response for ListFrontendIPConfiguration API service call. 8722type LoadBalancerFrontendIPConfigurationListResult struct { 8723 autorest.Response `json:"-"` 8724 // Value - A list of frontend IP configurations in a load balancer. 8725 Value *[]FrontendIPConfiguration `json:"value,omitempty"` 8726 // NextLink - READ-ONLY; The URL to get the next set of results. 8727 NextLink *string `json:"nextLink,omitempty"` 8728} 8729 8730// LoadBalancerFrontendIPConfigurationListResultIterator provides access to a complete listing of 8731// FrontendIPConfiguration values. 8732type LoadBalancerFrontendIPConfigurationListResultIterator struct { 8733 i int 8734 page LoadBalancerFrontendIPConfigurationListResultPage 8735} 8736 8737// NextWithContext advances to the next value. If there was an error making 8738// the request the iterator does not advance and the error is returned. 8739func (iter *LoadBalancerFrontendIPConfigurationListResultIterator) NextWithContext(ctx context.Context) (err error) { 8740 if tracing.IsEnabled() { 8741 ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerFrontendIPConfigurationListResultIterator.NextWithContext") 8742 defer func() { 8743 sc := -1 8744 if iter.Response().Response.Response != nil { 8745 sc = iter.Response().Response.Response.StatusCode 8746 } 8747 tracing.EndSpan(ctx, sc, err) 8748 }() 8749 } 8750 iter.i++ 8751 if iter.i < len(iter.page.Values()) { 8752 return nil 8753 } 8754 err = iter.page.NextWithContext(ctx) 8755 if err != nil { 8756 iter.i-- 8757 return err 8758 } 8759 iter.i = 0 8760 return nil 8761} 8762 8763// Next advances to the next value. If there was an error making 8764// the request the iterator does not advance and the error is returned. 8765// Deprecated: Use NextWithContext() instead. 8766func (iter *LoadBalancerFrontendIPConfigurationListResultIterator) Next() error { 8767 return iter.NextWithContext(context.Background()) 8768} 8769 8770// NotDone returns true if the enumeration should be started or is not yet complete. 8771func (iter LoadBalancerFrontendIPConfigurationListResultIterator) NotDone() bool { 8772 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 8773} 8774 8775// Response returns the raw server response from the last page request. 8776func (iter LoadBalancerFrontendIPConfigurationListResultIterator) Response() LoadBalancerFrontendIPConfigurationListResult { 8777 return iter.page.Response() 8778} 8779 8780// Value returns the current value or a zero-initialized value if the 8781// iterator has advanced beyond the end of the collection. 8782func (iter LoadBalancerFrontendIPConfigurationListResultIterator) Value() FrontendIPConfiguration { 8783 if !iter.page.NotDone() { 8784 return FrontendIPConfiguration{} 8785 } 8786 return iter.page.Values()[iter.i] 8787} 8788 8789// Creates a new instance of the LoadBalancerFrontendIPConfigurationListResultIterator type. 8790func NewLoadBalancerFrontendIPConfigurationListResultIterator(page LoadBalancerFrontendIPConfigurationListResultPage) LoadBalancerFrontendIPConfigurationListResultIterator { 8791 return LoadBalancerFrontendIPConfigurationListResultIterator{page: page} 8792} 8793 8794// IsEmpty returns true if the ListResult contains no values. 8795func (lbficlr LoadBalancerFrontendIPConfigurationListResult) IsEmpty() bool { 8796 return lbficlr.Value == nil || len(*lbficlr.Value) == 0 8797} 8798 8799// loadBalancerFrontendIPConfigurationListResultPreparer prepares a request to retrieve the next set of results. 8800// It returns nil if no more results exist. 8801func (lbficlr LoadBalancerFrontendIPConfigurationListResult) loadBalancerFrontendIPConfigurationListResultPreparer(ctx context.Context) (*http.Request, error) { 8802 if lbficlr.NextLink == nil || len(to.String(lbficlr.NextLink)) < 1 { 8803 return nil, nil 8804 } 8805 return autorest.Prepare((&http.Request{}).WithContext(ctx), 8806 autorest.AsJSON(), 8807 autorest.AsGet(), 8808 autorest.WithBaseURL(to.String(lbficlr.NextLink))) 8809} 8810 8811// LoadBalancerFrontendIPConfigurationListResultPage contains a page of FrontendIPConfiguration values. 8812type LoadBalancerFrontendIPConfigurationListResultPage struct { 8813 fn func(context.Context, LoadBalancerFrontendIPConfigurationListResult) (LoadBalancerFrontendIPConfigurationListResult, error) 8814 lbficlr LoadBalancerFrontendIPConfigurationListResult 8815} 8816 8817// NextWithContext advances to the next page of values. If there was an error making 8818// the request the page does not advance and the error is returned. 8819func (page *LoadBalancerFrontendIPConfigurationListResultPage) NextWithContext(ctx context.Context) (err error) { 8820 if tracing.IsEnabled() { 8821 ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerFrontendIPConfigurationListResultPage.NextWithContext") 8822 defer func() { 8823 sc := -1 8824 if page.Response().Response.Response != nil { 8825 sc = page.Response().Response.Response.StatusCode 8826 } 8827 tracing.EndSpan(ctx, sc, err) 8828 }() 8829 } 8830 next, err := page.fn(ctx, page.lbficlr) 8831 if err != nil { 8832 return err 8833 } 8834 page.lbficlr = next 8835 return nil 8836} 8837 8838// Next advances to the next page of values. If there was an error making 8839// the request the page does not advance and the error is returned. 8840// Deprecated: Use NextWithContext() instead. 8841func (page *LoadBalancerFrontendIPConfigurationListResultPage) Next() error { 8842 return page.NextWithContext(context.Background()) 8843} 8844 8845// NotDone returns true if the page enumeration should be started or is not yet complete. 8846func (page LoadBalancerFrontendIPConfigurationListResultPage) NotDone() bool { 8847 return !page.lbficlr.IsEmpty() 8848} 8849 8850// Response returns the raw server response from the last page request. 8851func (page LoadBalancerFrontendIPConfigurationListResultPage) Response() LoadBalancerFrontendIPConfigurationListResult { 8852 return page.lbficlr 8853} 8854 8855// Values returns the slice of values for the current page or nil if there are no values. 8856func (page LoadBalancerFrontendIPConfigurationListResultPage) Values() []FrontendIPConfiguration { 8857 if page.lbficlr.IsEmpty() { 8858 return nil 8859 } 8860 return *page.lbficlr.Value 8861} 8862 8863// Creates a new instance of the LoadBalancerFrontendIPConfigurationListResultPage type. 8864func NewLoadBalancerFrontendIPConfigurationListResultPage(getNextPage func(context.Context, LoadBalancerFrontendIPConfigurationListResult) (LoadBalancerFrontendIPConfigurationListResult, error)) LoadBalancerFrontendIPConfigurationListResultPage { 8865 return LoadBalancerFrontendIPConfigurationListResultPage{fn: getNextPage} 8866} 8867 8868// LoadBalancerListResult response for ListLoadBalancers API service call. 8869type LoadBalancerListResult struct { 8870 autorest.Response `json:"-"` 8871 // Value - A list of load balancers in a resource group. 8872 Value *[]LoadBalancer `json:"value,omitempty"` 8873 // NextLink - READ-ONLY; The URL to get the next set of results. 8874 NextLink *string `json:"nextLink,omitempty"` 8875} 8876 8877// LoadBalancerListResultIterator provides access to a complete listing of LoadBalancer values. 8878type LoadBalancerListResultIterator struct { 8879 i int 8880 page LoadBalancerListResultPage 8881} 8882 8883// NextWithContext advances to the next value. If there was an error making 8884// the request the iterator does not advance and the error is returned. 8885func (iter *LoadBalancerListResultIterator) NextWithContext(ctx context.Context) (err error) { 8886 if tracing.IsEnabled() { 8887 ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerListResultIterator.NextWithContext") 8888 defer func() { 8889 sc := -1 8890 if iter.Response().Response.Response != nil { 8891 sc = iter.Response().Response.Response.StatusCode 8892 } 8893 tracing.EndSpan(ctx, sc, err) 8894 }() 8895 } 8896 iter.i++ 8897 if iter.i < len(iter.page.Values()) { 8898 return nil 8899 } 8900 err = iter.page.NextWithContext(ctx) 8901 if err != nil { 8902 iter.i-- 8903 return err 8904 } 8905 iter.i = 0 8906 return nil 8907} 8908 8909// Next advances to the next value. If there was an error making 8910// the request the iterator does not advance and the error is returned. 8911// Deprecated: Use NextWithContext() instead. 8912func (iter *LoadBalancerListResultIterator) Next() error { 8913 return iter.NextWithContext(context.Background()) 8914} 8915 8916// NotDone returns true if the enumeration should be started or is not yet complete. 8917func (iter LoadBalancerListResultIterator) NotDone() bool { 8918 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 8919} 8920 8921// Response returns the raw server response from the last page request. 8922func (iter LoadBalancerListResultIterator) Response() LoadBalancerListResult { 8923 return iter.page.Response() 8924} 8925 8926// Value returns the current value or a zero-initialized value if the 8927// iterator has advanced beyond the end of the collection. 8928func (iter LoadBalancerListResultIterator) Value() LoadBalancer { 8929 if !iter.page.NotDone() { 8930 return LoadBalancer{} 8931 } 8932 return iter.page.Values()[iter.i] 8933} 8934 8935// Creates a new instance of the LoadBalancerListResultIterator type. 8936func NewLoadBalancerListResultIterator(page LoadBalancerListResultPage) LoadBalancerListResultIterator { 8937 return LoadBalancerListResultIterator{page: page} 8938} 8939 8940// IsEmpty returns true if the ListResult contains no values. 8941func (lblr LoadBalancerListResult) IsEmpty() bool { 8942 return lblr.Value == nil || len(*lblr.Value) == 0 8943} 8944 8945// loadBalancerListResultPreparer prepares a request to retrieve the next set of results. 8946// It returns nil if no more results exist. 8947func (lblr LoadBalancerListResult) loadBalancerListResultPreparer(ctx context.Context) (*http.Request, error) { 8948 if lblr.NextLink == nil || len(to.String(lblr.NextLink)) < 1 { 8949 return nil, nil 8950 } 8951 return autorest.Prepare((&http.Request{}).WithContext(ctx), 8952 autorest.AsJSON(), 8953 autorest.AsGet(), 8954 autorest.WithBaseURL(to.String(lblr.NextLink))) 8955} 8956 8957// LoadBalancerListResultPage contains a page of LoadBalancer values. 8958type LoadBalancerListResultPage struct { 8959 fn func(context.Context, LoadBalancerListResult) (LoadBalancerListResult, error) 8960 lblr LoadBalancerListResult 8961} 8962 8963// NextWithContext advances to the next page of values. If there was an error making 8964// the request the page does not advance and the error is returned. 8965func (page *LoadBalancerListResultPage) NextWithContext(ctx context.Context) (err error) { 8966 if tracing.IsEnabled() { 8967 ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerListResultPage.NextWithContext") 8968 defer func() { 8969 sc := -1 8970 if page.Response().Response.Response != nil { 8971 sc = page.Response().Response.Response.StatusCode 8972 } 8973 tracing.EndSpan(ctx, sc, err) 8974 }() 8975 } 8976 next, err := page.fn(ctx, page.lblr) 8977 if err != nil { 8978 return err 8979 } 8980 page.lblr = next 8981 return nil 8982} 8983 8984// Next advances to the next page of values. If there was an error making 8985// the request the page does not advance and the error is returned. 8986// Deprecated: Use NextWithContext() instead. 8987func (page *LoadBalancerListResultPage) Next() error { 8988 return page.NextWithContext(context.Background()) 8989} 8990 8991// NotDone returns true if the page enumeration should be started or is not yet complete. 8992func (page LoadBalancerListResultPage) NotDone() bool { 8993 return !page.lblr.IsEmpty() 8994} 8995 8996// Response returns the raw server response from the last page request. 8997func (page LoadBalancerListResultPage) Response() LoadBalancerListResult { 8998 return page.lblr 8999} 9000 9001// Values returns the slice of values for the current page or nil if there are no values. 9002func (page LoadBalancerListResultPage) Values() []LoadBalancer { 9003 if page.lblr.IsEmpty() { 9004 return nil 9005 } 9006 return *page.lblr.Value 9007} 9008 9009// Creates a new instance of the LoadBalancerListResultPage type. 9010func NewLoadBalancerListResultPage(getNextPage func(context.Context, LoadBalancerListResult) (LoadBalancerListResult, error)) LoadBalancerListResultPage { 9011 return LoadBalancerListResultPage{fn: getNextPage} 9012} 9013 9014// LoadBalancerLoadBalancingRuleListResult response for ListLoadBalancingRule API service call. 9015type LoadBalancerLoadBalancingRuleListResult struct { 9016 autorest.Response `json:"-"` 9017 // Value - A list of load balancing rules in a load balancer. 9018 Value *[]LoadBalancingRule `json:"value,omitempty"` 9019 // NextLink - READ-ONLY; The URL to get the next set of results. 9020 NextLink *string `json:"nextLink,omitempty"` 9021} 9022 9023// LoadBalancerLoadBalancingRuleListResultIterator provides access to a complete listing of 9024// LoadBalancingRule values. 9025type LoadBalancerLoadBalancingRuleListResultIterator struct { 9026 i int 9027 page LoadBalancerLoadBalancingRuleListResultPage 9028} 9029 9030// NextWithContext advances to the next value. If there was an error making 9031// the request the iterator does not advance and the error is returned. 9032func (iter *LoadBalancerLoadBalancingRuleListResultIterator) NextWithContext(ctx context.Context) (err error) { 9033 if tracing.IsEnabled() { 9034 ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerLoadBalancingRuleListResultIterator.NextWithContext") 9035 defer func() { 9036 sc := -1 9037 if iter.Response().Response.Response != nil { 9038 sc = iter.Response().Response.Response.StatusCode 9039 } 9040 tracing.EndSpan(ctx, sc, err) 9041 }() 9042 } 9043 iter.i++ 9044 if iter.i < len(iter.page.Values()) { 9045 return nil 9046 } 9047 err = iter.page.NextWithContext(ctx) 9048 if err != nil { 9049 iter.i-- 9050 return err 9051 } 9052 iter.i = 0 9053 return nil 9054} 9055 9056// Next advances to the next value. If there was an error making 9057// the request the iterator does not advance and the error is returned. 9058// Deprecated: Use NextWithContext() instead. 9059func (iter *LoadBalancerLoadBalancingRuleListResultIterator) Next() error { 9060 return iter.NextWithContext(context.Background()) 9061} 9062 9063// NotDone returns true if the enumeration should be started or is not yet complete. 9064func (iter LoadBalancerLoadBalancingRuleListResultIterator) NotDone() bool { 9065 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 9066} 9067 9068// Response returns the raw server response from the last page request. 9069func (iter LoadBalancerLoadBalancingRuleListResultIterator) Response() LoadBalancerLoadBalancingRuleListResult { 9070 return iter.page.Response() 9071} 9072 9073// Value returns the current value or a zero-initialized value if the 9074// iterator has advanced beyond the end of the collection. 9075func (iter LoadBalancerLoadBalancingRuleListResultIterator) Value() LoadBalancingRule { 9076 if !iter.page.NotDone() { 9077 return LoadBalancingRule{} 9078 } 9079 return iter.page.Values()[iter.i] 9080} 9081 9082// Creates a new instance of the LoadBalancerLoadBalancingRuleListResultIterator type. 9083func NewLoadBalancerLoadBalancingRuleListResultIterator(page LoadBalancerLoadBalancingRuleListResultPage) LoadBalancerLoadBalancingRuleListResultIterator { 9084 return LoadBalancerLoadBalancingRuleListResultIterator{page: page} 9085} 9086 9087// IsEmpty returns true if the ListResult contains no values. 9088func (lblbrlr LoadBalancerLoadBalancingRuleListResult) IsEmpty() bool { 9089 return lblbrlr.Value == nil || len(*lblbrlr.Value) == 0 9090} 9091 9092// loadBalancerLoadBalancingRuleListResultPreparer prepares a request to retrieve the next set of results. 9093// It returns nil if no more results exist. 9094func (lblbrlr LoadBalancerLoadBalancingRuleListResult) loadBalancerLoadBalancingRuleListResultPreparer(ctx context.Context) (*http.Request, error) { 9095 if lblbrlr.NextLink == nil || len(to.String(lblbrlr.NextLink)) < 1 { 9096 return nil, nil 9097 } 9098 return autorest.Prepare((&http.Request{}).WithContext(ctx), 9099 autorest.AsJSON(), 9100 autorest.AsGet(), 9101 autorest.WithBaseURL(to.String(lblbrlr.NextLink))) 9102} 9103 9104// LoadBalancerLoadBalancingRuleListResultPage contains a page of LoadBalancingRule values. 9105type LoadBalancerLoadBalancingRuleListResultPage struct { 9106 fn func(context.Context, LoadBalancerLoadBalancingRuleListResult) (LoadBalancerLoadBalancingRuleListResult, error) 9107 lblbrlr LoadBalancerLoadBalancingRuleListResult 9108} 9109 9110// NextWithContext advances to the next page of values. If there was an error making 9111// the request the page does not advance and the error is returned. 9112func (page *LoadBalancerLoadBalancingRuleListResultPage) NextWithContext(ctx context.Context) (err error) { 9113 if tracing.IsEnabled() { 9114 ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerLoadBalancingRuleListResultPage.NextWithContext") 9115 defer func() { 9116 sc := -1 9117 if page.Response().Response.Response != nil { 9118 sc = page.Response().Response.Response.StatusCode 9119 } 9120 tracing.EndSpan(ctx, sc, err) 9121 }() 9122 } 9123 next, err := page.fn(ctx, page.lblbrlr) 9124 if err != nil { 9125 return err 9126 } 9127 page.lblbrlr = next 9128 return nil 9129} 9130 9131// Next advances to the next page of values. If there was an error making 9132// the request the page does not advance and the error is returned. 9133// Deprecated: Use NextWithContext() instead. 9134func (page *LoadBalancerLoadBalancingRuleListResultPage) Next() error { 9135 return page.NextWithContext(context.Background()) 9136} 9137 9138// NotDone returns true if the page enumeration should be started or is not yet complete. 9139func (page LoadBalancerLoadBalancingRuleListResultPage) NotDone() bool { 9140 return !page.lblbrlr.IsEmpty() 9141} 9142 9143// Response returns the raw server response from the last page request. 9144func (page LoadBalancerLoadBalancingRuleListResultPage) Response() LoadBalancerLoadBalancingRuleListResult { 9145 return page.lblbrlr 9146} 9147 9148// Values returns the slice of values for the current page or nil if there are no values. 9149func (page LoadBalancerLoadBalancingRuleListResultPage) Values() []LoadBalancingRule { 9150 if page.lblbrlr.IsEmpty() { 9151 return nil 9152 } 9153 return *page.lblbrlr.Value 9154} 9155 9156// Creates a new instance of the LoadBalancerLoadBalancingRuleListResultPage type. 9157func NewLoadBalancerLoadBalancingRuleListResultPage(getNextPage func(context.Context, LoadBalancerLoadBalancingRuleListResult) (LoadBalancerLoadBalancingRuleListResult, error)) LoadBalancerLoadBalancingRuleListResultPage { 9158 return LoadBalancerLoadBalancingRuleListResultPage{fn: getNextPage} 9159} 9160 9161// LoadBalancerProbeListResult response for ListProbe API service call. 9162type LoadBalancerProbeListResult struct { 9163 autorest.Response `json:"-"` 9164 // Value - A list of probes in a load balancer. 9165 Value *[]Probe `json:"value,omitempty"` 9166 // NextLink - READ-ONLY; The URL to get the next set of results. 9167 NextLink *string `json:"nextLink,omitempty"` 9168} 9169 9170// LoadBalancerProbeListResultIterator provides access to a complete listing of Probe values. 9171type LoadBalancerProbeListResultIterator struct { 9172 i int 9173 page LoadBalancerProbeListResultPage 9174} 9175 9176// NextWithContext advances to the next value. If there was an error making 9177// the request the iterator does not advance and the error is returned. 9178func (iter *LoadBalancerProbeListResultIterator) NextWithContext(ctx context.Context) (err error) { 9179 if tracing.IsEnabled() { 9180 ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerProbeListResultIterator.NextWithContext") 9181 defer func() { 9182 sc := -1 9183 if iter.Response().Response.Response != nil { 9184 sc = iter.Response().Response.Response.StatusCode 9185 } 9186 tracing.EndSpan(ctx, sc, err) 9187 }() 9188 } 9189 iter.i++ 9190 if iter.i < len(iter.page.Values()) { 9191 return nil 9192 } 9193 err = iter.page.NextWithContext(ctx) 9194 if err != nil { 9195 iter.i-- 9196 return err 9197 } 9198 iter.i = 0 9199 return nil 9200} 9201 9202// Next advances to the next value. If there was an error making 9203// the request the iterator does not advance and the error is returned. 9204// Deprecated: Use NextWithContext() instead. 9205func (iter *LoadBalancerProbeListResultIterator) Next() error { 9206 return iter.NextWithContext(context.Background()) 9207} 9208 9209// NotDone returns true if the enumeration should be started or is not yet complete. 9210func (iter LoadBalancerProbeListResultIterator) NotDone() bool { 9211 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 9212} 9213 9214// Response returns the raw server response from the last page request. 9215func (iter LoadBalancerProbeListResultIterator) Response() LoadBalancerProbeListResult { 9216 return iter.page.Response() 9217} 9218 9219// Value returns the current value or a zero-initialized value if the 9220// iterator has advanced beyond the end of the collection. 9221func (iter LoadBalancerProbeListResultIterator) Value() Probe { 9222 if !iter.page.NotDone() { 9223 return Probe{} 9224 } 9225 return iter.page.Values()[iter.i] 9226} 9227 9228// Creates a new instance of the LoadBalancerProbeListResultIterator type. 9229func NewLoadBalancerProbeListResultIterator(page LoadBalancerProbeListResultPage) LoadBalancerProbeListResultIterator { 9230 return LoadBalancerProbeListResultIterator{page: page} 9231} 9232 9233// IsEmpty returns true if the ListResult contains no values. 9234func (lbplr LoadBalancerProbeListResult) IsEmpty() bool { 9235 return lbplr.Value == nil || len(*lbplr.Value) == 0 9236} 9237 9238// loadBalancerProbeListResultPreparer prepares a request to retrieve the next set of results. 9239// It returns nil if no more results exist. 9240func (lbplr LoadBalancerProbeListResult) loadBalancerProbeListResultPreparer(ctx context.Context) (*http.Request, error) { 9241 if lbplr.NextLink == nil || len(to.String(lbplr.NextLink)) < 1 { 9242 return nil, nil 9243 } 9244 return autorest.Prepare((&http.Request{}).WithContext(ctx), 9245 autorest.AsJSON(), 9246 autorest.AsGet(), 9247 autorest.WithBaseURL(to.String(lbplr.NextLink))) 9248} 9249 9250// LoadBalancerProbeListResultPage contains a page of Probe values. 9251type LoadBalancerProbeListResultPage struct { 9252 fn func(context.Context, LoadBalancerProbeListResult) (LoadBalancerProbeListResult, error) 9253 lbplr LoadBalancerProbeListResult 9254} 9255 9256// NextWithContext advances to the next page of values. If there was an error making 9257// the request the page does not advance and the error is returned. 9258func (page *LoadBalancerProbeListResultPage) NextWithContext(ctx context.Context) (err error) { 9259 if tracing.IsEnabled() { 9260 ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerProbeListResultPage.NextWithContext") 9261 defer func() { 9262 sc := -1 9263 if page.Response().Response.Response != nil { 9264 sc = page.Response().Response.Response.StatusCode 9265 } 9266 tracing.EndSpan(ctx, sc, err) 9267 }() 9268 } 9269 next, err := page.fn(ctx, page.lbplr) 9270 if err != nil { 9271 return err 9272 } 9273 page.lbplr = next 9274 return nil 9275} 9276 9277// Next advances to the next page of values. If there was an error making 9278// the request the page does not advance and the error is returned. 9279// Deprecated: Use NextWithContext() instead. 9280func (page *LoadBalancerProbeListResultPage) Next() error { 9281 return page.NextWithContext(context.Background()) 9282} 9283 9284// NotDone returns true if the page enumeration should be started or is not yet complete. 9285func (page LoadBalancerProbeListResultPage) NotDone() bool { 9286 return !page.lbplr.IsEmpty() 9287} 9288 9289// Response returns the raw server response from the last page request. 9290func (page LoadBalancerProbeListResultPage) Response() LoadBalancerProbeListResult { 9291 return page.lbplr 9292} 9293 9294// Values returns the slice of values for the current page or nil if there are no values. 9295func (page LoadBalancerProbeListResultPage) Values() []Probe { 9296 if page.lbplr.IsEmpty() { 9297 return nil 9298 } 9299 return *page.lbplr.Value 9300} 9301 9302// Creates a new instance of the LoadBalancerProbeListResultPage type. 9303func NewLoadBalancerProbeListResultPage(getNextPage func(context.Context, LoadBalancerProbeListResult) (LoadBalancerProbeListResult, error)) LoadBalancerProbeListResultPage { 9304 return LoadBalancerProbeListResultPage{fn: getNextPage} 9305} 9306 9307// LoadBalancerPropertiesFormat properties of the load balancer. 9308type LoadBalancerPropertiesFormat struct { 9309 // FrontendIPConfigurations - Object representing the frontend IPs to be used for the load balancer 9310 FrontendIPConfigurations *[]FrontendIPConfiguration `json:"frontendIPConfigurations,omitempty"` 9311 // BackendAddressPools - Collection of backend address pools used by a load balancer 9312 BackendAddressPools *[]BackendAddressPool `json:"backendAddressPools,omitempty"` 9313 // LoadBalancingRules - Object collection representing the load balancing rules Gets the provisioning 9314 LoadBalancingRules *[]LoadBalancingRule `json:"loadBalancingRules,omitempty"` 9315 // Probes - Collection of probe objects used in the load balancer 9316 Probes *[]Probe `json:"probes,omitempty"` 9317 // InboundNatRules - Collection of inbound NAT Rules used by a load balancer. Defining inbound NAT rules on your load balancer is mutually exclusive with defining an inbound NAT pool. Inbound NAT pools are referenced from virtual machine scale sets. NICs that are associated with individual virtual machines cannot reference an Inbound NAT pool. They have to reference individual inbound NAT rules. 9318 InboundNatRules *[]InboundNatRule `json:"inboundNatRules,omitempty"` 9319 // InboundNatPools - Defines an external port range for inbound NAT to a single backend port on NICs associated with a load balancer. Inbound NAT rules are created automatically for each NIC associated with the Load Balancer using an external port from this range. Defining an Inbound NAT pool on your Load Balancer is mutually exclusive with defining inbound Nat rules. Inbound NAT pools are referenced from virtual machine scale sets. NICs that are associated with individual virtual machines cannot reference an inbound NAT pool. They have to reference individual inbound NAT rules. 9320 InboundNatPools *[]InboundNatPool `json:"inboundNatPools,omitempty"` 9321 // OutboundNatRules - The outbound NAT rules. 9322 OutboundNatRules *[]OutboundNatRule `json:"outboundNatRules,omitempty"` 9323 // ResourceGUID - The resource GUID property of the load balancer resource. 9324 ResourceGUID *string `json:"resourceGuid,omitempty"` 9325 // ProvisioningState - Gets the provisioning state of the PublicIP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. 9326 ProvisioningState *string `json:"provisioningState,omitempty"` 9327} 9328 9329// LoadBalancersCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a 9330// long-running operation. 9331type LoadBalancersCreateOrUpdateFuture struct { 9332 azure.Future 9333} 9334 9335// Result returns the result of the asynchronous operation. 9336// If the operation has not completed it will return an error. 9337func (future *LoadBalancersCreateOrUpdateFuture) Result(client LoadBalancersClient) (lb LoadBalancer, err error) { 9338 var done bool 9339 done, err = future.DoneWithContext(context.Background(), client) 9340 if err != nil { 9341 err = autorest.NewErrorWithError(err, "network.LoadBalancersCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") 9342 return 9343 } 9344 if !done { 9345 err = azure.NewAsyncOpIncompleteError("network.LoadBalancersCreateOrUpdateFuture") 9346 return 9347 } 9348 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 9349 if lb.Response.Response, err = future.GetResult(sender); err == nil && lb.Response.Response.StatusCode != http.StatusNoContent { 9350 lb, err = client.CreateOrUpdateResponder(lb.Response.Response) 9351 if err != nil { 9352 err = autorest.NewErrorWithError(err, "network.LoadBalancersCreateOrUpdateFuture", "Result", lb.Response.Response, "Failure responding to request") 9353 } 9354 } 9355 return 9356} 9357 9358// LoadBalancersDeleteFuture an abstraction for monitoring and retrieving the results of a long-running 9359// operation. 9360type LoadBalancersDeleteFuture struct { 9361 azure.Future 9362} 9363 9364// Result returns the result of the asynchronous operation. 9365// If the operation has not completed it will return an error. 9366func (future *LoadBalancersDeleteFuture) Result(client LoadBalancersClient) (ar autorest.Response, err error) { 9367 var done bool 9368 done, err = future.DoneWithContext(context.Background(), client) 9369 if err != nil { 9370 err = autorest.NewErrorWithError(err, "network.LoadBalancersDeleteFuture", "Result", future.Response(), "Polling failure") 9371 return 9372 } 9373 if !done { 9374 err = azure.NewAsyncOpIncompleteError("network.LoadBalancersDeleteFuture") 9375 return 9376 } 9377 ar.Response = future.Response() 9378 return 9379} 9380 9381// LoadBalancerSku SKU of a load balancer 9382type LoadBalancerSku struct { 9383 // Name - Name of a load balancer SKU. Possible values include: 'LoadBalancerSkuNameBasic', 'LoadBalancerSkuNameStandard' 9384 Name LoadBalancerSkuName `json:"name,omitempty"` 9385} 9386 9387// LoadBalancersUpdateTagsFuture an abstraction for monitoring and retrieving the results of a long-running 9388// operation. 9389type LoadBalancersUpdateTagsFuture struct { 9390 azure.Future 9391} 9392 9393// Result returns the result of the asynchronous operation. 9394// If the operation has not completed it will return an error. 9395func (future *LoadBalancersUpdateTagsFuture) Result(client LoadBalancersClient) (lb LoadBalancer, err error) { 9396 var done bool 9397 done, err = future.DoneWithContext(context.Background(), client) 9398 if err != nil { 9399 err = autorest.NewErrorWithError(err, "network.LoadBalancersUpdateTagsFuture", "Result", future.Response(), "Polling failure") 9400 return 9401 } 9402 if !done { 9403 err = azure.NewAsyncOpIncompleteError("network.LoadBalancersUpdateTagsFuture") 9404 return 9405 } 9406 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 9407 if lb.Response.Response, err = future.GetResult(sender); err == nil && lb.Response.Response.StatusCode != http.StatusNoContent { 9408 lb, err = client.UpdateTagsResponder(lb.Response.Response) 9409 if err != nil { 9410 err = autorest.NewErrorWithError(err, "network.LoadBalancersUpdateTagsFuture", "Result", lb.Response.Response, "Failure responding to request") 9411 } 9412 } 9413 return 9414} 9415 9416// LoadBalancingRule a load balancing rule for a load balancer. 9417type LoadBalancingRule struct { 9418 autorest.Response `json:"-"` 9419 // LoadBalancingRulePropertiesFormat - Properties of load balancer load balancing rule. 9420 *LoadBalancingRulePropertiesFormat `json:"properties,omitempty"` 9421 // Name - The name of the resource that is unique within a resource group. This name can be used to access the resource. 9422 Name *string `json:"name,omitempty"` 9423 // Etag - A unique read-only string that changes whenever the resource is updated. 9424 Etag *string `json:"etag,omitempty"` 9425 // ID - Resource ID. 9426 ID *string `json:"id,omitempty"` 9427} 9428 9429// MarshalJSON is the custom marshaler for LoadBalancingRule. 9430func (lbr LoadBalancingRule) MarshalJSON() ([]byte, error) { 9431 objectMap := make(map[string]interface{}) 9432 if lbr.LoadBalancingRulePropertiesFormat != nil { 9433 objectMap["properties"] = lbr.LoadBalancingRulePropertiesFormat 9434 } 9435 if lbr.Name != nil { 9436 objectMap["name"] = lbr.Name 9437 } 9438 if lbr.Etag != nil { 9439 objectMap["etag"] = lbr.Etag 9440 } 9441 if lbr.ID != nil { 9442 objectMap["id"] = lbr.ID 9443 } 9444 return json.Marshal(objectMap) 9445} 9446 9447// UnmarshalJSON is the custom unmarshaler for LoadBalancingRule struct. 9448func (lbr *LoadBalancingRule) UnmarshalJSON(body []byte) error { 9449 var m map[string]*json.RawMessage 9450 err := json.Unmarshal(body, &m) 9451 if err != nil { 9452 return err 9453 } 9454 for k, v := range m { 9455 switch k { 9456 case "properties": 9457 if v != nil { 9458 var loadBalancingRulePropertiesFormat LoadBalancingRulePropertiesFormat 9459 err = json.Unmarshal(*v, &loadBalancingRulePropertiesFormat) 9460 if err != nil { 9461 return err 9462 } 9463 lbr.LoadBalancingRulePropertiesFormat = &loadBalancingRulePropertiesFormat 9464 } 9465 case "name": 9466 if v != nil { 9467 var name string 9468 err = json.Unmarshal(*v, &name) 9469 if err != nil { 9470 return err 9471 } 9472 lbr.Name = &name 9473 } 9474 case "etag": 9475 if v != nil { 9476 var etag string 9477 err = json.Unmarshal(*v, &etag) 9478 if err != nil { 9479 return err 9480 } 9481 lbr.Etag = &etag 9482 } 9483 case "id": 9484 if v != nil { 9485 var ID string 9486 err = json.Unmarshal(*v, &ID) 9487 if err != nil { 9488 return err 9489 } 9490 lbr.ID = &ID 9491 } 9492 } 9493 } 9494 9495 return nil 9496} 9497 9498// LoadBalancingRulePropertiesFormat properties of the load balancer. 9499type LoadBalancingRulePropertiesFormat struct { 9500 // FrontendIPConfiguration - A reference to frontend IP addresses. 9501 FrontendIPConfiguration *SubResource `json:"frontendIPConfiguration,omitempty"` 9502 // BackendAddressPool - A reference to a pool of DIPs. Inbound traffic is randomly load balanced across IPs in the backend IPs. 9503 BackendAddressPool *SubResource `json:"backendAddressPool,omitempty"` 9504 // Probe - The reference of the load balancer probe used by the load balancing rule. 9505 Probe *SubResource `json:"probe,omitempty"` 9506 // Protocol - Possible values include: 'TransportProtocolUDP', 'TransportProtocolTCP', 'TransportProtocolAll' 9507 Protocol TransportProtocol `json:"protocol,omitempty"` 9508 // LoadDistribution - The load distribution policy for this rule. Possible values are 'Default', 'SourceIP', and 'SourceIPProtocol'. Possible values include: 'Default', 'SourceIP', 'SourceIPProtocol' 9509 LoadDistribution LoadDistribution `json:"loadDistribution,omitempty"` 9510 // FrontendPort - The port for the external endpoint. Port numbers for each rule must be unique within the Load Balancer. Acceptable values are between 0 and 65534. Note that value 0 enables "Any Port" 9511 FrontendPort *int32 `json:"frontendPort,omitempty"` 9512 // BackendPort - The port used for internal connections on the endpoint. Acceptable values are between 0 and 65535. Note that value 0 enables "Any Port" 9513 BackendPort *int32 `json:"backendPort,omitempty"` 9514 // IdleTimeoutInMinutes - 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. 9515 IdleTimeoutInMinutes *int32 `json:"idleTimeoutInMinutes,omitempty"` 9516 // 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 AlwaysOn Availability Groups in SQL server. This setting can't be changed after you create the endpoint. 9517 EnableFloatingIP *bool `json:"enableFloatingIP,omitempty"` 9518 // DisableOutboundSnat - Configures SNAT for the VMs in the backend pool to use the publicIP address specified in the frontend of the load balancing rule. 9519 DisableOutboundSnat *bool `json:"disableOutboundSnat,omitempty"` 9520 // ProvisioningState - Gets the provisioning state of the PublicIP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. 9521 ProvisioningState *string `json:"provisioningState,omitempty"` 9522} 9523 9524// LocalNetworkGateway a common class for general resource information 9525type LocalNetworkGateway struct { 9526 autorest.Response `json:"-"` 9527 // LocalNetworkGatewayPropertiesFormat - Properties of the local network gateway. 9528 *LocalNetworkGatewayPropertiesFormat `json:"properties,omitempty"` 9529 // Etag - A unique read-only string that changes whenever the resource is updated. 9530 Etag *string `json:"etag,omitempty"` 9531 // ID - Resource ID. 9532 ID *string `json:"id,omitempty"` 9533 // Name - READ-ONLY; Resource name. 9534 Name *string `json:"name,omitempty"` 9535 // Type - READ-ONLY; Resource type. 9536 Type *string `json:"type,omitempty"` 9537 // Location - Resource location. 9538 Location *string `json:"location,omitempty"` 9539 // Tags - Resource tags. 9540 Tags map[string]*string `json:"tags"` 9541} 9542 9543// MarshalJSON is the custom marshaler for LocalNetworkGateway. 9544func (lng LocalNetworkGateway) MarshalJSON() ([]byte, error) { 9545 objectMap := make(map[string]interface{}) 9546 if lng.LocalNetworkGatewayPropertiesFormat != nil { 9547 objectMap["properties"] = lng.LocalNetworkGatewayPropertiesFormat 9548 } 9549 if lng.Etag != nil { 9550 objectMap["etag"] = lng.Etag 9551 } 9552 if lng.ID != nil { 9553 objectMap["id"] = lng.ID 9554 } 9555 if lng.Location != nil { 9556 objectMap["location"] = lng.Location 9557 } 9558 if lng.Tags != nil { 9559 objectMap["tags"] = lng.Tags 9560 } 9561 return json.Marshal(objectMap) 9562} 9563 9564// UnmarshalJSON is the custom unmarshaler for LocalNetworkGateway struct. 9565func (lng *LocalNetworkGateway) UnmarshalJSON(body []byte) error { 9566 var m map[string]*json.RawMessage 9567 err := json.Unmarshal(body, &m) 9568 if err != nil { 9569 return err 9570 } 9571 for k, v := range m { 9572 switch k { 9573 case "properties": 9574 if v != nil { 9575 var localNetworkGatewayPropertiesFormat LocalNetworkGatewayPropertiesFormat 9576 err = json.Unmarshal(*v, &localNetworkGatewayPropertiesFormat) 9577 if err != nil { 9578 return err 9579 } 9580 lng.LocalNetworkGatewayPropertiesFormat = &localNetworkGatewayPropertiesFormat 9581 } 9582 case "etag": 9583 if v != nil { 9584 var etag string 9585 err = json.Unmarshal(*v, &etag) 9586 if err != nil { 9587 return err 9588 } 9589 lng.Etag = &etag 9590 } 9591 case "id": 9592 if v != nil { 9593 var ID string 9594 err = json.Unmarshal(*v, &ID) 9595 if err != nil { 9596 return err 9597 } 9598 lng.ID = &ID 9599 } 9600 case "name": 9601 if v != nil { 9602 var name string 9603 err = json.Unmarshal(*v, &name) 9604 if err != nil { 9605 return err 9606 } 9607 lng.Name = &name 9608 } 9609 case "type": 9610 if v != nil { 9611 var typeVar string 9612 err = json.Unmarshal(*v, &typeVar) 9613 if err != nil { 9614 return err 9615 } 9616 lng.Type = &typeVar 9617 } 9618 case "location": 9619 if v != nil { 9620 var location string 9621 err = json.Unmarshal(*v, &location) 9622 if err != nil { 9623 return err 9624 } 9625 lng.Location = &location 9626 } 9627 case "tags": 9628 if v != nil { 9629 var tags map[string]*string 9630 err = json.Unmarshal(*v, &tags) 9631 if err != nil { 9632 return err 9633 } 9634 lng.Tags = tags 9635 } 9636 } 9637 } 9638 9639 return nil 9640} 9641 9642// LocalNetworkGatewayListResult response for ListLocalNetworkGateways API service call. 9643type LocalNetworkGatewayListResult struct { 9644 autorest.Response `json:"-"` 9645 // Value - A list of local network gateways that exists in a resource group. 9646 Value *[]LocalNetworkGateway `json:"value,omitempty"` 9647 // NextLink - READ-ONLY; The URL to get the next set of results. 9648 NextLink *string `json:"nextLink,omitempty"` 9649} 9650 9651// LocalNetworkGatewayListResultIterator provides access to a complete listing of LocalNetworkGateway 9652// values. 9653type LocalNetworkGatewayListResultIterator struct { 9654 i int 9655 page LocalNetworkGatewayListResultPage 9656} 9657 9658// NextWithContext advances to the next value. If there was an error making 9659// the request the iterator does not advance and the error is returned. 9660func (iter *LocalNetworkGatewayListResultIterator) NextWithContext(ctx context.Context) (err error) { 9661 if tracing.IsEnabled() { 9662 ctx = tracing.StartSpan(ctx, fqdn+"/LocalNetworkGatewayListResultIterator.NextWithContext") 9663 defer func() { 9664 sc := -1 9665 if iter.Response().Response.Response != nil { 9666 sc = iter.Response().Response.Response.StatusCode 9667 } 9668 tracing.EndSpan(ctx, sc, err) 9669 }() 9670 } 9671 iter.i++ 9672 if iter.i < len(iter.page.Values()) { 9673 return nil 9674 } 9675 err = iter.page.NextWithContext(ctx) 9676 if err != nil { 9677 iter.i-- 9678 return err 9679 } 9680 iter.i = 0 9681 return nil 9682} 9683 9684// Next advances to the next value. If there was an error making 9685// the request the iterator does not advance and the error is returned. 9686// Deprecated: Use NextWithContext() instead. 9687func (iter *LocalNetworkGatewayListResultIterator) Next() error { 9688 return iter.NextWithContext(context.Background()) 9689} 9690 9691// NotDone returns true if the enumeration should be started or is not yet complete. 9692func (iter LocalNetworkGatewayListResultIterator) NotDone() bool { 9693 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 9694} 9695 9696// Response returns the raw server response from the last page request. 9697func (iter LocalNetworkGatewayListResultIterator) Response() LocalNetworkGatewayListResult { 9698 return iter.page.Response() 9699} 9700 9701// Value returns the current value or a zero-initialized value if the 9702// iterator has advanced beyond the end of the collection. 9703func (iter LocalNetworkGatewayListResultIterator) Value() LocalNetworkGateway { 9704 if !iter.page.NotDone() { 9705 return LocalNetworkGateway{} 9706 } 9707 return iter.page.Values()[iter.i] 9708} 9709 9710// Creates a new instance of the LocalNetworkGatewayListResultIterator type. 9711func NewLocalNetworkGatewayListResultIterator(page LocalNetworkGatewayListResultPage) LocalNetworkGatewayListResultIterator { 9712 return LocalNetworkGatewayListResultIterator{page: page} 9713} 9714 9715// IsEmpty returns true if the ListResult contains no values. 9716func (lnglr LocalNetworkGatewayListResult) IsEmpty() bool { 9717 return lnglr.Value == nil || len(*lnglr.Value) == 0 9718} 9719 9720// localNetworkGatewayListResultPreparer prepares a request to retrieve the next set of results. 9721// It returns nil if no more results exist. 9722func (lnglr LocalNetworkGatewayListResult) localNetworkGatewayListResultPreparer(ctx context.Context) (*http.Request, error) { 9723 if lnglr.NextLink == nil || len(to.String(lnglr.NextLink)) < 1 { 9724 return nil, nil 9725 } 9726 return autorest.Prepare((&http.Request{}).WithContext(ctx), 9727 autorest.AsJSON(), 9728 autorest.AsGet(), 9729 autorest.WithBaseURL(to.String(lnglr.NextLink))) 9730} 9731 9732// LocalNetworkGatewayListResultPage contains a page of LocalNetworkGateway values. 9733type LocalNetworkGatewayListResultPage struct { 9734 fn func(context.Context, LocalNetworkGatewayListResult) (LocalNetworkGatewayListResult, error) 9735 lnglr LocalNetworkGatewayListResult 9736} 9737 9738// NextWithContext advances to the next page of values. If there was an error making 9739// the request the page does not advance and the error is returned. 9740func (page *LocalNetworkGatewayListResultPage) NextWithContext(ctx context.Context) (err error) { 9741 if tracing.IsEnabled() { 9742 ctx = tracing.StartSpan(ctx, fqdn+"/LocalNetworkGatewayListResultPage.NextWithContext") 9743 defer func() { 9744 sc := -1 9745 if page.Response().Response.Response != nil { 9746 sc = page.Response().Response.Response.StatusCode 9747 } 9748 tracing.EndSpan(ctx, sc, err) 9749 }() 9750 } 9751 next, err := page.fn(ctx, page.lnglr) 9752 if err != nil { 9753 return err 9754 } 9755 page.lnglr = next 9756 return nil 9757} 9758 9759// Next advances to the next page of values. If there was an error making 9760// the request the page does not advance and the error is returned. 9761// Deprecated: Use NextWithContext() instead. 9762func (page *LocalNetworkGatewayListResultPage) Next() error { 9763 return page.NextWithContext(context.Background()) 9764} 9765 9766// NotDone returns true if the page enumeration should be started or is not yet complete. 9767func (page LocalNetworkGatewayListResultPage) NotDone() bool { 9768 return !page.lnglr.IsEmpty() 9769} 9770 9771// Response returns the raw server response from the last page request. 9772func (page LocalNetworkGatewayListResultPage) Response() LocalNetworkGatewayListResult { 9773 return page.lnglr 9774} 9775 9776// Values returns the slice of values for the current page or nil if there are no values. 9777func (page LocalNetworkGatewayListResultPage) Values() []LocalNetworkGateway { 9778 if page.lnglr.IsEmpty() { 9779 return nil 9780 } 9781 return *page.lnglr.Value 9782} 9783 9784// Creates a new instance of the LocalNetworkGatewayListResultPage type. 9785func NewLocalNetworkGatewayListResultPage(getNextPage func(context.Context, LocalNetworkGatewayListResult) (LocalNetworkGatewayListResult, error)) LocalNetworkGatewayListResultPage { 9786 return LocalNetworkGatewayListResultPage{fn: getNextPage} 9787} 9788 9789// LocalNetworkGatewayPropertiesFormat localNetworkGateway properties 9790type LocalNetworkGatewayPropertiesFormat struct { 9791 // LocalNetworkAddressSpace - Local network site address space. 9792 LocalNetworkAddressSpace *AddressSpace `json:"localNetworkAddressSpace,omitempty"` 9793 // GatewayIPAddress - IP address of local network gateway. 9794 GatewayIPAddress *string `json:"gatewayIpAddress,omitempty"` 9795 // BgpSettings - Local network gateway's BGP speaker settings. 9796 BgpSettings *BgpSettings `json:"bgpSettings,omitempty"` 9797 // ResourceGUID - The resource GUID property of the LocalNetworkGateway resource. 9798 ResourceGUID *string `json:"resourceGuid,omitempty"` 9799 // ProvisioningState - READ-ONLY; The provisioning state of the LocalNetworkGateway resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. 9800 ProvisioningState *string `json:"provisioningState,omitempty"` 9801} 9802 9803// LocalNetworkGatewaysCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a 9804// long-running operation. 9805type LocalNetworkGatewaysCreateOrUpdateFuture struct { 9806 azure.Future 9807} 9808 9809// Result returns the result of the asynchronous operation. 9810// If the operation has not completed it will return an error. 9811func (future *LocalNetworkGatewaysCreateOrUpdateFuture) Result(client LocalNetworkGatewaysClient) (lng LocalNetworkGateway, err error) { 9812 var done bool 9813 done, err = future.DoneWithContext(context.Background(), client) 9814 if err != nil { 9815 err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") 9816 return 9817 } 9818 if !done { 9819 err = azure.NewAsyncOpIncompleteError("network.LocalNetworkGatewaysCreateOrUpdateFuture") 9820 return 9821 } 9822 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 9823 if lng.Response.Response, err = future.GetResult(sender); err == nil && lng.Response.Response.StatusCode != http.StatusNoContent { 9824 lng, err = client.CreateOrUpdateResponder(lng.Response.Response) 9825 if err != nil { 9826 err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysCreateOrUpdateFuture", "Result", lng.Response.Response, "Failure responding to request") 9827 } 9828 } 9829 return 9830} 9831 9832// LocalNetworkGatewaysDeleteFuture an abstraction for monitoring and retrieving the results of a 9833// long-running operation. 9834type LocalNetworkGatewaysDeleteFuture struct { 9835 azure.Future 9836} 9837 9838// Result returns the result of the asynchronous operation. 9839// If the operation has not completed it will return an error. 9840func (future *LocalNetworkGatewaysDeleteFuture) Result(client LocalNetworkGatewaysClient) (ar autorest.Response, err error) { 9841 var done bool 9842 done, err = future.DoneWithContext(context.Background(), client) 9843 if err != nil { 9844 err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysDeleteFuture", "Result", future.Response(), "Polling failure") 9845 return 9846 } 9847 if !done { 9848 err = azure.NewAsyncOpIncompleteError("network.LocalNetworkGatewaysDeleteFuture") 9849 return 9850 } 9851 ar.Response = future.Response() 9852 return 9853} 9854 9855// LocalNetworkGatewaysUpdateTagsFuture an abstraction for monitoring and retrieving the results of a 9856// long-running operation. 9857type LocalNetworkGatewaysUpdateTagsFuture struct { 9858 azure.Future 9859} 9860 9861// Result returns the result of the asynchronous operation. 9862// If the operation has not completed it will return an error. 9863func (future *LocalNetworkGatewaysUpdateTagsFuture) Result(client LocalNetworkGatewaysClient) (lng LocalNetworkGateway, err error) { 9864 var done bool 9865 done, err = future.DoneWithContext(context.Background(), client) 9866 if err != nil { 9867 err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysUpdateTagsFuture", "Result", future.Response(), "Polling failure") 9868 return 9869 } 9870 if !done { 9871 err = azure.NewAsyncOpIncompleteError("network.LocalNetworkGatewaysUpdateTagsFuture") 9872 return 9873 } 9874 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 9875 if lng.Response.Response, err = future.GetResult(sender); err == nil && lng.Response.Response.StatusCode != http.StatusNoContent { 9876 lng, err = client.UpdateTagsResponder(lng.Response.Response) 9877 if err != nil { 9878 err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysUpdateTagsFuture", "Result", lng.Response.Response, "Failure responding to request") 9879 } 9880 } 9881 return 9882} 9883 9884// LogSpecification description of logging specification. 9885type LogSpecification struct { 9886 // Name - The name of the specification. 9887 Name *string `json:"name,omitempty"` 9888 // DisplayName - The display name of the specification. 9889 DisplayName *string `json:"displayName,omitempty"` 9890 // BlobDuration - Duration of the blob. 9891 BlobDuration *string `json:"blobDuration,omitempty"` 9892} 9893 9894// MetricSpecification description of metrics specification. 9895type MetricSpecification struct { 9896 // Name - The name of the metric. 9897 Name *string `json:"name,omitempty"` 9898 // DisplayName - The display name of the metric. 9899 DisplayName *string `json:"displayName,omitempty"` 9900 // DisplayDescription - The description of the metric. 9901 DisplayDescription *string `json:"displayDescription,omitempty"` 9902 // Unit - Units the metric to be displayed in. 9903 Unit *string `json:"unit,omitempty"` 9904 // AggregationType - The aggregation type. 9905 AggregationType *string `json:"aggregationType,omitempty"` 9906 // Availabilities - List of availability. 9907 Availabilities *[]Availability `json:"availabilities,omitempty"` 9908 // EnableRegionalMdmAccount - Whether regional MDM account enabled. 9909 EnableRegionalMdmAccount *bool `json:"enableRegionalMdmAccount,omitempty"` 9910 // FillGapWithZero - Whether gaps would be filled with zeros. 9911 FillGapWithZero *bool `json:"fillGapWithZero,omitempty"` 9912 // MetricFilterPattern - Pattern for the filter of the metric. 9913 MetricFilterPattern *string `json:"metricFilterPattern,omitempty"` 9914 // Dimensions - List of dimensions. 9915 Dimensions *[]Dimension `json:"dimensions,omitempty"` 9916 // IsInternal - Whether the metric is internal. 9917 IsInternal *bool `json:"isInternal,omitempty"` 9918 // SourceMdmAccount - The source MDM account. 9919 SourceMdmAccount *string `json:"sourceMdmAccount,omitempty"` 9920 // SourceMdmNamespace - The source MDM namespace. 9921 SourceMdmNamespace *string `json:"sourceMdmNamespace,omitempty"` 9922 // ResourceIDDimensionNameOverride - The resource Id dimension name override. 9923 ResourceIDDimensionNameOverride *string `json:"resourceIdDimensionNameOverride,omitempty"` 9924} 9925 9926// NextHopParameters parameters that define the source and destination endpoint. 9927type NextHopParameters struct { 9928 // TargetResourceID - The resource identifier of the target resource against which the action is to be performed. 9929 TargetResourceID *string `json:"targetResourceId,omitempty"` 9930 // SourceIPAddress - The source IP address. 9931 SourceIPAddress *string `json:"sourceIPAddress,omitempty"` 9932 // DestinationIPAddress - The destination IP address. 9933 DestinationIPAddress *string `json:"destinationIPAddress,omitempty"` 9934 // TargetNicResourceID - The NIC ID. (If VM has multiple NICs and IP forwarding is enabled on any of the nics, then this parameter must be specified. Otherwise optional). 9935 TargetNicResourceID *string `json:"targetNicResourceId,omitempty"` 9936} 9937 9938// NextHopResult the information about next hop from the specified VM. 9939type NextHopResult struct { 9940 autorest.Response `json:"-"` 9941 // NextHopType - Next hop type. Possible values include: 'NextHopTypeInternet', 'NextHopTypeVirtualAppliance', 'NextHopTypeVirtualNetworkGateway', 'NextHopTypeVnetLocal', 'NextHopTypeHyperNetGateway', 'NextHopTypeNone' 9942 NextHopType NextHopType `json:"nextHopType,omitempty"` 9943 // NextHopIPAddress - Next hop IP Address 9944 NextHopIPAddress *string `json:"nextHopIpAddress,omitempty"` 9945 // RouteTableID - The resource identifier for the route table associated with the route being returned. If the route being returned does not correspond to any user created routes then this field will be the string 'System Route'. 9946 RouteTableID *string `json:"routeTableId,omitempty"` 9947} 9948 9949// Operation network REST API operation definition. 9950type Operation struct { 9951 // Name - Operation name: {provider}/{resource}/{operation} 9952 Name *string `json:"name,omitempty"` 9953 // Display - Display metadata associated with the operation. 9954 Display *OperationDisplay `json:"display,omitempty"` 9955 // Origin - Origin of the operation. 9956 Origin *string `json:"origin,omitempty"` 9957 // OperationPropertiesFormat - Operation properties format. 9958 *OperationPropertiesFormat `json:"properties,omitempty"` 9959} 9960 9961// MarshalJSON is the custom marshaler for Operation. 9962func (o Operation) MarshalJSON() ([]byte, error) { 9963 objectMap := make(map[string]interface{}) 9964 if o.Name != nil { 9965 objectMap["name"] = o.Name 9966 } 9967 if o.Display != nil { 9968 objectMap["display"] = o.Display 9969 } 9970 if o.Origin != nil { 9971 objectMap["origin"] = o.Origin 9972 } 9973 if o.OperationPropertiesFormat != nil { 9974 objectMap["properties"] = o.OperationPropertiesFormat 9975 } 9976 return json.Marshal(objectMap) 9977} 9978 9979// UnmarshalJSON is the custom unmarshaler for Operation struct. 9980func (o *Operation) UnmarshalJSON(body []byte) error { 9981 var m map[string]*json.RawMessage 9982 err := json.Unmarshal(body, &m) 9983 if err != nil { 9984 return err 9985 } 9986 for k, v := range m { 9987 switch k { 9988 case "name": 9989 if v != nil { 9990 var name string 9991 err = json.Unmarshal(*v, &name) 9992 if err != nil { 9993 return err 9994 } 9995 o.Name = &name 9996 } 9997 case "display": 9998 if v != nil { 9999 var display OperationDisplay 10000 err = json.Unmarshal(*v, &display) 10001 if err != nil { 10002 return err 10003 } 10004 o.Display = &display 10005 } 10006 case "origin": 10007 if v != nil { 10008 var origin string 10009 err = json.Unmarshal(*v, &origin) 10010 if err != nil { 10011 return err 10012 } 10013 o.Origin = &origin 10014 } 10015 case "properties": 10016 if v != nil { 10017 var operationPropertiesFormat OperationPropertiesFormat 10018 err = json.Unmarshal(*v, &operationPropertiesFormat) 10019 if err != nil { 10020 return err 10021 } 10022 o.OperationPropertiesFormat = &operationPropertiesFormat 10023 } 10024 } 10025 } 10026 10027 return nil 10028} 10029 10030// OperationDisplay display metadata associated with the operation. 10031type OperationDisplay struct { 10032 // Provider - Service provider: Microsoft Network. 10033 Provider *string `json:"provider,omitempty"` 10034 // Resource - Resource on which the operation is performed. 10035 Resource *string `json:"resource,omitempty"` 10036 // Operation - Type of the operation: get, read, delete, etc. 10037 Operation *string `json:"operation,omitempty"` 10038 // Description - Description of the operation. 10039 Description *string `json:"description,omitempty"` 10040} 10041 10042// OperationListResult result of the request to list Network operations. It contains a list of operations 10043// and a URL link to get the next set of results. 10044type OperationListResult struct { 10045 autorest.Response `json:"-"` 10046 // Value - List of Network operations supported by the Network resource provider. 10047 Value *[]Operation `json:"value,omitempty"` 10048 // NextLink - URL to get the next set of operation list results if there are any. 10049 NextLink *string `json:"nextLink,omitempty"` 10050} 10051 10052// OperationListResultIterator provides access to a complete listing of Operation values. 10053type OperationListResultIterator struct { 10054 i int 10055 page OperationListResultPage 10056} 10057 10058// NextWithContext advances to the next value. If there was an error making 10059// the request the iterator does not advance and the error is returned. 10060func (iter *OperationListResultIterator) NextWithContext(ctx context.Context) (err error) { 10061 if tracing.IsEnabled() { 10062 ctx = tracing.StartSpan(ctx, fqdn+"/OperationListResultIterator.NextWithContext") 10063 defer func() { 10064 sc := -1 10065 if iter.Response().Response.Response != nil { 10066 sc = iter.Response().Response.Response.StatusCode 10067 } 10068 tracing.EndSpan(ctx, sc, err) 10069 }() 10070 } 10071 iter.i++ 10072 if iter.i < len(iter.page.Values()) { 10073 return nil 10074 } 10075 err = iter.page.NextWithContext(ctx) 10076 if err != nil { 10077 iter.i-- 10078 return err 10079 } 10080 iter.i = 0 10081 return nil 10082} 10083 10084// Next advances to the next value. If there was an error making 10085// the request the iterator does not advance and the error is returned. 10086// Deprecated: Use NextWithContext() instead. 10087func (iter *OperationListResultIterator) Next() error { 10088 return iter.NextWithContext(context.Background()) 10089} 10090 10091// NotDone returns true if the enumeration should be started or is not yet complete. 10092func (iter OperationListResultIterator) NotDone() bool { 10093 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 10094} 10095 10096// Response returns the raw server response from the last page request. 10097func (iter OperationListResultIterator) Response() OperationListResult { 10098 return iter.page.Response() 10099} 10100 10101// Value returns the current value or a zero-initialized value if the 10102// iterator has advanced beyond the end of the collection. 10103func (iter OperationListResultIterator) Value() Operation { 10104 if !iter.page.NotDone() { 10105 return Operation{} 10106 } 10107 return iter.page.Values()[iter.i] 10108} 10109 10110// Creates a new instance of the OperationListResultIterator type. 10111func NewOperationListResultIterator(page OperationListResultPage) OperationListResultIterator { 10112 return OperationListResultIterator{page: page} 10113} 10114 10115// IsEmpty returns true if the ListResult contains no values. 10116func (olr OperationListResult) IsEmpty() bool { 10117 return olr.Value == nil || len(*olr.Value) == 0 10118} 10119 10120// operationListResultPreparer prepares a request to retrieve the next set of results. 10121// It returns nil if no more results exist. 10122func (olr OperationListResult) operationListResultPreparer(ctx context.Context) (*http.Request, error) { 10123 if olr.NextLink == nil || len(to.String(olr.NextLink)) < 1 { 10124 return nil, nil 10125 } 10126 return autorest.Prepare((&http.Request{}).WithContext(ctx), 10127 autorest.AsJSON(), 10128 autorest.AsGet(), 10129 autorest.WithBaseURL(to.String(olr.NextLink))) 10130} 10131 10132// OperationListResultPage contains a page of Operation values. 10133type OperationListResultPage struct { 10134 fn func(context.Context, OperationListResult) (OperationListResult, error) 10135 olr OperationListResult 10136} 10137 10138// NextWithContext advances to the next page of values. If there was an error making 10139// the request the page does not advance and the error is returned. 10140func (page *OperationListResultPage) NextWithContext(ctx context.Context) (err error) { 10141 if tracing.IsEnabled() { 10142 ctx = tracing.StartSpan(ctx, fqdn+"/OperationListResultPage.NextWithContext") 10143 defer func() { 10144 sc := -1 10145 if page.Response().Response.Response != nil { 10146 sc = page.Response().Response.Response.StatusCode 10147 } 10148 tracing.EndSpan(ctx, sc, err) 10149 }() 10150 } 10151 next, err := page.fn(ctx, page.olr) 10152 if err != nil { 10153 return err 10154 } 10155 page.olr = next 10156 return nil 10157} 10158 10159// Next advances to the next page of values. If there was an error making 10160// the request the page does not advance and the error is returned. 10161// Deprecated: Use NextWithContext() instead. 10162func (page *OperationListResultPage) Next() error { 10163 return page.NextWithContext(context.Background()) 10164} 10165 10166// NotDone returns true if the page enumeration should be started or is not yet complete. 10167func (page OperationListResultPage) NotDone() bool { 10168 return !page.olr.IsEmpty() 10169} 10170 10171// Response returns the raw server response from the last page request. 10172func (page OperationListResultPage) Response() OperationListResult { 10173 return page.olr 10174} 10175 10176// Values returns the slice of values for the current page or nil if there are no values. 10177func (page OperationListResultPage) Values() []Operation { 10178 if page.olr.IsEmpty() { 10179 return nil 10180 } 10181 return *page.olr.Value 10182} 10183 10184// Creates a new instance of the OperationListResultPage type. 10185func NewOperationListResultPage(getNextPage func(context.Context, OperationListResult) (OperationListResult, error)) OperationListResultPage { 10186 return OperationListResultPage{fn: getNextPage} 10187} 10188 10189// OperationPropertiesFormat description of operation properties format. 10190type OperationPropertiesFormat struct { 10191 // ServiceSpecification - Specification of the service. 10192 ServiceSpecification *OperationPropertiesFormatServiceSpecification `json:"serviceSpecification,omitempty"` 10193} 10194 10195// OperationPropertiesFormatServiceSpecification specification of the service. 10196type OperationPropertiesFormatServiceSpecification struct { 10197 // MetricSpecifications - Operation service specification. 10198 MetricSpecifications *[]MetricSpecification `json:"metricSpecifications,omitempty"` 10199 // LogSpecifications - Operation log specification. 10200 LogSpecifications *[]LogSpecification `json:"logSpecifications,omitempty"` 10201} 10202 10203// OutboundNatRule outbound NAT pool of the load balancer. 10204type OutboundNatRule struct { 10205 // OutboundNatRulePropertiesFormat - Properties of load balancer outbound nat rule. 10206 *OutboundNatRulePropertiesFormat `json:"properties,omitempty"` 10207 // Name - The name of the resource that is unique within a resource group. This name can be used to access the resource. 10208 Name *string `json:"name,omitempty"` 10209 // Etag - A unique read-only string that changes whenever the resource is updated. 10210 Etag *string `json:"etag,omitempty"` 10211 // ID - Resource ID. 10212 ID *string `json:"id,omitempty"` 10213} 10214 10215// MarshalJSON is the custom marshaler for OutboundNatRule. 10216func (onr OutboundNatRule) MarshalJSON() ([]byte, error) { 10217 objectMap := make(map[string]interface{}) 10218 if onr.OutboundNatRulePropertiesFormat != nil { 10219 objectMap["properties"] = onr.OutboundNatRulePropertiesFormat 10220 } 10221 if onr.Name != nil { 10222 objectMap["name"] = onr.Name 10223 } 10224 if onr.Etag != nil { 10225 objectMap["etag"] = onr.Etag 10226 } 10227 if onr.ID != nil { 10228 objectMap["id"] = onr.ID 10229 } 10230 return json.Marshal(objectMap) 10231} 10232 10233// UnmarshalJSON is the custom unmarshaler for OutboundNatRule struct. 10234func (onr *OutboundNatRule) UnmarshalJSON(body []byte) error { 10235 var m map[string]*json.RawMessage 10236 err := json.Unmarshal(body, &m) 10237 if err != nil { 10238 return err 10239 } 10240 for k, v := range m { 10241 switch k { 10242 case "properties": 10243 if v != nil { 10244 var outboundNatRulePropertiesFormat OutboundNatRulePropertiesFormat 10245 err = json.Unmarshal(*v, &outboundNatRulePropertiesFormat) 10246 if err != nil { 10247 return err 10248 } 10249 onr.OutboundNatRulePropertiesFormat = &outboundNatRulePropertiesFormat 10250 } 10251 case "name": 10252 if v != nil { 10253 var name string 10254 err = json.Unmarshal(*v, &name) 10255 if err != nil { 10256 return err 10257 } 10258 onr.Name = &name 10259 } 10260 case "etag": 10261 if v != nil { 10262 var etag string 10263 err = json.Unmarshal(*v, &etag) 10264 if err != nil { 10265 return err 10266 } 10267 onr.Etag = &etag 10268 } 10269 case "id": 10270 if v != nil { 10271 var ID string 10272 err = json.Unmarshal(*v, &ID) 10273 if err != nil { 10274 return err 10275 } 10276 onr.ID = &ID 10277 } 10278 } 10279 } 10280 10281 return nil 10282} 10283 10284// OutboundNatRulePropertiesFormat outbound NAT pool of the load balancer. 10285type OutboundNatRulePropertiesFormat struct { 10286 // AllocatedOutboundPorts - The number of outbound ports to be used for NAT. 10287 AllocatedOutboundPorts *int32 `json:"allocatedOutboundPorts,omitempty"` 10288 // FrontendIPConfigurations - The Frontend IP addresses of the load balancer. 10289 FrontendIPConfigurations *[]SubResource `json:"frontendIPConfigurations,omitempty"` 10290 // BackendAddressPool - A reference to a pool of DIPs. Outbound traffic is randomly load balanced across IPs in the backend IPs. 10291 BackendAddressPool *SubResource `json:"backendAddressPool,omitempty"` 10292 // ProvisioningState - Gets the provisioning state of the PublicIP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. 10293 ProvisioningState *string `json:"provisioningState,omitempty"` 10294} 10295 10296// PacketCapture parameters that define the create packet capture operation. 10297type PacketCapture struct { 10298 *PacketCaptureParameters `json:"properties,omitempty"` 10299} 10300 10301// MarshalJSON is the custom marshaler for PacketCapture. 10302func (pc PacketCapture) MarshalJSON() ([]byte, error) { 10303 objectMap := make(map[string]interface{}) 10304 if pc.PacketCaptureParameters != nil { 10305 objectMap["properties"] = pc.PacketCaptureParameters 10306 } 10307 return json.Marshal(objectMap) 10308} 10309 10310// UnmarshalJSON is the custom unmarshaler for PacketCapture struct. 10311func (pc *PacketCapture) UnmarshalJSON(body []byte) error { 10312 var m map[string]*json.RawMessage 10313 err := json.Unmarshal(body, &m) 10314 if err != nil { 10315 return err 10316 } 10317 for k, v := range m { 10318 switch k { 10319 case "properties": 10320 if v != nil { 10321 var packetCaptureParameters PacketCaptureParameters 10322 err = json.Unmarshal(*v, &packetCaptureParameters) 10323 if err != nil { 10324 return err 10325 } 10326 pc.PacketCaptureParameters = &packetCaptureParameters 10327 } 10328 } 10329 } 10330 10331 return nil 10332} 10333 10334// PacketCaptureFilter filter that is applied to packet capture request. Multiple filters can be applied. 10335type PacketCaptureFilter struct { 10336 // Protocol - Protocol to be filtered on. Possible values include: 'PcProtocolTCP', 'PcProtocolUDP', 'PcProtocolAny' 10337 Protocol PcProtocol `json:"protocol,omitempty"` 10338 // LocalIPAddress - Local IP Address to be filtered on. Notation: "127.0.0.1" for single address entry. "127.0.0.1-127.0.0.255" for range. "127.0.0.1;127.0.0.5"? for multiple entries. Multiple ranges not currently supported. Mixing ranges with multiple entries not currently supported. Default = null. 10339 LocalIPAddress *string `json:"localIPAddress,omitempty"` 10340 // RemoteIPAddress - Local IP Address to be filtered on. Notation: "127.0.0.1" for single address entry. "127.0.0.1-127.0.0.255" for range. "127.0.0.1;127.0.0.5;" for multiple entries. Multiple ranges not currently supported. Mixing ranges with multiple entries not currently supported. Default = null. 10341 RemoteIPAddress *string `json:"remoteIPAddress,omitempty"` 10342 // LocalPort - Local port to be filtered on. Notation: "80" for single port entry."80-85" for range. "80;443;" for multiple entries. Multiple ranges not currently supported. Mixing ranges with multiple entries not currently supported. Default = null. 10343 LocalPort *string `json:"localPort,omitempty"` 10344 // RemotePort - Remote port to be filtered on. Notation: "80" for single port entry."80-85" for range. "80;443;" for multiple entries. Multiple ranges not currently supported. Mixing ranges with multiple entries not currently supported. Default = null. 10345 RemotePort *string `json:"remotePort,omitempty"` 10346} 10347 10348// PacketCaptureListResult list of packet capture sessions. 10349type PacketCaptureListResult struct { 10350 autorest.Response `json:"-"` 10351 // Value - Information about packet capture sessions. 10352 Value *[]PacketCaptureResult `json:"value,omitempty"` 10353} 10354 10355// PacketCaptureParameters parameters that define the create packet capture operation. 10356type PacketCaptureParameters struct { 10357 // Target - The ID of the targeted resource, only VM is currently supported. 10358 Target *string `json:"target,omitempty"` 10359 // BytesToCapturePerPacket - Number of bytes captured per packet, the remaining bytes are truncated. 10360 BytesToCapturePerPacket *int32 `json:"bytesToCapturePerPacket,omitempty"` 10361 // TotalBytesPerSession - Maximum size of the capture output. 10362 TotalBytesPerSession *int32 `json:"totalBytesPerSession,omitempty"` 10363 // TimeLimitInSeconds - Maximum duration of the capture session in seconds. 10364 TimeLimitInSeconds *int32 `json:"timeLimitInSeconds,omitempty"` 10365 StorageLocation *PacketCaptureStorageLocation `json:"storageLocation,omitempty"` 10366 Filters *[]PacketCaptureFilter `json:"filters,omitempty"` 10367} 10368 10369// PacketCaptureQueryStatusResult status of packet capture session. 10370type PacketCaptureQueryStatusResult struct { 10371 autorest.Response `json:"-"` 10372 // Name - The name of the packet capture resource. 10373 Name *string `json:"name,omitempty"` 10374 // ID - The ID of the packet capture resource. 10375 ID *string `json:"id,omitempty"` 10376 // CaptureStartTime - The start time of the packet capture session. 10377 CaptureStartTime *date.Time `json:"captureStartTime,omitempty"` 10378 // PacketCaptureStatus - The status of the packet capture session. Possible values include: 'PcStatusNotStarted', 'PcStatusRunning', 'PcStatusStopped', 'PcStatusError', 'PcStatusUnknown' 10379 PacketCaptureStatus PcStatus `json:"packetCaptureStatus,omitempty"` 10380 // StopReason - The reason the current packet capture session was stopped. 10381 StopReason *string `json:"stopReason,omitempty"` 10382 // PacketCaptureError - List of errors of packet capture session. 10383 PacketCaptureError *[]PcError `json:"packetCaptureError,omitempty"` 10384} 10385 10386// PacketCaptureResult information about packet capture session. 10387type PacketCaptureResult struct { 10388 autorest.Response `json:"-"` 10389 // Name - READ-ONLY; Name of the packet capture session. 10390 Name *string `json:"name,omitempty"` 10391 // ID - READ-ONLY; ID of the packet capture operation. 10392 ID *string `json:"id,omitempty"` 10393 Etag *string `json:"etag,omitempty"` 10394 *PacketCaptureResultProperties `json:"properties,omitempty"` 10395} 10396 10397// MarshalJSON is the custom marshaler for PacketCaptureResult. 10398func (pcr PacketCaptureResult) MarshalJSON() ([]byte, error) { 10399 objectMap := make(map[string]interface{}) 10400 if pcr.Etag != nil { 10401 objectMap["etag"] = pcr.Etag 10402 } 10403 if pcr.PacketCaptureResultProperties != nil { 10404 objectMap["properties"] = pcr.PacketCaptureResultProperties 10405 } 10406 return json.Marshal(objectMap) 10407} 10408 10409// UnmarshalJSON is the custom unmarshaler for PacketCaptureResult struct. 10410func (pcr *PacketCaptureResult) UnmarshalJSON(body []byte) error { 10411 var m map[string]*json.RawMessage 10412 err := json.Unmarshal(body, &m) 10413 if err != nil { 10414 return err 10415 } 10416 for k, v := range m { 10417 switch k { 10418 case "name": 10419 if v != nil { 10420 var name string 10421 err = json.Unmarshal(*v, &name) 10422 if err != nil { 10423 return err 10424 } 10425 pcr.Name = &name 10426 } 10427 case "id": 10428 if v != nil { 10429 var ID string 10430 err = json.Unmarshal(*v, &ID) 10431 if err != nil { 10432 return err 10433 } 10434 pcr.ID = &ID 10435 } 10436 case "etag": 10437 if v != nil { 10438 var etag string 10439 err = json.Unmarshal(*v, &etag) 10440 if err != nil { 10441 return err 10442 } 10443 pcr.Etag = &etag 10444 } 10445 case "properties": 10446 if v != nil { 10447 var packetCaptureResultProperties PacketCaptureResultProperties 10448 err = json.Unmarshal(*v, &packetCaptureResultProperties) 10449 if err != nil { 10450 return err 10451 } 10452 pcr.PacketCaptureResultProperties = &packetCaptureResultProperties 10453 } 10454 } 10455 } 10456 10457 return nil 10458} 10459 10460// PacketCaptureResultProperties describes the properties of a packet capture session. 10461type PacketCaptureResultProperties struct { 10462 // ProvisioningState - The provisioning state of the packet capture session. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed' 10463 ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` 10464 // Target - The ID of the targeted resource, only VM is currently supported. 10465 Target *string `json:"target,omitempty"` 10466 // BytesToCapturePerPacket - Number of bytes captured per packet, the remaining bytes are truncated. 10467 BytesToCapturePerPacket *int32 `json:"bytesToCapturePerPacket,omitempty"` 10468 // TotalBytesPerSession - Maximum size of the capture output. 10469 TotalBytesPerSession *int32 `json:"totalBytesPerSession,omitempty"` 10470 // TimeLimitInSeconds - Maximum duration of the capture session in seconds. 10471 TimeLimitInSeconds *int32 `json:"timeLimitInSeconds,omitempty"` 10472 StorageLocation *PacketCaptureStorageLocation `json:"storageLocation,omitempty"` 10473 Filters *[]PacketCaptureFilter `json:"filters,omitempty"` 10474} 10475 10476// PacketCapturesCreateFuture an abstraction for monitoring and retrieving the results of a long-running 10477// operation. 10478type PacketCapturesCreateFuture struct { 10479 azure.Future 10480} 10481 10482// Result returns the result of the asynchronous operation. 10483// If the operation has not completed it will return an error. 10484func (future *PacketCapturesCreateFuture) Result(client PacketCapturesClient) (pcr PacketCaptureResult, err error) { 10485 var done bool 10486 done, err = future.DoneWithContext(context.Background(), client) 10487 if err != nil { 10488 err = autorest.NewErrorWithError(err, "network.PacketCapturesCreateFuture", "Result", future.Response(), "Polling failure") 10489 return 10490 } 10491 if !done { 10492 err = azure.NewAsyncOpIncompleteError("network.PacketCapturesCreateFuture") 10493 return 10494 } 10495 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 10496 if pcr.Response.Response, err = future.GetResult(sender); err == nil && pcr.Response.Response.StatusCode != http.StatusNoContent { 10497 pcr, err = client.CreateResponder(pcr.Response.Response) 10498 if err != nil { 10499 err = autorest.NewErrorWithError(err, "network.PacketCapturesCreateFuture", "Result", pcr.Response.Response, "Failure responding to request") 10500 } 10501 } 10502 return 10503} 10504 10505// PacketCapturesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running 10506// operation. 10507type PacketCapturesDeleteFuture struct { 10508 azure.Future 10509} 10510 10511// Result returns the result of the asynchronous operation. 10512// If the operation has not completed it will return an error. 10513func (future *PacketCapturesDeleteFuture) Result(client PacketCapturesClient) (ar autorest.Response, err error) { 10514 var done bool 10515 done, err = future.DoneWithContext(context.Background(), client) 10516 if err != nil { 10517 err = autorest.NewErrorWithError(err, "network.PacketCapturesDeleteFuture", "Result", future.Response(), "Polling failure") 10518 return 10519 } 10520 if !done { 10521 err = azure.NewAsyncOpIncompleteError("network.PacketCapturesDeleteFuture") 10522 return 10523 } 10524 ar.Response = future.Response() 10525 return 10526} 10527 10528// PacketCapturesGetStatusFuture an abstraction for monitoring and retrieving the results of a long-running 10529// operation. 10530type PacketCapturesGetStatusFuture struct { 10531 azure.Future 10532} 10533 10534// Result returns the result of the asynchronous operation. 10535// If the operation has not completed it will return an error. 10536func (future *PacketCapturesGetStatusFuture) Result(client PacketCapturesClient) (pcqsr PacketCaptureQueryStatusResult, err error) { 10537 var done bool 10538 done, err = future.DoneWithContext(context.Background(), client) 10539 if err != nil { 10540 err = autorest.NewErrorWithError(err, "network.PacketCapturesGetStatusFuture", "Result", future.Response(), "Polling failure") 10541 return 10542 } 10543 if !done { 10544 err = azure.NewAsyncOpIncompleteError("network.PacketCapturesGetStatusFuture") 10545 return 10546 } 10547 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 10548 if pcqsr.Response.Response, err = future.GetResult(sender); err == nil && pcqsr.Response.Response.StatusCode != http.StatusNoContent { 10549 pcqsr, err = client.GetStatusResponder(pcqsr.Response.Response) 10550 if err != nil { 10551 err = autorest.NewErrorWithError(err, "network.PacketCapturesGetStatusFuture", "Result", pcqsr.Response.Response, "Failure responding to request") 10552 } 10553 } 10554 return 10555} 10556 10557// PacketCapturesStopFuture an abstraction for monitoring and retrieving the results of a long-running 10558// operation. 10559type PacketCapturesStopFuture struct { 10560 azure.Future 10561} 10562 10563// Result returns the result of the asynchronous operation. 10564// If the operation has not completed it will return an error. 10565func (future *PacketCapturesStopFuture) Result(client PacketCapturesClient) (ar autorest.Response, err error) { 10566 var done bool 10567 done, err = future.DoneWithContext(context.Background(), client) 10568 if err != nil { 10569 err = autorest.NewErrorWithError(err, "network.PacketCapturesStopFuture", "Result", future.Response(), "Polling failure") 10570 return 10571 } 10572 if !done { 10573 err = azure.NewAsyncOpIncompleteError("network.PacketCapturesStopFuture") 10574 return 10575 } 10576 ar.Response = future.Response() 10577 return 10578} 10579 10580// PacketCaptureStorageLocation describes the storage location for a packet capture session. 10581type PacketCaptureStorageLocation struct { 10582 // StorageID - The ID of the storage account to save the packet capture session. Required if no local file path is provided. 10583 StorageID *string `json:"storageId,omitempty"` 10584 // StoragePath - The URI of the storage path to save the packet capture. Must be a well-formed URI describing the location to save the packet capture. 10585 StoragePath *string `json:"storagePath,omitempty"` 10586 // FilePath - A valid local path on the targeting VM. Must include the name of the capture file (*.cap). For linux virtual machine it must start with /var/captures. Required if no storage ID is provided, otherwise optional. 10587 FilePath *string `json:"filePath,omitempty"` 10588} 10589 10590// PatchRouteFilter route Filter Resource. 10591type PatchRouteFilter struct { 10592 *RouteFilterPropertiesFormat `json:"properties,omitempty"` 10593 // Name - READ-ONLY; The name of the resource that is unique within a resource group. This name can be used to access the resource. 10594 Name *string `json:"name,omitempty"` 10595 // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated. 10596 Etag *string `json:"etag,omitempty"` 10597 // Type - READ-ONLY; Resource type. 10598 Type *string `json:"type,omitempty"` 10599 // Tags - Resource tags. 10600 Tags map[string]*string `json:"tags"` 10601 // ID - Resource ID. 10602 ID *string `json:"id,omitempty"` 10603} 10604 10605// MarshalJSON is the custom marshaler for PatchRouteFilter. 10606func (prf PatchRouteFilter) MarshalJSON() ([]byte, error) { 10607 objectMap := make(map[string]interface{}) 10608 if prf.RouteFilterPropertiesFormat != nil { 10609 objectMap["properties"] = prf.RouteFilterPropertiesFormat 10610 } 10611 if prf.Tags != nil { 10612 objectMap["tags"] = prf.Tags 10613 } 10614 if prf.ID != nil { 10615 objectMap["id"] = prf.ID 10616 } 10617 return json.Marshal(objectMap) 10618} 10619 10620// UnmarshalJSON is the custom unmarshaler for PatchRouteFilter struct. 10621func (prf *PatchRouteFilter) UnmarshalJSON(body []byte) error { 10622 var m map[string]*json.RawMessage 10623 err := json.Unmarshal(body, &m) 10624 if err != nil { 10625 return err 10626 } 10627 for k, v := range m { 10628 switch k { 10629 case "properties": 10630 if v != nil { 10631 var routeFilterPropertiesFormat RouteFilterPropertiesFormat 10632 err = json.Unmarshal(*v, &routeFilterPropertiesFormat) 10633 if err != nil { 10634 return err 10635 } 10636 prf.RouteFilterPropertiesFormat = &routeFilterPropertiesFormat 10637 } 10638 case "name": 10639 if v != nil { 10640 var name string 10641 err = json.Unmarshal(*v, &name) 10642 if err != nil { 10643 return err 10644 } 10645 prf.Name = &name 10646 } 10647 case "etag": 10648 if v != nil { 10649 var etag string 10650 err = json.Unmarshal(*v, &etag) 10651 if err != nil { 10652 return err 10653 } 10654 prf.Etag = &etag 10655 } 10656 case "type": 10657 if v != nil { 10658 var typeVar string 10659 err = json.Unmarshal(*v, &typeVar) 10660 if err != nil { 10661 return err 10662 } 10663 prf.Type = &typeVar 10664 } 10665 case "tags": 10666 if v != nil { 10667 var tags map[string]*string 10668 err = json.Unmarshal(*v, &tags) 10669 if err != nil { 10670 return err 10671 } 10672 prf.Tags = tags 10673 } 10674 case "id": 10675 if v != nil { 10676 var ID string 10677 err = json.Unmarshal(*v, &ID) 10678 if err != nil { 10679 return err 10680 } 10681 prf.ID = &ID 10682 } 10683 } 10684 } 10685 10686 return nil 10687} 10688 10689// PatchRouteFilterRule route Filter Rule Resource 10690type PatchRouteFilterRule struct { 10691 *RouteFilterRulePropertiesFormat `json:"properties,omitempty"` 10692 // Name - READ-ONLY; The name of the resource that is unique within a resource group. This name can be used to access the resource. 10693 Name *string `json:"name,omitempty"` 10694 // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated. 10695 Etag *string `json:"etag,omitempty"` 10696 // Tags - Resource tags. 10697 Tags map[string]*string `json:"tags"` 10698 // ID - Resource ID. 10699 ID *string `json:"id,omitempty"` 10700} 10701 10702// MarshalJSON is the custom marshaler for PatchRouteFilterRule. 10703func (prfr PatchRouteFilterRule) MarshalJSON() ([]byte, error) { 10704 objectMap := make(map[string]interface{}) 10705 if prfr.RouteFilterRulePropertiesFormat != nil { 10706 objectMap["properties"] = prfr.RouteFilterRulePropertiesFormat 10707 } 10708 if prfr.Tags != nil { 10709 objectMap["tags"] = prfr.Tags 10710 } 10711 if prfr.ID != nil { 10712 objectMap["id"] = prfr.ID 10713 } 10714 return json.Marshal(objectMap) 10715} 10716 10717// UnmarshalJSON is the custom unmarshaler for PatchRouteFilterRule struct. 10718func (prfr *PatchRouteFilterRule) UnmarshalJSON(body []byte) error { 10719 var m map[string]*json.RawMessage 10720 err := json.Unmarshal(body, &m) 10721 if err != nil { 10722 return err 10723 } 10724 for k, v := range m { 10725 switch k { 10726 case "properties": 10727 if v != nil { 10728 var routeFilterRulePropertiesFormat RouteFilterRulePropertiesFormat 10729 err = json.Unmarshal(*v, &routeFilterRulePropertiesFormat) 10730 if err != nil { 10731 return err 10732 } 10733 prfr.RouteFilterRulePropertiesFormat = &routeFilterRulePropertiesFormat 10734 } 10735 case "name": 10736 if v != nil { 10737 var name string 10738 err = json.Unmarshal(*v, &name) 10739 if err != nil { 10740 return err 10741 } 10742 prfr.Name = &name 10743 } 10744 case "etag": 10745 if v != nil { 10746 var etag string 10747 err = json.Unmarshal(*v, &etag) 10748 if err != nil { 10749 return err 10750 } 10751 prfr.Etag = &etag 10752 } 10753 case "tags": 10754 if v != nil { 10755 var tags map[string]*string 10756 err = json.Unmarshal(*v, &tags) 10757 if err != nil { 10758 return err 10759 } 10760 prfr.Tags = tags 10761 } 10762 case "id": 10763 if v != nil { 10764 var ID string 10765 err = json.Unmarshal(*v, &ID) 10766 if err != nil { 10767 return err 10768 } 10769 prfr.ID = &ID 10770 } 10771 } 10772 } 10773 10774 return nil 10775} 10776 10777// Probe a load balancer probe. 10778type Probe struct { 10779 autorest.Response `json:"-"` 10780 // ProbePropertiesFormat - Properties of load balancer probe. 10781 *ProbePropertiesFormat `json:"properties,omitempty"` 10782 // Name - Gets name of the resource that is unique within a resource group. This name can be used to access the resource. 10783 Name *string `json:"name,omitempty"` 10784 // Etag - A unique read-only string that changes whenever the resource is updated. 10785 Etag *string `json:"etag,omitempty"` 10786 // ID - Resource ID. 10787 ID *string `json:"id,omitempty"` 10788} 10789 10790// MarshalJSON is the custom marshaler for Probe. 10791func (p Probe) MarshalJSON() ([]byte, error) { 10792 objectMap := make(map[string]interface{}) 10793 if p.ProbePropertiesFormat != nil { 10794 objectMap["properties"] = p.ProbePropertiesFormat 10795 } 10796 if p.Name != nil { 10797 objectMap["name"] = p.Name 10798 } 10799 if p.Etag != nil { 10800 objectMap["etag"] = p.Etag 10801 } 10802 if p.ID != nil { 10803 objectMap["id"] = p.ID 10804 } 10805 return json.Marshal(objectMap) 10806} 10807 10808// UnmarshalJSON is the custom unmarshaler for Probe struct. 10809func (p *Probe) UnmarshalJSON(body []byte) error { 10810 var m map[string]*json.RawMessage 10811 err := json.Unmarshal(body, &m) 10812 if err != nil { 10813 return err 10814 } 10815 for k, v := range m { 10816 switch k { 10817 case "properties": 10818 if v != nil { 10819 var probePropertiesFormat ProbePropertiesFormat 10820 err = json.Unmarshal(*v, &probePropertiesFormat) 10821 if err != nil { 10822 return err 10823 } 10824 p.ProbePropertiesFormat = &probePropertiesFormat 10825 } 10826 case "name": 10827 if v != nil { 10828 var name string 10829 err = json.Unmarshal(*v, &name) 10830 if err != nil { 10831 return err 10832 } 10833 p.Name = &name 10834 } 10835 case "etag": 10836 if v != nil { 10837 var etag string 10838 err = json.Unmarshal(*v, &etag) 10839 if err != nil { 10840 return err 10841 } 10842 p.Etag = &etag 10843 } 10844 case "id": 10845 if v != nil { 10846 var ID string 10847 err = json.Unmarshal(*v, &ID) 10848 if err != nil { 10849 return err 10850 } 10851 p.ID = &ID 10852 } 10853 } 10854 } 10855 10856 return nil 10857} 10858 10859// ProbePropertiesFormat load balancer probe resource. 10860type ProbePropertiesFormat struct { 10861 // LoadBalancingRules - READ-ONLY; The load balancer rules that use this probe. 10862 LoadBalancingRules *[]SubResource `json:"loadBalancingRules,omitempty"` 10863 // Protocol - The protocol of the end point. Possible values are: 'Http' or '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' 10864 Protocol ProbeProtocol `json:"protocol,omitempty"` 10865 // Port - The port for communicating the probe. Possible values range from 1 to 65535, inclusive. 10866 Port *int32 `json:"port,omitempty"` 10867 // IntervalInSeconds - 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. 10868 IntervalInSeconds *int32 `json:"intervalInSeconds,omitempty"` 10869 // NumberOfProbes - 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. 10870 NumberOfProbes *int32 `json:"numberOfProbes,omitempty"` 10871 // RequestPath - 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. 10872 RequestPath *string `json:"requestPath,omitempty"` 10873 // ProvisioningState - Gets the provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. 10874 ProvisioningState *string `json:"provisioningState,omitempty"` 10875} 10876 10877// PublicIPAddress public IP address resource. 10878type PublicIPAddress struct { 10879 autorest.Response `json:"-"` 10880 // Sku - The public IP address SKU. 10881 Sku *PublicIPAddressSku `json:"sku,omitempty"` 10882 // PublicIPAddressPropertiesFormat - Public IP address properties. 10883 *PublicIPAddressPropertiesFormat `json:"properties,omitempty"` 10884 // Etag - A unique read-only string that changes whenever the resource is updated. 10885 Etag *string `json:"etag,omitempty"` 10886 // Zones - A list of availability zones denoting the IP allocated for the resource needs to come from. 10887 Zones *[]string `json:"zones,omitempty"` 10888 // ID - Resource ID. 10889 ID *string `json:"id,omitempty"` 10890 // Name - READ-ONLY; Resource name. 10891 Name *string `json:"name,omitempty"` 10892 // Type - READ-ONLY; Resource type. 10893 Type *string `json:"type,omitempty"` 10894 // Location - Resource location. 10895 Location *string `json:"location,omitempty"` 10896 // Tags - Resource tags. 10897 Tags map[string]*string `json:"tags"` 10898} 10899 10900// MarshalJSON is the custom marshaler for PublicIPAddress. 10901func (pia PublicIPAddress) MarshalJSON() ([]byte, error) { 10902 objectMap := make(map[string]interface{}) 10903 if pia.Sku != nil { 10904 objectMap["sku"] = pia.Sku 10905 } 10906 if pia.PublicIPAddressPropertiesFormat != nil { 10907 objectMap["properties"] = pia.PublicIPAddressPropertiesFormat 10908 } 10909 if pia.Etag != nil { 10910 objectMap["etag"] = pia.Etag 10911 } 10912 if pia.Zones != nil { 10913 objectMap["zones"] = pia.Zones 10914 } 10915 if pia.ID != nil { 10916 objectMap["id"] = pia.ID 10917 } 10918 if pia.Location != nil { 10919 objectMap["location"] = pia.Location 10920 } 10921 if pia.Tags != nil { 10922 objectMap["tags"] = pia.Tags 10923 } 10924 return json.Marshal(objectMap) 10925} 10926 10927// UnmarshalJSON is the custom unmarshaler for PublicIPAddress struct. 10928func (pia *PublicIPAddress) UnmarshalJSON(body []byte) error { 10929 var m map[string]*json.RawMessage 10930 err := json.Unmarshal(body, &m) 10931 if err != nil { 10932 return err 10933 } 10934 for k, v := range m { 10935 switch k { 10936 case "sku": 10937 if v != nil { 10938 var sku PublicIPAddressSku 10939 err = json.Unmarshal(*v, &sku) 10940 if err != nil { 10941 return err 10942 } 10943 pia.Sku = &sku 10944 } 10945 case "properties": 10946 if v != nil { 10947 var publicIPAddressPropertiesFormat PublicIPAddressPropertiesFormat 10948 err = json.Unmarshal(*v, &publicIPAddressPropertiesFormat) 10949 if err != nil { 10950 return err 10951 } 10952 pia.PublicIPAddressPropertiesFormat = &publicIPAddressPropertiesFormat 10953 } 10954 case "etag": 10955 if v != nil { 10956 var etag string 10957 err = json.Unmarshal(*v, &etag) 10958 if err != nil { 10959 return err 10960 } 10961 pia.Etag = &etag 10962 } 10963 case "zones": 10964 if v != nil { 10965 var zones []string 10966 err = json.Unmarshal(*v, &zones) 10967 if err != nil { 10968 return err 10969 } 10970 pia.Zones = &zones 10971 } 10972 case "id": 10973 if v != nil { 10974 var ID string 10975 err = json.Unmarshal(*v, &ID) 10976 if err != nil { 10977 return err 10978 } 10979 pia.ID = &ID 10980 } 10981 case "name": 10982 if v != nil { 10983 var name string 10984 err = json.Unmarshal(*v, &name) 10985 if err != nil { 10986 return err 10987 } 10988 pia.Name = &name 10989 } 10990 case "type": 10991 if v != nil { 10992 var typeVar string 10993 err = json.Unmarshal(*v, &typeVar) 10994 if err != nil { 10995 return err 10996 } 10997 pia.Type = &typeVar 10998 } 10999 case "location": 11000 if v != nil { 11001 var location string 11002 err = json.Unmarshal(*v, &location) 11003 if err != nil { 11004 return err 11005 } 11006 pia.Location = &location 11007 } 11008 case "tags": 11009 if v != nil { 11010 var tags map[string]*string 11011 err = json.Unmarshal(*v, &tags) 11012 if err != nil { 11013 return err 11014 } 11015 pia.Tags = tags 11016 } 11017 } 11018 } 11019 11020 return nil 11021} 11022 11023// PublicIPAddressDNSSettings contains FQDN of the DNS record associated with the public IP address 11024type PublicIPAddressDNSSettings struct { 11025 // 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. 11026 DomainNameLabel *string `json:"domainNameLabel,omitempty"` 11027 // 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. 11028 Fqdn *string `json:"fqdn,omitempty"` 11029 // 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. 11030 ReverseFqdn *string `json:"reverseFqdn,omitempty"` 11031} 11032 11033// PublicIPAddressesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a 11034// long-running operation. 11035type PublicIPAddressesCreateOrUpdateFuture struct { 11036 azure.Future 11037} 11038 11039// Result returns the result of the asynchronous operation. 11040// If the operation has not completed it will return an error. 11041func (future *PublicIPAddressesCreateOrUpdateFuture) Result(client PublicIPAddressesClient) (pia PublicIPAddress, err error) { 11042 var done bool 11043 done, err = future.DoneWithContext(context.Background(), client) 11044 if err != nil { 11045 err = autorest.NewErrorWithError(err, "network.PublicIPAddressesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") 11046 return 11047 } 11048 if !done { 11049 err = azure.NewAsyncOpIncompleteError("network.PublicIPAddressesCreateOrUpdateFuture") 11050 return 11051 } 11052 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 11053 if pia.Response.Response, err = future.GetResult(sender); err == nil && pia.Response.Response.StatusCode != http.StatusNoContent { 11054 pia, err = client.CreateOrUpdateResponder(pia.Response.Response) 11055 if err != nil { 11056 err = autorest.NewErrorWithError(err, "network.PublicIPAddressesCreateOrUpdateFuture", "Result", pia.Response.Response, "Failure responding to request") 11057 } 11058 } 11059 return 11060} 11061 11062// PublicIPAddressesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running 11063// operation. 11064type PublicIPAddressesDeleteFuture struct { 11065 azure.Future 11066} 11067 11068// Result returns the result of the asynchronous operation. 11069// If the operation has not completed it will return an error. 11070func (future *PublicIPAddressesDeleteFuture) Result(client PublicIPAddressesClient) (ar autorest.Response, err error) { 11071 var done bool 11072 done, err = future.DoneWithContext(context.Background(), client) 11073 if err != nil { 11074 err = autorest.NewErrorWithError(err, "network.PublicIPAddressesDeleteFuture", "Result", future.Response(), "Polling failure") 11075 return 11076 } 11077 if !done { 11078 err = azure.NewAsyncOpIncompleteError("network.PublicIPAddressesDeleteFuture") 11079 return 11080 } 11081 ar.Response = future.Response() 11082 return 11083} 11084 11085// PublicIPAddressesUpdateTagsFuture an abstraction for monitoring and retrieving the results of a 11086// long-running operation. 11087type PublicIPAddressesUpdateTagsFuture struct { 11088 azure.Future 11089} 11090 11091// Result returns the result of the asynchronous operation. 11092// If the operation has not completed it will return an error. 11093func (future *PublicIPAddressesUpdateTagsFuture) Result(client PublicIPAddressesClient) (pia PublicIPAddress, err error) { 11094 var done bool 11095 done, err = future.DoneWithContext(context.Background(), client) 11096 if err != nil { 11097 err = autorest.NewErrorWithError(err, "network.PublicIPAddressesUpdateTagsFuture", "Result", future.Response(), "Polling failure") 11098 return 11099 } 11100 if !done { 11101 err = azure.NewAsyncOpIncompleteError("network.PublicIPAddressesUpdateTagsFuture") 11102 return 11103 } 11104 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 11105 if pia.Response.Response, err = future.GetResult(sender); err == nil && pia.Response.Response.StatusCode != http.StatusNoContent { 11106 pia, err = client.UpdateTagsResponder(pia.Response.Response) 11107 if err != nil { 11108 err = autorest.NewErrorWithError(err, "network.PublicIPAddressesUpdateTagsFuture", "Result", pia.Response.Response, "Failure responding to request") 11109 } 11110 } 11111 return 11112} 11113 11114// PublicIPAddressListResult response for ListPublicIpAddresses API service call. 11115type PublicIPAddressListResult struct { 11116 autorest.Response `json:"-"` 11117 // Value - A list of public IP addresses that exists in a resource group. 11118 Value *[]PublicIPAddress `json:"value,omitempty"` 11119 // NextLink - The URL to get the next set of results. 11120 NextLink *string `json:"nextLink,omitempty"` 11121} 11122 11123// PublicIPAddressListResultIterator provides access to a complete listing of PublicIPAddress values. 11124type PublicIPAddressListResultIterator struct { 11125 i int 11126 page PublicIPAddressListResultPage 11127} 11128 11129// NextWithContext advances to the next value. If there was an error making 11130// the request the iterator does not advance and the error is returned. 11131func (iter *PublicIPAddressListResultIterator) NextWithContext(ctx context.Context) (err error) { 11132 if tracing.IsEnabled() { 11133 ctx = tracing.StartSpan(ctx, fqdn+"/PublicIPAddressListResultIterator.NextWithContext") 11134 defer func() { 11135 sc := -1 11136 if iter.Response().Response.Response != nil { 11137 sc = iter.Response().Response.Response.StatusCode 11138 } 11139 tracing.EndSpan(ctx, sc, err) 11140 }() 11141 } 11142 iter.i++ 11143 if iter.i < len(iter.page.Values()) { 11144 return nil 11145 } 11146 err = iter.page.NextWithContext(ctx) 11147 if err != nil { 11148 iter.i-- 11149 return err 11150 } 11151 iter.i = 0 11152 return nil 11153} 11154 11155// Next advances to the next value. If there was an error making 11156// the request the iterator does not advance and the error is returned. 11157// Deprecated: Use NextWithContext() instead. 11158func (iter *PublicIPAddressListResultIterator) Next() error { 11159 return iter.NextWithContext(context.Background()) 11160} 11161 11162// NotDone returns true if the enumeration should be started or is not yet complete. 11163func (iter PublicIPAddressListResultIterator) NotDone() bool { 11164 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 11165} 11166 11167// Response returns the raw server response from the last page request. 11168func (iter PublicIPAddressListResultIterator) Response() PublicIPAddressListResult { 11169 return iter.page.Response() 11170} 11171 11172// Value returns the current value or a zero-initialized value if the 11173// iterator has advanced beyond the end of the collection. 11174func (iter PublicIPAddressListResultIterator) Value() PublicIPAddress { 11175 if !iter.page.NotDone() { 11176 return PublicIPAddress{} 11177 } 11178 return iter.page.Values()[iter.i] 11179} 11180 11181// Creates a new instance of the PublicIPAddressListResultIterator type. 11182func NewPublicIPAddressListResultIterator(page PublicIPAddressListResultPage) PublicIPAddressListResultIterator { 11183 return PublicIPAddressListResultIterator{page: page} 11184} 11185 11186// IsEmpty returns true if the ListResult contains no values. 11187func (pialr PublicIPAddressListResult) IsEmpty() bool { 11188 return pialr.Value == nil || len(*pialr.Value) == 0 11189} 11190 11191// publicIPAddressListResultPreparer prepares a request to retrieve the next set of results. 11192// It returns nil if no more results exist. 11193func (pialr PublicIPAddressListResult) publicIPAddressListResultPreparer(ctx context.Context) (*http.Request, error) { 11194 if pialr.NextLink == nil || len(to.String(pialr.NextLink)) < 1 { 11195 return nil, nil 11196 } 11197 return autorest.Prepare((&http.Request{}).WithContext(ctx), 11198 autorest.AsJSON(), 11199 autorest.AsGet(), 11200 autorest.WithBaseURL(to.String(pialr.NextLink))) 11201} 11202 11203// PublicIPAddressListResultPage contains a page of PublicIPAddress values. 11204type PublicIPAddressListResultPage struct { 11205 fn func(context.Context, PublicIPAddressListResult) (PublicIPAddressListResult, error) 11206 pialr PublicIPAddressListResult 11207} 11208 11209// NextWithContext advances to the next page of values. If there was an error making 11210// the request the page does not advance and the error is returned. 11211func (page *PublicIPAddressListResultPage) NextWithContext(ctx context.Context) (err error) { 11212 if tracing.IsEnabled() { 11213 ctx = tracing.StartSpan(ctx, fqdn+"/PublicIPAddressListResultPage.NextWithContext") 11214 defer func() { 11215 sc := -1 11216 if page.Response().Response.Response != nil { 11217 sc = page.Response().Response.Response.StatusCode 11218 } 11219 tracing.EndSpan(ctx, sc, err) 11220 }() 11221 } 11222 next, err := page.fn(ctx, page.pialr) 11223 if err != nil { 11224 return err 11225 } 11226 page.pialr = next 11227 return nil 11228} 11229 11230// Next advances to the next page of values. If there was an error making 11231// the request the page does not advance and the error is returned. 11232// Deprecated: Use NextWithContext() instead. 11233func (page *PublicIPAddressListResultPage) Next() error { 11234 return page.NextWithContext(context.Background()) 11235} 11236 11237// NotDone returns true if the page enumeration should be started or is not yet complete. 11238func (page PublicIPAddressListResultPage) NotDone() bool { 11239 return !page.pialr.IsEmpty() 11240} 11241 11242// Response returns the raw server response from the last page request. 11243func (page PublicIPAddressListResultPage) Response() PublicIPAddressListResult { 11244 return page.pialr 11245} 11246 11247// Values returns the slice of values for the current page or nil if there are no values. 11248func (page PublicIPAddressListResultPage) Values() []PublicIPAddress { 11249 if page.pialr.IsEmpty() { 11250 return nil 11251 } 11252 return *page.pialr.Value 11253} 11254 11255// Creates a new instance of the PublicIPAddressListResultPage type. 11256func NewPublicIPAddressListResultPage(getNextPage func(context.Context, PublicIPAddressListResult) (PublicIPAddressListResult, error)) PublicIPAddressListResultPage { 11257 return PublicIPAddressListResultPage{fn: getNextPage} 11258} 11259 11260// PublicIPAddressPropertiesFormat public IP address properties. 11261type PublicIPAddressPropertiesFormat struct { 11262 // PublicIPAllocationMethod - The public IP allocation method. Possible values are: 'Static' and 'Dynamic'. Possible values include: 'Static', 'Dynamic' 11263 PublicIPAllocationMethod IPAllocationMethod `json:"publicIPAllocationMethod,omitempty"` 11264 // PublicIPAddressVersion - The public IP address version. Possible values are: 'IPv4' and 'IPv6'. Possible values include: 'IPv4', 'IPv6' 11265 PublicIPAddressVersion IPVersion `json:"publicIPAddressVersion,omitempty"` 11266 // IPConfiguration - READ-ONLY; The IP configuration associated with the public IP address. 11267 IPConfiguration *IPConfiguration `json:"ipConfiguration,omitempty"` 11268 // DNSSettings - The FQDN of the DNS record associated with the public IP address. 11269 DNSSettings *PublicIPAddressDNSSettings `json:"dnsSettings,omitempty"` 11270 // IPAddress - The IP address associated with the public IP address resource. 11271 IPAddress *string `json:"ipAddress,omitempty"` 11272 // IdleTimeoutInMinutes - The idle timeout of the public IP address. 11273 IdleTimeoutInMinutes *int32 `json:"idleTimeoutInMinutes,omitempty"` 11274 // ResourceGUID - The resource GUID property of the public IP resource. 11275 ResourceGUID *string `json:"resourceGuid,omitempty"` 11276 // ProvisioningState - The provisioning state of the PublicIP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. 11277 ProvisioningState *string `json:"provisioningState,omitempty"` 11278} 11279 11280// PublicIPAddressSku SKU of a public IP address 11281type PublicIPAddressSku struct { 11282 // Name - Name of a public IP address SKU. Possible values include: 'PublicIPAddressSkuNameBasic', 'PublicIPAddressSkuNameStandard' 11283 Name PublicIPAddressSkuName `json:"name,omitempty"` 11284} 11285 11286// QueryTroubleshootingParameters parameters that define the resource to query the troubleshooting result. 11287type QueryTroubleshootingParameters struct { 11288 // TargetResourceID - The target resource ID to query the troubleshooting result. 11289 TargetResourceID *string `json:"targetResourceId,omitempty"` 11290} 11291 11292// Resource common resource representation. 11293type Resource struct { 11294 // ID - Resource ID. 11295 ID *string `json:"id,omitempty"` 11296 // Name - READ-ONLY; Resource name. 11297 Name *string `json:"name,omitempty"` 11298 // Type - READ-ONLY; Resource type. 11299 Type *string `json:"type,omitempty"` 11300 // Location - Resource location. 11301 Location *string `json:"location,omitempty"` 11302 // Tags - Resource tags. 11303 Tags map[string]*string `json:"tags"` 11304} 11305 11306// MarshalJSON is the custom marshaler for Resource. 11307func (r Resource) MarshalJSON() ([]byte, error) { 11308 objectMap := make(map[string]interface{}) 11309 if r.ID != nil { 11310 objectMap["id"] = r.ID 11311 } 11312 if r.Location != nil { 11313 objectMap["location"] = r.Location 11314 } 11315 if r.Tags != nil { 11316 objectMap["tags"] = r.Tags 11317 } 11318 return json.Marshal(objectMap) 11319} 11320 11321// ResourceNavigationLink resourceNavigationLink resource. 11322type ResourceNavigationLink struct { 11323 // ResourceNavigationLinkFormat - Resource navigation link properties format. 11324 *ResourceNavigationLinkFormat `json:"properties,omitempty"` 11325 // Name - Name of the resource that is unique within a resource group. This name can be used to access the resource. 11326 Name *string `json:"name,omitempty"` 11327 // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated. 11328 Etag *string `json:"etag,omitempty"` 11329 // ID - Resource ID. 11330 ID *string `json:"id,omitempty"` 11331} 11332 11333// MarshalJSON is the custom marshaler for ResourceNavigationLink. 11334func (rnl ResourceNavigationLink) MarshalJSON() ([]byte, error) { 11335 objectMap := make(map[string]interface{}) 11336 if rnl.ResourceNavigationLinkFormat != nil { 11337 objectMap["properties"] = rnl.ResourceNavigationLinkFormat 11338 } 11339 if rnl.Name != nil { 11340 objectMap["name"] = rnl.Name 11341 } 11342 if rnl.ID != nil { 11343 objectMap["id"] = rnl.ID 11344 } 11345 return json.Marshal(objectMap) 11346} 11347 11348// UnmarshalJSON is the custom unmarshaler for ResourceNavigationLink struct. 11349func (rnl *ResourceNavigationLink) UnmarshalJSON(body []byte) error { 11350 var m map[string]*json.RawMessage 11351 err := json.Unmarshal(body, &m) 11352 if err != nil { 11353 return err 11354 } 11355 for k, v := range m { 11356 switch k { 11357 case "properties": 11358 if v != nil { 11359 var resourceNavigationLinkFormat ResourceNavigationLinkFormat 11360 err = json.Unmarshal(*v, &resourceNavigationLinkFormat) 11361 if err != nil { 11362 return err 11363 } 11364 rnl.ResourceNavigationLinkFormat = &resourceNavigationLinkFormat 11365 } 11366 case "name": 11367 if v != nil { 11368 var name string 11369 err = json.Unmarshal(*v, &name) 11370 if err != nil { 11371 return err 11372 } 11373 rnl.Name = &name 11374 } 11375 case "etag": 11376 if v != nil { 11377 var etag string 11378 err = json.Unmarshal(*v, &etag) 11379 if err != nil { 11380 return err 11381 } 11382 rnl.Etag = &etag 11383 } 11384 case "id": 11385 if v != nil { 11386 var ID string 11387 err = json.Unmarshal(*v, &ID) 11388 if err != nil { 11389 return err 11390 } 11391 rnl.ID = &ID 11392 } 11393 } 11394 } 11395 11396 return nil 11397} 11398 11399// ResourceNavigationLinkFormat properties of ResourceNavigationLink. 11400type ResourceNavigationLinkFormat struct { 11401 // LinkedResourceType - Resource type of the linked resource. 11402 LinkedResourceType *string `json:"linkedResourceType,omitempty"` 11403 // Link - Link to the external resource 11404 Link *string `json:"link,omitempty"` 11405 // ProvisioningState - READ-ONLY; Provisioning state of the ResourceNavigationLink resource. 11406 ProvisioningState *string `json:"provisioningState,omitempty"` 11407} 11408 11409// RetentionPolicyParameters parameters that define the retention policy for flow log. 11410type RetentionPolicyParameters struct { 11411 // Days - Number of days to retain flow log records. 11412 Days *int32 `json:"days,omitempty"` 11413 // Enabled - Flag to enable/disable retention. 11414 Enabled *bool `json:"enabled,omitempty"` 11415} 11416 11417// Route route resource 11418type Route struct { 11419 autorest.Response `json:"-"` 11420 // RoutePropertiesFormat - Properties of the route. 11421 *RoutePropertiesFormat `json:"properties,omitempty"` 11422 // Name - The name of the resource that is unique within a resource group. This name can be used to access the resource. 11423 Name *string `json:"name,omitempty"` 11424 // Etag - A unique read-only string that changes whenever the resource is updated. 11425 Etag *string `json:"etag,omitempty"` 11426 // ID - Resource ID. 11427 ID *string `json:"id,omitempty"` 11428} 11429 11430// MarshalJSON is the custom marshaler for Route. 11431func (r Route) MarshalJSON() ([]byte, error) { 11432 objectMap := make(map[string]interface{}) 11433 if r.RoutePropertiesFormat != nil { 11434 objectMap["properties"] = r.RoutePropertiesFormat 11435 } 11436 if r.Name != nil { 11437 objectMap["name"] = r.Name 11438 } 11439 if r.Etag != nil { 11440 objectMap["etag"] = r.Etag 11441 } 11442 if r.ID != nil { 11443 objectMap["id"] = r.ID 11444 } 11445 return json.Marshal(objectMap) 11446} 11447 11448// UnmarshalJSON is the custom unmarshaler for Route struct. 11449func (r *Route) UnmarshalJSON(body []byte) error { 11450 var m map[string]*json.RawMessage 11451 err := json.Unmarshal(body, &m) 11452 if err != nil { 11453 return err 11454 } 11455 for k, v := range m { 11456 switch k { 11457 case "properties": 11458 if v != nil { 11459 var routePropertiesFormat RoutePropertiesFormat 11460 err = json.Unmarshal(*v, &routePropertiesFormat) 11461 if err != nil { 11462 return err 11463 } 11464 r.RoutePropertiesFormat = &routePropertiesFormat 11465 } 11466 case "name": 11467 if v != nil { 11468 var name string 11469 err = json.Unmarshal(*v, &name) 11470 if err != nil { 11471 return err 11472 } 11473 r.Name = &name 11474 } 11475 case "etag": 11476 if v != nil { 11477 var etag string 11478 err = json.Unmarshal(*v, &etag) 11479 if err != nil { 11480 return err 11481 } 11482 r.Etag = &etag 11483 } 11484 case "id": 11485 if v != nil { 11486 var ID string 11487 err = json.Unmarshal(*v, &ID) 11488 if err != nil { 11489 return err 11490 } 11491 r.ID = &ID 11492 } 11493 } 11494 } 11495 11496 return nil 11497} 11498 11499// RouteFilter route Filter Resource. 11500type RouteFilter struct { 11501 autorest.Response `json:"-"` 11502 *RouteFilterPropertiesFormat `json:"properties,omitempty"` 11503 // Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated. 11504 Etag *string `json:"etag,omitempty"` 11505 // ID - Resource ID. 11506 ID *string `json:"id,omitempty"` 11507 // Name - READ-ONLY; Resource name. 11508 Name *string `json:"name,omitempty"` 11509 // Type - READ-ONLY; Resource type. 11510 Type *string `json:"type,omitempty"` 11511 // Location - Resource location. 11512 Location *string `json:"location,omitempty"` 11513 // Tags - Resource tags. 11514 Tags map[string]*string `json:"tags"` 11515} 11516 11517// MarshalJSON is the custom marshaler for RouteFilter. 11518func (rf RouteFilter) MarshalJSON() ([]byte, error) { 11519 objectMap := make(map[string]interface{}) 11520 if rf.RouteFilterPropertiesFormat != nil { 11521 objectMap["properties"] = rf.RouteFilterPropertiesFormat 11522 } 11523 if rf.ID != nil { 11524 objectMap["id"] = rf.ID 11525 } 11526 if rf.Location != nil { 11527 objectMap["location"] = rf.Location 11528 } 11529 if rf.Tags != nil { 11530 objectMap["tags"] = rf.Tags 11531 } 11532 return json.Marshal(objectMap) 11533} 11534 11535// UnmarshalJSON is the custom unmarshaler for RouteFilter struct. 11536func (rf *RouteFilter) UnmarshalJSON(body []byte) error { 11537 var m map[string]*json.RawMessage 11538 err := json.Unmarshal(body, &m) 11539 if err != nil { 11540 return err 11541 } 11542 for k, v := range m { 11543 switch k { 11544 case "properties": 11545 if v != nil { 11546 var routeFilterPropertiesFormat RouteFilterPropertiesFormat 11547 err = json.Unmarshal(*v, &routeFilterPropertiesFormat) 11548 if err != nil { 11549 return err 11550 } 11551 rf.RouteFilterPropertiesFormat = &routeFilterPropertiesFormat 11552 } 11553 case "etag": 11554 if v != nil { 11555 var etag string 11556 err = json.Unmarshal(*v, &etag) 11557 if err != nil { 11558 return err 11559 } 11560 rf.Etag = &etag 11561 } 11562 case "id": 11563 if v != nil { 11564 var ID string 11565 err = json.Unmarshal(*v, &ID) 11566 if err != nil { 11567 return err 11568 } 11569 rf.ID = &ID 11570 } 11571 case "name": 11572 if v != nil { 11573 var name string 11574 err = json.Unmarshal(*v, &name) 11575 if err != nil { 11576 return err 11577 } 11578 rf.Name = &name 11579 } 11580 case "type": 11581 if v != nil { 11582 var typeVar string 11583 err = json.Unmarshal(*v, &typeVar) 11584 if err != nil { 11585 return err 11586 } 11587 rf.Type = &typeVar 11588 } 11589 case "location": 11590 if v != nil { 11591 var location string 11592 err = json.Unmarshal(*v, &location) 11593 if err != nil { 11594 return err 11595 } 11596 rf.Location = &location 11597 } 11598 case "tags": 11599 if v != nil { 11600 var tags map[string]*string 11601 err = json.Unmarshal(*v, &tags) 11602 if err != nil { 11603 return err 11604 } 11605 rf.Tags = tags 11606 } 11607 } 11608 } 11609 11610 return nil 11611} 11612 11613// RouteFilterListResult response for the ListRouteFilters API service call. 11614type RouteFilterListResult struct { 11615 autorest.Response `json:"-"` 11616 // Value - Gets a list of route filters in a resource group. 11617 Value *[]RouteFilter `json:"value,omitempty"` 11618 // NextLink - The URL to get the next set of results. 11619 NextLink *string `json:"nextLink,omitempty"` 11620} 11621 11622// RouteFilterListResultIterator provides access to a complete listing of RouteFilter values. 11623type RouteFilterListResultIterator struct { 11624 i int 11625 page RouteFilterListResultPage 11626} 11627 11628// NextWithContext advances to the next value. If there was an error making 11629// the request the iterator does not advance and the error is returned. 11630func (iter *RouteFilterListResultIterator) NextWithContext(ctx context.Context) (err error) { 11631 if tracing.IsEnabled() { 11632 ctx = tracing.StartSpan(ctx, fqdn+"/RouteFilterListResultIterator.NextWithContext") 11633 defer func() { 11634 sc := -1 11635 if iter.Response().Response.Response != nil { 11636 sc = iter.Response().Response.Response.StatusCode 11637 } 11638 tracing.EndSpan(ctx, sc, err) 11639 }() 11640 } 11641 iter.i++ 11642 if iter.i < len(iter.page.Values()) { 11643 return nil 11644 } 11645 err = iter.page.NextWithContext(ctx) 11646 if err != nil { 11647 iter.i-- 11648 return err 11649 } 11650 iter.i = 0 11651 return nil 11652} 11653 11654// Next advances to the next value. If there was an error making 11655// the request the iterator does not advance and the error is returned. 11656// Deprecated: Use NextWithContext() instead. 11657func (iter *RouteFilterListResultIterator) Next() error { 11658 return iter.NextWithContext(context.Background()) 11659} 11660 11661// NotDone returns true if the enumeration should be started or is not yet complete. 11662func (iter RouteFilterListResultIterator) NotDone() bool { 11663 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 11664} 11665 11666// Response returns the raw server response from the last page request. 11667func (iter RouteFilterListResultIterator) Response() RouteFilterListResult { 11668 return iter.page.Response() 11669} 11670 11671// Value returns the current value or a zero-initialized value if the 11672// iterator has advanced beyond the end of the collection. 11673func (iter RouteFilterListResultIterator) Value() RouteFilter { 11674 if !iter.page.NotDone() { 11675 return RouteFilter{} 11676 } 11677 return iter.page.Values()[iter.i] 11678} 11679 11680// Creates a new instance of the RouteFilterListResultIterator type. 11681func NewRouteFilterListResultIterator(page RouteFilterListResultPage) RouteFilterListResultIterator { 11682 return RouteFilterListResultIterator{page: page} 11683} 11684 11685// IsEmpty returns true if the ListResult contains no values. 11686func (rflr RouteFilterListResult) IsEmpty() bool { 11687 return rflr.Value == nil || len(*rflr.Value) == 0 11688} 11689 11690// routeFilterListResultPreparer prepares a request to retrieve the next set of results. 11691// It returns nil if no more results exist. 11692func (rflr RouteFilterListResult) routeFilterListResultPreparer(ctx context.Context) (*http.Request, error) { 11693 if rflr.NextLink == nil || len(to.String(rflr.NextLink)) < 1 { 11694 return nil, nil 11695 } 11696 return autorest.Prepare((&http.Request{}).WithContext(ctx), 11697 autorest.AsJSON(), 11698 autorest.AsGet(), 11699 autorest.WithBaseURL(to.String(rflr.NextLink))) 11700} 11701 11702// RouteFilterListResultPage contains a page of RouteFilter values. 11703type RouteFilterListResultPage struct { 11704 fn func(context.Context, RouteFilterListResult) (RouteFilterListResult, error) 11705 rflr RouteFilterListResult 11706} 11707 11708// NextWithContext advances to the next page of values. If there was an error making 11709// the request the page does not advance and the error is returned. 11710func (page *RouteFilterListResultPage) NextWithContext(ctx context.Context) (err error) { 11711 if tracing.IsEnabled() { 11712 ctx = tracing.StartSpan(ctx, fqdn+"/RouteFilterListResultPage.NextWithContext") 11713 defer func() { 11714 sc := -1 11715 if page.Response().Response.Response != nil { 11716 sc = page.Response().Response.Response.StatusCode 11717 } 11718 tracing.EndSpan(ctx, sc, err) 11719 }() 11720 } 11721 next, err := page.fn(ctx, page.rflr) 11722 if err != nil { 11723 return err 11724 } 11725 page.rflr = next 11726 return nil 11727} 11728 11729// Next advances to the next page of values. If there was an error making 11730// the request the page does not advance and the error is returned. 11731// Deprecated: Use NextWithContext() instead. 11732func (page *RouteFilterListResultPage) Next() error { 11733 return page.NextWithContext(context.Background()) 11734} 11735 11736// NotDone returns true if the page enumeration should be started or is not yet complete. 11737func (page RouteFilterListResultPage) NotDone() bool { 11738 return !page.rflr.IsEmpty() 11739} 11740 11741// Response returns the raw server response from the last page request. 11742func (page RouteFilterListResultPage) Response() RouteFilterListResult { 11743 return page.rflr 11744} 11745 11746// Values returns the slice of values for the current page or nil if there are no values. 11747func (page RouteFilterListResultPage) Values() []RouteFilter { 11748 if page.rflr.IsEmpty() { 11749 return nil 11750 } 11751 return *page.rflr.Value 11752} 11753 11754// Creates a new instance of the RouteFilterListResultPage type. 11755func NewRouteFilterListResultPage(getNextPage func(context.Context, RouteFilterListResult) (RouteFilterListResult, error)) RouteFilterListResultPage { 11756 return RouteFilterListResultPage{fn: getNextPage} 11757} 11758 11759// RouteFilterPropertiesFormat route Filter Resource 11760type RouteFilterPropertiesFormat struct { 11761 // Rules - Collection of RouteFilterRules contained within a route filter. 11762 Rules *[]RouteFilterRule `json:"rules,omitempty"` 11763 // Peerings - A collection of references to express route circuit peerings. 11764 Peerings *[]ExpressRouteCircuitPeering `json:"peerings,omitempty"` 11765 // ProvisioningState - READ-ONLY; The provisioning state of the resource. Possible values are: 'Updating', 'Deleting', 'Succeeded' and 'Failed'. 11766 ProvisioningState *string `json:"provisioningState,omitempty"` 11767} 11768 11769// RouteFilterRule route Filter Rule Resource 11770type RouteFilterRule struct { 11771 autorest.Response `json:"-"` 11772 *RouteFilterRulePropertiesFormat `json:"properties,omitempty"` 11773 // Name - The name of the resource that is unique within a resource group. This name can be used to access the resource. 11774 Name *string `json:"name,omitempty"` 11775 // Location - Resource location. 11776 Location *string `json:"location,omitempty"` 11777 // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated. 11778 Etag *string `json:"etag,omitempty"` 11779 // Tags - Resource tags. 11780 Tags map[string]*string `json:"tags"` 11781 // ID - Resource ID. 11782 ID *string `json:"id,omitempty"` 11783} 11784 11785// MarshalJSON is the custom marshaler for RouteFilterRule. 11786func (rfr RouteFilterRule) MarshalJSON() ([]byte, error) { 11787 objectMap := make(map[string]interface{}) 11788 if rfr.RouteFilterRulePropertiesFormat != nil { 11789 objectMap["properties"] = rfr.RouteFilterRulePropertiesFormat 11790 } 11791 if rfr.Name != nil { 11792 objectMap["name"] = rfr.Name 11793 } 11794 if rfr.Location != nil { 11795 objectMap["location"] = rfr.Location 11796 } 11797 if rfr.Tags != nil { 11798 objectMap["tags"] = rfr.Tags 11799 } 11800 if rfr.ID != nil { 11801 objectMap["id"] = rfr.ID 11802 } 11803 return json.Marshal(objectMap) 11804} 11805 11806// UnmarshalJSON is the custom unmarshaler for RouteFilterRule struct. 11807func (rfr *RouteFilterRule) UnmarshalJSON(body []byte) error { 11808 var m map[string]*json.RawMessage 11809 err := json.Unmarshal(body, &m) 11810 if err != nil { 11811 return err 11812 } 11813 for k, v := range m { 11814 switch k { 11815 case "properties": 11816 if v != nil { 11817 var routeFilterRulePropertiesFormat RouteFilterRulePropertiesFormat 11818 err = json.Unmarshal(*v, &routeFilterRulePropertiesFormat) 11819 if err != nil { 11820 return err 11821 } 11822 rfr.RouteFilterRulePropertiesFormat = &routeFilterRulePropertiesFormat 11823 } 11824 case "name": 11825 if v != nil { 11826 var name string 11827 err = json.Unmarshal(*v, &name) 11828 if err != nil { 11829 return err 11830 } 11831 rfr.Name = &name 11832 } 11833 case "location": 11834 if v != nil { 11835 var location string 11836 err = json.Unmarshal(*v, &location) 11837 if err != nil { 11838 return err 11839 } 11840 rfr.Location = &location 11841 } 11842 case "etag": 11843 if v != nil { 11844 var etag string 11845 err = json.Unmarshal(*v, &etag) 11846 if err != nil { 11847 return err 11848 } 11849 rfr.Etag = &etag 11850 } 11851 case "tags": 11852 if v != nil { 11853 var tags map[string]*string 11854 err = json.Unmarshal(*v, &tags) 11855 if err != nil { 11856 return err 11857 } 11858 rfr.Tags = tags 11859 } 11860 case "id": 11861 if v != nil { 11862 var ID string 11863 err = json.Unmarshal(*v, &ID) 11864 if err != nil { 11865 return err 11866 } 11867 rfr.ID = &ID 11868 } 11869 } 11870 } 11871 11872 return nil 11873} 11874 11875// RouteFilterRuleListResult response for the ListRouteFilterRules API service call 11876type RouteFilterRuleListResult struct { 11877 autorest.Response `json:"-"` 11878 // Value - Gets a list of RouteFilterRules in a resource group. 11879 Value *[]RouteFilterRule `json:"value,omitempty"` 11880 // NextLink - The URL to get the next set of results. 11881 NextLink *string `json:"nextLink,omitempty"` 11882} 11883 11884// RouteFilterRuleListResultIterator provides access to a complete listing of RouteFilterRule values. 11885type RouteFilterRuleListResultIterator struct { 11886 i int 11887 page RouteFilterRuleListResultPage 11888} 11889 11890// NextWithContext advances to the next value. If there was an error making 11891// the request the iterator does not advance and the error is returned. 11892func (iter *RouteFilterRuleListResultIterator) NextWithContext(ctx context.Context) (err error) { 11893 if tracing.IsEnabled() { 11894 ctx = tracing.StartSpan(ctx, fqdn+"/RouteFilterRuleListResultIterator.NextWithContext") 11895 defer func() { 11896 sc := -1 11897 if iter.Response().Response.Response != nil { 11898 sc = iter.Response().Response.Response.StatusCode 11899 } 11900 tracing.EndSpan(ctx, sc, err) 11901 }() 11902 } 11903 iter.i++ 11904 if iter.i < len(iter.page.Values()) { 11905 return nil 11906 } 11907 err = iter.page.NextWithContext(ctx) 11908 if err != nil { 11909 iter.i-- 11910 return err 11911 } 11912 iter.i = 0 11913 return nil 11914} 11915 11916// Next advances to the next value. If there was an error making 11917// the request the iterator does not advance and the error is returned. 11918// Deprecated: Use NextWithContext() instead. 11919func (iter *RouteFilterRuleListResultIterator) Next() error { 11920 return iter.NextWithContext(context.Background()) 11921} 11922 11923// NotDone returns true if the enumeration should be started or is not yet complete. 11924func (iter RouteFilterRuleListResultIterator) NotDone() bool { 11925 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 11926} 11927 11928// Response returns the raw server response from the last page request. 11929func (iter RouteFilterRuleListResultIterator) Response() RouteFilterRuleListResult { 11930 return iter.page.Response() 11931} 11932 11933// Value returns the current value or a zero-initialized value if the 11934// iterator has advanced beyond the end of the collection. 11935func (iter RouteFilterRuleListResultIterator) Value() RouteFilterRule { 11936 if !iter.page.NotDone() { 11937 return RouteFilterRule{} 11938 } 11939 return iter.page.Values()[iter.i] 11940} 11941 11942// Creates a new instance of the RouteFilterRuleListResultIterator type. 11943func NewRouteFilterRuleListResultIterator(page RouteFilterRuleListResultPage) RouteFilterRuleListResultIterator { 11944 return RouteFilterRuleListResultIterator{page: page} 11945} 11946 11947// IsEmpty returns true if the ListResult contains no values. 11948func (rfrlr RouteFilterRuleListResult) IsEmpty() bool { 11949 return rfrlr.Value == nil || len(*rfrlr.Value) == 0 11950} 11951 11952// routeFilterRuleListResultPreparer prepares a request to retrieve the next set of results. 11953// It returns nil if no more results exist. 11954func (rfrlr RouteFilterRuleListResult) routeFilterRuleListResultPreparer(ctx context.Context) (*http.Request, error) { 11955 if rfrlr.NextLink == nil || len(to.String(rfrlr.NextLink)) < 1 { 11956 return nil, nil 11957 } 11958 return autorest.Prepare((&http.Request{}).WithContext(ctx), 11959 autorest.AsJSON(), 11960 autorest.AsGet(), 11961 autorest.WithBaseURL(to.String(rfrlr.NextLink))) 11962} 11963 11964// RouteFilterRuleListResultPage contains a page of RouteFilterRule values. 11965type RouteFilterRuleListResultPage struct { 11966 fn func(context.Context, RouteFilterRuleListResult) (RouteFilterRuleListResult, error) 11967 rfrlr RouteFilterRuleListResult 11968} 11969 11970// NextWithContext advances to the next page of values. If there was an error making 11971// the request the page does not advance and the error is returned. 11972func (page *RouteFilterRuleListResultPage) NextWithContext(ctx context.Context) (err error) { 11973 if tracing.IsEnabled() { 11974 ctx = tracing.StartSpan(ctx, fqdn+"/RouteFilterRuleListResultPage.NextWithContext") 11975 defer func() { 11976 sc := -1 11977 if page.Response().Response.Response != nil { 11978 sc = page.Response().Response.Response.StatusCode 11979 } 11980 tracing.EndSpan(ctx, sc, err) 11981 }() 11982 } 11983 next, err := page.fn(ctx, page.rfrlr) 11984 if err != nil { 11985 return err 11986 } 11987 page.rfrlr = next 11988 return nil 11989} 11990 11991// Next advances to the next page of values. If there was an error making 11992// the request the page does not advance and the error is returned. 11993// Deprecated: Use NextWithContext() instead. 11994func (page *RouteFilterRuleListResultPage) Next() error { 11995 return page.NextWithContext(context.Background()) 11996} 11997 11998// NotDone returns true if the page enumeration should be started or is not yet complete. 11999func (page RouteFilterRuleListResultPage) NotDone() bool { 12000 return !page.rfrlr.IsEmpty() 12001} 12002 12003// Response returns the raw server response from the last page request. 12004func (page RouteFilterRuleListResultPage) Response() RouteFilterRuleListResult { 12005 return page.rfrlr 12006} 12007 12008// Values returns the slice of values for the current page or nil if there are no values. 12009func (page RouteFilterRuleListResultPage) Values() []RouteFilterRule { 12010 if page.rfrlr.IsEmpty() { 12011 return nil 12012 } 12013 return *page.rfrlr.Value 12014} 12015 12016// Creates a new instance of the RouteFilterRuleListResultPage type. 12017func NewRouteFilterRuleListResultPage(getNextPage func(context.Context, RouteFilterRuleListResult) (RouteFilterRuleListResult, error)) RouteFilterRuleListResultPage { 12018 return RouteFilterRuleListResultPage{fn: getNextPage} 12019} 12020 12021// RouteFilterRulePropertiesFormat route Filter Rule Resource 12022type RouteFilterRulePropertiesFormat struct { 12023 // Access - The access type of the rule. Valid values are: 'Allow', 'Deny'. Possible values include: 'Allow', 'Deny' 12024 Access Access `json:"access,omitempty"` 12025 // RouteFilterRuleType - The rule type of the rule. Valid value is: 'Community' 12026 RouteFilterRuleType *string `json:"routeFilterRuleType,omitempty"` 12027 // Communities - The collection for bgp community values to filter on. e.g. ['12076:5010','12076:5020'] 12028 Communities *[]string `json:"communities,omitempty"` 12029 // ProvisioningState - READ-ONLY; The provisioning state of the resource. Possible values are: 'Updating', 'Deleting', 'Succeeded' and 'Failed'. 12030 ProvisioningState *string `json:"provisioningState,omitempty"` 12031} 12032 12033// RouteFilterRulesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a 12034// long-running operation. 12035type RouteFilterRulesCreateOrUpdateFuture struct { 12036 azure.Future 12037} 12038 12039// Result returns the result of the asynchronous operation. 12040// If the operation has not completed it will return an error. 12041func (future *RouteFilterRulesCreateOrUpdateFuture) Result(client RouteFilterRulesClient) (rfr RouteFilterRule, err error) { 12042 var done bool 12043 done, err = future.DoneWithContext(context.Background(), client) 12044 if err != nil { 12045 err = autorest.NewErrorWithError(err, "network.RouteFilterRulesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") 12046 return 12047 } 12048 if !done { 12049 err = azure.NewAsyncOpIncompleteError("network.RouteFilterRulesCreateOrUpdateFuture") 12050 return 12051 } 12052 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 12053 if rfr.Response.Response, err = future.GetResult(sender); err == nil && rfr.Response.Response.StatusCode != http.StatusNoContent { 12054 rfr, err = client.CreateOrUpdateResponder(rfr.Response.Response) 12055 if err != nil { 12056 err = autorest.NewErrorWithError(err, "network.RouteFilterRulesCreateOrUpdateFuture", "Result", rfr.Response.Response, "Failure responding to request") 12057 } 12058 } 12059 return 12060} 12061 12062// RouteFilterRulesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running 12063// operation. 12064type RouteFilterRulesDeleteFuture struct { 12065 azure.Future 12066} 12067 12068// Result returns the result of the asynchronous operation. 12069// If the operation has not completed it will return an error. 12070func (future *RouteFilterRulesDeleteFuture) Result(client RouteFilterRulesClient) (ar autorest.Response, err error) { 12071 var done bool 12072 done, err = future.DoneWithContext(context.Background(), client) 12073 if err != nil { 12074 err = autorest.NewErrorWithError(err, "network.RouteFilterRulesDeleteFuture", "Result", future.Response(), "Polling failure") 12075 return 12076 } 12077 if !done { 12078 err = azure.NewAsyncOpIncompleteError("network.RouteFilterRulesDeleteFuture") 12079 return 12080 } 12081 ar.Response = future.Response() 12082 return 12083} 12084 12085// RouteFilterRulesUpdateFuture an abstraction for monitoring and retrieving the results of a long-running 12086// operation. 12087type RouteFilterRulesUpdateFuture struct { 12088 azure.Future 12089} 12090 12091// Result returns the result of the asynchronous operation. 12092// If the operation has not completed it will return an error. 12093func (future *RouteFilterRulesUpdateFuture) Result(client RouteFilterRulesClient) (rfr RouteFilterRule, err error) { 12094 var done bool 12095 done, err = future.DoneWithContext(context.Background(), client) 12096 if err != nil { 12097 err = autorest.NewErrorWithError(err, "network.RouteFilterRulesUpdateFuture", "Result", future.Response(), "Polling failure") 12098 return 12099 } 12100 if !done { 12101 err = azure.NewAsyncOpIncompleteError("network.RouteFilterRulesUpdateFuture") 12102 return 12103 } 12104 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 12105 if rfr.Response.Response, err = future.GetResult(sender); err == nil && rfr.Response.Response.StatusCode != http.StatusNoContent { 12106 rfr, err = client.UpdateResponder(rfr.Response.Response) 12107 if err != nil { 12108 err = autorest.NewErrorWithError(err, "network.RouteFilterRulesUpdateFuture", "Result", rfr.Response.Response, "Failure responding to request") 12109 } 12110 } 12111 return 12112} 12113 12114// RouteFiltersCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a 12115// long-running operation. 12116type RouteFiltersCreateOrUpdateFuture struct { 12117 azure.Future 12118} 12119 12120// Result returns the result of the asynchronous operation. 12121// If the operation has not completed it will return an error. 12122func (future *RouteFiltersCreateOrUpdateFuture) Result(client RouteFiltersClient) (rf RouteFilter, err error) { 12123 var done bool 12124 done, err = future.DoneWithContext(context.Background(), client) 12125 if err != nil { 12126 err = autorest.NewErrorWithError(err, "network.RouteFiltersCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") 12127 return 12128 } 12129 if !done { 12130 err = azure.NewAsyncOpIncompleteError("network.RouteFiltersCreateOrUpdateFuture") 12131 return 12132 } 12133 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 12134 if rf.Response.Response, err = future.GetResult(sender); err == nil && rf.Response.Response.StatusCode != http.StatusNoContent { 12135 rf, err = client.CreateOrUpdateResponder(rf.Response.Response) 12136 if err != nil { 12137 err = autorest.NewErrorWithError(err, "network.RouteFiltersCreateOrUpdateFuture", "Result", rf.Response.Response, "Failure responding to request") 12138 } 12139 } 12140 return 12141} 12142 12143// RouteFiltersDeleteFuture an abstraction for monitoring and retrieving the results of a long-running 12144// operation. 12145type RouteFiltersDeleteFuture struct { 12146 azure.Future 12147} 12148 12149// Result returns the result of the asynchronous operation. 12150// If the operation has not completed it will return an error. 12151func (future *RouteFiltersDeleteFuture) Result(client RouteFiltersClient) (ar autorest.Response, err error) { 12152 var done bool 12153 done, err = future.DoneWithContext(context.Background(), client) 12154 if err != nil { 12155 err = autorest.NewErrorWithError(err, "network.RouteFiltersDeleteFuture", "Result", future.Response(), "Polling failure") 12156 return 12157 } 12158 if !done { 12159 err = azure.NewAsyncOpIncompleteError("network.RouteFiltersDeleteFuture") 12160 return 12161 } 12162 ar.Response = future.Response() 12163 return 12164} 12165 12166// RouteFiltersUpdateFuture an abstraction for monitoring and retrieving the results of a long-running 12167// operation. 12168type RouteFiltersUpdateFuture struct { 12169 azure.Future 12170} 12171 12172// Result returns the result of the asynchronous operation. 12173// If the operation has not completed it will return an error. 12174func (future *RouteFiltersUpdateFuture) Result(client RouteFiltersClient) (rf RouteFilter, err error) { 12175 var done bool 12176 done, err = future.DoneWithContext(context.Background(), client) 12177 if err != nil { 12178 err = autorest.NewErrorWithError(err, "network.RouteFiltersUpdateFuture", "Result", future.Response(), "Polling failure") 12179 return 12180 } 12181 if !done { 12182 err = azure.NewAsyncOpIncompleteError("network.RouteFiltersUpdateFuture") 12183 return 12184 } 12185 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 12186 if rf.Response.Response, err = future.GetResult(sender); err == nil && rf.Response.Response.StatusCode != http.StatusNoContent { 12187 rf, err = client.UpdateResponder(rf.Response.Response) 12188 if err != nil { 12189 err = autorest.NewErrorWithError(err, "network.RouteFiltersUpdateFuture", "Result", rf.Response.Response, "Failure responding to request") 12190 } 12191 } 12192 return 12193} 12194 12195// RouteListResult response for the ListRoute API service call 12196type RouteListResult struct { 12197 autorest.Response `json:"-"` 12198 // Value - Gets a list of routes in a resource group. 12199 Value *[]Route `json:"value,omitempty"` 12200 // NextLink - The URL to get the next set of results. 12201 NextLink *string `json:"nextLink,omitempty"` 12202} 12203 12204// RouteListResultIterator provides access to a complete listing of Route values. 12205type RouteListResultIterator struct { 12206 i int 12207 page RouteListResultPage 12208} 12209 12210// NextWithContext advances to the next value. If there was an error making 12211// the request the iterator does not advance and the error is returned. 12212func (iter *RouteListResultIterator) NextWithContext(ctx context.Context) (err error) { 12213 if tracing.IsEnabled() { 12214 ctx = tracing.StartSpan(ctx, fqdn+"/RouteListResultIterator.NextWithContext") 12215 defer func() { 12216 sc := -1 12217 if iter.Response().Response.Response != nil { 12218 sc = iter.Response().Response.Response.StatusCode 12219 } 12220 tracing.EndSpan(ctx, sc, err) 12221 }() 12222 } 12223 iter.i++ 12224 if iter.i < len(iter.page.Values()) { 12225 return nil 12226 } 12227 err = iter.page.NextWithContext(ctx) 12228 if err != nil { 12229 iter.i-- 12230 return err 12231 } 12232 iter.i = 0 12233 return nil 12234} 12235 12236// Next advances to the next value. If there was an error making 12237// the request the iterator does not advance and the error is returned. 12238// Deprecated: Use NextWithContext() instead. 12239func (iter *RouteListResultIterator) Next() error { 12240 return iter.NextWithContext(context.Background()) 12241} 12242 12243// NotDone returns true if the enumeration should be started or is not yet complete. 12244func (iter RouteListResultIterator) NotDone() bool { 12245 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 12246} 12247 12248// Response returns the raw server response from the last page request. 12249func (iter RouteListResultIterator) Response() RouteListResult { 12250 return iter.page.Response() 12251} 12252 12253// Value returns the current value or a zero-initialized value if the 12254// iterator has advanced beyond the end of the collection. 12255func (iter RouteListResultIterator) Value() Route { 12256 if !iter.page.NotDone() { 12257 return Route{} 12258 } 12259 return iter.page.Values()[iter.i] 12260} 12261 12262// Creates a new instance of the RouteListResultIterator type. 12263func NewRouteListResultIterator(page RouteListResultPage) RouteListResultIterator { 12264 return RouteListResultIterator{page: page} 12265} 12266 12267// IsEmpty returns true if the ListResult contains no values. 12268func (rlr RouteListResult) IsEmpty() bool { 12269 return rlr.Value == nil || len(*rlr.Value) == 0 12270} 12271 12272// routeListResultPreparer prepares a request to retrieve the next set of results. 12273// It returns nil if no more results exist. 12274func (rlr RouteListResult) routeListResultPreparer(ctx context.Context) (*http.Request, error) { 12275 if rlr.NextLink == nil || len(to.String(rlr.NextLink)) < 1 { 12276 return nil, nil 12277 } 12278 return autorest.Prepare((&http.Request{}).WithContext(ctx), 12279 autorest.AsJSON(), 12280 autorest.AsGet(), 12281 autorest.WithBaseURL(to.String(rlr.NextLink))) 12282} 12283 12284// RouteListResultPage contains a page of Route values. 12285type RouteListResultPage struct { 12286 fn func(context.Context, RouteListResult) (RouteListResult, error) 12287 rlr RouteListResult 12288} 12289 12290// NextWithContext advances to the next page of values. If there was an error making 12291// the request the page does not advance and the error is returned. 12292func (page *RouteListResultPage) NextWithContext(ctx context.Context) (err error) { 12293 if tracing.IsEnabled() { 12294 ctx = tracing.StartSpan(ctx, fqdn+"/RouteListResultPage.NextWithContext") 12295 defer func() { 12296 sc := -1 12297 if page.Response().Response.Response != nil { 12298 sc = page.Response().Response.Response.StatusCode 12299 } 12300 tracing.EndSpan(ctx, sc, err) 12301 }() 12302 } 12303 next, err := page.fn(ctx, page.rlr) 12304 if err != nil { 12305 return err 12306 } 12307 page.rlr = next 12308 return nil 12309} 12310 12311// Next advances to the next page of values. If there was an error making 12312// the request the page does not advance and the error is returned. 12313// Deprecated: Use NextWithContext() instead. 12314func (page *RouteListResultPage) Next() error { 12315 return page.NextWithContext(context.Background()) 12316} 12317 12318// NotDone returns true if the page enumeration should be started or is not yet complete. 12319func (page RouteListResultPage) NotDone() bool { 12320 return !page.rlr.IsEmpty() 12321} 12322 12323// Response returns the raw server response from the last page request. 12324func (page RouteListResultPage) Response() RouteListResult { 12325 return page.rlr 12326} 12327 12328// Values returns the slice of values for the current page or nil if there are no values. 12329func (page RouteListResultPage) Values() []Route { 12330 if page.rlr.IsEmpty() { 12331 return nil 12332 } 12333 return *page.rlr.Value 12334} 12335 12336// Creates a new instance of the RouteListResultPage type. 12337func NewRouteListResultPage(getNextPage func(context.Context, RouteListResult) (RouteListResult, error)) RouteListResultPage { 12338 return RouteListResultPage{fn: getNextPage} 12339} 12340 12341// RoutePropertiesFormat route resource 12342type RoutePropertiesFormat struct { 12343 // AddressPrefix - The destination CIDR to which the route applies. 12344 AddressPrefix *string `json:"addressPrefix,omitempty"` 12345 // NextHopType - The type of Azure hop the packet should be sent to. Possible values are: 'VirtualNetworkGateway', 'VnetLocal', 'Internet', 'VirtualAppliance', and 'None'. Possible values include: 'RouteNextHopTypeVirtualNetworkGateway', 'RouteNextHopTypeVnetLocal', 'RouteNextHopTypeInternet', 'RouteNextHopTypeVirtualAppliance', 'RouteNextHopTypeNone' 12346 NextHopType RouteNextHopType `json:"nextHopType,omitempty"` 12347 // NextHopIPAddress - The IP address packets should be forwarded to. Next hop values are only allowed in routes where the next hop type is VirtualAppliance. 12348 NextHopIPAddress *string `json:"nextHopIpAddress,omitempty"` 12349 // ProvisioningState - The provisioning state of the resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. 12350 ProvisioningState *string `json:"provisioningState,omitempty"` 12351} 12352 12353// RoutesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running 12354// operation. 12355type RoutesCreateOrUpdateFuture struct { 12356 azure.Future 12357} 12358 12359// Result returns the result of the asynchronous operation. 12360// If the operation has not completed it will return an error. 12361func (future *RoutesCreateOrUpdateFuture) Result(client RoutesClient) (r Route, err error) { 12362 var done bool 12363 done, err = future.DoneWithContext(context.Background(), client) 12364 if err != nil { 12365 err = autorest.NewErrorWithError(err, "network.RoutesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") 12366 return 12367 } 12368 if !done { 12369 err = azure.NewAsyncOpIncompleteError("network.RoutesCreateOrUpdateFuture") 12370 return 12371 } 12372 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 12373 if r.Response.Response, err = future.GetResult(sender); err == nil && r.Response.Response.StatusCode != http.StatusNoContent { 12374 r, err = client.CreateOrUpdateResponder(r.Response.Response) 12375 if err != nil { 12376 err = autorest.NewErrorWithError(err, "network.RoutesCreateOrUpdateFuture", "Result", r.Response.Response, "Failure responding to request") 12377 } 12378 } 12379 return 12380} 12381 12382// RoutesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation. 12383type RoutesDeleteFuture struct { 12384 azure.Future 12385} 12386 12387// Result returns the result of the asynchronous operation. 12388// If the operation has not completed it will return an error. 12389func (future *RoutesDeleteFuture) Result(client RoutesClient) (ar autorest.Response, err error) { 12390 var done bool 12391 done, err = future.DoneWithContext(context.Background(), client) 12392 if err != nil { 12393 err = autorest.NewErrorWithError(err, "network.RoutesDeleteFuture", "Result", future.Response(), "Polling failure") 12394 return 12395 } 12396 if !done { 12397 err = azure.NewAsyncOpIncompleteError("network.RoutesDeleteFuture") 12398 return 12399 } 12400 ar.Response = future.Response() 12401 return 12402} 12403 12404// RouteTable route table resource. 12405type RouteTable struct { 12406 autorest.Response `json:"-"` 12407 // RouteTablePropertiesFormat - Properties of the route table. 12408 *RouteTablePropertiesFormat `json:"properties,omitempty"` 12409 // Etag - Gets a unique read-only string that changes whenever the resource is updated. 12410 Etag *string `json:"etag,omitempty"` 12411 // ID - Resource ID. 12412 ID *string `json:"id,omitempty"` 12413 // Name - READ-ONLY; Resource name. 12414 Name *string `json:"name,omitempty"` 12415 // Type - READ-ONLY; Resource type. 12416 Type *string `json:"type,omitempty"` 12417 // Location - Resource location. 12418 Location *string `json:"location,omitempty"` 12419 // Tags - Resource tags. 12420 Tags map[string]*string `json:"tags"` 12421} 12422 12423// MarshalJSON is the custom marshaler for RouteTable. 12424func (rt RouteTable) MarshalJSON() ([]byte, error) { 12425 objectMap := make(map[string]interface{}) 12426 if rt.RouteTablePropertiesFormat != nil { 12427 objectMap["properties"] = rt.RouteTablePropertiesFormat 12428 } 12429 if rt.Etag != nil { 12430 objectMap["etag"] = rt.Etag 12431 } 12432 if rt.ID != nil { 12433 objectMap["id"] = rt.ID 12434 } 12435 if rt.Location != nil { 12436 objectMap["location"] = rt.Location 12437 } 12438 if rt.Tags != nil { 12439 objectMap["tags"] = rt.Tags 12440 } 12441 return json.Marshal(objectMap) 12442} 12443 12444// UnmarshalJSON is the custom unmarshaler for RouteTable struct. 12445func (rt *RouteTable) UnmarshalJSON(body []byte) error { 12446 var m map[string]*json.RawMessage 12447 err := json.Unmarshal(body, &m) 12448 if err != nil { 12449 return err 12450 } 12451 for k, v := range m { 12452 switch k { 12453 case "properties": 12454 if v != nil { 12455 var routeTablePropertiesFormat RouteTablePropertiesFormat 12456 err = json.Unmarshal(*v, &routeTablePropertiesFormat) 12457 if err != nil { 12458 return err 12459 } 12460 rt.RouteTablePropertiesFormat = &routeTablePropertiesFormat 12461 } 12462 case "etag": 12463 if v != nil { 12464 var etag string 12465 err = json.Unmarshal(*v, &etag) 12466 if err != nil { 12467 return err 12468 } 12469 rt.Etag = &etag 12470 } 12471 case "id": 12472 if v != nil { 12473 var ID string 12474 err = json.Unmarshal(*v, &ID) 12475 if err != nil { 12476 return err 12477 } 12478 rt.ID = &ID 12479 } 12480 case "name": 12481 if v != nil { 12482 var name string 12483 err = json.Unmarshal(*v, &name) 12484 if err != nil { 12485 return err 12486 } 12487 rt.Name = &name 12488 } 12489 case "type": 12490 if v != nil { 12491 var typeVar string 12492 err = json.Unmarshal(*v, &typeVar) 12493 if err != nil { 12494 return err 12495 } 12496 rt.Type = &typeVar 12497 } 12498 case "location": 12499 if v != nil { 12500 var location string 12501 err = json.Unmarshal(*v, &location) 12502 if err != nil { 12503 return err 12504 } 12505 rt.Location = &location 12506 } 12507 case "tags": 12508 if v != nil { 12509 var tags map[string]*string 12510 err = json.Unmarshal(*v, &tags) 12511 if err != nil { 12512 return err 12513 } 12514 rt.Tags = tags 12515 } 12516 } 12517 } 12518 12519 return nil 12520} 12521 12522// RouteTableListResult response for the ListRouteTable API service call. 12523type RouteTableListResult struct { 12524 autorest.Response `json:"-"` 12525 // Value - Gets a list of route tables in a resource group. 12526 Value *[]RouteTable `json:"value,omitempty"` 12527 // NextLink - The URL to get the next set of results. 12528 NextLink *string `json:"nextLink,omitempty"` 12529} 12530 12531// RouteTableListResultIterator provides access to a complete listing of RouteTable values. 12532type RouteTableListResultIterator struct { 12533 i int 12534 page RouteTableListResultPage 12535} 12536 12537// NextWithContext advances to the next value. If there was an error making 12538// the request the iterator does not advance and the error is returned. 12539func (iter *RouteTableListResultIterator) NextWithContext(ctx context.Context) (err error) { 12540 if tracing.IsEnabled() { 12541 ctx = tracing.StartSpan(ctx, fqdn+"/RouteTableListResultIterator.NextWithContext") 12542 defer func() { 12543 sc := -1 12544 if iter.Response().Response.Response != nil { 12545 sc = iter.Response().Response.Response.StatusCode 12546 } 12547 tracing.EndSpan(ctx, sc, err) 12548 }() 12549 } 12550 iter.i++ 12551 if iter.i < len(iter.page.Values()) { 12552 return nil 12553 } 12554 err = iter.page.NextWithContext(ctx) 12555 if err != nil { 12556 iter.i-- 12557 return err 12558 } 12559 iter.i = 0 12560 return nil 12561} 12562 12563// Next advances to the next value. If there was an error making 12564// the request the iterator does not advance and the error is returned. 12565// Deprecated: Use NextWithContext() instead. 12566func (iter *RouteTableListResultIterator) Next() error { 12567 return iter.NextWithContext(context.Background()) 12568} 12569 12570// NotDone returns true if the enumeration should be started or is not yet complete. 12571func (iter RouteTableListResultIterator) NotDone() bool { 12572 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 12573} 12574 12575// Response returns the raw server response from the last page request. 12576func (iter RouteTableListResultIterator) Response() RouteTableListResult { 12577 return iter.page.Response() 12578} 12579 12580// Value returns the current value or a zero-initialized value if the 12581// iterator has advanced beyond the end of the collection. 12582func (iter RouteTableListResultIterator) Value() RouteTable { 12583 if !iter.page.NotDone() { 12584 return RouteTable{} 12585 } 12586 return iter.page.Values()[iter.i] 12587} 12588 12589// Creates a new instance of the RouteTableListResultIterator type. 12590func NewRouteTableListResultIterator(page RouteTableListResultPage) RouteTableListResultIterator { 12591 return RouteTableListResultIterator{page: page} 12592} 12593 12594// IsEmpty returns true if the ListResult contains no values. 12595func (rtlr RouteTableListResult) IsEmpty() bool { 12596 return rtlr.Value == nil || len(*rtlr.Value) == 0 12597} 12598 12599// routeTableListResultPreparer prepares a request to retrieve the next set of results. 12600// It returns nil if no more results exist. 12601func (rtlr RouteTableListResult) routeTableListResultPreparer(ctx context.Context) (*http.Request, error) { 12602 if rtlr.NextLink == nil || len(to.String(rtlr.NextLink)) < 1 { 12603 return nil, nil 12604 } 12605 return autorest.Prepare((&http.Request{}).WithContext(ctx), 12606 autorest.AsJSON(), 12607 autorest.AsGet(), 12608 autorest.WithBaseURL(to.String(rtlr.NextLink))) 12609} 12610 12611// RouteTableListResultPage contains a page of RouteTable values. 12612type RouteTableListResultPage struct { 12613 fn func(context.Context, RouteTableListResult) (RouteTableListResult, error) 12614 rtlr RouteTableListResult 12615} 12616 12617// NextWithContext advances to the next page of values. If there was an error making 12618// the request the page does not advance and the error is returned. 12619func (page *RouteTableListResultPage) NextWithContext(ctx context.Context) (err error) { 12620 if tracing.IsEnabled() { 12621 ctx = tracing.StartSpan(ctx, fqdn+"/RouteTableListResultPage.NextWithContext") 12622 defer func() { 12623 sc := -1 12624 if page.Response().Response.Response != nil { 12625 sc = page.Response().Response.Response.StatusCode 12626 } 12627 tracing.EndSpan(ctx, sc, err) 12628 }() 12629 } 12630 next, err := page.fn(ctx, page.rtlr) 12631 if err != nil { 12632 return err 12633 } 12634 page.rtlr = next 12635 return nil 12636} 12637 12638// Next advances to the next page of values. If there was an error making 12639// the request the page does not advance and the error is returned. 12640// Deprecated: Use NextWithContext() instead. 12641func (page *RouteTableListResultPage) Next() error { 12642 return page.NextWithContext(context.Background()) 12643} 12644 12645// NotDone returns true if the page enumeration should be started or is not yet complete. 12646func (page RouteTableListResultPage) NotDone() bool { 12647 return !page.rtlr.IsEmpty() 12648} 12649 12650// Response returns the raw server response from the last page request. 12651func (page RouteTableListResultPage) Response() RouteTableListResult { 12652 return page.rtlr 12653} 12654 12655// Values returns the slice of values for the current page or nil if there are no values. 12656func (page RouteTableListResultPage) Values() []RouteTable { 12657 if page.rtlr.IsEmpty() { 12658 return nil 12659 } 12660 return *page.rtlr.Value 12661} 12662 12663// Creates a new instance of the RouteTableListResultPage type. 12664func NewRouteTableListResultPage(getNextPage func(context.Context, RouteTableListResult) (RouteTableListResult, error)) RouteTableListResultPage { 12665 return RouteTableListResultPage{fn: getNextPage} 12666} 12667 12668// RouteTablePropertiesFormat route Table resource 12669type RouteTablePropertiesFormat struct { 12670 // Routes - Collection of routes contained within a route table. 12671 Routes *[]Route `json:"routes,omitempty"` 12672 // Subnets - READ-ONLY; A collection of references to subnets. 12673 Subnets *[]Subnet `json:"subnets,omitempty"` 12674 // DisableBgpRoutePropagation - Gets or sets whether to disable the routes learned by BGP on that route table. True means disable. 12675 DisableBgpRoutePropagation *bool `json:"disableBgpRoutePropagation,omitempty"` 12676 // ProvisioningState - The provisioning state of the resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. 12677 ProvisioningState *string `json:"provisioningState,omitempty"` 12678} 12679 12680// RouteTablesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a 12681// long-running operation. 12682type RouteTablesCreateOrUpdateFuture struct { 12683 azure.Future 12684} 12685 12686// Result returns the result of the asynchronous operation. 12687// If the operation has not completed it will return an error. 12688func (future *RouteTablesCreateOrUpdateFuture) Result(client RouteTablesClient) (rt RouteTable, err error) { 12689 var done bool 12690 done, err = future.DoneWithContext(context.Background(), client) 12691 if err != nil { 12692 err = autorest.NewErrorWithError(err, "network.RouteTablesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") 12693 return 12694 } 12695 if !done { 12696 err = azure.NewAsyncOpIncompleteError("network.RouteTablesCreateOrUpdateFuture") 12697 return 12698 } 12699 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 12700 if rt.Response.Response, err = future.GetResult(sender); err == nil && rt.Response.Response.StatusCode != http.StatusNoContent { 12701 rt, err = client.CreateOrUpdateResponder(rt.Response.Response) 12702 if err != nil { 12703 err = autorest.NewErrorWithError(err, "network.RouteTablesCreateOrUpdateFuture", "Result", rt.Response.Response, "Failure responding to request") 12704 } 12705 } 12706 return 12707} 12708 12709// RouteTablesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running 12710// operation. 12711type RouteTablesDeleteFuture struct { 12712 azure.Future 12713} 12714 12715// Result returns the result of the asynchronous operation. 12716// If the operation has not completed it will return an error. 12717func (future *RouteTablesDeleteFuture) Result(client RouteTablesClient) (ar autorest.Response, err error) { 12718 var done bool 12719 done, err = future.DoneWithContext(context.Background(), client) 12720 if err != nil { 12721 err = autorest.NewErrorWithError(err, "network.RouteTablesDeleteFuture", "Result", future.Response(), "Polling failure") 12722 return 12723 } 12724 if !done { 12725 err = azure.NewAsyncOpIncompleteError("network.RouteTablesDeleteFuture") 12726 return 12727 } 12728 ar.Response = future.Response() 12729 return 12730} 12731 12732// RouteTablesUpdateTagsFuture an abstraction for monitoring and retrieving the results of a long-running 12733// operation. 12734type RouteTablesUpdateTagsFuture struct { 12735 azure.Future 12736} 12737 12738// Result returns the result of the asynchronous operation. 12739// If the operation has not completed it will return an error. 12740func (future *RouteTablesUpdateTagsFuture) Result(client RouteTablesClient) (rt RouteTable, err error) { 12741 var done bool 12742 done, err = future.DoneWithContext(context.Background(), client) 12743 if err != nil { 12744 err = autorest.NewErrorWithError(err, "network.RouteTablesUpdateTagsFuture", "Result", future.Response(), "Polling failure") 12745 return 12746 } 12747 if !done { 12748 err = azure.NewAsyncOpIncompleteError("network.RouteTablesUpdateTagsFuture") 12749 return 12750 } 12751 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 12752 if rt.Response.Response, err = future.GetResult(sender); err == nil && rt.Response.Response.StatusCode != http.StatusNoContent { 12753 rt, err = client.UpdateTagsResponder(rt.Response.Response) 12754 if err != nil { 12755 err = autorest.NewErrorWithError(err, "network.RouteTablesUpdateTagsFuture", "Result", rt.Response.Response, "Failure responding to request") 12756 } 12757 } 12758 return 12759} 12760 12761// SecurityGroup networkSecurityGroup resource. 12762type SecurityGroup struct { 12763 autorest.Response `json:"-"` 12764 // SecurityGroupPropertiesFormat - Properties of the network security group 12765 *SecurityGroupPropertiesFormat `json:"properties,omitempty"` 12766 // Etag - A unique read-only string that changes whenever the resource is updated. 12767 Etag *string `json:"etag,omitempty"` 12768 // ID - Resource ID. 12769 ID *string `json:"id,omitempty"` 12770 // Name - READ-ONLY; Resource name. 12771 Name *string `json:"name,omitempty"` 12772 // Type - READ-ONLY; Resource type. 12773 Type *string `json:"type,omitempty"` 12774 // Location - Resource location. 12775 Location *string `json:"location,omitempty"` 12776 // Tags - Resource tags. 12777 Tags map[string]*string `json:"tags"` 12778} 12779 12780// MarshalJSON is the custom marshaler for SecurityGroup. 12781func (sg SecurityGroup) MarshalJSON() ([]byte, error) { 12782 objectMap := make(map[string]interface{}) 12783 if sg.SecurityGroupPropertiesFormat != nil { 12784 objectMap["properties"] = sg.SecurityGroupPropertiesFormat 12785 } 12786 if sg.Etag != nil { 12787 objectMap["etag"] = sg.Etag 12788 } 12789 if sg.ID != nil { 12790 objectMap["id"] = sg.ID 12791 } 12792 if sg.Location != nil { 12793 objectMap["location"] = sg.Location 12794 } 12795 if sg.Tags != nil { 12796 objectMap["tags"] = sg.Tags 12797 } 12798 return json.Marshal(objectMap) 12799} 12800 12801// UnmarshalJSON is the custom unmarshaler for SecurityGroup struct. 12802func (sg *SecurityGroup) UnmarshalJSON(body []byte) error { 12803 var m map[string]*json.RawMessage 12804 err := json.Unmarshal(body, &m) 12805 if err != nil { 12806 return err 12807 } 12808 for k, v := range m { 12809 switch k { 12810 case "properties": 12811 if v != nil { 12812 var securityGroupPropertiesFormat SecurityGroupPropertiesFormat 12813 err = json.Unmarshal(*v, &securityGroupPropertiesFormat) 12814 if err != nil { 12815 return err 12816 } 12817 sg.SecurityGroupPropertiesFormat = &securityGroupPropertiesFormat 12818 } 12819 case "etag": 12820 if v != nil { 12821 var etag string 12822 err = json.Unmarshal(*v, &etag) 12823 if err != nil { 12824 return err 12825 } 12826 sg.Etag = &etag 12827 } 12828 case "id": 12829 if v != nil { 12830 var ID string 12831 err = json.Unmarshal(*v, &ID) 12832 if err != nil { 12833 return err 12834 } 12835 sg.ID = &ID 12836 } 12837 case "name": 12838 if v != nil { 12839 var name string 12840 err = json.Unmarshal(*v, &name) 12841 if err != nil { 12842 return err 12843 } 12844 sg.Name = &name 12845 } 12846 case "type": 12847 if v != nil { 12848 var typeVar string 12849 err = json.Unmarshal(*v, &typeVar) 12850 if err != nil { 12851 return err 12852 } 12853 sg.Type = &typeVar 12854 } 12855 case "location": 12856 if v != nil { 12857 var location string 12858 err = json.Unmarshal(*v, &location) 12859 if err != nil { 12860 return err 12861 } 12862 sg.Location = &location 12863 } 12864 case "tags": 12865 if v != nil { 12866 var tags map[string]*string 12867 err = json.Unmarshal(*v, &tags) 12868 if err != nil { 12869 return err 12870 } 12871 sg.Tags = tags 12872 } 12873 } 12874 } 12875 12876 return nil 12877} 12878 12879// SecurityGroupListResult response for ListNetworkSecurityGroups API service call. 12880type SecurityGroupListResult struct { 12881 autorest.Response `json:"-"` 12882 // Value - A list of NetworkSecurityGroup resources. 12883 Value *[]SecurityGroup `json:"value,omitempty"` 12884 // NextLink - The URL to get the next set of results. 12885 NextLink *string `json:"nextLink,omitempty"` 12886} 12887 12888// SecurityGroupListResultIterator provides access to a complete listing of SecurityGroup values. 12889type SecurityGroupListResultIterator struct { 12890 i int 12891 page SecurityGroupListResultPage 12892} 12893 12894// NextWithContext advances to the next value. If there was an error making 12895// the request the iterator does not advance and the error is returned. 12896func (iter *SecurityGroupListResultIterator) NextWithContext(ctx context.Context) (err error) { 12897 if tracing.IsEnabled() { 12898 ctx = tracing.StartSpan(ctx, fqdn+"/SecurityGroupListResultIterator.NextWithContext") 12899 defer func() { 12900 sc := -1 12901 if iter.Response().Response.Response != nil { 12902 sc = iter.Response().Response.Response.StatusCode 12903 } 12904 tracing.EndSpan(ctx, sc, err) 12905 }() 12906 } 12907 iter.i++ 12908 if iter.i < len(iter.page.Values()) { 12909 return nil 12910 } 12911 err = iter.page.NextWithContext(ctx) 12912 if err != nil { 12913 iter.i-- 12914 return err 12915 } 12916 iter.i = 0 12917 return nil 12918} 12919 12920// Next advances to the next value. If there was an error making 12921// the request the iterator does not advance and the error is returned. 12922// Deprecated: Use NextWithContext() instead. 12923func (iter *SecurityGroupListResultIterator) Next() error { 12924 return iter.NextWithContext(context.Background()) 12925} 12926 12927// NotDone returns true if the enumeration should be started or is not yet complete. 12928func (iter SecurityGroupListResultIterator) NotDone() bool { 12929 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 12930} 12931 12932// Response returns the raw server response from the last page request. 12933func (iter SecurityGroupListResultIterator) Response() SecurityGroupListResult { 12934 return iter.page.Response() 12935} 12936 12937// Value returns the current value or a zero-initialized value if the 12938// iterator has advanced beyond the end of the collection. 12939func (iter SecurityGroupListResultIterator) Value() SecurityGroup { 12940 if !iter.page.NotDone() { 12941 return SecurityGroup{} 12942 } 12943 return iter.page.Values()[iter.i] 12944} 12945 12946// Creates a new instance of the SecurityGroupListResultIterator type. 12947func NewSecurityGroupListResultIterator(page SecurityGroupListResultPage) SecurityGroupListResultIterator { 12948 return SecurityGroupListResultIterator{page: page} 12949} 12950 12951// IsEmpty returns true if the ListResult contains no values. 12952func (sglr SecurityGroupListResult) IsEmpty() bool { 12953 return sglr.Value == nil || len(*sglr.Value) == 0 12954} 12955 12956// securityGroupListResultPreparer prepares a request to retrieve the next set of results. 12957// It returns nil if no more results exist. 12958func (sglr SecurityGroupListResult) securityGroupListResultPreparer(ctx context.Context) (*http.Request, error) { 12959 if sglr.NextLink == nil || len(to.String(sglr.NextLink)) < 1 { 12960 return nil, nil 12961 } 12962 return autorest.Prepare((&http.Request{}).WithContext(ctx), 12963 autorest.AsJSON(), 12964 autorest.AsGet(), 12965 autorest.WithBaseURL(to.String(sglr.NextLink))) 12966} 12967 12968// SecurityGroupListResultPage contains a page of SecurityGroup values. 12969type SecurityGroupListResultPage struct { 12970 fn func(context.Context, SecurityGroupListResult) (SecurityGroupListResult, error) 12971 sglr SecurityGroupListResult 12972} 12973 12974// NextWithContext advances to the next page of values. If there was an error making 12975// the request the page does not advance and the error is returned. 12976func (page *SecurityGroupListResultPage) NextWithContext(ctx context.Context) (err error) { 12977 if tracing.IsEnabled() { 12978 ctx = tracing.StartSpan(ctx, fqdn+"/SecurityGroupListResultPage.NextWithContext") 12979 defer func() { 12980 sc := -1 12981 if page.Response().Response.Response != nil { 12982 sc = page.Response().Response.Response.StatusCode 12983 } 12984 tracing.EndSpan(ctx, sc, err) 12985 }() 12986 } 12987 next, err := page.fn(ctx, page.sglr) 12988 if err != nil { 12989 return err 12990 } 12991 page.sglr = next 12992 return nil 12993} 12994 12995// Next advances to the next page of values. If there was an error making 12996// the request the page does not advance and the error is returned. 12997// Deprecated: Use NextWithContext() instead. 12998func (page *SecurityGroupListResultPage) Next() error { 12999 return page.NextWithContext(context.Background()) 13000} 13001 13002// NotDone returns true if the page enumeration should be started or is not yet complete. 13003func (page SecurityGroupListResultPage) NotDone() bool { 13004 return !page.sglr.IsEmpty() 13005} 13006 13007// Response returns the raw server response from the last page request. 13008func (page SecurityGroupListResultPage) Response() SecurityGroupListResult { 13009 return page.sglr 13010} 13011 13012// Values returns the slice of values for the current page or nil if there are no values. 13013func (page SecurityGroupListResultPage) Values() []SecurityGroup { 13014 if page.sglr.IsEmpty() { 13015 return nil 13016 } 13017 return *page.sglr.Value 13018} 13019 13020// Creates a new instance of the SecurityGroupListResultPage type. 13021func NewSecurityGroupListResultPage(getNextPage func(context.Context, SecurityGroupListResult) (SecurityGroupListResult, error)) SecurityGroupListResultPage { 13022 return SecurityGroupListResultPage{fn: getNextPage} 13023} 13024 13025// SecurityGroupNetworkInterface network interface and all its associated security rules. 13026type SecurityGroupNetworkInterface struct { 13027 // ID - ID of the network interface. 13028 ID *string `json:"id,omitempty"` 13029 SecurityRuleAssociations *SecurityRuleAssociations `json:"securityRuleAssociations,omitempty"` 13030} 13031 13032// SecurityGroupPropertiesFormat network Security Group resource. 13033type SecurityGroupPropertiesFormat struct { 13034 // SecurityRules - A collection of security rules of the network security group. 13035 SecurityRules *[]SecurityRule `json:"securityRules,omitempty"` 13036 // DefaultSecurityRules - The default security rules of network security group. 13037 DefaultSecurityRules *[]SecurityRule `json:"defaultSecurityRules,omitempty"` 13038 // NetworkInterfaces - READ-ONLY; A collection of references to network interfaces. 13039 NetworkInterfaces *[]Interface `json:"networkInterfaces,omitempty"` 13040 // Subnets - READ-ONLY; A collection of references to subnets. 13041 Subnets *[]Subnet `json:"subnets,omitempty"` 13042 // ResourceGUID - The resource GUID property of the network security group resource. 13043 ResourceGUID *string `json:"resourceGuid,omitempty"` 13044 // ProvisioningState - The provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. 13045 ProvisioningState *string `json:"provisioningState,omitempty"` 13046} 13047 13048// SecurityGroupsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a 13049// long-running operation. 13050type SecurityGroupsCreateOrUpdateFuture struct { 13051 azure.Future 13052} 13053 13054// Result returns the result of the asynchronous operation. 13055// If the operation has not completed it will return an error. 13056func (future *SecurityGroupsCreateOrUpdateFuture) Result(client SecurityGroupsClient) (sg SecurityGroup, err error) { 13057 var done bool 13058 done, err = future.DoneWithContext(context.Background(), client) 13059 if err != nil { 13060 err = autorest.NewErrorWithError(err, "network.SecurityGroupsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") 13061 return 13062 } 13063 if !done { 13064 err = azure.NewAsyncOpIncompleteError("network.SecurityGroupsCreateOrUpdateFuture") 13065 return 13066 } 13067 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 13068 if sg.Response.Response, err = future.GetResult(sender); err == nil && sg.Response.Response.StatusCode != http.StatusNoContent { 13069 sg, err = client.CreateOrUpdateResponder(sg.Response.Response) 13070 if err != nil { 13071 err = autorest.NewErrorWithError(err, "network.SecurityGroupsCreateOrUpdateFuture", "Result", sg.Response.Response, "Failure responding to request") 13072 } 13073 } 13074 return 13075} 13076 13077// SecurityGroupsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running 13078// operation. 13079type SecurityGroupsDeleteFuture struct { 13080 azure.Future 13081} 13082 13083// Result returns the result of the asynchronous operation. 13084// If the operation has not completed it will return an error. 13085func (future *SecurityGroupsDeleteFuture) Result(client SecurityGroupsClient) (ar autorest.Response, err error) { 13086 var done bool 13087 done, err = future.DoneWithContext(context.Background(), client) 13088 if err != nil { 13089 err = autorest.NewErrorWithError(err, "network.SecurityGroupsDeleteFuture", "Result", future.Response(), "Polling failure") 13090 return 13091 } 13092 if !done { 13093 err = azure.NewAsyncOpIncompleteError("network.SecurityGroupsDeleteFuture") 13094 return 13095 } 13096 ar.Response = future.Response() 13097 return 13098} 13099 13100// SecurityGroupsUpdateTagsFuture an abstraction for monitoring and retrieving the results of a 13101// long-running operation. 13102type SecurityGroupsUpdateTagsFuture struct { 13103 azure.Future 13104} 13105 13106// Result returns the result of the asynchronous operation. 13107// If the operation has not completed it will return an error. 13108func (future *SecurityGroupsUpdateTagsFuture) Result(client SecurityGroupsClient) (sg SecurityGroup, err error) { 13109 var done bool 13110 done, err = future.DoneWithContext(context.Background(), client) 13111 if err != nil { 13112 err = autorest.NewErrorWithError(err, "network.SecurityGroupsUpdateTagsFuture", "Result", future.Response(), "Polling failure") 13113 return 13114 } 13115 if !done { 13116 err = azure.NewAsyncOpIncompleteError("network.SecurityGroupsUpdateTagsFuture") 13117 return 13118 } 13119 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 13120 if sg.Response.Response, err = future.GetResult(sender); err == nil && sg.Response.Response.StatusCode != http.StatusNoContent { 13121 sg, err = client.UpdateTagsResponder(sg.Response.Response) 13122 if err != nil { 13123 err = autorest.NewErrorWithError(err, "network.SecurityGroupsUpdateTagsFuture", "Result", sg.Response.Response, "Failure responding to request") 13124 } 13125 } 13126 return 13127} 13128 13129// SecurityGroupViewParameters parameters that define the VM to check security groups for. 13130type SecurityGroupViewParameters struct { 13131 // TargetResourceID - ID of the target VM. 13132 TargetResourceID *string `json:"targetResourceId,omitempty"` 13133} 13134 13135// SecurityGroupViewResult the information about security rules applied to the specified VM. 13136type SecurityGroupViewResult struct { 13137 autorest.Response `json:"-"` 13138 // NetworkInterfaces - List of network interfaces on the specified VM. 13139 NetworkInterfaces *[]SecurityGroupNetworkInterface `json:"networkInterfaces,omitempty"` 13140} 13141 13142// SecurityRule network security rule. 13143type SecurityRule struct { 13144 autorest.Response `json:"-"` 13145 // SecurityRulePropertiesFormat - Properties of the security rule 13146 *SecurityRulePropertiesFormat `json:"properties,omitempty"` 13147 // Name - The name of the resource that is unique within a resource group. This name can be used to access the resource. 13148 Name *string `json:"name,omitempty"` 13149 // Etag - A unique read-only string that changes whenever the resource is updated. 13150 Etag *string `json:"etag,omitempty"` 13151 // ID - Resource ID. 13152 ID *string `json:"id,omitempty"` 13153} 13154 13155// MarshalJSON is the custom marshaler for SecurityRule. 13156func (sr SecurityRule) MarshalJSON() ([]byte, error) { 13157 objectMap := make(map[string]interface{}) 13158 if sr.SecurityRulePropertiesFormat != nil { 13159 objectMap["properties"] = sr.SecurityRulePropertiesFormat 13160 } 13161 if sr.Name != nil { 13162 objectMap["name"] = sr.Name 13163 } 13164 if sr.Etag != nil { 13165 objectMap["etag"] = sr.Etag 13166 } 13167 if sr.ID != nil { 13168 objectMap["id"] = sr.ID 13169 } 13170 return json.Marshal(objectMap) 13171} 13172 13173// UnmarshalJSON is the custom unmarshaler for SecurityRule struct. 13174func (sr *SecurityRule) UnmarshalJSON(body []byte) error { 13175 var m map[string]*json.RawMessage 13176 err := json.Unmarshal(body, &m) 13177 if err != nil { 13178 return err 13179 } 13180 for k, v := range m { 13181 switch k { 13182 case "properties": 13183 if v != nil { 13184 var securityRulePropertiesFormat SecurityRulePropertiesFormat 13185 err = json.Unmarshal(*v, &securityRulePropertiesFormat) 13186 if err != nil { 13187 return err 13188 } 13189 sr.SecurityRulePropertiesFormat = &securityRulePropertiesFormat 13190 } 13191 case "name": 13192 if v != nil { 13193 var name string 13194 err = json.Unmarshal(*v, &name) 13195 if err != nil { 13196 return err 13197 } 13198 sr.Name = &name 13199 } 13200 case "etag": 13201 if v != nil { 13202 var etag string 13203 err = json.Unmarshal(*v, &etag) 13204 if err != nil { 13205 return err 13206 } 13207 sr.Etag = &etag 13208 } 13209 case "id": 13210 if v != nil { 13211 var ID string 13212 err = json.Unmarshal(*v, &ID) 13213 if err != nil { 13214 return err 13215 } 13216 sr.ID = &ID 13217 } 13218 } 13219 } 13220 13221 return nil 13222} 13223 13224// SecurityRuleAssociations all security rules associated with the network interface. 13225type SecurityRuleAssociations struct { 13226 NetworkInterfaceAssociation *InterfaceAssociation `json:"networkInterfaceAssociation,omitempty"` 13227 SubnetAssociation *SubnetAssociation `json:"subnetAssociation,omitempty"` 13228 // DefaultSecurityRules - Collection of default security rules of the network security group. 13229 DefaultSecurityRules *[]SecurityRule `json:"defaultSecurityRules,omitempty"` 13230 // EffectiveSecurityRules - Collection of effective security rules. 13231 EffectiveSecurityRules *[]EffectiveNetworkSecurityRule `json:"effectiveSecurityRules,omitempty"` 13232} 13233 13234// SecurityRuleListResult response for ListSecurityRule API service call. Retrieves all security rules that 13235// belongs to a network security group. 13236type SecurityRuleListResult struct { 13237 autorest.Response `json:"-"` 13238 // Value - The security rules in a network security group. 13239 Value *[]SecurityRule `json:"value,omitempty"` 13240 // NextLink - The URL to get the next set of results. 13241 NextLink *string `json:"nextLink,omitempty"` 13242} 13243 13244// SecurityRuleListResultIterator provides access to a complete listing of SecurityRule values. 13245type SecurityRuleListResultIterator struct { 13246 i int 13247 page SecurityRuleListResultPage 13248} 13249 13250// NextWithContext advances to the next value. If there was an error making 13251// the request the iterator does not advance and the error is returned. 13252func (iter *SecurityRuleListResultIterator) NextWithContext(ctx context.Context) (err error) { 13253 if tracing.IsEnabled() { 13254 ctx = tracing.StartSpan(ctx, fqdn+"/SecurityRuleListResultIterator.NextWithContext") 13255 defer func() { 13256 sc := -1 13257 if iter.Response().Response.Response != nil { 13258 sc = iter.Response().Response.Response.StatusCode 13259 } 13260 tracing.EndSpan(ctx, sc, err) 13261 }() 13262 } 13263 iter.i++ 13264 if iter.i < len(iter.page.Values()) { 13265 return nil 13266 } 13267 err = iter.page.NextWithContext(ctx) 13268 if err != nil { 13269 iter.i-- 13270 return err 13271 } 13272 iter.i = 0 13273 return nil 13274} 13275 13276// Next advances to the next value. If there was an error making 13277// the request the iterator does not advance and the error is returned. 13278// Deprecated: Use NextWithContext() instead. 13279func (iter *SecurityRuleListResultIterator) Next() error { 13280 return iter.NextWithContext(context.Background()) 13281} 13282 13283// NotDone returns true if the enumeration should be started or is not yet complete. 13284func (iter SecurityRuleListResultIterator) NotDone() bool { 13285 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 13286} 13287 13288// Response returns the raw server response from the last page request. 13289func (iter SecurityRuleListResultIterator) Response() SecurityRuleListResult { 13290 return iter.page.Response() 13291} 13292 13293// Value returns the current value or a zero-initialized value if the 13294// iterator has advanced beyond the end of the collection. 13295func (iter SecurityRuleListResultIterator) Value() SecurityRule { 13296 if !iter.page.NotDone() { 13297 return SecurityRule{} 13298 } 13299 return iter.page.Values()[iter.i] 13300} 13301 13302// Creates a new instance of the SecurityRuleListResultIterator type. 13303func NewSecurityRuleListResultIterator(page SecurityRuleListResultPage) SecurityRuleListResultIterator { 13304 return SecurityRuleListResultIterator{page: page} 13305} 13306 13307// IsEmpty returns true if the ListResult contains no values. 13308func (srlr SecurityRuleListResult) IsEmpty() bool { 13309 return srlr.Value == nil || len(*srlr.Value) == 0 13310} 13311 13312// securityRuleListResultPreparer prepares a request to retrieve the next set of results. 13313// It returns nil if no more results exist. 13314func (srlr SecurityRuleListResult) securityRuleListResultPreparer(ctx context.Context) (*http.Request, error) { 13315 if srlr.NextLink == nil || len(to.String(srlr.NextLink)) < 1 { 13316 return nil, nil 13317 } 13318 return autorest.Prepare((&http.Request{}).WithContext(ctx), 13319 autorest.AsJSON(), 13320 autorest.AsGet(), 13321 autorest.WithBaseURL(to.String(srlr.NextLink))) 13322} 13323 13324// SecurityRuleListResultPage contains a page of SecurityRule values. 13325type SecurityRuleListResultPage struct { 13326 fn func(context.Context, SecurityRuleListResult) (SecurityRuleListResult, error) 13327 srlr SecurityRuleListResult 13328} 13329 13330// NextWithContext advances to the next page of values. If there was an error making 13331// the request the page does not advance and the error is returned. 13332func (page *SecurityRuleListResultPage) NextWithContext(ctx context.Context) (err error) { 13333 if tracing.IsEnabled() { 13334 ctx = tracing.StartSpan(ctx, fqdn+"/SecurityRuleListResultPage.NextWithContext") 13335 defer func() { 13336 sc := -1 13337 if page.Response().Response.Response != nil { 13338 sc = page.Response().Response.Response.StatusCode 13339 } 13340 tracing.EndSpan(ctx, sc, err) 13341 }() 13342 } 13343 next, err := page.fn(ctx, page.srlr) 13344 if err != nil { 13345 return err 13346 } 13347 page.srlr = next 13348 return nil 13349} 13350 13351// Next advances to the next page of values. If there was an error making 13352// the request the page does not advance and the error is returned. 13353// Deprecated: Use NextWithContext() instead. 13354func (page *SecurityRuleListResultPage) Next() error { 13355 return page.NextWithContext(context.Background()) 13356} 13357 13358// NotDone returns true if the page enumeration should be started or is not yet complete. 13359func (page SecurityRuleListResultPage) NotDone() bool { 13360 return !page.srlr.IsEmpty() 13361} 13362 13363// Response returns the raw server response from the last page request. 13364func (page SecurityRuleListResultPage) Response() SecurityRuleListResult { 13365 return page.srlr 13366} 13367 13368// Values returns the slice of values for the current page or nil if there are no values. 13369func (page SecurityRuleListResultPage) Values() []SecurityRule { 13370 if page.srlr.IsEmpty() { 13371 return nil 13372 } 13373 return *page.srlr.Value 13374} 13375 13376// Creates a new instance of the SecurityRuleListResultPage type. 13377func NewSecurityRuleListResultPage(getNextPage func(context.Context, SecurityRuleListResult) (SecurityRuleListResult, error)) SecurityRuleListResultPage { 13378 return SecurityRuleListResultPage{fn: getNextPage} 13379} 13380 13381// SecurityRulePropertiesFormat security rule resource. 13382type SecurityRulePropertiesFormat struct { 13383 // Description - A description for this rule. Restricted to 140 chars. 13384 Description *string `json:"description,omitempty"` 13385 // Protocol - Network protocol this rule applies to. Possible values are 'Tcp', 'Udp', and '*'. Possible values include: 'SecurityRuleProtocolTCP', 'SecurityRuleProtocolUDP', 'SecurityRuleProtocolAsterisk' 13386 Protocol SecurityRuleProtocol `json:"protocol,omitempty"` 13387 // SourcePortRange - The source port or range. Integer or range between 0 and 65535. Asterisk '*' can also be used to match all ports. 13388 SourcePortRange *string `json:"sourcePortRange,omitempty"` 13389 // DestinationPortRange - The destination port or range. Integer or range between 0 and 65535. Asterisk '*' can also be used to match all ports. 13390 DestinationPortRange *string `json:"destinationPortRange,omitempty"` 13391 // SourceAddressPrefix - The 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. 13392 SourceAddressPrefix *string `json:"sourceAddressPrefix,omitempty"` 13393 // SourceAddressPrefixes - The CIDR or source IP ranges. 13394 SourceAddressPrefixes *[]string `json:"sourceAddressPrefixes,omitempty"` 13395 // SourceApplicationSecurityGroups - The application security group specified as source. 13396 SourceApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"sourceApplicationSecurityGroups,omitempty"` 13397 // DestinationAddressPrefix - The destination address prefix. CIDR or destination IP range. Asterisk '*' can also be used to match all source IPs. Default tags such as 'VirtualNetwork', 'AzureLoadBalancer' and 'Internet' can also be used. 13398 DestinationAddressPrefix *string `json:"destinationAddressPrefix,omitempty"` 13399 // DestinationAddressPrefixes - The destination address prefixes. CIDR or destination IP ranges. 13400 DestinationAddressPrefixes *[]string `json:"destinationAddressPrefixes,omitempty"` 13401 // DestinationApplicationSecurityGroups - The application security group specified as destination. 13402 DestinationApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"destinationApplicationSecurityGroups,omitempty"` 13403 // SourcePortRanges - The source port ranges. 13404 SourcePortRanges *[]string `json:"sourcePortRanges,omitempty"` 13405 // DestinationPortRanges - The destination port ranges. 13406 DestinationPortRanges *[]string `json:"destinationPortRanges,omitempty"` 13407 // Access - The network traffic is allowed or denied. Possible values are: 'Allow' and 'Deny'. Possible values include: 'SecurityRuleAccessAllow', 'SecurityRuleAccessDeny' 13408 Access SecurityRuleAccess `json:"access,omitempty"` 13409 // Priority - 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. 13410 Priority *int32 `json:"priority,omitempty"` 13411 // Direction - The direction of the rule. The direction specifies if rule will be evaluated on incoming or outgoing traffic. Possible values are: 'Inbound' and 'Outbound'. Possible values include: 'SecurityRuleDirectionInbound', 'SecurityRuleDirectionOutbound' 13412 Direction SecurityRuleDirection `json:"direction,omitempty"` 13413 // ProvisioningState - The provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. 13414 ProvisioningState *string `json:"provisioningState,omitempty"` 13415} 13416 13417// SecurityRulesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a 13418// long-running operation. 13419type SecurityRulesCreateOrUpdateFuture struct { 13420 azure.Future 13421} 13422 13423// Result returns the result of the asynchronous operation. 13424// If the operation has not completed it will return an error. 13425func (future *SecurityRulesCreateOrUpdateFuture) Result(client SecurityRulesClient) (sr SecurityRule, err error) { 13426 var done bool 13427 done, err = future.DoneWithContext(context.Background(), client) 13428 if err != nil { 13429 err = autorest.NewErrorWithError(err, "network.SecurityRulesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") 13430 return 13431 } 13432 if !done { 13433 err = azure.NewAsyncOpIncompleteError("network.SecurityRulesCreateOrUpdateFuture") 13434 return 13435 } 13436 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 13437 if sr.Response.Response, err = future.GetResult(sender); err == nil && sr.Response.Response.StatusCode != http.StatusNoContent { 13438 sr, err = client.CreateOrUpdateResponder(sr.Response.Response) 13439 if err != nil { 13440 err = autorest.NewErrorWithError(err, "network.SecurityRulesCreateOrUpdateFuture", "Result", sr.Response.Response, "Failure responding to request") 13441 } 13442 } 13443 return 13444} 13445 13446// SecurityRulesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running 13447// operation. 13448type SecurityRulesDeleteFuture struct { 13449 azure.Future 13450} 13451 13452// Result returns the result of the asynchronous operation. 13453// If the operation has not completed it will return an error. 13454func (future *SecurityRulesDeleteFuture) Result(client SecurityRulesClient) (ar autorest.Response, err error) { 13455 var done bool 13456 done, err = future.DoneWithContext(context.Background(), client) 13457 if err != nil { 13458 err = autorest.NewErrorWithError(err, "network.SecurityRulesDeleteFuture", "Result", future.Response(), "Polling failure") 13459 return 13460 } 13461 if !done { 13462 err = azure.NewAsyncOpIncompleteError("network.SecurityRulesDeleteFuture") 13463 return 13464 } 13465 ar.Response = future.Response() 13466 return 13467} 13468 13469// ServiceEndpointPropertiesFormat the service endpoint properties. 13470type ServiceEndpointPropertiesFormat struct { 13471 // Service - The type of the endpoint service. 13472 Service *string `json:"service,omitempty"` 13473 // Locations - A list of locations. 13474 Locations *[]string `json:"locations,omitempty"` 13475 // ProvisioningState - The provisioning state of the resource. 13476 ProvisioningState *string `json:"provisioningState,omitempty"` 13477} 13478 13479// String ... 13480type String struct { 13481 autorest.Response `json:"-"` 13482 Value *string `json:"value,omitempty"` 13483} 13484 13485// Subnet subnet in a virtual network resource. 13486type Subnet struct { 13487 autorest.Response `json:"-"` 13488 // SubnetPropertiesFormat - Properties of the subnet. 13489 *SubnetPropertiesFormat `json:"properties,omitempty"` 13490 // Name - The name of the resource that is unique within a resource group. This name can be used to access the resource. 13491 Name *string `json:"name,omitempty"` 13492 // Etag - A unique read-only string that changes whenever the resource is updated. 13493 Etag *string `json:"etag,omitempty"` 13494 // ID - Resource ID. 13495 ID *string `json:"id,omitempty"` 13496} 13497 13498// MarshalJSON is the custom marshaler for Subnet. 13499func (s Subnet) MarshalJSON() ([]byte, error) { 13500 objectMap := make(map[string]interface{}) 13501 if s.SubnetPropertiesFormat != nil { 13502 objectMap["properties"] = s.SubnetPropertiesFormat 13503 } 13504 if s.Name != nil { 13505 objectMap["name"] = s.Name 13506 } 13507 if s.Etag != nil { 13508 objectMap["etag"] = s.Etag 13509 } 13510 if s.ID != nil { 13511 objectMap["id"] = s.ID 13512 } 13513 return json.Marshal(objectMap) 13514} 13515 13516// UnmarshalJSON is the custom unmarshaler for Subnet struct. 13517func (s *Subnet) UnmarshalJSON(body []byte) error { 13518 var m map[string]*json.RawMessage 13519 err := json.Unmarshal(body, &m) 13520 if err != nil { 13521 return err 13522 } 13523 for k, v := range m { 13524 switch k { 13525 case "properties": 13526 if v != nil { 13527 var subnetPropertiesFormat SubnetPropertiesFormat 13528 err = json.Unmarshal(*v, &subnetPropertiesFormat) 13529 if err != nil { 13530 return err 13531 } 13532 s.SubnetPropertiesFormat = &subnetPropertiesFormat 13533 } 13534 case "name": 13535 if v != nil { 13536 var name string 13537 err = json.Unmarshal(*v, &name) 13538 if err != nil { 13539 return err 13540 } 13541 s.Name = &name 13542 } 13543 case "etag": 13544 if v != nil { 13545 var etag string 13546 err = json.Unmarshal(*v, &etag) 13547 if err != nil { 13548 return err 13549 } 13550 s.Etag = &etag 13551 } 13552 case "id": 13553 if v != nil { 13554 var ID string 13555 err = json.Unmarshal(*v, &ID) 13556 if err != nil { 13557 return err 13558 } 13559 s.ID = &ID 13560 } 13561 } 13562 } 13563 13564 return nil 13565} 13566 13567// SubnetAssociation network interface and its custom security rules. 13568type SubnetAssociation struct { 13569 // ID - READ-ONLY; Subnet ID. 13570 ID *string `json:"id,omitempty"` 13571 // SecurityRules - Collection of custom security rules. 13572 SecurityRules *[]SecurityRule `json:"securityRules,omitempty"` 13573} 13574 13575// SubnetListResult response for ListSubnets API service callRetrieves all subnet that belongs to a virtual 13576// network 13577type SubnetListResult struct { 13578 autorest.Response `json:"-"` 13579 // Value - The subnets in a virtual network. 13580 Value *[]Subnet `json:"value,omitempty"` 13581 // NextLink - The URL to get the next set of results. 13582 NextLink *string `json:"nextLink,omitempty"` 13583} 13584 13585// SubnetListResultIterator provides access to a complete listing of Subnet values. 13586type SubnetListResultIterator struct { 13587 i int 13588 page SubnetListResultPage 13589} 13590 13591// NextWithContext advances to the next value. If there was an error making 13592// the request the iterator does not advance and the error is returned. 13593func (iter *SubnetListResultIterator) NextWithContext(ctx context.Context) (err error) { 13594 if tracing.IsEnabled() { 13595 ctx = tracing.StartSpan(ctx, fqdn+"/SubnetListResultIterator.NextWithContext") 13596 defer func() { 13597 sc := -1 13598 if iter.Response().Response.Response != nil { 13599 sc = iter.Response().Response.Response.StatusCode 13600 } 13601 tracing.EndSpan(ctx, sc, err) 13602 }() 13603 } 13604 iter.i++ 13605 if iter.i < len(iter.page.Values()) { 13606 return nil 13607 } 13608 err = iter.page.NextWithContext(ctx) 13609 if err != nil { 13610 iter.i-- 13611 return err 13612 } 13613 iter.i = 0 13614 return nil 13615} 13616 13617// Next advances to the next value. If there was an error making 13618// the request the iterator does not advance and the error is returned. 13619// Deprecated: Use NextWithContext() instead. 13620func (iter *SubnetListResultIterator) Next() error { 13621 return iter.NextWithContext(context.Background()) 13622} 13623 13624// NotDone returns true if the enumeration should be started or is not yet complete. 13625func (iter SubnetListResultIterator) NotDone() bool { 13626 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 13627} 13628 13629// Response returns the raw server response from the last page request. 13630func (iter SubnetListResultIterator) Response() SubnetListResult { 13631 return iter.page.Response() 13632} 13633 13634// Value returns the current value or a zero-initialized value if the 13635// iterator has advanced beyond the end of the collection. 13636func (iter SubnetListResultIterator) Value() Subnet { 13637 if !iter.page.NotDone() { 13638 return Subnet{} 13639 } 13640 return iter.page.Values()[iter.i] 13641} 13642 13643// Creates a new instance of the SubnetListResultIterator type. 13644func NewSubnetListResultIterator(page SubnetListResultPage) SubnetListResultIterator { 13645 return SubnetListResultIterator{page: page} 13646} 13647 13648// IsEmpty returns true if the ListResult contains no values. 13649func (slr SubnetListResult) IsEmpty() bool { 13650 return slr.Value == nil || len(*slr.Value) == 0 13651} 13652 13653// subnetListResultPreparer prepares a request to retrieve the next set of results. 13654// It returns nil if no more results exist. 13655func (slr SubnetListResult) subnetListResultPreparer(ctx context.Context) (*http.Request, error) { 13656 if slr.NextLink == nil || len(to.String(slr.NextLink)) < 1 { 13657 return nil, nil 13658 } 13659 return autorest.Prepare((&http.Request{}).WithContext(ctx), 13660 autorest.AsJSON(), 13661 autorest.AsGet(), 13662 autorest.WithBaseURL(to.String(slr.NextLink))) 13663} 13664 13665// SubnetListResultPage contains a page of Subnet values. 13666type SubnetListResultPage struct { 13667 fn func(context.Context, SubnetListResult) (SubnetListResult, error) 13668 slr SubnetListResult 13669} 13670 13671// NextWithContext advances to the next page of values. If there was an error making 13672// the request the page does not advance and the error is returned. 13673func (page *SubnetListResultPage) NextWithContext(ctx context.Context) (err error) { 13674 if tracing.IsEnabled() { 13675 ctx = tracing.StartSpan(ctx, fqdn+"/SubnetListResultPage.NextWithContext") 13676 defer func() { 13677 sc := -1 13678 if page.Response().Response.Response != nil { 13679 sc = page.Response().Response.Response.StatusCode 13680 } 13681 tracing.EndSpan(ctx, sc, err) 13682 }() 13683 } 13684 next, err := page.fn(ctx, page.slr) 13685 if err != nil { 13686 return err 13687 } 13688 page.slr = next 13689 return nil 13690} 13691 13692// Next advances to the next page of values. If there was an error making 13693// the request the page does not advance and the error is returned. 13694// Deprecated: Use NextWithContext() instead. 13695func (page *SubnetListResultPage) Next() error { 13696 return page.NextWithContext(context.Background()) 13697} 13698 13699// NotDone returns true if the page enumeration should be started or is not yet complete. 13700func (page SubnetListResultPage) NotDone() bool { 13701 return !page.slr.IsEmpty() 13702} 13703 13704// Response returns the raw server response from the last page request. 13705func (page SubnetListResultPage) Response() SubnetListResult { 13706 return page.slr 13707} 13708 13709// Values returns the slice of values for the current page or nil if there are no values. 13710func (page SubnetListResultPage) Values() []Subnet { 13711 if page.slr.IsEmpty() { 13712 return nil 13713 } 13714 return *page.slr.Value 13715} 13716 13717// Creates a new instance of the SubnetListResultPage type. 13718func NewSubnetListResultPage(getNextPage func(context.Context, SubnetListResult) (SubnetListResult, error)) SubnetListResultPage { 13719 return SubnetListResultPage{fn: getNextPage} 13720} 13721 13722// SubnetPropertiesFormat properties of the subnet. 13723type SubnetPropertiesFormat struct { 13724 // AddressPrefix - The address prefix for the subnet. 13725 AddressPrefix *string `json:"addressPrefix,omitempty"` 13726 // NetworkSecurityGroup - The reference of the NetworkSecurityGroup resource. 13727 NetworkSecurityGroup *SecurityGroup `json:"networkSecurityGroup,omitempty"` 13728 // RouteTable - The reference of the RouteTable resource. 13729 RouteTable *RouteTable `json:"routeTable,omitempty"` 13730 // ServiceEndpoints - An array of service endpoints. 13731 ServiceEndpoints *[]ServiceEndpointPropertiesFormat `json:"serviceEndpoints,omitempty"` 13732 // IPConfigurations - READ-ONLY; Gets an array of references to the network interface IP configurations using subnet. 13733 IPConfigurations *[]IPConfiguration `json:"ipConfigurations,omitempty"` 13734 // ResourceNavigationLinks - Gets an array of references to the external resources using subnet. 13735 ResourceNavigationLinks *[]ResourceNavigationLink `json:"resourceNavigationLinks,omitempty"` 13736 // ProvisioningState - The provisioning state of the resource. 13737 ProvisioningState *string `json:"provisioningState,omitempty"` 13738} 13739 13740// SubnetsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running 13741// operation. 13742type SubnetsCreateOrUpdateFuture struct { 13743 azure.Future 13744} 13745 13746// Result returns the result of the asynchronous operation. 13747// If the operation has not completed it will return an error. 13748func (future *SubnetsCreateOrUpdateFuture) Result(client SubnetsClient) (s Subnet, err error) { 13749 var done bool 13750 done, err = future.DoneWithContext(context.Background(), client) 13751 if err != nil { 13752 err = autorest.NewErrorWithError(err, "network.SubnetsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") 13753 return 13754 } 13755 if !done { 13756 err = azure.NewAsyncOpIncompleteError("network.SubnetsCreateOrUpdateFuture") 13757 return 13758 } 13759 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 13760 if s.Response.Response, err = future.GetResult(sender); err == nil && s.Response.Response.StatusCode != http.StatusNoContent { 13761 s, err = client.CreateOrUpdateResponder(s.Response.Response) 13762 if err != nil { 13763 err = autorest.NewErrorWithError(err, "network.SubnetsCreateOrUpdateFuture", "Result", s.Response.Response, "Failure responding to request") 13764 } 13765 } 13766 return 13767} 13768 13769// SubnetsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running 13770// operation. 13771type SubnetsDeleteFuture struct { 13772 azure.Future 13773} 13774 13775// Result returns the result of the asynchronous operation. 13776// If the operation has not completed it will return an error. 13777func (future *SubnetsDeleteFuture) Result(client SubnetsClient) (ar autorest.Response, err error) { 13778 var done bool 13779 done, err = future.DoneWithContext(context.Background(), client) 13780 if err != nil { 13781 err = autorest.NewErrorWithError(err, "network.SubnetsDeleteFuture", "Result", future.Response(), "Polling failure") 13782 return 13783 } 13784 if !done { 13785 err = azure.NewAsyncOpIncompleteError("network.SubnetsDeleteFuture") 13786 return 13787 } 13788 ar.Response = future.Response() 13789 return 13790} 13791 13792// SubResource reference to another subresource. 13793type SubResource struct { 13794 // ID - Resource ID. 13795 ID *string `json:"id,omitempty"` 13796} 13797 13798// TagsObject tags object for patch operations. 13799type TagsObject struct { 13800 // Tags - Resource tags. 13801 Tags map[string]*string `json:"tags"` 13802} 13803 13804// MarshalJSON is the custom marshaler for TagsObject. 13805func (toVar TagsObject) MarshalJSON() ([]byte, error) { 13806 objectMap := make(map[string]interface{}) 13807 if toVar.Tags != nil { 13808 objectMap["tags"] = toVar.Tags 13809 } 13810 return json.Marshal(objectMap) 13811} 13812 13813// Topology topology of the specified resource group. 13814type Topology struct { 13815 autorest.Response `json:"-"` 13816 // ID - READ-ONLY; GUID representing the operation id. 13817 ID *string `json:"id,omitempty"` 13818 // CreatedDateTime - READ-ONLY; The datetime when the topology was initially created for the resource group. 13819 CreatedDateTime *date.Time `json:"createdDateTime,omitempty"` 13820 // LastModified - READ-ONLY; The datetime when the topology was last modified. 13821 LastModified *date.Time `json:"lastModified,omitempty"` 13822 Resources *[]TopologyResource `json:"resources,omitempty"` 13823} 13824 13825// TopologyAssociation resources that have an association with the parent resource. 13826type TopologyAssociation struct { 13827 // Name - The name of the resource that is associated with the parent resource. 13828 Name *string `json:"name,omitempty"` 13829 // ResourceID - The ID of the resource that is associated with the parent resource. 13830 ResourceID *string `json:"resourceId,omitempty"` 13831 // AssociationType - The association type of the child resource to the parent resource. Possible values include: 'Associated', 'Contains' 13832 AssociationType AssociationType `json:"associationType,omitempty"` 13833} 13834 13835// TopologyParameters parameters that define the representation of topology. 13836type TopologyParameters struct { 13837 // TargetResourceGroupName - The name of the target resource group to perform topology on. 13838 TargetResourceGroupName *string `json:"targetResourceGroupName,omitempty"` 13839 // TargetVirtualNetwork - The reference of the Virtual Network resource. 13840 TargetVirtualNetwork *SubResource `json:"targetVirtualNetwork,omitempty"` 13841 // TargetSubnet - The reference of the Subnet resource. 13842 TargetSubnet *SubResource `json:"targetSubnet,omitempty"` 13843} 13844 13845// TopologyResource the network resource topology information for the given resource group. 13846type TopologyResource struct { 13847 // Name - Name of the resource. 13848 Name *string `json:"name,omitempty"` 13849 // ID - ID of the resource. 13850 ID *string `json:"id,omitempty"` 13851 // Location - Resource location. 13852 Location *string `json:"location,omitempty"` 13853 // Associations - Holds the associations the resource has with other resources in the resource group. 13854 Associations *[]TopologyAssociation `json:"associations,omitempty"` 13855} 13856 13857// TroubleshootingDetails information gained from troubleshooting of specified resource. 13858type TroubleshootingDetails struct { 13859 // ID - The id of the get troubleshoot operation. 13860 ID *string `json:"id,omitempty"` 13861 // ReasonType - Reason type of failure. 13862 ReasonType *string `json:"reasonType,omitempty"` 13863 // Summary - A summary of troubleshooting. 13864 Summary *string `json:"summary,omitempty"` 13865 // Detail - Details on troubleshooting results. 13866 Detail *string `json:"detail,omitempty"` 13867 // RecommendedActions - List of recommended actions. 13868 RecommendedActions *[]TroubleshootingRecommendedActions `json:"recommendedActions,omitempty"` 13869} 13870 13871// TroubleshootingParameters parameters that define the resource to troubleshoot. 13872type TroubleshootingParameters struct { 13873 // TargetResourceID - The target resource to troubleshoot. 13874 TargetResourceID *string `json:"targetResourceId,omitempty"` 13875 *TroubleshootingProperties `json:"properties,omitempty"` 13876} 13877 13878// MarshalJSON is the custom marshaler for TroubleshootingParameters. 13879func (tp TroubleshootingParameters) MarshalJSON() ([]byte, error) { 13880 objectMap := make(map[string]interface{}) 13881 if tp.TargetResourceID != nil { 13882 objectMap["targetResourceId"] = tp.TargetResourceID 13883 } 13884 if tp.TroubleshootingProperties != nil { 13885 objectMap["properties"] = tp.TroubleshootingProperties 13886 } 13887 return json.Marshal(objectMap) 13888} 13889 13890// UnmarshalJSON is the custom unmarshaler for TroubleshootingParameters struct. 13891func (tp *TroubleshootingParameters) UnmarshalJSON(body []byte) error { 13892 var m map[string]*json.RawMessage 13893 err := json.Unmarshal(body, &m) 13894 if err != nil { 13895 return err 13896 } 13897 for k, v := range m { 13898 switch k { 13899 case "targetResourceId": 13900 if v != nil { 13901 var targetResourceID string 13902 err = json.Unmarshal(*v, &targetResourceID) 13903 if err != nil { 13904 return err 13905 } 13906 tp.TargetResourceID = &targetResourceID 13907 } 13908 case "properties": 13909 if v != nil { 13910 var troubleshootingProperties TroubleshootingProperties 13911 err = json.Unmarshal(*v, &troubleshootingProperties) 13912 if err != nil { 13913 return err 13914 } 13915 tp.TroubleshootingProperties = &troubleshootingProperties 13916 } 13917 } 13918 } 13919 13920 return nil 13921} 13922 13923// TroubleshootingProperties storage location provided for troubleshoot. 13924type TroubleshootingProperties struct { 13925 // StorageID - The ID for the storage account to save the troubleshoot result. 13926 StorageID *string `json:"storageId,omitempty"` 13927 // StoragePath - The path to the blob to save the troubleshoot result in. 13928 StoragePath *string `json:"storagePath,omitempty"` 13929} 13930 13931// TroubleshootingRecommendedActions recommended actions based on discovered issues. 13932type TroubleshootingRecommendedActions struct { 13933 // ActionID - ID of the recommended action. 13934 ActionID *string `json:"actionId,omitempty"` 13935 // ActionText - Description of recommended actions. 13936 ActionText *string `json:"actionText,omitempty"` 13937 // ActionURI - The uri linking to a documentation for the recommended troubleshooting actions. 13938 ActionURI *string `json:"actionUri,omitempty"` 13939 // ActionURIText - The information from the URI for the recommended troubleshooting actions. 13940 ActionURIText *string `json:"actionUriText,omitempty"` 13941} 13942 13943// TroubleshootingResult troubleshooting information gained from specified resource. 13944type TroubleshootingResult struct { 13945 autorest.Response `json:"-"` 13946 // StartTime - The start time of the troubleshooting. 13947 StartTime *date.Time `json:"startTime,omitempty"` 13948 // EndTime - The end time of the troubleshooting. 13949 EndTime *date.Time `json:"endTime,omitempty"` 13950 // Code - The result code of the troubleshooting. 13951 Code *string `json:"code,omitempty"` 13952 // Results - Information from troubleshooting. 13953 Results *[]TroubleshootingDetails `json:"results,omitempty"` 13954} 13955 13956// TunnelConnectionHealth virtualNetworkGatewayConnection properties 13957type TunnelConnectionHealth struct { 13958 // Tunnel - READ-ONLY; Tunnel name. 13959 Tunnel *string `json:"tunnel,omitempty"` 13960 // ConnectionStatus - READ-ONLY; Virtual network Gateway connection status. Possible values include: 'VirtualNetworkGatewayConnectionStatusUnknown', 'VirtualNetworkGatewayConnectionStatusConnecting', 'VirtualNetworkGatewayConnectionStatusConnected', 'VirtualNetworkGatewayConnectionStatusNotConnected' 13961 ConnectionStatus VirtualNetworkGatewayConnectionStatus `json:"connectionStatus,omitempty"` 13962 // IngressBytesTransferred - READ-ONLY; The Ingress Bytes Transferred in this connection 13963 IngressBytesTransferred *int64 `json:"ingressBytesTransferred,omitempty"` 13964 // EgressBytesTransferred - READ-ONLY; The Egress Bytes Transferred in this connection 13965 EgressBytesTransferred *int64 `json:"egressBytesTransferred,omitempty"` 13966 // LastConnectionEstablishedUtcTime - READ-ONLY; The time at which connection was established in Utc format. 13967 LastConnectionEstablishedUtcTime *string `json:"lastConnectionEstablishedUtcTime,omitempty"` 13968} 13969 13970// Usage describes network resource usage. 13971type Usage struct { 13972 // ID - READ-ONLY; Resource identifier. 13973 ID *string `json:"id,omitempty"` 13974 // Unit - An enum describing the unit of measurement. 13975 Unit *string `json:"unit,omitempty"` 13976 // CurrentValue - The current value of the usage. 13977 CurrentValue *int64 `json:"currentValue,omitempty"` 13978 // Limit - The limit of usage. 13979 Limit *int64 `json:"limit,omitempty"` 13980 // Name - The name of the type of usage. 13981 Name *UsageName `json:"name,omitempty"` 13982} 13983 13984// UsageName the usage names. 13985type UsageName struct { 13986 // Value - A string describing the resource name. 13987 Value *string `json:"value,omitempty"` 13988 // LocalizedValue - A localized string describing the resource name. 13989 LocalizedValue *string `json:"localizedValue,omitempty"` 13990} 13991 13992// UsagesListResult the list usages operation response. 13993type UsagesListResult struct { 13994 autorest.Response `json:"-"` 13995 // Value - The list network resource usages. 13996 Value *[]Usage `json:"value,omitempty"` 13997 // NextLink - URL to get the next set of results. 13998 NextLink *string `json:"nextLink,omitempty"` 13999} 14000 14001// UsagesListResultIterator provides access to a complete listing of Usage values. 14002type UsagesListResultIterator struct { 14003 i int 14004 page UsagesListResultPage 14005} 14006 14007// NextWithContext advances to the next value. If there was an error making 14008// the request the iterator does not advance and the error is returned. 14009func (iter *UsagesListResultIterator) NextWithContext(ctx context.Context) (err error) { 14010 if tracing.IsEnabled() { 14011 ctx = tracing.StartSpan(ctx, fqdn+"/UsagesListResultIterator.NextWithContext") 14012 defer func() { 14013 sc := -1 14014 if iter.Response().Response.Response != nil { 14015 sc = iter.Response().Response.Response.StatusCode 14016 } 14017 tracing.EndSpan(ctx, sc, err) 14018 }() 14019 } 14020 iter.i++ 14021 if iter.i < len(iter.page.Values()) { 14022 return nil 14023 } 14024 err = iter.page.NextWithContext(ctx) 14025 if err != nil { 14026 iter.i-- 14027 return err 14028 } 14029 iter.i = 0 14030 return nil 14031} 14032 14033// Next advances to the next value. If there was an error making 14034// the request the iterator does not advance and the error is returned. 14035// Deprecated: Use NextWithContext() instead. 14036func (iter *UsagesListResultIterator) Next() error { 14037 return iter.NextWithContext(context.Background()) 14038} 14039 14040// NotDone returns true if the enumeration should be started or is not yet complete. 14041func (iter UsagesListResultIterator) NotDone() bool { 14042 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 14043} 14044 14045// Response returns the raw server response from the last page request. 14046func (iter UsagesListResultIterator) Response() UsagesListResult { 14047 return iter.page.Response() 14048} 14049 14050// Value returns the current value or a zero-initialized value if the 14051// iterator has advanced beyond the end of the collection. 14052func (iter UsagesListResultIterator) Value() Usage { 14053 if !iter.page.NotDone() { 14054 return Usage{} 14055 } 14056 return iter.page.Values()[iter.i] 14057} 14058 14059// Creates a new instance of the UsagesListResultIterator type. 14060func NewUsagesListResultIterator(page UsagesListResultPage) UsagesListResultIterator { 14061 return UsagesListResultIterator{page: page} 14062} 14063 14064// IsEmpty returns true if the ListResult contains no values. 14065func (ulr UsagesListResult) IsEmpty() bool { 14066 return ulr.Value == nil || len(*ulr.Value) == 0 14067} 14068 14069// usagesListResultPreparer prepares a request to retrieve the next set of results. 14070// It returns nil if no more results exist. 14071func (ulr UsagesListResult) usagesListResultPreparer(ctx context.Context) (*http.Request, error) { 14072 if ulr.NextLink == nil || len(to.String(ulr.NextLink)) < 1 { 14073 return nil, nil 14074 } 14075 return autorest.Prepare((&http.Request{}).WithContext(ctx), 14076 autorest.AsJSON(), 14077 autorest.AsGet(), 14078 autorest.WithBaseURL(to.String(ulr.NextLink))) 14079} 14080 14081// UsagesListResultPage contains a page of Usage values. 14082type UsagesListResultPage struct { 14083 fn func(context.Context, UsagesListResult) (UsagesListResult, error) 14084 ulr UsagesListResult 14085} 14086 14087// NextWithContext advances to the next page of values. If there was an error making 14088// the request the page does not advance and the error is returned. 14089func (page *UsagesListResultPage) NextWithContext(ctx context.Context) (err error) { 14090 if tracing.IsEnabled() { 14091 ctx = tracing.StartSpan(ctx, fqdn+"/UsagesListResultPage.NextWithContext") 14092 defer func() { 14093 sc := -1 14094 if page.Response().Response.Response != nil { 14095 sc = page.Response().Response.Response.StatusCode 14096 } 14097 tracing.EndSpan(ctx, sc, err) 14098 }() 14099 } 14100 next, err := page.fn(ctx, page.ulr) 14101 if err != nil { 14102 return err 14103 } 14104 page.ulr = next 14105 return nil 14106} 14107 14108// Next advances to the next page of values. If there was an error making 14109// the request the page does not advance and the error is returned. 14110// Deprecated: Use NextWithContext() instead. 14111func (page *UsagesListResultPage) Next() error { 14112 return page.NextWithContext(context.Background()) 14113} 14114 14115// NotDone returns true if the page enumeration should be started or is not yet complete. 14116func (page UsagesListResultPage) NotDone() bool { 14117 return !page.ulr.IsEmpty() 14118} 14119 14120// Response returns the raw server response from the last page request. 14121func (page UsagesListResultPage) Response() UsagesListResult { 14122 return page.ulr 14123} 14124 14125// Values returns the slice of values for the current page or nil if there are no values. 14126func (page UsagesListResultPage) Values() []Usage { 14127 if page.ulr.IsEmpty() { 14128 return nil 14129 } 14130 return *page.ulr.Value 14131} 14132 14133// Creates a new instance of the UsagesListResultPage type. 14134func NewUsagesListResultPage(getNextPage func(context.Context, UsagesListResult) (UsagesListResult, error)) UsagesListResultPage { 14135 return UsagesListResultPage{fn: getNextPage} 14136} 14137 14138// VerificationIPFlowParameters parameters that define the IP flow to be verified. 14139type VerificationIPFlowParameters struct { 14140 // TargetResourceID - The ID of the target resource to perform next-hop on. 14141 TargetResourceID *string `json:"targetResourceId,omitempty"` 14142 // Direction - The direction of the packet represented as a 5-tuple. Possible values include: 'Inbound', 'Outbound' 14143 Direction Direction `json:"direction,omitempty"` 14144 // Protocol - Protocol to be verified on. Possible values include: 'ProtocolTCP', 'ProtocolUDP' 14145 Protocol Protocol `json:"protocol,omitempty"` 14146 // LocalPort - The local port. Acceptable values are a single integer in the range (0-65535). Support for * for the source port, which depends on the direction. 14147 LocalPort *string `json:"localPort,omitempty"` 14148 // RemotePort - The remote port. Acceptable values are a single integer in the range (0-65535). Support for * for the source port, which depends on the direction. 14149 RemotePort *string `json:"remotePort,omitempty"` 14150 // LocalIPAddress - The local IP address. Acceptable values are valid IPv4 addresses. 14151 LocalIPAddress *string `json:"localIPAddress,omitempty"` 14152 // RemoteIPAddress - The remote IP address. Acceptable values are valid IPv4 addresses. 14153 RemoteIPAddress *string `json:"remoteIPAddress,omitempty"` 14154 // TargetNicResourceID - The NIC ID. (If VM has multiple NICs and IP forwarding is enabled on any of them, then this parameter must be specified. Otherwise optional). 14155 TargetNicResourceID *string `json:"targetNicResourceId,omitempty"` 14156} 14157 14158// VerificationIPFlowResult results of IP flow verification on the target resource. 14159type VerificationIPFlowResult struct { 14160 autorest.Response `json:"-"` 14161 // Access - Indicates whether the traffic is allowed or denied. Possible values include: 'Allow', 'Deny' 14162 Access Access `json:"access,omitempty"` 14163 // RuleName - Name of the rule. If input is not matched against any security rule, it is not displayed. 14164 RuleName *string `json:"ruleName,omitempty"` 14165} 14166 14167// VirtualNetwork virtual Network resource. 14168type VirtualNetwork struct { 14169 autorest.Response `json:"-"` 14170 // VirtualNetworkPropertiesFormat - Properties of the virtual network. 14171 *VirtualNetworkPropertiesFormat `json:"properties,omitempty"` 14172 // Etag - Gets a unique read-only string that changes whenever the resource is updated. 14173 Etag *string `json:"etag,omitempty"` 14174 // ID - Resource ID. 14175 ID *string `json:"id,omitempty"` 14176 // Name - READ-ONLY; Resource name. 14177 Name *string `json:"name,omitempty"` 14178 // Type - READ-ONLY; Resource type. 14179 Type *string `json:"type,omitempty"` 14180 // Location - Resource location. 14181 Location *string `json:"location,omitempty"` 14182 // Tags - Resource tags. 14183 Tags map[string]*string `json:"tags"` 14184} 14185 14186// MarshalJSON is the custom marshaler for VirtualNetwork. 14187func (vn VirtualNetwork) MarshalJSON() ([]byte, error) { 14188 objectMap := make(map[string]interface{}) 14189 if vn.VirtualNetworkPropertiesFormat != nil { 14190 objectMap["properties"] = vn.VirtualNetworkPropertiesFormat 14191 } 14192 if vn.Etag != nil { 14193 objectMap["etag"] = vn.Etag 14194 } 14195 if vn.ID != nil { 14196 objectMap["id"] = vn.ID 14197 } 14198 if vn.Location != nil { 14199 objectMap["location"] = vn.Location 14200 } 14201 if vn.Tags != nil { 14202 objectMap["tags"] = vn.Tags 14203 } 14204 return json.Marshal(objectMap) 14205} 14206 14207// UnmarshalJSON is the custom unmarshaler for VirtualNetwork struct. 14208func (vn *VirtualNetwork) UnmarshalJSON(body []byte) error { 14209 var m map[string]*json.RawMessage 14210 err := json.Unmarshal(body, &m) 14211 if err != nil { 14212 return err 14213 } 14214 for k, v := range m { 14215 switch k { 14216 case "properties": 14217 if v != nil { 14218 var virtualNetworkPropertiesFormat VirtualNetworkPropertiesFormat 14219 err = json.Unmarshal(*v, &virtualNetworkPropertiesFormat) 14220 if err != nil { 14221 return err 14222 } 14223 vn.VirtualNetworkPropertiesFormat = &virtualNetworkPropertiesFormat 14224 } 14225 case "etag": 14226 if v != nil { 14227 var etag string 14228 err = json.Unmarshal(*v, &etag) 14229 if err != nil { 14230 return err 14231 } 14232 vn.Etag = &etag 14233 } 14234 case "id": 14235 if v != nil { 14236 var ID string 14237 err = json.Unmarshal(*v, &ID) 14238 if err != nil { 14239 return err 14240 } 14241 vn.ID = &ID 14242 } 14243 case "name": 14244 if v != nil { 14245 var name string 14246 err = json.Unmarshal(*v, &name) 14247 if err != nil { 14248 return err 14249 } 14250 vn.Name = &name 14251 } 14252 case "type": 14253 if v != nil { 14254 var typeVar string 14255 err = json.Unmarshal(*v, &typeVar) 14256 if err != nil { 14257 return err 14258 } 14259 vn.Type = &typeVar 14260 } 14261 case "location": 14262 if v != nil { 14263 var location string 14264 err = json.Unmarshal(*v, &location) 14265 if err != nil { 14266 return err 14267 } 14268 vn.Location = &location 14269 } 14270 case "tags": 14271 if v != nil { 14272 var tags map[string]*string 14273 err = json.Unmarshal(*v, &tags) 14274 if err != nil { 14275 return err 14276 } 14277 vn.Tags = tags 14278 } 14279 } 14280 } 14281 14282 return nil 14283} 14284 14285// VirtualNetworkConnectionGatewayReference a reference to VirtualNetworkGateway or LocalNetworkGateway 14286// resource. 14287type VirtualNetworkConnectionGatewayReference struct { 14288 // ID - The ID of VirtualNetworkGateway or LocalNetworkGateway resource. 14289 ID *string `json:"id,omitempty"` 14290} 14291 14292// VirtualNetworkGateway a common class for general resource information 14293type VirtualNetworkGateway struct { 14294 autorest.Response `json:"-"` 14295 // VirtualNetworkGatewayPropertiesFormat - Properties of the virtual network gateway. 14296 *VirtualNetworkGatewayPropertiesFormat `json:"properties,omitempty"` 14297 // Etag - Gets a unique read-only string that changes whenever the resource is updated. 14298 Etag *string `json:"etag,omitempty"` 14299 // ID - Resource ID. 14300 ID *string `json:"id,omitempty"` 14301 // Name - READ-ONLY; Resource name. 14302 Name *string `json:"name,omitempty"` 14303 // Type - READ-ONLY; Resource type. 14304 Type *string `json:"type,omitempty"` 14305 // Location - Resource location. 14306 Location *string `json:"location,omitempty"` 14307 // Tags - Resource tags. 14308 Tags map[string]*string `json:"tags"` 14309} 14310 14311// MarshalJSON is the custom marshaler for VirtualNetworkGateway. 14312func (vng VirtualNetworkGateway) MarshalJSON() ([]byte, error) { 14313 objectMap := make(map[string]interface{}) 14314 if vng.VirtualNetworkGatewayPropertiesFormat != nil { 14315 objectMap["properties"] = vng.VirtualNetworkGatewayPropertiesFormat 14316 } 14317 if vng.Etag != nil { 14318 objectMap["etag"] = vng.Etag 14319 } 14320 if vng.ID != nil { 14321 objectMap["id"] = vng.ID 14322 } 14323 if vng.Location != nil { 14324 objectMap["location"] = vng.Location 14325 } 14326 if vng.Tags != nil { 14327 objectMap["tags"] = vng.Tags 14328 } 14329 return json.Marshal(objectMap) 14330} 14331 14332// UnmarshalJSON is the custom unmarshaler for VirtualNetworkGateway struct. 14333func (vng *VirtualNetworkGateway) UnmarshalJSON(body []byte) error { 14334 var m map[string]*json.RawMessage 14335 err := json.Unmarshal(body, &m) 14336 if err != nil { 14337 return err 14338 } 14339 for k, v := range m { 14340 switch k { 14341 case "properties": 14342 if v != nil { 14343 var virtualNetworkGatewayPropertiesFormat VirtualNetworkGatewayPropertiesFormat 14344 err = json.Unmarshal(*v, &virtualNetworkGatewayPropertiesFormat) 14345 if err != nil { 14346 return err 14347 } 14348 vng.VirtualNetworkGatewayPropertiesFormat = &virtualNetworkGatewayPropertiesFormat 14349 } 14350 case "etag": 14351 if v != nil { 14352 var etag string 14353 err = json.Unmarshal(*v, &etag) 14354 if err != nil { 14355 return err 14356 } 14357 vng.Etag = &etag 14358 } 14359 case "id": 14360 if v != nil { 14361 var ID string 14362 err = json.Unmarshal(*v, &ID) 14363 if err != nil { 14364 return err 14365 } 14366 vng.ID = &ID 14367 } 14368 case "name": 14369 if v != nil { 14370 var name string 14371 err = json.Unmarshal(*v, &name) 14372 if err != nil { 14373 return err 14374 } 14375 vng.Name = &name 14376 } 14377 case "type": 14378 if v != nil { 14379 var typeVar string 14380 err = json.Unmarshal(*v, &typeVar) 14381 if err != nil { 14382 return err 14383 } 14384 vng.Type = &typeVar 14385 } 14386 case "location": 14387 if v != nil { 14388 var location string 14389 err = json.Unmarshal(*v, &location) 14390 if err != nil { 14391 return err 14392 } 14393 vng.Location = &location 14394 } 14395 case "tags": 14396 if v != nil { 14397 var tags map[string]*string 14398 err = json.Unmarshal(*v, &tags) 14399 if err != nil { 14400 return err 14401 } 14402 vng.Tags = tags 14403 } 14404 } 14405 } 14406 14407 return nil 14408} 14409 14410// VirtualNetworkGatewayConnection a common class for general resource information 14411type VirtualNetworkGatewayConnection struct { 14412 autorest.Response `json:"-"` 14413 // VirtualNetworkGatewayConnectionPropertiesFormat - Properties of the virtual network gateway connection. 14414 *VirtualNetworkGatewayConnectionPropertiesFormat `json:"properties,omitempty"` 14415 // Etag - Gets a unique read-only string that changes whenever the resource is updated. 14416 Etag *string `json:"etag,omitempty"` 14417 // ID - Resource ID. 14418 ID *string `json:"id,omitempty"` 14419 // Name - READ-ONLY; Resource name. 14420 Name *string `json:"name,omitempty"` 14421 // Type - READ-ONLY; Resource type. 14422 Type *string `json:"type,omitempty"` 14423 // Location - Resource location. 14424 Location *string `json:"location,omitempty"` 14425 // Tags - Resource tags. 14426 Tags map[string]*string `json:"tags"` 14427} 14428 14429// MarshalJSON is the custom marshaler for VirtualNetworkGatewayConnection. 14430func (vngc VirtualNetworkGatewayConnection) MarshalJSON() ([]byte, error) { 14431 objectMap := make(map[string]interface{}) 14432 if vngc.VirtualNetworkGatewayConnectionPropertiesFormat != nil { 14433 objectMap["properties"] = vngc.VirtualNetworkGatewayConnectionPropertiesFormat 14434 } 14435 if vngc.Etag != nil { 14436 objectMap["etag"] = vngc.Etag 14437 } 14438 if vngc.ID != nil { 14439 objectMap["id"] = vngc.ID 14440 } 14441 if vngc.Location != nil { 14442 objectMap["location"] = vngc.Location 14443 } 14444 if vngc.Tags != nil { 14445 objectMap["tags"] = vngc.Tags 14446 } 14447 return json.Marshal(objectMap) 14448} 14449 14450// UnmarshalJSON is the custom unmarshaler for VirtualNetworkGatewayConnection struct. 14451func (vngc *VirtualNetworkGatewayConnection) UnmarshalJSON(body []byte) error { 14452 var m map[string]*json.RawMessage 14453 err := json.Unmarshal(body, &m) 14454 if err != nil { 14455 return err 14456 } 14457 for k, v := range m { 14458 switch k { 14459 case "properties": 14460 if v != nil { 14461 var virtualNetworkGatewayConnectionPropertiesFormat VirtualNetworkGatewayConnectionPropertiesFormat 14462 err = json.Unmarshal(*v, &virtualNetworkGatewayConnectionPropertiesFormat) 14463 if err != nil { 14464 return err 14465 } 14466 vngc.VirtualNetworkGatewayConnectionPropertiesFormat = &virtualNetworkGatewayConnectionPropertiesFormat 14467 } 14468 case "etag": 14469 if v != nil { 14470 var etag string 14471 err = json.Unmarshal(*v, &etag) 14472 if err != nil { 14473 return err 14474 } 14475 vngc.Etag = &etag 14476 } 14477 case "id": 14478 if v != nil { 14479 var ID string 14480 err = json.Unmarshal(*v, &ID) 14481 if err != nil { 14482 return err 14483 } 14484 vngc.ID = &ID 14485 } 14486 case "name": 14487 if v != nil { 14488 var name string 14489 err = json.Unmarshal(*v, &name) 14490 if err != nil { 14491 return err 14492 } 14493 vngc.Name = &name 14494 } 14495 case "type": 14496 if v != nil { 14497 var typeVar string 14498 err = json.Unmarshal(*v, &typeVar) 14499 if err != nil { 14500 return err 14501 } 14502 vngc.Type = &typeVar 14503 } 14504 case "location": 14505 if v != nil { 14506 var location string 14507 err = json.Unmarshal(*v, &location) 14508 if err != nil { 14509 return err 14510 } 14511 vngc.Location = &location 14512 } 14513 case "tags": 14514 if v != nil { 14515 var tags map[string]*string 14516 err = json.Unmarshal(*v, &tags) 14517 if err != nil { 14518 return err 14519 } 14520 vngc.Tags = tags 14521 } 14522 } 14523 } 14524 14525 return nil 14526} 14527 14528// VirtualNetworkGatewayConnectionListEntity a common class for general resource information 14529type VirtualNetworkGatewayConnectionListEntity struct { 14530 autorest.Response `json:"-"` 14531 // VirtualNetworkGatewayConnectionListEntityPropertiesFormat - Properties of the virtual network gateway connection. 14532 *VirtualNetworkGatewayConnectionListEntityPropertiesFormat `json:"properties,omitempty"` 14533 // Etag - Gets a unique read-only string that changes whenever the resource is updated. 14534 Etag *string `json:"etag,omitempty"` 14535 // ID - Resource ID. 14536 ID *string `json:"id,omitempty"` 14537 // Name - READ-ONLY; Resource name. 14538 Name *string `json:"name,omitempty"` 14539 // Type - READ-ONLY; Resource type. 14540 Type *string `json:"type,omitempty"` 14541 // Location - Resource location. 14542 Location *string `json:"location,omitempty"` 14543 // Tags - Resource tags. 14544 Tags map[string]*string `json:"tags"` 14545} 14546 14547// MarshalJSON is the custom marshaler for VirtualNetworkGatewayConnectionListEntity. 14548func (vngcle VirtualNetworkGatewayConnectionListEntity) MarshalJSON() ([]byte, error) { 14549 objectMap := make(map[string]interface{}) 14550 if vngcle.VirtualNetworkGatewayConnectionListEntityPropertiesFormat != nil { 14551 objectMap["properties"] = vngcle.VirtualNetworkGatewayConnectionListEntityPropertiesFormat 14552 } 14553 if vngcle.Etag != nil { 14554 objectMap["etag"] = vngcle.Etag 14555 } 14556 if vngcle.ID != nil { 14557 objectMap["id"] = vngcle.ID 14558 } 14559 if vngcle.Location != nil { 14560 objectMap["location"] = vngcle.Location 14561 } 14562 if vngcle.Tags != nil { 14563 objectMap["tags"] = vngcle.Tags 14564 } 14565 return json.Marshal(objectMap) 14566} 14567 14568// UnmarshalJSON is the custom unmarshaler for VirtualNetworkGatewayConnectionListEntity struct. 14569func (vngcle *VirtualNetworkGatewayConnectionListEntity) UnmarshalJSON(body []byte) error { 14570 var m map[string]*json.RawMessage 14571 err := json.Unmarshal(body, &m) 14572 if err != nil { 14573 return err 14574 } 14575 for k, v := range m { 14576 switch k { 14577 case "properties": 14578 if v != nil { 14579 var virtualNetworkGatewayConnectionListEntityPropertiesFormat VirtualNetworkGatewayConnectionListEntityPropertiesFormat 14580 err = json.Unmarshal(*v, &virtualNetworkGatewayConnectionListEntityPropertiesFormat) 14581 if err != nil { 14582 return err 14583 } 14584 vngcle.VirtualNetworkGatewayConnectionListEntityPropertiesFormat = &virtualNetworkGatewayConnectionListEntityPropertiesFormat 14585 } 14586 case "etag": 14587 if v != nil { 14588 var etag string 14589 err = json.Unmarshal(*v, &etag) 14590 if err != nil { 14591 return err 14592 } 14593 vngcle.Etag = &etag 14594 } 14595 case "id": 14596 if v != nil { 14597 var ID string 14598 err = json.Unmarshal(*v, &ID) 14599 if err != nil { 14600 return err 14601 } 14602 vngcle.ID = &ID 14603 } 14604 case "name": 14605 if v != nil { 14606 var name string 14607 err = json.Unmarshal(*v, &name) 14608 if err != nil { 14609 return err 14610 } 14611 vngcle.Name = &name 14612 } 14613 case "type": 14614 if v != nil { 14615 var typeVar string 14616 err = json.Unmarshal(*v, &typeVar) 14617 if err != nil { 14618 return err 14619 } 14620 vngcle.Type = &typeVar 14621 } 14622 case "location": 14623 if v != nil { 14624 var location string 14625 err = json.Unmarshal(*v, &location) 14626 if err != nil { 14627 return err 14628 } 14629 vngcle.Location = &location 14630 } 14631 case "tags": 14632 if v != nil { 14633 var tags map[string]*string 14634 err = json.Unmarshal(*v, &tags) 14635 if err != nil { 14636 return err 14637 } 14638 vngcle.Tags = tags 14639 } 14640 } 14641 } 14642 14643 return nil 14644} 14645 14646// VirtualNetworkGatewayConnectionListEntityPropertiesFormat virtualNetworkGatewayConnection properties 14647type VirtualNetworkGatewayConnectionListEntityPropertiesFormat struct { 14648 // AuthorizationKey - The authorizationKey. 14649 AuthorizationKey *string `json:"authorizationKey,omitempty"` 14650 // VirtualNetworkGateway1 - The reference to virtual network gateway resource. 14651 VirtualNetworkGateway1 *VirtualNetworkConnectionGatewayReference `json:"virtualNetworkGateway1,omitempty"` 14652 // VirtualNetworkGateway2 - The reference to virtual network gateway resource. 14653 VirtualNetworkGateway2 *VirtualNetworkConnectionGatewayReference `json:"virtualNetworkGateway2,omitempty"` 14654 // LocalNetworkGateway2 - The reference to local network gateway resource. 14655 LocalNetworkGateway2 *VirtualNetworkConnectionGatewayReference `json:"localNetworkGateway2,omitempty"` 14656 // ConnectionType - Gateway connection type. Possible values are: 'IPsec','Vnet2Vnet','ExpressRoute', and 'VPNClient. Possible values include: 'IPsec', 'Vnet2Vnet', 'ExpressRoute', 'VPNClient' 14657 ConnectionType VirtualNetworkGatewayConnectionType `json:"connectionType,omitempty"` 14658 // RoutingWeight - The routing weight. 14659 RoutingWeight *int32 `json:"routingWeight,omitempty"` 14660 // SharedKey - The IPSec shared key. 14661 SharedKey *string `json:"sharedKey,omitempty"` 14662 // ConnectionStatus - READ-ONLY; Virtual network Gateway connection status. Possible values are 'Unknown', 'Connecting', 'Connected' and 'NotConnected'. Possible values include: 'VirtualNetworkGatewayConnectionStatusUnknown', 'VirtualNetworkGatewayConnectionStatusConnecting', 'VirtualNetworkGatewayConnectionStatusConnected', 'VirtualNetworkGatewayConnectionStatusNotConnected' 14663 ConnectionStatus VirtualNetworkGatewayConnectionStatus `json:"connectionStatus,omitempty"` 14664 // TunnelConnectionStatus - READ-ONLY; Collection of all tunnels' connection health status. 14665 TunnelConnectionStatus *[]TunnelConnectionHealth `json:"tunnelConnectionStatus,omitempty"` 14666 // EgressBytesTransferred - READ-ONLY; The egress bytes transferred in this connection. 14667 EgressBytesTransferred *int64 `json:"egressBytesTransferred,omitempty"` 14668 // IngressBytesTransferred - READ-ONLY; The ingress bytes transferred in this connection. 14669 IngressBytesTransferred *int64 `json:"ingressBytesTransferred,omitempty"` 14670 // Peer - The reference to peerings resource. 14671 Peer *SubResource `json:"peer,omitempty"` 14672 // EnableBgp - EnableBgp flag 14673 EnableBgp *bool `json:"enableBgp,omitempty"` 14674 // UsePolicyBasedTrafficSelectors - Enable policy-based traffic selectors. 14675 UsePolicyBasedTrafficSelectors *bool `json:"usePolicyBasedTrafficSelectors,omitempty"` 14676 // IpsecPolicies - The IPSec Policies to be considered by this connection. 14677 IpsecPolicies *[]IpsecPolicy `json:"ipsecPolicies,omitempty"` 14678 // ResourceGUID - The resource GUID property of the VirtualNetworkGatewayConnection resource. 14679 ResourceGUID *string `json:"resourceGuid,omitempty"` 14680 // ProvisioningState - READ-ONLY; The provisioning state of the VirtualNetworkGatewayConnection resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. 14681 ProvisioningState *string `json:"provisioningState,omitempty"` 14682} 14683 14684// VirtualNetworkGatewayConnectionListResult response for the ListVirtualNetworkGatewayConnections API 14685// service call 14686type VirtualNetworkGatewayConnectionListResult struct { 14687 autorest.Response `json:"-"` 14688 // Value - Gets a list of VirtualNetworkGatewayConnection resources that exists in a resource group. 14689 Value *[]VirtualNetworkGatewayConnection `json:"value,omitempty"` 14690 // NextLink - READ-ONLY; The URL to get the next set of results. 14691 NextLink *string `json:"nextLink,omitempty"` 14692} 14693 14694// VirtualNetworkGatewayConnectionListResultIterator provides access to a complete listing of 14695// VirtualNetworkGatewayConnection values. 14696type VirtualNetworkGatewayConnectionListResultIterator struct { 14697 i int 14698 page VirtualNetworkGatewayConnectionListResultPage 14699} 14700 14701// NextWithContext advances to the next value. If there was an error making 14702// the request the iterator does not advance and the error is returned. 14703func (iter *VirtualNetworkGatewayConnectionListResultIterator) NextWithContext(ctx context.Context) (err error) { 14704 if tracing.IsEnabled() { 14705 ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewayConnectionListResultIterator.NextWithContext") 14706 defer func() { 14707 sc := -1 14708 if iter.Response().Response.Response != nil { 14709 sc = iter.Response().Response.Response.StatusCode 14710 } 14711 tracing.EndSpan(ctx, sc, err) 14712 }() 14713 } 14714 iter.i++ 14715 if iter.i < len(iter.page.Values()) { 14716 return nil 14717 } 14718 err = iter.page.NextWithContext(ctx) 14719 if err != nil { 14720 iter.i-- 14721 return err 14722 } 14723 iter.i = 0 14724 return nil 14725} 14726 14727// Next advances to the next value. If there was an error making 14728// the request the iterator does not advance and the error is returned. 14729// Deprecated: Use NextWithContext() instead. 14730func (iter *VirtualNetworkGatewayConnectionListResultIterator) Next() error { 14731 return iter.NextWithContext(context.Background()) 14732} 14733 14734// NotDone returns true if the enumeration should be started or is not yet complete. 14735func (iter VirtualNetworkGatewayConnectionListResultIterator) NotDone() bool { 14736 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 14737} 14738 14739// Response returns the raw server response from the last page request. 14740func (iter VirtualNetworkGatewayConnectionListResultIterator) Response() VirtualNetworkGatewayConnectionListResult { 14741 return iter.page.Response() 14742} 14743 14744// Value returns the current value or a zero-initialized value if the 14745// iterator has advanced beyond the end of the collection. 14746func (iter VirtualNetworkGatewayConnectionListResultIterator) Value() VirtualNetworkGatewayConnection { 14747 if !iter.page.NotDone() { 14748 return VirtualNetworkGatewayConnection{} 14749 } 14750 return iter.page.Values()[iter.i] 14751} 14752 14753// Creates a new instance of the VirtualNetworkGatewayConnectionListResultIterator type. 14754func NewVirtualNetworkGatewayConnectionListResultIterator(page VirtualNetworkGatewayConnectionListResultPage) VirtualNetworkGatewayConnectionListResultIterator { 14755 return VirtualNetworkGatewayConnectionListResultIterator{page: page} 14756} 14757 14758// IsEmpty returns true if the ListResult contains no values. 14759func (vngclr VirtualNetworkGatewayConnectionListResult) IsEmpty() bool { 14760 return vngclr.Value == nil || len(*vngclr.Value) == 0 14761} 14762 14763// virtualNetworkGatewayConnectionListResultPreparer prepares a request to retrieve the next set of results. 14764// It returns nil if no more results exist. 14765func (vngclr VirtualNetworkGatewayConnectionListResult) virtualNetworkGatewayConnectionListResultPreparer(ctx context.Context) (*http.Request, error) { 14766 if vngclr.NextLink == nil || len(to.String(vngclr.NextLink)) < 1 { 14767 return nil, nil 14768 } 14769 return autorest.Prepare((&http.Request{}).WithContext(ctx), 14770 autorest.AsJSON(), 14771 autorest.AsGet(), 14772 autorest.WithBaseURL(to.String(vngclr.NextLink))) 14773} 14774 14775// VirtualNetworkGatewayConnectionListResultPage contains a page of VirtualNetworkGatewayConnection values. 14776type VirtualNetworkGatewayConnectionListResultPage struct { 14777 fn func(context.Context, VirtualNetworkGatewayConnectionListResult) (VirtualNetworkGatewayConnectionListResult, error) 14778 vngclr VirtualNetworkGatewayConnectionListResult 14779} 14780 14781// NextWithContext advances to the next page of values. If there was an error making 14782// the request the page does not advance and the error is returned. 14783func (page *VirtualNetworkGatewayConnectionListResultPage) NextWithContext(ctx context.Context) (err error) { 14784 if tracing.IsEnabled() { 14785 ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewayConnectionListResultPage.NextWithContext") 14786 defer func() { 14787 sc := -1 14788 if page.Response().Response.Response != nil { 14789 sc = page.Response().Response.Response.StatusCode 14790 } 14791 tracing.EndSpan(ctx, sc, err) 14792 }() 14793 } 14794 next, err := page.fn(ctx, page.vngclr) 14795 if err != nil { 14796 return err 14797 } 14798 page.vngclr = next 14799 return nil 14800} 14801 14802// Next advances to the next page of values. If there was an error making 14803// the request the page does not advance and the error is returned. 14804// Deprecated: Use NextWithContext() instead. 14805func (page *VirtualNetworkGatewayConnectionListResultPage) Next() error { 14806 return page.NextWithContext(context.Background()) 14807} 14808 14809// NotDone returns true if the page enumeration should be started or is not yet complete. 14810func (page VirtualNetworkGatewayConnectionListResultPage) NotDone() bool { 14811 return !page.vngclr.IsEmpty() 14812} 14813 14814// Response returns the raw server response from the last page request. 14815func (page VirtualNetworkGatewayConnectionListResultPage) Response() VirtualNetworkGatewayConnectionListResult { 14816 return page.vngclr 14817} 14818 14819// Values returns the slice of values for the current page or nil if there are no values. 14820func (page VirtualNetworkGatewayConnectionListResultPage) Values() []VirtualNetworkGatewayConnection { 14821 if page.vngclr.IsEmpty() { 14822 return nil 14823 } 14824 return *page.vngclr.Value 14825} 14826 14827// Creates a new instance of the VirtualNetworkGatewayConnectionListResultPage type. 14828func NewVirtualNetworkGatewayConnectionListResultPage(getNextPage func(context.Context, VirtualNetworkGatewayConnectionListResult) (VirtualNetworkGatewayConnectionListResult, error)) VirtualNetworkGatewayConnectionListResultPage { 14829 return VirtualNetworkGatewayConnectionListResultPage{fn: getNextPage} 14830} 14831 14832// VirtualNetworkGatewayConnectionPropertiesFormat virtualNetworkGatewayConnection properties 14833type VirtualNetworkGatewayConnectionPropertiesFormat struct { 14834 // AuthorizationKey - The authorizationKey. 14835 AuthorizationKey *string `json:"authorizationKey,omitempty"` 14836 // VirtualNetworkGateway1 - The reference to virtual network gateway resource. 14837 VirtualNetworkGateway1 *VirtualNetworkGateway `json:"virtualNetworkGateway1,omitempty"` 14838 // VirtualNetworkGateway2 - The reference to virtual network gateway resource. 14839 VirtualNetworkGateway2 *VirtualNetworkGateway `json:"virtualNetworkGateway2,omitempty"` 14840 // LocalNetworkGateway2 - The reference to local network gateway resource. 14841 LocalNetworkGateway2 *LocalNetworkGateway `json:"localNetworkGateway2,omitempty"` 14842 // ConnectionType - Gateway connection type. Possible values are: 'IPsec','Vnet2Vnet','ExpressRoute', and 'VPNClient. Possible values include: 'IPsec', 'Vnet2Vnet', 'ExpressRoute', 'VPNClient' 14843 ConnectionType VirtualNetworkGatewayConnectionType `json:"connectionType,omitempty"` 14844 // RoutingWeight - The routing weight. 14845 RoutingWeight *int32 `json:"routingWeight,omitempty"` 14846 // SharedKey - The IPSec shared key. 14847 SharedKey *string `json:"sharedKey,omitempty"` 14848 // ConnectionStatus - READ-ONLY; Virtual network Gateway connection status. Possible values are 'Unknown', 'Connecting', 'Connected' and 'NotConnected'. Possible values include: 'VirtualNetworkGatewayConnectionStatusUnknown', 'VirtualNetworkGatewayConnectionStatusConnecting', 'VirtualNetworkGatewayConnectionStatusConnected', 'VirtualNetworkGatewayConnectionStatusNotConnected' 14849 ConnectionStatus VirtualNetworkGatewayConnectionStatus `json:"connectionStatus,omitempty"` 14850 // TunnelConnectionStatus - READ-ONLY; Collection of all tunnels' connection health status. 14851 TunnelConnectionStatus *[]TunnelConnectionHealth `json:"tunnelConnectionStatus,omitempty"` 14852 // EgressBytesTransferred - READ-ONLY; The egress bytes transferred in this connection. 14853 EgressBytesTransferred *int64 `json:"egressBytesTransferred,omitempty"` 14854 // IngressBytesTransferred - READ-ONLY; The ingress bytes transferred in this connection. 14855 IngressBytesTransferred *int64 `json:"ingressBytesTransferred,omitempty"` 14856 // Peer - The reference to peerings resource. 14857 Peer *SubResource `json:"peer,omitempty"` 14858 // EnableBgp - EnableBgp flag 14859 EnableBgp *bool `json:"enableBgp,omitempty"` 14860 // UsePolicyBasedTrafficSelectors - Enable policy-based traffic selectors. 14861 UsePolicyBasedTrafficSelectors *bool `json:"usePolicyBasedTrafficSelectors,omitempty"` 14862 // IpsecPolicies - The IPSec Policies to be considered by this connection. 14863 IpsecPolicies *[]IpsecPolicy `json:"ipsecPolicies,omitempty"` 14864 // ResourceGUID - The resource GUID property of the VirtualNetworkGatewayConnection resource. 14865 ResourceGUID *string `json:"resourceGuid,omitempty"` 14866 // ProvisioningState - READ-ONLY; The provisioning state of the VirtualNetworkGatewayConnection resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. 14867 ProvisioningState *string `json:"provisioningState,omitempty"` 14868} 14869 14870// VirtualNetworkGatewayConnectionsCreateOrUpdateFuture an abstraction for monitoring and retrieving the 14871// results of a long-running operation. 14872type VirtualNetworkGatewayConnectionsCreateOrUpdateFuture struct { 14873 azure.Future 14874} 14875 14876// Result returns the result of the asynchronous operation. 14877// If the operation has not completed it will return an error. 14878func (future *VirtualNetworkGatewayConnectionsCreateOrUpdateFuture) Result(client VirtualNetworkGatewayConnectionsClient) (vngc VirtualNetworkGatewayConnection, err error) { 14879 var done bool 14880 done, err = future.DoneWithContext(context.Background(), client) 14881 if err != nil { 14882 err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") 14883 return 14884 } 14885 if !done { 14886 err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsCreateOrUpdateFuture") 14887 return 14888 } 14889 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 14890 if vngc.Response.Response, err = future.GetResult(sender); err == nil && vngc.Response.Response.StatusCode != http.StatusNoContent { 14891 vngc, err = client.CreateOrUpdateResponder(vngc.Response.Response) 14892 if err != nil { 14893 err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsCreateOrUpdateFuture", "Result", vngc.Response.Response, "Failure responding to request") 14894 } 14895 } 14896 return 14897} 14898 14899// VirtualNetworkGatewayConnectionsDeleteFuture an abstraction for monitoring and retrieving the results of 14900// a long-running operation. 14901type VirtualNetworkGatewayConnectionsDeleteFuture struct { 14902 azure.Future 14903} 14904 14905// Result returns the result of the asynchronous operation. 14906// If the operation has not completed it will return an error. 14907func (future *VirtualNetworkGatewayConnectionsDeleteFuture) Result(client VirtualNetworkGatewayConnectionsClient) (ar autorest.Response, err error) { 14908 var done bool 14909 done, err = future.DoneWithContext(context.Background(), client) 14910 if err != nil { 14911 err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsDeleteFuture", "Result", future.Response(), "Polling failure") 14912 return 14913 } 14914 if !done { 14915 err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsDeleteFuture") 14916 return 14917 } 14918 ar.Response = future.Response() 14919 return 14920} 14921 14922// VirtualNetworkGatewayConnectionsResetSharedKeyFuture an abstraction for monitoring and retrieving the 14923// results of a long-running operation. 14924type VirtualNetworkGatewayConnectionsResetSharedKeyFuture struct { 14925 azure.Future 14926} 14927 14928// Result returns the result of the asynchronous operation. 14929// If the operation has not completed it will return an error. 14930func (future *VirtualNetworkGatewayConnectionsResetSharedKeyFuture) Result(client VirtualNetworkGatewayConnectionsClient) (crsk ConnectionResetSharedKey, err error) { 14931 var done bool 14932 done, err = future.DoneWithContext(context.Background(), client) 14933 if err != nil { 14934 err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsResetSharedKeyFuture", "Result", future.Response(), "Polling failure") 14935 return 14936 } 14937 if !done { 14938 err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsResetSharedKeyFuture") 14939 return 14940 } 14941 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 14942 if crsk.Response.Response, err = future.GetResult(sender); err == nil && crsk.Response.Response.StatusCode != http.StatusNoContent { 14943 crsk, err = client.ResetSharedKeyResponder(crsk.Response.Response) 14944 if err != nil { 14945 err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsResetSharedKeyFuture", "Result", crsk.Response.Response, "Failure responding to request") 14946 } 14947 } 14948 return 14949} 14950 14951// VirtualNetworkGatewayConnectionsSetSharedKeyFuture an abstraction for monitoring and retrieving the 14952// results of a long-running operation. 14953type VirtualNetworkGatewayConnectionsSetSharedKeyFuture struct { 14954 azure.Future 14955} 14956 14957// Result returns the result of the asynchronous operation. 14958// If the operation has not completed it will return an error. 14959func (future *VirtualNetworkGatewayConnectionsSetSharedKeyFuture) Result(client VirtualNetworkGatewayConnectionsClient) (csk ConnectionSharedKey, err error) { 14960 var done bool 14961 done, err = future.DoneWithContext(context.Background(), client) 14962 if err != nil { 14963 err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsSetSharedKeyFuture", "Result", future.Response(), "Polling failure") 14964 return 14965 } 14966 if !done { 14967 err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsSetSharedKeyFuture") 14968 return 14969 } 14970 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 14971 if csk.Response.Response, err = future.GetResult(sender); err == nil && csk.Response.Response.StatusCode != http.StatusNoContent { 14972 csk, err = client.SetSharedKeyResponder(csk.Response.Response) 14973 if err != nil { 14974 err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsSetSharedKeyFuture", "Result", csk.Response.Response, "Failure responding to request") 14975 } 14976 } 14977 return 14978} 14979 14980// VirtualNetworkGatewayConnectionsUpdateTagsFuture an abstraction for monitoring and retrieving the 14981// results of a long-running operation. 14982type VirtualNetworkGatewayConnectionsUpdateTagsFuture struct { 14983 azure.Future 14984} 14985 14986// Result returns the result of the asynchronous operation. 14987// If the operation has not completed it will return an error. 14988func (future *VirtualNetworkGatewayConnectionsUpdateTagsFuture) Result(client VirtualNetworkGatewayConnectionsClient) (vngcle VirtualNetworkGatewayConnectionListEntity, err error) { 14989 var done bool 14990 done, err = future.DoneWithContext(context.Background(), client) 14991 if err != nil { 14992 err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsUpdateTagsFuture", "Result", future.Response(), "Polling failure") 14993 return 14994 } 14995 if !done { 14996 err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsUpdateTagsFuture") 14997 return 14998 } 14999 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 15000 if vngcle.Response.Response, err = future.GetResult(sender); err == nil && vngcle.Response.Response.StatusCode != http.StatusNoContent { 15001 vngcle, err = client.UpdateTagsResponder(vngcle.Response.Response) 15002 if err != nil { 15003 err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsUpdateTagsFuture", "Result", vngcle.Response.Response, "Failure responding to request") 15004 } 15005 } 15006 return 15007} 15008 15009// VirtualNetworkGatewayIPConfiguration IP configuration for virtual network gateway 15010type VirtualNetworkGatewayIPConfiguration struct { 15011 // VirtualNetworkGatewayIPConfigurationPropertiesFormat - Properties of the virtual network gateway ip configuration. 15012 *VirtualNetworkGatewayIPConfigurationPropertiesFormat `json:"properties,omitempty"` 15013 // Name - The name of the resource that is unique within a resource group. This name can be used to access the resource. 15014 Name *string `json:"name,omitempty"` 15015 // Etag - A unique read-only string that changes whenever the resource is updated. 15016 Etag *string `json:"etag,omitempty"` 15017 // ID - Resource ID. 15018 ID *string `json:"id,omitempty"` 15019} 15020 15021// MarshalJSON is the custom marshaler for VirtualNetworkGatewayIPConfiguration. 15022func (vngic VirtualNetworkGatewayIPConfiguration) MarshalJSON() ([]byte, error) { 15023 objectMap := make(map[string]interface{}) 15024 if vngic.VirtualNetworkGatewayIPConfigurationPropertiesFormat != nil { 15025 objectMap["properties"] = vngic.VirtualNetworkGatewayIPConfigurationPropertiesFormat 15026 } 15027 if vngic.Name != nil { 15028 objectMap["name"] = vngic.Name 15029 } 15030 if vngic.Etag != nil { 15031 objectMap["etag"] = vngic.Etag 15032 } 15033 if vngic.ID != nil { 15034 objectMap["id"] = vngic.ID 15035 } 15036 return json.Marshal(objectMap) 15037} 15038 15039// UnmarshalJSON is the custom unmarshaler for VirtualNetworkGatewayIPConfiguration struct. 15040func (vngic *VirtualNetworkGatewayIPConfiguration) UnmarshalJSON(body []byte) error { 15041 var m map[string]*json.RawMessage 15042 err := json.Unmarshal(body, &m) 15043 if err != nil { 15044 return err 15045 } 15046 for k, v := range m { 15047 switch k { 15048 case "properties": 15049 if v != nil { 15050 var virtualNetworkGatewayIPConfigurationPropertiesFormat VirtualNetworkGatewayIPConfigurationPropertiesFormat 15051 err = json.Unmarshal(*v, &virtualNetworkGatewayIPConfigurationPropertiesFormat) 15052 if err != nil { 15053 return err 15054 } 15055 vngic.VirtualNetworkGatewayIPConfigurationPropertiesFormat = &virtualNetworkGatewayIPConfigurationPropertiesFormat 15056 } 15057 case "name": 15058 if v != nil { 15059 var name string 15060 err = json.Unmarshal(*v, &name) 15061 if err != nil { 15062 return err 15063 } 15064 vngic.Name = &name 15065 } 15066 case "etag": 15067 if v != nil { 15068 var etag string 15069 err = json.Unmarshal(*v, &etag) 15070 if err != nil { 15071 return err 15072 } 15073 vngic.Etag = &etag 15074 } 15075 case "id": 15076 if v != nil { 15077 var ID string 15078 err = json.Unmarshal(*v, &ID) 15079 if err != nil { 15080 return err 15081 } 15082 vngic.ID = &ID 15083 } 15084 } 15085 } 15086 15087 return nil 15088} 15089 15090// VirtualNetworkGatewayIPConfigurationPropertiesFormat properties of VirtualNetworkGatewayIPConfiguration 15091type VirtualNetworkGatewayIPConfigurationPropertiesFormat struct { 15092 // PrivateIPAllocationMethod - The private IP allocation method. Possible values are: 'Static' and 'Dynamic'. Possible values include: 'Static', 'Dynamic' 15093 PrivateIPAllocationMethod IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"` 15094 // Subnet - The reference of the subnet resource. 15095 Subnet *SubResource `json:"subnet,omitempty"` 15096 // PublicIPAddress - The reference of the public IP resource. 15097 PublicIPAddress *SubResource `json:"publicIPAddress,omitempty"` 15098 // ProvisioningState - READ-ONLY; The provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. 15099 ProvisioningState *string `json:"provisioningState,omitempty"` 15100} 15101 15102// VirtualNetworkGatewayListConnectionsResult response for the VirtualNetworkGatewayListConnections API 15103// service call 15104type VirtualNetworkGatewayListConnectionsResult struct { 15105 autorest.Response `json:"-"` 15106 // Value - Gets a list of VirtualNetworkGatewayConnection resources that exists in a resource group. 15107 Value *[]VirtualNetworkGatewayConnectionListEntity `json:"value,omitempty"` 15108 // NextLink - READ-ONLY; The URL to get the next set of results. 15109 NextLink *string `json:"nextLink,omitempty"` 15110} 15111 15112// VirtualNetworkGatewayListConnectionsResultIterator provides access to a complete listing of 15113// VirtualNetworkGatewayConnectionListEntity values. 15114type VirtualNetworkGatewayListConnectionsResultIterator struct { 15115 i int 15116 page VirtualNetworkGatewayListConnectionsResultPage 15117} 15118 15119// NextWithContext advances to the next value. If there was an error making 15120// the request the iterator does not advance and the error is returned. 15121func (iter *VirtualNetworkGatewayListConnectionsResultIterator) NextWithContext(ctx context.Context) (err error) { 15122 if tracing.IsEnabled() { 15123 ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewayListConnectionsResultIterator.NextWithContext") 15124 defer func() { 15125 sc := -1 15126 if iter.Response().Response.Response != nil { 15127 sc = iter.Response().Response.Response.StatusCode 15128 } 15129 tracing.EndSpan(ctx, sc, err) 15130 }() 15131 } 15132 iter.i++ 15133 if iter.i < len(iter.page.Values()) { 15134 return nil 15135 } 15136 err = iter.page.NextWithContext(ctx) 15137 if err != nil { 15138 iter.i-- 15139 return err 15140 } 15141 iter.i = 0 15142 return nil 15143} 15144 15145// Next advances to the next value. If there was an error making 15146// the request the iterator does not advance and the error is returned. 15147// Deprecated: Use NextWithContext() instead. 15148func (iter *VirtualNetworkGatewayListConnectionsResultIterator) Next() error { 15149 return iter.NextWithContext(context.Background()) 15150} 15151 15152// NotDone returns true if the enumeration should be started or is not yet complete. 15153func (iter VirtualNetworkGatewayListConnectionsResultIterator) NotDone() bool { 15154 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 15155} 15156 15157// Response returns the raw server response from the last page request. 15158func (iter VirtualNetworkGatewayListConnectionsResultIterator) Response() VirtualNetworkGatewayListConnectionsResult { 15159 return iter.page.Response() 15160} 15161 15162// Value returns the current value or a zero-initialized value if the 15163// iterator has advanced beyond the end of the collection. 15164func (iter VirtualNetworkGatewayListConnectionsResultIterator) Value() VirtualNetworkGatewayConnectionListEntity { 15165 if !iter.page.NotDone() { 15166 return VirtualNetworkGatewayConnectionListEntity{} 15167 } 15168 return iter.page.Values()[iter.i] 15169} 15170 15171// Creates a new instance of the VirtualNetworkGatewayListConnectionsResultIterator type. 15172func NewVirtualNetworkGatewayListConnectionsResultIterator(page VirtualNetworkGatewayListConnectionsResultPage) VirtualNetworkGatewayListConnectionsResultIterator { 15173 return VirtualNetworkGatewayListConnectionsResultIterator{page: page} 15174} 15175 15176// IsEmpty returns true if the ListResult contains no values. 15177func (vnglcr VirtualNetworkGatewayListConnectionsResult) IsEmpty() bool { 15178 return vnglcr.Value == nil || len(*vnglcr.Value) == 0 15179} 15180 15181// virtualNetworkGatewayListConnectionsResultPreparer prepares a request to retrieve the next set of results. 15182// It returns nil if no more results exist. 15183func (vnglcr VirtualNetworkGatewayListConnectionsResult) virtualNetworkGatewayListConnectionsResultPreparer(ctx context.Context) (*http.Request, error) { 15184 if vnglcr.NextLink == nil || len(to.String(vnglcr.NextLink)) < 1 { 15185 return nil, nil 15186 } 15187 return autorest.Prepare((&http.Request{}).WithContext(ctx), 15188 autorest.AsJSON(), 15189 autorest.AsGet(), 15190 autorest.WithBaseURL(to.String(vnglcr.NextLink))) 15191} 15192 15193// VirtualNetworkGatewayListConnectionsResultPage contains a page of 15194// VirtualNetworkGatewayConnectionListEntity values. 15195type VirtualNetworkGatewayListConnectionsResultPage struct { 15196 fn func(context.Context, VirtualNetworkGatewayListConnectionsResult) (VirtualNetworkGatewayListConnectionsResult, error) 15197 vnglcr VirtualNetworkGatewayListConnectionsResult 15198} 15199 15200// NextWithContext advances to the next page of values. If there was an error making 15201// the request the page does not advance and the error is returned. 15202func (page *VirtualNetworkGatewayListConnectionsResultPage) NextWithContext(ctx context.Context) (err error) { 15203 if tracing.IsEnabled() { 15204 ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewayListConnectionsResultPage.NextWithContext") 15205 defer func() { 15206 sc := -1 15207 if page.Response().Response.Response != nil { 15208 sc = page.Response().Response.Response.StatusCode 15209 } 15210 tracing.EndSpan(ctx, sc, err) 15211 }() 15212 } 15213 next, err := page.fn(ctx, page.vnglcr) 15214 if err != nil { 15215 return err 15216 } 15217 page.vnglcr = next 15218 return nil 15219} 15220 15221// Next advances to the next page of values. If there was an error making 15222// the request the page does not advance and the error is returned. 15223// Deprecated: Use NextWithContext() instead. 15224func (page *VirtualNetworkGatewayListConnectionsResultPage) Next() error { 15225 return page.NextWithContext(context.Background()) 15226} 15227 15228// NotDone returns true if the page enumeration should be started or is not yet complete. 15229func (page VirtualNetworkGatewayListConnectionsResultPage) NotDone() bool { 15230 return !page.vnglcr.IsEmpty() 15231} 15232 15233// Response returns the raw server response from the last page request. 15234func (page VirtualNetworkGatewayListConnectionsResultPage) Response() VirtualNetworkGatewayListConnectionsResult { 15235 return page.vnglcr 15236} 15237 15238// Values returns the slice of values for the current page or nil if there are no values. 15239func (page VirtualNetworkGatewayListConnectionsResultPage) Values() []VirtualNetworkGatewayConnectionListEntity { 15240 if page.vnglcr.IsEmpty() { 15241 return nil 15242 } 15243 return *page.vnglcr.Value 15244} 15245 15246// Creates a new instance of the VirtualNetworkGatewayListConnectionsResultPage type. 15247func NewVirtualNetworkGatewayListConnectionsResultPage(getNextPage func(context.Context, VirtualNetworkGatewayListConnectionsResult) (VirtualNetworkGatewayListConnectionsResult, error)) VirtualNetworkGatewayListConnectionsResultPage { 15248 return VirtualNetworkGatewayListConnectionsResultPage{fn: getNextPage} 15249} 15250 15251// VirtualNetworkGatewayListResult response for the ListVirtualNetworkGateways API service call. 15252type VirtualNetworkGatewayListResult struct { 15253 autorest.Response `json:"-"` 15254 // Value - Gets a list of VirtualNetworkGateway resources that exists in a resource group. 15255 Value *[]VirtualNetworkGateway `json:"value,omitempty"` 15256 // NextLink - READ-ONLY; The URL to get the next set of results. 15257 NextLink *string `json:"nextLink,omitempty"` 15258} 15259 15260// VirtualNetworkGatewayListResultIterator provides access to a complete listing of VirtualNetworkGateway 15261// values. 15262type VirtualNetworkGatewayListResultIterator struct { 15263 i int 15264 page VirtualNetworkGatewayListResultPage 15265} 15266 15267// NextWithContext advances to the next value. If there was an error making 15268// the request the iterator does not advance and the error is returned. 15269func (iter *VirtualNetworkGatewayListResultIterator) NextWithContext(ctx context.Context) (err error) { 15270 if tracing.IsEnabled() { 15271 ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewayListResultIterator.NextWithContext") 15272 defer func() { 15273 sc := -1 15274 if iter.Response().Response.Response != nil { 15275 sc = iter.Response().Response.Response.StatusCode 15276 } 15277 tracing.EndSpan(ctx, sc, err) 15278 }() 15279 } 15280 iter.i++ 15281 if iter.i < len(iter.page.Values()) { 15282 return nil 15283 } 15284 err = iter.page.NextWithContext(ctx) 15285 if err != nil { 15286 iter.i-- 15287 return err 15288 } 15289 iter.i = 0 15290 return nil 15291} 15292 15293// Next advances to the next value. If there was an error making 15294// the request the iterator does not advance and the error is returned. 15295// Deprecated: Use NextWithContext() instead. 15296func (iter *VirtualNetworkGatewayListResultIterator) Next() error { 15297 return iter.NextWithContext(context.Background()) 15298} 15299 15300// NotDone returns true if the enumeration should be started or is not yet complete. 15301func (iter VirtualNetworkGatewayListResultIterator) NotDone() bool { 15302 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 15303} 15304 15305// Response returns the raw server response from the last page request. 15306func (iter VirtualNetworkGatewayListResultIterator) Response() VirtualNetworkGatewayListResult { 15307 return iter.page.Response() 15308} 15309 15310// Value returns the current value or a zero-initialized value if the 15311// iterator has advanced beyond the end of the collection. 15312func (iter VirtualNetworkGatewayListResultIterator) Value() VirtualNetworkGateway { 15313 if !iter.page.NotDone() { 15314 return VirtualNetworkGateway{} 15315 } 15316 return iter.page.Values()[iter.i] 15317} 15318 15319// Creates a new instance of the VirtualNetworkGatewayListResultIterator type. 15320func NewVirtualNetworkGatewayListResultIterator(page VirtualNetworkGatewayListResultPage) VirtualNetworkGatewayListResultIterator { 15321 return VirtualNetworkGatewayListResultIterator{page: page} 15322} 15323 15324// IsEmpty returns true if the ListResult contains no values. 15325func (vnglr VirtualNetworkGatewayListResult) IsEmpty() bool { 15326 return vnglr.Value == nil || len(*vnglr.Value) == 0 15327} 15328 15329// virtualNetworkGatewayListResultPreparer prepares a request to retrieve the next set of results. 15330// It returns nil if no more results exist. 15331func (vnglr VirtualNetworkGatewayListResult) virtualNetworkGatewayListResultPreparer(ctx context.Context) (*http.Request, error) { 15332 if vnglr.NextLink == nil || len(to.String(vnglr.NextLink)) < 1 { 15333 return nil, nil 15334 } 15335 return autorest.Prepare((&http.Request{}).WithContext(ctx), 15336 autorest.AsJSON(), 15337 autorest.AsGet(), 15338 autorest.WithBaseURL(to.String(vnglr.NextLink))) 15339} 15340 15341// VirtualNetworkGatewayListResultPage contains a page of VirtualNetworkGateway values. 15342type VirtualNetworkGatewayListResultPage struct { 15343 fn func(context.Context, VirtualNetworkGatewayListResult) (VirtualNetworkGatewayListResult, error) 15344 vnglr VirtualNetworkGatewayListResult 15345} 15346 15347// NextWithContext advances to the next page of values. If there was an error making 15348// the request the page does not advance and the error is returned. 15349func (page *VirtualNetworkGatewayListResultPage) NextWithContext(ctx context.Context) (err error) { 15350 if tracing.IsEnabled() { 15351 ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewayListResultPage.NextWithContext") 15352 defer func() { 15353 sc := -1 15354 if page.Response().Response.Response != nil { 15355 sc = page.Response().Response.Response.StatusCode 15356 } 15357 tracing.EndSpan(ctx, sc, err) 15358 }() 15359 } 15360 next, err := page.fn(ctx, page.vnglr) 15361 if err != nil { 15362 return err 15363 } 15364 page.vnglr = next 15365 return nil 15366} 15367 15368// Next advances to the next page of values. If there was an error making 15369// the request the page does not advance and the error is returned. 15370// Deprecated: Use NextWithContext() instead. 15371func (page *VirtualNetworkGatewayListResultPage) Next() error { 15372 return page.NextWithContext(context.Background()) 15373} 15374 15375// NotDone returns true if the page enumeration should be started or is not yet complete. 15376func (page VirtualNetworkGatewayListResultPage) NotDone() bool { 15377 return !page.vnglr.IsEmpty() 15378} 15379 15380// Response returns the raw server response from the last page request. 15381func (page VirtualNetworkGatewayListResultPage) Response() VirtualNetworkGatewayListResult { 15382 return page.vnglr 15383} 15384 15385// Values returns the slice of values for the current page or nil if there are no values. 15386func (page VirtualNetworkGatewayListResultPage) Values() []VirtualNetworkGateway { 15387 if page.vnglr.IsEmpty() { 15388 return nil 15389 } 15390 return *page.vnglr.Value 15391} 15392 15393// Creates a new instance of the VirtualNetworkGatewayListResultPage type. 15394func NewVirtualNetworkGatewayListResultPage(getNextPage func(context.Context, VirtualNetworkGatewayListResult) (VirtualNetworkGatewayListResult, error)) VirtualNetworkGatewayListResultPage { 15395 return VirtualNetworkGatewayListResultPage{fn: getNextPage} 15396} 15397 15398// VirtualNetworkGatewayPropertiesFormat virtualNetworkGateway properties 15399type VirtualNetworkGatewayPropertiesFormat struct { 15400 // IPConfigurations - IP configurations for virtual network gateway. 15401 IPConfigurations *[]VirtualNetworkGatewayIPConfiguration `json:"ipConfigurations,omitempty"` 15402 // GatewayType - The type of this virtual network gateway. Possible values are: 'Vpn' and 'ExpressRoute'. Possible values include: 'VirtualNetworkGatewayTypeVpn', 'VirtualNetworkGatewayTypeExpressRoute' 15403 GatewayType VirtualNetworkGatewayType `json:"gatewayType,omitempty"` 15404 // VpnType - The type of this virtual network gateway. Possible values are: 'PolicyBased' and 'RouteBased'. Possible values include: 'PolicyBased', 'RouteBased' 15405 VpnType VpnType `json:"vpnType,omitempty"` 15406 // EnableBgp - Whether BGP is enabled for this virtual network gateway or not. 15407 EnableBgp *bool `json:"enableBgp,omitempty"` 15408 // ActiveActive - ActiveActive flag 15409 ActiveActive *bool `json:"activeActive,omitempty"` 15410 // GatewayDefaultSite - 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. 15411 GatewayDefaultSite *SubResource `json:"gatewayDefaultSite,omitempty"` 15412 // Sku - The reference of the VirtualNetworkGatewaySku resource which represents the SKU selected for Virtual network gateway. 15413 Sku *VirtualNetworkGatewaySku `json:"sku,omitempty"` 15414 // VpnClientConfiguration - The reference of the VpnClientConfiguration resource which represents the P2S VpnClient configurations. 15415 VpnClientConfiguration *VpnClientConfiguration `json:"vpnClientConfiguration,omitempty"` 15416 // BgpSettings - Virtual network gateway's BGP speaker settings. 15417 BgpSettings *BgpSettings `json:"bgpSettings,omitempty"` 15418 // ResourceGUID - The resource GUID property of the VirtualNetworkGateway resource. 15419 ResourceGUID *string `json:"resourceGuid,omitempty"` 15420 // ProvisioningState - READ-ONLY; The provisioning state of the VirtualNetworkGateway resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. 15421 ProvisioningState *string `json:"provisioningState,omitempty"` 15422} 15423 15424// VirtualNetworkGatewaysCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a 15425// long-running operation. 15426type VirtualNetworkGatewaysCreateOrUpdateFuture struct { 15427 azure.Future 15428} 15429 15430// Result returns the result of the asynchronous operation. 15431// If the operation has not completed it will return an error. 15432func (future *VirtualNetworkGatewaysCreateOrUpdateFuture) Result(client VirtualNetworkGatewaysClient) (vng VirtualNetworkGateway, err error) { 15433 var done bool 15434 done, err = future.DoneWithContext(context.Background(), client) 15435 if err != nil { 15436 err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") 15437 return 15438 } 15439 if !done { 15440 err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysCreateOrUpdateFuture") 15441 return 15442 } 15443 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 15444 if vng.Response.Response, err = future.GetResult(sender); err == nil && vng.Response.Response.StatusCode != http.StatusNoContent { 15445 vng, err = client.CreateOrUpdateResponder(vng.Response.Response) 15446 if err != nil { 15447 err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysCreateOrUpdateFuture", "Result", vng.Response.Response, "Failure responding to request") 15448 } 15449 } 15450 return 15451} 15452 15453// VirtualNetworkGatewaysDeleteFuture an abstraction for monitoring and retrieving the results of a 15454// long-running operation. 15455type VirtualNetworkGatewaysDeleteFuture struct { 15456 azure.Future 15457} 15458 15459// Result returns the result of the asynchronous operation. 15460// If the operation has not completed it will return an error. 15461func (future *VirtualNetworkGatewaysDeleteFuture) Result(client VirtualNetworkGatewaysClient) (ar autorest.Response, err error) { 15462 var done bool 15463 done, err = future.DoneWithContext(context.Background(), client) 15464 if err != nil { 15465 err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysDeleteFuture", "Result", future.Response(), "Polling failure") 15466 return 15467 } 15468 if !done { 15469 err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysDeleteFuture") 15470 return 15471 } 15472 ar.Response = future.Response() 15473 return 15474} 15475 15476// VirtualNetworkGatewaysGeneratevpnclientpackageFuture an abstraction for monitoring and retrieving the 15477// results of a long-running operation. 15478type VirtualNetworkGatewaysGeneratevpnclientpackageFuture struct { 15479 azure.Future 15480} 15481 15482// Result returns the result of the asynchronous operation. 15483// If the operation has not completed it will return an error. 15484func (future *VirtualNetworkGatewaysGeneratevpnclientpackageFuture) Result(client VirtualNetworkGatewaysClient) (s String, err error) { 15485 var done bool 15486 done, err = future.DoneWithContext(context.Background(), client) 15487 if err != nil { 15488 err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGeneratevpnclientpackageFuture", "Result", future.Response(), "Polling failure") 15489 return 15490 } 15491 if !done { 15492 err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGeneratevpnclientpackageFuture") 15493 return 15494 } 15495 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 15496 if s.Response.Response, err = future.GetResult(sender); err == nil && s.Response.Response.StatusCode != http.StatusNoContent { 15497 s, err = client.GeneratevpnclientpackageResponder(s.Response.Response) 15498 if err != nil { 15499 err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGeneratevpnclientpackageFuture", "Result", s.Response.Response, "Failure responding to request") 15500 } 15501 } 15502 return 15503} 15504 15505// VirtualNetworkGatewaysGenerateVpnProfileFuture an abstraction for monitoring and retrieving the results 15506// of a long-running operation. 15507type VirtualNetworkGatewaysGenerateVpnProfileFuture struct { 15508 azure.Future 15509} 15510 15511// Result returns the result of the asynchronous operation. 15512// If the operation has not completed it will return an error. 15513func (future *VirtualNetworkGatewaysGenerateVpnProfileFuture) Result(client VirtualNetworkGatewaysClient) (s String, err error) { 15514 var done bool 15515 done, err = future.DoneWithContext(context.Background(), client) 15516 if err != nil { 15517 err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGenerateVpnProfileFuture", "Result", future.Response(), "Polling failure") 15518 return 15519 } 15520 if !done { 15521 err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGenerateVpnProfileFuture") 15522 return 15523 } 15524 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 15525 if s.Response.Response, err = future.GetResult(sender); err == nil && s.Response.Response.StatusCode != http.StatusNoContent { 15526 s, err = client.GenerateVpnProfileResponder(s.Response.Response) 15527 if err != nil { 15528 err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGenerateVpnProfileFuture", "Result", s.Response.Response, "Failure responding to request") 15529 } 15530 } 15531 return 15532} 15533 15534// VirtualNetworkGatewaysGetAdvertisedRoutesFuture an abstraction for monitoring and retrieving the results 15535// of a long-running operation. 15536type VirtualNetworkGatewaysGetAdvertisedRoutesFuture struct { 15537 azure.Future 15538} 15539 15540// Result returns the result of the asynchronous operation. 15541// If the operation has not completed it will return an error. 15542func (future *VirtualNetworkGatewaysGetAdvertisedRoutesFuture) Result(client VirtualNetworkGatewaysClient) (grlr GatewayRouteListResult, err error) { 15543 var done bool 15544 done, err = future.DoneWithContext(context.Background(), client) 15545 if err != nil { 15546 err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetAdvertisedRoutesFuture", "Result", future.Response(), "Polling failure") 15547 return 15548 } 15549 if !done { 15550 err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGetAdvertisedRoutesFuture") 15551 return 15552 } 15553 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 15554 if grlr.Response.Response, err = future.GetResult(sender); err == nil && grlr.Response.Response.StatusCode != http.StatusNoContent { 15555 grlr, err = client.GetAdvertisedRoutesResponder(grlr.Response.Response) 15556 if err != nil { 15557 err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetAdvertisedRoutesFuture", "Result", grlr.Response.Response, "Failure responding to request") 15558 } 15559 } 15560 return 15561} 15562 15563// VirtualNetworkGatewaysGetBgpPeerStatusFuture an abstraction for monitoring and retrieving the results of 15564// a long-running operation. 15565type VirtualNetworkGatewaysGetBgpPeerStatusFuture struct { 15566 azure.Future 15567} 15568 15569// Result returns the result of the asynchronous operation. 15570// If the operation has not completed it will return an error. 15571func (future *VirtualNetworkGatewaysGetBgpPeerStatusFuture) Result(client VirtualNetworkGatewaysClient) (bpslr BgpPeerStatusListResult, err error) { 15572 var done bool 15573 done, err = future.DoneWithContext(context.Background(), client) 15574 if err != nil { 15575 err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetBgpPeerStatusFuture", "Result", future.Response(), "Polling failure") 15576 return 15577 } 15578 if !done { 15579 err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGetBgpPeerStatusFuture") 15580 return 15581 } 15582 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 15583 if bpslr.Response.Response, err = future.GetResult(sender); err == nil && bpslr.Response.Response.StatusCode != http.StatusNoContent { 15584 bpslr, err = client.GetBgpPeerStatusResponder(bpslr.Response.Response) 15585 if err != nil { 15586 err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetBgpPeerStatusFuture", "Result", bpslr.Response.Response, "Failure responding to request") 15587 } 15588 } 15589 return 15590} 15591 15592// VirtualNetworkGatewaysGetLearnedRoutesFuture an abstraction for monitoring and retrieving the results of 15593// a long-running operation. 15594type VirtualNetworkGatewaysGetLearnedRoutesFuture struct { 15595 azure.Future 15596} 15597 15598// Result returns the result of the asynchronous operation. 15599// If the operation has not completed it will return an error. 15600func (future *VirtualNetworkGatewaysGetLearnedRoutesFuture) Result(client VirtualNetworkGatewaysClient) (grlr GatewayRouteListResult, err error) { 15601 var done bool 15602 done, err = future.DoneWithContext(context.Background(), client) 15603 if err != nil { 15604 err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetLearnedRoutesFuture", "Result", future.Response(), "Polling failure") 15605 return 15606 } 15607 if !done { 15608 err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGetLearnedRoutesFuture") 15609 return 15610 } 15611 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 15612 if grlr.Response.Response, err = future.GetResult(sender); err == nil && grlr.Response.Response.StatusCode != http.StatusNoContent { 15613 grlr, err = client.GetLearnedRoutesResponder(grlr.Response.Response) 15614 if err != nil { 15615 err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetLearnedRoutesFuture", "Result", grlr.Response.Response, "Failure responding to request") 15616 } 15617 } 15618 return 15619} 15620 15621// VirtualNetworkGatewaysGetVpnProfilePackageURLFuture an abstraction for monitoring and retrieving the 15622// results of a long-running operation. 15623type VirtualNetworkGatewaysGetVpnProfilePackageURLFuture struct { 15624 azure.Future 15625} 15626 15627// Result returns the result of the asynchronous operation. 15628// If the operation has not completed it will return an error. 15629func (future *VirtualNetworkGatewaysGetVpnProfilePackageURLFuture) Result(client VirtualNetworkGatewaysClient) (s String, err error) { 15630 var done bool 15631 done, err = future.DoneWithContext(context.Background(), client) 15632 if err != nil { 15633 err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetVpnProfilePackageURLFuture", "Result", future.Response(), "Polling failure") 15634 return 15635 } 15636 if !done { 15637 err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGetVpnProfilePackageURLFuture") 15638 return 15639 } 15640 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 15641 if s.Response.Response, err = future.GetResult(sender); err == nil && s.Response.Response.StatusCode != http.StatusNoContent { 15642 s, err = client.GetVpnProfilePackageURLResponder(s.Response.Response) 15643 if err != nil { 15644 err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetVpnProfilePackageURLFuture", "Result", s.Response.Response, "Failure responding to request") 15645 } 15646 } 15647 return 15648} 15649 15650// VirtualNetworkGatewaySku virtualNetworkGatewaySku details 15651type VirtualNetworkGatewaySku struct { 15652 // Name - Gateway SKU name. Possible values include: 'VirtualNetworkGatewaySkuNameBasic', 'VirtualNetworkGatewaySkuNameHighPerformance', 'VirtualNetworkGatewaySkuNameStandard', 'VirtualNetworkGatewaySkuNameUltraPerformance', 'VirtualNetworkGatewaySkuNameVpnGw1', 'VirtualNetworkGatewaySkuNameVpnGw2', 'VirtualNetworkGatewaySkuNameVpnGw3' 15653 Name VirtualNetworkGatewaySkuName `json:"name,omitempty"` 15654 // Tier - Gateway SKU tier. Possible values include: 'VirtualNetworkGatewaySkuTierBasic', 'VirtualNetworkGatewaySkuTierHighPerformance', 'VirtualNetworkGatewaySkuTierStandard', 'VirtualNetworkGatewaySkuTierUltraPerformance', 'VirtualNetworkGatewaySkuTierVpnGw1', 'VirtualNetworkGatewaySkuTierVpnGw2', 'VirtualNetworkGatewaySkuTierVpnGw3' 15655 Tier VirtualNetworkGatewaySkuTier `json:"tier,omitempty"` 15656 // Capacity - The capacity. 15657 Capacity *int32 `json:"capacity,omitempty"` 15658} 15659 15660// VirtualNetworkGatewaysResetFuture an abstraction for monitoring and retrieving the results of a 15661// long-running operation. 15662type VirtualNetworkGatewaysResetFuture struct { 15663 azure.Future 15664} 15665 15666// Result returns the result of the asynchronous operation. 15667// If the operation has not completed it will return an error. 15668func (future *VirtualNetworkGatewaysResetFuture) Result(client VirtualNetworkGatewaysClient) (vng VirtualNetworkGateway, err error) { 15669 var done bool 15670 done, err = future.DoneWithContext(context.Background(), client) 15671 if err != nil { 15672 err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysResetFuture", "Result", future.Response(), "Polling failure") 15673 return 15674 } 15675 if !done { 15676 err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysResetFuture") 15677 return 15678 } 15679 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 15680 if vng.Response.Response, err = future.GetResult(sender); err == nil && vng.Response.Response.StatusCode != http.StatusNoContent { 15681 vng, err = client.ResetResponder(vng.Response.Response) 15682 if err != nil { 15683 err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysResetFuture", "Result", vng.Response.Response, "Failure responding to request") 15684 } 15685 } 15686 return 15687} 15688 15689// VirtualNetworkGatewaysUpdateTagsFuture an abstraction for monitoring and retrieving the results of a 15690// long-running operation. 15691type VirtualNetworkGatewaysUpdateTagsFuture struct { 15692 azure.Future 15693} 15694 15695// Result returns the result of the asynchronous operation. 15696// If the operation has not completed it will return an error. 15697func (future *VirtualNetworkGatewaysUpdateTagsFuture) Result(client VirtualNetworkGatewaysClient) (vng VirtualNetworkGateway, err error) { 15698 var done bool 15699 done, err = future.DoneWithContext(context.Background(), client) 15700 if err != nil { 15701 err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysUpdateTagsFuture", "Result", future.Response(), "Polling failure") 15702 return 15703 } 15704 if !done { 15705 err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysUpdateTagsFuture") 15706 return 15707 } 15708 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 15709 if vng.Response.Response, err = future.GetResult(sender); err == nil && vng.Response.Response.StatusCode != http.StatusNoContent { 15710 vng, err = client.UpdateTagsResponder(vng.Response.Response) 15711 if err != nil { 15712 err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysUpdateTagsFuture", "Result", vng.Response.Response, "Failure responding to request") 15713 } 15714 } 15715 return 15716} 15717 15718// VirtualNetworkListResult response for the ListVirtualNetworks API service call. 15719type VirtualNetworkListResult struct { 15720 autorest.Response `json:"-"` 15721 // Value - Gets a list of VirtualNetwork resources in a resource group. 15722 Value *[]VirtualNetwork `json:"value,omitempty"` 15723 // NextLink - The URL to get the next set of results. 15724 NextLink *string `json:"nextLink,omitempty"` 15725} 15726 15727// VirtualNetworkListResultIterator provides access to a complete listing of VirtualNetwork values. 15728type VirtualNetworkListResultIterator struct { 15729 i int 15730 page VirtualNetworkListResultPage 15731} 15732 15733// NextWithContext advances to the next value. If there was an error making 15734// the request the iterator does not advance and the error is returned. 15735func (iter *VirtualNetworkListResultIterator) NextWithContext(ctx context.Context) (err error) { 15736 if tracing.IsEnabled() { 15737 ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkListResultIterator.NextWithContext") 15738 defer func() { 15739 sc := -1 15740 if iter.Response().Response.Response != nil { 15741 sc = iter.Response().Response.Response.StatusCode 15742 } 15743 tracing.EndSpan(ctx, sc, err) 15744 }() 15745 } 15746 iter.i++ 15747 if iter.i < len(iter.page.Values()) { 15748 return nil 15749 } 15750 err = iter.page.NextWithContext(ctx) 15751 if err != nil { 15752 iter.i-- 15753 return err 15754 } 15755 iter.i = 0 15756 return nil 15757} 15758 15759// Next advances to the next value. If there was an error making 15760// the request the iterator does not advance and the error is returned. 15761// Deprecated: Use NextWithContext() instead. 15762func (iter *VirtualNetworkListResultIterator) Next() error { 15763 return iter.NextWithContext(context.Background()) 15764} 15765 15766// NotDone returns true if the enumeration should be started or is not yet complete. 15767func (iter VirtualNetworkListResultIterator) NotDone() bool { 15768 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 15769} 15770 15771// Response returns the raw server response from the last page request. 15772func (iter VirtualNetworkListResultIterator) Response() VirtualNetworkListResult { 15773 return iter.page.Response() 15774} 15775 15776// Value returns the current value or a zero-initialized value if the 15777// iterator has advanced beyond the end of the collection. 15778func (iter VirtualNetworkListResultIterator) Value() VirtualNetwork { 15779 if !iter.page.NotDone() { 15780 return VirtualNetwork{} 15781 } 15782 return iter.page.Values()[iter.i] 15783} 15784 15785// Creates a new instance of the VirtualNetworkListResultIterator type. 15786func NewVirtualNetworkListResultIterator(page VirtualNetworkListResultPage) VirtualNetworkListResultIterator { 15787 return VirtualNetworkListResultIterator{page: page} 15788} 15789 15790// IsEmpty returns true if the ListResult contains no values. 15791func (vnlr VirtualNetworkListResult) IsEmpty() bool { 15792 return vnlr.Value == nil || len(*vnlr.Value) == 0 15793} 15794 15795// virtualNetworkListResultPreparer prepares a request to retrieve the next set of results. 15796// It returns nil if no more results exist. 15797func (vnlr VirtualNetworkListResult) virtualNetworkListResultPreparer(ctx context.Context) (*http.Request, error) { 15798 if vnlr.NextLink == nil || len(to.String(vnlr.NextLink)) < 1 { 15799 return nil, nil 15800 } 15801 return autorest.Prepare((&http.Request{}).WithContext(ctx), 15802 autorest.AsJSON(), 15803 autorest.AsGet(), 15804 autorest.WithBaseURL(to.String(vnlr.NextLink))) 15805} 15806 15807// VirtualNetworkListResultPage contains a page of VirtualNetwork values. 15808type VirtualNetworkListResultPage struct { 15809 fn func(context.Context, VirtualNetworkListResult) (VirtualNetworkListResult, error) 15810 vnlr VirtualNetworkListResult 15811} 15812 15813// NextWithContext advances to the next page of values. If there was an error making 15814// the request the page does not advance and the error is returned. 15815func (page *VirtualNetworkListResultPage) NextWithContext(ctx context.Context) (err error) { 15816 if tracing.IsEnabled() { 15817 ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkListResultPage.NextWithContext") 15818 defer func() { 15819 sc := -1 15820 if page.Response().Response.Response != nil { 15821 sc = page.Response().Response.Response.StatusCode 15822 } 15823 tracing.EndSpan(ctx, sc, err) 15824 }() 15825 } 15826 next, err := page.fn(ctx, page.vnlr) 15827 if err != nil { 15828 return err 15829 } 15830 page.vnlr = next 15831 return nil 15832} 15833 15834// Next advances to the next page of values. If there was an error making 15835// the request the page does not advance and the error is returned. 15836// Deprecated: Use NextWithContext() instead. 15837func (page *VirtualNetworkListResultPage) Next() error { 15838 return page.NextWithContext(context.Background()) 15839} 15840 15841// NotDone returns true if the page enumeration should be started or is not yet complete. 15842func (page VirtualNetworkListResultPage) NotDone() bool { 15843 return !page.vnlr.IsEmpty() 15844} 15845 15846// Response returns the raw server response from the last page request. 15847func (page VirtualNetworkListResultPage) Response() VirtualNetworkListResult { 15848 return page.vnlr 15849} 15850 15851// Values returns the slice of values for the current page or nil if there are no values. 15852func (page VirtualNetworkListResultPage) Values() []VirtualNetwork { 15853 if page.vnlr.IsEmpty() { 15854 return nil 15855 } 15856 return *page.vnlr.Value 15857} 15858 15859// Creates a new instance of the VirtualNetworkListResultPage type. 15860func NewVirtualNetworkListResultPage(getNextPage func(context.Context, VirtualNetworkListResult) (VirtualNetworkListResult, error)) VirtualNetworkListResultPage { 15861 return VirtualNetworkListResultPage{fn: getNextPage} 15862} 15863 15864// VirtualNetworkListUsageResult response for the virtual networks GetUsage API service call. 15865type VirtualNetworkListUsageResult struct { 15866 autorest.Response `json:"-"` 15867 // Value - READ-ONLY; VirtualNetwork usage stats. 15868 Value *[]VirtualNetworkUsage `json:"value,omitempty"` 15869 // NextLink - The URL to get the next set of results. 15870 NextLink *string `json:"nextLink,omitempty"` 15871} 15872 15873// VirtualNetworkListUsageResultIterator provides access to a complete listing of VirtualNetworkUsage 15874// values. 15875type VirtualNetworkListUsageResultIterator struct { 15876 i int 15877 page VirtualNetworkListUsageResultPage 15878} 15879 15880// NextWithContext advances to the next value. If there was an error making 15881// the request the iterator does not advance and the error is returned. 15882func (iter *VirtualNetworkListUsageResultIterator) NextWithContext(ctx context.Context) (err error) { 15883 if tracing.IsEnabled() { 15884 ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkListUsageResultIterator.NextWithContext") 15885 defer func() { 15886 sc := -1 15887 if iter.Response().Response.Response != nil { 15888 sc = iter.Response().Response.Response.StatusCode 15889 } 15890 tracing.EndSpan(ctx, sc, err) 15891 }() 15892 } 15893 iter.i++ 15894 if iter.i < len(iter.page.Values()) { 15895 return nil 15896 } 15897 err = iter.page.NextWithContext(ctx) 15898 if err != nil { 15899 iter.i-- 15900 return err 15901 } 15902 iter.i = 0 15903 return nil 15904} 15905 15906// Next advances to the next value. If there was an error making 15907// the request the iterator does not advance and the error is returned. 15908// Deprecated: Use NextWithContext() instead. 15909func (iter *VirtualNetworkListUsageResultIterator) Next() error { 15910 return iter.NextWithContext(context.Background()) 15911} 15912 15913// NotDone returns true if the enumeration should be started or is not yet complete. 15914func (iter VirtualNetworkListUsageResultIterator) NotDone() bool { 15915 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 15916} 15917 15918// Response returns the raw server response from the last page request. 15919func (iter VirtualNetworkListUsageResultIterator) Response() VirtualNetworkListUsageResult { 15920 return iter.page.Response() 15921} 15922 15923// Value returns the current value or a zero-initialized value if the 15924// iterator has advanced beyond the end of the collection. 15925func (iter VirtualNetworkListUsageResultIterator) Value() VirtualNetworkUsage { 15926 if !iter.page.NotDone() { 15927 return VirtualNetworkUsage{} 15928 } 15929 return iter.page.Values()[iter.i] 15930} 15931 15932// Creates a new instance of the VirtualNetworkListUsageResultIterator type. 15933func NewVirtualNetworkListUsageResultIterator(page VirtualNetworkListUsageResultPage) VirtualNetworkListUsageResultIterator { 15934 return VirtualNetworkListUsageResultIterator{page: page} 15935} 15936 15937// IsEmpty returns true if the ListResult contains no values. 15938func (vnlur VirtualNetworkListUsageResult) IsEmpty() bool { 15939 return vnlur.Value == nil || len(*vnlur.Value) == 0 15940} 15941 15942// virtualNetworkListUsageResultPreparer prepares a request to retrieve the next set of results. 15943// It returns nil if no more results exist. 15944func (vnlur VirtualNetworkListUsageResult) virtualNetworkListUsageResultPreparer(ctx context.Context) (*http.Request, error) { 15945 if vnlur.NextLink == nil || len(to.String(vnlur.NextLink)) < 1 { 15946 return nil, nil 15947 } 15948 return autorest.Prepare((&http.Request{}).WithContext(ctx), 15949 autorest.AsJSON(), 15950 autorest.AsGet(), 15951 autorest.WithBaseURL(to.String(vnlur.NextLink))) 15952} 15953 15954// VirtualNetworkListUsageResultPage contains a page of VirtualNetworkUsage values. 15955type VirtualNetworkListUsageResultPage struct { 15956 fn func(context.Context, VirtualNetworkListUsageResult) (VirtualNetworkListUsageResult, error) 15957 vnlur VirtualNetworkListUsageResult 15958} 15959 15960// NextWithContext advances to the next page of values. If there was an error making 15961// the request the page does not advance and the error is returned. 15962func (page *VirtualNetworkListUsageResultPage) NextWithContext(ctx context.Context) (err error) { 15963 if tracing.IsEnabled() { 15964 ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkListUsageResultPage.NextWithContext") 15965 defer func() { 15966 sc := -1 15967 if page.Response().Response.Response != nil { 15968 sc = page.Response().Response.Response.StatusCode 15969 } 15970 tracing.EndSpan(ctx, sc, err) 15971 }() 15972 } 15973 next, err := page.fn(ctx, page.vnlur) 15974 if err != nil { 15975 return err 15976 } 15977 page.vnlur = next 15978 return nil 15979} 15980 15981// Next advances to the next page of values. If there was an error making 15982// the request the page does not advance and the error is returned. 15983// Deprecated: Use NextWithContext() instead. 15984func (page *VirtualNetworkListUsageResultPage) Next() error { 15985 return page.NextWithContext(context.Background()) 15986} 15987 15988// NotDone returns true if the page enumeration should be started or is not yet complete. 15989func (page VirtualNetworkListUsageResultPage) NotDone() bool { 15990 return !page.vnlur.IsEmpty() 15991} 15992 15993// Response returns the raw server response from the last page request. 15994func (page VirtualNetworkListUsageResultPage) Response() VirtualNetworkListUsageResult { 15995 return page.vnlur 15996} 15997 15998// Values returns the slice of values for the current page or nil if there are no values. 15999func (page VirtualNetworkListUsageResultPage) Values() []VirtualNetworkUsage { 16000 if page.vnlur.IsEmpty() { 16001 return nil 16002 } 16003 return *page.vnlur.Value 16004} 16005 16006// Creates a new instance of the VirtualNetworkListUsageResultPage type. 16007func NewVirtualNetworkListUsageResultPage(getNextPage func(context.Context, VirtualNetworkListUsageResult) (VirtualNetworkListUsageResult, error)) VirtualNetworkListUsageResultPage { 16008 return VirtualNetworkListUsageResultPage{fn: getNextPage} 16009} 16010 16011// VirtualNetworkPeering peerings in a virtual network resource. 16012type VirtualNetworkPeering struct { 16013 autorest.Response `json:"-"` 16014 // VirtualNetworkPeeringPropertiesFormat - Properties of the virtual network peering. 16015 *VirtualNetworkPeeringPropertiesFormat `json:"properties,omitempty"` 16016 // Name - The name of the resource that is unique within a resource group. This name can be used to access the resource. 16017 Name *string `json:"name,omitempty"` 16018 // Etag - A unique read-only string that changes whenever the resource is updated. 16019 Etag *string `json:"etag,omitempty"` 16020 // ID - Resource ID. 16021 ID *string `json:"id,omitempty"` 16022} 16023 16024// MarshalJSON is the custom marshaler for VirtualNetworkPeering. 16025func (vnp VirtualNetworkPeering) MarshalJSON() ([]byte, error) { 16026 objectMap := make(map[string]interface{}) 16027 if vnp.VirtualNetworkPeeringPropertiesFormat != nil { 16028 objectMap["properties"] = vnp.VirtualNetworkPeeringPropertiesFormat 16029 } 16030 if vnp.Name != nil { 16031 objectMap["name"] = vnp.Name 16032 } 16033 if vnp.Etag != nil { 16034 objectMap["etag"] = vnp.Etag 16035 } 16036 if vnp.ID != nil { 16037 objectMap["id"] = vnp.ID 16038 } 16039 return json.Marshal(objectMap) 16040} 16041 16042// UnmarshalJSON is the custom unmarshaler for VirtualNetworkPeering struct. 16043func (vnp *VirtualNetworkPeering) UnmarshalJSON(body []byte) error { 16044 var m map[string]*json.RawMessage 16045 err := json.Unmarshal(body, &m) 16046 if err != nil { 16047 return err 16048 } 16049 for k, v := range m { 16050 switch k { 16051 case "properties": 16052 if v != nil { 16053 var virtualNetworkPeeringPropertiesFormat VirtualNetworkPeeringPropertiesFormat 16054 err = json.Unmarshal(*v, &virtualNetworkPeeringPropertiesFormat) 16055 if err != nil { 16056 return err 16057 } 16058 vnp.VirtualNetworkPeeringPropertiesFormat = &virtualNetworkPeeringPropertiesFormat 16059 } 16060 case "name": 16061 if v != nil { 16062 var name string 16063 err = json.Unmarshal(*v, &name) 16064 if err != nil { 16065 return err 16066 } 16067 vnp.Name = &name 16068 } 16069 case "etag": 16070 if v != nil { 16071 var etag string 16072 err = json.Unmarshal(*v, &etag) 16073 if err != nil { 16074 return err 16075 } 16076 vnp.Etag = &etag 16077 } 16078 case "id": 16079 if v != nil { 16080 var ID string 16081 err = json.Unmarshal(*v, &ID) 16082 if err != nil { 16083 return err 16084 } 16085 vnp.ID = &ID 16086 } 16087 } 16088 } 16089 16090 return nil 16091} 16092 16093// VirtualNetworkPeeringListResult response for ListSubnets API service call. Retrieves all subnets that 16094// belong to a virtual network. 16095type VirtualNetworkPeeringListResult struct { 16096 autorest.Response `json:"-"` 16097 // Value - The peerings in a virtual network. 16098 Value *[]VirtualNetworkPeering `json:"value,omitempty"` 16099 // NextLink - The URL to get the next set of results. 16100 NextLink *string `json:"nextLink,omitempty"` 16101} 16102 16103// VirtualNetworkPeeringListResultIterator provides access to a complete listing of VirtualNetworkPeering 16104// values. 16105type VirtualNetworkPeeringListResultIterator struct { 16106 i int 16107 page VirtualNetworkPeeringListResultPage 16108} 16109 16110// NextWithContext advances to the next value. If there was an error making 16111// the request the iterator does not advance and the error is returned. 16112func (iter *VirtualNetworkPeeringListResultIterator) NextWithContext(ctx context.Context) (err error) { 16113 if tracing.IsEnabled() { 16114 ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkPeeringListResultIterator.NextWithContext") 16115 defer func() { 16116 sc := -1 16117 if iter.Response().Response.Response != nil { 16118 sc = iter.Response().Response.Response.StatusCode 16119 } 16120 tracing.EndSpan(ctx, sc, err) 16121 }() 16122 } 16123 iter.i++ 16124 if iter.i < len(iter.page.Values()) { 16125 return nil 16126 } 16127 err = iter.page.NextWithContext(ctx) 16128 if err != nil { 16129 iter.i-- 16130 return err 16131 } 16132 iter.i = 0 16133 return nil 16134} 16135 16136// Next advances to the next value. If there was an error making 16137// the request the iterator does not advance and the error is returned. 16138// Deprecated: Use NextWithContext() instead. 16139func (iter *VirtualNetworkPeeringListResultIterator) Next() error { 16140 return iter.NextWithContext(context.Background()) 16141} 16142 16143// NotDone returns true if the enumeration should be started or is not yet complete. 16144func (iter VirtualNetworkPeeringListResultIterator) NotDone() bool { 16145 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 16146} 16147 16148// Response returns the raw server response from the last page request. 16149func (iter VirtualNetworkPeeringListResultIterator) Response() VirtualNetworkPeeringListResult { 16150 return iter.page.Response() 16151} 16152 16153// Value returns the current value or a zero-initialized value if the 16154// iterator has advanced beyond the end of the collection. 16155func (iter VirtualNetworkPeeringListResultIterator) Value() VirtualNetworkPeering { 16156 if !iter.page.NotDone() { 16157 return VirtualNetworkPeering{} 16158 } 16159 return iter.page.Values()[iter.i] 16160} 16161 16162// Creates a new instance of the VirtualNetworkPeeringListResultIterator type. 16163func NewVirtualNetworkPeeringListResultIterator(page VirtualNetworkPeeringListResultPage) VirtualNetworkPeeringListResultIterator { 16164 return VirtualNetworkPeeringListResultIterator{page: page} 16165} 16166 16167// IsEmpty returns true if the ListResult contains no values. 16168func (vnplr VirtualNetworkPeeringListResult) IsEmpty() bool { 16169 return vnplr.Value == nil || len(*vnplr.Value) == 0 16170} 16171 16172// virtualNetworkPeeringListResultPreparer prepares a request to retrieve the next set of results. 16173// It returns nil if no more results exist. 16174func (vnplr VirtualNetworkPeeringListResult) virtualNetworkPeeringListResultPreparer(ctx context.Context) (*http.Request, error) { 16175 if vnplr.NextLink == nil || len(to.String(vnplr.NextLink)) < 1 { 16176 return nil, nil 16177 } 16178 return autorest.Prepare((&http.Request{}).WithContext(ctx), 16179 autorest.AsJSON(), 16180 autorest.AsGet(), 16181 autorest.WithBaseURL(to.String(vnplr.NextLink))) 16182} 16183 16184// VirtualNetworkPeeringListResultPage contains a page of VirtualNetworkPeering values. 16185type VirtualNetworkPeeringListResultPage struct { 16186 fn func(context.Context, VirtualNetworkPeeringListResult) (VirtualNetworkPeeringListResult, error) 16187 vnplr VirtualNetworkPeeringListResult 16188} 16189 16190// NextWithContext advances to the next page of values. If there was an error making 16191// the request the page does not advance and the error is returned. 16192func (page *VirtualNetworkPeeringListResultPage) NextWithContext(ctx context.Context) (err error) { 16193 if tracing.IsEnabled() { 16194 ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkPeeringListResultPage.NextWithContext") 16195 defer func() { 16196 sc := -1 16197 if page.Response().Response.Response != nil { 16198 sc = page.Response().Response.Response.StatusCode 16199 } 16200 tracing.EndSpan(ctx, sc, err) 16201 }() 16202 } 16203 next, err := page.fn(ctx, page.vnplr) 16204 if err != nil { 16205 return err 16206 } 16207 page.vnplr = next 16208 return nil 16209} 16210 16211// Next advances to the next page of values. If there was an error making 16212// the request the page does not advance and the error is returned. 16213// Deprecated: Use NextWithContext() instead. 16214func (page *VirtualNetworkPeeringListResultPage) Next() error { 16215 return page.NextWithContext(context.Background()) 16216} 16217 16218// NotDone returns true if the page enumeration should be started or is not yet complete. 16219func (page VirtualNetworkPeeringListResultPage) NotDone() bool { 16220 return !page.vnplr.IsEmpty() 16221} 16222 16223// Response returns the raw server response from the last page request. 16224func (page VirtualNetworkPeeringListResultPage) Response() VirtualNetworkPeeringListResult { 16225 return page.vnplr 16226} 16227 16228// Values returns the slice of values for the current page or nil if there are no values. 16229func (page VirtualNetworkPeeringListResultPage) Values() []VirtualNetworkPeering { 16230 if page.vnplr.IsEmpty() { 16231 return nil 16232 } 16233 return *page.vnplr.Value 16234} 16235 16236// Creates a new instance of the VirtualNetworkPeeringListResultPage type. 16237func NewVirtualNetworkPeeringListResultPage(getNextPage func(context.Context, VirtualNetworkPeeringListResult) (VirtualNetworkPeeringListResult, error)) VirtualNetworkPeeringListResultPage { 16238 return VirtualNetworkPeeringListResultPage{fn: getNextPage} 16239} 16240 16241// VirtualNetworkPeeringPropertiesFormat properties of the virtual network peering. 16242type VirtualNetworkPeeringPropertiesFormat struct { 16243 // AllowVirtualNetworkAccess - Whether the VMs in the linked virtual network space would be able to access all the VMs in local Virtual network space. 16244 AllowVirtualNetworkAccess *bool `json:"allowVirtualNetworkAccess,omitempty"` 16245 // AllowForwardedTraffic - Whether the forwarded traffic from the VMs in the remote virtual network will be allowed/disallowed. 16246 AllowForwardedTraffic *bool `json:"allowForwardedTraffic,omitempty"` 16247 // AllowGatewayTransit - If gateway links can be used in remote virtual networking to link to this virtual network. 16248 AllowGatewayTransit *bool `json:"allowGatewayTransit,omitempty"` 16249 // UseRemoteGateways - If remote gateways can be used on this virtual network. If the flag is set to true, and allowGatewayTransit on remote peering is also true, virtual network will use gateways of remote virtual network for transit. Only one peering can have this flag set to true. This flag cannot be set if virtual network already has a gateway. 16250 UseRemoteGateways *bool `json:"useRemoteGateways,omitempty"` 16251 // RemoteVirtualNetwork - The reference of the remote virtual network. The remote virtual network can be in the same or different region (preview). See here to register for the preview and learn more (https://docs.microsoft.com/en-us/azure/virtual-network/virtual-network-create-peering). 16252 RemoteVirtualNetwork *SubResource `json:"remoteVirtualNetwork,omitempty"` 16253 // RemoteAddressSpace - The reference of the remote virtual network address space. 16254 RemoteAddressSpace *AddressSpace `json:"remoteAddressSpace,omitempty"` 16255 // PeeringState - The status of the virtual network peering. Possible values are 'Initiated', 'Connected', and 'Disconnected'. Possible values include: 'Initiated', 'Connected', 'Disconnected' 16256 PeeringState VirtualNetworkPeeringState `json:"peeringState,omitempty"` 16257 // ProvisioningState - The provisioning state of the resource. 16258 ProvisioningState *string `json:"provisioningState,omitempty"` 16259} 16260 16261// VirtualNetworkPeeringsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a 16262// long-running operation. 16263type VirtualNetworkPeeringsCreateOrUpdateFuture struct { 16264 azure.Future 16265} 16266 16267// Result returns the result of the asynchronous operation. 16268// If the operation has not completed it will return an error. 16269func (future *VirtualNetworkPeeringsCreateOrUpdateFuture) Result(client VirtualNetworkPeeringsClient) (vnp VirtualNetworkPeering, err error) { 16270 var done bool 16271 done, err = future.DoneWithContext(context.Background(), client) 16272 if err != nil { 16273 err = autorest.NewErrorWithError(err, "network.VirtualNetworkPeeringsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") 16274 return 16275 } 16276 if !done { 16277 err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkPeeringsCreateOrUpdateFuture") 16278 return 16279 } 16280 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 16281 if vnp.Response.Response, err = future.GetResult(sender); err == nil && vnp.Response.Response.StatusCode != http.StatusNoContent { 16282 vnp, err = client.CreateOrUpdateResponder(vnp.Response.Response) 16283 if err != nil { 16284 err = autorest.NewErrorWithError(err, "network.VirtualNetworkPeeringsCreateOrUpdateFuture", "Result", vnp.Response.Response, "Failure responding to request") 16285 } 16286 } 16287 return 16288} 16289 16290// VirtualNetworkPeeringsDeleteFuture an abstraction for monitoring and retrieving the results of a 16291// long-running operation. 16292type VirtualNetworkPeeringsDeleteFuture struct { 16293 azure.Future 16294} 16295 16296// Result returns the result of the asynchronous operation. 16297// If the operation has not completed it will return an error. 16298func (future *VirtualNetworkPeeringsDeleteFuture) Result(client VirtualNetworkPeeringsClient) (ar autorest.Response, err error) { 16299 var done bool 16300 done, err = future.DoneWithContext(context.Background(), client) 16301 if err != nil { 16302 err = autorest.NewErrorWithError(err, "network.VirtualNetworkPeeringsDeleteFuture", "Result", future.Response(), "Polling failure") 16303 return 16304 } 16305 if !done { 16306 err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkPeeringsDeleteFuture") 16307 return 16308 } 16309 ar.Response = future.Response() 16310 return 16311} 16312 16313// VirtualNetworkPropertiesFormat properties of the virtual network. 16314type VirtualNetworkPropertiesFormat struct { 16315 // AddressSpace - The AddressSpace that contains an array of IP address ranges that can be used by subnets. 16316 AddressSpace *AddressSpace `json:"addressSpace,omitempty"` 16317 // DhcpOptions - The dhcpOptions that contains an array of DNS servers available to VMs deployed in the virtual network. 16318 DhcpOptions *DhcpOptions `json:"dhcpOptions,omitempty"` 16319 // Subnets - A list of subnets in a Virtual Network. 16320 Subnets *[]Subnet `json:"subnets,omitempty"` 16321 // VirtualNetworkPeerings - A list of peerings in a Virtual Network. 16322 VirtualNetworkPeerings *[]VirtualNetworkPeering `json:"virtualNetworkPeerings,omitempty"` 16323 // ResourceGUID - The resourceGuid property of the Virtual Network resource. 16324 ResourceGUID *string `json:"resourceGuid,omitempty"` 16325 // ProvisioningState - The provisioning state of the PublicIP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. 16326 ProvisioningState *string `json:"provisioningState,omitempty"` 16327 // EnableDdosProtection - Indicates if DDoS protection is enabled for all the protected resources in a Virtual Network. 16328 EnableDdosProtection *bool `json:"enableDdosProtection,omitempty"` 16329 // EnableVMProtection - Indicates if Vm protection is enabled for all the subnets in a Virtual Network. 16330 EnableVMProtection *bool `json:"enableVmProtection,omitempty"` 16331} 16332 16333// VirtualNetworksCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a 16334// long-running operation. 16335type VirtualNetworksCreateOrUpdateFuture struct { 16336 azure.Future 16337} 16338 16339// Result returns the result of the asynchronous operation. 16340// If the operation has not completed it will return an error. 16341func (future *VirtualNetworksCreateOrUpdateFuture) Result(client VirtualNetworksClient) (vn VirtualNetwork, err error) { 16342 var done bool 16343 done, err = future.DoneWithContext(context.Background(), client) 16344 if err != nil { 16345 err = autorest.NewErrorWithError(err, "network.VirtualNetworksCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") 16346 return 16347 } 16348 if !done { 16349 err = azure.NewAsyncOpIncompleteError("network.VirtualNetworksCreateOrUpdateFuture") 16350 return 16351 } 16352 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 16353 if vn.Response.Response, err = future.GetResult(sender); err == nil && vn.Response.Response.StatusCode != http.StatusNoContent { 16354 vn, err = client.CreateOrUpdateResponder(vn.Response.Response) 16355 if err != nil { 16356 err = autorest.NewErrorWithError(err, "network.VirtualNetworksCreateOrUpdateFuture", "Result", vn.Response.Response, "Failure responding to request") 16357 } 16358 } 16359 return 16360} 16361 16362// VirtualNetworksDeleteFuture an abstraction for monitoring and retrieving the results of a long-running 16363// operation. 16364type VirtualNetworksDeleteFuture struct { 16365 azure.Future 16366} 16367 16368// Result returns the result of the asynchronous operation. 16369// If the operation has not completed it will return an error. 16370func (future *VirtualNetworksDeleteFuture) Result(client VirtualNetworksClient) (ar autorest.Response, err error) { 16371 var done bool 16372 done, err = future.DoneWithContext(context.Background(), client) 16373 if err != nil { 16374 err = autorest.NewErrorWithError(err, "network.VirtualNetworksDeleteFuture", "Result", future.Response(), "Polling failure") 16375 return 16376 } 16377 if !done { 16378 err = azure.NewAsyncOpIncompleteError("network.VirtualNetworksDeleteFuture") 16379 return 16380 } 16381 ar.Response = future.Response() 16382 return 16383} 16384 16385// VirtualNetworksUpdateTagsFuture an abstraction for monitoring and retrieving the results of a 16386// long-running operation. 16387type VirtualNetworksUpdateTagsFuture struct { 16388 azure.Future 16389} 16390 16391// Result returns the result of the asynchronous operation. 16392// If the operation has not completed it will return an error. 16393func (future *VirtualNetworksUpdateTagsFuture) Result(client VirtualNetworksClient) (vn VirtualNetwork, err error) { 16394 var done bool 16395 done, err = future.DoneWithContext(context.Background(), client) 16396 if err != nil { 16397 err = autorest.NewErrorWithError(err, "network.VirtualNetworksUpdateTagsFuture", "Result", future.Response(), "Polling failure") 16398 return 16399 } 16400 if !done { 16401 err = azure.NewAsyncOpIncompleteError("network.VirtualNetworksUpdateTagsFuture") 16402 return 16403 } 16404 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 16405 if vn.Response.Response, err = future.GetResult(sender); err == nil && vn.Response.Response.StatusCode != http.StatusNoContent { 16406 vn, err = client.UpdateTagsResponder(vn.Response.Response) 16407 if err != nil { 16408 err = autorest.NewErrorWithError(err, "network.VirtualNetworksUpdateTagsFuture", "Result", vn.Response.Response, "Failure responding to request") 16409 } 16410 } 16411 return 16412} 16413 16414// VirtualNetworkUsage usage details for subnet. 16415type VirtualNetworkUsage struct { 16416 // CurrentValue - READ-ONLY; Indicates number of IPs used from the Subnet. 16417 CurrentValue *float64 `json:"currentValue,omitempty"` 16418 // ID - READ-ONLY; Subnet identifier. 16419 ID *string `json:"id,omitempty"` 16420 // Limit - READ-ONLY; Indicates the size of the subnet. 16421 Limit *float64 `json:"limit,omitempty"` 16422 // Name - READ-ONLY; The name containing common and localized value for usage. 16423 Name *VirtualNetworkUsageName `json:"name,omitempty"` 16424 // Unit - READ-ONLY; Usage units. Returns 'Count' 16425 Unit *string `json:"unit,omitempty"` 16426} 16427 16428// VirtualNetworkUsageName usage strings container. 16429type VirtualNetworkUsageName struct { 16430 // LocalizedValue - READ-ONLY; Localized subnet size and usage string. 16431 LocalizedValue *string `json:"localizedValue,omitempty"` 16432 // Value - READ-ONLY; Subnet size and usage string. 16433 Value *string `json:"value,omitempty"` 16434} 16435 16436// VpnClientConfiguration vpnClientConfiguration for P2S client. 16437type VpnClientConfiguration struct { 16438 // VpnClientAddressPool - The reference of the address space resource which represents Address space for P2S VpnClient. 16439 VpnClientAddressPool *AddressSpace `json:"vpnClientAddressPool,omitempty"` 16440 // VpnClientRootCertificates - VpnClientRootCertificate for virtual network gateway. 16441 VpnClientRootCertificates *[]VpnClientRootCertificate `json:"vpnClientRootCertificates,omitempty"` 16442 // VpnClientRevokedCertificates - VpnClientRevokedCertificate for Virtual network gateway. 16443 VpnClientRevokedCertificates *[]VpnClientRevokedCertificate `json:"vpnClientRevokedCertificates,omitempty"` 16444 // VpnClientProtocols - VpnClientProtocols for Virtual network gateway. 16445 VpnClientProtocols *[]VpnClientProtocol `json:"vpnClientProtocols,omitempty"` 16446 // RadiusServerAddress - The radius server address property of the VirtualNetworkGateway resource for vpn client connection. 16447 RadiusServerAddress *string `json:"radiusServerAddress,omitempty"` 16448 // RadiusServerSecret - The radius secret property of the VirtualNetworkGateway resource for vpn client connection. 16449 RadiusServerSecret *string `json:"radiusServerSecret,omitempty"` 16450} 16451 16452// VpnClientParameters vpn Client Parameters for package generation 16453type VpnClientParameters struct { 16454 // ProcessorArchitecture - VPN client Processor Architecture. Possible values are: 'AMD64' and 'X86'. Possible values include: 'Amd64', 'X86' 16455 ProcessorArchitecture ProcessorArchitecture `json:"processorArchitecture,omitempty"` 16456 // AuthenticationMethod - VPN client Authentication Method. Possible values are: 'EAPTLS' and 'EAPMSCHAPv2'. Possible values include: 'EAPTLS', 'EAPMSCHAPv2' 16457 AuthenticationMethod AuthenticationMethod `json:"authenticationMethod,omitempty"` 16458 // RadiusServerAuthCertificate - The public certificate data for the radius server authentication certificate as a Base-64 encoded string. Required only if external radius authentication has been configured with EAPTLS authentication. 16459 RadiusServerAuthCertificate *string `json:"radiusServerAuthCertificate,omitempty"` 16460 // ClientRootCertificates - A list of client root certificates public certificate data encoded as Base-64 strings. Optional parameter for external radius based authentication with EAPTLS. 16461 ClientRootCertificates *[]string `json:"clientRootCertificates,omitempty"` 16462} 16463 16464// VpnClientRevokedCertificate VPN client revoked certificate of virtual network gateway. 16465type VpnClientRevokedCertificate struct { 16466 // VpnClientRevokedCertificatePropertiesFormat - Properties of the vpn client revoked certificate. 16467 *VpnClientRevokedCertificatePropertiesFormat `json:"properties,omitempty"` 16468 // Name - The name of the resource that is unique within a resource group. This name can be used to access the resource. 16469 Name *string `json:"name,omitempty"` 16470 // Etag - A unique read-only string that changes whenever the resource is updated. 16471 Etag *string `json:"etag,omitempty"` 16472 // ID - Resource ID. 16473 ID *string `json:"id,omitempty"` 16474} 16475 16476// MarshalJSON is the custom marshaler for VpnClientRevokedCertificate. 16477func (vcrc VpnClientRevokedCertificate) MarshalJSON() ([]byte, error) { 16478 objectMap := make(map[string]interface{}) 16479 if vcrc.VpnClientRevokedCertificatePropertiesFormat != nil { 16480 objectMap["properties"] = vcrc.VpnClientRevokedCertificatePropertiesFormat 16481 } 16482 if vcrc.Name != nil { 16483 objectMap["name"] = vcrc.Name 16484 } 16485 if vcrc.Etag != nil { 16486 objectMap["etag"] = vcrc.Etag 16487 } 16488 if vcrc.ID != nil { 16489 objectMap["id"] = vcrc.ID 16490 } 16491 return json.Marshal(objectMap) 16492} 16493 16494// UnmarshalJSON is the custom unmarshaler for VpnClientRevokedCertificate struct. 16495func (vcrc *VpnClientRevokedCertificate) UnmarshalJSON(body []byte) error { 16496 var m map[string]*json.RawMessage 16497 err := json.Unmarshal(body, &m) 16498 if err != nil { 16499 return err 16500 } 16501 for k, v := range m { 16502 switch k { 16503 case "properties": 16504 if v != nil { 16505 var vpnClientRevokedCertificatePropertiesFormat VpnClientRevokedCertificatePropertiesFormat 16506 err = json.Unmarshal(*v, &vpnClientRevokedCertificatePropertiesFormat) 16507 if err != nil { 16508 return err 16509 } 16510 vcrc.VpnClientRevokedCertificatePropertiesFormat = &vpnClientRevokedCertificatePropertiesFormat 16511 } 16512 case "name": 16513 if v != nil { 16514 var name string 16515 err = json.Unmarshal(*v, &name) 16516 if err != nil { 16517 return err 16518 } 16519 vcrc.Name = &name 16520 } 16521 case "etag": 16522 if v != nil { 16523 var etag string 16524 err = json.Unmarshal(*v, &etag) 16525 if err != nil { 16526 return err 16527 } 16528 vcrc.Etag = &etag 16529 } 16530 case "id": 16531 if v != nil { 16532 var ID string 16533 err = json.Unmarshal(*v, &ID) 16534 if err != nil { 16535 return err 16536 } 16537 vcrc.ID = &ID 16538 } 16539 } 16540 } 16541 16542 return nil 16543} 16544 16545// VpnClientRevokedCertificatePropertiesFormat properties of the revoked VPN client certificate of virtual 16546// network gateway. 16547type VpnClientRevokedCertificatePropertiesFormat struct { 16548 // Thumbprint - The revoked VPN client certificate thumbprint. 16549 Thumbprint *string `json:"thumbprint,omitempty"` 16550 // ProvisioningState - READ-ONLY; The provisioning state of the VPN client revoked certificate resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. 16551 ProvisioningState *string `json:"provisioningState,omitempty"` 16552} 16553 16554// VpnClientRootCertificate VPN client root certificate of virtual network gateway 16555type VpnClientRootCertificate struct { 16556 // VpnClientRootCertificatePropertiesFormat - Properties of the vpn client root certificate. 16557 *VpnClientRootCertificatePropertiesFormat `json:"properties,omitempty"` 16558 // Name - The name of the resource that is unique within a resource group. This name can be used to access the resource. 16559 Name *string `json:"name,omitempty"` 16560 // Etag - A unique read-only string that changes whenever the resource is updated. 16561 Etag *string `json:"etag,omitempty"` 16562 // ID - Resource ID. 16563 ID *string `json:"id,omitempty"` 16564} 16565 16566// MarshalJSON is the custom marshaler for VpnClientRootCertificate. 16567func (vcrc VpnClientRootCertificate) MarshalJSON() ([]byte, error) { 16568 objectMap := make(map[string]interface{}) 16569 if vcrc.VpnClientRootCertificatePropertiesFormat != nil { 16570 objectMap["properties"] = vcrc.VpnClientRootCertificatePropertiesFormat 16571 } 16572 if vcrc.Name != nil { 16573 objectMap["name"] = vcrc.Name 16574 } 16575 if vcrc.Etag != nil { 16576 objectMap["etag"] = vcrc.Etag 16577 } 16578 if vcrc.ID != nil { 16579 objectMap["id"] = vcrc.ID 16580 } 16581 return json.Marshal(objectMap) 16582} 16583 16584// UnmarshalJSON is the custom unmarshaler for VpnClientRootCertificate struct. 16585func (vcrc *VpnClientRootCertificate) UnmarshalJSON(body []byte) error { 16586 var m map[string]*json.RawMessage 16587 err := json.Unmarshal(body, &m) 16588 if err != nil { 16589 return err 16590 } 16591 for k, v := range m { 16592 switch k { 16593 case "properties": 16594 if v != nil { 16595 var vpnClientRootCertificatePropertiesFormat VpnClientRootCertificatePropertiesFormat 16596 err = json.Unmarshal(*v, &vpnClientRootCertificatePropertiesFormat) 16597 if err != nil { 16598 return err 16599 } 16600 vcrc.VpnClientRootCertificatePropertiesFormat = &vpnClientRootCertificatePropertiesFormat 16601 } 16602 case "name": 16603 if v != nil { 16604 var name string 16605 err = json.Unmarshal(*v, &name) 16606 if err != nil { 16607 return err 16608 } 16609 vcrc.Name = &name 16610 } 16611 case "etag": 16612 if v != nil { 16613 var etag string 16614 err = json.Unmarshal(*v, &etag) 16615 if err != nil { 16616 return err 16617 } 16618 vcrc.Etag = &etag 16619 } 16620 case "id": 16621 if v != nil { 16622 var ID string 16623 err = json.Unmarshal(*v, &ID) 16624 if err != nil { 16625 return err 16626 } 16627 vcrc.ID = &ID 16628 } 16629 } 16630 } 16631 16632 return nil 16633} 16634 16635// VpnClientRootCertificatePropertiesFormat properties of SSL certificates of application gateway 16636type VpnClientRootCertificatePropertiesFormat struct { 16637 // PublicCertData - The certificate public data. 16638 PublicCertData *string `json:"publicCertData,omitempty"` 16639 // ProvisioningState - READ-ONLY; The provisioning state of the VPN client root certificate resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. 16640 ProvisioningState *string `json:"provisioningState,omitempty"` 16641} 16642 16643// VpnDeviceScriptParameters vpn device configuration script generation parameters 16644type VpnDeviceScriptParameters struct { 16645 // Vendor - The vendor for the vpn device. 16646 Vendor *string `json:"vendor,omitempty"` 16647 // DeviceFamily - The device family for the vpn device. 16648 DeviceFamily *string `json:"deviceFamily,omitempty"` 16649 // FirmwareVersion - The firmware version for the vpn device. 16650 FirmwareVersion *string `json:"firmwareVersion,omitempty"` 16651} 16652 16653// Watcher network watcher in a resource group. 16654type Watcher struct { 16655 autorest.Response `json:"-"` 16656 // Etag - A unique read-only string that changes whenever the resource is updated. 16657 Etag *string `json:"etag,omitempty"` 16658 *WatcherPropertiesFormat `json:"properties,omitempty"` 16659 // ID - Resource ID. 16660 ID *string `json:"id,omitempty"` 16661 // Name - READ-ONLY; Resource name. 16662 Name *string `json:"name,omitempty"` 16663 // Type - READ-ONLY; Resource type. 16664 Type *string `json:"type,omitempty"` 16665 // Location - Resource location. 16666 Location *string `json:"location,omitempty"` 16667 // Tags - Resource tags. 16668 Tags map[string]*string `json:"tags"` 16669} 16670 16671// MarshalJSON is the custom marshaler for Watcher. 16672func (w Watcher) MarshalJSON() ([]byte, error) { 16673 objectMap := make(map[string]interface{}) 16674 if w.Etag != nil { 16675 objectMap["etag"] = w.Etag 16676 } 16677 if w.WatcherPropertiesFormat != nil { 16678 objectMap["properties"] = w.WatcherPropertiesFormat 16679 } 16680 if w.ID != nil { 16681 objectMap["id"] = w.ID 16682 } 16683 if w.Location != nil { 16684 objectMap["location"] = w.Location 16685 } 16686 if w.Tags != nil { 16687 objectMap["tags"] = w.Tags 16688 } 16689 return json.Marshal(objectMap) 16690} 16691 16692// UnmarshalJSON is the custom unmarshaler for Watcher struct. 16693func (w *Watcher) UnmarshalJSON(body []byte) error { 16694 var m map[string]*json.RawMessage 16695 err := json.Unmarshal(body, &m) 16696 if err != nil { 16697 return err 16698 } 16699 for k, v := range m { 16700 switch k { 16701 case "etag": 16702 if v != nil { 16703 var etag string 16704 err = json.Unmarshal(*v, &etag) 16705 if err != nil { 16706 return err 16707 } 16708 w.Etag = &etag 16709 } 16710 case "properties": 16711 if v != nil { 16712 var watcherPropertiesFormat WatcherPropertiesFormat 16713 err = json.Unmarshal(*v, &watcherPropertiesFormat) 16714 if err != nil { 16715 return err 16716 } 16717 w.WatcherPropertiesFormat = &watcherPropertiesFormat 16718 } 16719 case "id": 16720 if v != nil { 16721 var ID string 16722 err = json.Unmarshal(*v, &ID) 16723 if err != nil { 16724 return err 16725 } 16726 w.ID = &ID 16727 } 16728 case "name": 16729 if v != nil { 16730 var name string 16731 err = json.Unmarshal(*v, &name) 16732 if err != nil { 16733 return err 16734 } 16735 w.Name = &name 16736 } 16737 case "type": 16738 if v != nil { 16739 var typeVar string 16740 err = json.Unmarshal(*v, &typeVar) 16741 if err != nil { 16742 return err 16743 } 16744 w.Type = &typeVar 16745 } 16746 case "location": 16747 if v != nil { 16748 var location string 16749 err = json.Unmarshal(*v, &location) 16750 if err != nil { 16751 return err 16752 } 16753 w.Location = &location 16754 } 16755 case "tags": 16756 if v != nil { 16757 var tags map[string]*string 16758 err = json.Unmarshal(*v, &tags) 16759 if err != nil { 16760 return err 16761 } 16762 w.Tags = tags 16763 } 16764 } 16765 } 16766 16767 return nil 16768} 16769 16770// WatcherListResult list of network watcher resources. 16771type WatcherListResult struct { 16772 autorest.Response `json:"-"` 16773 Value *[]Watcher `json:"value,omitempty"` 16774} 16775 16776// WatcherPropertiesFormat the network watcher properties. 16777type WatcherPropertiesFormat struct { 16778 // ProvisioningState - READ-ONLY; The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed' 16779 ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` 16780} 16781 16782// WatchersCheckConnectivityFuture an abstraction for monitoring and retrieving the results of a 16783// long-running operation. 16784type WatchersCheckConnectivityFuture struct { 16785 azure.Future 16786} 16787 16788// Result returns the result of the asynchronous operation. 16789// If the operation has not completed it will return an error. 16790func (future *WatchersCheckConnectivityFuture) Result(client WatchersClient) (ci ConnectivityInformation, err error) { 16791 var done bool 16792 done, err = future.DoneWithContext(context.Background(), client) 16793 if err != nil { 16794 err = autorest.NewErrorWithError(err, "network.WatchersCheckConnectivityFuture", "Result", future.Response(), "Polling failure") 16795 return 16796 } 16797 if !done { 16798 err = azure.NewAsyncOpIncompleteError("network.WatchersCheckConnectivityFuture") 16799 return 16800 } 16801 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 16802 if ci.Response.Response, err = future.GetResult(sender); err == nil && ci.Response.Response.StatusCode != http.StatusNoContent { 16803 ci, err = client.CheckConnectivityResponder(ci.Response.Response) 16804 if err != nil { 16805 err = autorest.NewErrorWithError(err, "network.WatchersCheckConnectivityFuture", "Result", ci.Response.Response, "Failure responding to request") 16806 } 16807 } 16808 return 16809} 16810 16811// WatchersDeleteFuture an abstraction for monitoring and retrieving the results of a long-running 16812// operation. 16813type WatchersDeleteFuture struct { 16814 azure.Future 16815} 16816 16817// Result returns the result of the asynchronous operation. 16818// If the operation has not completed it will return an error. 16819func (future *WatchersDeleteFuture) Result(client WatchersClient) (ar autorest.Response, err error) { 16820 var done bool 16821 done, err = future.DoneWithContext(context.Background(), client) 16822 if err != nil { 16823 err = autorest.NewErrorWithError(err, "network.WatchersDeleteFuture", "Result", future.Response(), "Polling failure") 16824 return 16825 } 16826 if !done { 16827 err = azure.NewAsyncOpIncompleteError("network.WatchersDeleteFuture") 16828 return 16829 } 16830 ar.Response = future.Response() 16831 return 16832} 16833 16834// WatchersGetAzureReachabilityReportFuture an abstraction for monitoring and retrieving the results of a 16835// long-running operation. 16836type WatchersGetAzureReachabilityReportFuture struct { 16837 azure.Future 16838} 16839 16840// Result returns the result of the asynchronous operation. 16841// If the operation has not completed it will return an error. 16842func (future *WatchersGetAzureReachabilityReportFuture) Result(client WatchersClient) (arr AzureReachabilityReport, err error) { 16843 var done bool 16844 done, err = future.DoneWithContext(context.Background(), client) 16845 if err != nil { 16846 err = autorest.NewErrorWithError(err, "network.WatchersGetAzureReachabilityReportFuture", "Result", future.Response(), "Polling failure") 16847 return 16848 } 16849 if !done { 16850 err = azure.NewAsyncOpIncompleteError("network.WatchersGetAzureReachabilityReportFuture") 16851 return 16852 } 16853 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 16854 if arr.Response.Response, err = future.GetResult(sender); err == nil && arr.Response.Response.StatusCode != http.StatusNoContent { 16855 arr, err = client.GetAzureReachabilityReportResponder(arr.Response.Response) 16856 if err != nil { 16857 err = autorest.NewErrorWithError(err, "network.WatchersGetAzureReachabilityReportFuture", "Result", arr.Response.Response, "Failure responding to request") 16858 } 16859 } 16860 return 16861} 16862 16863// WatchersGetFlowLogStatusFuture an abstraction for monitoring and retrieving the results of a 16864// long-running operation. 16865type WatchersGetFlowLogStatusFuture struct { 16866 azure.Future 16867} 16868 16869// Result returns the result of the asynchronous operation. 16870// If the operation has not completed it will return an error. 16871func (future *WatchersGetFlowLogStatusFuture) Result(client WatchersClient) (fli FlowLogInformation, err error) { 16872 var done bool 16873 done, err = future.DoneWithContext(context.Background(), client) 16874 if err != nil { 16875 err = autorest.NewErrorWithError(err, "network.WatchersGetFlowLogStatusFuture", "Result", future.Response(), "Polling failure") 16876 return 16877 } 16878 if !done { 16879 err = azure.NewAsyncOpIncompleteError("network.WatchersGetFlowLogStatusFuture") 16880 return 16881 } 16882 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 16883 if fli.Response.Response, err = future.GetResult(sender); err == nil && fli.Response.Response.StatusCode != http.StatusNoContent { 16884 fli, err = client.GetFlowLogStatusResponder(fli.Response.Response) 16885 if err != nil { 16886 err = autorest.NewErrorWithError(err, "network.WatchersGetFlowLogStatusFuture", "Result", fli.Response.Response, "Failure responding to request") 16887 } 16888 } 16889 return 16890} 16891 16892// WatchersGetNextHopFuture an abstraction for monitoring and retrieving the results of a long-running 16893// operation. 16894type WatchersGetNextHopFuture struct { 16895 azure.Future 16896} 16897 16898// Result returns the result of the asynchronous operation. 16899// If the operation has not completed it will return an error. 16900func (future *WatchersGetNextHopFuture) Result(client WatchersClient) (nhr NextHopResult, err error) { 16901 var done bool 16902 done, err = future.DoneWithContext(context.Background(), client) 16903 if err != nil { 16904 err = autorest.NewErrorWithError(err, "network.WatchersGetNextHopFuture", "Result", future.Response(), "Polling failure") 16905 return 16906 } 16907 if !done { 16908 err = azure.NewAsyncOpIncompleteError("network.WatchersGetNextHopFuture") 16909 return 16910 } 16911 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 16912 if nhr.Response.Response, err = future.GetResult(sender); err == nil && nhr.Response.Response.StatusCode != http.StatusNoContent { 16913 nhr, err = client.GetNextHopResponder(nhr.Response.Response) 16914 if err != nil { 16915 err = autorest.NewErrorWithError(err, "network.WatchersGetNextHopFuture", "Result", nhr.Response.Response, "Failure responding to request") 16916 } 16917 } 16918 return 16919} 16920 16921// WatchersGetTroubleshootingFuture an abstraction for monitoring and retrieving the results of a 16922// long-running operation. 16923type WatchersGetTroubleshootingFuture struct { 16924 azure.Future 16925} 16926 16927// Result returns the result of the asynchronous operation. 16928// If the operation has not completed it will return an error. 16929func (future *WatchersGetTroubleshootingFuture) Result(client WatchersClient) (tr TroubleshootingResult, err error) { 16930 var done bool 16931 done, err = future.DoneWithContext(context.Background(), client) 16932 if err != nil { 16933 err = autorest.NewErrorWithError(err, "network.WatchersGetTroubleshootingFuture", "Result", future.Response(), "Polling failure") 16934 return 16935 } 16936 if !done { 16937 err = azure.NewAsyncOpIncompleteError("network.WatchersGetTroubleshootingFuture") 16938 return 16939 } 16940 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 16941 if tr.Response.Response, err = future.GetResult(sender); err == nil && tr.Response.Response.StatusCode != http.StatusNoContent { 16942 tr, err = client.GetTroubleshootingResponder(tr.Response.Response) 16943 if err != nil { 16944 err = autorest.NewErrorWithError(err, "network.WatchersGetTroubleshootingFuture", "Result", tr.Response.Response, "Failure responding to request") 16945 } 16946 } 16947 return 16948} 16949 16950// WatchersGetTroubleshootingResultFuture an abstraction for monitoring and retrieving the results of a 16951// long-running operation. 16952type WatchersGetTroubleshootingResultFuture struct { 16953 azure.Future 16954} 16955 16956// Result returns the result of the asynchronous operation. 16957// If the operation has not completed it will return an error. 16958func (future *WatchersGetTroubleshootingResultFuture) Result(client WatchersClient) (tr TroubleshootingResult, err error) { 16959 var done bool 16960 done, err = future.DoneWithContext(context.Background(), client) 16961 if err != nil { 16962 err = autorest.NewErrorWithError(err, "network.WatchersGetTroubleshootingResultFuture", "Result", future.Response(), "Polling failure") 16963 return 16964 } 16965 if !done { 16966 err = azure.NewAsyncOpIncompleteError("network.WatchersGetTroubleshootingResultFuture") 16967 return 16968 } 16969 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 16970 if tr.Response.Response, err = future.GetResult(sender); err == nil && tr.Response.Response.StatusCode != http.StatusNoContent { 16971 tr, err = client.GetTroubleshootingResultResponder(tr.Response.Response) 16972 if err != nil { 16973 err = autorest.NewErrorWithError(err, "network.WatchersGetTroubleshootingResultFuture", "Result", tr.Response.Response, "Failure responding to request") 16974 } 16975 } 16976 return 16977} 16978 16979// WatchersGetVMSecurityRulesFuture an abstraction for monitoring and retrieving the results of a 16980// long-running operation. 16981type WatchersGetVMSecurityRulesFuture struct { 16982 azure.Future 16983} 16984 16985// Result returns the result of the asynchronous operation. 16986// If the operation has not completed it will return an error. 16987func (future *WatchersGetVMSecurityRulesFuture) Result(client WatchersClient) (sgvr SecurityGroupViewResult, err error) { 16988 var done bool 16989 done, err = future.DoneWithContext(context.Background(), client) 16990 if err != nil { 16991 err = autorest.NewErrorWithError(err, "network.WatchersGetVMSecurityRulesFuture", "Result", future.Response(), "Polling failure") 16992 return 16993 } 16994 if !done { 16995 err = azure.NewAsyncOpIncompleteError("network.WatchersGetVMSecurityRulesFuture") 16996 return 16997 } 16998 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 16999 if sgvr.Response.Response, err = future.GetResult(sender); err == nil && sgvr.Response.Response.StatusCode != http.StatusNoContent { 17000 sgvr, err = client.GetVMSecurityRulesResponder(sgvr.Response.Response) 17001 if err != nil { 17002 err = autorest.NewErrorWithError(err, "network.WatchersGetVMSecurityRulesFuture", "Result", sgvr.Response.Response, "Failure responding to request") 17003 } 17004 } 17005 return 17006} 17007 17008// WatchersListAvailableProvidersFuture an abstraction for monitoring and retrieving the results of a 17009// long-running operation. 17010type WatchersListAvailableProvidersFuture struct { 17011 azure.Future 17012} 17013 17014// Result returns the result of the asynchronous operation. 17015// If the operation has not completed it will return an error. 17016func (future *WatchersListAvailableProvidersFuture) Result(client WatchersClient) (apl AvailableProvidersList, err error) { 17017 var done bool 17018 done, err = future.DoneWithContext(context.Background(), client) 17019 if err != nil { 17020 err = autorest.NewErrorWithError(err, "network.WatchersListAvailableProvidersFuture", "Result", future.Response(), "Polling failure") 17021 return 17022 } 17023 if !done { 17024 err = azure.NewAsyncOpIncompleteError("network.WatchersListAvailableProvidersFuture") 17025 return 17026 } 17027 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 17028 if apl.Response.Response, err = future.GetResult(sender); err == nil && apl.Response.Response.StatusCode != http.StatusNoContent { 17029 apl, err = client.ListAvailableProvidersResponder(apl.Response.Response) 17030 if err != nil { 17031 err = autorest.NewErrorWithError(err, "network.WatchersListAvailableProvidersFuture", "Result", apl.Response.Response, "Failure responding to request") 17032 } 17033 } 17034 return 17035} 17036 17037// WatchersSetFlowLogConfigurationFuture an abstraction for monitoring and retrieving the results of a 17038// long-running operation. 17039type WatchersSetFlowLogConfigurationFuture struct { 17040 azure.Future 17041} 17042 17043// Result returns the result of the asynchronous operation. 17044// If the operation has not completed it will return an error. 17045func (future *WatchersSetFlowLogConfigurationFuture) Result(client WatchersClient) (fli FlowLogInformation, err error) { 17046 var done bool 17047 done, err = future.DoneWithContext(context.Background(), client) 17048 if err != nil { 17049 err = autorest.NewErrorWithError(err, "network.WatchersSetFlowLogConfigurationFuture", "Result", future.Response(), "Polling failure") 17050 return 17051 } 17052 if !done { 17053 err = azure.NewAsyncOpIncompleteError("network.WatchersSetFlowLogConfigurationFuture") 17054 return 17055 } 17056 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 17057 if fli.Response.Response, err = future.GetResult(sender); err == nil && fli.Response.Response.StatusCode != http.StatusNoContent { 17058 fli, err = client.SetFlowLogConfigurationResponder(fli.Response.Response) 17059 if err != nil { 17060 err = autorest.NewErrorWithError(err, "network.WatchersSetFlowLogConfigurationFuture", "Result", fli.Response.Response, "Failure responding to request") 17061 } 17062 } 17063 return 17064} 17065 17066// WatchersVerifyIPFlowFuture an abstraction for monitoring and retrieving the results of a long-running 17067// operation. 17068type WatchersVerifyIPFlowFuture struct { 17069 azure.Future 17070} 17071 17072// Result returns the result of the asynchronous operation. 17073// If the operation has not completed it will return an error. 17074func (future *WatchersVerifyIPFlowFuture) Result(client WatchersClient) (vifr VerificationIPFlowResult, err error) { 17075 var done bool 17076 done, err = future.DoneWithContext(context.Background(), client) 17077 if err != nil { 17078 err = autorest.NewErrorWithError(err, "network.WatchersVerifyIPFlowFuture", "Result", future.Response(), "Polling failure") 17079 return 17080 } 17081 if !done { 17082 err = azure.NewAsyncOpIncompleteError("network.WatchersVerifyIPFlowFuture") 17083 return 17084 } 17085 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 17086 if vifr.Response.Response, err = future.GetResult(sender); err == nil && vifr.Response.Response.StatusCode != http.StatusNoContent { 17087 vifr, err = client.VerifyIPFlowResponder(vifr.Response.Response) 17088 if err != nil { 17089 err = autorest.NewErrorWithError(err, "network.WatchersVerifyIPFlowFuture", "Result", vifr.Response.Response, "Failure responding to request") 17090 } 17091 } 17092 return 17093} 17094