1package apimanagement 2 3// Copyright (c) Microsoft and contributors. All rights reserved. 4// 5// Licensed under the Apache License, Version 2.0 (the "License"); 6// you may not use this file except in compliance with the License. 7// You may obtain a copy of the License at 8// http://www.apache.org/licenses/LICENSE-2.0 9// 10// Unless required by applicable law or agreed to in writing, software 11// distributed under the License is distributed on an "AS IS" BASIS, 12// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13// 14// See the License for the specific language governing permissions and 15// limitations under the License. 16// 17// Code generated by Microsoft (R) AutoRest Code Generator. 18// Changes may cause incorrect behavior and will be lost if the code is regenerated. 19 20import ( 21 "encoding/json" 22 "github.com/Azure/go-autorest/autorest" 23 "github.com/Azure/go-autorest/autorest/azure" 24 "github.com/Azure/go-autorest/autorest/date" 25 "github.com/Azure/go-autorest/autorest/to" 26 "github.com/satori/go.uuid" 27 "net/http" 28) 29 30// AlwaysLog enumerates the values for always log. 31type AlwaysLog string 32 33const ( 34 // AllErrors Always log all erroneous request regardless of sampling settings. 35 AllErrors AlwaysLog = "allErrors" 36) 37 38// PossibleAlwaysLogValues returns an array of possible values for the AlwaysLog const type. 39func PossibleAlwaysLogValues() []AlwaysLog { 40 return []AlwaysLog{AllErrors} 41} 42 43// APIType enumerates the values for api type. 44type APIType string 45 46const ( 47 // HTTP ... 48 HTTP APIType = "http" 49 // Soap ... 50 Soap APIType = "soap" 51) 52 53// PossibleAPITypeValues returns an array of possible values for the APIType const type. 54func PossibleAPITypeValues() []APIType { 55 return []APIType{HTTP, Soap} 56} 57 58// AsyncOperationStatus enumerates the values for async operation status. 59type AsyncOperationStatus string 60 61const ( 62 // Failed ... 63 Failed AsyncOperationStatus = "Failed" 64 // InProgress ... 65 InProgress AsyncOperationStatus = "InProgress" 66 // Started ... 67 Started AsyncOperationStatus = "Started" 68 // Succeeded ... 69 Succeeded AsyncOperationStatus = "Succeeded" 70) 71 72// PossibleAsyncOperationStatusValues returns an array of possible values for the AsyncOperationStatus const type. 73func PossibleAsyncOperationStatusValues() []AsyncOperationStatus { 74 return []AsyncOperationStatus{Failed, InProgress, Started, Succeeded} 75} 76 77// AuthorizationMethod enumerates the values for authorization method. 78type AuthorizationMethod string 79 80const ( 81 // DELETE ... 82 DELETE AuthorizationMethod = "DELETE" 83 // GET ... 84 GET AuthorizationMethod = "GET" 85 // HEAD ... 86 HEAD AuthorizationMethod = "HEAD" 87 // OPTIONS ... 88 OPTIONS AuthorizationMethod = "OPTIONS" 89 // PATCH ... 90 PATCH AuthorizationMethod = "PATCH" 91 // POST ... 92 POST AuthorizationMethod = "POST" 93 // PUT ... 94 PUT AuthorizationMethod = "PUT" 95 // TRACE ... 96 TRACE AuthorizationMethod = "TRACE" 97) 98 99// PossibleAuthorizationMethodValues returns an array of possible values for the AuthorizationMethod const type. 100func PossibleAuthorizationMethodValues() []AuthorizationMethod { 101 return []AuthorizationMethod{DELETE, GET, HEAD, OPTIONS, PATCH, POST, PUT, TRACE} 102} 103 104// BackendProtocol enumerates the values for backend protocol. 105type BackendProtocol string 106 107const ( 108 // BackendProtocolHTTP The Backend is a RESTful service. 109 BackendProtocolHTTP BackendProtocol = "http" 110 // BackendProtocolSoap The Backend is a SOAP service. 111 BackendProtocolSoap BackendProtocol = "soap" 112) 113 114// PossibleBackendProtocolValues returns an array of possible values for the BackendProtocol const type. 115func PossibleBackendProtocolValues() []BackendProtocol { 116 return []BackendProtocol{BackendProtocolHTTP, BackendProtocolSoap} 117} 118 119// BearerTokenSendingMethod enumerates the values for bearer token sending method. 120type BearerTokenSendingMethod string 121 122const ( 123 // AuthorizationHeader ... 124 AuthorizationHeader BearerTokenSendingMethod = "authorizationHeader" 125 // Query ... 126 Query BearerTokenSendingMethod = "query" 127) 128 129// PossibleBearerTokenSendingMethodValues returns an array of possible values for the BearerTokenSendingMethod const type. 130func PossibleBearerTokenSendingMethodValues() []BearerTokenSendingMethod { 131 return []BearerTokenSendingMethod{AuthorizationHeader, Query} 132} 133 134// ClientAuthenticationMethod enumerates the values for client authentication method. 135type ClientAuthenticationMethod string 136 137const ( 138 // Basic Basic Client Authentication method. 139 Basic ClientAuthenticationMethod = "Basic" 140 // Body Body based Authentication method. 141 Body ClientAuthenticationMethod = "Body" 142) 143 144// PossibleClientAuthenticationMethodValues returns an array of possible values for the ClientAuthenticationMethod const type. 145func PossibleClientAuthenticationMethodValues() []ClientAuthenticationMethod { 146 return []ClientAuthenticationMethod{Basic, Body} 147} 148 149// Confirmation enumerates the values for confirmation. 150type Confirmation string 151 152const ( 153 // Invite Send an e-mail inviting the user to sign-up and complete registration. 154 Invite Confirmation = "invite" 155 // Signup Send an e-mail to the user confirming they have successfully signed up. 156 Signup Confirmation = "signup" 157) 158 159// PossibleConfirmationValues returns an array of possible values for the Confirmation const type. 160func PossibleConfirmationValues() []Confirmation { 161 return []Confirmation{Invite, Signup} 162} 163 164// ConnectivityStatusType enumerates the values for connectivity status type. 165type ConnectivityStatusType string 166 167const ( 168 // Failure ... 169 Failure ConnectivityStatusType = "failure" 170 // Initializing ... 171 Initializing ConnectivityStatusType = "initializing" 172 // Success ... 173 Success ConnectivityStatusType = "success" 174) 175 176// PossibleConnectivityStatusTypeValues returns an array of possible values for the ConnectivityStatusType const type. 177func PossibleConnectivityStatusTypeValues() []ConnectivityStatusType { 178 return []ConnectivityStatusType{Failure, Initializing, Success} 179} 180 181// ContentFormat enumerates the values for content format. 182type ContentFormat string 183 184const ( 185 // SwaggerJSON The contents are inline and Content Type is a OpenApi 2.0 Document. 186 SwaggerJSON ContentFormat = "swagger-json" 187 // SwaggerLinkJSON The Open Api 2.0 document is hosted on a publicly accessible internet address. 188 SwaggerLinkJSON ContentFormat = "swagger-link-json" 189 // WadlLinkJSON The WADL document is hosted on a publicly accessible internet address. 190 WadlLinkJSON ContentFormat = "wadl-link-json" 191 // WadlXML The contents are inline and Content type is a WADL document. 192 WadlXML ContentFormat = "wadl-xml" 193 // Wsdl The contents are inline and the document is a WSDL/Soap document. 194 Wsdl ContentFormat = "wsdl" 195 // WsdlLink The WSDL document is hosted on a publicly accessible internet address. 196 WsdlLink ContentFormat = "wsdl-link" 197) 198 199// PossibleContentFormatValues returns an array of possible values for the ContentFormat const type. 200func PossibleContentFormatValues() []ContentFormat { 201 return []ContentFormat{SwaggerJSON, SwaggerLinkJSON, WadlLinkJSON, WadlXML, Wsdl, WsdlLink} 202} 203 204// ExportFormat enumerates the values for export format. 205type ExportFormat string 206 207const ( 208 // ExportFormatSwagger Export the Api Definition in OpenApi Specification 2.0 format to the Storage Blob. 209 ExportFormatSwagger ExportFormat = "swagger-link" 210 // ExportFormatWadl Export the Api Definition in WADL Schema to Storage Blob. 211 ExportFormatWadl ExportFormat = "wadl-link" 212 // ExportFormatWsdl Export the Api Definition in WSDL Schema to Storage Blob. This is only supported for 213 // APIs of Type `soap` 214 ExportFormatWsdl ExportFormat = "wsdl-link" 215) 216 217// PossibleExportFormatValues returns an array of possible values for the ExportFormat const type. 218func PossibleExportFormatValues() []ExportFormat { 219 return []ExportFormat{ExportFormatSwagger, ExportFormatWadl, ExportFormatWsdl} 220} 221 222// GrantType enumerates the values for grant type. 223type GrantType string 224 225const ( 226 // AuthorizationCode Authorization Code Grant flow as described 227 // https://tools.ietf.org/html/rfc6749#section-4.1. 228 AuthorizationCode GrantType = "authorizationCode" 229 // ClientCredentials Client Credentials Grant flow as described 230 // https://tools.ietf.org/html/rfc6749#section-4.4. 231 ClientCredentials GrantType = "clientCredentials" 232 // Implicit Implicit Code Grant flow as described https://tools.ietf.org/html/rfc6749#section-4.2. 233 Implicit GrantType = "implicit" 234 // ResourceOwnerPassword Resource Owner Password Grant flow as described 235 // https://tools.ietf.org/html/rfc6749#section-4.3. 236 ResourceOwnerPassword GrantType = "resourceOwnerPassword" 237) 238 239// PossibleGrantTypeValues returns an array of possible values for the GrantType const type. 240func PossibleGrantTypeValues() []GrantType { 241 return []GrantType{AuthorizationCode, ClientCredentials, Implicit, ResourceOwnerPassword} 242} 243 244// GroupType enumerates the values for group type. 245type GroupType string 246 247const ( 248 // Custom ... 249 Custom GroupType = "custom" 250 // External ... 251 External GroupType = "external" 252 // System ... 253 System GroupType = "system" 254) 255 256// PossibleGroupTypeValues returns an array of possible values for the GroupType const type. 257func PossibleGroupTypeValues() []GroupType { 258 return []GroupType{Custom, External, System} 259} 260 261// HostnameType enumerates the values for hostname type. 262type HostnameType string 263 264const ( 265 // Management ... 266 Management HostnameType = "Management" 267 // Portal ... 268 Portal HostnameType = "Portal" 269 // Proxy ... 270 Proxy HostnameType = "Proxy" 271 // Scm ... 272 Scm HostnameType = "Scm" 273) 274 275// PossibleHostnameTypeValues returns an array of possible values for the HostnameType const type. 276func PossibleHostnameTypeValues() []HostnameType { 277 return []HostnameType{Management, Portal, Proxy, Scm} 278} 279 280// IdentityProviderType enumerates the values for identity provider type. 281type IdentityProviderType string 282 283const ( 284 // Aad Azure Active Directory as Identity provider. 285 Aad IdentityProviderType = "aad" 286 // AadB2C Azure Active Directory B2C as Identity provider. 287 AadB2C IdentityProviderType = "aadB2C" 288 // Facebook Facebook as Identity provider. 289 Facebook IdentityProviderType = "facebook" 290 // Google Google as Identity provider. 291 Google IdentityProviderType = "google" 292 // Microsoft Microsoft Live as Identity provider. 293 Microsoft IdentityProviderType = "microsoft" 294 // Twitter Twitter as Identity provider. 295 Twitter IdentityProviderType = "twitter" 296) 297 298// PossibleIdentityProviderTypeValues returns an array of possible values for the IdentityProviderType const type. 299func PossibleIdentityProviderTypeValues() []IdentityProviderType { 300 return []IdentityProviderType{Aad, AadB2C, Facebook, Google, Microsoft, Twitter} 301} 302 303// KeyType enumerates the values for key type. 304type KeyType string 305 306const ( 307 // Primary ... 308 Primary KeyType = "primary" 309 // Secondary ... 310 Secondary KeyType = "secondary" 311) 312 313// PossibleKeyTypeValues returns an array of possible values for the KeyType const type. 314func PossibleKeyTypeValues() []KeyType { 315 return []KeyType{Primary, Secondary} 316} 317 318// LoggerType enumerates the values for logger type. 319type LoggerType string 320 321const ( 322 // ApplicationInsights Azure Application Insights as log destination. 323 ApplicationInsights LoggerType = "applicationInsights" 324 // AzureEventHub Azure Event Hub as log destination. 325 AzureEventHub LoggerType = "azureEventHub" 326) 327 328// PossibleLoggerTypeValues returns an array of possible values for the LoggerType const type. 329func PossibleLoggerTypeValues() []LoggerType { 330 return []LoggerType{ApplicationInsights, AzureEventHub} 331} 332 333// NameAvailabilityReason enumerates the values for name availability reason. 334type NameAvailabilityReason string 335 336const ( 337 // AlreadyExists ... 338 AlreadyExists NameAvailabilityReason = "AlreadyExists" 339 // Invalid ... 340 Invalid NameAvailabilityReason = "Invalid" 341 // Valid ... 342 Valid NameAvailabilityReason = "Valid" 343) 344 345// PossibleNameAvailabilityReasonValues returns an array of possible values for the NameAvailabilityReason const type. 346func PossibleNameAvailabilityReasonValues() []NameAvailabilityReason { 347 return []NameAvailabilityReason{AlreadyExists, Invalid, Valid} 348} 349 350// NotificationName enumerates the values for notification name. 351type NotificationName string 352 353const ( 354 // AccountClosedPublisher The following email recipients and users will receive email notifications when 355 // developer closes his account. 356 AccountClosedPublisher NotificationName = "AccountClosedPublisher" 357 // BCC The following recipients will receive blind carbon copies of all emails sent to developers. 358 BCC NotificationName = "BCC" 359 // NewApplicationNotificationMessage The following email recipients and users will receive email 360 // notifications when new applications are submitted to the application gallery. 361 NewApplicationNotificationMessage NotificationName = "NewApplicationNotificationMessage" 362 // NewIssuePublisherNotificationMessage The following email recipients and users will receive email 363 // notifications when a new issue or comment is submitted on the developer portal. 364 NewIssuePublisherNotificationMessage NotificationName = "NewIssuePublisherNotificationMessage" 365 // PurchasePublisherNotificationMessage The following email recipients and users will receive email 366 // notifications about new API product subscriptions. 367 PurchasePublisherNotificationMessage NotificationName = "PurchasePublisherNotificationMessage" 368 // QuotaLimitApproachingPublisherNotificationMessage The following email recipients and users will receive 369 // email notifications when subscription usage gets close to usage quota. 370 QuotaLimitApproachingPublisherNotificationMessage NotificationName = "QuotaLimitApproachingPublisherNotificationMessage" 371 // RequestPublisherNotificationMessage The following email recipients and users will receive email 372 // notifications about subscription requests for API products requiring approval. 373 RequestPublisherNotificationMessage NotificationName = "RequestPublisherNotificationMessage" 374) 375 376// PossibleNotificationNameValues returns an array of possible values for the NotificationName const type. 377func PossibleNotificationNameValues() []NotificationName { 378 return []NotificationName{AccountClosedPublisher, BCC, NewApplicationNotificationMessage, NewIssuePublisherNotificationMessage, PurchasePublisherNotificationMessage, QuotaLimitApproachingPublisherNotificationMessage, RequestPublisherNotificationMessage} 379} 380 381// PolicyContentFormat enumerates the values for policy content format. 382type PolicyContentFormat string 383 384const ( 385 // Rawxml The contents are inline and Content type is a non XML encoded policy document. 386 Rawxml PolicyContentFormat = "rawxml" 387 // RawxmlLink The policy document is not Xml encoded and is hosted on a http endpoint accessible from the 388 // API Management service. 389 RawxmlLink PolicyContentFormat = "rawxml-link" 390 // XML The contents are inline and Content type is an XML document. 391 XML PolicyContentFormat = "xml" 392 // XMLLink The policy XML document is hosted on a http endpoint accessible from the API Management service. 393 XMLLink PolicyContentFormat = "xml-link" 394) 395 396// PossiblePolicyContentFormatValues returns an array of possible values for the PolicyContentFormat const type. 397func PossiblePolicyContentFormatValues() []PolicyContentFormat { 398 return []PolicyContentFormat{Rawxml, RawxmlLink, XML, XMLLink} 399} 400 401// PolicyScopeContract enumerates the values for policy scope contract. 402type PolicyScopeContract string 403 404const ( 405 // PolicyScopeContractAll ... 406 PolicyScopeContractAll PolicyScopeContract = "All" 407 // PolicyScopeContractAPI ... 408 PolicyScopeContractAPI PolicyScopeContract = "Api" 409 // PolicyScopeContractOperation ... 410 PolicyScopeContractOperation PolicyScopeContract = "Operation" 411 // PolicyScopeContractProduct ... 412 PolicyScopeContractProduct PolicyScopeContract = "Product" 413 // PolicyScopeContractTenant ... 414 PolicyScopeContractTenant PolicyScopeContract = "Tenant" 415) 416 417// PossiblePolicyScopeContractValues returns an array of possible values for the PolicyScopeContract const type. 418func PossiblePolicyScopeContractValues() []PolicyScopeContract { 419 return []PolicyScopeContract{PolicyScopeContractAll, PolicyScopeContractAPI, PolicyScopeContractOperation, PolicyScopeContractProduct, PolicyScopeContractTenant} 420} 421 422// ProductState enumerates the values for product state. 423type ProductState string 424 425const ( 426 // NotPublished ... 427 NotPublished ProductState = "notPublished" 428 // Published ... 429 Published ProductState = "published" 430) 431 432// PossibleProductStateValues returns an array of possible values for the ProductState const type. 433func PossibleProductStateValues() []ProductState { 434 return []ProductState{NotPublished, Published} 435} 436 437// Protocol enumerates the values for protocol. 438type Protocol string 439 440const ( 441 // ProtocolHTTP ... 442 ProtocolHTTP Protocol = "http" 443 // ProtocolHTTPS ... 444 ProtocolHTTPS Protocol = "https" 445) 446 447// PossibleProtocolValues returns an array of possible values for the Protocol const type. 448func PossibleProtocolValues() []Protocol { 449 return []Protocol{ProtocolHTTP, ProtocolHTTPS} 450} 451 452// SamplingType enumerates the values for sampling type. 453type SamplingType string 454 455const ( 456 // Fixed Fixed-rate sampling. 457 Fixed SamplingType = "fixed" 458) 459 460// PossibleSamplingTypeValues returns an array of possible values for the SamplingType const type. 461func PossibleSamplingTypeValues() []SamplingType { 462 return []SamplingType{Fixed} 463} 464 465// SkuType enumerates the values for sku type. 466type SkuType string 467 468const ( 469 // SkuTypeBasic Basic SKU of Api Management. 470 SkuTypeBasic SkuType = "Basic" 471 // SkuTypeDeveloper Developer SKU of Api Management. 472 SkuTypeDeveloper SkuType = "Developer" 473 // SkuTypePremium Premium SKU of Api Management. 474 SkuTypePremium SkuType = "Premium" 475 // SkuTypeStandard Standard SKU of Api Management. 476 SkuTypeStandard SkuType = "Standard" 477) 478 479// PossibleSkuTypeValues returns an array of possible values for the SkuType const type. 480func PossibleSkuTypeValues() []SkuType { 481 return []SkuType{SkuTypeBasic, SkuTypeDeveloper, SkuTypePremium, SkuTypeStandard} 482} 483 484// SoapAPIType enumerates the values for soap api type. 485type SoapAPIType string 486 487const ( 488 // SoapPassThrough Imports the Soap API having a SOAP front end. 489 SoapPassThrough SoapAPIType = "soap" 490 // SoapToRest Imports a SOAP API having a RESTful front end. 491 SoapToRest SoapAPIType = "http" 492) 493 494// PossibleSoapAPITypeValues returns an array of possible values for the SoapAPIType const type. 495func PossibleSoapAPITypeValues() []SoapAPIType { 496 return []SoapAPIType{SoapPassThrough, SoapToRest} 497} 498 499// State enumerates the values for state. 500type State string 501 502const ( 503 // Closed The issue was closed. 504 Closed State = "closed" 505 // Open The issue is opened. 506 Open State = "open" 507 // Proposed The issue is proposed. 508 Proposed State = "proposed" 509 // Removed The issue was removed. 510 Removed State = "removed" 511 // Resolved The issue is now resolved. 512 Resolved State = "resolved" 513) 514 515// PossibleStateValues returns an array of possible values for the State const type. 516func PossibleStateValues() []State { 517 return []State{Closed, Open, Proposed, Removed, Resolved} 518} 519 520// StoreName enumerates the values for store name. 521type StoreName string 522 523const ( 524 // CertificateAuthority ... 525 CertificateAuthority StoreName = "CertificateAuthority" 526 // Root ... 527 Root StoreName = "Root" 528) 529 530// PossibleStoreNameValues returns an array of possible values for the StoreName const type. 531func PossibleStoreNameValues() []StoreName { 532 return []StoreName{CertificateAuthority, Root} 533} 534 535// SubscriptionState enumerates the values for subscription state. 536type SubscriptionState string 537 538const ( 539 // Active ... 540 Active SubscriptionState = "active" 541 // Cancelled ... 542 Cancelled SubscriptionState = "cancelled" 543 // Expired ... 544 Expired SubscriptionState = "expired" 545 // Rejected ... 546 Rejected SubscriptionState = "rejected" 547 // Submitted ... 548 Submitted SubscriptionState = "submitted" 549 // Suspended ... 550 Suspended SubscriptionState = "suspended" 551) 552 553// PossibleSubscriptionStateValues returns an array of possible values for the SubscriptionState const type. 554func PossibleSubscriptionStateValues() []SubscriptionState { 555 return []SubscriptionState{Active, Cancelled, Expired, Rejected, Submitted, Suspended} 556} 557 558// TemplateName enumerates the values for template name. 559type TemplateName string 560 561const ( 562 // AccountClosedDeveloper ... 563 AccountClosedDeveloper TemplateName = "accountClosedDeveloper" 564 // ApplicationApprovedNotificationMessage ... 565 ApplicationApprovedNotificationMessage TemplateName = "applicationApprovedNotificationMessage" 566 // ConfirmSignUpIdentityDefault ... 567 ConfirmSignUpIdentityDefault TemplateName = "confirmSignUpIdentityDefault" 568 // EmailChangeIdentityDefault ... 569 EmailChangeIdentityDefault TemplateName = "emailChangeIdentityDefault" 570 // InviteUserNotificationMessage ... 571 InviteUserNotificationMessage TemplateName = "inviteUserNotificationMessage" 572 // NewCommentNotificationMessage ... 573 NewCommentNotificationMessage TemplateName = "newCommentNotificationMessage" 574 // NewDeveloperNotificationMessage ... 575 NewDeveloperNotificationMessage TemplateName = "newDeveloperNotificationMessage" 576 // NewIssueNotificationMessage ... 577 NewIssueNotificationMessage TemplateName = "newIssueNotificationMessage" 578 // PasswordResetByAdminNotificationMessage ... 579 PasswordResetByAdminNotificationMessage TemplateName = "passwordResetByAdminNotificationMessage" 580 // PasswordResetIdentityDefault ... 581 PasswordResetIdentityDefault TemplateName = "passwordResetIdentityDefault" 582 // PurchaseDeveloperNotificationMessage ... 583 PurchaseDeveloperNotificationMessage TemplateName = "purchaseDeveloperNotificationMessage" 584 // QuotaLimitApproachingDeveloperNotificationMessage ... 585 QuotaLimitApproachingDeveloperNotificationMessage TemplateName = "quotaLimitApproachingDeveloperNotificationMessage" 586 // RejectDeveloperNotificationMessage ... 587 RejectDeveloperNotificationMessage TemplateName = "rejectDeveloperNotificationMessage" 588 // RequestDeveloperNotificationMessage ... 589 RequestDeveloperNotificationMessage TemplateName = "requestDeveloperNotificationMessage" 590) 591 592// PossibleTemplateNameValues returns an array of possible values for the TemplateName const type. 593func PossibleTemplateNameValues() []TemplateName { 594 return []TemplateName{AccountClosedDeveloper, ApplicationApprovedNotificationMessage, ConfirmSignUpIdentityDefault, EmailChangeIdentityDefault, InviteUserNotificationMessage, NewCommentNotificationMessage, NewDeveloperNotificationMessage, NewIssueNotificationMessage, PasswordResetByAdminNotificationMessage, PasswordResetIdentityDefault, PurchaseDeveloperNotificationMessage, QuotaLimitApproachingDeveloperNotificationMessage, RejectDeveloperNotificationMessage, RequestDeveloperNotificationMessage} 595} 596 597// UserState enumerates the values for user state. 598type UserState string 599 600const ( 601 // UserStateActive User state is active. 602 UserStateActive UserState = "active" 603 // UserStateBlocked User is blocked. Blocked users cannot authenticate at developer portal or call API. 604 UserStateBlocked UserState = "blocked" 605 // UserStateDeleted User account is closed. All identities and related entities are removed. 606 UserStateDeleted UserState = "deleted" 607 // UserStatePending User account is pending. Requires identity confirmation before it can be made active. 608 UserStatePending UserState = "pending" 609) 610 611// PossibleUserStateValues returns an array of possible values for the UserState const type. 612func PossibleUserStateValues() []UserState { 613 return []UserState{UserStateActive, UserStateBlocked, UserStateDeleted, UserStatePending} 614} 615 616// VersioningScheme enumerates the values for versioning scheme. 617type VersioningScheme string 618 619const ( 620 // VersioningSchemeHeader The API Version is passed in a HTTP header. 621 VersioningSchemeHeader VersioningScheme = "Header" 622 // VersioningSchemeQuery The API Version is passed in a query parameter. 623 VersioningSchemeQuery VersioningScheme = "Query" 624 // VersioningSchemeSegment The API Version is passed in a path segment. 625 VersioningSchemeSegment VersioningScheme = "Segment" 626) 627 628// PossibleVersioningSchemeValues returns an array of possible values for the VersioningScheme const type. 629func PossibleVersioningSchemeValues() []VersioningScheme { 630 return []VersioningScheme{VersioningSchemeHeader, VersioningSchemeQuery, VersioningSchemeSegment} 631} 632 633// VersioningScheme1 enumerates the values for versioning scheme 1. 634type VersioningScheme1 string 635 636const ( 637 // VersioningScheme1Header ... 638 VersioningScheme1Header VersioningScheme1 = "Header" 639 // VersioningScheme1Query ... 640 VersioningScheme1Query VersioningScheme1 = "Query" 641 // VersioningScheme1Segment ... 642 VersioningScheme1Segment VersioningScheme1 = "Segment" 643) 644 645// PossibleVersioningScheme1Values returns an array of possible values for the VersioningScheme1 const type. 646func PossibleVersioningScheme1Values() []VersioningScheme1 { 647 return []VersioningScheme1{VersioningScheme1Header, VersioningScheme1Query, VersioningScheme1Segment} 648} 649 650// VirtualNetworkType enumerates the values for virtual network type. 651type VirtualNetworkType string 652 653const ( 654 // VirtualNetworkTypeExternal The service is part of Virtual Network and it is accessible from Internet. 655 VirtualNetworkTypeExternal VirtualNetworkType = "External" 656 // VirtualNetworkTypeInternal The service is part of Virtual Network and it is only accessible from within 657 // the virtual network. 658 VirtualNetworkTypeInternal VirtualNetworkType = "Internal" 659 // VirtualNetworkTypeNone The service is not part of any Virtual Network. 660 VirtualNetworkTypeNone VirtualNetworkType = "None" 661) 662 663// PossibleVirtualNetworkTypeValues returns an array of possible values for the VirtualNetworkType const type. 664func PossibleVirtualNetworkTypeValues() []VirtualNetworkType { 665 return []VirtualNetworkType{VirtualNetworkTypeExternal, VirtualNetworkTypeInternal, VirtualNetworkTypeNone} 666} 667 668// AccessInformationContract tenant access information contract of the API Management service. 669type AccessInformationContract struct { 670 autorest.Response `json:"-"` 671 // ID - Identifier. 672 ID *string `json:"id,omitempty"` 673 // PrimaryKey - Primary access key. 674 PrimaryKey *string `json:"primaryKey,omitempty"` 675 // SecondaryKey - Secondary access key. 676 SecondaryKey *string `json:"secondaryKey,omitempty"` 677 // Enabled - Tenant access information of the API Management service. 678 Enabled *bool `json:"enabled,omitempty"` 679} 680 681// AccessInformationUpdateParameters tenant access information update parameters of the API Management service. 682type AccessInformationUpdateParameters struct { 683 // Enabled - Tenant access information of the API Management service. 684 Enabled *bool `json:"enabled,omitempty"` 685} 686 687// AdditionalLocation description of an additional API Management resource location. 688type AdditionalLocation struct { 689 // Location - The location name of the additional region among Azure Data center regions. 690 Location *string `json:"location,omitempty"` 691 // Sku - SKU properties of the API Management service. 692 Sku *ServiceSkuProperties `json:"sku,omitempty"` 693 // PublicIPAddresses - Public Static Load Balanced IP addresses of the API Management service in the additional location. Available only for Basic, Standard and Premium SKU. 694 PublicIPAddresses *[]string `json:"publicIPAddresses,omitempty"` 695 // PrivateIPAddresses - Private Static Load Balanced IP addresses of the API Management service which is deployed in an Internal Virtual Network in a particular additional location. Available only for Basic, Standard and Premium SKU. 696 PrivateIPAddresses *[]string `json:"privateIPAddresses,omitempty"` 697 // VirtualNetworkConfiguration - Virtual network configuration for the location. 698 VirtualNetworkConfiguration *VirtualNetworkConfiguration `json:"virtualNetworkConfiguration,omitempty"` 699 // GatewayRegionalURL - Gateway URL of the API Management service in the Region. 700 GatewayRegionalURL *string `json:"gatewayRegionalUrl,omitempty"` 701} 702 703// APICollection paged Api list representation. 704type APICollection struct { 705 autorest.Response `json:"-"` 706 // Value - Page values. 707 Value *[]APIContract `json:"value,omitempty"` 708 // NextLink - Next page link if any. 709 NextLink *string `json:"nextLink,omitempty"` 710} 711 712// APICollectionIterator provides access to a complete listing of APIContract values. 713type APICollectionIterator struct { 714 i int 715 page APICollectionPage 716} 717 718// Next advances to the next value. If there was an error making 719// the request the iterator does not advance and the error is returned. 720func (iter *APICollectionIterator) Next() error { 721 iter.i++ 722 if iter.i < len(iter.page.Values()) { 723 return nil 724 } 725 err := iter.page.Next() 726 if err != nil { 727 iter.i-- 728 return err 729 } 730 iter.i = 0 731 return nil 732} 733 734// NotDone returns true if the enumeration should be started or is not yet complete. 735func (iter APICollectionIterator) NotDone() bool { 736 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 737} 738 739// Response returns the raw server response from the last page request. 740func (iter APICollectionIterator) Response() APICollection { 741 return iter.page.Response() 742} 743 744// Value returns the current value or a zero-initialized value if the 745// iterator has advanced beyond the end of the collection. 746func (iter APICollectionIterator) Value() APIContract { 747 if !iter.page.NotDone() { 748 return APIContract{} 749 } 750 return iter.page.Values()[iter.i] 751} 752 753// IsEmpty returns true if the ListResult contains no values. 754func (ac APICollection) IsEmpty() bool { 755 return ac.Value == nil || len(*ac.Value) == 0 756} 757 758// aPICollectionPreparer prepares a request to retrieve the next set of results. 759// It returns nil if no more results exist. 760func (ac APICollection) aPICollectionPreparer() (*http.Request, error) { 761 if ac.NextLink == nil || len(to.String(ac.NextLink)) < 1 { 762 return nil, nil 763 } 764 return autorest.Prepare(&http.Request{}, 765 autorest.AsJSON(), 766 autorest.AsGet(), 767 autorest.WithBaseURL(to.String(ac.NextLink))) 768} 769 770// APICollectionPage contains a page of APIContract values. 771type APICollectionPage struct { 772 fn func(APICollection) (APICollection, error) 773 ac APICollection 774} 775 776// Next advances to the next page of values. If there was an error making 777// the request the page does not advance and the error is returned. 778func (page *APICollectionPage) Next() error { 779 next, err := page.fn(page.ac) 780 if err != nil { 781 return err 782 } 783 page.ac = next 784 return nil 785} 786 787// NotDone returns true if the page enumeration should be started or is not yet complete. 788func (page APICollectionPage) NotDone() bool { 789 return !page.ac.IsEmpty() 790} 791 792// Response returns the raw server response from the last page request. 793func (page APICollectionPage) Response() APICollection { 794 return page.ac 795} 796 797// Values returns the slice of values for the current page or nil if there are no values. 798func (page APICollectionPage) Values() []APIContract { 799 if page.ac.IsEmpty() { 800 return nil 801 } 802 return *page.ac.Value 803} 804 805// APIContract API details. 806type APIContract struct { 807 autorest.Response `json:"-"` 808 // APIContractProperties - Api entity contract properties. 809 *APIContractProperties `json:"properties,omitempty"` 810 // ID - Resource ID. 811 ID *string `json:"id,omitempty"` 812 // Name - Resource name. 813 Name *string `json:"name,omitempty"` 814 // Type - Resource type for API Management resource. 815 Type *string `json:"type,omitempty"` 816} 817 818// MarshalJSON is the custom marshaler for APIContract. 819func (ac APIContract) MarshalJSON() ([]byte, error) { 820 objectMap := make(map[string]interface{}) 821 if ac.APIContractProperties != nil { 822 objectMap["properties"] = ac.APIContractProperties 823 } 824 if ac.ID != nil { 825 objectMap["id"] = ac.ID 826 } 827 if ac.Name != nil { 828 objectMap["name"] = ac.Name 829 } 830 if ac.Type != nil { 831 objectMap["type"] = ac.Type 832 } 833 return json.Marshal(objectMap) 834} 835 836// UnmarshalJSON is the custom unmarshaler for APIContract struct. 837func (ac *APIContract) UnmarshalJSON(body []byte) error { 838 var m map[string]*json.RawMessage 839 err := json.Unmarshal(body, &m) 840 if err != nil { 841 return err 842 } 843 for k, v := range m { 844 switch k { 845 case "properties": 846 if v != nil { 847 var APIContractProperties APIContractProperties 848 err = json.Unmarshal(*v, &APIContractProperties) 849 if err != nil { 850 return err 851 } 852 ac.APIContractProperties = &APIContractProperties 853 } 854 case "id": 855 if v != nil { 856 var ID string 857 err = json.Unmarshal(*v, &ID) 858 if err != nil { 859 return err 860 } 861 ac.ID = &ID 862 } 863 case "name": 864 if v != nil { 865 var name string 866 err = json.Unmarshal(*v, &name) 867 if err != nil { 868 return err 869 } 870 ac.Name = &name 871 } 872 case "type": 873 if v != nil { 874 var typeVar string 875 err = json.Unmarshal(*v, &typeVar) 876 if err != nil { 877 return err 878 } 879 ac.Type = &typeVar 880 } 881 } 882 } 883 884 return nil 885} 886 887// APIContractProperties api Entity Properties 888type APIContractProperties struct { 889 // DisplayName - API name. 890 DisplayName *string `json:"displayName,omitempty"` 891 // ServiceURL - Absolute URL of the backend service implementing this API. 892 ServiceURL *string `json:"serviceUrl,omitempty"` 893 // Path - Relative URL uniquely identifying this API and all of its resource paths within the API Management service instance. It is appended to the API endpoint base URL specified during the service instance creation to form a public URL for this API. 894 Path *string `json:"path,omitempty"` 895 // Protocols - Describes on which protocols the operations in this API can be invoked. 896 Protocols *[]Protocol `json:"protocols,omitempty"` 897 APIVersionSet *APIVersionSetContractDetails `json:"apiVersionSet,omitempty"` 898 // Description - Description of the API. May include HTML formatting tags. 899 Description *string `json:"description,omitempty"` 900 // AuthenticationSettings - Collection of authentication settings included into this API. 901 AuthenticationSettings *AuthenticationSettingsContract `json:"authenticationSettings,omitempty"` 902 // SubscriptionKeyParameterNames - Protocols over which API is made available. 903 SubscriptionKeyParameterNames *SubscriptionKeyParameterNamesContract `json:"subscriptionKeyParameterNames,omitempty"` 904 // APIType - Type of API. Possible values include: 'HTTP', 'Soap' 905 APIType APIType `json:"type,omitempty"` 906 // APIRevision - Describes the Revision of the Api. If no value is provided, default revision 1 is created 907 APIRevision *string `json:"apiRevision,omitempty"` 908 // APIVersion - Indicates the Version identifier of the API if the API is versioned 909 APIVersion *string `json:"apiVersion,omitempty"` 910 // IsCurrent - Indicates if API revision is current api revision. 911 IsCurrent *bool `json:"isCurrent,omitempty"` 912 // IsOnline - Indicates if API revision is accessible via the gateway. 913 IsOnline *bool `json:"isOnline,omitempty"` 914 // APIRevisionDescription - Description of the Api Revision. 915 APIRevisionDescription *string `json:"apiRevisionDescription,omitempty"` 916 // APIVersionDescription - Description of the Api Version. 917 APIVersionDescription *string `json:"apiVersionDescription,omitempty"` 918 // APIVersionSetID - A resource identifier for the related ApiVersionSet. 919 APIVersionSetID *string `json:"apiVersionSetId,omitempty"` 920} 921 922// APIContractUpdateProperties API update contract properties. 923type APIContractUpdateProperties struct { 924 // DisplayName - API name. 925 DisplayName *string `json:"displayName,omitempty"` 926 // ServiceURL - Absolute URL of the backend service implementing this API. 927 ServiceURL *string `json:"serviceUrl,omitempty"` 928 // Path - Relative URL uniquely identifying this API and all of its resource paths within the API Management service instance. It is appended to the API endpoint base URL specified during the service instance creation to form a public URL for this API. 929 Path *string `json:"path,omitempty"` 930 // Protocols - Describes on which protocols the operations in this API can be invoked. 931 Protocols *[]Protocol `json:"protocols,omitempty"` 932 // Description - Description of the API. May include HTML formatting tags. 933 Description *string `json:"description,omitempty"` 934 // AuthenticationSettings - Collection of authentication settings included into this API. 935 AuthenticationSettings *AuthenticationSettingsContract `json:"authenticationSettings,omitempty"` 936 // SubscriptionKeyParameterNames - Protocols over which API is made available. 937 SubscriptionKeyParameterNames *SubscriptionKeyParameterNamesContract `json:"subscriptionKeyParameterNames,omitempty"` 938 // APIType - Type of API. Possible values include: 'HTTP', 'Soap' 939 APIType APIType `json:"type,omitempty"` 940 // APIRevision - Describes the Revision of the Api. If no value is provided, default revision 1 is created 941 APIRevision *string `json:"apiRevision,omitempty"` 942 // APIVersion - Indicates the Version identifier of the API if the API is versioned 943 APIVersion *string `json:"apiVersion,omitempty"` 944 // IsCurrent - Indicates if API revision is current api revision. 945 IsCurrent *bool `json:"isCurrent,omitempty"` 946 // IsOnline - Indicates if API revision is accessible via the gateway. 947 IsOnline *bool `json:"isOnline,omitempty"` 948 // APIRevisionDescription - Description of the Api Revision. 949 APIRevisionDescription *string `json:"apiRevisionDescription,omitempty"` 950 // APIVersionDescription - Description of the Api Version. 951 APIVersionDescription *string `json:"apiVersionDescription,omitempty"` 952 // APIVersionSetID - A resource identifier for the related ApiVersionSet. 953 APIVersionSetID *string `json:"apiVersionSetId,omitempty"` 954} 955 956// APICreateOrUpdateParameter API Create or Update Parameters. 957type APICreateOrUpdateParameter struct { 958 // APICreateOrUpdateProperties - Api entity create of update properties. 959 *APICreateOrUpdateProperties `json:"properties,omitempty"` 960} 961 962// MarshalJSON is the custom marshaler for APICreateOrUpdateParameter. 963func (acoup APICreateOrUpdateParameter) MarshalJSON() ([]byte, error) { 964 objectMap := make(map[string]interface{}) 965 if acoup.APICreateOrUpdateProperties != nil { 966 objectMap["properties"] = acoup.APICreateOrUpdateProperties 967 } 968 return json.Marshal(objectMap) 969} 970 971// UnmarshalJSON is the custom unmarshaler for APICreateOrUpdateParameter struct. 972func (acoup *APICreateOrUpdateParameter) UnmarshalJSON(body []byte) error { 973 var m map[string]*json.RawMessage 974 err := json.Unmarshal(body, &m) 975 if err != nil { 976 return err 977 } 978 for k, v := range m { 979 switch k { 980 case "properties": 981 if v != nil { 982 var APICreateOrUpdateProperties APICreateOrUpdateProperties 983 err = json.Unmarshal(*v, &APICreateOrUpdateProperties) 984 if err != nil { 985 return err 986 } 987 acoup.APICreateOrUpdateProperties = &APICreateOrUpdateProperties 988 } 989 } 990 } 991 992 return nil 993} 994 995// APICreateOrUpdateProperties api Create or Update Properties. 996type APICreateOrUpdateProperties struct { 997 // ContentValue - Content value when Importing an API. 998 ContentValue *string `json:"contentValue,omitempty"` 999 // ContentFormat - Format of the Content in which the API is getting imported. Possible values include: 'WadlXML', 'WadlLinkJSON', 'SwaggerJSON', 'SwaggerLinkJSON', 'Wsdl', 'WsdlLink' 1000 ContentFormat ContentFormat `json:"contentFormat,omitempty"` 1001 // WsdlSelector - Criteria to limit import of WSDL to a subset of the document. 1002 WsdlSelector *APICreateOrUpdatePropertiesWsdlSelector `json:"wsdlSelector,omitempty"` 1003 // SoapAPIType - Type of Api to create. 1004 // * `http` creates a SOAP to REST API 1005 // * `soap` creates a SOAP pass-through API. Possible values include: 'SoapToRest', 'SoapPassThrough' 1006 SoapAPIType SoapAPIType `json:"apiType,omitempty"` 1007 // DisplayName - API name. 1008 DisplayName *string `json:"displayName,omitempty"` 1009 // ServiceURL - Absolute URL of the backend service implementing this API. 1010 ServiceURL *string `json:"serviceUrl,omitempty"` 1011 // Path - Relative URL uniquely identifying this API and all of its resource paths within the API Management service instance. It is appended to the API endpoint base URL specified during the service instance creation to form a public URL for this API. 1012 Path *string `json:"path,omitempty"` 1013 // Protocols - Describes on which protocols the operations in this API can be invoked. 1014 Protocols *[]Protocol `json:"protocols,omitempty"` 1015 APIVersionSet *APIVersionSetContractDetails `json:"apiVersionSet,omitempty"` 1016 // Description - Description of the API. May include HTML formatting tags. 1017 Description *string `json:"description,omitempty"` 1018 // AuthenticationSettings - Collection of authentication settings included into this API. 1019 AuthenticationSettings *AuthenticationSettingsContract `json:"authenticationSettings,omitempty"` 1020 // SubscriptionKeyParameterNames - Protocols over which API is made available. 1021 SubscriptionKeyParameterNames *SubscriptionKeyParameterNamesContract `json:"subscriptionKeyParameterNames,omitempty"` 1022 // APIType - Type of API. Possible values include: 'HTTP', 'Soap' 1023 APIType APIType `json:"type,omitempty"` 1024 // APIRevision - Describes the Revision of the Api. If no value is provided, default revision 1 is created 1025 APIRevision *string `json:"apiRevision,omitempty"` 1026 // APIVersion - Indicates the Version identifier of the API if the API is versioned 1027 APIVersion *string `json:"apiVersion,omitempty"` 1028 // IsCurrent - Indicates if API revision is current api revision. 1029 IsCurrent *bool `json:"isCurrent,omitempty"` 1030 // IsOnline - Indicates if API revision is accessible via the gateway. 1031 IsOnline *bool `json:"isOnline,omitempty"` 1032 // APIRevisionDescription - Description of the Api Revision. 1033 APIRevisionDescription *string `json:"apiRevisionDescription,omitempty"` 1034 // APIVersionDescription - Description of the Api Version. 1035 APIVersionDescription *string `json:"apiVersionDescription,omitempty"` 1036 // APIVersionSetID - A resource identifier for the related ApiVersionSet. 1037 APIVersionSetID *string `json:"apiVersionSetId,omitempty"` 1038} 1039 1040// APICreateOrUpdatePropertiesWsdlSelector criteria to limit import of WSDL to a subset of the document. 1041type APICreateOrUpdatePropertiesWsdlSelector struct { 1042 // WsdlServiceName - Name of service to import from WSDL 1043 WsdlServiceName *string `json:"wsdlServiceName,omitempty"` 1044 // WsdlEndpointName - Name of endpoint(port) to import from WSDL 1045 WsdlEndpointName *string `json:"wsdlEndpointName,omitempty"` 1046} 1047 1048// APIEntityBaseContract API base contract details. 1049type APIEntityBaseContract struct { 1050 // Description - Description of the API. May include HTML formatting tags. 1051 Description *string `json:"description,omitempty"` 1052 // AuthenticationSettings - Collection of authentication settings included into this API. 1053 AuthenticationSettings *AuthenticationSettingsContract `json:"authenticationSettings,omitempty"` 1054 // SubscriptionKeyParameterNames - Protocols over which API is made available. 1055 SubscriptionKeyParameterNames *SubscriptionKeyParameterNamesContract `json:"subscriptionKeyParameterNames,omitempty"` 1056 // APIType - Type of API. Possible values include: 'HTTP', 'Soap' 1057 APIType APIType `json:"type,omitempty"` 1058 // APIRevision - Describes the Revision of the Api. If no value is provided, default revision 1 is created 1059 APIRevision *string `json:"apiRevision,omitempty"` 1060 // APIVersion - Indicates the Version identifier of the API if the API is versioned 1061 APIVersion *string `json:"apiVersion,omitempty"` 1062 // IsCurrent - Indicates if API revision is current api revision. 1063 IsCurrent *bool `json:"isCurrent,omitempty"` 1064 // IsOnline - Indicates if API revision is accessible via the gateway. 1065 IsOnline *bool `json:"isOnline,omitempty"` 1066 // APIRevisionDescription - Description of the Api Revision. 1067 APIRevisionDescription *string `json:"apiRevisionDescription,omitempty"` 1068 // APIVersionDescription - Description of the Api Version. 1069 APIVersionDescription *string `json:"apiVersionDescription,omitempty"` 1070 // APIVersionSetID - A resource identifier for the related ApiVersionSet. 1071 APIVersionSetID *string `json:"apiVersionSetId,omitempty"` 1072} 1073 1074// APIExportResult API Export result Blob Uri. 1075type APIExportResult struct { 1076 autorest.Response `json:"-"` 1077 // Link - Link to the Storage Blob containing the result of the export operation. The Blob Uri is only valid for 5 minutes. 1078 Link *string `json:"link,omitempty"` 1079} 1080 1081// ApimResource the Resource definition. 1082type ApimResource struct { 1083 // ID - Resource ID. 1084 ID *string `json:"id,omitempty"` 1085 // Name - Resource name. 1086 Name *string `json:"name,omitempty"` 1087 // Type - Resource type for API Management resource is set to Microsoft.ApiManagement. 1088 Type *string `json:"type,omitempty"` 1089 // Tags - Resource tags. 1090 Tags map[string]*string `json:"tags"` 1091} 1092 1093// MarshalJSON is the custom marshaler for ApimResource. 1094func (ar ApimResource) MarshalJSON() ([]byte, error) { 1095 objectMap := make(map[string]interface{}) 1096 if ar.ID != nil { 1097 objectMap["id"] = ar.ID 1098 } 1099 if ar.Name != nil { 1100 objectMap["name"] = ar.Name 1101 } 1102 if ar.Type != nil { 1103 objectMap["type"] = ar.Type 1104 } 1105 if ar.Tags != nil { 1106 objectMap["tags"] = ar.Tags 1107 } 1108 return json.Marshal(objectMap) 1109} 1110 1111// APIReleaseCollection paged Api Revision list representation. 1112type APIReleaseCollection struct { 1113 autorest.Response `json:"-"` 1114 // Value - Page values. 1115 Value *[]APIReleaseContract `json:"value,omitempty"` 1116 // NextLink - Next page link if any. 1117 NextLink *string `json:"nextLink,omitempty"` 1118} 1119 1120// APIReleaseCollectionIterator provides access to a complete listing of APIReleaseContract values. 1121type APIReleaseCollectionIterator struct { 1122 i int 1123 page APIReleaseCollectionPage 1124} 1125 1126// Next advances to the next value. If there was an error making 1127// the request the iterator does not advance and the error is returned. 1128func (iter *APIReleaseCollectionIterator) Next() error { 1129 iter.i++ 1130 if iter.i < len(iter.page.Values()) { 1131 return nil 1132 } 1133 err := iter.page.Next() 1134 if err != nil { 1135 iter.i-- 1136 return err 1137 } 1138 iter.i = 0 1139 return nil 1140} 1141 1142// NotDone returns true if the enumeration should be started or is not yet complete. 1143func (iter APIReleaseCollectionIterator) NotDone() bool { 1144 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 1145} 1146 1147// Response returns the raw server response from the last page request. 1148func (iter APIReleaseCollectionIterator) Response() APIReleaseCollection { 1149 return iter.page.Response() 1150} 1151 1152// Value returns the current value or a zero-initialized value if the 1153// iterator has advanced beyond the end of the collection. 1154func (iter APIReleaseCollectionIterator) Value() APIReleaseContract { 1155 if !iter.page.NotDone() { 1156 return APIReleaseContract{} 1157 } 1158 return iter.page.Values()[iter.i] 1159} 1160 1161// IsEmpty returns true if the ListResult contains no values. 1162func (arc APIReleaseCollection) IsEmpty() bool { 1163 return arc.Value == nil || len(*arc.Value) == 0 1164} 1165 1166// aPIReleaseCollectionPreparer prepares a request to retrieve the next set of results. 1167// It returns nil if no more results exist. 1168func (arc APIReleaseCollection) aPIReleaseCollectionPreparer() (*http.Request, error) { 1169 if arc.NextLink == nil || len(to.String(arc.NextLink)) < 1 { 1170 return nil, nil 1171 } 1172 return autorest.Prepare(&http.Request{}, 1173 autorest.AsJSON(), 1174 autorest.AsGet(), 1175 autorest.WithBaseURL(to.String(arc.NextLink))) 1176} 1177 1178// APIReleaseCollectionPage contains a page of APIReleaseContract values. 1179type APIReleaseCollectionPage struct { 1180 fn func(APIReleaseCollection) (APIReleaseCollection, error) 1181 arc APIReleaseCollection 1182} 1183 1184// Next advances to the next page of values. If there was an error making 1185// the request the page does not advance and the error is returned. 1186func (page *APIReleaseCollectionPage) Next() error { 1187 next, err := page.fn(page.arc) 1188 if err != nil { 1189 return err 1190 } 1191 page.arc = next 1192 return nil 1193} 1194 1195// NotDone returns true if the page enumeration should be started or is not yet complete. 1196func (page APIReleaseCollectionPage) NotDone() bool { 1197 return !page.arc.IsEmpty() 1198} 1199 1200// Response returns the raw server response from the last page request. 1201func (page APIReleaseCollectionPage) Response() APIReleaseCollection { 1202 return page.arc 1203} 1204 1205// Values returns the slice of values for the current page or nil if there are no values. 1206func (page APIReleaseCollectionPage) Values() []APIReleaseContract { 1207 if page.arc.IsEmpty() { 1208 return nil 1209 } 1210 return *page.arc.Value 1211} 1212 1213// APIReleaseContract api Release details. 1214type APIReleaseContract struct { 1215 autorest.Response `json:"-"` 1216 // APIReleaseContractProperties - Properties of the Api Release Contract. 1217 *APIReleaseContractProperties `json:"properties,omitempty"` 1218 // ID - Resource ID. 1219 ID *string `json:"id,omitempty"` 1220 // Name - Resource name. 1221 Name *string `json:"name,omitempty"` 1222 // Type - Resource type for API Management resource. 1223 Type *string `json:"type,omitempty"` 1224} 1225 1226// MarshalJSON is the custom marshaler for APIReleaseContract. 1227func (arc APIReleaseContract) MarshalJSON() ([]byte, error) { 1228 objectMap := make(map[string]interface{}) 1229 if arc.APIReleaseContractProperties != nil { 1230 objectMap["properties"] = arc.APIReleaseContractProperties 1231 } 1232 if arc.ID != nil { 1233 objectMap["id"] = arc.ID 1234 } 1235 if arc.Name != nil { 1236 objectMap["name"] = arc.Name 1237 } 1238 if arc.Type != nil { 1239 objectMap["type"] = arc.Type 1240 } 1241 return json.Marshal(objectMap) 1242} 1243 1244// UnmarshalJSON is the custom unmarshaler for APIReleaseContract struct. 1245func (arc *APIReleaseContract) UnmarshalJSON(body []byte) error { 1246 var m map[string]*json.RawMessage 1247 err := json.Unmarshal(body, &m) 1248 if err != nil { 1249 return err 1250 } 1251 for k, v := range m { 1252 switch k { 1253 case "properties": 1254 if v != nil { 1255 var APIReleaseContractProperties APIReleaseContractProperties 1256 err = json.Unmarshal(*v, &APIReleaseContractProperties) 1257 if err != nil { 1258 return err 1259 } 1260 arc.APIReleaseContractProperties = &APIReleaseContractProperties 1261 } 1262 case "id": 1263 if v != nil { 1264 var ID string 1265 err = json.Unmarshal(*v, &ID) 1266 if err != nil { 1267 return err 1268 } 1269 arc.ID = &ID 1270 } 1271 case "name": 1272 if v != nil { 1273 var name string 1274 err = json.Unmarshal(*v, &name) 1275 if err != nil { 1276 return err 1277 } 1278 arc.Name = &name 1279 } 1280 case "type": 1281 if v != nil { 1282 var typeVar string 1283 err = json.Unmarshal(*v, &typeVar) 1284 if err != nil { 1285 return err 1286 } 1287 arc.Type = &typeVar 1288 } 1289 } 1290 } 1291 1292 return nil 1293} 1294 1295// APIReleaseContractProperties API Release details 1296type APIReleaseContractProperties struct { 1297 // APIID - Identifier of the API the release belongs to. 1298 APIID *string `json:"apiId,omitempty"` 1299 // CreatedDateTime - The time the API was released. The date conforms to the following format: yyyy-MM-ddTHH:mm:ssZ as specified by the ISO 8601 standard. 1300 CreatedDateTime *date.Time `json:"createdDateTime,omitempty"` 1301 // UpdatedDateTime - The time the API release was updated. 1302 UpdatedDateTime *date.Time `json:"updatedDateTime,omitempty"` 1303 // Notes - Release Notes 1304 Notes *string `json:"notes,omitempty"` 1305} 1306 1307// APIRevisionCollection paged Api Revision list representation. 1308type APIRevisionCollection struct { 1309 autorest.Response `json:"-"` 1310 // Value - Page values. 1311 Value *[]APIRevisionContract `json:"value,omitempty"` 1312 // NextLink - Next page link if any. 1313 NextLink *string `json:"nextLink,omitempty"` 1314} 1315 1316// APIRevisionCollectionIterator provides access to a complete listing of APIRevisionContract values. 1317type APIRevisionCollectionIterator struct { 1318 i int 1319 page APIRevisionCollectionPage 1320} 1321 1322// Next advances to the next value. If there was an error making 1323// the request the iterator does not advance and the error is returned. 1324func (iter *APIRevisionCollectionIterator) Next() error { 1325 iter.i++ 1326 if iter.i < len(iter.page.Values()) { 1327 return nil 1328 } 1329 err := iter.page.Next() 1330 if err != nil { 1331 iter.i-- 1332 return err 1333 } 1334 iter.i = 0 1335 return nil 1336} 1337 1338// NotDone returns true if the enumeration should be started or is not yet complete. 1339func (iter APIRevisionCollectionIterator) NotDone() bool { 1340 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 1341} 1342 1343// Response returns the raw server response from the last page request. 1344func (iter APIRevisionCollectionIterator) Response() APIRevisionCollection { 1345 return iter.page.Response() 1346} 1347 1348// Value returns the current value or a zero-initialized value if the 1349// iterator has advanced beyond the end of the collection. 1350func (iter APIRevisionCollectionIterator) Value() APIRevisionContract { 1351 if !iter.page.NotDone() { 1352 return APIRevisionContract{} 1353 } 1354 return iter.page.Values()[iter.i] 1355} 1356 1357// IsEmpty returns true if the ListResult contains no values. 1358func (arc APIRevisionCollection) IsEmpty() bool { 1359 return arc.Value == nil || len(*arc.Value) == 0 1360} 1361 1362// aPIRevisionCollectionPreparer prepares a request to retrieve the next set of results. 1363// It returns nil if no more results exist. 1364func (arc APIRevisionCollection) aPIRevisionCollectionPreparer() (*http.Request, error) { 1365 if arc.NextLink == nil || len(to.String(arc.NextLink)) < 1 { 1366 return nil, nil 1367 } 1368 return autorest.Prepare(&http.Request{}, 1369 autorest.AsJSON(), 1370 autorest.AsGet(), 1371 autorest.WithBaseURL(to.String(arc.NextLink))) 1372} 1373 1374// APIRevisionCollectionPage contains a page of APIRevisionContract values. 1375type APIRevisionCollectionPage struct { 1376 fn func(APIRevisionCollection) (APIRevisionCollection, error) 1377 arc APIRevisionCollection 1378} 1379 1380// Next advances to the next page of values. If there was an error making 1381// the request the page does not advance and the error is returned. 1382func (page *APIRevisionCollectionPage) Next() error { 1383 next, err := page.fn(page.arc) 1384 if err != nil { 1385 return err 1386 } 1387 page.arc = next 1388 return nil 1389} 1390 1391// NotDone returns true if the page enumeration should be started or is not yet complete. 1392func (page APIRevisionCollectionPage) NotDone() bool { 1393 return !page.arc.IsEmpty() 1394} 1395 1396// Response returns the raw server response from the last page request. 1397func (page APIRevisionCollectionPage) Response() APIRevisionCollection { 1398 return page.arc 1399} 1400 1401// Values returns the slice of values for the current page or nil if there are no values. 1402func (page APIRevisionCollectionPage) Values() []APIRevisionContract { 1403 if page.arc.IsEmpty() { 1404 return nil 1405 } 1406 return *page.arc.Value 1407} 1408 1409// APIRevisionContract summary of revision metadata. 1410type APIRevisionContract struct { 1411 // APIID - Identifier of the API Revision. 1412 APIID *string `json:"apiId,omitempty"` 1413 // APIRevision - Revision number of API. 1414 APIRevision *string `json:"apiRevision,omitempty"` 1415 // CreatedDateTime - The time the API Revision was created. The date conforms to the following format: yyyy-MM-ddTHH:mm:ssZ as specified by the ISO 8601 standard. 1416 CreatedDateTime *date.Time `json:"createdDateTime,omitempty"` 1417 // UpdatedDateTime - The time the API Revision were updated. The date conforms to the following format: yyyy-MM-ddTHH:mm:ssZ as specified by the ISO 8601 standard. 1418 UpdatedDateTime *date.Time `json:"updatedDateTime,omitempty"` 1419 // Description - Description of the API Revision. 1420 Description *string `json:"description,omitempty"` 1421 // PrivateURL - Gateway URL for accessing the non-current API Revision. 1422 PrivateURL *string `json:"privateUrl,omitempty"` 1423 // IsOnline - Indicates if API revision is the current api revision. 1424 IsOnline *bool `json:"isOnline,omitempty"` 1425 // IsCurrent - Indicates if API revision is accessible via the gateway. 1426 IsCurrent *bool `json:"isCurrent,omitempty"` 1427} 1428 1429// APIRevisionInfoContract object used to create an API Revision or Version based on an existing API Revision 1430type APIRevisionInfoContract struct { 1431 // SourceAPIID - Resource identifier of API to be used to create the revision from. 1432 SourceAPIID *string `json:"sourceApiId,omitempty"` 1433 // APIVersionName - Version identifier for the new API Version. 1434 APIVersionName *string `json:"apiVersionName,omitempty"` 1435 // APIRevisionDescription - Description of new API Revision. 1436 APIRevisionDescription *string `json:"apiRevisionDescription,omitempty"` 1437 // APIVersionSet - Version set details 1438 APIVersionSet *APIVersionSetContractDetails `json:"apiVersionSet,omitempty"` 1439} 1440 1441// APITagResourceContractProperties API contract properties for the Tag Resources. 1442type APITagResourceContractProperties struct { 1443 // ID - API identifier in the form /apis/{apiId}. 1444 ID *string `json:"id,omitempty"` 1445 // Name - API name. 1446 Name *string `json:"name,omitempty"` 1447 // ServiceURL - Absolute URL of the backend service implementing this API. 1448 ServiceURL *string `json:"serviceUrl,omitempty"` 1449 // Path - Relative URL uniquely identifying this API and all of its resource paths within the API Management service instance. It is appended to the API endpoint base URL specified during the service instance creation to form a public URL for this API. 1450 Path *string `json:"path,omitempty"` 1451 // Protocols - Describes on which protocols the operations in this API can be invoked. 1452 Protocols *[]Protocol `json:"protocols,omitempty"` 1453 // Description - Description of the API. May include HTML formatting tags. 1454 Description *string `json:"description,omitempty"` 1455 // AuthenticationSettings - Collection of authentication settings included into this API. 1456 AuthenticationSettings *AuthenticationSettingsContract `json:"authenticationSettings,omitempty"` 1457 // SubscriptionKeyParameterNames - Protocols over which API is made available. 1458 SubscriptionKeyParameterNames *SubscriptionKeyParameterNamesContract `json:"subscriptionKeyParameterNames,omitempty"` 1459 // APIType - Type of API. Possible values include: 'HTTP', 'Soap' 1460 APIType APIType `json:"type,omitempty"` 1461 // APIRevision - Describes the Revision of the Api. If no value is provided, default revision 1 is created 1462 APIRevision *string `json:"apiRevision,omitempty"` 1463 // APIVersion - Indicates the Version identifier of the API if the API is versioned 1464 APIVersion *string `json:"apiVersion,omitempty"` 1465 // IsCurrent - Indicates if API revision is current api revision. 1466 IsCurrent *bool `json:"isCurrent,omitempty"` 1467 // IsOnline - Indicates if API revision is accessible via the gateway. 1468 IsOnline *bool `json:"isOnline,omitempty"` 1469 // APIRevisionDescription - Description of the Api Revision. 1470 APIRevisionDescription *string `json:"apiRevisionDescription,omitempty"` 1471 // APIVersionDescription - Description of the Api Version. 1472 APIVersionDescription *string `json:"apiVersionDescription,omitempty"` 1473 // APIVersionSetID - A resource identifier for the related ApiVersionSet. 1474 APIVersionSetID *string `json:"apiVersionSetId,omitempty"` 1475} 1476 1477// APIUpdateContract API update contract details. 1478type APIUpdateContract struct { 1479 // APIContractUpdateProperties - Properties of the API entity that can be updated. 1480 *APIContractUpdateProperties `json:"properties,omitempty"` 1481} 1482 1483// MarshalJSON is the custom marshaler for APIUpdateContract. 1484func (auc APIUpdateContract) MarshalJSON() ([]byte, error) { 1485 objectMap := make(map[string]interface{}) 1486 if auc.APIContractUpdateProperties != nil { 1487 objectMap["properties"] = auc.APIContractUpdateProperties 1488 } 1489 return json.Marshal(objectMap) 1490} 1491 1492// UnmarshalJSON is the custom unmarshaler for APIUpdateContract struct. 1493func (auc *APIUpdateContract) UnmarshalJSON(body []byte) error { 1494 var m map[string]*json.RawMessage 1495 err := json.Unmarshal(body, &m) 1496 if err != nil { 1497 return err 1498 } 1499 for k, v := range m { 1500 switch k { 1501 case "properties": 1502 if v != nil { 1503 var APIContractUpdateProperties APIContractUpdateProperties 1504 err = json.Unmarshal(*v, &APIContractUpdateProperties) 1505 if err != nil { 1506 return err 1507 } 1508 auc.APIContractUpdateProperties = &APIContractUpdateProperties 1509 } 1510 } 1511 } 1512 1513 return nil 1514} 1515 1516// APIVersionSetCollection paged Api Version Set list representation. 1517type APIVersionSetCollection struct { 1518 autorest.Response `json:"-"` 1519 // Value - Page values. 1520 Value *[]APIVersionSetContract `json:"value,omitempty"` 1521 // NextLink - Next page link if any. 1522 NextLink *string `json:"nextLink,omitempty"` 1523} 1524 1525// APIVersionSetCollectionIterator provides access to a complete listing of APIVersionSetContract values. 1526type APIVersionSetCollectionIterator struct { 1527 i int 1528 page APIVersionSetCollectionPage 1529} 1530 1531// Next advances to the next value. If there was an error making 1532// the request the iterator does not advance and the error is returned. 1533func (iter *APIVersionSetCollectionIterator) Next() error { 1534 iter.i++ 1535 if iter.i < len(iter.page.Values()) { 1536 return nil 1537 } 1538 err := iter.page.Next() 1539 if err != nil { 1540 iter.i-- 1541 return err 1542 } 1543 iter.i = 0 1544 return nil 1545} 1546 1547// NotDone returns true if the enumeration should be started or is not yet complete. 1548func (iter APIVersionSetCollectionIterator) NotDone() bool { 1549 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 1550} 1551 1552// Response returns the raw server response from the last page request. 1553func (iter APIVersionSetCollectionIterator) Response() APIVersionSetCollection { 1554 return iter.page.Response() 1555} 1556 1557// Value returns the current value or a zero-initialized value if the 1558// iterator has advanced beyond the end of the collection. 1559func (iter APIVersionSetCollectionIterator) Value() APIVersionSetContract { 1560 if !iter.page.NotDone() { 1561 return APIVersionSetContract{} 1562 } 1563 return iter.page.Values()[iter.i] 1564} 1565 1566// IsEmpty returns true if the ListResult contains no values. 1567func (avsc APIVersionSetCollection) IsEmpty() bool { 1568 return avsc.Value == nil || len(*avsc.Value) == 0 1569} 1570 1571// aPIVersionSetCollectionPreparer prepares a request to retrieve the next set of results. 1572// It returns nil if no more results exist. 1573func (avsc APIVersionSetCollection) aPIVersionSetCollectionPreparer() (*http.Request, error) { 1574 if avsc.NextLink == nil || len(to.String(avsc.NextLink)) < 1 { 1575 return nil, nil 1576 } 1577 return autorest.Prepare(&http.Request{}, 1578 autorest.AsJSON(), 1579 autorest.AsGet(), 1580 autorest.WithBaseURL(to.String(avsc.NextLink))) 1581} 1582 1583// APIVersionSetCollectionPage contains a page of APIVersionSetContract values. 1584type APIVersionSetCollectionPage struct { 1585 fn func(APIVersionSetCollection) (APIVersionSetCollection, error) 1586 avsc APIVersionSetCollection 1587} 1588 1589// Next advances to the next page of values. If there was an error making 1590// the request the page does not advance and the error is returned. 1591func (page *APIVersionSetCollectionPage) Next() error { 1592 next, err := page.fn(page.avsc) 1593 if err != nil { 1594 return err 1595 } 1596 page.avsc = next 1597 return nil 1598} 1599 1600// NotDone returns true if the page enumeration should be started or is not yet complete. 1601func (page APIVersionSetCollectionPage) NotDone() bool { 1602 return !page.avsc.IsEmpty() 1603} 1604 1605// Response returns the raw server response from the last page request. 1606func (page APIVersionSetCollectionPage) Response() APIVersionSetCollection { 1607 return page.avsc 1608} 1609 1610// Values returns the slice of values for the current page or nil if there are no values. 1611func (page APIVersionSetCollectionPage) Values() []APIVersionSetContract { 1612 if page.avsc.IsEmpty() { 1613 return nil 1614 } 1615 return *page.avsc.Value 1616} 1617 1618// APIVersionSetContract api Version Set Contract details. 1619type APIVersionSetContract struct { 1620 autorest.Response `json:"-"` 1621 // APIVersionSetContractProperties - Api VersionSet contract properties. 1622 *APIVersionSetContractProperties `json:"properties,omitempty"` 1623 // ID - Resource ID. 1624 ID *string `json:"id,omitempty"` 1625 // Name - Resource name. 1626 Name *string `json:"name,omitempty"` 1627 // Type - Resource type for API Management resource. 1628 Type *string `json:"type,omitempty"` 1629} 1630 1631// MarshalJSON is the custom marshaler for APIVersionSetContract. 1632func (avsc APIVersionSetContract) MarshalJSON() ([]byte, error) { 1633 objectMap := make(map[string]interface{}) 1634 if avsc.APIVersionSetContractProperties != nil { 1635 objectMap["properties"] = avsc.APIVersionSetContractProperties 1636 } 1637 if avsc.ID != nil { 1638 objectMap["id"] = avsc.ID 1639 } 1640 if avsc.Name != nil { 1641 objectMap["name"] = avsc.Name 1642 } 1643 if avsc.Type != nil { 1644 objectMap["type"] = avsc.Type 1645 } 1646 return json.Marshal(objectMap) 1647} 1648 1649// UnmarshalJSON is the custom unmarshaler for APIVersionSetContract struct. 1650func (avsc *APIVersionSetContract) UnmarshalJSON(body []byte) error { 1651 var m map[string]*json.RawMessage 1652 err := json.Unmarshal(body, &m) 1653 if err != nil { 1654 return err 1655 } 1656 for k, v := range m { 1657 switch k { 1658 case "properties": 1659 if v != nil { 1660 var APIVersionSetContractProperties APIVersionSetContractProperties 1661 err = json.Unmarshal(*v, &APIVersionSetContractProperties) 1662 if err != nil { 1663 return err 1664 } 1665 avsc.APIVersionSetContractProperties = &APIVersionSetContractProperties 1666 } 1667 case "id": 1668 if v != nil { 1669 var ID string 1670 err = json.Unmarshal(*v, &ID) 1671 if err != nil { 1672 return err 1673 } 1674 avsc.ID = &ID 1675 } 1676 case "name": 1677 if v != nil { 1678 var name string 1679 err = json.Unmarshal(*v, &name) 1680 if err != nil { 1681 return err 1682 } 1683 avsc.Name = &name 1684 } 1685 case "type": 1686 if v != nil { 1687 var typeVar string 1688 err = json.Unmarshal(*v, &typeVar) 1689 if err != nil { 1690 return err 1691 } 1692 avsc.Type = &typeVar 1693 } 1694 } 1695 } 1696 1697 return nil 1698} 1699 1700// APIVersionSetContractDetails an API Version Set contains the common configuration for a set of API Versions 1701// relating 1702type APIVersionSetContractDetails struct { 1703 // ID - Identifier for existing API Version Set. Omit this value to create a new Version Set. 1704 ID *string `json:"id,omitempty"` 1705 // Description - Description of API Version Set. 1706 Description *string `json:"description,omitempty"` 1707 // VersioningScheme - An value that determines where the API Version identifer will be located in a HTTP request. Possible values include: 'VersioningScheme1Segment', 'VersioningScheme1Query', 'VersioningScheme1Header' 1708 VersioningScheme VersioningScheme1 `json:"versioningScheme,omitempty"` 1709 // VersionQueryName - Name of query parameter that indicates the API Version if versioningScheme is set to `query`. 1710 VersionQueryName *string `json:"versionQueryName,omitempty"` 1711 // VersionHeaderName - Name of HTTP header parameter that indicates the API Version if versioningScheme is set to `header`. 1712 VersionHeaderName *string `json:"versionHeaderName,omitempty"` 1713} 1714 1715// APIVersionSetContractProperties properties of an API Version Set. 1716type APIVersionSetContractProperties struct { 1717 // DisplayName - Name of API Version Set 1718 DisplayName *string `json:"displayName,omitempty"` 1719 // VersioningScheme - An value that determines where the API Version identifer will be located in a HTTP request. Possible values include: 'VersioningSchemeSegment', 'VersioningSchemeQuery', 'VersioningSchemeHeader' 1720 VersioningScheme VersioningScheme `json:"versioningScheme,omitempty"` 1721 // Description - Description of API Version Set. 1722 Description *string `json:"description,omitempty"` 1723 // VersionQueryName - Name of query parameter that indicates the API Version if versioningScheme is set to `query`. 1724 VersionQueryName *string `json:"versionQueryName,omitempty"` 1725 // VersionHeaderName - Name of HTTP header parameter that indicates the API Version if versioningScheme is set to `header`. 1726 VersionHeaderName *string `json:"versionHeaderName,omitempty"` 1727} 1728 1729// APIVersionSetEntityBase api Version set base parameters 1730type APIVersionSetEntityBase struct { 1731 // Description - Description of API Version Set. 1732 Description *string `json:"description,omitempty"` 1733 // VersionQueryName - Name of query parameter that indicates the API Version if versioningScheme is set to `query`. 1734 VersionQueryName *string `json:"versionQueryName,omitempty"` 1735 // VersionHeaderName - Name of HTTP header parameter that indicates the API Version if versioningScheme is set to `header`. 1736 VersionHeaderName *string `json:"versionHeaderName,omitempty"` 1737} 1738 1739// APIVersionSetUpdateParameters parameters to update or create an Api Version Set Contract. 1740type APIVersionSetUpdateParameters struct { 1741 // APIVersionSetUpdateParametersProperties - Parameters to update or create an Api Version Set Contract. 1742 *APIVersionSetUpdateParametersProperties `json:"properties,omitempty"` 1743} 1744 1745// MarshalJSON is the custom marshaler for APIVersionSetUpdateParameters. 1746func (avsup APIVersionSetUpdateParameters) MarshalJSON() ([]byte, error) { 1747 objectMap := make(map[string]interface{}) 1748 if avsup.APIVersionSetUpdateParametersProperties != nil { 1749 objectMap["properties"] = avsup.APIVersionSetUpdateParametersProperties 1750 } 1751 return json.Marshal(objectMap) 1752} 1753 1754// UnmarshalJSON is the custom unmarshaler for APIVersionSetUpdateParameters struct. 1755func (avsup *APIVersionSetUpdateParameters) UnmarshalJSON(body []byte) error { 1756 var m map[string]*json.RawMessage 1757 err := json.Unmarshal(body, &m) 1758 if err != nil { 1759 return err 1760 } 1761 for k, v := range m { 1762 switch k { 1763 case "properties": 1764 if v != nil { 1765 var APIVersionSetUpdateParametersProperties APIVersionSetUpdateParametersProperties 1766 err = json.Unmarshal(*v, &APIVersionSetUpdateParametersProperties) 1767 if err != nil { 1768 return err 1769 } 1770 avsup.APIVersionSetUpdateParametersProperties = &APIVersionSetUpdateParametersProperties 1771 } 1772 } 1773 } 1774 1775 return nil 1776} 1777 1778// APIVersionSetUpdateParametersProperties properties used to create or update an API Version Set. 1779type APIVersionSetUpdateParametersProperties struct { 1780 // DisplayName - Name of API Version Set 1781 DisplayName *string `json:"displayName,omitempty"` 1782 // VersioningScheme - An value that determines where the API Version identifer will be located in a HTTP request. Possible values include: 'VersioningSchemeSegment', 'VersioningSchemeQuery', 'VersioningSchemeHeader' 1783 VersioningScheme VersioningScheme `json:"versioningScheme,omitempty"` 1784 // Description - Description of API Version Set. 1785 Description *string `json:"description,omitempty"` 1786 // VersionQueryName - Name of query parameter that indicates the API Version if versioningScheme is set to `query`. 1787 VersionQueryName *string `json:"versionQueryName,omitempty"` 1788 // VersionHeaderName - Name of HTTP header parameter that indicates the API Version if versioningScheme is set to `header`. 1789 VersionHeaderName *string `json:"versionHeaderName,omitempty"` 1790} 1791 1792// AuthenticationSettingsContract API Authentication Settings. 1793type AuthenticationSettingsContract struct { 1794 // OAuth2 - OAuth2 Authentication settings 1795 OAuth2 *OAuth2AuthenticationSettingsContract `json:"oAuth2,omitempty"` 1796} 1797 1798// AuthorizationServerCollection paged OAuth2 Authorization Servers list representation. 1799type AuthorizationServerCollection struct { 1800 autorest.Response `json:"-"` 1801 // Value - Page values. 1802 Value *[]AuthorizationServerContract `json:"value,omitempty"` 1803 // Count - Total record count number across all pages. 1804 Count *int64 `json:"count,omitempty"` 1805 // NextLink - Next page link if any. 1806 NextLink *string `json:"nextLink,omitempty"` 1807} 1808 1809// AuthorizationServerCollectionIterator provides access to a complete listing of AuthorizationServerContract 1810// values. 1811type AuthorizationServerCollectionIterator struct { 1812 i int 1813 page AuthorizationServerCollectionPage 1814} 1815 1816// Next advances to the next value. If there was an error making 1817// the request the iterator does not advance and the error is returned. 1818func (iter *AuthorizationServerCollectionIterator) Next() error { 1819 iter.i++ 1820 if iter.i < len(iter.page.Values()) { 1821 return nil 1822 } 1823 err := iter.page.Next() 1824 if err != nil { 1825 iter.i-- 1826 return err 1827 } 1828 iter.i = 0 1829 return nil 1830} 1831 1832// NotDone returns true if the enumeration should be started or is not yet complete. 1833func (iter AuthorizationServerCollectionIterator) NotDone() bool { 1834 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 1835} 1836 1837// Response returns the raw server response from the last page request. 1838func (iter AuthorizationServerCollectionIterator) Response() AuthorizationServerCollection { 1839 return iter.page.Response() 1840} 1841 1842// Value returns the current value or a zero-initialized value if the 1843// iterator has advanced beyond the end of the collection. 1844func (iter AuthorizationServerCollectionIterator) Value() AuthorizationServerContract { 1845 if !iter.page.NotDone() { 1846 return AuthorizationServerContract{} 1847 } 1848 return iter.page.Values()[iter.i] 1849} 1850 1851// IsEmpty returns true if the ListResult contains no values. 1852func (asc AuthorizationServerCollection) IsEmpty() bool { 1853 return asc.Value == nil || len(*asc.Value) == 0 1854} 1855 1856// authorizationServerCollectionPreparer prepares a request to retrieve the next set of results. 1857// It returns nil if no more results exist. 1858func (asc AuthorizationServerCollection) authorizationServerCollectionPreparer() (*http.Request, error) { 1859 if asc.NextLink == nil || len(to.String(asc.NextLink)) < 1 { 1860 return nil, nil 1861 } 1862 return autorest.Prepare(&http.Request{}, 1863 autorest.AsJSON(), 1864 autorest.AsGet(), 1865 autorest.WithBaseURL(to.String(asc.NextLink))) 1866} 1867 1868// AuthorizationServerCollectionPage contains a page of AuthorizationServerContract values. 1869type AuthorizationServerCollectionPage struct { 1870 fn func(AuthorizationServerCollection) (AuthorizationServerCollection, error) 1871 asc AuthorizationServerCollection 1872} 1873 1874// Next advances to the next page of values. If there was an error making 1875// the request the page does not advance and the error is returned. 1876func (page *AuthorizationServerCollectionPage) Next() error { 1877 next, err := page.fn(page.asc) 1878 if err != nil { 1879 return err 1880 } 1881 page.asc = next 1882 return nil 1883} 1884 1885// NotDone returns true if the page enumeration should be started or is not yet complete. 1886func (page AuthorizationServerCollectionPage) NotDone() bool { 1887 return !page.asc.IsEmpty() 1888} 1889 1890// Response returns the raw server response from the last page request. 1891func (page AuthorizationServerCollectionPage) Response() AuthorizationServerCollection { 1892 return page.asc 1893} 1894 1895// Values returns the slice of values for the current page or nil if there are no values. 1896func (page AuthorizationServerCollectionPage) Values() []AuthorizationServerContract { 1897 if page.asc.IsEmpty() { 1898 return nil 1899 } 1900 return *page.asc.Value 1901} 1902 1903// AuthorizationServerContract external OAuth authorization server settings. 1904type AuthorizationServerContract struct { 1905 autorest.Response `json:"-"` 1906 // AuthorizationServerContractProperties - Properties of the External OAuth authorization server Contract. 1907 *AuthorizationServerContractProperties `json:"properties,omitempty"` 1908 // ID - Resource ID. 1909 ID *string `json:"id,omitempty"` 1910 // Name - Resource name. 1911 Name *string `json:"name,omitempty"` 1912 // Type - Resource type for API Management resource. 1913 Type *string `json:"type,omitempty"` 1914} 1915 1916// MarshalJSON is the custom marshaler for AuthorizationServerContract. 1917func (asc AuthorizationServerContract) MarshalJSON() ([]byte, error) { 1918 objectMap := make(map[string]interface{}) 1919 if asc.AuthorizationServerContractProperties != nil { 1920 objectMap["properties"] = asc.AuthorizationServerContractProperties 1921 } 1922 if asc.ID != nil { 1923 objectMap["id"] = asc.ID 1924 } 1925 if asc.Name != nil { 1926 objectMap["name"] = asc.Name 1927 } 1928 if asc.Type != nil { 1929 objectMap["type"] = asc.Type 1930 } 1931 return json.Marshal(objectMap) 1932} 1933 1934// UnmarshalJSON is the custom unmarshaler for AuthorizationServerContract struct. 1935func (asc *AuthorizationServerContract) UnmarshalJSON(body []byte) error { 1936 var m map[string]*json.RawMessage 1937 err := json.Unmarshal(body, &m) 1938 if err != nil { 1939 return err 1940 } 1941 for k, v := range m { 1942 switch k { 1943 case "properties": 1944 if v != nil { 1945 var authorizationServerContractProperties AuthorizationServerContractProperties 1946 err = json.Unmarshal(*v, &authorizationServerContractProperties) 1947 if err != nil { 1948 return err 1949 } 1950 asc.AuthorizationServerContractProperties = &authorizationServerContractProperties 1951 } 1952 case "id": 1953 if v != nil { 1954 var ID string 1955 err = json.Unmarshal(*v, &ID) 1956 if err != nil { 1957 return err 1958 } 1959 asc.ID = &ID 1960 } 1961 case "name": 1962 if v != nil { 1963 var name string 1964 err = json.Unmarshal(*v, &name) 1965 if err != nil { 1966 return err 1967 } 1968 asc.Name = &name 1969 } 1970 case "type": 1971 if v != nil { 1972 var typeVar string 1973 err = json.Unmarshal(*v, &typeVar) 1974 if err != nil { 1975 return err 1976 } 1977 asc.Type = &typeVar 1978 } 1979 } 1980 } 1981 1982 return nil 1983} 1984 1985// AuthorizationServerContractBaseProperties external OAuth authorization server Update settings contract. 1986type AuthorizationServerContractBaseProperties struct { 1987 // Description - Description of the authorization server. Can contain HTML formatting tags. 1988 Description *string `json:"description,omitempty"` 1989 // AuthorizationMethods - HTTP verbs supported by the authorization endpoint. GET must be always present. POST is optional. 1990 AuthorizationMethods *[]AuthorizationMethod `json:"authorizationMethods,omitempty"` 1991 // ClientAuthenticationMethod - Method of authentication supported by the token endpoint of this authorization server. Possible values are Basic and/or Body. When Body is specified, client credentials and other parameters are passed within the request body in the application/x-www-form-urlencoded format. 1992 ClientAuthenticationMethod *[]ClientAuthenticationMethod `json:"clientAuthenticationMethod,omitempty"` 1993 // TokenBodyParameters - Additional parameters required by the token endpoint of this authorization server represented as an array of JSON objects with name and value string properties, i.e. {"name" : "name value", "value": "a value"}. 1994 TokenBodyParameters *[]TokenBodyParameterContract `json:"tokenBodyParameters,omitempty"` 1995 // TokenEndpoint - OAuth token endpoint. Contains absolute URI to entity being referenced. 1996 TokenEndpoint *string `json:"tokenEndpoint,omitempty"` 1997 // SupportState - If true, authorization server will include state parameter from the authorization request to its response. Client may use state parameter to raise protocol security. 1998 SupportState *bool `json:"supportState,omitempty"` 1999 // DefaultScope - Access token scope that is going to be requested by default. Can be overridden at the API level. Should be provided in the form of a string containing space-delimited values. 2000 DefaultScope *string `json:"defaultScope,omitempty"` 2001 // BearerTokenSendingMethods - Specifies the mechanism by which access token is passed to the API. 2002 BearerTokenSendingMethods *[]BearerTokenSendingMethod `json:"bearerTokenSendingMethods,omitempty"` 2003 // ClientSecret - Client or app secret registered with this authorization server. 2004 ClientSecret *string `json:"clientSecret,omitempty"` 2005 // ResourceOwnerUsername - Can be optionally specified when resource owner password grant type is supported by this authorization server. Default resource owner username. 2006 ResourceOwnerUsername *string `json:"resourceOwnerUsername,omitempty"` 2007 // ResourceOwnerPassword - Can be optionally specified when resource owner password grant type is supported by this authorization server. Default resource owner password. 2008 ResourceOwnerPassword *string `json:"resourceOwnerPassword,omitempty"` 2009} 2010 2011// AuthorizationServerContractProperties external OAuth authorization server settings Properties. 2012type AuthorizationServerContractProperties struct { 2013 // DisplayName - User-friendly authorization server name. 2014 DisplayName *string `json:"displayName,omitempty"` 2015 // ClientRegistrationEndpoint - Optional reference to a page where client or app registration for this authorization server is performed. Contains absolute URL to entity being referenced. 2016 ClientRegistrationEndpoint *string `json:"clientRegistrationEndpoint,omitempty"` 2017 // AuthorizationEndpoint - OAuth authorization endpoint. See http://tools.ietf.org/html/rfc6749#section-3.2. 2018 AuthorizationEndpoint *string `json:"authorizationEndpoint,omitempty"` 2019 // GrantTypes - Form of an authorization grant, which the client uses to request the access token. 2020 GrantTypes *[]GrantType `json:"grantTypes,omitempty"` 2021 // ClientID - Client or app id registered with this authorization server. 2022 ClientID *string `json:"clientId,omitempty"` 2023 // Description - Description of the authorization server. Can contain HTML formatting tags. 2024 Description *string `json:"description,omitempty"` 2025 // AuthorizationMethods - HTTP verbs supported by the authorization endpoint. GET must be always present. POST is optional. 2026 AuthorizationMethods *[]AuthorizationMethod `json:"authorizationMethods,omitempty"` 2027 // ClientAuthenticationMethod - Method of authentication supported by the token endpoint of this authorization server. Possible values are Basic and/or Body. When Body is specified, client credentials and other parameters are passed within the request body in the application/x-www-form-urlencoded format. 2028 ClientAuthenticationMethod *[]ClientAuthenticationMethod `json:"clientAuthenticationMethod,omitempty"` 2029 // TokenBodyParameters - Additional parameters required by the token endpoint of this authorization server represented as an array of JSON objects with name and value string properties, i.e. {"name" : "name value", "value": "a value"}. 2030 TokenBodyParameters *[]TokenBodyParameterContract `json:"tokenBodyParameters,omitempty"` 2031 // TokenEndpoint - OAuth token endpoint. Contains absolute URI to entity being referenced. 2032 TokenEndpoint *string `json:"tokenEndpoint,omitempty"` 2033 // SupportState - If true, authorization server will include state parameter from the authorization request to its response. Client may use state parameter to raise protocol security. 2034 SupportState *bool `json:"supportState,omitempty"` 2035 // DefaultScope - Access token scope that is going to be requested by default. Can be overridden at the API level. Should be provided in the form of a string containing space-delimited values. 2036 DefaultScope *string `json:"defaultScope,omitempty"` 2037 // BearerTokenSendingMethods - Specifies the mechanism by which access token is passed to the API. 2038 BearerTokenSendingMethods *[]BearerTokenSendingMethod `json:"bearerTokenSendingMethods,omitempty"` 2039 // ClientSecret - Client or app secret registered with this authorization server. 2040 ClientSecret *string `json:"clientSecret,omitempty"` 2041 // ResourceOwnerUsername - Can be optionally specified when resource owner password grant type is supported by this authorization server. Default resource owner username. 2042 ResourceOwnerUsername *string `json:"resourceOwnerUsername,omitempty"` 2043 // ResourceOwnerPassword - Can be optionally specified when resource owner password grant type is supported by this authorization server. Default resource owner password. 2044 ResourceOwnerPassword *string `json:"resourceOwnerPassword,omitempty"` 2045} 2046 2047// AuthorizationServerUpdateContract external OAuth authorization server settings. 2048type AuthorizationServerUpdateContract struct { 2049 // AuthorizationServerUpdateContractProperties - Properties of the External OAuth authorization server update Contract. 2050 *AuthorizationServerUpdateContractProperties `json:"properties,omitempty"` 2051 // ID - Resource ID. 2052 ID *string `json:"id,omitempty"` 2053 // Name - Resource name. 2054 Name *string `json:"name,omitempty"` 2055 // Type - Resource type for API Management resource. 2056 Type *string `json:"type,omitempty"` 2057} 2058 2059// MarshalJSON is the custom marshaler for AuthorizationServerUpdateContract. 2060func (asuc AuthorizationServerUpdateContract) MarshalJSON() ([]byte, error) { 2061 objectMap := make(map[string]interface{}) 2062 if asuc.AuthorizationServerUpdateContractProperties != nil { 2063 objectMap["properties"] = asuc.AuthorizationServerUpdateContractProperties 2064 } 2065 if asuc.ID != nil { 2066 objectMap["id"] = asuc.ID 2067 } 2068 if asuc.Name != nil { 2069 objectMap["name"] = asuc.Name 2070 } 2071 if asuc.Type != nil { 2072 objectMap["type"] = asuc.Type 2073 } 2074 return json.Marshal(objectMap) 2075} 2076 2077// UnmarshalJSON is the custom unmarshaler for AuthorizationServerUpdateContract struct. 2078func (asuc *AuthorizationServerUpdateContract) UnmarshalJSON(body []byte) error { 2079 var m map[string]*json.RawMessage 2080 err := json.Unmarshal(body, &m) 2081 if err != nil { 2082 return err 2083 } 2084 for k, v := range m { 2085 switch k { 2086 case "properties": 2087 if v != nil { 2088 var authorizationServerUpdateContractProperties AuthorizationServerUpdateContractProperties 2089 err = json.Unmarshal(*v, &authorizationServerUpdateContractProperties) 2090 if err != nil { 2091 return err 2092 } 2093 asuc.AuthorizationServerUpdateContractProperties = &authorizationServerUpdateContractProperties 2094 } 2095 case "id": 2096 if v != nil { 2097 var ID string 2098 err = json.Unmarshal(*v, &ID) 2099 if err != nil { 2100 return err 2101 } 2102 asuc.ID = &ID 2103 } 2104 case "name": 2105 if v != nil { 2106 var name string 2107 err = json.Unmarshal(*v, &name) 2108 if err != nil { 2109 return err 2110 } 2111 asuc.Name = &name 2112 } 2113 case "type": 2114 if v != nil { 2115 var typeVar string 2116 err = json.Unmarshal(*v, &typeVar) 2117 if err != nil { 2118 return err 2119 } 2120 asuc.Type = &typeVar 2121 } 2122 } 2123 } 2124 2125 return nil 2126} 2127 2128// AuthorizationServerUpdateContractProperties external OAuth authorization server Update settings contract. 2129type AuthorizationServerUpdateContractProperties struct { 2130 // DisplayName - User-friendly authorization server name. 2131 DisplayName *string `json:"displayName,omitempty"` 2132 // ClientRegistrationEndpoint - Optional reference to a page where client or app registration for this authorization server is performed. Contains absolute URL to entity being referenced. 2133 ClientRegistrationEndpoint *string `json:"clientRegistrationEndpoint,omitempty"` 2134 // AuthorizationEndpoint - OAuth authorization endpoint. See http://tools.ietf.org/html/rfc6749#section-3.2. 2135 AuthorizationEndpoint *string `json:"authorizationEndpoint,omitempty"` 2136 // GrantTypes - Form of an authorization grant, which the client uses to request the access token. 2137 GrantTypes *[]GrantType `json:"grantTypes,omitempty"` 2138 // ClientID - Client or app id registered with this authorization server. 2139 ClientID *string `json:"clientId,omitempty"` 2140 // Description - Description of the authorization server. Can contain HTML formatting tags. 2141 Description *string `json:"description,omitempty"` 2142 // AuthorizationMethods - HTTP verbs supported by the authorization endpoint. GET must be always present. POST is optional. 2143 AuthorizationMethods *[]AuthorizationMethod `json:"authorizationMethods,omitempty"` 2144 // ClientAuthenticationMethod - Method of authentication supported by the token endpoint of this authorization server. Possible values are Basic and/or Body. When Body is specified, client credentials and other parameters are passed within the request body in the application/x-www-form-urlencoded format. 2145 ClientAuthenticationMethod *[]ClientAuthenticationMethod `json:"clientAuthenticationMethod,omitempty"` 2146 // TokenBodyParameters - Additional parameters required by the token endpoint of this authorization server represented as an array of JSON objects with name and value string properties, i.e. {"name" : "name value", "value": "a value"}. 2147 TokenBodyParameters *[]TokenBodyParameterContract `json:"tokenBodyParameters,omitempty"` 2148 // TokenEndpoint - OAuth token endpoint. Contains absolute URI to entity being referenced. 2149 TokenEndpoint *string `json:"tokenEndpoint,omitempty"` 2150 // SupportState - If true, authorization server will include state parameter from the authorization request to its response. Client may use state parameter to raise protocol security. 2151 SupportState *bool `json:"supportState,omitempty"` 2152 // DefaultScope - Access token scope that is going to be requested by default. Can be overridden at the API level. Should be provided in the form of a string containing space-delimited values. 2153 DefaultScope *string `json:"defaultScope,omitempty"` 2154 // BearerTokenSendingMethods - Specifies the mechanism by which access token is passed to the API. 2155 BearerTokenSendingMethods *[]BearerTokenSendingMethod `json:"bearerTokenSendingMethods,omitempty"` 2156 // ClientSecret - Client or app secret registered with this authorization server. 2157 ClientSecret *string `json:"clientSecret,omitempty"` 2158 // ResourceOwnerUsername - Can be optionally specified when resource owner password grant type is supported by this authorization server. Default resource owner username. 2159 ResourceOwnerUsername *string `json:"resourceOwnerUsername,omitempty"` 2160 // ResourceOwnerPassword - Can be optionally specified when resource owner password grant type is supported by this authorization server. Default resource owner password. 2161 ResourceOwnerPassword *string `json:"resourceOwnerPassword,omitempty"` 2162} 2163 2164// BackendAuthorizationHeaderCredentials authorization header information. 2165type BackendAuthorizationHeaderCredentials struct { 2166 // Scheme - Authentication Scheme name. 2167 Scheme *string `json:"scheme,omitempty"` 2168 // Parameter - Authentication Parameter value. 2169 Parameter *string `json:"parameter,omitempty"` 2170} 2171 2172// BackendBaseParameters backend entity base Parameter set. 2173type BackendBaseParameters struct { 2174 // Title - Backend Title. 2175 Title *string `json:"title,omitempty"` 2176 // Description - Backend Description. 2177 Description *string `json:"description,omitempty"` 2178 // ResourceID - Management Uri of the Resource in External System. This url can be the Arm Resource Id of Logic Apps, Function Apps or Api Apps. 2179 ResourceID *string `json:"resourceId,omitempty"` 2180 // Properties - Backend Properties contract 2181 Properties *BackendProperties `json:"properties,omitempty"` 2182 // Credentials - Backend Credentials Contract Properties 2183 Credentials *BackendCredentialsContract `json:"credentials,omitempty"` 2184 // Proxy - Backend Proxy Contract Properties 2185 Proxy *BackendProxyContract `json:"proxy,omitempty"` 2186 // TLS - Backend TLS Properties 2187 TLS *BackendTLSProperties `json:"tls,omitempty"` 2188} 2189 2190// BackendCollection paged Backend list representation. 2191type BackendCollection struct { 2192 autorest.Response `json:"-"` 2193 // Value - Backend values. 2194 Value *[]BackendContract `json:"value,omitempty"` 2195 // NextLink - Next page link if any. 2196 NextLink *string `json:"nextLink,omitempty"` 2197} 2198 2199// BackendCollectionIterator provides access to a complete listing of BackendContract values. 2200type BackendCollectionIterator struct { 2201 i int 2202 page BackendCollectionPage 2203} 2204 2205// Next advances to the next value. If there was an error making 2206// the request the iterator does not advance and the error is returned. 2207func (iter *BackendCollectionIterator) Next() error { 2208 iter.i++ 2209 if iter.i < len(iter.page.Values()) { 2210 return nil 2211 } 2212 err := iter.page.Next() 2213 if err != nil { 2214 iter.i-- 2215 return err 2216 } 2217 iter.i = 0 2218 return nil 2219} 2220 2221// NotDone returns true if the enumeration should be started or is not yet complete. 2222func (iter BackendCollectionIterator) NotDone() bool { 2223 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 2224} 2225 2226// Response returns the raw server response from the last page request. 2227func (iter BackendCollectionIterator) Response() BackendCollection { 2228 return iter.page.Response() 2229} 2230 2231// Value returns the current value or a zero-initialized value if the 2232// iterator has advanced beyond the end of the collection. 2233func (iter BackendCollectionIterator) Value() BackendContract { 2234 if !iter.page.NotDone() { 2235 return BackendContract{} 2236 } 2237 return iter.page.Values()[iter.i] 2238} 2239 2240// IsEmpty returns true if the ListResult contains no values. 2241func (bc BackendCollection) IsEmpty() bool { 2242 return bc.Value == nil || len(*bc.Value) == 0 2243} 2244 2245// backendCollectionPreparer prepares a request to retrieve the next set of results. 2246// It returns nil if no more results exist. 2247func (bc BackendCollection) backendCollectionPreparer() (*http.Request, error) { 2248 if bc.NextLink == nil || len(to.String(bc.NextLink)) < 1 { 2249 return nil, nil 2250 } 2251 return autorest.Prepare(&http.Request{}, 2252 autorest.AsJSON(), 2253 autorest.AsGet(), 2254 autorest.WithBaseURL(to.String(bc.NextLink))) 2255} 2256 2257// BackendCollectionPage contains a page of BackendContract values. 2258type BackendCollectionPage struct { 2259 fn func(BackendCollection) (BackendCollection, error) 2260 bc BackendCollection 2261} 2262 2263// Next advances to the next page of values. If there was an error making 2264// the request the page does not advance and the error is returned. 2265func (page *BackendCollectionPage) Next() error { 2266 next, err := page.fn(page.bc) 2267 if err != nil { 2268 return err 2269 } 2270 page.bc = next 2271 return nil 2272} 2273 2274// NotDone returns true if the page enumeration should be started or is not yet complete. 2275func (page BackendCollectionPage) NotDone() bool { 2276 return !page.bc.IsEmpty() 2277} 2278 2279// Response returns the raw server response from the last page request. 2280func (page BackendCollectionPage) Response() BackendCollection { 2281 return page.bc 2282} 2283 2284// Values returns the slice of values for the current page or nil if there are no values. 2285func (page BackendCollectionPage) Values() []BackendContract { 2286 if page.bc.IsEmpty() { 2287 return nil 2288 } 2289 return *page.bc.Value 2290} 2291 2292// BackendContract backend details. 2293type BackendContract struct { 2294 autorest.Response `json:"-"` 2295 // BackendContractProperties - Backend entity contract properties. 2296 *BackendContractProperties `json:"properties,omitempty"` 2297 // ID - Resource ID. 2298 ID *string `json:"id,omitempty"` 2299 // Name - Resource name. 2300 Name *string `json:"name,omitempty"` 2301 // Type - Resource type for API Management resource. 2302 Type *string `json:"type,omitempty"` 2303} 2304 2305// MarshalJSON is the custom marshaler for BackendContract. 2306func (bc BackendContract) MarshalJSON() ([]byte, error) { 2307 objectMap := make(map[string]interface{}) 2308 if bc.BackendContractProperties != nil { 2309 objectMap["properties"] = bc.BackendContractProperties 2310 } 2311 if bc.ID != nil { 2312 objectMap["id"] = bc.ID 2313 } 2314 if bc.Name != nil { 2315 objectMap["name"] = bc.Name 2316 } 2317 if bc.Type != nil { 2318 objectMap["type"] = bc.Type 2319 } 2320 return json.Marshal(objectMap) 2321} 2322 2323// UnmarshalJSON is the custom unmarshaler for BackendContract struct. 2324func (bc *BackendContract) UnmarshalJSON(body []byte) error { 2325 var m map[string]*json.RawMessage 2326 err := json.Unmarshal(body, &m) 2327 if err != nil { 2328 return err 2329 } 2330 for k, v := range m { 2331 switch k { 2332 case "properties": 2333 if v != nil { 2334 var backendContractProperties BackendContractProperties 2335 err = json.Unmarshal(*v, &backendContractProperties) 2336 if err != nil { 2337 return err 2338 } 2339 bc.BackendContractProperties = &backendContractProperties 2340 } 2341 case "id": 2342 if v != nil { 2343 var ID string 2344 err = json.Unmarshal(*v, &ID) 2345 if err != nil { 2346 return err 2347 } 2348 bc.ID = &ID 2349 } 2350 case "name": 2351 if v != nil { 2352 var name string 2353 err = json.Unmarshal(*v, &name) 2354 if err != nil { 2355 return err 2356 } 2357 bc.Name = &name 2358 } 2359 case "type": 2360 if v != nil { 2361 var typeVar string 2362 err = json.Unmarshal(*v, &typeVar) 2363 if err != nil { 2364 return err 2365 } 2366 bc.Type = &typeVar 2367 } 2368 } 2369 } 2370 2371 return nil 2372} 2373 2374// BackendContractProperties parameters supplied to the Create Backend operation. 2375type BackendContractProperties struct { 2376 // URL - Runtime Url of the Backend. 2377 URL *string `json:"url,omitempty"` 2378 // Protocol - Backend communication protocol. Possible values include: 'BackendProtocolHTTP', 'BackendProtocolSoap' 2379 Protocol BackendProtocol `json:"protocol,omitempty"` 2380 // Title - Backend Title. 2381 Title *string `json:"title,omitempty"` 2382 // Description - Backend Description. 2383 Description *string `json:"description,omitempty"` 2384 // ResourceID - Management Uri of the Resource in External System. This url can be the Arm Resource Id of Logic Apps, Function Apps or Api Apps. 2385 ResourceID *string `json:"resourceId,omitempty"` 2386 // Properties - Backend Properties contract 2387 Properties *BackendProperties `json:"properties,omitempty"` 2388 // Credentials - Backend Credentials Contract Properties 2389 Credentials *BackendCredentialsContract `json:"credentials,omitempty"` 2390 // Proxy - Backend Proxy Contract Properties 2391 Proxy *BackendProxyContract `json:"proxy,omitempty"` 2392 // TLS - Backend TLS Properties 2393 TLS *BackendTLSProperties `json:"tls,omitempty"` 2394} 2395 2396// BackendCredentialsContract details of the Credentials used to connect to Backend. 2397type BackendCredentialsContract struct { 2398 // Certificate - List of Client Certificate Thumbprint. 2399 Certificate *[]string `json:"certificate,omitempty"` 2400 // Query - Query Parameter description. 2401 Query map[string][]string `json:"query"` 2402 // Header - Header Parameter description. 2403 Header map[string][]string `json:"header"` 2404 // Authorization - Authorization header authentication 2405 Authorization *BackendAuthorizationHeaderCredentials `json:"authorization,omitempty"` 2406} 2407 2408// MarshalJSON is the custom marshaler for BackendCredentialsContract. 2409func (bcc BackendCredentialsContract) MarshalJSON() ([]byte, error) { 2410 objectMap := make(map[string]interface{}) 2411 if bcc.Certificate != nil { 2412 objectMap["certificate"] = bcc.Certificate 2413 } 2414 if bcc.Query != nil { 2415 objectMap["query"] = bcc.Query 2416 } 2417 if bcc.Header != nil { 2418 objectMap["header"] = bcc.Header 2419 } 2420 if bcc.Authorization != nil { 2421 objectMap["authorization"] = bcc.Authorization 2422 } 2423 return json.Marshal(objectMap) 2424} 2425 2426// BackendProperties properties specific to the Backend Type. 2427type BackendProperties struct { 2428 // ServiceFabricCluster - Backend Service Fabric Cluster Properties 2429 ServiceFabricCluster *BackendServiceFabricClusterProperties `json:"serviceFabricCluster,omitempty"` 2430} 2431 2432// BackendProxyContract details of the Backend WebProxy Server to use in the Request to Backend. 2433type BackendProxyContract struct { 2434 // URL - WebProxy Server AbsoluteUri property which includes the entire URI stored in the Uri instance, including all fragments and query strings. 2435 URL *string `json:"url,omitempty"` 2436 // Username - Username to connect to the WebProxy server 2437 Username *string `json:"username,omitempty"` 2438 // Password - Password to connect to the WebProxy Server 2439 Password *string `json:"password,omitempty"` 2440} 2441 2442// BackendReconnectContract reconnect request parameters. 2443type BackendReconnectContract struct { 2444 // BackendReconnectProperties - Reconnect request properties. 2445 *BackendReconnectProperties `json:"properties,omitempty"` 2446 // ID - Resource ID. 2447 ID *string `json:"id,omitempty"` 2448 // Name - Resource name. 2449 Name *string `json:"name,omitempty"` 2450 // Type - Resource type for API Management resource. 2451 Type *string `json:"type,omitempty"` 2452} 2453 2454// MarshalJSON is the custom marshaler for BackendReconnectContract. 2455func (brc BackendReconnectContract) MarshalJSON() ([]byte, error) { 2456 objectMap := make(map[string]interface{}) 2457 if brc.BackendReconnectProperties != nil { 2458 objectMap["properties"] = brc.BackendReconnectProperties 2459 } 2460 if brc.ID != nil { 2461 objectMap["id"] = brc.ID 2462 } 2463 if brc.Name != nil { 2464 objectMap["name"] = brc.Name 2465 } 2466 if brc.Type != nil { 2467 objectMap["type"] = brc.Type 2468 } 2469 return json.Marshal(objectMap) 2470} 2471 2472// UnmarshalJSON is the custom unmarshaler for BackendReconnectContract struct. 2473func (brc *BackendReconnectContract) UnmarshalJSON(body []byte) error { 2474 var m map[string]*json.RawMessage 2475 err := json.Unmarshal(body, &m) 2476 if err != nil { 2477 return err 2478 } 2479 for k, v := range m { 2480 switch k { 2481 case "properties": 2482 if v != nil { 2483 var backendReconnectProperties BackendReconnectProperties 2484 err = json.Unmarshal(*v, &backendReconnectProperties) 2485 if err != nil { 2486 return err 2487 } 2488 brc.BackendReconnectProperties = &backendReconnectProperties 2489 } 2490 case "id": 2491 if v != nil { 2492 var ID string 2493 err = json.Unmarshal(*v, &ID) 2494 if err != nil { 2495 return err 2496 } 2497 brc.ID = &ID 2498 } 2499 case "name": 2500 if v != nil { 2501 var name string 2502 err = json.Unmarshal(*v, &name) 2503 if err != nil { 2504 return err 2505 } 2506 brc.Name = &name 2507 } 2508 case "type": 2509 if v != nil { 2510 var typeVar string 2511 err = json.Unmarshal(*v, &typeVar) 2512 if err != nil { 2513 return err 2514 } 2515 brc.Type = &typeVar 2516 } 2517 } 2518 } 2519 2520 return nil 2521} 2522 2523// BackendReconnectProperties properties to control reconnect requests. 2524type BackendReconnectProperties struct { 2525 // After - Duration in ISO8601 format after which reconnect will be initiated. Minimum duration of the Reconect is PT2M. 2526 After *string `json:"after,omitempty"` 2527} 2528 2529// BackendServiceFabricClusterProperties properties of the Service Fabric Type Backend. 2530type BackendServiceFabricClusterProperties struct { 2531 // ClientCertificatethumbprint - The client certificate thumbprint for the management endpoint. 2532 ClientCertificatethumbprint *string `json:"clientCertificatethumbprint,omitempty"` 2533 // MaxPartitionResolutionRetries - Maximum number of retries while attempting resolve the parition. 2534 MaxPartitionResolutionRetries *int32 `json:"maxPartitionResolutionRetries,omitempty"` 2535 // ManagementEndpoints - The cluster management endpoint. 2536 ManagementEndpoints *[]string `json:"managementEndpoints,omitempty"` 2537 // ServerCertificateThumbprints - Thumbprints of certificates cluster management service uses for tls communication 2538 ServerCertificateThumbprints *[]string `json:"serverCertificateThumbprints,omitempty"` 2539 // ServerX509Names - Server X509 Certificate Names Collection 2540 ServerX509Names *[]X509CertificateName `json:"serverX509Names,omitempty"` 2541} 2542 2543// BackendTLSProperties properties controlling TLS Certificate Validation. 2544type BackendTLSProperties struct { 2545 // ValidateCertificateChain - Flag indicating whether SSL certificate chain validation should be done when using self-signed certificates for this backend host. 2546 ValidateCertificateChain *bool `json:"validateCertificateChain,omitempty"` 2547 // ValidateCertificateName - Flag indicating whether SSL certificate name validation should be done when using self-signed certificates for this backend host. 2548 ValidateCertificateName *bool `json:"validateCertificateName,omitempty"` 2549} 2550 2551// BackendUpdateParameterProperties parameters supplied to the Update Backend operation. 2552type BackendUpdateParameterProperties struct { 2553 // URL - Runtime Url of the Backend. 2554 URL *string `json:"url,omitempty"` 2555 // Protocol - Backend communication protocol. Possible values include: 'BackendProtocolHTTP', 'BackendProtocolSoap' 2556 Protocol BackendProtocol `json:"protocol,omitempty"` 2557 // Title - Backend Title. 2558 Title *string `json:"title,omitempty"` 2559 // Description - Backend Description. 2560 Description *string `json:"description,omitempty"` 2561 // ResourceID - Management Uri of the Resource in External System. This url can be the Arm Resource Id of Logic Apps, Function Apps or Api Apps. 2562 ResourceID *string `json:"resourceId,omitempty"` 2563 // Properties - Backend Properties contract 2564 Properties *BackendProperties `json:"properties,omitempty"` 2565 // Credentials - Backend Credentials Contract Properties 2566 Credentials *BackendCredentialsContract `json:"credentials,omitempty"` 2567 // Proxy - Backend Proxy Contract Properties 2568 Proxy *BackendProxyContract `json:"proxy,omitempty"` 2569 // TLS - Backend TLS Properties 2570 TLS *BackendTLSProperties `json:"tls,omitempty"` 2571} 2572 2573// BackendUpdateParameters backend update parameters. 2574type BackendUpdateParameters struct { 2575 // BackendUpdateParameterProperties - Backend entity update contract properties. 2576 *BackendUpdateParameterProperties `json:"properties,omitempty"` 2577} 2578 2579// MarshalJSON is the custom marshaler for BackendUpdateParameters. 2580func (bup BackendUpdateParameters) MarshalJSON() ([]byte, error) { 2581 objectMap := make(map[string]interface{}) 2582 if bup.BackendUpdateParameterProperties != nil { 2583 objectMap["properties"] = bup.BackendUpdateParameterProperties 2584 } 2585 return json.Marshal(objectMap) 2586} 2587 2588// UnmarshalJSON is the custom unmarshaler for BackendUpdateParameters struct. 2589func (bup *BackendUpdateParameters) UnmarshalJSON(body []byte) error { 2590 var m map[string]*json.RawMessage 2591 err := json.Unmarshal(body, &m) 2592 if err != nil { 2593 return err 2594 } 2595 for k, v := range m { 2596 switch k { 2597 case "properties": 2598 if v != nil { 2599 var backendUpdateParameterProperties BackendUpdateParameterProperties 2600 err = json.Unmarshal(*v, &backendUpdateParameterProperties) 2601 if err != nil { 2602 return err 2603 } 2604 bup.BackendUpdateParameterProperties = &backendUpdateParameterProperties 2605 } 2606 } 2607 } 2608 2609 return nil 2610} 2611 2612// BodyDiagnosticSettings body logging settings. 2613type BodyDiagnosticSettings struct { 2614 // Bytes - Number of request body bytes to log. 2615 Bytes *int32 `json:"bytes,omitempty"` 2616} 2617 2618// CertificateCollection paged Certificates list representation. 2619type CertificateCollection struct { 2620 autorest.Response `json:"-"` 2621 // Value - Page values. 2622 Value *[]CertificateContract `json:"value,omitempty"` 2623 // NextLink - Next page link if any. 2624 NextLink *string `json:"nextLink,omitempty"` 2625} 2626 2627// CertificateCollectionIterator provides access to a complete listing of CertificateContract values. 2628type CertificateCollectionIterator struct { 2629 i int 2630 page CertificateCollectionPage 2631} 2632 2633// Next advances to the next value. If there was an error making 2634// the request the iterator does not advance and the error is returned. 2635func (iter *CertificateCollectionIterator) Next() error { 2636 iter.i++ 2637 if iter.i < len(iter.page.Values()) { 2638 return nil 2639 } 2640 err := iter.page.Next() 2641 if err != nil { 2642 iter.i-- 2643 return err 2644 } 2645 iter.i = 0 2646 return nil 2647} 2648 2649// NotDone returns true if the enumeration should be started or is not yet complete. 2650func (iter CertificateCollectionIterator) NotDone() bool { 2651 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 2652} 2653 2654// Response returns the raw server response from the last page request. 2655func (iter CertificateCollectionIterator) Response() CertificateCollection { 2656 return iter.page.Response() 2657} 2658 2659// Value returns the current value or a zero-initialized value if the 2660// iterator has advanced beyond the end of the collection. 2661func (iter CertificateCollectionIterator) Value() CertificateContract { 2662 if !iter.page.NotDone() { 2663 return CertificateContract{} 2664 } 2665 return iter.page.Values()[iter.i] 2666} 2667 2668// IsEmpty returns true if the ListResult contains no values. 2669func (cc CertificateCollection) IsEmpty() bool { 2670 return cc.Value == nil || len(*cc.Value) == 0 2671} 2672 2673// certificateCollectionPreparer prepares a request to retrieve the next set of results. 2674// It returns nil if no more results exist. 2675func (cc CertificateCollection) certificateCollectionPreparer() (*http.Request, error) { 2676 if cc.NextLink == nil || len(to.String(cc.NextLink)) < 1 { 2677 return nil, nil 2678 } 2679 return autorest.Prepare(&http.Request{}, 2680 autorest.AsJSON(), 2681 autorest.AsGet(), 2682 autorest.WithBaseURL(to.String(cc.NextLink))) 2683} 2684 2685// CertificateCollectionPage contains a page of CertificateContract values. 2686type CertificateCollectionPage struct { 2687 fn func(CertificateCollection) (CertificateCollection, error) 2688 cc CertificateCollection 2689} 2690 2691// Next advances to the next page of values. If there was an error making 2692// the request the page does not advance and the error is returned. 2693func (page *CertificateCollectionPage) Next() error { 2694 next, err := page.fn(page.cc) 2695 if err != nil { 2696 return err 2697 } 2698 page.cc = next 2699 return nil 2700} 2701 2702// NotDone returns true if the page enumeration should be started or is not yet complete. 2703func (page CertificateCollectionPage) NotDone() bool { 2704 return !page.cc.IsEmpty() 2705} 2706 2707// Response returns the raw server response from the last page request. 2708func (page CertificateCollectionPage) Response() CertificateCollection { 2709 return page.cc 2710} 2711 2712// Values returns the slice of values for the current page or nil if there are no values. 2713func (page CertificateCollectionPage) Values() []CertificateContract { 2714 if page.cc.IsEmpty() { 2715 return nil 2716 } 2717 return *page.cc.Value 2718} 2719 2720// CertificateConfiguration certificate configuration which consist of non-trusted intermediates and root 2721// certificates. 2722type CertificateConfiguration struct { 2723 // EncodedCertificate - Base64 Encoded certificate. 2724 EncodedCertificate *string `json:"encodedCertificate,omitempty"` 2725 // CertificatePassword - Certificate Password. 2726 CertificatePassword *string `json:"certificatePassword,omitempty"` 2727 // StoreName - The System.Security.Cryptography.x509certificates.Storename certificate store location. Only Root and CertificateAuthority are valid locations. Possible values include: 'CertificateAuthority', 'Root' 2728 StoreName StoreName `json:"storeName,omitempty"` 2729 // Certificate - Certificate information. 2730 Certificate *CertificateInformation `json:"certificate,omitempty"` 2731} 2732 2733// CertificateContract certificate details. 2734type CertificateContract struct { 2735 autorest.Response `json:"-"` 2736 // CertificateContractProperties - Certificate properties details. 2737 *CertificateContractProperties `json:"properties,omitempty"` 2738 // ID - Resource ID. 2739 ID *string `json:"id,omitempty"` 2740 // Name - Resource name. 2741 Name *string `json:"name,omitempty"` 2742 // Type - Resource type for API Management resource. 2743 Type *string `json:"type,omitempty"` 2744} 2745 2746// MarshalJSON is the custom marshaler for CertificateContract. 2747func (cc CertificateContract) MarshalJSON() ([]byte, error) { 2748 objectMap := make(map[string]interface{}) 2749 if cc.CertificateContractProperties != nil { 2750 objectMap["properties"] = cc.CertificateContractProperties 2751 } 2752 if cc.ID != nil { 2753 objectMap["id"] = cc.ID 2754 } 2755 if cc.Name != nil { 2756 objectMap["name"] = cc.Name 2757 } 2758 if cc.Type != nil { 2759 objectMap["type"] = cc.Type 2760 } 2761 return json.Marshal(objectMap) 2762} 2763 2764// UnmarshalJSON is the custom unmarshaler for CertificateContract struct. 2765func (cc *CertificateContract) UnmarshalJSON(body []byte) error { 2766 var m map[string]*json.RawMessage 2767 err := json.Unmarshal(body, &m) 2768 if err != nil { 2769 return err 2770 } 2771 for k, v := range m { 2772 switch k { 2773 case "properties": 2774 if v != nil { 2775 var certificateContractProperties CertificateContractProperties 2776 err = json.Unmarshal(*v, &certificateContractProperties) 2777 if err != nil { 2778 return err 2779 } 2780 cc.CertificateContractProperties = &certificateContractProperties 2781 } 2782 case "id": 2783 if v != nil { 2784 var ID string 2785 err = json.Unmarshal(*v, &ID) 2786 if err != nil { 2787 return err 2788 } 2789 cc.ID = &ID 2790 } 2791 case "name": 2792 if v != nil { 2793 var name string 2794 err = json.Unmarshal(*v, &name) 2795 if err != nil { 2796 return err 2797 } 2798 cc.Name = &name 2799 } 2800 case "type": 2801 if v != nil { 2802 var typeVar string 2803 err = json.Unmarshal(*v, &typeVar) 2804 if err != nil { 2805 return err 2806 } 2807 cc.Type = &typeVar 2808 } 2809 } 2810 } 2811 2812 return nil 2813} 2814 2815// CertificateContractProperties properties of the Certificate contract. 2816type CertificateContractProperties struct { 2817 // Subject - Subject attribute of the certificate. 2818 Subject *string `json:"subject,omitempty"` 2819 // Thumbprint - Thumbprint of the certificate. 2820 Thumbprint *string `json:"thumbprint,omitempty"` 2821 // ExpirationDate - Expiration date of the certificate. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. 2822 ExpirationDate *date.Time `json:"expirationDate,omitempty"` 2823} 2824 2825// CertificateCreateOrUpdateParameters certificate create or update details. 2826type CertificateCreateOrUpdateParameters struct { 2827 // CertificateCreateOrUpdateProperties - Certificate create or update properties details. 2828 *CertificateCreateOrUpdateProperties `json:"properties,omitempty"` 2829} 2830 2831// MarshalJSON is the custom marshaler for CertificateCreateOrUpdateParameters. 2832func (ccoup CertificateCreateOrUpdateParameters) MarshalJSON() ([]byte, error) { 2833 objectMap := make(map[string]interface{}) 2834 if ccoup.CertificateCreateOrUpdateProperties != nil { 2835 objectMap["properties"] = ccoup.CertificateCreateOrUpdateProperties 2836 } 2837 return json.Marshal(objectMap) 2838} 2839 2840// UnmarshalJSON is the custom unmarshaler for CertificateCreateOrUpdateParameters struct. 2841func (ccoup *CertificateCreateOrUpdateParameters) UnmarshalJSON(body []byte) error { 2842 var m map[string]*json.RawMessage 2843 err := json.Unmarshal(body, &m) 2844 if err != nil { 2845 return err 2846 } 2847 for k, v := range m { 2848 switch k { 2849 case "properties": 2850 if v != nil { 2851 var certificateCreateOrUpdateProperties CertificateCreateOrUpdateProperties 2852 err = json.Unmarshal(*v, &certificateCreateOrUpdateProperties) 2853 if err != nil { 2854 return err 2855 } 2856 ccoup.CertificateCreateOrUpdateProperties = &certificateCreateOrUpdateProperties 2857 } 2858 } 2859 } 2860 2861 return nil 2862} 2863 2864// CertificateCreateOrUpdateProperties parameters supplied to the CreateOrUpdate certificate operation. 2865type CertificateCreateOrUpdateProperties struct { 2866 // Data - Base 64 encoded certificate using the application/x-pkcs12 representation. 2867 Data *string `json:"data,omitempty"` 2868 // Password - Password for the Certificate 2869 Password *string `json:"password,omitempty"` 2870} 2871 2872// CertificateInformation SSL certificate information. 2873type CertificateInformation struct { 2874 autorest.Response `json:"-"` 2875 // Expiry - Expiration date of the certificate. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. 2876 Expiry *date.Time `json:"expiry,omitempty"` 2877 // Thumbprint - Thumbprint of the certificate. 2878 Thumbprint *string `json:"thumbprint,omitempty"` 2879 // Subject - Subject of the certificate. 2880 Subject *string `json:"subject,omitempty"` 2881} 2882 2883// ConnectivityStatusContract details about connectivity to a resource. 2884type ConnectivityStatusContract struct { 2885 // Name - The hostname of the resource which the service depends on. This can be the database, storage or any other azure resource on which the service depends upon. 2886 Name *string `json:"name,omitempty"` 2887 // Status - Resource Connectivity Status Type identifier. Possible values include: 'Initializing', 'Success', 'Failure' 2888 Status ConnectivityStatusType `json:"status,omitempty"` 2889 // Error - Error details of the connectivity to the resource. 2890 Error *string `json:"error,omitempty"` 2891 // LastUpdated - The date when the resource connectivity status was last updated. This status should be updated every 15 minutes. If this status has not been updated, then it means that the service has lost network connectivity to the resource, from inside the Virtual Network.The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. 2892 LastUpdated *date.Time `json:"lastUpdated,omitempty"` 2893 // LastStatusChange - The date when the resource connectivity status last Changed from success to failure or vice-versa. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. 2894 LastStatusChange *date.Time `json:"lastStatusChange,omitempty"` 2895} 2896 2897// DeployConfigurationParameters parameters supplied to the Deploy Configuration operation. 2898type DeployConfigurationParameters struct { 2899 // Branch - The name of the Git branch from which the configuration is to be deployed to the configuration database. 2900 Branch *string `json:"branch,omitempty"` 2901 // Force - The value enforcing deleting subscriptions to products that are deleted in this update. 2902 Force *bool `json:"force,omitempty"` 2903} 2904 2905// DiagnosticCollection paged Diagnostic list representation. 2906type DiagnosticCollection struct { 2907 autorest.Response `json:"-"` 2908 // Value - Page values. 2909 Value *[]DiagnosticContract `json:"value,omitempty"` 2910 // NextLink - Next page link if any. 2911 NextLink *string `json:"nextLink,omitempty"` 2912} 2913 2914// DiagnosticCollectionIterator provides access to a complete listing of DiagnosticContract values. 2915type DiagnosticCollectionIterator struct { 2916 i int 2917 page DiagnosticCollectionPage 2918} 2919 2920// Next advances to the next value. If there was an error making 2921// the request the iterator does not advance and the error is returned. 2922func (iter *DiagnosticCollectionIterator) Next() error { 2923 iter.i++ 2924 if iter.i < len(iter.page.Values()) { 2925 return nil 2926 } 2927 err := iter.page.Next() 2928 if err != nil { 2929 iter.i-- 2930 return err 2931 } 2932 iter.i = 0 2933 return nil 2934} 2935 2936// NotDone returns true if the enumeration should be started or is not yet complete. 2937func (iter DiagnosticCollectionIterator) NotDone() bool { 2938 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 2939} 2940 2941// Response returns the raw server response from the last page request. 2942func (iter DiagnosticCollectionIterator) Response() DiagnosticCollection { 2943 return iter.page.Response() 2944} 2945 2946// Value returns the current value or a zero-initialized value if the 2947// iterator has advanced beyond the end of the collection. 2948func (iter DiagnosticCollectionIterator) Value() DiagnosticContract { 2949 if !iter.page.NotDone() { 2950 return DiagnosticContract{} 2951 } 2952 return iter.page.Values()[iter.i] 2953} 2954 2955// IsEmpty returns true if the ListResult contains no values. 2956func (dc DiagnosticCollection) IsEmpty() bool { 2957 return dc.Value == nil || len(*dc.Value) == 0 2958} 2959 2960// diagnosticCollectionPreparer prepares a request to retrieve the next set of results. 2961// It returns nil if no more results exist. 2962func (dc DiagnosticCollection) diagnosticCollectionPreparer() (*http.Request, error) { 2963 if dc.NextLink == nil || len(to.String(dc.NextLink)) < 1 { 2964 return nil, nil 2965 } 2966 return autorest.Prepare(&http.Request{}, 2967 autorest.AsJSON(), 2968 autorest.AsGet(), 2969 autorest.WithBaseURL(to.String(dc.NextLink))) 2970} 2971 2972// DiagnosticCollectionPage contains a page of DiagnosticContract values. 2973type DiagnosticCollectionPage struct { 2974 fn func(DiagnosticCollection) (DiagnosticCollection, error) 2975 dc DiagnosticCollection 2976} 2977 2978// Next advances to the next page of values. If there was an error making 2979// the request the page does not advance and the error is returned. 2980func (page *DiagnosticCollectionPage) Next() error { 2981 next, err := page.fn(page.dc) 2982 if err != nil { 2983 return err 2984 } 2985 page.dc = next 2986 return nil 2987} 2988 2989// NotDone returns true if the page enumeration should be started or is not yet complete. 2990func (page DiagnosticCollectionPage) NotDone() bool { 2991 return !page.dc.IsEmpty() 2992} 2993 2994// Response returns the raw server response from the last page request. 2995func (page DiagnosticCollectionPage) Response() DiagnosticCollection { 2996 return page.dc 2997} 2998 2999// Values returns the slice of values for the current page or nil if there are no values. 3000func (page DiagnosticCollectionPage) Values() []DiagnosticContract { 3001 if page.dc.IsEmpty() { 3002 return nil 3003 } 3004 return *page.dc.Value 3005} 3006 3007// DiagnosticContract diagnostic details. 3008type DiagnosticContract struct { 3009 autorest.Response `json:"-"` 3010 // DiagnosticContractProperties - Diagnostic entity contract properties. 3011 *DiagnosticContractProperties `json:"properties,omitempty"` 3012 // ID - Resource ID. 3013 ID *string `json:"id,omitempty"` 3014 // Name - Resource name. 3015 Name *string `json:"name,omitempty"` 3016 // Type - Resource type for API Management resource. 3017 Type *string `json:"type,omitempty"` 3018} 3019 3020// MarshalJSON is the custom marshaler for DiagnosticContract. 3021func (dc DiagnosticContract) MarshalJSON() ([]byte, error) { 3022 objectMap := make(map[string]interface{}) 3023 if dc.DiagnosticContractProperties != nil { 3024 objectMap["properties"] = dc.DiagnosticContractProperties 3025 } 3026 if dc.ID != nil { 3027 objectMap["id"] = dc.ID 3028 } 3029 if dc.Name != nil { 3030 objectMap["name"] = dc.Name 3031 } 3032 if dc.Type != nil { 3033 objectMap["type"] = dc.Type 3034 } 3035 return json.Marshal(objectMap) 3036} 3037 3038// UnmarshalJSON is the custom unmarshaler for DiagnosticContract struct. 3039func (dc *DiagnosticContract) UnmarshalJSON(body []byte) error { 3040 var m map[string]*json.RawMessage 3041 err := json.Unmarshal(body, &m) 3042 if err != nil { 3043 return err 3044 } 3045 for k, v := range m { 3046 switch k { 3047 case "properties": 3048 if v != nil { 3049 var diagnosticContractProperties DiagnosticContractProperties 3050 err = json.Unmarshal(*v, &diagnosticContractProperties) 3051 if err != nil { 3052 return err 3053 } 3054 dc.DiagnosticContractProperties = &diagnosticContractProperties 3055 } 3056 case "id": 3057 if v != nil { 3058 var ID string 3059 err = json.Unmarshal(*v, &ID) 3060 if err != nil { 3061 return err 3062 } 3063 dc.ID = &ID 3064 } 3065 case "name": 3066 if v != nil { 3067 var name string 3068 err = json.Unmarshal(*v, &name) 3069 if err != nil { 3070 return err 3071 } 3072 dc.Name = &name 3073 } 3074 case "type": 3075 if v != nil { 3076 var typeVar string 3077 err = json.Unmarshal(*v, &typeVar) 3078 if err != nil { 3079 return err 3080 } 3081 dc.Type = &typeVar 3082 } 3083 } 3084 } 3085 3086 return nil 3087} 3088 3089// DiagnosticContractProperties diagnostic Entity Properties 3090type DiagnosticContractProperties struct { 3091 // AlwaysLog - Specifies for what type of messages sampling settings should not apply. Possible values include: 'AllErrors' 3092 AlwaysLog AlwaysLog `json:"alwaysLog,omitempty"` 3093 // LoggerID - Resource Id of a target logger. 3094 LoggerID *string `json:"loggerId,omitempty"` 3095 // Sampling - Sampling settings for Diagnostic. 3096 Sampling *SamplingSettings `json:"sampling,omitempty"` 3097 // Frontend - Diagnostic settings for incoming/outcoming HTTP messages to the Gateway. 3098 Frontend *PipelineDiagnosticSettings `json:"frontend,omitempty"` 3099 // Backend - Diagnostic settings for incoming/outcoming HTTP messages to the Backend 3100 Backend *PipelineDiagnosticSettings `json:"backend,omitempty"` 3101} 3102 3103// EmailTemplateCollection paged email template list representation. 3104type EmailTemplateCollection struct { 3105 autorest.Response `json:"-"` 3106 // Value - Page values. 3107 Value *[]EmailTemplateContract `json:"value,omitempty"` 3108 // NextLink - Next page link if any. 3109 NextLink *string `json:"nextLink,omitempty"` 3110} 3111 3112// EmailTemplateCollectionIterator provides access to a complete listing of EmailTemplateContract values. 3113type EmailTemplateCollectionIterator struct { 3114 i int 3115 page EmailTemplateCollectionPage 3116} 3117 3118// Next advances to the next value. If there was an error making 3119// the request the iterator does not advance and the error is returned. 3120func (iter *EmailTemplateCollectionIterator) Next() error { 3121 iter.i++ 3122 if iter.i < len(iter.page.Values()) { 3123 return nil 3124 } 3125 err := iter.page.Next() 3126 if err != nil { 3127 iter.i-- 3128 return err 3129 } 3130 iter.i = 0 3131 return nil 3132} 3133 3134// NotDone returns true if the enumeration should be started or is not yet complete. 3135func (iter EmailTemplateCollectionIterator) NotDone() bool { 3136 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 3137} 3138 3139// Response returns the raw server response from the last page request. 3140func (iter EmailTemplateCollectionIterator) Response() EmailTemplateCollection { 3141 return iter.page.Response() 3142} 3143 3144// Value returns the current value or a zero-initialized value if the 3145// iterator has advanced beyond the end of the collection. 3146func (iter EmailTemplateCollectionIterator) Value() EmailTemplateContract { 3147 if !iter.page.NotDone() { 3148 return EmailTemplateContract{} 3149 } 3150 return iter.page.Values()[iter.i] 3151} 3152 3153// IsEmpty returns true if the ListResult contains no values. 3154func (etc EmailTemplateCollection) IsEmpty() bool { 3155 return etc.Value == nil || len(*etc.Value) == 0 3156} 3157 3158// emailTemplateCollectionPreparer prepares a request to retrieve the next set of results. 3159// It returns nil if no more results exist. 3160func (etc EmailTemplateCollection) emailTemplateCollectionPreparer() (*http.Request, error) { 3161 if etc.NextLink == nil || len(to.String(etc.NextLink)) < 1 { 3162 return nil, nil 3163 } 3164 return autorest.Prepare(&http.Request{}, 3165 autorest.AsJSON(), 3166 autorest.AsGet(), 3167 autorest.WithBaseURL(to.String(etc.NextLink))) 3168} 3169 3170// EmailTemplateCollectionPage contains a page of EmailTemplateContract values. 3171type EmailTemplateCollectionPage struct { 3172 fn func(EmailTemplateCollection) (EmailTemplateCollection, error) 3173 etc EmailTemplateCollection 3174} 3175 3176// Next advances to the next page of values. If there was an error making 3177// the request the page does not advance and the error is returned. 3178func (page *EmailTemplateCollectionPage) Next() error { 3179 next, err := page.fn(page.etc) 3180 if err != nil { 3181 return err 3182 } 3183 page.etc = next 3184 return nil 3185} 3186 3187// NotDone returns true if the page enumeration should be started or is not yet complete. 3188func (page EmailTemplateCollectionPage) NotDone() bool { 3189 return !page.etc.IsEmpty() 3190} 3191 3192// Response returns the raw server response from the last page request. 3193func (page EmailTemplateCollectionPage) Response() EmailTemplateCollection { 3194 return page.etc 3195} 3196 3197// Values returns the slice of values for the current page or nil if there are no values. 3198func (page EmailTemplateCollectionPage) Values() []EmailTemplateContract { 3199 if page.etc.IsEmpty() { 3200 return nil 3201 } 3202 return *page.etc.Value 3203} 3204 3205// EmailTemplateContract email Template details. 3206type EmailTemplateContract struct { 3207 autorest.Response `json:"-"` 3208 // EmailTemplateContractProperties - Email Template entity contract properties. 3209 *EmailTemplateContractProperties `json:"properties,omitempty"` 3210 // ID - Resource ID. 3211 ID *string `json:"id,omitempty"` 3212 // Name - Resource name. 3213 Name *string `json:"name,omitempty"` 3214 // Type - Resource type for API Management resource. 3215 Type *string `json:"type,omitempty"` 3216} 3217 3218// MarshalJSON is the custom marshaler for EmailTemplateContract. 3219func (etc EmailTemplateContract) MarshalJSON() ([]byte, error) { 3220 objectMap := make(map[string]interface{}) 3221 if etc.EmailTemplateContractProperties != nil { 3222 objectMap["properties"] = etc.EmailTemplateContractProperties 3223 } 3224 if etc.ID != nil { 3225 objectMap["id"] = etc.ID 3226 } 3227 if etc.Name != nil { 3228 objectMap["name"] = etc.Name 3229 } 3230 if etc.Type != nil { 3231 objectMap["type"] = etc.Type 3232 } 3233 return json.Marshal(objectMap) 3234} 3235 3236// UnmarshalJSON is the custom unmarshaler for EmailTemplateContract struct. 3237func (etc *EmailTemplateContract) UnmarshalJSON(body []byte) error { 3238 var m map[string]*json.RawMessage 3239 err := json.Unmarshal(body, &m) 3240 if err != nil { 3241 return err 3242 } 3243 for k, v := range m { 3244 switch k { 3245 case "properties": 3246 if v != nil { 3247 var emailTemplateContractProperties EmailTemplateContractProperties 3248 err = json.Unmarshal(*v, &emailTemplateContractProperties) 3249 if err != nil { 3250 return err 3251 } 3252 etc.EmailTemplateContractProperties = &emailTemplateContractProperties 3253 } 3254 case "id": 3255 if v != nil { 3256 var ID string 3257 err = json.Unmarshal(*v, &ID) 3258 if err != nil { 3259 return err 3260 } 3261 etc.ID = &ID 3262 } 3263 case "name": 3264 if v != nil { 3265 var name string 3266 err = json.Unmarshal(*v, &name) 3267 if err != nil { 3268 return err 3269 } 3270 etc.Name = &name 3271 } 3272 case "type": 3273 if v != nil { 3274 var typeVar string 3275 err = json.Unmarshal(*v, &typeVar) 3276 if err != nil { 3277 return err 3278 } 3279 etc.Type = &typeVar 3280 } 3281 } 3282 } 3283 3284 return nil 3285} 3286 3287// EmailTemplateContractProperties email Template Contract properties. 3288type EmailTemplateContractProperties struct { 3289 // Subject - Subject of the Template. 3290 Subject *string `json:"subject,omitempty"` 3291 // Body - Email Template Body. This should be a valid XDocument 3292 Body *string `json:"body,omitempty"` 3293 // Title - Title of the Template. 3294 Title *string `json:"title,omitempty"` 3295 // Description - Description of the Email Template. 3296 Description *string `json:"description,omitempty"` 3297 // IsDefault - Whether the template is the default template provided by Api Management or has been edited. 3298 IsDefault *bool `json:"isDefault,omitempty"` 3299 // Parameters - Email Template Parameter values. 3300 Parameters *[]EmailTemplateParametersContractProperties `json:"parameters,omitempty"` 3301} 3302 3303// EmailTemplateParametersContractProperties email Template Parameter contract. 3304type EmailTemplateParametersContractProperties struct { 3305 // Name - Template parameter name. 3306 Name *string `json:"name,omitempty"` 3307 // Title - Template parameter title. 3308 Title *string `json:"title,omitempty"` 3309 // Description - Template parameter description. 3310 Description *string `json:"description,omitempty"` 3311} 3312 3313// EmailTemplateUpdateParameterProperties email Template Update Contract properties. 3314type EmailTemplateUpdateParameterProperties struct { 3315 // Subject - Subject of the Template. 3316 Subject *string `json:"subject,omitempty"` 3317 // Title - Title of the Template. 3318 Title *string `json:"title,omitempty"` 3319 // Description - Description of the Email Template. 3320 Description *string `json:"description,omitempty"` 3321 // Body - Email Template Body. This should be a valid XDocument 3322 Body *string `json:"body,omitempty"` 3323 // Parameters - Email Template Parameter values. 3324 Parameters *[]EmailTemplateParametersContractProperties `json:"parameters,omitempty"` 3325} 3326 3327// EmailTemplateUpdateParameters email Template update Parameters. 3328type EmailTemplateUpdateParameters struct { 3329 // EmailTemplateUpdateParameterProperties - Email Template Update contract properties. 3330 *EmailTemplateUpdateParameterProperties `json:"properties,omitempty"` 3331} 3332 3333// MarshalJSON is the custom marshaler for EmailTemplateUpdateParameters. 3334func (etup EmailTemplateUpdateParameters) MarshalJSON() ([]byte, error) { 3335 objectMap := make(map[string]interface{}) 3336 if etup.EmailTemplateUpdateParameterProperties != nil { 3337 objectMap["properties"] = etup.EmailTemplateUpdateParameterProperties 3338 } 3339 return json.Marshal(objectMap) 3340} 3341 3342// UnmarshalJSON is the custom unmarshaler for EmailTemplateUpdateParameters struct. 3343func (etup *EmailTemplateUpdateParameters) UnmarshalJSON(body []byte) error { 3344 var m map[string]*json.RawMessage 3345 err := json.Unmarshal(body, &m) 3346 if err != nil { 3347 return err 3348 } 3349 for k, v := range m { 3350 switch k { 3351 case "properties": 3352 if v != nil { 3353 var emailTemplateUpdateParameterProperties EmailTemplateUpdateParameterProperties 3354 err = json.Unmarshal(*v, &emailTemplateUpdateParameterProperties) 3355 if err != nil { 3356 return err 3357 } 3358 etup.EmailTemplateUpdateParameterProperties = &emailTemplateUpdateParameterProperties 3359 } 3360 } 3361 } 3362 3363 return nil 3364} 3365 3366// ErrorFieldContract error Field contract. 3367type ErrorFieldContract struct { 3368 // Code - Property level error code. 3369 Code *string `json:"code,omitempty"` 3370 // Message - Human-readable representation of property-level error. 3371 Message *string `json:"message,omitempty"` 3372 // Target - Property name. 3373 Target *string `json:"target,omitempty"` 3374} 3375 3376// ErrorResponse error Response. 3377type ErrorResponse struct { 3378 // ErrorResponseBody - Properties of the Error Response. 3379 *ErrorResponseBody `json:"error,omitempty"` 3380} 3381 3382// MarshalJSON is the custom marshaler for ErrorResponse. 3383func (er ErrorResponse) MarshalJSON() ([]byte, error) { 3384 objectMap := make(map[string]interface{}) 3385 if er.ErrorResponseBody != nil { 3386 objectMap["error"] = er.ErrorResponseBody 3387 } 3388 return json.Marshal(objectMap) 3389} 3390 3391// UnmarshalJSON is the custom unmarshaler for ErrorResponse struct. 3392func (er *ErrorResponse) UnmarshalJSON(body []byte) error { 3393 var m map[string]*json.RawMessage 3394 err := json.Unmarshal(body, &m) 3395 if err != nil { 3396 return err 3397 } 3398 for k, v := range m { 3399 switch k { 3400 case "error": 3401 if v != nil { 3402 var errorResponseBody ErrorResponseBody 3403 err = json.Unmarshal(*v, &errorResponseBody) 3404 if err != nil { 3405 return err 3406 } 3407 er.ErrorResponseBody = &errorResponseBody 3408 } 3409 } 3410 } 3411 3412 return nil 3413} 3414 3415// ErrorResponseBody error Body contract. 3416type ErrorResponseBody struct { 3417 // Code - Service-defined error code. This code serves as a sub-status for the HTTP error code specified in the response. 3418 Code *string `json:"code,omitempty"` 3419 // Message - Human-readable representation of the error. 3420 Message *string `json:"message,omitempty"` 3421 // Details - The list of invalid fields send in request, in case of validation error. 3422 Details *[]ErrorFieldContract `json:"details,omitempty"` 3423} 3424 3425// GenerateSsoURLResult generate SSO Url operations response details. 3426type GenerateSsoURLResult struct { 3427 autorest.Response `json:"-"` 3428 // Value - Redirect Url containing the SSO URL value. 3429 Value *string `json:"value,omitempty"` 3430} 3431 3432// GroupCollection paged Group list representation. 3433type GroupCollection struct { 3434 autorest.Response `json:"-"` 3435 // Value - Page values. 3436 Value *[]GroupContract `json:"value,omitempty"` 3437 // NextLink - Next page link if any. 3438 NextLink *string `json:"nextLink,omitempty"` 3439} 3440 3441// GroupCollectionIterator provides access to a complete listing of GroupContract values. 3442type GroupCollectionIterator struct { 3443 i int 3444 page GroupCollectionPage 3445} 3446 3447// Next advances to the next value. If there was an error making 3448// the request the iterator does not advance and the error is returned. 3449func (iter *GroupCollectionIterator) Next() error { 3450 iter.i++ 3451 if iter.i < len(iter.page.Values()) { 3452 return nil 3453 } 3454 err := iter.page.Next() 3455 if err != nil { 3456 iter.i-- 3457 return err 3458 } 3459 iter.i = 0 3460 return nil 3461} 3462 3463// NotDone returns true if the enumeration should be started or is not yet complete. 3464func (iter GroupCollectionIterator) NotDone() bool { 3465 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 3466} 3467 3468// Response returns the raw server response from the last page request. 3469func (iter GroupCollectionIterator) Response() GroupCollection { 3470 return iter.page.Response() 3471} 3472 3473// Value returns the current value or a zero-initialized value if the 3474// iterator has advanced beyond the end of the collection. 3475func (iter GroupCollectionIterator) Value() GroupContract { 3476 if !iter.page.NotDone() { 3477 return GroupContract{} 3478 } 3479 return iter.page.Values()[iter.i] 3480} 3481 3482// IsEmpty returns true if the ListResult contains no values. 3483func (gc GroupCollection) IsEmpty() bool { 3484 return gc.Value == nil || len(*gc.Value) == 0 3485} 3486 3487// groupCollectionPreparer prepares a request to retrieve the next set of results. 3488// It returns nil if no more results exist. 3489func (gc GroupCollection) groupCollectionPreparer() (*http.Request, error) { 3490 if gc.NextLink == nil || len(to.String(gc.NextLink)) < 1 { 3491 return nil, nil 3492 } 3493 return autorest.Prepare(&http.Request{}, 3494 autorest.AsJSON(), 3495 autorest.AsGet(), 3496 autorest.WithBaseURL(to.String(gc.NextLink))) 3497} 3498 3499// GroupCollectionPage contains a page of GroupContract values. 3500type GroupCollectionPage struct { 3501 fn func(GroupCollection) (GroupCollection, error) 3502 gc GroupCollection 3503} 3504 3505// Next advances to the next page of values. If there was an error making 3506// the request the page does not advance and the error is returned. 3507func (page *GroupCollectionPage) Next() error { 3508 next, err := page.fn(page.gc) 3509 if err != nil { 3510 return err 3511 } 3512 page.gc = next 3513 return nil 3514} 3515 3516// NotDone returns true if the page enumeration should be started or is not yet complete. 3517func (page GroupCollectionPage) NotDone() bool { 3518 return !page.gc.IsEmpty() 3519} 3520 3521// Response returns the raw server response from the last page request. 3522func (page GroupCollectionPage) Response() GroupCollection { 3523 return page.gc 3524} 3525 3526// Values returns the slice of values for the current page or nil if there are no values. 3527func (page GroupCollectionPage) Values() []GroupContract { 3528 if page.gc.IsEmpty() { 3529 return nil 3530 } 3531 return *page.gc.Value 3532} 3533 3534// GroupContract contract details. 3535type GroupContract struct { 3536 autorest.Response `json:"-"` 3537 // GroupContractProperties - Group entity contract properties. 3538 *GroupContractProperties `json:"properties,omitempty"` 3539 // ID - Resource ID. 3540 ID *string `json:"id,omitempty"` 3541 // Name - Resource name. 3542 Name *string `json:"name,omitempty"` 3543 // Type - Resource type for API Management resource. 3544 Type *string `json:"type,omitempty"` 3545} 3546 3547// MarshalJSON is the custom marshaler for GroupContract. 3548func (gc GroupContract) MarshalJSON() ([]byte, error) { 3549 objectMap := make(map[string]interface{}) 3550 if gc.GroupContractProperties != nil { 3551 objectMap["properties"] = gc.GroupContractProperties 3552 } 3553 if gc.ID != nil { 3554 objectMap["id"] = gc.ID 3555 } 3556 if gc.Name != nil { 3557 objectMap["name"] = gc.Name 3558 } 3559 if gc.Type != nil { 3560 objectMap["type"] = gc.Type 3561 } 3562 return json.Marshal(objectMap) 3563} 3564 3565// UnmarshalJSON is the custom unmarshaler for GroupContract struct. 3566func (gc *GroupContract) UnmarshalJSON(body []byte) error { 3567 var m map[string]*json.RawMessage 3568 err := json.Unmarshal(body, &m) 3569 if err != nil { 3570 return err 3571 } 3572 for k, v := range m { 3573 switch k { 3574 case "properties": 3575 if v != nil { 3576 var groupContractProperties GroupContractProperties 3577 err = json.Unmarshal(*v, &groupContractProperties) 3578 if err != nil { 3579 return err 3580 } 3581 gc.GroupContractProperties = &groupContractProperties 3582 } 3583 case "id": 3584 if v != nil { 3585 var ID string 3586 err = json.Unmarshal(*v, &ID) 3587 if err != nil { 3588 return err 3589 } 3590 gc.ID = &ID 3591 } 3592 case "name": 3593 if v != nil { 3594 var name string 3595 err = json.Unmarshal(*v, &name) 3596 if err != nil { 3597 return err 3598 } 3599 gc.Name = &name 3600 } 3601 case "type": 3602 if v != nil { 3603 var typeVar string 3604 err = json.Unmarshal(*v, &typeVar) 3605 if err != nil { 3606 return err 3607 } 3608 gc.Type = &typeVar 3609 } 3610 } 3611 } 3612 3613 return nil 3614} 3615 3616// GroupContractProperties group contract Properties. 3617type GroupContractProperties struct { 3618 // DisplayName - Group name. 3619 DisplayName *string `json:"displayName,omitempty"` 3620 // Description - Group description. Can contain HTML formatting tags. 3621 Description *string `json:"description,omitempty"` 3622 // BuiltIn - true if the group is one of the three system groups (Administrators, Developers, or Guests); otherwise false. 3623 BuiltIn *bool `json:"builtIn,omitempty"` 3624 // Type - Group type. Possible values include: 'Custom', 'System', 'External' 3625 Type GroupType `json:"type,omitempty"` 3626 // ExternalID - For external groups, this property contains the id of the group from the external identity provider, e.g. for Azure Active Directory `aad://<tenant>.onmicrosoft.com/groups/<group object id>`; otherwise the value is null. 3627 ExternalID *string `json:"externalId,omitempty"` 3628} 3629 3630// GroupCreateParameters parameters supplied to the Create Group operation. 3631type GroupCreateParameters struct { 3632 // GroupCreateParametersProperties - Properties supplied to Create Group operation. 3633 *GroupCreateParametersProperties `json:"properties,omitempty"` 3634} 3635 3636// MarshalJSON is the custom marshaler for GroupCreateParameters. 3637func (gcp GroupCreateParameters) MarshalJSON() ([]byte, error) { 3638 objectMap := make(map[string]interface{}) 3639 if gcp.GroupCreateParametersProperties != nil { 3640 objectMap["properties"] = gcp.GroupCreateParametersProperties 3641 } 3642 return json.Marshal(objectMap) 3643} 3644 3645// UnmarshalJSON is the custom unmarshaler for GroupCreateParameters struct. 3646func (gcp *GroupCreateParameters) UnmarshalJSON(body []byte) error { 3647 var m map[string]*json.RawMessage 3648 err := json.Unmarshal(body, &m) 3649 if err != nil { 3650 return err 3651 } 3652 for k, v := range m { 3653 switch k { 3654 case "properties": 3655 if v != nil { 3656 var groupCreateParametersProperties GroupCreateParametersProperties 3657 err = json.Unmarshal(*v, &groupCreateParametersProperties) 3658 if err != nil { 3659 return err 3660 } 3661 gcp.GroupCreateParametersProperties = &groupCreateParametersProperties 3662 } 3663 } 3664 } 3665 3666 return nil 3667} 3668 3669// GroupCreateParametersProperties parameters supplied to the Create Group operation. 3670type GroupCreateParametersProperties struct { 3671 // DisplayName - Group name. 3672 DisplayName *string `json:"displayName,omitempty"` 3673 // Description - Group description. 3674 Description *string `json:"description,omitempty"` 3675 // Type - Group type. Possible values include: 'Custom', 'System', 'External' 3676 Type GroupType `json:"type,omitempty"` 3677 // ExternalID - Identifier of the external groups, this property contains the id of the group from the external identity provider, e.g. for Azure Active Directory `aad://<tenant>.onmicrosoft.com/groups/<group object id>`; otherwise the value is null. 3678 ExternalID *string `json:"externalId,omitempty"` 3679} 3680 3681// GroupUpdateParameters parameters supplied to the Update Group operation. 3682type GroupUpdateParameters struct { 3683 // GroupUpdateParametersProperties - Group entity update contract properties. 3684 *GroupUpdateParametersProperties `json:"properties,omitempty"` 3685} 3686 3687// MarshalJSON is the custom marshaler for GroupUpdateParameters. 3688func (gup GroupUpdateParameters) MarshalJSON() ([]byte, error) { 3689 objectMap := make(map[string]interface{}) 3690 if gup.GroupUpdateParametersProperties != nil { 3691 objectMap["properties"] = gup.GroupUpdateParametersProperties 3692 } 3693 return json.Marshal(objectMap) 3694} 3695 3696// UnmarshalJSON is the custom unmarshaler for GroupUpdateParameters struct. 3697func (gup *GroupUpdateParameters) UnmarshalJSON(body []byte) error { 3698 var m map[string]*json.RawMessage 3699 err := json.Unmarshal(body, &m) 3700 if err != nil { 3701 return err 3702 } 3703 for k, v := range m { 3704 switch k { 3705 case "properties": 3706 if v != nil { 3707 var groupUpdateParametersProperties GroupUpdateParametersProperties 3708 err = json.Unmarshal(*v, &groupUpdateParametersProperties) 3709 if err != nil { 3710 return err 3711 } 3712 gup.GroupUpdateParametersProperties = &groupUpdateParametersProperties 3713 } 3714 } 3715 } 3716 3717 return nil 3718} 3719 3720// GroupUpdateParametersProperties parameters supplied to the Update Group operation. 3721type GroupUpdateParametersProperties struct { 3722 // DisplayName - Group name. 3723 DisplayName *string `json:"displayName,omitempty"` 3724 // Description - Group description. 3725 Description *string `json:"description,omitempty"` 3726 // Type - Group type. Possible values include: 'Custom', 'System', 'External' 3727 Type GroupType `json:"type,omitempty"` 3728 // ExternalID - Identifier of the external groups, this property contains the id of the group from the external identity provider, e.g. for Azure Active Directory `aad://<tenant>.onmicrosoft.com/groups/<group object id>`; otherwise the value is null. 3729 ExternalID *string `json:"externalId,omitempty"` 3730} 3731 3732// HostnameConfiguration custom hostname configuration. 3733type HostnameConfiguration struct { 3734 // Type - Hostname type. Possible values include: 'Proxy', 'Portal', 'Management', 'Scm' 3735 Type HostnameType `json:"type,omitempty"` 3736 // HostName - Hostname to configure on the Api Management service. 3737 HostName *string `json:"hostName,omitempty"` 3738 // KeyVaultID - Url to the KeyVault Secret containing the Ssl Certificate. If absolute Url containing version is provided, auto-update of ssl certificate will not work. This requires Api Management service to be configured with MSI. The secret should be of type *application/x-pkcs12* 3739 KeyVaultID *string `json:"keyVaultId,omitempty"` 3740 // EncodedCertificate - Base64 Encoded certificate. 3741 EncodedCertificate *string `json:"encodedCertificate,omitempty"` 3742 // CertificatePassword - Certificate Password. 3743 CertificatePassword *string `json:"certificatePassword,omitempty"` 3744 // DefaultSslBinding - Specify true to setup the certificate associated with this Hostname as the Default SSL Certificate. If a client does not send the SNI header, then this will be the certificate that will be challenged. The property is useful if a service has multiple custom hostname enabled and it needs to decide on the default ssl certificate. The setting only applied to Proxy Hostname Type. 3745 DefaultSslBinding *bool `json:"defaultSslBinding,omitempty"` 3746 // NegotiateClientCertificate - Specify true to always negotiate client certificate on the hostname. Default Value is false. 3747 NegotiateClientCertificate *bool `json:"negotiateClientCertificate,omitempty"` 3748 // Certificate - Certificate information. 3749 Certificate *CertificateInformation `json:"certificate,omitempty"` 3750} 3751 3752// HostnameConfigurationOld custom hostname configuration. 3753type HostnameConfigurationOld struct { 3754 // Type - Hostname type. Possible values include: 'Proxy', 'Portal', 'Management', 'Scm' 3755 Type HostnameType `json:"type,omitempty"` 3756 // Hostname - Hostname to configure. 3757 Hostname *string `json:"hostname,omitempty"` 3758 // Certificate - Certificate information. 3759 Certificate *CertificateInformation `json:"certificate,omitempty"` 3760} 3761 3762// HTTPMessageDiagnostic http message diagnostic settings. 3763type HTTPMessageDiagnostic struct { 3764 // Headers - Array of HTTP Headers to log. 3765 Headers *[]string `json:"headers,omitempty"` 3766 // Body - Body logging settings. 3767 Body *BodyDiagnosticSettings `json:"body,omitempty"` 3768} 3769 3770// IdentityProviderBaseParameters identity Provider Base Parameter Properties. 3771type IdentityProviderBaseParameters struct { 3772 // Type - Identity Provider Type identifier. Possible values include: 'Facebook', 'Google', 'Microsoft', 'Twitter', 'Aad', 'AadB2C' 3773 Type IdentityProviderType `json:"type,omitempty"` 3774 // AllowedTenants - List of Allowed Tenants when configuring Azure Active Directory login. 3775 AllowedTenants *[]string `json:"allowedTenants,omitempty"` 3776 // SignupPolicyName - Signup Policy Name. Only applies to AAD B2C Identity Provider. 3777 SignupPolicyName *string `json:"signupPolicyName,omitempty"` 3778 // SigninPolicyName - Signin Policy Name. Only applies to AAD B2C Identity Provider. 3779 SigninPolicyName *string `json:"signinPolicyName,omitempty"` 3780 // ProfileEditingPolicyName - Profile Editing Policy Name. Only applies to AAD B2C Identity Provider. 3781 ProfileEditingPolicyName *string `json:"profileEditingPolicyName,omitempty"` 3782 // PasswordResetPolicyName - Password Reset Policy Name. Only applies to AAD B2C Identity Provider. 3783 PasswordResetPolicyName *string `json:"passwordResetPolicyName,omitempty"` 3784} 3785 3786// IdentityProviderContract identity Provider details. 3787type IdentityProviderContract struct { 3788 autorest.Response `json:"-"` 3789 // IdentityProviderContractProperties - Identity Provider contract properties. 3790 *IdentityProviderContractProperties `json:"properties,omitempty"` 3791 // ID - Resource ID. 3792 ID *string `json:"id,omitempty"` 3793 // Name - Resource name. 3794 Name *string `json:"name,omitempty"` 3795 // Type - Resource type for API Management resource. 3796 Type *string `json:"type,omitempty"` 3797} 3798 3799// MarshalJSON is the custom marshaler for IdentityProviderContract. 3800func (ipc IdentityProviderContract) MarshalJSON() ([]byte, error) { 3801 objectMap := make(map[string]interface{}) 3802 if ipc.IdentityProviderContractProperties != nil { 3803 objectMap["properties"] = ipc.IdentityProviderContractProperties 3804 } 3805 if ipc.ID != nil { 3806 objectMap["id"] = ipc.ID 3807 } 3808 if ipc.Name != nil { 3809 objectMap["name"] = ipc.Name 3810 } 3811 if ipc.Type != nil { 3812 objectMap["type"] = ipc.Type 3813 } 3814 return json.Marshal(objectMap) 3815} 3816 3817// UnmarshalJSON is the custom unmarshaler for IdentityProviderContract struct. 3818func (ipc *IdentityProviderContract) UnmarshalJSON(body []byte) error { 3819 var m map[string]*json.RawMessage 3820 err := json.Unmarshal(body, &m) 3821 if err != nil { 3822 return err 3823 } 3824 for k, v := range m { 3825 switch k { 3826 case "properties": 3827 if v != nil { 3828 var identityProviderContractProperties IdentityProviderContractProperties 3829 err = json.Unmarshal(*v, &identityProviderContractProperties) 3830 if err != nil { 3831 return err 3832 } 3833 ipc.IdentityProviderContractProperties = &identityProviderContractProperties 3834 } 3835 case "id": 3836 if v != nil { 3837 var ID string 3838 err = json.Unmarshal(*v, &ID) 3839 if err != nil { 3840 return err 3841 } 3842 ipc.ID = &ID 3843 } 3844 case "name": 3845 if v != nil { 3846 var name string 3847 err = json.Unmarshal(*v, &name) 3848 if err != nil { 3849 return err 3850 } 3851 ipc.Name = &name 3852 } 3853 case "type": 3854 if v != nil { 3855 var typeVar string 3856 err = json.Unmarshal(*v, &typeVar) 3857 if err != nil { 3858 return err 3859 } 3860 ipc.Type = &typeVar 3861 } 3862 } 3863 } 3864 3865 return nil 3866} 3867 3868// IdentityProviderContractProperties the external Identity Providers like Facebook, Google, Microsoft, Twitter or 3869// Azure Active Directory which can be used to enable access to the API Management service developer portal for all 3870// users. 3871type IdentityProviderContractProperties struct { 3872 // ClientID - Client Id of the Application in the external Identity Provider. It is App ID for Facebook login, Client ID for Google login, App ID for Microsoft. 3873 ClientID *string `json:"clientId,omitempty"` 3874 // ClientSecret - Client secret of the Application in external Identity Provider, used to authenticate login request. For example, it is App Secret for Facebook login, API Key for Google login, Public Key for Microsoft. 3875 ClientSecret *string `json:"clientSecret,omitempty"` 3876 // Type - Identity Provider Type identifier. Possible values include: 'Facebook', 'Google', 'Microsoft', 'Twitter', 'Aad', 'AadB2C' 3877 Type IdentityProviderType `json:"type,omitempty"` 3878 // AllowedTenants - List of Allowed Tenants when configuring Azure Active Directory login. 3879 AllowedTenants *[]string `json:"allowedTenants,omitempty"` 3880 // SignupPolicyName - Signup Policy Name. Only applies to AAD B2C Identity Provider. 3881 SignupPolicyName *string `json:"signupPolicyName,omitempty"` 3882 // SigninPolicyName - Signin Policy Name. Only applies to AAD B2C Identity Provider. 3883 SigninPolicyName *string `json:"signinPolicyName,omitempty"` 3884 // ProfileEditingPolicyName - Profile Editing Policy Name. Only applies to AAD B2C Identity Provider. 3885 ProfileEditingPolicyName *string `json:"profileEditingPolicyName,omitempty"` 3886 // PasswordResetPolicyName - Password Reset Policy Name. Only applies to AAD B2C Identity Provider. 3887 PasswordResetPolicyName *string `json:"passwordResetPolicyName,omitempty"` 3888} 3889 3890// IdentityProviderList list of all the Identity Providers configured on the service instance. 3891type IdentityProviderList struct { 3892 autorest.Response `json:"-"` 3893 // Value - Identity Provider configuration values. 3894 Value *[]IdentityProviderContract `json:"value,omitempty"` 3895 // NextLink - Next page link if any. 3896 NextLink *string `json:"nextLink,omitempty"` 3897} 3898 3899// IdentityProviderListIterator provides access to a complete listing of IdentityProviderContract values. 3900type IdentityProviderListIterator struct { 3901 i int 3902 page IdentityProviderListPage 3903} 3904 3905// Next advances to the next value. If there was an error making 3906// the request the iterator does not advance and the error is returned. 3907func (iter *IdentityProviderListIterator) Next() error { 3908 iter.i++ 3909 if iter.i < len(iter.page.Values()) { 3910 return nil 3911 } 3912 err := iter.page.Next() 3913 if err != nil { 3914 iter.i-- 3915 return err 3916 } 3917 iter.i = 0 3918 return nil 3919} 3920 3921// NotDone returns true if the enumeration should be started or is not yet complete. 3922func (iter IdentityProviderListIterator) NotDone() bool { 3923 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 3924} 3925 3926// Response returns the raw server response from the last page request. 3927func (iter IdentityProviderListIterator) Response() IdentityProviderList { 3928 return iter.page.Response() 3929} 3930 3931// Value returns the current value or a zero-initialized value if the 3932// iterator has advanced beyond the end of the collection. 3933func (iter IdentityProviderListIterator) Value() IdentityProviderContract { 3934 if !iter.page.NotDone() { 3935 return IdentityProviderContract{} 3936 } 3937 return iter.page.Values()[iter.i] 3938} 3939 3940// IsEmpty returns true if the ListResult contains no values. 3941func (ipl IdentityProviderList) IsEmpty() bool { 3942 return ipl.Value == nil || len(*ipl.Value) == 0 3943} 3944 3945// identityProviderListPreparer prepares a request to retrieve the next set of results. 3946// It returns nil if no more results exist. 3947func (ipl IdentityProviderList) identityProviderListPreparer() (*http.Request, error) { 3948 if ipl.NextLink == nil || len(to.String(ipl.NextLink)) < 1 { 3949 return nil, nil 3950 } 3951 return autorest.Prepare(&http.Request{}, 3952 autorest.AsJSON(), 3953 autorest.AsGet(), 3954 autorest.WithBaseURL(to.String(ipl.NextLink))) 3955} 3956 3957// IdentityProviderListPage contains a page of IdentityProviderContract values. 3958type IdentityProviderListPage struct { 3959 fn func(IdentityProviderList) (IdentityProviderList, error) 3960 ipl IdentityProviderList 3961} 3962 3963// Next advances to the next page of values. If there was an error making 3964// the request the page does not advance and the error is returned. 3965func (page *IdentityProviderListPage) Next() error { 3966 next, err := page.fn(page.ipl) 3967 if err != nil { 3968 return err 3969 } 3970 page.ipl = next 3971 return nil 3972} 3973 3974// NotDone returns true if the page enumeration should be started or is not yet complete. 3975func (page IdentityProviderListPage) NotDone() bool { 3976 return !page.ipl.IsEmpty() 3977} 3978 3979// Response returns the raw server response from the last page request. 3980func (page IdentityProviderListPage) Response() IdentityProviderList { 3981 return page.ipl 3982} 3983 3984// Values returns the slice of values for the current page or nil if there are no values. 3985func (page IdentityProviderListPage) Values() []IdentityProviderContract { 3986 if page.ipl.IsEmpty() { 3987 return nil 3988 } 3989 return *page.ipl.Value 3990} 3991 3992// IdentityProviderUpdateParameters parameters supplied to update Identity Provider 3993type IdentityProviderUpdateParameters struct { 3994 // IdentityProviderUpdateProperties - Identity Provider update properties. 3995 *IdentityProviderUpdateProperties `json:"properties,omitempty"` 3996} 3997 3998// MarshalJSON is the custom marshaler for IdentityProviderUpdateParameters. 3999func (ipup IdentityProviderUpdateParameters) MarshalJSON() ([]byte, error) { 4000 objectMap := make(map[string]interface{}) 4001 if ipup.IdentityProviderUpdateProperties != nil { 4002 objectMap["properties"] = ipup.IdentityProviderUpdateProperties 4003 } 4004 return json.Marshal(objectMap) 4005} 4006 4007// UnmarshalJSON is the custom unmarshaler for IdentityProviderUpdateParameters struct. 4008func (ipup *IdentityProviderUpdateParameters) UnmarshalJSON(body []byte) error { 4009 var m map[string]*json.RawMessage 4010 err := json.Unmarshal(body, &m) 4011 if err != nil { 4012 return err 4013 } 4014 for k, v := range m { 4015 switch k { 4016 case "properties": 4017 if v != nil { 4018 var identityProviderUpdateProperties IdentityProviderUpdateProperties 4019 err = json.Unmarshal(*v, &identityProviderUpdateProperties) 4020 if err != nil { 4021 return err 4022 } 4023 ipup.IdentityProviderUpdateProperties = &identityProviderUpdateProperties 4024 } 4025 } 4026 } 4027 4028 return nil 4029} 4030 4031// IdentityProviderUpdateProperties parameters supplied to the Update Identity Provider operation. 4032type IdentityProviderUpdateProperties struct { 4033 // ClientID - Client Id of the Application in the external Identity Provider. It is App ID for Facebook login, Client ID for Google login, App ID for Microsoft. 4034 ClientID *string `json:"clientId,omitempty"` 4035 // ClientSecret - Client secret of the Application in external Identity Provider, used to authenticate login request. For example, it is App Secret for Facebook login, API Key for Google login, Public Key for Microsoft. 4036 ClientSecret *string `json:"clientSecret,omitempty"` 4037 // Type - Identity Provider Type identifier. Possible values include: 'Facebook', 'Google', 'Microsoft', 'Twitter', 'Aad', 'AadB2C' 4038 Type IdentityProviderType `json:"type,omitempty"` 4039 // AllowedTenants - List of Allowed Tenants when configuring Azure Active Directory login. 4040 AllowedTenants *[]string `json:"allowedTenants,omitempty"` 4041 // SignupPolicyName - Signup Policy Name. Only applies to AAD B2C Identity Provider. 4042 SignupPolicyName *string `json:"signupPolicyName,omitempty"` 4043 // SigninPolicyName - Signin Policy Name. Only applies to AAD B2C Identity Provider. 4044 SigninPolicyName *string `json:"signinPolicyName,omitempty"` 4045 // ProfileEditingPolicyName - Profile Editing Policy Name. Only applies to AAD B2C Identity Provider. 4046 ProfileEditingPolicyName *string `json:"profileEditingPolicyName,omitempty"` 4047 // PasswordResetPolicyName - Password Reset Policy Name. Only applies to AAD B2C Identity Provider. 4048 PasswordResetPolicyName *string `json:"passwordResetPolicyName,omitempty"` 4049} 4050 4051// IssueAttachmentCollection paged Issue Attachment list representation. 4052type IssueAttachmentCollection struct { 4053 autorest.Response `json:"-"` 4054 // Value - Issue Attachment values. 4055 Value *[]IssueAttachmentContract `json:"value,omitempty"` 4056 // NextLink - Next page link if any. 4057 NextLink *string `json:"nextLink,omitempty"` 4058} 4059 4060// IssueAttachmentCollectionIterator provides access to a complete listing of IssueAttachmentContract values. 4061type IssueAttachmentCollectionIterator struct { 4062 i int 4063 page IssueAttachmentCollectionPage 4064} 4065 4066// Next advances to the next value. If there was an error making 4067// the request the iterator does not advance and the error is returned. 4068func (iter *IssueAttachmentCollectionIterator) Next() error { 4069 iter.i++ 4070 if iter.i < len(iter.page.Values()) { 4071 return nil 4072 } 4073 err := iter.page.Next() 4074 if err != nil { 4075 iter.i-- 4076 return err 4077 } 4078 iter.i = 0 4079 return nil 4080} 4081 4082// NotDone returns true if the enumeration should be started or is not yet complete. 4083func (iter IssueAttachmentCollectionIterator) NotDone() bool { 4084 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 4085} 4086 4087// Response returns the raw server response from the last page request. 4088func (iter IssueAttachmentCollectionIterator) Response() IssueAttachmentCollection { 4089 return iter.page.Response() 4090} 4091 4092// Value returns the current value or a zero-initialized value if the 4093// iterator has advanced beyond the end of the collection. 4094func (iter IssueAttachmentCollectionIterator) Value() IssueAttachmentContract { 4095 if !iter.page.NotDone() { 4096 return IssueAttachmentContract{} 4097 } 4098 return iter.page.Values()[iter.i] 4099} 4100 4101// IsEmpty returns true if the ListResult contains no values. 4102func (iac IssueAttachmentCollection) IsEmpty() bool { 4103 return iac.Value == nil || len(*iac.Value) == 0 4104} 4105 4106// issueAttachmentCollectionPreparer prepares a request to retrieve the next set of results. 4107// It returns nil if no more results exist. 4108func (iac IssueAttachmentCollection) issueAttachmentCollectionPreparer() (*http.Request, error) { 4109 if iac.NextLink == nil || len(to.String(iac.NextLink)) < 1 { 4110 return nil, nil 4111 } 4112 return autorest.Prepare(&http.Request{}, 4113 autorest.AsJSON(), 4114 autorest.AsGet(), 4115 autorest.WithBaseURL(to.String(iac.NextLink))) 4116} 4117 4118// IssueAttachmentCollectionPage contains a page of IssueAttachmentContract values. 4119type IssueAttachmentCollectionPage struct { 4120 fn func(IssueAttachmentCollection) (IssueAttachmentCollection, error) 4121 iac IssueAttachmentCollection 4122} 4123 4124// Next advances to the next page of values. If there was an error making 4125// the request the page does not advance and the error is returned. 4126func (page *IssueAttachmentCollectionPage) Next() error { 4127 next, err := page.fn(page.iac) 4128 if err != nil { 4129 return err 4130 } 4131 page.iac = next 4132 return nil 4133} 4134 4135// NotDone returns true if the page enumeration should be started or is not yet complete. 4136func (page IssueAttachmentCollectionPage) NotDone() bool { 4137 return !page.iac.IsEmpty() 4138} 4139 4140// Response returns the raw server response from the last page request. 4141func (page IssueAttachmentCollectionPage) Response() IssueAttachmentCollection { 4142 return page.iac 4143} 4144 4145// Values returns the slice of values for the current page or nil if there are no values. 4146func (page IssueAttachmentCollectionPage) Values() []IssueAttachmentContract { 4147 if page.iac.IsEmpty() { 4148 return nil 4149 } 4150 return *page.iac.Value 4151} 4152 4153// IssueAttachmentContract issue Attachment Contract details. 4154type IssueAttachmentContract struct { 4155 autorest.Response `json:"-"` 4156 // IssueAttachmentContractProperties - Properties of the Issue Attachment. 4157 *IssueAttachmentContractProperties `json:"properties,omitempty"` 4158 // ID - Resource ID. 4159 ID *string `json:"id,omitempty"` 4160 // Name - Resource name. 4161 Name *string `json:"name,omitempty"` 4162 // Type - Resource type for API Management resource. 4163 Type *string `json:"type,omitempty"` 4164} 4165 4166// MarshalJSON is the custom marshaler for IssueAttachmentContract. 4167func (iac IssueAttachmentContract) MarshalJSON() ([]byte, error) { 4168 objectMap := make(map[string]interface{}) 4169 if iac.IssueAttachmentContractProperties != nil { 4170 objectMap["properties"] = iac.IssueAttachmentContractProperties 4171 } 4172 if iac.ID != nil { 4173 objectMap["id"] = iac.ID 4174 } 4175 if iac.Name != nil { 4176 objectMap["name"] = iac.Name 4177 } 4178 if iac.Type != nil { 4179 objectMap["type"] = iac.Type 4180 } 4181 return json.Marshal(objectMap) 4182} 4183 4184// UnmarshalJSON is the custom unmarshaler for IssueAttachmentContract struct. 4185func (iac *IssueAttachmentContract) UnmarshalJSON(body []byte) error { 4186 var m map[string]*json.RawMessage 4187 err := json.Unmarshal(body, &m) 4188 if err != nil { 4189 return err 4190 } 4191 for k, v := range m { 4192 switch k { 4193 case "properties": 4194 if v != nil { 4195 var issueAttachmentContractProperties IssueAttachmentContractProperties 4196 err = json.Unmarshal(*v, &issueAttachmentContractProperties) 4197 if err != nil { 4198 return err 4199 } 4200 iac.IssueAttachmentContractProperties = &issueAttachmentContractProperties 4201 } 4202 case "id": 4203 if v != nil { 4204 var ID string 4205 err = json.Unmarshal(*v, &ID) 4206 if err != nil { 4207 return err 4208 } 4209 iac.ID = &ID 4210 } 4211 case "name": 4212 if v != nil { 4213 var name string 4214 err = json.Unmarshal(*v, &name) 4215 if err != nil { 4216 return err 4217 } 4218 iac.Name = &name 4219 } 4220 case "type": 4221 if v != nil { 4222 var typeVar string 4223 err = json.Unmarshal(*v, &typeVar) 4224 if err != nil { 4225 return err 4226 } 4227 iac.Type = &typeVar 4228 } 4229 } 4230 } 4231 4232 return nil 4233} 4234 4235// IssueAttachmentContractProperties issue Attachment contract Properties. 4236type IssueAttachmentContractProperties struct { 4237 // Title - Filename by which the binary data will be saved. 4238 Title *string `json:"title,omitempty"` 4239 // ContentFormat - Either 'link' if content is provided via an HTTP link or the MIME type of the Base64-encoded binary data provided in the 'content' property. 4240 ContentFormat *string `json:"contentFormat,omitempty"` 4241 // Content - An HTTP link or Base64-encoded binary data. 4242 Content *string `json:"content,omitempty"` 4243} 4244 4245// IssueCollection paged Issue list representation. 4246type IssueCollection struct { 4247 autorest.Response `json:"-"` 4248 // Value - Issue values. 4249 Value *[]IssueContract `json:"value,omitempty"` 4250 // NextLink - Next page link if any. 4251 NextLink *string `json:"nextLink,omitempty"` 4252} 4253 4254// IssueCollectionIterator provides access to a complete listing of IssueContract values. 4255type IssueCollectionIterator struct { 4256 i int 4257 page IssueCollectionPage 4258} 4259 4260// Next advances to the next value. If there was an error making 4261// the request the iterator does not advance and the error is returned. 4262func (iter *IssueCollectionIterator) Next() error { 4263 iter.i++ 4264 if iter.i < len(iter.page.Values()) { 4265 return nil 4266 } 4267 err := iter.page.Next() 4268 if err != nil { 4269 iter.i-- 4270 return err 4271 } 4272 iter.i = 0 4273 return nil 4274} 4275 4276// NotDone returns true if the enumeration should be started or is not yet complete. 4277func (iter IssueCollectionIterator) NotDone() bool { 4278 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 4279} 4280 4281// Response returns the raw server response from the last page request. 4282func (iter IssueCollectionIterator) Response() IssueCollection { 4283 return iter.page.Response() 4284} 4285 4286// Value returns the current value or a zero-initialized value if the 4287// iterator has advanced beyond the end of the collection. 4288func (iter IssueCollectionIterator) Value() IssueContract { 4289 if !iter.page.NotDone() { 4290 return IssueContract{} 4291 } 4292 return iter.page.Values()[iter.i] 4293} 4294 4295// IsEmpty returns true if the ListResult contains no values. 4296func (ic IssueCollection) IsEmpty() bool { 4297 return ic.Value == nil || len(*ic.Value) == 0 4298} 4299 4300// issueCollectionPreparer prepares a request to retrieve the next set of results. 4301// It returns nil if no more results exist. 4302func (ic IssueCollection) issueCollectionPreparer() (*http.Request, error) { 4303 if ic.NextLink == nil || len(to.String(ic.NextLink)) < 1 { 4304 return nil, nil 4305 } 4306 return autorest.Prepare(&http.Request{}, 4307 autorest.AsJSON(), 4308 autorest.AsGet(), 4309 autorest.WithBaseURL(to.String(ic.NextLink))) 4310} 4311 4312// IssueCollectionPage contains a page of IssueContract values. 4313type IssueCollectionPage struct { 4314 fn func(IssueCollection) (IssueCollection, error) 4315 ic IssueCollection 4316} 4317 4318// Next advances to the next page of values. If there was an error making 4319// the request the page does not advance and the error is returned. 4320func (page *IssueCollectionPage) Next() error { 4321 next, err := page.fn(page.ic) 4322 if err != nil { 4323 return err 4324 } 4325 page.ic = next 4326 return nil 4327} 4328 4329// NotDone returns true if the page enumeration should be started or is not yet complete. 4330func (page IssueCollectionPage) NotDone() bool { 4331 return !page.ic.IsEmpty() 4332} 4333 4334// Response returns the raw server response from the last page request. 4335func (page IssueCollectionPage) Response() IssueCollection { 4336 return page.ic 4337} 4338 4339// Values returns the slice of values for the current page or nil if there are no values. 4340func (page IssueCollectionPage) Values() []IssueContract { 4341 if page.ic.IsEmpty() { 4342 return nil 4343 } 4344 return *page.ic.Value 4345} 4346 4347// IssueCommentCollection paged Issue Comment list representation. 4348type IssueCommentCollection struct { 4349 autorest.Response `json:"-"` 4350 // Value - Issue Comment values. 4351 Value *[]IssueCommentContract `json:"value,omitempty"` 4352 // NextLink - Next page link if any. 4353 NextLink *string `json:"nextLink,omitempty"` 4354} 4355 4356// IssueCommentCollectionIterator provides access to a complete listing of IssueCommentContract values. 4357type IssueCommentCollectionIterator struct { 4358 i int 4359 page IssueCommentCollectionPage 4360} 4361 4362// Next advances to the next value. If there was an error making 4363// the request the iterator does not advance and the error is returned. 4364func (iter *IssueCommentCollectionIterator) Next() error { 4365 iter.i++ 4366 if iter.i < len(iter.page.Values()) { 4367 return nil 4368 } 4369 err := iter.page.Next() 4370 if err != nil { 4371 iter.i-- 4372 return err 4373 } 4374 iter.i = 0 4375 return nil 4376} 4377 4378// NotDone returns true if the enumeration should be started or is not yet complete. 4379func (iter IssueCommentCollectionIterator) NotDone() bool { 4380 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 4381} 4382 4383// Response returns the raw server response from the last page request. 4384func (iter IssueCommentCollectionIterator) Response() IssueCommentCollection { 4385 return iter.page.Response() 4386} 4387 4388// Value returns the current value or a zero-initialized value if the 4389// iterator has advanced beyond the end of the collection. 4390func (iter IssueCommentCollectionIterator) Value() IssueCommentContract { 4391 if !iter.page.NotDone() { 4392 return IssueCommentContract{} 4393 } 4394 return iter.page.Values()[iter.i] 4395} 4396 4397// IsEmpty returns true if the ListResult contains no values. 4398func (icc IssueCommentCollection) IsEmpty() bool { 4399 return icc.Value == nil || len(*icc.Value) == 0 4400} 4401 4402// issueCommentCollectionPreparer prepares a request to retrieve the next set of results. 4403// It returns nil if no more results exist. 4404func (icc IssueCommentCollection) issueCommentCollectionPreparer() (*http.Request, error) { 4405 if icc.NextLink == nil || len(to.String(icc.NextLink)) < 1 { 4406 return nil, nil 4407 } 4408 return autorest.Prepare(&http.Request{}, 4409 autorest.AsJSON(), 4410 autorest.AsGet(), 4411 autorest.WithBaseURL(to.String(icc.NextLink))) 4412} 4413 4414// IssueCommentCollectionPage contains a page of IssueCommentContract values. 4415type IssueCommentCollectionPage struct { 4416 fn func(IssueCommentCollection) (IssueCommentCollection, error) 4417 icc IssueCommentCollection 4418} 4419 4420// Next advances to the next page of values. If there was an error making 4421// the request the page does not advance and the error is returned. 4422func (page *IssueCommentCollectionPage) Next() error { 4423 next, err := page.fn(page.icc) 4424 if err != nil { 4425 return err 4426 } 4427 page.icc = next 4428 return nil 4429} 4430 4431// NotDone returns true if the page enumeration should be started or is not yet complete. 4432func (page IssueCommentCollectionPage) NotDone() bool { 4433 return !page.icc.IsEmpty() 4434} 4435 4436// Response returns the raw server response from the last page request. 4437func (page IssueCommentCollectionPage) Response() IssueCommentCollection { 4438 return page.icc 4439} 4440 4441// Values returns the slice of values for the current page or nil if there are no values. 4442func (page IssueCommentCollectionPage) Values() []IssueCommentContract { 4443 if page.icc.IsEmpty() { 4444 return nil 4445 } 4446 return *page.icc.Value 4447} 4448 4449// IssueCommentContract issue Comment Contract details. 4450type IssueCommentContract struct { 4451 autorest.Response `json:"-"` 4452 // IssueCommentContractProperties - Properties of the Issue Comment. 4453 *IssueCommentContractProperties `json:"properties,omitempty"` 4454 // ID - Resource ID. 4455 ID *string `json:"id,omitempty"` 4456 // Name - Resource name. 4457 Name *string `json:"name,omitempty"` 4458 // Type - Resource type for API Management resource. 4459 Type *string `json:"type,omitempty"` 4460} 4461 4462// MarshalJSON is the custom marshaler for IssueCommentContract. 4463func (icc IssueCommentContract) MarshalJSON() ([]byte, error) { 4464 objectMap := make(map[string]interface{}) 4465 if icc.IssueCommentContractProperties != nil { 4466 objectMap["properties"] = icc.IssueCommentContractProperties 4467 } 4468 if icc.ID != nil { 4469 objectMap["id"] = icc.ID 4470 } 4471 if icc.Name != nil { 4472 objectMap["name"] = icc.Name 4473 } 4474 if icc.Type != nil { 4475 objectMap["type"] = icc.Type 4476 } 4477 return json.Marshal(objectMap) 4478} 4479 4480// UnmarshalJSON is the custom unmarshaler for IssueCommentContract struct. 4481func (icc *IssueCommentContract) UnmarshalJSON(body []byte) error { 4482 var m map[string]*json.RawMessage 4483 err := json.Unmarshal(body, &m) 4484 if err != nil { 4485 return err 4486 } 4487 for k, v := range m { 4488 switch k { 4489 case "properties": 4490 if v != nil { 4491 var issueCommentContractProperties IssueCommentContractProperties 4492 err = json.Unmarshal(*v, &issueCommentContractProperties) 4493 if err != nil { 4494 return err 4495 } 4496 icc.IssueCommentContractProperties = &issueCommentContractProperties 4497 } 4498 case "id": 4499 if v != nil { 4500 var ID string 4501 err = json.Unmarshal(*v, &ID) 4502 if err != nil { 4503 return err 4504 } 4505 icc.ID = &ID 4506 } 4507 case "name": 4508 if v != nil { 4509 var name string 4510 err = json.Unmarshal(*v, &name) 4511 if err != nil { 4512 return err 4513 } 4514 icc.Name = &name 4515 } 4516 case "type": 4517 if v != nil { 4518 var typeVar string 4519 err = json.Unmarshal(*v, &typeVar) 4520 if err != nil { 4521 return err 4522 } 4523 icc.Type = &typeVar 4524 } 4525 } 4526 } 4527 4528 return nil 4529} 4530 4531// IssueCommentContractProperties issue Comment contract Properties. 4532type IssueCommentContractProperties struct { 4533 // Text - Comment text. 4534 Text *string `json:"text,omitempty"` 4535 // CreatedDate - Date and time when the comment was created. 4536 CreatedDate *date.Time `json:"createdDate,omitempty"` 4537 // UserID - A resource identifier for the user who left the comment. 4538 UserID *string `json:"userId,omitempty"` 4539} 4540 4541// IssueContract issue Contract details. 4542type IssueContract struct { 4543 autorest.Response `json:"-"` 4544 // IssueContractProperties - Properties of the Issue. 4545 *IssueContractProperties `json:"properties,omitempty"` 4546 // ID - Resource ID. 4547 ID *string `json:"id,omitempty"` 4548 // Name - Resource name. 4549 Name *string `json:"name,omitempty"` 4550 // Type - Resource type for API Management resource. 4551 Type *string `json:"type,omitempty"` 4552} 4553 4554// MarshalJSON is the custom marshaler for IssueContract. 4555func (ic IssueContract) MarshalJSON() ([]byte, error) { 4556 objectMap := make(map[string]interface{}) 4557 if ic.IssueContractProperties != nil { 4558 objectMap["properties"] = ic.IssueContractProperties 4559 } 4560 if ic.ID != nil { 4561 objectMap["id"] = ic.ID 4562 } 4563 if ic.Name != nil { 4564 objectMap["name"] = ic.Name 4565 } 4566 if ic.Type != nil { 4567 objectMap["type"] = ic.Type 4568 } 4569 return json.Marshal(objectMap) 4570} 4571 4572// UnmarshalJSON is the custom unmarshaler for IssueContract struct. 4573func (ic *IssueContract) UnmarshalJSON(body []byte) error { 4574 var m map[string]*json.RawMessage 4575 err := json.Unmarshal(body, &m) 4576 if err != nil { 4577 return err 4578 } 4579 for k, v := range m { 4580 switch k { 4581 case "properties": 4582 if v != nil { 4583 var issueContractProperties IssueContractProperties 4584 err = json.Unmarshal(*v, &issueContractProperties) 4585 if err != nil { 4586 return err 4587 } 4588 ic.IssueContractProperties = &issueContractProperties 4589 } 4590 case "id": 4591 if v != nil { 4592 var ID string 4593 err = json.Unmarshal(*v, &ID) 4594 if err != nil { 4595 return err 4596 } 4597 ic.ID = &ID 4598 } 4599 case "name": 4600 if v != nil { 4601 var name string 4602 err = json.Unmarshal(*v, &name) 4603 if err != nil { 4604 return err 4605 } 4606 ic.Name = &name 4607 } 4608 case "type": 4609 if v != nil { 4610 var typeVar string 4611 err = json.Unmarshal(*v, &typeVar) 4612 if err != nil { 4613 return err 4614 } 4615 ic.Type = &typeVar 4616 } 4617 } 4618 } 4619 4620 return nil 4621} 4622 4623// IssueContractProperties issue contract Properties. 4624type IssueContractProperties struct { 4625 // Title - The issue title. 4626 Title *string `json:"title,omitempty"` 4627 // Description - Text describing the issue. 4628 Description *string `json:"description,omitempty"` 4629 // CreatedDate - Date and time when the issue was created. 4630 CreatedDate *date.Time `json:"createdDate,omitempty"` 4631 // State - Status of the issue. Possible values include: 'Proposed', 'Open', 'Removed', 'Resolved', 'Closed' 4632 State State `json:"state,omitempty"` 4633 // UserID - A resource identifier for the user created the issue. 4634 UserID *string `json:"userId,omitempty"` 4635 // APIID - A resource identifier for the API the issue was created for. 4636 APIID *string `json:"apiId,omitempty"` 4637} 4638 4639// ListNetworkStatusContractByLocation ... 4640type ListNetworkStatusContractByLocation struct { 4641 autorest.Response `json:"-"` 4642 Value *[]NetworkStatusContractByLocation `json:"value,omitempty"` 4643} 4644 4645// LoggerCollection paged Logger list representation. 4646type LoggerCollection struct { 4647 autorest.Response `json:"-"` 4648 // Value - Logger values. 4649 Value *[]LoggerContract `json:"value,omitempty"` 4650 // Count - Total record count number across all pages. 4651 Count *int64 `json:"count,omitempty"` 4652 // NextLink - Next page link if any. 4653 NextLink *string `json:"nextLink,omitempty"` 4654} 4655 4656// LoggerCollectionIterator provides access to a complete listing of LoggerContract values. 4657type LoggerCollectionIterator struct { 4658 i int 4659 page LoggerCollectionPage 4660} 4661 4662// Next advances to the next value. If there was an error making 4663// the request the iterator does not advance and the error is returned. 4664func (iter *LoggerCollectionIterator) Next() error { 4665 iter.i++ 4666 if iter.i < len(iter.page.Values()) { 4667 return nil 4668 } 4669 err := iter.page.Next() 4670 if err != nil { 4671 iter.i-- 4672 return err 4673 } 4674 iter.i = 0 4675 return nil 4676} 4677 4678// NotDone returns true if the enumeration should be started or is not yet complete. 4679func (iter LoggerCollectionIterator) NotDone() bool { 4680 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 4681} 4682 4683// Response returns the raw server response from the last page request. 4684func (iter LoggerCollectionIterator) Response() LoggerCollection { 4685 return iter.page.Response() 4686} 4687 4688// Value returns the current value or a zero-initialized value if the 4689// iterator has advanced beyond the end of the collection. 4690func (iter LoggerCollectionIterator) Value() LoggerContract { 4691 if !iter.page.NotDone() { 4692 return LoggerContract{} 4693 } 4694 return iter.page.Values()[iter.i] 4695} 4696 4697// IsEmpty returns true if the ListResult contains no values. 4698func (lc LoggerCollection) IsEmpty() bool { 4699 return lc.Value == nil || len(*lc.Value) == 0 4700} 4701 4702// loggerCollectionPreparer prepares a request to retrieve the next set of results. 4703// It returns nil if no more results exist. 4704func (lc LoggerCollection) loggerCollectionPreparer() (*http.Request, error) { 4705 if lc.NextLink == nil || len(to.String(lc.NextLink)) < 1 { 4706 return nil, nil 4707 } 4708 return autorest.Prepare(&http.Request{}, 4709 autorest.AsJSON(), 4710 autorest.AsGet(), 4711 autorest.WithBaseURL(to.String(lc.NextLink))) 4712} 4713 4714// LoggerCollectionPage contains a page of LoggerContract values. 4715type LoggerCollectionPage struct { 4716 fn func(LoggerCollection) (LoggerCollection, error) 4717 lc LoggerCollection 4718} 4719 4720// Next advances to the next page of values. If there was an error making 4721// the request the page does not advance and the error is returned. 4722func (page *LoggerCollectionPage) Next() error { 4723 next, err := page.fn(page.lc) 4724 if err != nil { 4725 return err 4726 } 4727 page.lc = next 4728 return nil 4729} 4730 4731// NotDone returns true if the page enumeration should be started or is not yet complete. 4732func (page LoggerCollectionPage) NotDone() bool { 4733 return !page.lc.IsEmpty() 4734} 4735 4736// Response returns the raw server response from the last page request. 4737func (page LoggerCollectionPage) Response() LoggerCollection { 4738 return page.lc 4739} 4740 4741// Values returns the slice of values for the current page or nil if there are no values. 4742func (page LoggerCollectionPage) Values() []LoggerContract { 4743 if page.lc.IsEmpty() { 4744 return nil 4745 } 4746 return *page.lc.Value 4747} 4748 4749// LoggerContract logger details. 4750type LoggerContract struct { 4751 autorest.Response `json:"-"` 4752 // LoggerContractProperties - Logger entity contract properties. 4753 *LoggerContractProperties `json:"properties,omitempty"` 4754 // ID - Resource ID. 4755 ID *string `json:"id,omitempty"` 4756 // Name - Resource name. 4757 Name *string `json:"name,omitempty"` 4758 // Type - Resource type for API Management resource. 4759 Type *string `json:"type,omitempty"` 4760} 4761 4762// MarshalJSON is the custom marshaler for LoggerContract. 4763func (lc LoggerContract) MarshalJSON() ([]byte, error) { 4764 objectMap := make(map[string]interface{}) 4765 if lc.LoggerContractProperties != nil { 4766 objectMap["properties"] = lc.LoggerContractProperties 4767 } 4768 if lc.ID != nil { 4769 objectMap["id"] = lc.ID 4770 } 4771 if lc.Name != nil { 4772 objectMap["name"] = lc.Name 4773 } 4774 if lc.Type != nil { 4775 objectMap["type"] = lc.Type 4776 } 4777 return json.Marshal(objectMap) 4778} 4779 4780// UnmarshalJSON is the custom unmarshaler for LoggerContract struct. 4781func (lc *LoggerContract) UnmarshalJSON(body []byte) error { 4782 var m map[string]*json.RawMessage 4783 err := json.Unmarshal(body, &m) 4784 if err != nil { 4785 return err 4786 } 4787 for k, v := range m { 4788 switch k { 4789 case "properties": 4790 if v != nil { 4791 var loggerContractProperties LoggerContractProperties 4792 err = json.Unmarshal(*v, &loggerContractProperties) 4793 if err != nil { 4794 return err 4795 } 4796 lc.LoggerContractProperties = &loggerContractProperties 4797 } 4798 case "id": 4799 if v != nil { 4800 var ID string 4801 err = json.Unmarshal(*v, &ID) 4802 if err != nil { 4803 return err 4804 } 4805 lc.ID = &ID 4806 } 4807 case "name": 4808 if v != nil { 4809 var name string 4810 err = json.Unmarshal(*v, &name) 4811 if err != nil { 4812 return err 4813 } 4814 lc.Name = &name 4815 } 4816 case "type": 4817 if v != nil { 4818 var typeVar string 4819 err = json.Unmarshal(*v, &typeVar) 4820 if err != nil { 4821 return err 4822 } 4823 lc.Type = &typeVar 4824 } 4825 } 4826 } 4827 4828 return nil 4829} 4830 4831// LoggerContractProperties the Logger entity in API Management represents an event sink that you can use to log 4832// API Management events. Currently the Logger entity supports logging API Management events to Azure Event Hubs. 4833type LoggerContractProperties struct { 4834 // LoggerType - Logger type. Possible values include: 'AzureEventHub', 'ApplicationInsights' 4835 LoggerType LoggerType `json:"loggerType,omitempty"` 4836 // Description - Logger description. 4837 Description *string `json:"description,omitempty"` 4838 // Credentials - The name and SendRule connection string of the event hub for azureEventHub logger. 4839 // Instrumentation key for applicationInsights logger. 4840 Credentials map[string]*string `json:"credentials"` 4841 // IsBuffered - Whether records are buffered in the logger before publishing. Default is assumed to be true. 4842 IsBuffered *bool `json:"isBuffered,omitempty"` 4843 // ResourceID - Azure Resource Id of a log target (either Azure Event Hub resource or Azure Application Insights resource). 4844 ResourceID *string `json:"resourceId,omitempty"` 4845} 4846 4847// MarshalJSON is the custom marshaler for LoggerContractProperties. 4848func (lcp LoggerContractProperties) MarshalJSON() ([]byte, error) { 4849 objectMap := make(map[string]interface{}) 4850 if lcp.LoggerType != "" { 4851 objectMap["loggerType"] = lcp.LoggerType 4852 } 4853 if lcp.Description != nil { 4854 objectMap["description"] = lcp.Description 4855 } 4856 if lcp.Credentials != nil { 4857 objectMap["credentials"] = lcp.Credentials 4858 } 4859 if lcp.IsBuffered != nil { 4860 objectMap["isBuffered"] = lcp.IsBuffered 4861 } 4862 if lcp.ResourceID != nil { 4863 objectMap["resourceId"] = lcp.ResourceID 4864 } 4865 return json.Marshal(objectMap) 4866} 4867 4868// LoggerUpdateContract logger update contract. 4869type LoggerUpdateContract struct { 4870 // LoggerUpdateParameters - Logger entity update contract properties. 4871 *LoggerUpdateParameters `json:"properties,omitempty"` 4872} 4873 4874// MarshalJSON is the custom marshaler for LoggerUpdateContract. 4875func (luc LoggerUpdateContract) MarshalJSON() ([]byte, error) { 4876 objectMap := make(map[string]interface{}) 4877 if luc.LoggerUpdateParameters != nil { 4878 objectMap["properties"] = luc.LoggerUpdateParameters 4879 } 4880 return json.Marshal(objectMap) 4881} 4882 4883// UnmarshalJSON is the custom unmarshaler for LoggerUpdateContract struct. 4884func (luc *LoggerUpdateContract) UnmarshalJSON(body []byte) error { 4885 var m map[string]*json.RawMessage 4886 err := json.Unmarshal(body, &m) 4887 if err != nil { 4888 return err 4889 } 4890 for k, v := range m { 4891 switch k { 4892 case "properties": 4893 if v != nil { 4894 var loggerUpdateParameters LoggerUpdateParameters 4895 err = json.Unmarshal(*v, &loggerUpdateParameters) 4896 if err != nil { 4897 return err 4898 } 4899 luc.LoggerUpdateParameters = &loggerUpdateParameters 4900 } 4901 } 4902 } 4903 4904 return nil 4905} 4906 4907// LoggerUpdateParameters parameters supplied to the Update Logger operation. 4908type LoggerUpdateParameters struct { 4909 // LoggerType - Logger type. Possible values include: 'AzureEventHub', 'ApplicationInsights' 4910 LoggerType LoggerType `json:"loggerType,omitempty"` 4911 // Description - Logger description. 4912 Description *string `json:"description,omitempty"` 4913 // Credentials - Logger credentials. 4914 Credentials map[string]*string `json:"credentials"` 4915 // IsBuffered - Whether records are buffered in the logger before publishing. Default is assumed to be true. 4916 IsBuffered *bool `json:"isBuffered,omitempty"` 4917} 4918 4919// MarshalJSON is the custom marshaler for LoggerUpdateParameters. 4920func (lup LoggerUpdateParameters) MarshalJSON() ([]byte, error) { 4921 objectMap := make(map[string]interface{}) 4922 if lup.LoggerType != "" { 4923 objectMap["loggerType"] = lup.LoggerType 4924 } 4925 if lup.Description != nil { 4926 objectMap["description"] = lup.Description 4927 } 4928 if lup.Credentials != nil { 4929 objectMap["credentials"] = lup.Credentials 4930 } 4931 if lup.IsBuffered != nil { 4932 objectMap["isBuffered"] = lup.IsBuffered 4933 } 4934 return json.Marshal(objectMap) 4935} 4936 4937// NetworkStatusContract network Status details. 4938type NetworkStatusContract struct { 4939 autorest.Response `json:"-"` 4940 // DNSServers - Gets the list of DNS servers IPV4 addresses. 4941 DNSServers *[]string `json:"dnsServers,omitempty"` 4942 // ConnectivityStatus - Gets the list of Connectivity Status to the Resources on which the service depends upon. 4943 ConnectivityStatus *[]ConnectivityStatusContract `json:"connectivityStatus,omitempty"` 4944} 4945 4946// NetworkStatusContractByLocation network Status in the Location 4947type NetworkStatusContractByLocation struct { 4948 // Location - Location of service 4949 Location *string `json:"location,omitempty"` 4950 // NetworkStatus - Network status in Location 4951 NetworkStatus *NetworkStatusContract `json:"networkStatus,omitempty"` 4952} 4953 4954// NotificationCollection paged Notification list representation. 4955type NotificationCollection struct { 4956 autorest.Response `json:"-"` 4957 // Value - Page values. 4958 Value *[]NotificationContract `json:"value,omitempty"` 4959 // NextLink - Next page link if any. 4960 NextLink *string `json:"nextLink,omitempty"` 4961} 4962 4963// NotificationCollectionIterator provides access to a complete listing of NotificationContract values. 4964type NotificationCollectionIterator struct { 4965 i int 4966 page NotificationCollectionPage 4967} 4968 4969// Next advances to the next value. If there was an error making 4970// the request the iterator does not advance and the error is returned. 4971func (iter *NotificationCollectionIterator) Next() error { 4972 iter.i++ 4973 if iter.i < len(iter.page.Values()) { 4974 return nil 4975 } 4976 err := iter.page.Next() 4977 if err != nil { 4978 iter.i-- 4979 return err 4980 } 4981 iter.i = 0 4982 return nil 4983} 4984 4985// NotDone returns true if the enumeration should be started or is not yet complete. 4986func (iter NotificationCollectionIterator) NotDone() bool { 4987 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 4988} 4989 4990// Response returns the raw server response from the last page request. 4991func (iter NotificationCollectionIterator) Response() NotificationCollection { 4992 return iter.page.Response() 4993} 4994 4995// Value returns the current value or a zero-initialized value if the 4996// iterator has advanced beyond the end of the collection. 4997func (iter NotificationCollectionIterator) Value() NotificationContract { 4998 if !iter.page.NotDone() { 4999 return NotificationContract{} 5000 } 5001 return iter.page.Values()[iter.i] 5002} 5003 5004// IsEmpty returns true if the ListResult contains no values. 5005func (nc NotificationCollection) IsEmpty() bool { 5006 return nc.Value == nil || len(*nc.Value) == 0 5007} 5008 5009// notificationCollectionPreparer prepares a request to retrieve the next set of results. 5010// It returns nil if no more results exist. 5011func (nc NotificationCollection) notificationCollectionPreparer() (*http.Request, error) { 5012 if nc.NextLink == nil || len(to.String(nc.NextLink)) < 1 { 5013 return nil, nil 5014 } 5015 return autorest.Prepare(&http.Request{}, 5016 autorest.AsJSON(), 5017 autorest.AsGet(), 5018 autorest.WithBaseURL(to.String(nc.NextLink))) 5019} 5020 5021// NotificationCollectionPage contains a page of NotificationContract values. 5022type NotificationCollectionPage struct { 5023 fn func(NotificationCollection) (NotificationCollection, error) 5024 nc NotificationCollection 5025} 5026 5027// Next advances to the next page of values. If there was an error making 5028// the request the page does not advance and the error is returned. 5029func (page *NotificationCollectionPage) Next() error { 5030 next, err := page.fn(page.nc) 5031 if err != nil { 5032 return err 5033 } 5034 page.nc = next 5035 return nil 5036} 5037 5038// NotDone returns true if the page enumeration should be started or is not yet complete. 5039func (page NotificationCollectionPage) NotDone() bool { 5040 return !page.nc.IsEmpty() 5041} 5042 5043// Response returns the raw server response from the last page request. 5044func (page NotificationCollectionPage) Response() NotificationCollection { 5045 return page.nc 5046} 5047 5048// Values returns the slice of values for the current page or nil if there are no values. 5049func (page NotificationCollectionPage) Values() []NotificationContract { 5050 if page.nc.IsEmpty() { 5051 return nil 5052 } 5053 return *page.nc.Value 5054} 5055 5056// NotificationContract notification details. 5057type NotificationContract struct { 5058 autorest.Response `json:"-"` 5059 // NotificationContractProperties - Notification entity contract properties. 5060 *NotificationContractProperties `json:"properties,omitempty"` 5061 // ID - Resource ID. 5062 ID *string `json:"id,omitempty"` 5063 // Name - Resource name. 5064 Name *string `json:"name,omitempty"` 5065 // Type - Resource type for API Management resource. 5066 Type *string `json:"type,omitempty"` 5067} 5068 5069// MarshalJSON is the custom marshaler for NotificationContract. 5070func (nc NotificationContract) MarshalJSON() ([]byte, error) { 5071 objectMap := make(map[string]interface{}) 5072 if nc.NotificationContractProperties != nil { 5073 objectMap["properties"] = nc.NotificationContractProperties 5074 } 5075 if nc.ID != nil { 5076 objectMap["id"] = nc.ID 5077 } 5078 if nc.Name != nil { 5079 objectMap["name"] = nc.Name 5080 } 5081 if nc.Type != nil { 5082 objectMap["type"] = nc.Type 5083 } 5084 return json.Marshal(objectMap) 5085} 5086 5087// UnmarshalJSON is the custom unmarshaler for NotificationContract struct. 5088func (nc *NotificationContract) UnmarshalJSON(body []byte) error { 5089 var m map[string]*json.RawMessage 5090 err := json.Unmarshal(body, &m) 5091 if err != nil { 5092 return err 5093 } 5094 for k, v := range m { 5095 switch k { 5096 case "properties": 5097 if v != nil { 5098 var notificationContractProperties NotificationContractProperties 5099 err = json.Unmarshal(*v, ¬ificationContractProperties) 5100 if err != nil { 5101 return err 5102 } 5103 nc.NotificationContractProperties = ¬ificationContractProperties 5104 } 5105 case "id": 5106 if v != nil { 5107 var ID string 5108 err = json.Unmarshal(*v, &ID) 5109 if err != nil { 5110 return err 5111 } 5112 nc.ID = &ID 5113 } 5114 case "name": 5115 if v != nil { 5116 var name string 5117 err = json.Unmarshal(*v, &name) 5118 if err != nil { 5119 return err 5120 } 5121 nc.Name = &name 5122 } 5123 case "type": 5124 if v != nil { 5125 var typeVar string 5126 err = json.Unmarshal(*v, &typeVar) 5127 if err != nil { 5128 return err 5129 } 5130 nc.Type = &typeVar 5131 } 5132 } 5133 } 5134 5135 return nil 5136} 5137 5138// NotificationContractProperties notification Contract properties. 5139type NotificationContractProperties struct { 5140 // Title - Title of the Notification. 5141 Title *string `json:"title,omitempty"` 5142 // Description - Description of the Notification. 5143 Description *string `json:"description,omitempty"` 5144 // Recipients - Recipient Parameter values. 5145 Recipients *RecipientsContractProperties `json:"recipients,omitempty"` 5146} 5147 5148// OAuth2AuthenticationSettingsContract API OAuth2 Authentication settings details. 5149type OAuth2AuthenticationSettingsContract struct { 5150 // AuthorizationServerID - OAuth authorization server identifier. 5151 AuthorizationServerID *string `json:"authorizationServerId,omitempty"` 5152 // Scope - operations scope. 5153 Scope *string `json:"scope,omitempty"` 5154} 5155 5156// OpenIDConnectProviderCollection paged OpenIdProviders list representation. 5157type OpenIDConnectProviderCollection struct { 5158 autorest.Response `json:"-"` 5159 // Value - Page values. 5160 Value *[]OpenidConnectProviderContract `json:"value,omitempty"` 5161 // NextLink - Next page link if any. 5162 NextLink *string `json:"nextLink,omitempty"` 5163} 5164 5165// OpenIDConnectProviderCollectionIterator provides access to a complete listing of OpenidConnectProviderContract 5166// values. 5167type OpenIDConnectProviderCollectionIterator struct { 5168 i int 5169 page OpenIDConnectProviderCollectionPage 5170} 5171 5172// Next advances to the next value. If there was an error making 5173// the request the iterator does not advance and the error is returned. 5174func (iter *OpenIDConnectProviderCollectionIterator) Next() error { 5175 iter.i++ 5176 if iter.i < len(iter.page.Values()) { 5177 return nil 5178 } 5179 err := iter.page.Next() 5180 if err != nil { 5181 iter.i-- 5182 return err 5183 } 5184 iter.i = 0 5185 return nil 5186} 5187 5188// NotDone returns true if the enumeration should be started or is not yet complete. 5189func (iter OpenIDConnectProviderCollectionIterator) NotDone() bool { 5190 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 5191} 5192 5193// Response returns the raw server response from the last page request. 5194func (iter OpenIDConnectProviderCollectionIterator) Response() OpenIDConnectProviderCollection { 5195 return iter.page.Response() 5196} 5197 5198// Value returns the current value or a zero-initialized value if the 5199// iterator has advanced beyond the end of the collection. 5200func (iter OpenIDConnectProviderCollectionIterator) Value() OpenidConnectProviderContract { 5201 if !iter.page.NotDone() { 5202 return OpenidConnectProviderContract{} 5203 } 5204 return iter.page.Values()[iter.i] 5205} 5206 5207// IsEmpty returns true if the ListResult contains no values. 5208func (oicpc OpenIDConnectProviderCollection) IsEmpty() bool { 5209 return oicpc.Value == nil || len(*oicpc.Value) == 0 5210} 5211 5212// openIDConnectProviderCollectionPreparer prepares a request to retrieve the next set of results. 5213// It returns nil if no more results exist. 5214func (oicpc OpenIDConnectProviderCollection) openIDConnectProviderCollectionPreparer() (*http.Request, error) { 5215 if oicpc.NextLink == nil || len(to.String(oicpc.NextLink)) < 1 { 5216 return nil, nil 5217 } 5218 return autorest.Prepare(&http.Request{}, 5219 autorest.AsJSON(), 5220 autorest.AsGet(), 5221 autorest.WithBaseURL(to.String(oicpc.NextLink))) 5222} 5223 5224// OpenIDConnectProviderCollectionPage contains a page of OpenidConnectProviderContract values. 5225type OpenIDConnectProviderCollectionPage struct { 5226 fn func(OpenIDConnectProviderCollection) (OpenIDConnectProviderCollection, error) 5227 oicpc OpenIDConnectProviderCollection 5228} 5229 5230// Next advances to the next page of values. If there was an error making 5231// the request the page does not advance and the error is returned. 5232func (page *OpenIDConnectProviderCollectionPage) Next() error { 5233 next, err := page.fn(page.oicpc) 5234 if err != nil { 5235 return err 5236 } 5237 page.oicpc = next 5238 return nil 5239} 5240 5241// NotDone returns true if the page enumeration should be started or is not yet complete. 5242func (page OpenIDConnectProviderCollectionPage) NotDone() bool { 5243 return !page.oicpc.IsEmpty() 5244} 5245 5246// Response returns the raw server response from the last page request. 5247func (page OpenIDConnectProviderCollectionPage) Response() OpenIDConnectProviderCollection { 5248 return page.oicpc 5249} 5250 5251// Values returns the slice of values for the current page or nil if there are no values. 5252func (page OpenIDConnectProviderCollectionPage) Values() []OpenidConnectProviderContract { 5253 if page.oicpc.IsEmpty() { 5254 return nil 5255 } 5256 return *page.oicpc.Value 5257} 5258 5259// OpenidConnectProviderContract openId Connect Provider details. 5260type OpenidConnectProviderContract struct { 5261 autorest.Response `json:"-"` 5262 // OpenidConnectProviderContractProperties - OpenId Connect Provider contract properties. 5263 *OpenidConnectProviderContractProperties `json:"properties,omitempty"` 5264 // ID - Resource ID. 5265 ID *string `json:"id,omitempty"` 5266 // Name - Resource name. 5267 Name *string `json:"name,omitempty"` 5268 // Type - Resource type for API Management resource. 5269 Type *string `json:"type,omitempty"` 5270} 5271 5272// MarshalJSON is the custom marshaler for OpenidConnectProviderContract. 5273func (ocpc OpenidConnectProviderContract) MarshalJSON() ([]byte, error) { 5274 objectMap := make(map[string]interface{}) 5275 if ocpc.OpenidConnectProviderContractProperties != nil { 5276 objectMap["properties"] = ocpc.OpenidConnectProviderContractProperties 5277 } 5278 if ocpc.ID != nil { 5279 objectMap["id"] = ocpc.ID 5280 } 5281 if ocpc.Name != nil { 5282 objectMap["name"] = ocpc.Name 5283 } 5284 if ocpc.Type != nil { 5285 objectMap["type"] = ocpc.Type 5286 } 5287 return json.Marshal(objectMap) 5288} 5289 5290// UnmarshalJSON is the custom unmarshaler for OpenidConnectProviderContract struct. 5291func (ocpc *OpenidConnectProviderContract) UnmarshalJSON(body []byte) error { 5292 var m map[string]*json.RawMessage 5293 err := json.Unmarshal(body, &m) 5294 if err != nil { 5295 return err 5296 } 5297 for k, v := range m { 5298 switch k { 5299 case "properties": 5300 if v != nil { 5301 var openidConnectProviderContractProperties OpenidConnectProviderContractProperties 5302 err = json.Unmarshal(*v, &openidConnectProviderContractProperties) 5303 if err != nil { 5304 return err 5305 } 5306 ocpc.OpenidConnectProviderContractProperties = &openidConnectProviderContractProperties 5307 } 5308 case "id": 5309 if v != nil { 5310 var ID string 5311 err = json.Unmarshal(*v, &ID) 5312 if err != nil { 5313 return err 5314 } 5315 ocpc.ID = &ID 5316 } 5317 case "name": 5318 if v != nil { 5319 var name string 5320 err = json.Unmarshal(*v, &name) 5321 if err != nil { 5322 return err 5323 } 5324 ocpc.Name = &name 5325 } 5326 case "type": 5327 if v != nil { 5328 var typeVar string 5329 err = json.Unmarshal(*v, &typeVar) 5330 if err != nil { 5331 return err 5332 } 5333 ocpc.Type = &typeVar 5334 } 5335 } 5336 } 5337 5338 return nil 5339} 5340 5341// OpenidConnectProviderContractProperties openID Connect Providers Contract. 5342type OpenidConnectProviderContractProperties struct { 5343 // DisplayName - User-friendly OpenID Connect Provider name. 5344 DisplayName *string `json:"displayName,omitempty"` 5345 // Description - User-friendly description of OpenID Connect Provider. 5346 Description *string `json:"description,omitempty"` 5347 // MetadataEndpoint - Metadata endpoint URI. 5348 MetadataEndpoint *string `json:"metadataEndpoint,omitempty"` 5349 // ClientID - Client ID of developer console which is the client application. 5350 ClientID *string `json:"clientId,omitempty"` 5351 // ClientSecret - Client Secret of developer console which is the client application. 5352 ClientSecret *string `json:"clientSecret,omitempty"` 5353} 5354 5355// OpenidConnectProviderUpdateContract parameters supplied to the Update OpenID Connect Provider operation. 5356type OpenidConnectProviderUpdateContract struct { 5357 // OpenidConnectProviderUpdateContractProperties - OpenId Connect Provider Update contract properties. 5358 *OpenidConnectProviderUpdateContractProperties `json:"properties,omitempty"` 5359} 5360 5361// MarshalJSON is the custom marshaler for OpenidConnectProviderUpdateContract. 5362func (ocpuc OpenidConnectProviderUpdateContract) MarshalJSON() ([]byte, error) { 5363 objectMap := make(map[string]interface{}) 5364 if ocpuc.OpenidConnectProviderUpdateContractProperties != nil { 5365 objectMap["properties"] = ocpuc.OpenidConnectProviderUpdateContractProperties 5366 } 5367 return json.Marshal(objectMap) 5368} 5369 5370// UnmarshalJSON is the custom unmarshaler for OpenidConnectProviderUpdateContract struct. 5371func (ocpuc *OpenidConnectProviderUpdateContract) UnmarshalJSON(body []byte) error { 5372 var m map[string]*json.RawMessage 5373 err := json.Unmarshal(body, &m) 5374 if err != nil { 5375 return err 5376 } 5377 for k, v := range m { 5378 switch k { 5379 case "properties": 5380 if v != nil { 5381 var openidConnectProviderUpdateContractProperties OpenidConnectProviderUpdateContractProperties 5382 err = json.Unmarshal(*v, &openidConnectProviderUpdateContractProperties) 5383 if err != nil { 5384 return err 5385 } 5386 ocpuc.OpenidConnectProviderUpdateContractProperties = &openidConnectProviderUpdateContractProperties 5387 } 5388 } 5389 } 5390 5391 return nil 5392} 5393 5394// OpenidConnectProviderUpdateContractProperties parameters supplied to the Update OpenID Connect Provider 5395// operation. 5396type OpenidConnectProviderUpdateContractProperties struct { 5397 // DisplayName - User-friendly OpenID Connect Provider name. 5398 DisplayName *string `json:"displayName,omitempty"` 5399 // Description - User-friendly description of OpenID Connect Provider. 5400 Description *string `json:"description,omitempty"` 5401 // MetadataEndpoint - Metadata endpoint URI. 5402 MetadataEndpoint *string `json:"metadataEndpoint,omitempty"` 5403 // ClientID - Client ID of developer console which is the client application. 5404 ClientID *string `json:"clientId,omitempty"` 5405 // ClientSecret - Client Secret of developer console which is the client application. 5406 ClientSecret *string `json:"clientSecret,omitempty"` 5407} 5408 5409// Operation REST API operation 5410type Operation struct { 5411 // Name - Operation name: {provider}/{resource}/{operation} 5412 Name *string `json:"name,omitempty"` 5413 // Display - The object that describes the operation. 5414 Display *OperationDisplay `json:"display,omitempty"` 5415 // Origin - The operation origin. 5416 Origin *string `json:"origin,omitempty"` 5417 // Properties - The operation properties. 5418 Properties interface{} `json:"properties,omitempty"` 5419} 5420 5421// OperationCollection paged Operation list representation. 5422type OperationCollection struct { 5423 autorest.Response `json:"-"` 5424 // Value - Page values. 5425 Value *[]OperationContract `json:"value,omitempty"` 5426 // NextLink - Next page link if any. 5427 NextLink *string `json:"nextLink,omitempty"` 5428} 5429 5430// OperationCollectionIterator provides access to a complete listing of OperationContract values. 5431type OperationCollectionIterator struct { 5432 i int 5433 page OperationCollectionPage 5434} 5435 5436// Next advances to the next value. If there was an error making 5437// the request the iterator does not advance and the error is returned. 5438func (iter *OperationCollectionIterator) Next() error { 5439 iter.i++ 5440 if iter.i < len(iter.page.Values()) { 5441 return nil 5442 } 5443 err := iter.page.Next() 5444 if err != nil { 5445 iter.i-- 5446 return err 5447 } 5448 iter.i = 0 5449 return nil 5450} 5451 5452// NotDone returns true if the enumeration should be started or is not yet complete. 5453func (iter OperationCollectionIterator) NotDone() bool { 5454 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 5455} 5456 5457// Response returns the raw server response from the last page request. 5458func (iter OperationCollectionIterator) Response() OperationCollection { 5459 return iter.page.Response() 5460} 5461 5462// Value returns the current value or a zero-initialized value if the 5463// iterator has advanced beyond the end of the collection. 5464func (iter OperationCollectionIterator) Value() OperationContract { 5465 if !iter.page.NotDone() { 5466 return OperationContract{} 5467 } 5468 return iter.page.Values()[iter.i] 5469} 5470 5471// IsEmpty returns true if the ListResult contains no values. 5472func (oc OperationCollection) IsEmpty() bool { 5473 return oc.Value == nil || len(*oc.Value) == 0 5474} 5475 5476// operationCollectionPreparer prepares a request to retrieve the next set of results. 5477// It returns nil if no more results exist. 5478func (oc OperationCollection) operationCollectionPreparer() (*http.Request, error) { 5479 if oc.NextLink == nil || len(to.String(oc.NextLink)) < 1 { 5480 return nil, nil 5481 } 5482 return autorest.Prepare(&http.Request{}, 5483 autorest.AsJSON(), 5484 autorest.AsGet(), 5485 autorest.WithBaseURL(to.String(oc.NextLink))) 5486} 5487 5488// OperationCollectionPage contains a page of OperationContract values. 5489type OperationCollectionPage struct { 5490 fn func(OperationCollection) (OperationCollection, error) 5491 oc OperationCollection 5492} 5493 5494// Next advances to the next page of values. If there was an error making 5495// the request the page does not advance and the error is returned. 5496func (page *OperationCollectionPage) Next() error { 5497 next, err := page.fn(page.oc) 5498 if err != nil { 5499 return err 5500 } 5501 page.oc = next 5502 return nil 5503} 5504 5505// NotDone returns true if the page enumeration should be started or is not yet complete. 5506func (page OperationCollectionPage) NotDone() bool { 5507 return !page.oc.IsEmpty() 5508} 5509 5510// Response returns the raw server response from the last page request. 5511func (page OperationCollectionPage) Response() OperationCollection { 5512 return page.oc 5513} 5514 5515// Values returns the slice of values for the current page or nil if there are no values. 5516func (page OperationCollectionPage) Values() []OperationContract { 5517 if page.oc.IsEmpty() { 5518 return nil 5519 } 5520 return *page.oc.Value 5521} 5522 5523// OperationContract api Operation details. 5524type OperationContract struct { 5525 autorest.Response `json:"-"` 5526 // OperationContractProperties - Properties of the Operation Contract. 5527 *OperationContractProperties `json:"properties,omitempty"` 5528 // ID - Resource ID. 5529 ID *string `json:"id,omitempty"` 5530 // Name - Resource name. 5531 Name *string `json:"name,omitempty"` 5532 // Type - Resource type for API Management resource. 5533 Type *string `json:"type,omitempty"` 5534} 5535 5536// MarshalJSON is the custom marshaler for OperationContract. 5537func (oc OperationContract) MarshalJSON() ([]byte, error) { 5538 objectMap := make(map[string]interface{}) 5539 if oc.OperationContractProperties != nil { 5540 objectMap["properties"] = oc.OperationContractProperties 5541 } 5542 if oc.ID != nil { 5543 objectMap["id"] = oc.ID 5544 } 5545 if oc.Name != nil { 5546 objectMap["name"] = oc.Name 5547 } 5548 if oc.Type != nil { 5549 objectMap["type"] = oc.Type 5550 } 5551 return json.Marshal(objectMap) 5552} 5553 5554// UnmarshalJSON is the custom unmarshaler for OperationContract struct. 5555func (oc *OperationContract) UnmarshalJSON(body []byte) error { 5556 var m map[string]*json.RawMessage 5557 err := json.Unmarshal(body, &m) 5558 if err != nil { 5559 return err 5560 } 5561 for k, v := range m { 5562 switch k { 5563 case "properties": 5564 if v != nil { 5565 var operationContractProperties OperationContractProperties 5566 err = json.Unmarshal(*v, &operationContractProperties) 5567 if err != nil { 5568 return err 5569 } 5570 oc.OperationContractProperties = &operationContractProperties 5571 } 5572 case "id": 5573 if v != nil { 5574 var ID string 5575 err = json.Unmarshal(*v, &ID) 5576 if err != nil { 5577 return err 5578 } 5579 oc.ID = &ID 5580 } 5581 case "name": 5582 if v != nil { 5583 var name string 5584 err = json.Unmarshal(*v, &name) 5585 if err != nil { 5586 return err 5587 } 5588 oc.Name = &name 5589 } 5590 case "type": 5591 if v != nil { 5592 var typeVar string 5593 err = json.Unmarshal(*v, &typeVar) 5594 if err != nil { 5595 return err 5596 } 5597 oc.Type = &typeVar 5598 } 5599 } 5600 } 5601 5602 return nil 5603} 5604 5605// OperationContractProperties operation Contract Properties 5606type OperationContractProperties struct { 5607 // DisplayName - Operation Name. 5608 DisplayName *string `json:"displayName,omitempty"` 5609 // Method - A Valid HTTP Operation Method. Typical Http Methods like GET, PUT, POST but not limited by only them. 5610 Method *string `json:"method,omitempty"` 5611 // URLTemplate - Relative URL template identifying the target resource for this operation. May include parameters. Example: /customers/{cid}/orders/{oid}/?date={date} 5612 URLTemplate *string `json:"urlTemplate,omitempty"` 5613 // TemplateParameters - Collection of URL template parameters. 5614 TemplateParameters *[]ParameterContract `json:"templateParameters,omitempty"` 5615 // Description - Description of the operation. May include HTML formatting tags. 5616 Description *string `json:"description,omitempty"` 5617 // Request - An entity containing request details. 5618 Request *RequestContract `json:"request,omitempty"` 5619 // Responses - Array of Operation responses. 5620 Responses *[]ResponseContract `json:"responses,omitempty"` 5621 // Policies - Operation Policies 5622 Policies *string `json:"policies,omitempty"` 5623} 5624 5625// OperationDisplay the object that describes the operation. 5626type OperationDisplay struct { 5627 // Provider - Friendly name of the resource provider 5628 Provider *string `json:"provider,omitempty"` 5629 // Operation - Operation type: read, write, delete, listKeys/action, etc. 5630 Operation *string `json:"operation,omitempty"` 5631 // Resource - Resource type on which the operation is performed. 5632 Resource *string `json:"resource,omitempty"` 5633 // Description - Friendly name of the operation 5634 Description *string `json:"description,omitempty"` 5635} 5636 5637// OperationEntityBaseContract api Operation Entity Base Contract details. 5638type OperationEntityBaseContract struct { 5639 // TemplateParameters - Collection of URL template parameters. 5640 TemplateParameters *[]ParameterContract `json:"templateParameters,omitempty"` 5641 // Description - Description of the operation. May include HTML formatting tags. 5642 Description *string `json:"description,omitempty"` 5643 // Request - An entity containing request details. 5644 Request *RequestContract `json:"request,omitempty"` 5645 // Responses - Array of Operation responses. 5646 Responses *[]ResponseContract `json:"responses,omitempty"` 5647 // Policies - Operation Policies 5648 Policies *string `json:"policies,omitempty"` 5649} 5650 5651// OperationListResult result of the request to list REST API operations. It contains a list of operations and a 5652// URL nextLink to get the next set of results. 5653type OperationListResult struct { 5654 autorest.Response `json:"-"` 5655 // Value - List of operations supported by the resource provider. 5656 Value *[]Operation `json:"value,omitempty"` 5657 // NextLink - URL to get the next set of operation list results if there are any. 5658 NextLink *string `json:"nextLink,omitempty"` 5659} 5660 5661// OperationListResultIterator provides access to a complete listing of Operation values. 5662type OperationListResultIterator struct { 5663 i int 5664 page OperationListResultPage 5665} 5666 5667// Next advances to the next value. If there was an error making 5668// the request the iterator does not advance and the error is returned. 5669func (iter *OperationListResultIterator) Next() error { 5670 iter.i++ 5671 if iter.i < len(iter.page.Values()) { 5672 return nil 5673 } 5674 err := iter.page.Next() 5675 if err != nil { 5676 iter.i-- 5677 return err 5678 } 5679 iter.i = 0 5680 return nil 5681} 5682 5683// NotDone returns true if the enumeration should be started or is not yet complete. 5684func (iter OperationListResultIterator) NotDone() bool { 5685 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 5686} 5687 5688// Response returns the raw server response from the last page request. 5689func (iter OperationListResultIterator) Response() OperationListResult { 5690 return iter.page.Response() 5691} 5692 5693// Value returns the current value or a zero-initialized value if the 5694// iterator has advanced beyond the end of the collection. 5695func (iter OperationListResultIterator) Value() Operation { 5696 if !iter.page.NotDone() { 5697 return Operation{} 5698 } 5699 return iter.page.Values()[iter.i] 5700} 5701 5702// IsEmpty returns true if the ListResult contains no values. 5703func (olr OperationListResult) IsEmpty() bool { 5704 return olr.Value == nil || len(*olr.Value) == 0 5705} 5706 5707// operationListResultPreparer prepares a request to retrieve the next set of results. 5708// It returns nil if no more results exist. 5709func (olr OperationListResult) operationListResultPreparer() (*http.Request, error) { 5710 if olr.NextLink == nil || len(to.String(olr.NextLink)) < 1 { 5711 return nil, nil 5712 } 5713 return autorest.Prepare(&http.Request{}, 5714 autorest.AsJSON(), 5715 autorest.AsGet(), 5716 autorest.WithBaseURL(to.String(olr.NextLink))) 5717} 5718 5719// OperationListResultPage contains a page of Operation values. 5720type OperationListResultPage struct { 5721 fn func(OperationListResult) (OperationListResult, error) 5722 olr OperationListResult 5723} 5724 5725// Next advances to the next page of values. If there was an error making 5726// the request the page does not advance and the error is returned. 5727func (page *OperationListResultPage) Next() error { 5728 next, err := page.fn(page.olr) 5729 if err != nil { 5730 return err 5731 } 5732 page.olr = next 5733 return nil 5734} 5735 5736// NotDone returns true if the page enumeration should be started or is not yet complete. 5737func (page OperationListResultPage) NotDone() bool { 5738 return !page.olr.IsEmpty() 5739} 5740 5741// Response returns the raw server response from the last page request. 5742func (page OperationListResultPage) Response() OperationListResult { 5743 return page.olr 5744} 5745 5746// Values returns the slice of values for the current page or nil if there are no values. 5747func (page OperationListResultPage) Values() []Operation { 5748 if page.olr.IsEmpty() { 5749 return nil 5750 } 5751 return *page.olr.Value 5752} 5753 5754// OperationResultContract operation Result. 5755type OperationResultContract struct { 5756 autorest.Response `json:"-"` 5757 // ID - Operation result identifier. 5758 ID *string `json:"id,omitempty"` 5759 // Status - Status of an async operation. Possible values include: 'Started', 'InProgress', 'Succeeded', 'Failed' 5760 Status AsyncOperationStatus `json:"status,omitempty"` 5761 // Started - Start time of an async operation. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. 5762 Started *date.Time `json:"started,omitempty"` 5763 // Updated - Last update time of an async operation. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. 5764 Updated *date.Time `json:"updated,omitempty"` 5765 // ResultInfo - Optional result info. 5766 ResultInfo *string `json:"resultInfo,omitempty"` 5767 // Error - Error Body Contract 5768 Error *ErrorResponseBody `json:"error,omitempty"` 5769 // ActionLog - This property if only provided as part of the TenantConfiguration_Validate operation. It contains the log the entities which will be updated/created/deleted as part of the TenantConfiguration_Deploy operation. 5770 ActionLog *[]OperationResultLogItemContract `json:"actionLog,omitempty"` 5771} 5772 5773// OperationResultLogItemContract log of the entity being created, updated or deleted. 5774type OperationResultLogItemContract struct { 5775 // ObjectType - The type of entity contract. 5776 ObjectType *string `json:"objectType,omitempty"` 5777 // Action - Action like create/update/delete. 5778 Action *string `json:"action,omitempty"` 5779 // ObjectKey - Identifier of the entity being created/updated/deleted. 5780 ObjectKey *string `json:"objectKey,omitempty"` 5781} 5782 5783// OperationTagResourceContractProperties operation Entity contract Properties. 5784type OperationTagResourceContractProperties struct { 5785 // ID - Identifier of the operation in form /operations/{operationId}. 5786 ID *string `json:"id,omitempty"` 5787 // Name - Operation name. 5788 Name *string `json:"name,omitempty"` 5789 // APIName - Api Name. 5790 APIName *string `json:"apiName,omitempty"` 5791 // APIRevision - Api Revision. 5792 APIRevision *string `json:"apiRevision,omitempty"` 5793 // APIVersion - Api Version. 5794 APIVersion *string `json:"apiVersion,omitempty"` 5795 // Description - Operation Description. 5796 Description *string `json:"description,omitempty"` 5797 // Method - A Valid HTTP Operation Method. Typical Http Methods like GET, PUT, POST but not limited by only them. 5798 Method *string `json:"method,omitempty"` 5799 // URLTemplate - Relative URL template identifying the target resource for this operation. May include parameters. Example: /customers/{cid}/orders/{oid}/?date={date} 5800 URLTemplate *string `json:"urlTemplate,omitempty"` 5801} 5802 5803// OperationUpdateContract api Operation Update Contract details. 5804type OperationUpdateContract struct { 5805 // OperationUpdateContractProperties - Properties of the API Operation entity that can be updated. 5806 *OperationUpdateContractProperties `json:"properties,omitempty"` 5807} 5808 5809// MarshalJSON is the custom marshaler for OperationUpdateContract. 5810func (ouc OperationUpdateContract) MarshalJSON() ([]byte, error) { 5811 objectMap := make(map[string]interface{}) 5812 if ouc.OperationUpdateContractProperties != nil { 5813 objectMap["properties"] = ouc.OperationUpdateContractProperties 5814 } 5815 return json.Marshal(objectMap) 5816} 5817 5818// UnmarshalJSON is the custom unmarshaler for OperationUpdateContract struct. 5819func (ouc *OperationUpdateContract) UnmarshalJSON(body []byte) error { 5820 var m map[string]*json.RawMessage 5821 err := json.Unmarshal(body, &m) 5822 if err != nil { 5823 return err 5824 } 5825 for k, v := range m { 5826 switch k { 5827 case "properties": 5828 if v != nil { 5829 var operationUpdateContractProperties OperationUpdateContractProperties 5830 err = json.Unmarshal(*v, &operationUpdateContractProperties) 5831 if err != nil { 5832 return err 5833 } 5834 ouc.OperationUpdateContractProperties = &operationUpdateContractProperties 5835 } 5836 } 5837 } 5838 5839 return nil 5840} 5841 5842// OperationUpdateContractProperties operation Update Contract Properties. 5843type OperationUpdateContractProperties struct { 5844 // DisplayName - Operation Name. 5845 DisplayName *string `json:"displayName,omitempty"` 5846 // Method - A Valid HTTP Operation Method. Typical Http Methods like GET, PUT, POST but not limited by only them. 5847 Method *string `json:"method,omitempty"` 5848 // URLTemplate - Relative URL template identifying the target resource for this operation. May include parameters. Example: /customers/{cid}/orders/{oid}/?date={date} 5849 URLTemplate *string `json:"urlTemplate,omitempty"` 5850 // TemplateParameters - Collection of URL template parameters. 5851 TemplateParameters *[]ParameterContract `json:"templateParameters,omitempty"` 5852 // Description - Description of the operation. May include HTML formatting tags. 5853 Description *string `json:"description,omitempty"` 5854 // Request - An entity containing request details. 5855 Request *RequestContract `json:"request,omitempty"` 5856 // Responses - Array of Operation responses. 5857 Responses *[]ResponseContract `json:"responses,omitempty"` 5858 // Policies - Operation Policies 5859 Policies *string `json:"policies,omitempty"` 5860} 5861 5862// ParameterContract operation parameters details. 5863type ParameterContract struct { 5864 // Name - Parameter name. 5865 Name *string `json:"name,omitempty"` 5866 // Description - Parameter description. 5867 Description *string `json:"description,omitempty"` 5868 // Type - Parameter type. 5869 Type *string `json:"type,omitempty"` 5870 // DefaultValue - Default parameter value. 5871 DefaultValue *string `json:"defaultValue,omitempty"` 5872 // Required - whether parameter is required or not. 5873 Required *bool `json:"required,omitempty"` 5874 // Values - Parameter values. 5875 Values *[]string `json:"values,omitempty"` 5876} 5877 5878// PipelineDiagnosticSettings diagnostic settings for incoming/outcoming HTTP messages to the Gateway. 5879type PipelineDiagnosticSettings struct { 5880 // Request - Diagnostic settings for request. 5881 Request *HTTPMessageDiagnostic `json:"request,omitempty"` 5882 // Response - Diagnostic settings for response. 5883 Response *HTTPMessageDiagnostic `json:"response,omitempty"` 5884} 5885 5886// PolicyCollection the response of the list policy operation. 5887type PolicyCollection struct { 5888 autorest.Response `json:"-"` 5889 // Value - Policy Contract value. 5890 Value *[]PolicyContract `json:"value,omitempty"` 5891 // NextLink - Next page link if any. 5892 NextLink *string `json:"nextLink,omitempty"` 5893} 5894 5895// PolicyContract policy Contract details. 5896type PolicyContract struct { 5897 autorest.Response `json:"-"` 5898 // PolicyContractProperties - Properties of the Policy. 5899 *PolicyContractProperties `json:"properties,omitempty"` 5900 // ID - Resource ID. 5901 ID *string `json:"id,omitempty"` 5902 // Name - Resource name. 5903 Name *string `json:"name,omitempty"` 5904 // Type - Resource type for API Management resource. 5905 Type *string `json:"type,omitempty"` 5906} 5907 5908// MarshalJSON is the custom marshaler for PolicyContract. 5909func (pc PolicyContract) MarshalJSON() ([]byte, error) { 5910 objectMap := make(map[string]interface{}) 5911 if pc.PolicyContractProperties != nil { 5912 objectMap["properties"] = pc.PolicyContractProperties 5913 } 5914 if pc.ID != nil { 5915 objectMap["id"] = pc.ID 5916 } 5917 if pc.Name != nil { 5918 objectMap["name"] = pc.Name 5919 } 5920 if pc.Type != nil { 5921 objectMap["type"] = pc.Type 5922 } 5923 return json.Marshal(objectMap) 5924} 5925 5926// UnmarshalJSON is the custom unmarshaler for PolicyContract struct. 5927func (pc *PolicyContract) UnmarshalJSON(body []byte) error { 5928 var m map[string]*json.RawMessage 5929 err := json.Unmarshal(body, &m) 5930 if err != nil { 5931 return err 5932 } 5933 for k, v := range m { 5934 switch k { 5935 case "properties": 5936 if v != nil { 5937 var policyContractProperties PolicyContractProperties 5938 err = json.Unmarshal(*v, &policyContractProperties) 5939 if err != nil { 5940 return err 5941 } 5942 pc.PolicyContractProperties = &policyContractProperties 5943 } 5944 case "id": 5945 if v != nil { 5946 var ID string 5947 err = json.Unmarshal(*v, &ID) 5948 if err != nil { 5949 return err 5950 } 5951 pc.ID = &ID 5952 } 5953 case "name": 5954 if v != nil { 5955 var name string 5956 err = json.Unmarshal(*v, &name) 5957 if err != nil { 5958 return err 5959 } 5960 pc.Name = &name 5961 } 5962 case "type": 5963 if v != nil { 5964 var typeVar string 5965 err = json.Unmarshal(*v, &typeVar) 5966 if err != nil { 5967 return err 5968 } 5969 pc.Type = &typeVar 5970 } 5971 } 5972 } 5973 5974 return nil 5975} 5976 5977// PolicyContractProperties policy contract Properties. 5978type PolicyContractProperties struct { 5979 // PolicyContent - Json escaped Xml Encoded contents of the Policy. 5980 PolicyContent *string `json:"policyContent,omitempty"` 5981 // ContentFormat - Format of the policyContent. Possible values include: 'XML', 'XMLLink', 'Rawxml', 'RawxmlLink' 5982 ContentFormat PolicyContentFormat `json:"contentFormat,omitempty"` 5983} 5984 5985// PolicySnippetContract policy snippet. 5986type PolicySnippetContract struct { 5987 // Name - Snippet name. 5988 Name *string `json:"name,omitempty"` 5989 // Content - Snippet content. 5990 Content *string `json:"content,omitempty"` 5991 // ToolTip - Snippet toolTip. 5992 ToolTip *string `json:"toolTip,omitempty"` 5993 // Scope - Binary OR value of the Snippet scope. 5994 Scope *int32 `json:"scope,omitempty"` 5995} 5996 5997// PolicySnippetsCollection the response of the list policy snippets operation. 5998type PolicySnippetsCollection struct { 5999 autorest.Response `json:"-"` 6000 // Value - Policy snippet value. 6001 Value *[]PolicySnippetContract `json:"value,omitempty"` 6002} 6003 6004// PortalDelegationSettings delegation settings for a developer portal. 6005type PortalDelegationSettings struct { 6006 autorest.Response `json:"-"` 6007 // PortalDelegationSettingsProperties - Delegation settings contract properties. 6008 *PortalDelegationSettingsProperties `json:"properties,omitempty"` 6009 // ID - Resource ID. 6010 ID *string `json:"id,omitempty"` 6011 // Name - Resource name. 6012 Name *string `json:"name,omitempty"` 6013 // Type - Resource type for API Management resource. 6014 Type *string `json:"type,omitempty"` 6015} 6016 6017// MarshalJSON is the custom marshaler for PortalDelegationSettings. 6018func (pds PortalDelegationSettings) MarshalJSON() ([]byte, error) { 6019 objectMap := make(map[string]interface{}) 6020 if pds.PortalDelegationSettingsProperties != nil { 6021 objectMap["properties"] = pds.PortalDelegationSettingsProperties 6022 } 6023 if pds.ID != nil { 6024 objectMap["id"] = pds.ID 6025 } 6026 if pds.Name != nil { 6027 objectMap["name"] = pds.Name 6028 } 6029 if pds.Type != nil { 6030 objectMap["type"] = pds.Type 6031 } 6032 return json.Marshal(objectMap) 6033} 6034 6035// UnmarshalJSON is the custom unmarshaler for PortalDelegationSettings struct. 6036func (pds *PortalDelegationSettings) UnmarshalJSON(body []byte) error { 6037 var m map[string]*json.RawMessage 6038 err := json.Unmarshal(body, &m) 6039 if err != nil { 6040 return err 6041 } 6042 for k, v := range m { 6043 switch k { 6044 case "properties": 6045 if v != nil { 6046 var portalDelegationSettingsProperties PortalDelegationSettingsProperties 6047 err = json.Unmarshal(*v, &portalDelegationSettingsProperties) 6048 if err != nil { 6049 return err 6050 } 6051 pds.PortalDelegationSettingsProperties = &portalDelegationSettingsProperties 6052 } 6053 case "id": 6054 if v != nil { 6055 var ID string 6056 err = json.Unmarshal(*v, &ID) 6057 if err != nil { 6058 return err 6059 } 6060 pds.ID = &ID 6061 } 6062 case "name": 6063 if v != nil { 6064 var name string 6065 err = json.Unmarshal(*v, &name) 6066 if err != nil { 6067 return err 6068 } 6069 pds.Name = &name 6070 } 6071 case "type": 6072 if v != nil { 6073 var typeVar string 6074 err = json.Unmarshal(*v, &typeVar) 6075 if err != nil { 6076 return err 6077 } 6078 pds.Type = &typeVar 6079 } 6080 } 6081 } 6082 6083 return nil 6084} 6085 6086// PortalDelegationSettingsProperties delegation settings contract properties. 6087type PortalDelegationSettingsProperties struct { 6088 // URL - A delegation Url. 6089 URL *string `json:"url,omitempty"` 6090 // ValidationKey - A base64-encoded validation key to validate, that a request is coming from Azure API Management. 6091 ValidationKey *string `json:"validationKey,omitempty"` 6092 // Subscriptions - Subscriptions delegation settings. 6093 Subscriptions *SubscriptionsDelegationSettingsProperties `json:"subscriptions,omitempty"` 6094 // UserRegistration - User registration delegation settings. 6095 UserRegistration *RegistrationDelegationSettingsProperties `json:"userRegistration,omitempty"` 6096} 6097 6098// PortalSigninSettingProperties sign-in settings contract properties. 6099type PortalSigninSettingProperties struct { 6100 // Enabled - Redirect Anonymous users to the Sign-In page. 6101 Enabled *bool `json:"enabled,omitempty"` 6102} 6103 6104// PortalSigninSettings sign-In settings for the Developer Portal. 6105type PortalSigninSettings struct { 6106 autorest.Response `json:"-"` 6107 // PortalSigninSettingProperties - Sign-in settings contract properties. 6108 *PortalSigninSettingProperties `json:"properties,omitempty"` 6109 // ID - Resource ID. 6110 ID *string `json:"id,omitempty"` 6111 // Name - Resource name. 6112 Name *string `json:"name,omitempty"` 6113 // Type - Resource type for API Management resource. 6114 Type *string `json:"type,omitempty"` 6115} 6116 6117// MarshalJSON is the custom marshaler for PortalSigninSettings. 6118func (pss PortalSigninSettings) MarshalJSON() ([]byte, error) { 6119 objectMap := make(map[string]interface{}) 6120 if pss.PortalSigninSettingProperties != nil { 6121 objectMap["properties"] = pss.PortalSigninSettingProperties 6122 } 6123 if pss.ID != nil { 6124 objectMap["id"] = pss.ID 6125 } 6126 if pss.Name != nil { 6127 objectMap["name"] = pss.Name 6128 } 6129 if pss.Type != nil { 6130 objectMap["type"] = pss.Type 6131 } 6132 return json.Marshal(objectMap) 6133} 6134 6135// UnmarshalJSON is the custom unmarshaler for PortalSigninSettings struct. 6136func (pss *PortalSigninSettings) UnmarshalJSON(body []byte) error { 6137 var m map[string]*json.RawMessage 6138 err := json.Unmarshal(body, &m) 6139 if err != nil { 6140 return err 6141 } 6142 for k, v := range m { 6143 switch k { 6144 case "properties": 6145 if v != nil { 6146 var portalSigninSettingProperties PortalSigninSettingProperties 6147 err = json.Unmarshal(*v, &portalSigninSettingProperties) 6148 if err != nil { 6149 return err 6150 } 6151 pss.PortalSigninSettingProperties = &portalSigninSettingProperties 6152 } 6153 case "id": 6154 if v != nil { 6155 var ID string 6156 err = json.Unmarshal(*v, &ID) 6157 if err != nil { 6158 return err 6159 } 6160 pss.ID = &ID 6161 } 6162 case "name": 6163 if v != nil { 6164 var name string 6165 err = json.Unmarshal(*v, &name) 6166 if err != nil { 6167 return err 6168 } 6169 pss.Name = &name 6170 } 6171 case "type": 6172 if v != nil { 6173 var typeVar string 6174 err = json.Unmarshal(*v, &typeVar) 6175 if err != nil { 6176 return err 6177 } 6178 pss.Type = &typeVar 6179 } 6180 } 6181 } 6182 6183 return nil 6184} 6185 6186// PortalSignupSettings sign-Up settings for a developer portal. 6187type PortalSignupSettings struct { 6188 autorest.Response `json:"-"` 6189 // PortalSignupSettingsProperties - Sign-up settings contract properties. 6190 *PortalSignupSettingsProperties `json:"properties,omitempty"` 6191 // ID - Resource ID. 6192 ID *string `json:"id,omitempty"` 6193 // Name - Resource name. 6194 Name *string `json:"name,omitempty"` 6195 // Type - Resource type for API Management resource. 6196 Type *string `json:"type,omitempty"` 6197} 6198 6199// MarshalJSON is the custom marshaler for PortalSignupSettings. 6200func (pss PortalSignupSettings) MarshalJSON() ([]byte, error) { 6201 objectMap := make(map[string]interface{}) 6202 if pss.PortalSignupSettingsProperties != nil { 6203 objectMap["properties"] = pss.PortalSignupSettingsProperties 6204 } 6205 if pss.ID != nil { 6206 objectMap["id"] = pss.ID 6207 } 6208 if pss.Name != nil { 6209 objectMap["name"] = pss.Name 6210 } 6211 if pss.Type != nil { 6212 objectMap["type"] = pss.Type 6213 } 6214 return json.Marshal(objectMap) 6215} 6216 6217// UnmarshalJSON is the custom unmarshaler for PortalSignupSettings struct. 6218func (pss *PortalSignupSettings) UnmarshalJSON(body []byte) error { 6219 var m map[string]*json.RawMessage 6220 err := json.Unmarshal(body, &m) 6221 if err != nil { 6222 return err 6223 } 6224 for k, v := range m { 6225 switch k { 6226 case "properties": 6227 if v != nil { 6228 var portalSignupSettingsProperties PortalSignupSettingsProperties 6229 err = json.Unmarshal(*v, &portalSignupSettingsProperties) 6230 if err != nil { 6231 return err 6232 } 6233 pss.PortalSignupSettingsProperties = &portalSignupSettingsProperties 6234 } 6235 case "id": 6236 if v != nil { 6237 var ID string 6238 err = json.Unmarshal(*v, &ID) 6239 if err != nil { 6240 return err 6241 } 6242 pss.ID = &ID 6243 } 6244 case "name": 6245 if v != nil { 6246 var name string 6247 err = json.Unmarshal(*v, &name) 6248 if err != nil { 6249 return err 6250 } 6251 pss.Name = &name 6252 } 6253 case "type": 6254 if v != nil { 6255 var typeVar string 6256 err = json.Unmarshal(*v, &typeVar) 6257 if err != nil { 6258 return err 6259 } 6260 pss.Type = &typeVar 6261 } 6262 } 6263 } 6264 6265 return nil 6266} 6267 6268// PortalSignupSettingsProperties sign-up settings contract properties. 6269type PortalSignupSettingsProperties struct { 6270 // Enabled - Allow users to sign up on a developer portal. 6271 Enabled *bool `json:"enabled,omitempty"` 6272 // TermsOfService - Terms of service contract properties. 6273 TermsOfService *TermsOfServiceProperties `json:"termsOfService,omitempty"` 6274} 6275 6276// ProductCollection paged Products list representation. 6277type ProductCollection struct { 6278 autorest.Response `json:"-"` 6279 // Value - Page values. 6280 Value *[]ProductContract `json:"value,omitempty"` 6281 // NextLink - Next page link if any. 6282 NextLink *string `json:"nextLink,omitempty"` 6283} 6284 6285// ProductCollectionIterator provides access to a complete listing of ProductContract values. 6286type ProductCollectionIterator struct { 6287 i int 6288 page ProductCollectionPage 6289} 6290 6291// Next advances to the next value. If there was an error making 6292// the request the iterator does not advance and the error is returned. 6293func (iter *ProductCollectionIterator) Next() error { 6294 iter.i++ 6295 if iter.i < len(iter.page.Values()) { 6296 return nil 6297 } 6298 err := iter.page.Next() 6299 if err != nil { 6300 iter.i-- 6301 return err 6302 } 6303 iter.i = 0 6304 return nil 6305} 6306 6307// NotDone returns true if the enumeration should be started or is not yet complete. 6308func (iter ProductCollectionIterator) NotDone() bool { 6309 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 6310} 6311 6312// Response returns the raw server response from the last page request. 6313func (iter ProductCollectionIterator) Response() ProductCollection { 6314 return iter.page.Response() 6315} 6316 6317// Value returns the current value or a zero-initialized value if the 6318// iterator has advanced beyond the end of the collection. 6319func (iter ProductCollectionIterator) Value() ProductContract { 6320 if !iter.page.NotDone() { 6321 return ProductContract{} 6322 } 6323 return iter.page.Values()[iter.i] 6324} 6325 6326// IsEmpty returns true if the ListResult contains no values. 6327func (pc ProductCollection) IsEmpty() bool { 6328 return pc.Value == nil || len(*pc.Value) == 0 6329} 6330 6331// productCollectionPreparer prepares a request to retrieve the next set of results. 6332// It returns nil if no more results exist. 6333func (pc ProductCollection) productCollectionPreparer() (*http.Request, error) { 6334 if pc.NextLink == nil || len(to.String(pc.NextLink)) < 1 { 6335 return nil, nil 6336 } 6337 return autorest.Prepare(&http.Request{}, 6338 autorest.AsJSON(), 6339 autorest.AsGet(), 6340 autorest.WithBaseURL(to.String(pc.NextLink))) 6341} 6342 6343// ProductCollectionPage contains a page of ProductContract values. 6344type ProductCollectionPage struct { 6345 fn func(ProductCollection) (ProductCollection, error) 6346 pc ProductCollection 6347} 6348 6349// Next advances to the next page of values. If there was an error making 6350// the request the page does not advance and the error is returned. 6351func (page *ProductCollectionPage) Next() error { 6352 next, err := page.fn(page.pc) 6353 if err != nil { 6354 return err 6355 } 6356 page.pc = next 6357 return nil 6358} 6359 6360// NotDone returns true if the page enumeration should be started or is not yet complete. 6361func (page ProductCollectionPage) NotDone() bool { 6362 return !page.pc.IsEmpty() 6363} 6364 6365// Response returns the raw server response from the last page request. 6366func (page ProductCollectionPage) Response() ProductCollection { 6367 return page.pc 6368} 6369 6370// Values returns the slice of values for the current page or nil if there are no values. 6371func (page ProductCollectionPage) Values() []ProductContract { 6372 if page.pc.IsEmpty() { 6373 return nil 6374 } 6375 return *page.pc.Value 6376} 6377 6378// ProductContract product details. 6379type ProductContract struct { 6380 autorest.Response `json:"-"` 6381 // ProductContractProperties - Product entity contract properties. 6382 *ProductContractProperties `json:"properties,omitempty"` 6383 // ID - Resource ID. 6384 ID *string `json:"id,omitempty"` 6385 // Name - Resource name. 6386 Name *string `json:"name,omitempty"` 6387 // Type - Resource type for API Management resource. 6388 Type *string `json:"type,omitempty"` 6389} 6390 6391// MarshalJSON is the custom marshaler for ProductContract. 6392func (pc ProductContract) MarshalJSON() ([]byte, error) { 6393 objectMap := make(map[string]interface{}) 6394 if pc.ProductContractProperties != nil { 6395 objectMap["properties"] = pc.ProductContractProperties 6396 } 6397 if pc.ID != nil { 6398 objectMap["id"] = pc.ID 6399 } 6400 if pc.Name != nil { 6401 objectMap["name"] = pc.Name 6402 } 6403 if pc.Type != nil { 6404 objectMap["type"] = pc.Type 6405 } 6406 return json.Marshal(objectMap) 6407} 6408 6409// UnmarshalJSON is the custom unmarshaler for ProductContract struct. 6410func (pc *ProductContract) UnmarshalJSON(body []byte) error { 6411 var m map[string]*json.RawMessage 6412 err := json.Unmarshal(body, &m) 6413 if err != nil { 6414 return err 6415 } 6416 for k, v := range m { 6417 switch k { 6418 case "properties": 6419 if v != nil { 6420 var productContractProperties ProductContractProperties 6421 err = json.Unmarshal(*v, &productContractProperties) 6422 if err != nil { 6423 return err 6424 } 6425 pc.ProductContractProperties = &productContractProperties 6426 } 6427 case "id": 6428 if v != nil { 6429 var ID string 6430 err = json.Unmarshal(*v, &ID) 6431 if err != nil { 6432 return err 6433 } 6434 pc.ID = &ID 6435 } 6436 case "name": 6437 if v != nil { 6438 var name string 6439 err = json.Unmarshal(*v, &name) 6440 if err != nil { 6441 return err 6442 } 6443 pc.Name = &name 6444 } 6445 case "type": 6446 if v != nil { 6447 var typeVar string 6448 err = json.Unmarshal(*v, &typeVar) 6449 if err != nil { 6450 return err 6451 } 6452 pc.Type = &typeVar 6453 } 6454 } 6455 } 6456 6457 return nil 6458} 6459 6460// ProductContractProperties product profile. 6461type ProductContractProperties struct { 6462 // DisplayName - Product name. 6463 DisplayName *string `json:"displayName,omitempty"` 6464 // Description - Product description. May include HTML formatting tags. 6465 Description *string `json:"description,omitempty"` 6466 // Terms - Product terms of use. Developers trying to subscribe to the product will be presented and required to accept these terms before they can complete the subscription process. 6467 Terms *string `json:"terms,omitempty"` 6468 // SubscriptionRequired - Whether a product subscription is required for accessing APIs included in this product. If true, the product is referred to as "protected" and a valid subscription key is required for a request to an API included in the product to succeed. If false, the product is referred to as "open" and requests to an API included in the product can be made without a subscription key. If property is omitted when creating a new product it's value is assumed to be true. 6469 SubscriptionRequired *bool `json:"subscriptionRequired,omitempty"` 6470 // ApprovalRequired - whether subscription approval is required. If false, new subscriptions will be approved automatically enabling developers to call the product’s APIs immediately after subscribing. If true, administrators must manually approve the subscription before the developer can any of the product’s APIs. Can be present only if subscriptionRequired property is present and has a value of false. 6471 ApprovalRequired *bool `json:"approvalRequired,omitempty"` 6472 // SubscriptionsLimit - Whether the number of subscriptions a user can have to this product at the same time. Set to null or omit to allow unlimited per user subscriptions. Can be present only if subscriptionRequired property is present and has a value of false. 6473 SubscriptionsLimit *int32 `json:"subscriptionsLimit,omitempty"` 6474 // State - whether product is published or not. Published products are discoverable by users of developer portal. Non published products are visible only to administrators. Default state of Product is notPublished. Possible values include: 'NotPublished', 'Published' 6475 State ProductState `json:"state,omitempty"` 6476} 6477 6478// ProductEntityBaseParameters product Entity Base Parameters 6479type ProductEntityBaseParameters struct { 6480 // Description - Product description. May include HTML formatting tags. 6481 Description *string `json:"description,omitempty"` 6482 // Terms - Product terms of use. Developers trying to subscribe to the product will be presented and required to accept these terms before they can complete the subscription process. 6483 Terms *string `json:"terms,omitempty"` 6484 // SubscriptionRequired - Whether a product subscription is required for accessing APIs included in this product. If true, the product is referred to as "protected" and a valid subscription key is required for a request to an API included in the product to succeed. If false, the product is referred to as "open" and requests to an API included in the product can be made without a subscription key. If property is omitted when creating a new product it's value is assumed to be true. 6485 SubscriptionRequired *bool `json:"subscriptionRequired,omitempty"` 6486 // ApprovalRequired - whether subscription approval is required. If false, new subscriptions will be approved automatically enabling developers to call the product’s APIs immediately after subscribing. If true, administrators must manually approve the subscription before the developer can any of the product’s APIs. Can be present only if subscriptionRequired property is present and has a value of false. 6487 ApprovalRequired *bool `json:"approvalRequired,omitempty"` 6488 // SubscriptionsLimit - Whether the number of subscriptions a user can have to this product at the same time. Set to null or omit to allow unlimited per user subscriptions. Can be present only if subscriptionRequired property is present and has a value of false. 6489 SubscriptionsLimit *int32 `json:"subscriptionsLimit,omitempty"` 6490 // State - whether product is published or not. Published products are discoverable by users of developer portal. Non published products are visible only to administrators. Default state of Product is notPublished. Possible values include: 'NotPublished', 'Published' 6491 State ProductState `json:"state,omitempty"` 6492} 6493 6494// ProductTagResourceContractProperties product profile. 6495type ProductTagResourceContractProperties struct { 6496 // ID - Identifier of the product in the form of /products/{productId} 6497 ID *string `json:"id,omitempty"` 6498 // Name - Product name. 6499 Name *string `json:"name,omitempty"` 6500 // Description - Product description. May include HTML formatting tags. 6501 Description *string `json:"description,omitempty"` 6502 // Terms - Product terms of use. Developers trying to subscribe to the product will be presented and required to accept these terms before they can complete the subscription process. 6503 Terms *string `json:"terms,omitempty"` 6504 // SubscriptionRequired - Whether a product subscription is required for accessing APIs included in this product. If true, the product is referred to as "protected" and a valid subscription key is required for a request to an API included in the product to succeed. If false, the product is referred to as "open" and requests to an API included in the product can be made without a subscription key. If property is omitted when creating a new product it's value is assumed to be true. 6505 SubscriptionRequired *bool `json:"subscriptionRequired,omitempty"` 6506 // ApprovalRequired - whether subscription approval is required. If false, new subscriptions will be approved automatically enabling developers to call the product’s APIs immediately after subscribing. If true, administrators must manually approve the subscription before the developer can any of the product’s APIs. Can be present only if subscriptionRequired property is present and has a value of false. 6507 ApprovalRequired *bool `json:"approvalRequired,omitempty"` 6508 // SubscriptionsLimit - Whether the number of subscriptions a user can have to this product at the same time. Set to null or omit to allow unlimited per user subscriptions. Can be present only if subscriptionRequired property is present and has a value of false. 6509 SubscriptionsLimit *int32 `json:"subscriptionsLimit,omitempty"` 6510 // State - whether product is published or not. Published products are discoverable by users of developer portal. Non published products are visible only to administrators. Default state of Product is notPublished. Possible values include: 'NotPublished', 'Published' 6511 State ProductState `json:"state,omitempty"` 6512} 6513 6514// ProductUpdateParameters product Update parameters. 6515type ProductUpdateParameters struct { 6516 // ProductUpdateProperties - Product entity Update contract properties. 6517 *ProductUpdateProperties `json:"properties,omitempty"` 6518} 6519 6520// MarshalJSON is the custom marshaler for ProductUpdateParameters. 6521func (pup ProductUpdateParameters) MarshalJSON() ([]byte, error) { 6522 objectMap := make(map[string]interface{}) 6523 if pup.ProductUpdateProperties != nil { 6524 objectMap["properties"] = pup.ProductUpdateProperties 6525 } 6526 return json.Marshal(objectMap) 6527} 6528 6529// UnmarshalJSON is the custom unmarshaler for ProductUpdateParameters struct. 6530func (pup *ProductUpdateParameters) UnmarshalJSON(body []byte) error { 6531 var m map[string]*json.RawMessage 6532 err := json.Unmarshal(body, &m) 6533 if err != nil { 6534 return err 6535 } 6536 for k, v := range m { 6537 switch k { 6538 case "properties": 6539 if v != nil { 6540 var productUpdateProperties ProductUpdateProperties 6541 err = json.Unmarshal(*v, &productUpdateProperties) 6542 if err != nil { 6543 return err 6544 } 6545 pup.ProductUpdateProperties = &productUpdateProperties 6546 } 6547 } 6548 } 6549 6550 return nil 6551} 6552 6553// ProductUpdateProperties parameters supplied to the Update Product operation. 6554type ProductUpdateProperties struct { 6555 // DisplayName - Product name. 6556 DisplayName *string `json:"displayName,omitempty"` 6557 // Description - Product description. May include HTML formatting tags. 6558 Description *string `json:"description,omitempty"` 6559 // Terms - Product terms of use. Developers trying to subscribe to the product will be presented and required to accept these terms before they can complete the subscription process. 6560 Terms *string `json:"terms,omitempty"` 6561 // SubscriptionRequired - Whether a product subscription is required for accessing APIs included in this product. If true, the product is referred to as "protected" and a valid subscription key is required for a request to an API included in the product to succeed. If false, the product is referred to as "open" and requests to an API included in the product can be made without a subscription key. If property is omitted when creating a new product it's value is assumed to be true. 6562 SubscriptionRequired *bool `json:"subscriptionRequired,omitempty"` 6563 // ApprovalRequired - whether subscription approval is required. If false, new subscriptions will be approved automatically enabling developers to call the product’s APIs immediately after subscribing. If true, administrators must manually approve the subscription before the developer can any of the product’s APIs. Can be present only if subscriptionRequired property is present and has a value of false. 6564 ApprovalRequired *bool `json:"approvalRequired,omitempty"` 6565 // SubscriptionsLimit - Whether the number of subscriptions a user can have to this product at the same time. Set to null or omit to allow unlimited per user subscriptions. Can be present only if subscriptionRequired property is present and has a value of false. 6566 SubscriptionsLimit *int32 `json:"subscriptionsLimit,omitempty"` 6567 // State - whether product is published or not. Published products are discoverable by users of developer portal. Non published products are visible only to administrators. Default state of Product is notPublished. Possible values include: 'NotPublished', 'Published' 6568 State ProductState `json:"state,omitempty"` 6569} 6570 6571// PropertyCollection paged Property list representation. 6572type PropertyCollection struct { 6573 autorest.Response `json:"-"` 6574 // Value - Page values. 6575 Value *[]PropertyContract `json:"value,omitempty"` 6576 // NextLink - Next page link if any. 6577 NextLink *string `json:"nextLink,omitempty"` 6578} 6579 6580// PropertyCollectionIterator provides access to a complete listing of PropertyContract values. 6581type PropertyCollectionIterator struct { 6582 i int 6583 page PropertyCollectionPage 6584} 6585 6586// Next advances to the next value. If there was an error making 6587// the request the iterator does not advance and the error is returned. 6588func (iter *PropertyCollectionIterator) Next() error { 6589 iter.i++ 6590 if iter.i < len(iter.page.Values()) { 6591 return nil 6592 } 6593 err := iter.page.Next() 6594 if err != nil { 6595 iter.i-- 6596 return err 6597 } 6598 iter.i = 0 6599 return nil 6600} 6601 6602// NotDone returns true if the enumeration should be started or is not yet complete. 6603func (iter PropertyCollectionIterator) NotDone() bool { 6604 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 6605} 6606 6607// Response returns the raw server response from the last page request. 6608func (iter PropertyCollectionIterator) Response() PropertyCollection { 6609 return iter.page.Response() 6610} 6611 6612// Value returns the current value or a zero-initialized value if the 6613// iterator has advanced beyond the end of the collection. 6614func (iter PropertyCollectionIterator) Value() PropertyContract { 6615 if !iter.page.NotDone() { 6616 return PropertyContract{} 6617 } 6618 return iter.page.Values()[iter.i] 6619} 6620 6621// IsEmpty returns true if the ListResult contains no values. 6622func (pc PropertyCollection) IsEmpty() bool { 6623 return pc.Value == nil || len(*pc.Value) == 0 6624} 6625 6626// propertyCollectionPreparer prepares a request to retrieve the next set of results. 6627// It returns nil if no more results exist. 6628func (pc PropertyCollection) propertyCollectionPreparer() (*http.Request, error) { 6629 if pc.NextLink == nil || len(to.String(pc.NextLink)) < 1 { 6630 return nil, nil 6631 } 6632 return autorest.Prepare(&http.Request{}, 6633 autorest.AsJSON(), 6634 autorest.AsGet(), 6635 autorest.WithBaseURL(to.String(pc.NextLink))) 6636} 6637 6638// PropertyCollectionPage contains a page of PropertyContract values. 6639type PropertyCollectionPage struct { 6640 fn func(PropertyCollection) (PropertyCollection, error) 6641 pc PropertyCollection 6642} 6643 6644// Next advances to the next page of values. If there was an error making 6645// the request the page does not advance and the error is returned. 6646func (page *PropertyCollectionPage) Next() error { 6647 next, err := page.fn(page.pc) 6648 if err != nil { 6649 return err 6650 } 6651 page.pc = next 6652 return nil 6653} 6654 6655// NotDone returns true if the page enumeration should be started or is not yet complete. 6656func (page PropertyCollectionPage) NotDone() bool { 6657 return !page.pc.IsEmpty() 6658} 6659 6660// Response returns the raw server response from the last page request. 6661func (page PropertyCollectionPage) Response() PropertyCollection { 6662 return page.pc 6663} 6664 6665// Values returns the slice of values for the current page or nil if there are no values. 6666func (page PropertyCollectionPage) Values() []PropertyContract { 6667 if page.pc.IsEmpty() { 6668 return nil 6669 } 6670 return *page.pc.Value 6671} 6672 6673// PropertyContract property details. 6674type PropertyContract struct { 6675 autorest.Response `json:"-"` 6676 // PropertyContractProperties - Property entity contract properties. 6677 *PropertyContractProperties `json:"properties,omitempty"` 6678 // ID - Resource ID. 6679 ID *string `json:"id,omitempty"` 6680 // Name - Resource name. 6681 Name *string `json:"name,omitempty"` 6682 // Type - Resource type for API Management resource. 6683 Type *string `json:"type,omitempty"` 6684} 6685 6686// MarshalJSON is the custom marshaler for PropertyContract. 6687func (pc PropertyContract) MarshalJSON() ([]byte, error) { 6688 objectMap := make(map[string]interface{}) 6689 if pc.PropertyContractProperties != nil { 6690 objectMap["properties"] = pc.PropertyContractProperties 6691 } 6692 if pc.ID != nil { 6693 objectMap["id"] = pc.ID 6694 } 6695 if pc.Name != nil { 6696 objectMap["name"] = pc.Name 6697 } 6698 if pc.Type != nil { 6699 objectMap["type"] = pc.Type 6700 } 6701 return json.Marshal(objectMap) 6702} 6703 6704// UnmarshalJSON is the custom unmarshaler for PropertyContract struct. 6705func (pc *PropertyContract) UnmarshalJSON(body []byte) error { 6706 var m map[string]*json.RawMessage 6707 err := json.Unmarshal(body, &m) 6708 if err != nil { 6709 return err 6710 } 6711 for k, v := range m { 6712 switch k { 6713 case "properties": 6714 if v != nil { 6715 var propertyContractProperties PropertyContractProperties 6716 err = json.Unmarshal(*v, &propertyContractProperties) 6717 if err != nil { 6718 return err 6719 } 6720 pc.PropertyContractProperties = &propertyContractProperties 6721 } 6722 case "id": 6723 if v != nil { 6724 var ID string 6725 err = json.Unmarshal(*v, &ID) 6726 if err != nil { 6727 return err 6728 } 6729 pc.ID = &ID 6730 } 6731 case "name": 6732 if v != nil { 6733 var name string 6734 err = json.Unmarshal(*v, &name) 6735 if err != nil { 6736 return err 6737 } 6738 pc.Name = &name 6739 } 6740 case "type": 6741 if v != nil { 6742 var typeVar string 6743 err = json.Unmarshal(*v, &typeVar) 6744 if err != nil { 6745 return err 6746 } 6747 pc.Type = &typeVar 6748 } 6749 } 6750 } 6751 6752 return nil 6753} 6754 6755// PropertyContractProperties property Contract properties. 6756type PropertyContractProperties struct { 6757 // DisplayName - Unique name of Property. It may contain only letters, digits, period, dash, and underscore characters. 6758 DisplayName *string `json:"displayName,omitempty"` 6759 // Value - Value of the property. Can contain policy expressions. It may not be empty or consist only of whitespace. 6760 Value *string `json:"value,omitempty"` 6761 // Tags - Optional tags that when provided can be used to filter the property list. 6762 Tags *[]string `json:"tags,omitempty"` 6763 // Secret - Determines whether the value is a secret and should be encrypted or not. Default value is false. 6764 Secret *bool `json:"secret,omitempty"` 6765} 6766 6767// PropertyEntityBaseParameters property Entity Base Parameters set. 6768type PropertyEntityBaseParameters struct { 6769 // Tags - Optional tags that when provided can be used to filter the property list. 6770 Tags *[]string `json:"tags,omitempty"` 6771 // Secret - Determines whether the value is a secret and should be encrypted or not. Default value is false. 6772 Secret *bool `json:"secret,omitempty"` 6773} 6774 6775// PropertyUpdateParameterProperties property Contract properties. 6776type PropertyUpdateParameterProperties struct { 6777 // DisplayName - Unique name of Property. It may contain only letters, digits, period, dash, and underscore characters. 6778 DisplayName *string `json:"displayName,omitempty"` 6779 // Value - Value of the property. Can contain policy expressions. It may not be empty or consist only of whitespace. 6780 Value *string `json:"value,omitempty"` 6781 // Tags - Optional tags that when provided can be used to filter the property list. 6782 Tags *[]string `json:"tags,omitempty"` 6783 // Secret - Determines whether the value is a secret and should be encrypted or not. Default value is false. 6784 Secret *bool `json:"secret,omitempty"` 6785} 6786 6787// PropertyUpdateParameters property update Parameters. 6788type PropertyUpdateParameters struct { 6789 // PropertyUpdateParameterProperties - Property entity Update contract properties. 6790 *PropertyUpdateParameterProperties `json:"properties,omitempty"` 6791} 6792 6793// MarshalJSON is the custom marshaler for PropertyUpdateParameters. 6794func (pup PropertyUpdateParameters) MarshalJSON() ([]byte, error) { 6795 objectMap := make(map[string]interface{}) 6796 if pup.PropertyUpdateParameterProperties != nil { 6797 objectMap["properties"] = pup.PropertyUpdateParameterProperties 6798 } 6799 return json.Marshal(objectMap) 6800} 6801 6802// UnmarshalJSON is the custom unmarshaler for PropertyUpdateParameters struct. 6803func (pup *PropertyUpdateParameters) UnmarshalJSON(body []byte) error { 6804 var m map[string]*json.RawMessage 6805 err := json.Unmarshal(body, &m) 6806 if err != nil { 6807 return err 6808 } 6809 for k, v := range m { 6810 switch k { 6811 case "properties": 6812 if v != nil { 6813 var propertyUpdateParameterProperties PropertyUpdateParameterProperties 6814 err = json.Unmarshal(*v, &propertyUpdateParameterProperties) 6815 if err != nil { 6816 return err 6817 } 6818 pup.PropertyUpdateParameterProperties = &propertyUpdateParameterProperties 6819 } 6820 } 6821 } 6822 6823 return nil 6824} 6825 6826// QuotaCounterCollection paged Quota Counter list representation. 6827type QuotaCounterCollection struct { 6828 autorest.Response `json:"-"` 6829 // Value - Quota counter values. 6830 Value *[]QuotaCounterContract `json:"value,omitempty"` 6831 // Count - Total record count number across all pages. 6832 Count *int64 `json:"count,omitempty"` 6833 // NextLink - Next page link if any. 6834 NextLink *string `json:"nextLink,omitempty"` 6835} 6836 6837// QuotaCounterContract quota counter details. 6838type QuotaCounterContract struct { 6839 autorest.Response `json:"-"` 6840 // CounterKey - The Key value of the Counter. Must not be empty. 6841 CounterKey *string `json:"counterKey,omitempty"` 6842 // PeriodKey - Identifier of the Period for which the counter was collected. Must not be empty. 6843 PeriodKey *string `json:"periodKey,omitempty"` 6844 // PeriodStartTime - The date of the start of Counter Period. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. 6845 PeriodStartTime *date.Time `json:"periodStartTime,omitempty"` 6846 // PeriodEndTime - The date of the end of Counter Period. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. 6847 PeriodEndTime *date.Time `json:"periodEndTime,omitempty"` 6848 // Value - Quota Value Properties 6849 Value *QuotaCounterValueContractProperties `json:"value,omitempty"` 6850} 6851 6852// QuotaCounterValueContract quota counter value details. 6853type QuotaCounterValueContract struct { 6854 // QuotaCounterValueContractProperties - Quota counter Value Properties. 6855 *QuotaCounterValueContractProperties `json:"value,omitempty"` 6856} 6857 6858// MarshalJSON is the custom marshaler for QuotaCounterValueContract. 6859func (qcvc QuotaCounterValueContract) MarshalJSON() ([]byte, error) { 6860 objectMap := make(map[string]interface{}) 6861 if qcvc.QuotaCounterValueContractProperties != nil { 6862 objectMap["value"] = qcvc.QuotaCounterValueContractProperties 6863 } 6864 return json.Marshal(objectMap) 6865} 6866 6867// UnmarshalJSON is the custom unmarshaler for QuotaCounterValueContract struct. 6868func (qcvc *QuotaCounterValueContract) UnmarshalJSON(body []byte) error { 6869 var m map[string]*json.RawMessage 6870 err := json.Unmarshal(body, &m) 6871 if err != nil { 6872 return err 6873 } 6874 for k, v := range m { 6875 switch k { 6876 case "value": 6877 if v != nil { 6878 var quotaCounterValueContractProperties QuotaCounterValueContractProperties 6879 err = json.Unmarshal(*v, "aCounterValueContractProperties) 6880 if err != nil { 6881 return err 6882 } 6883 qcvc.QuotaCounterValueContractProperties = "aCounterValueContractProperties 6884 } 6885 } 6886 } 6887 6888 return nil 6889} 6890 6891// QuotaCounterValueContractProperties quota counter value details. 6892type QuotaCounterValueContractProperties struct { 6893 // CallsCount - Number of times Counter was called. 6894 CallsCount *int32 `json:"callsCount,omitempty"` 6895 // KbTransferred - Data Transferred in KiloBytes. 6896 KbTransferred *float64 `json:"kbTransferred,omitempty"` 6897} 6898 6899// RecipientEmailCollection paged Recipient User list representation. 6900type RecipientEmailCollection struct { 6901 autorest.Response `json:"-"` 6902 // Value - Page values. 6903 Value *[]RecipientEmailContract `json:"value,omitempty"` 6904 // NextLink - Next page link if any. 6905 NextLink *string `json:"nextLink,omitempty"` 6906} 6907 6908// RecipientEmailContract recipient Email details. 6909type RecipientEmailContract struct { 6910 autorest.Response `json:"-"` 6911 // RecipientEmailContractProperties - Recipient Email contract properties. 6912 *RecipientEmailContractProperties `json:"properties,omitempty"` 6913 // ID - Resource ID. 6914 ID *string `json:"id,omitempty"` 6915 // Name - Resource name. 6916 Name *string `json:"name,omitempty"` 6917 // Type - Resource type for API Management resource. 6918 Type *string `json:"type,omitempty"` 6919} 6920 6921// MarshalJSON is the custom marshaler for RecipientEmailContract. 6922func (rec RecipientEmailContract) MarshalJSON() ([]byte, error) { 6923 objectMap := make(map[string]interface{}) 6924 if rec.RecipientEmailContractProperties != nil { 6925 objectMap["properties"] = rec.RecipientEmailContractProperties 6926 } 6927 if rec.ID != nil { 6928 objectMap["id"] = rec.ID 6929 } 6930 if rec.Name != nil { 6931 objectMap["name"] = rec.Name 6932 } 6933 if rec.Type != nil { 6934 objectMap["type"] = rec.Type 6935 } 6936 return json.Marshal(objectMap) 6937} 6938 6939// UnmarshalJSON is the custom unmarshaler for RecipientEmailContract struct. 6940func (rec *RecipientEmailContract) UnmarshalJSON(body []byte) error { 6941 var m map[string]*json.RawMessage 6942 err := json.Unmarshal(body, &m) 6943 if err != nil { 6944 return err 6945 } 6946 for k, v := range m { 6947 switch k { 6948 case "properties": 6949 if v != nil { 6950 var recipientEmailContractProperties RecipientEmailContractProperties 6951 err = json.Unmarshal(*v, &recipientEmailContractProperties) 6952 if err != nil { 6953 return err 6954 } 6955 rec.RecipientEmailContractProperties = &recipientEmailContractProperties 6956 } 6957 case "id": 6958 if v != nil { 6959 var ID string 6960 err = json.Unmarshal(*v, &ID) 6961 if err != nil { 6962 return err 6963 } 6964 rec.ID = &ID 6965 } 6966 case "name": 6967 if v != nil { 6968 var name string 6969 err = json.Unmarshal(*v, &name) 6970 if err != nil { 6971 return err 6972 } 6973 rec.Name = &name 6974 } 6975 case "type": 6976 if v != nil { 6977 var typeVar string 6978 err = json.Unmarshal(*v, &typeVar) 6979 if err != nil { 6980 return err 6981 } 6982 rec.Type = &typeVar 6983 } 6984 } 6985 } 6986 6987 return nil 6988} 6989 6990// RecipientEmailContractProperties recipient Email Contract Properties. 6991type RecipientEmailContractProperties struct { 6992 // Email - User Email subscribed to notification. 6993 Email *string `json:"email,omitempty"` 6994} 6995 6996// RecipientsContractProperties notification Parameter contract. 6997type RecipientsContractProperties struct { 6998 // Emails - List of Emails subscribed for the notification. 6999 Emails *[]string `json:"emails,omitempty"` 7000 // Users - List of Users subscribed for the notification. 7001 Users *[]string `json:"users,omitempty"` 7002} 7003 7004// RecipientUserCollection paged Recipient User list representation. 7005type RecipientUserCollection struct { 7006 autorest.Response `json:"-"` 7007 // Value - Page values. 7008 Value *[]RecipientUserContract `json:"value,omitempty"` 7009 // NextLink - Next page link if any. 7010 NextLink *string `json:"nextLink,omitempty"` 7011} 7012 7013// RecipientUserContract recipient User details. 7014type RecipientUserContract struct { 7015 autorest.Response `json:"-"` 7016 // RecipientUsersContractProperties - Recipient User entity contract properties. 7017 *RecipientUsersContractProperties `json:"properties,omitempty"` 7018 // ID - Resource ID. 7019 ID *string `json:"id,omitempty"` 7020 // Name - Resource name. 7021 Name *string `json:"name,omitempty"` 7022 // Type - Resource type for API Management resource. 7023 Type *string `json:"type,omitempty"` 7024} 7025 7026// MarshalJSON is the custom marshaler for RecipientUserContract. 7027func (ruc RecipientUserContract) MarshalJSON() ([]byte, error) { 7028 objectMap := make(map[string]interface{}) 7029 if ruc.RecipientUsersContractProperties != nil { 7030 objectMap["properties"] = ruc.RecipientUsersContractProperties 7031 } 7032 if ruc.ID != nil { 7033 objectMap["id"] = ruc.ID 7034 } 7035 if ruc.Name != nil { 7036 objectMap["name"] = ruc.Name 7037 } 7038 if ruc.Type != nil { 7039 objectMap["type"] = ruc.Type 7040 } 7041 return json.Marshal(objectMap) 7042} 7043 7044// UnmarshalJSON is the custom unmarshaler for RecipientUserContract struct. 7045func (ruc *RecipientUserContract) UnmarshalJSON(body []byte) error { 7046 var m map[string]*json.RawMessage 7047 err := json.Unmarshal(body, &m) 7048 if err != nil { 7049 return err 7050 } 7051 for k, v := range m { 7052 switch k { 7053 case "properties": 7054 if v != nil { 7055 var recipientUsersContractProperties RecipientUsersContractProperties 7056 err = json.Unmarshal(*v, &recipientUsersContractProperties) 7057 if err != nil { 7058 return err 7059 } 7060 ruc.RecipientUsersContractProperties = &recipientUsersContractProperties 7061 } 7062 case "id": 7063 if v != nil { 7064 var ID string 7065 err = json.Unmarshal(*v, &ID) 7066 if err != nil { 7067 return err 7068 } 7069 ruc.ID = &ID 7070 } 7071 case "name": 7072 if v != nil { 7073 var name string 7074 err = json.Unmarshal(*v, &name) 7075 if err != nil { 7076 return err 7077 } 7078 ruc.Name = &name 7079 } 7080 case "type": 7081 if v != nil { 7082 var typeVar string 7083 err = json.Unmarshal(*v, &typeVar) 7084 if err != nil { 7085 return err 7086 } 7087 ruc.Type = &typeVar 7088 } 7089 } 7090 } 7091 7092 return nil 7093} 7094 7095// RecipientUsersContractProperties recipient User Contract Properties. 7096type RecipientUsersContractProperties struct { 7097 // UserID - API Management UserId subscribed to notification. 7098 UserID *string `json:"userId,omitempty"` 7099} 7100 7101// RegionContract region profile. 7102type RegionContract struct { 7103 // Name - Region name. 7104 Name *string `json:"name,omitempty"` 7105 // IsMasterRegion - whether Region is the master region. 7106 IsMasterRegion *bool `json:"isMasterRegion,omitempty"` 7107 // IsDeleted - whether Region is deleted. 7108 IsDeleted *bool `json:"isDeleted,omitempty"` 7109} 7110 7111// RegionListResult lists Regions operation response details. 7112type RegionListResult struct { 7113 autorest.Response `json:"-"` 7114 // Value - Lists of Regions. 7115 Value *[]RegionContract `json:"value,omitempty"` 7116 // Count - Total record count number across all pages. 7117 Count *int64 `json:"count,omitempty"` 7118 // NextLink - Next page link if any. 7119 NextLink *string `json:"nextLink,omitempty"` 7120} 7121 7122// RegionListResultIterator provides access to a complete listing of RegionContract values. 7123type RegionListResultIterator struct { 7124 i int 7125 page RegionListResultPage 7126} 7127 7128// Next advances to the next value. If there was an error making 7129// the request the iterator does not advance and the error is returned. 7130func (iter *RegionListResultIterator) Next() error { 7131 iter.i++ 7132 if iter.i < len(iter.page.Values()) { 7133 return nil 7134 } 7135 err := iter.page.Next() 7136 if err != nil { 7137 iter.i-- 7138 return err 7139 } 7140 iter.i = 0 7141 return nil 7142} 7143 7144// NotDone returns true if the enumeration should be started or is not yet complete. 7145func (iter RegionListResultIterator) NotDone() bool { 7146 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 7147} 7148 7149// Response returns the raw server response from the last page request. 7150func (iter RegionListResultIterator) Response() RegionListResult { 7151 return iter.page.Response() 7152} 7153 7154// Value returns the current value or a zero-initialized value if the 7155// iterator has advanced beyond the end of the collection. 7156func (iter RegionListResultIterator) Value() RegionContract { 7157 if !iter.page.NotDone() { 7158 return RegionContract{} 7159 } 7160 return iter.page.Values()[iter.i] 7161} 7162 7163// IsEmpty returns true if the ListResult contains no values. 7164func (rlr RegionListResult) IsEmpty() bool { 7165 return rlr.Value == nil || len(*rlr.Value) == 0 7166} 7167 7168// regionListResultPreparer prepares a request to retrieve the next set of results. 7169// It returns nil if no more results exist. 7170func (rlr RegionListResult) regionListResultPreparer() (*http.Request, error) { 7171 if rlr.NextLink == nil || len(to.String(rlr.NextLink)) < 1 { 7172 return nil, nil 7173 } 7174 return autorest.Prepare(&http.Request{}, 7175 autorest.AsJSON(), 7176 autorest.AsGet(), 7177 autorest.WithBaseURL(to.String(rlr.NextLink))) 7178} 7179 7180// RegionListResultPage contains a page of RegionContract values. 7181type RegionListResultPage struct { 7182 fn func(RegionListResult) (RegionListResult, error) 7183 rlr RegionListResult 7184} 7185 7186// Next advances to the next page of values. If there was an error making 7187// the request the page does not advance and the error is returned. 7188func (page *RegionListResultPage) Next() error { 7189 next, err := page.fn(page.rlr) 7190 if err != nil { 7191 return err 7192 } 7193 page.rlr = next 7194 return nil 7195} 7196 7197// NotDone returns true if the page enumeration should be started or is not yet complete. 7198func (page RegionListResultPage) NotDone() bool { 7199 return !page.rlr.IsEmpty() 7200} 7201 7202// Response returns the raw server response from the last page request. 7203func (page RegionListResultPage) Response() RegionListResult { 7204 return page.rlr 7205} 7206 7207// Values returns the slice of values for the current page or nil if there are no values. 7208func (page RegionListResultPage) Values() []RegionContract { 7209 if page.rlr.IsEmpty() { 7210 return nil 7211 } 7212 return *page.rlr.Value 7213} 7214 7215// RegistrationDelegationSettingsProperties user registration delegation settings properties. 7216type RegistrationDelegationSettingsProperties struct { 7217 // Enabled - Enable or disable delegation for user registration. 7218 Enabled *bool `json:"enabled,omitempty"` 7219} 7220 7221// ReportCollection paged Report records list representation. 7222type ReportCollection struct { 7223 autorest.Response `json:"-"` 7224 // Value - Page values. 7225 Value *[]ReportRecordContract `json:"value,omitempty"` 7226 // Count - Total record count number across all pages. 7227 Count *int64 `json:"count,omitempty"` 7228 // NextLink - Next page link if any. 7229 NextLink *string `json:"nextLink,omitempty"` 7230} 7231 7232// ReportCollectionIterator provides access to a complete listing of ReportRecordContract values. 7233type ReportCollectionIterator struct { 7234 i int 7235 page ReportCollectionPage 7236} 7237 7238// Next advances to the next value. If there was an error making 7239// the request the iterator does not advance and the error is returned. 7240func (iter *ReportCollectionIterator) Next() error { 7241 iter.i++ 7242 if iter.i < len(iter.page.Values()) { 7243 return nil 7244 } 7245 err := iter.page.Next() 7246 if err != nil { 7247 iter.i-- 7248 return err 7249 } 7250 iter.i = 0 7251 return nil 7252} 7253 7254// NotDone returns true if the enumeration should be started or is not yet complete. 7255func (iter ReportCollectionIterator) NotDone() bool { 7256 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 7257} 7258 7259// Response returns the raw server response from the last page request. 7260func (iter ReportCollectionIterator) Response() ReportCollection { 7261 return iter.page.Response() 7262} 7263 7264// Value returns the current value or a zero-initialized value if the 7265// iterator has advanced beyond the end of the collection. 7266func (iter ReportCollectionIterator) Value() ReportRecordContract { 7267 if !iter.page.NotDone() { 7268 return ReportRecordContract{} 7269 } 7270 return iter.page.Values()[iter.i] 7271} 7272 7273// IsEmpty returns true if the ListResult contains no values. 7274func (rc ReportCollection) IsEmpty() bool { 7275 return rc.Value == nil || len(*rc.Value) == 0 7276} 7277 7278// reportCollectionPreparer prepares a request to retrieve the next set of results. 7279// It returns nil if no more results exist. 7280func (rc ReportCollection) reportCollectionPreparer() (*http.Request, error) { 7281 if rc.NextLink == nil || len(to.String(rc.NextLink)) < 1 { 7282 return nil, nil 7283 } 7284 return autorest.Prepare(&http.Request{}, 7285 autorest.AsJSON(), 7286 autorest.AsGet(), 7287 autorest.WithBaseURL(to.String(rc.NextLink))) 7288} 7289 7290// ReportCollectionPage contains a page of ReportRecordContract values. 7291type ReportCollectionPage struct { 7292 fn func(ReportCollection) (ReportCollection, error) 7293 rc ReportCollection 7294} 7295 7296// Next advances to the next page of values. If there was an error making 7297// the request the page does not advance and the error is returned. 7298func (page *ReportCollectionPage) Next() error { 7299 next, err := page.fn(page.rc) 7300 if err != nil { 7301 return err 7302 } 7303 page.rc = next 7304 return nil 7305} 7306 7307// NotDone returns true if the page enumeration should be started or is not yet complete. 7308func (page ReportCollectionPage) NotDone() bool { 7309 return !page.rc.IsEmpty() 7310} 7311 7312// Response returns the raw server response from the last page request. 7313func (page ReportCollectionPage) Response() ReportCollection { 7314 return page.rc 7315} 7316 7317// Values returns the slice of values for the current page or nil if there are no values. 7318func (page ReportCollectionPage) Values() []ReportRecordContract { 7319 if page.rc.IsEmpty() { 7320 return nil 7321 } 7322 return *page.rc.Value 7323} 7324 7325// ReportRecordContract report data. 7326type ReportRecordContract struct { 7327 // Name - Name depending on report endpoint specifies product, API, operation or developer name. 7328 Name *string `json:"name,omitempty"` 7329 // Timestamp - Start of aggregation period. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. 7330 Timestamp *date.Time `json:"timestamp,omitempty"` 7331 // Interval - Length of agregation period. Interval must be multiple of 15 minutes and may not be zero. The value should be in ISO 8601 format (http://en.wikipedia.org/wiki/ISO_8601#Durations). 7332 Interval *string `json:"interval,omitempty"` 7333 // Country - Country to which this record data is related. 7334 Country *string `json:"country,omitempty"` 7335 // Region - Country region to which this record data is related. 7336 Region *string `json:"region,omitempty"` 7337 // Zip - Zip code to which this record data is related. 7338 Zip *string `json:"zip,omitempty"` 7339 // UserID - User identifier path. /users/{userId} 7340 UserID *string `json:"userId,omitempty"` 7341 // ProductID - Product identifier path. /products/{productId} 7342 ProductID *string `json:"productId,omitempty"` 7343 // APIID - API identifier path. /apis/{apiId} 7344 APIID *string `json:"apiId,omitempty"` 7345 // OperationID - Operation identifier path. /apis/{apiId}/operations/{operationId} 7346 OperationID *string `json:"operationId,omitempty"` 7347 // APIRegion - API region identifier. 7348 APIRegion *string `json:"apiRegion,omitempty"` 7349 // SubscriptionID - Subscription identifier path. /subscriptions/{subscriptionId} 7350 SubscriptionID *string `json:"subscriptionId,omitempty"` 7351 // CallCountSuccess - Number of succesful calls. This includes calls returning HttpStatusCode <= 301 and HttpStatusCode.NotModified and HttpStatusCode.TemporaryRedirect 7352 CallCountSuccess *int32 `json:"callCountSuccess,omitempty"` 7353 // CallCountBlocked - Number of calls blocked due to invalid credentials. This includes calls returning HttpStatusCode.Unauthorize and HttpStatusCode.Forbidden and HttpStatusCode.TooManyRequests 7354 CallCountBlocked *int32 `json:"callCountBlocked,omitempty"` 7355 // CallCountFailed - Number of calls failed due to proxy or backend errors. This includes calls returning HttpStatusCode.BadRequest(400) and any Code between HttpStatusCode.InternalServerError (500) and 600 7356 CallCountFailed *int32 `json:"callCountFailed,omitempty"` 7357 // CallCountOther - Number of other calls. 7358 CallCountOther *int32 `json:"callCountOther,omitempty"` 7359 // CallCountTotal - Total number of calls. 7360 CallCountTotal *int32 `json:"callCountTotal,omitempty"` 7361 // Bandwidth - Bandwidth consumed. 7362 Bandwidth *int64 `json:"bandwidth,omitempty"` 7363 // CacheHitCount - Number of times when content was served from cache policy. 7364 CacheHitCount *int32 `json:"cacheHitCount,omitempty"` 7365 // CacheMissCount - Number of times content was fetched from backend. 7366 CacheMissCount *int32 `json:"cacheMissCount,omitempty"` 7367 // APITimeAvg - Average time it took to process request. 7368 APITimeAvg *float64 `json:"apiTimeAvg,omitempty"` 7369 // APITimeMin - Minimum time it took to process request. 7370 APITimeMin *float64 `json:"apiTimeMin,omitempty"` 7371 // APITimeMax - Maximum time it took to process request. 7372 APITimeMax *float64 `json:"apiTimeMax,omitempty"` 7373 // ServiceTimeAvg - Average time it took to process request on backend. 7374 ServiceTimeAvg *float64 `json:"serviceTimeAvg,omitempty"` 7375 // ServiceTimeMin - Minimum time it took to process request on backend. 7376 ServiceTimeMin *float64 `json:"serviceTimeMin,omitempty"` 7377 // ServiceTimeMax - Maximum time it took to process request on backend. 7378 ServiceTimeMax *float64 `json:"serviceTimeMax,omitempty"` 7379} 7380 7381// RepresentationContract operation request/response representation details. 7382type RepresentationContract struct { 7383 // ContentType - Specifies a registered or custom content type for this representation, e.g. application/xml. 7384 ContentType *string `json:"contentType,omitempty"` 7385 // Sample - An example of the representation. 7386 Sample *string `json:"sample,omitempty"` 7387 // SchemaID - Schema identifier. Applicable only if 'contentType' value is neither 'application/x-www-form-urlencoded' nor 'multipart/form-data'. 7388 SchemaID *string `json:"schemaId,omitempty"` 7389 // TypeName - Type name defined by the schema. Applicable only if 'contentType' value is neither 'application/x-www-form-urlencoded' nor 'multipart/form-data'. 7390 TypeName *string `json:"typeName,omitempty"` 7391 // FormParameters - Collection of form parameters. Required if 'contentType' value is either 'application/x-www-form-urlencoded' or 'multipart/form-data'.. 7392 FormParameters *[]ParameterContract `json:"formParameters,omitempty"` 7393} 7394 7395// RequestContract operation request details. 7396type RequestContract struct { 7397 // Description - Operation request description. 7398 Description *string `json:"description,omitempty"` 7399 // QueryParameters - Collection of operation request query parameters. 7400 QueryParameters *[]ParameterContract `json:"queryParameters,omitempty"` 7401 // Headers - Collection of operation request headers. 7402 Headers *[]ParameterContract `json:"headers,omitempty"` 7403 // Representations - Collection of operation request representations. 7404 Representations *[]RepresentationContract `json:"representations,omitempty"` 7405} 7406 7407// RequestReportCollection paged Report records list representation. 7408type RequestReportCollection struct { 7409 autorest.Response `json:"-"` 7410 // Value - Page values. 7411 Value *[]RequestReportRecordContract `json:"value,omitempty"` 7412 // Count - Total record count number across all pages. 7413 Count *int64 `json:"count,omitempty"` 7414} 7415 7416// RequestReportRecordContract request Report data. 7417type RequestReportRecordContract struct { 7418 // APIID - API identifier path. /apis/{apiId} 7419 APIID *string `json:"apiId,omitempty"` 7420 // OperationID - Operation identifier path. /apis/{apiId}/operations/{operationId} 7421 OperationID *string `json:"operationId,omitempty"` 7422 // ProductID - Product identifier path. /products/{productId} 7423 ProductID *string `json:"productId,omitempty"` 7424 // UserID - User identifier path. /users/{userId} 7425 UserID *string `json:"userId,omitempty"` 7426 // Method - The HTTP method associated with this request.. 7427 Method *string `json:"method,omitempty"` 7428 // URL - The full URL associated with this request. 7429 URL *string `json:"url,omitempty"` 7430 // IPAddress - The client IP address associated with this request. 7431 IPAddress *string `json:"ipAddress,omitempty"` 7432 // BackendResponseCode - The HTTP status code received by the gateway as a result of forwarding this request to the backend. 7433 BackendResponseCode *string `json:"backendResponseCode,omitempty"` 7434 // ResponseCode - The HTTP status code returned by the gateway. 7435 ResponseCode *int32 `json:"responseCode,omitempty"` 7436 // ResponseSize - The size of the response returned by the gateway. 7437 ResponseSize *int32 `json:"responseSize,omitempty"` 7438 // Timestamp - The date and time when this request was received by the gateway in ISO 8601 format. 7439 Timestamp *date.Time `json:"timestamp,omitempty"` 7440 // Cache - Specifies if response cache was involved in generating the response. If the value is none, the cache was not used. If the value is hit, cached response was returned. If the value is miss, the cache was used but lookup resulted in a miss and request was fullfilled by the backend. 7441 Cache *string `json:"cache,omitempty"` 7442 // APITime - The total time it took to process this request. 7443 APITime *float64 `json:"apiTime,omitempty"` 7444 // ServiceTime - he time it took to forward this request to the backend and get the response back. 7445 ServiceTime *float64 `json:"serviceTime,omitempty"` 7446 // APIRegion - Azure region where the gateway that processed this request is located. 7447 APIRegion *string `json:"apiRegion,omitempty"` 7448 // SubscriptionID - Subscription identifier path. /subscriptions/{subscriptionId} 7449 SubscriptionID *string `json:"subscriptionId,omitempty"` 7450 // RequestID - Request Identifier. 7451 RequestID *string `json:"requestId,omitempty"` 7452 // RequestSize - The size of this request.. 7453 RequestSize *int32 `json:"requestSize,omitempty"` 7454} 7455 7456// Resource the Resource definition. 7457type Resource struct { 7458 // ID - Resource ID. 7459 ID *string `json:"id,omitempty"` 7460 // Name - Resource name. 7461 Name *string `json:"name,omitempty"` 7462 // Type - Resource type for API Management resource. 7463 Type *string `json:"type,omitempty"` 7464} 7465 7466// ResponseContract operation response details. 7467type ResponseContract struct { 7468 // StatusCode - Operation response HTTP status code. 7469 StatusCode *int32 `json:"statusCode,omitempty"` 7470 // Description - Operation response description. 7471 Description *string `json:"description,omitempty"` 7472 // Representations - Collection of operation response representations. 7473 Representations *[]RepresentationContract `json:"representations,omitempty"` 7474 // Headers - Collection of operation response headers. 7475 Headers *[]ParameterContract `json:"headers,omitempty"` 7476} 7477 7478// SamplingSettings sampling settings for Diagnostic. 7479type SamplingSettings struct { 7480 // SamplingType - Sampling type. Possible values include: 'Fixed' 7481 SamplingType SamplingType `json:"samplingType,omitempty"` 7482 // Percentage - Rate of sampling for fixed-rate sampling. 7483 Percentage *float64 `json:"percentage,omitempty"` 7484} 7485 7486// SaveConfigurationParameter parameters supplied to the Save Tenant Configuration operation. 7487type SaveConfigurationParameter struct { 7488 // Branch - The name of the Git branch in which to commit the current configuration snapshot. 7489 Branch *string `json:"branch,omitempty"` 7490 // Force - The value if true, the current configuration database is committed to the Git repository, even if the Git repository has newer changes that would be overwritten. 7491 Force *bool `json:"force,omitempty"` 7492} 7493 7494// SchemaCollection the response of the list schema operation. 7495type SchemaCollection struct { 7496 autorest.Response `json:"-"` 7497 // Value - Api Schema Contract value. 7498 Value *[]SchemaContract `json:"value,omitempty"` 7499 // NextLink - Next page link if any. 7500 NextLink *string `json:"nextLink,omitempty"` 7501} 7502 7503// SchemaCollectionIterator provides access to a complete listing of SchemaContract values. 7504type SchemaCollectionIterator struct { 7505 i int 7506 page SchemaCollectionPage 7507} 7508 7509// Next advances to the next value. If there was an error making 7510// the request the iterator does not advance and the error is returned. 7511func (iter *SchemaCollectionIterator) Next() error { 7512 iter.i++ 7513 if iter.i < len(iter.page.Values()) { 7514 return nil 7515 } 7516 err := iter.page.Next() 7517 if err != nil { 7518 iter.i-- 7519 return err 7520 } 7521 iter.i = 0 7522 return nil 7523} 7524 7525// NotDone returns true if the enumeration should be started or is not yet complete. 7526func (iter SchemaCollectionIterator) NotDone() bool { 7527 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 7528} 7529 7530// Response returns the raw server response from the last page request. 7531func (iter SchemaCollectionIterator) Response() SchemaCollection { 7532 return iter.page.Response() 7533} 7534 7535// Value returns the current value or a zero-initialized value if the 7536// iterator has advanced beyond the end of the collection. 7537func (iter SchemaCollectionIterator) Value() SchemaContract { 7538 if !iter.page.NotDone() { 7539 return SchemaContract{} 7540 } 7541 return iter.page.Values()[iter.i] 7542} 7543 7544// IsEmpty returns true if the ListResult contains no values. 7545func (sc SchemaCollection) IsEmpty() bool { 7546 return sc.Value == nil || len(*sc.Value) == 0 7547} 7548 7549// schemaCollectionPreparer prepares a request to retrieve the next set of results. 7550// It returns nil if no more results exist. 7551func (sc SchemaCollection) schemaCollectionPreparer() (*http.Request, error) { 7552 if sc.NextLink == nil || len(to.String(sc.NextLink)) < 1 { 7553 return nil, nil 7554 } 7555 return autorest.Prepare(&http.Request{}, 7556 autorest.AsJSON(), 7557 autorest.AsGet(), 7558 autorest.WithBaseURL(to.String(sc.NextLink))) 7559} 7560 7561// SchemaCollectionPage contains a page of SchemaContract values. 7562type SchemaCollectionPage struct { 7563 fn func(SchemaCollection) (SchemaCollection, error) 7564 sc SchemaCollection 7565} 7566 7567// Next advances to the next page of values. If there was an error making 7568// the request the page does not advance and the error is returned. 7569func (page *SchemaCollectionPage) Next() error { 7570 next, err := page.fn(page.sc) 7571 if err != nil { 7572 return err 7573 } 7574 page.sc = next 7575 return nil 7576} 7577 7578// NotDone returns true if the page enumeration should be started or is not yet complete. 7579func (page SchemaCollectionPage) NotDone() bool { 7580 return !page.sc.IsEmpty() 7581} 7582 7583// Response returns the raw server response from the last page request. 7584func (page SchemaCollectionPage) Response() SchemaCollection { 7585 return page.sc 7586} 7587 7588// Values returns the slice of values for the current page or nil if there are no values. 7589func (page SchemaCollectionPage) Values() []SchemaContract { 7590 if page.sc.IsEmpty() { 7591 return nil 7592 } 7593 return *page.sc.Value 7594} 7595 7596// SchemaContract schema Contract details. 7597type SchemaContract struct { 7598 autorest.Response `json:"-"` 7599 // SchemaContractProperties - Properties of the Schema. 7600 *SchemaContractProperties `json:"properties,omitempty"` 7601 // ID - Resource ID. 7602 ID *string `json:"id,omitempty"` 7603 // Name - Resource name. 7604 Name *string `json:"name,omitempty"` 7605 // Type - Resource type for API Management resource. 7606 Type *string `json:"type,omitempty"` 7607} 7608 7609// MarshalJSON is the custom marshaler for SchemaContract. 7610func (sc SchemaContract) MarshalJSON() ([]byte, error) { 7611 objectMap := make(map[string]interface{}) 7612 if sc.SchemaContractProperties != nil { 7613 objectMap["properties"] = sc.SchemaContractProperties 7614 } 7615 if sc.ID != nil { 7616 objectMap["id"] = sc.ID 7617 } 7618 if sc.Name != nil { 7619 objectMap["name"] = sc.Name 7620 } 7621 if sc.Type != nil { 7622 objectMap["type"] = sc.Type 7623 } 7624 return json.Marshal(objectMap) 7625} 7626 7627// UnmarshalJSON is the custom unmarshaler for SchemaContract struct. 7628func (sc *SchemaContract) UnmarshalJSON(body []byte) error { 7629 var m map[string]*json.RawMessage 7630 err := json.Unmarshal(body, &m) 7631 if err != nil { 7632 return err 7633 } 7634 for k, v := range m { 7635 switch k { 7636 case "properties": 7637 if v != nil { 7638 var schemaContractProperties SchemaContractProperties 7639 err = json.Unmarshal(*v, &schemaContractProperties) 7640 if err != nil { 7641 return err 7642 } 7643 sc.SchemaContractProperties = &schemaContractProperties 7644 } 7645 case "id": 7646 if v != nil { 7647 var ID string 7648 err = json.Unmarshal(*v, &ID) 7649 if err != nil { 7650 return err 7651 } 7652 sc.ID = &ID 7653 } 7654 case "name": 7655 if v != nil { 7656 var name string 7657 err = json.Unmarshal(*v, &name) 7658 if err != nil { 7659 return err 7660 } 7661 sc.Name = &name 7662 } 7663 case "type": 7664 if v != nil { 7665 var typeVar string 7666 err = json.Unmarshal(*v, &typeVar) 7667 if err != nil { 7668 return err 7669 } 7670 sc.Type = &typeVar 7671 } 7672 } 7673 } 7674 7675 return nil 7676} 7677 7678// SchemaContractProperties schema contract Properties. 7679type SchemaContractProperties struct { 7680 // ContentType - Must be a valid a media type used in a Content-Type header as defined in the RFC 2616. Media type of the schema document (e.g. application/json, application/xml). 7681 ContentType *string `json:"contentType,omitempty"` 7682 // SchemaDocumentProperties - Properties of the Schema Document. 7683 *SchemaDocumentProperties `json:"document,omitempty"` 7684} 7685 7686// MarshalJSON is the custom marshaler for SchemaContractProperties. 7687func (scp SchemaContractProperties) MarshalJSON() ([]byte, error) { 7688 objectMap := make(map[string]interface{}) 7689 if scp.ContentType != nil { 7690 objectMap["contentType"] = scp.ContentType 7691 } 7692 if scp.SchemaDocumentProperties != nil { 7693 objectMap["document"] = scp.SchemaDocumentProperties 7694 } 7695 return json.Marshal(objectMap) 7696} 7697 7698// UnmarshalJSON is the custom unmarshaler for SchemaContractProperties struct. 7699func (scp *SchemaContractProperties) UnmarshalJSON(body []byte) error { 7700 var m map[string]*json.RawMessage 7701 err := json.Unmarshal(body, &m) 7702 if err != nil { 7703 return err 7704 } 7705 for k, v := range m { 7706 switch k { 7707 case "contentType": 7708 if v != nil { 7709 var contentType string 7710 err = json.Unmarshal(*v, &contentType) 7711 if err != nil { 7712 return err 7713 } 7714 scp.ContentType = &contentType 7715 } 7716 case "document": 7717 if v != nil { 7718 var schemaDocumentProperties SchemaDocumentProperties 7719 err = json.Unmarshal(*v, &schemaDocumentProperties) 7720 if err != nil { 7721 return err 7722 } 7723 scp.SchemaDocumentProperties = &schemaDocumentProperties 7724 } 7725 } 7726 } 7727 7728 return nil 7729} 7730 7731// SchemaDocumentProperties schema Document Properties. 7732type SchemaDocumentProperties struct { 7733 // Value - Json escaped string defining the document representing the Schema. 7734 Value *string `json:"value,omitempty"` 7735} 7736 7737// ServiceApplyNetworkConfigurationParameters parameter supplied to the Apply Network configuration operation. 7738type ServiceApplyNetworkConfigurationParameters struct { 7739 // Location - Location of the Api Management service to update for a multi-region service. For a service deployed in a single region, this parameter is not required. 7740 Location *string `json:"location,omitempty"` 7741} 7742 7743// ServiceApplyNetworkConfigurationUpdatesFuture an abstraction for monitoring and retrieving the results of a 7744// long-running operation. 7745type ServiceApplyNetworkConfigurationUpdatesFuture struct { 7746 azure.Future 7747} 7748 7749// Result returns the result of the asynchronous operation. 7750// If the operation has not completed it will return an error. 7751func (future *ServiceApplyNetworkConfigurationUpdatesFuture) Result(client ServiceClient) (sr ServiceResource, err error) { 7752 var done bool 7753 done, err = future.Done(client) 7754 if err != nil { 7755 err = autorest.NewErrorWithError(err, "apimanagement.ServiceApplyNetworkConfigurationUpdatesFuture", "Result", future.Response(), "Polling failure") 7756 return 7757 } 7758 if !done { 7759 err = azure.NewAsyncOpIncompleteError("apimanagement.ServiceApplyNetworkConfigurationUpdatesFuture") 7760 return 7761 } 7762 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 7763 if sr.Response.Response, err = future.GetResult(sender); err == nil && sr.Response.Response.StatusCode != http.StatusNoContent { 7764 sr, err = client.ApplyNetworkConfigurationUpdatesResponder(sr.Response.Response) 7765 if err != nil { 7766 err = autorest.NewErrorWithError(err, "apimanagement.ServiceApplyNetworkConfigurationUpdatesFuture", "Result", sr.Response.Response, "Failure responding to request") 7767 } 7768 } 7769 return 7770} 7771 7772// ServiceBackupFuture an abstraction for monitoring and retrieving the results of a long-running operation. 7773type ServiceBackupFuture struct { 7774 azure.Future 7775} 7776 7777// Result returns the result of the asynchronous operation. 7778// If the operation has not completed it will return an error. 7779func (future *ServiceBackupFuture) Result(client ServiceClient) (sr ServiceResource, err error) { 7780 var done bool 7781 done, err = future.Done(client) 7782 if err != nil { 7783 err = autorest.NewErrorWithError(err, "apimanagement.ServiceBackupFuture", "Result", future.Response(), "Polling failure") 7784 return 7785 } 7786 if !done { 7787 err = azure.NewAsyncOpIncompleteError("apimanagement.ServiceBackupFuture") 7788 return 7789 } 7790 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 7791 if sr.Response.Response, err = future.GetResult(sender); err == nil && sr.Response.Response.StatusCode != http.StatusNoContent { 7792 sr, err = client.BackupResponder(sr.Response.Response) 7793 if err != nil { 7794 err = autorest.NewErrorWithError(err, "apimanagement.ServiceBackupFuture", "Result", sr.Response.Response, "Failure responding to request") 7795 } 7796 } 7797 return 7798} 7799 7800// ServiceBackupRestoreParameters parameters supplied to the Backup/Restore of an API Management service operation. 7801type ServiceBackupRestoreParameters struct { 7802 // StorageAccount - Azure Cloud Storage account (used to place/retrieve the backup) name. 7803 StorageAccount *string `json:"storageAccount,omitempty"` 7804 // AccessKey - Azure Cloud Storage account (used to place/retrieve the backup) access key. 7805 AccessKey *string `json:"accessKey,omitempty"` 7806 // ContainerName - Azure Cloud Storage blob container name used to place/retrieve the backup. 7807 ContainerName *string `json:"containerName,omitempty"` 7808 // BackupName - The name of the backup file to create. 7809 BackupName *string `json:"backupName,omitempty"` 7810} 7811 7812// ServiceBaseProperties base Properties of an API Management service resource description. 7813type ServiceBaseProperties struct { 7814 // NotificationSenderEmail - Email address from which the notification will be sent. 7815 NotificationSenderEmail *string `json:"notificationSenderEmail,omitempty"` 7816 // ProvisioningState - The current provisioning state of the API Management service which can be one of the following: Created/Activating/Succeeded/Updating/Failed/Stopped/Terminating/TerminationFailed/Deleted. 7817 ProvisioningState *string `json:"provisioningState,omitempty"` 7818 // TargetProvisioningState - The provisioning state of the API Management service, which is targeted by the long running operation started on the service. 7819 TargetProvisioningState *string `json:"targetProvisioningState,omitempty"` 7820 // CreatedAtUtc - Creation UTC date of the API Management service.The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. 7821 CreatedAtUtc *date.Time `json:"createdAtUtc,omitempty"` 7822 // GatewayURL - Gateway URL of the API Management service. 7823 GatewayURL *string `json:"gatewayUrl,omitempty"` 7824 // GatewayRegionalURL - Gateway URL of the API Management service in the Default Region. 7825 GatewayRegionalURL *string `json:"gatewayRegionalUrl,omitempty"` 7826 // PortalURL - Publisher portal endpoint Url of the API Management service. 7827 PortalURL *string `json:"portalUrl,omitempty"` 7828 // ManagementAPIURL - Management API endpoint URL of the API Management service. 7829 ManagementAPIURL *string `json:"managementApiUrl,omitempty"` 7830 // ScmURL - SCM endpoint URL of the API Management service. 7831 ScmURL *string `json:"scmUrl,omitempty"` 7832 // HostnameConfigurations - Custom hostname configuration of the API Management service. 7833 HostnameConfigurations *[]HostnameConfiguration `json:"hostnameConfigurations,omitempty"` 7834 // PublicIPAddresses - Public Static Load Balanced IP addresses of the API Management service in Primary region. Available only for Basic, Standard and Premium SKU. 7835 PublicIPAddresses *[]string `json:"publicIPAddresses,omitempty"` 7836 // PrivateIPAddresses - Private Static Load Balanced IP addresses of the API Management service in Primary region which is deployed in an Internal Virtual Network. Available only for Basic, Standard and Premium SKU. 7837 PrivateIPAddresses *[]string `json:"privateIPAddresses,omitempty"` 7838 // VirtualNetworkConfiguration - Virtual network configuration of the API Management service. 7839 VirtualNetworkConfiguration *VirtualNetworkConfiguration `json:"virtualNetworkConfiguration,omitempty"` 7840 // AdditionalLocations - Additional datacenter locations of the API Management service. 7841 AdditionalLocations *[]AdditionalLocation `json:"additionalLocations,omitempty"` 7842 // CustomProperties - Custom properties of the API Management service. Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TripleDes168` will disable the cipher TLS_RSA_WITH_3DES_EDE_CBC_SHA for all TLS(1.0, 1.1 and 1.2). Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls11` can be used to disable just TLS 1.1 and setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls10` can be used to disable TLS 1.0 on an API Management service. 7843 CustomProperties map[string]*string `json:"customProperties"` 7844 // Certificates - List of Certificates that need to be installed in the API Management service. Max supported certificates that can be installed is 10. 7845 Certificates *[]CertificateConfiguration `json:"certificates,omitempty"` 7846 // VirtualNetworkType - The type of VPN in which API Managemet service needs to be configured in. None (Default Value) means the API Management service is not part of any Virtual Network, External means the API Management deployment is set up inside a Virtual Network having an Internet Facing Endpoint, and Internal means that API Management deployment is setup inside a Virtual Network having an Intranet Facing Endpoint only. Possible values include: 'VirtualNetworkTypeNone', 'VirtualNetworkTypeExternal', 'VirtualNetworkTypeInternal' 7847 VirtualNetworkType VirtualNetworkType `json:"virtualNetworkType,omitempty"` 7848} 7849 7850// MarshalJSON is the custom marshaler for ServiceBaseProperties. 7851func (sbp ServiceBaseProperties) MarshalJSON() ([]byte, error) { 7852 objectMap := make(map[string]interface{}) 7853 if sbp.NotificationSenderEmail != nil { 7854 objectMap["notificationSenderEmail"] = sbp.NotificationSenderEmail 7855 } 7856 if sbp.ProvisioningState != nil { 7857 objectMap["provisioningState"] = sbp.ProvisioningState 7858 } 7859 if sbp.TargetProvisioningState != nil { 7860 objectMap["targetProvisioningState"] = sbp.TargetProvisioningState 7861 } 7862 if sbp.CreatedAtUtc != nil { 7863 objectMap["createdAtUtc"] = sbp.CreatedAtUtc 7864 } 7865 if sbp.GatewayURL != nil { 7866 objectMap["gatewayUrl"] = sbp.GatewayURL 7867 } 7868 if sbp.GatewayRegionalURL != nil { 7869 objectMap["gatewayRegionalUrl"] = sbp.GatewayRegionalURL 7870 } 7871 if sbp.PortalURL != nil { 7872 objectMap["portalUrl"] = sbp.PortalURL 7873 } 7874 if sbp.ManagementAPIURL != nil { 7875 objectMap["managementApiUrl"] = sbp.ManagementAPIURL 7876 } 7877 if sbp.ScmURL != nil { 7878 objectMap["scmUrl"] = sbp.ScmURL 7879 } 7880 if sbp.HostnameConfigurations != nil { 7881 objectMap["hostnameConfigurations"] = sbp.HostnameConfigurations 7882 } 7883 if sbp.PublicIPAddresses != nil { 7884 objectMap["publicIPAddresses"] = sbp.PublicIPAddresses 7885 } 7886 if sbp.PrivateIPAddresses != nil { 7887 objectMap["privateIPAddresses"] = sbp.PrivateIPAddresses 7888 } 7889 if sbp.VirtualNetworkConfiguration != nil { 7890 objectMap["virtualNetworkConfiguration"] = sbp.VirtualNetworkConfiguration 7891 } 7892 if sbp.AdditionalLocations != nil { 7893 objectMap["additionalLocations"] = sbp.AdditionalLocations 7894 } 7895 if sbp.CustomProperties != nil { 7896 objectMap["customProperties"] = sbp.CustomProperties 7897 } 7898 if sbp.Certificates != nil { 7899 objectMap["certificates"] = sbp.Certificates 7900 } 7901 if sbp.VirtualNetworkType != "" { 7902 objectMap["virtualNetworkType"] = sbp.VirtualNetworkType 7903 } 7904 return json.Marshal(objectMap) 7905} 7906 7907// ServiceCheckNameAvailabilityParameters parameters supplied to the CheckNameAvailability operation. 7908type ServiceCheckNameAvailabilityParameters struct { 7909 // Name - The name to check for availability. 7910 Name *string `json:"name,omitempty"` 7911} 7912 7913// ServiceCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running 7914// operation. 7915type ServiceCreateOrUpdateFuture struct { 7916 azure.Future 7917} 7918 7919// Result returns the result of the asynchronous operation. 7920// If the operation has not completed it will return an error. 7921func (future *ServiceCreateOrUpdateFuture) Result(client ServiceClient) (sr ServiceResource, err error) { 7922 var done bool 7923 done, err = future.Done(client) 7924 if err != nil { 7925 err = autorest.NewErrorWithError(err, "apimanagement.ServiceCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") 7926 return 7927 } 7928 if !done { 7929 err = azure.NewAsyncOpIncompleteError("apimanagement.ServiceCreateOrUpdateFuture") 7930 return 7931 } 7932 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 7933 if sr.Response.Response, err = future.GetResult(sender); err == nil && sr.Response.Response.StatusCode != http.StatusNoContent { 7934 sr, err = client.CreateOrUpdateResponder(sr.Response.Response) 7935 if err != nil { 7936 err = autorest.NewErrorWithError(err, "apimanagement.ServiceCreateOrUpdateFuture", "Result", sr.Response.Response, "Failure responding to request") 7937 } 7938 } 7939 return 7940} 7941 7942// ServiceGetSsoTokenResult the response of the GetSsoToken operation. 7943type ServiceGetSsoTokenResult struct { 7944 autorest.Response `json:"-"` 7945 // RedirectURI - Redirect URL to the Publisher Portal containing the SSO token. 7946 RedirectURI *string `json:"redirectUri,omitempty"` 7947} 7948 7949// ServiceIdentity identity properties of the Api Management service resource. 7950type ServiceIdentity struct { 7951 // Type - The identity type. Currently the only supported type is 'SystemAssigned'. 7952 Type *string `json:"type,omitempty"` 7953 // PrincipalID - The principal id of the identity. 7954 PrincipalID *uuid.UUID `json:"principalId,omitempty"` 7955 // TenantID - The client tenant id of the identity. 7956 TenantID *uuid.UUID `json:"tenantId,omitempty"` 7957} 7958 7959// ServiceListResult the response of the List API Management services operation. 7960type ServiceListResult struct { 7961 autorest.Response `json:"-"` 7962 // Value - Result of the List API Management services operation. 7963 Value *[]ServiceResource `json:"value,omitempty"` 7964 // NextLink - Link to the next set of results. Not empty if Value contains incomplete list of API Management services. 7965 NextLink *string `json:"nextLink,omitempty"` 7966} 7967 7968// ServiceListResultIterator provides access to a complete listing of ServiceResource values. 7969type ServiceListResultIterator struct { 7970 i int 7971 page ServiceListResultPage 7972} 7973 7974// Next advances to the next value. If there was an error making 7975// the request the iterator does not advance and the error is returned. 7976func (iter *ServiceListResultIterator) Next() error { 7977 iter.i++ 7978 if iter.i < len(iter.page.Values()) { 7979 return nil 7980 } 7981 err := iter.page.Next() 7982 if err != nil { 7983 iter.i-- 7984 return err 7985 } 7986 iter.i = 0 7987 return nil 7988} 7989 7990// NotDone returns true if the enumeration should be started or is not yet complete. 7991func (iter ServiceListResultIterator) NotDone() bool { 7992 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 7993} 7994 7995// Response returns the raw server response from the last page request. 7996func (iter ServiceListResultIterator) Response() ServiceListResult { 7997 return iter.page.Response() 7998} 7999 8000// Value returns the current value or a zero-initialized value if the 8001// iterator has advanced beyond the end of the collection. 8002func (iter ServiceListResultIterator) Value() ServiceResource { 8003 if !iter.page.NotDone() { 8004 return ServiceResource{} 8005 } 8006 return iter.page.Values()[iter.i] 8007} 8008 8009// IsEmpty returns true if the ListResult contains no values. 8010func (slr ServiceListResult) IsEmpty() bool { 8011 return slr.Value == nil || len(*slr.Value) == 0 8012} 8013 8014// serviceListResultPreparer prepares a request to retrieve the next set of results. 8015// It returns nil if no more results exist. 8016func (slr ServiceListResult) serviceListResultPreparer() (*http.Request, error) { 8017 if slr.NextLink == nil || len(to.String(slr.NextLink)) < 1 { 8018 return nil, nil 8019 } 8020 return autorest.Prepare(&http.Request{}, 8021 autorest.AsJSON(), 8022 autorest.AsGet(), 8023 autorest.WithBaseURL(to.String(slr.NextLink))) 8024} 8025 8026// ServiceListResultPage contains a page of ServiceResource values. 8027type ServiceListResultPage struct { 8028 fn func(ServiceListResult) (ServiceListResult, error) 8029 slr ServiceListResult 8030} 8031 8032// Next advances to the next page of values. If there was an error making 8033// the request the page does not advance and the error is returned. 8034func (page *ServiceListResultPage) Next() error { 8035 next, err := page.fn(page.slr) 8036 if err != nil { 8037 return err 8038 } 8039 page.slr = next 8040 return nil 8041} 8042 8043// NotDone returns true if the page enumeration should be started or is not yet complete. 8044func (page ServiceListResultPage) NotDone() bool { 8045 return !page.slr.IsEmpty() 8046} 8047 8048// Response returns the raw server response from the last page request. 8049func (page ServiceListResultPage) Response() ServiceListResult { 8050 return page.slr 8051} 8052 8053// Values returns the slice of values for the current page or nil if there are no values. 8054func (page ServiceListResultPage) Values() []ServiceResource { 8055 if page.slr.IsEmpty() { 8056 return nil 8057 } 8058 return *page.slr.Value 8059} 8060 8061// ServiceNameAvailabilityResult response of the CheckNameAvailability operation. 8062type ServiceNameAvailabilityResult struct { 8063 autorest.Response `json:"-"` 8064 // NameAvailable - True if the name is available and can be used to create a new API Management service; otherwise false. 8065 NameAvailable *bool `json:"nameAvailable,omitempty"` 8066 // Message - If reason == invalid, provide the user with the reason why the given name is invalid, and provide the resource naming requirements so that the user can select a valid name. If reason == AlreadyExists, explain that <resourceName> is already in use, and direct them to select a different name. 8067 Message *string `json:"message,omitempty"` 8068 // Reason - Invalid indicates the name provided does not match the resource provider’s naming requirements (incorrect length, unsupported characters, etc.) AlreadyExists indicates that the name is already in use and is therefore unavailable. Possible values include: 'Valid', 'Invalid', 'AlreadyExists' 8069 Reason NameAvailabilityReason `json:"reason,omitempty"` 8070} 8071 8072// ServiceProperties properties of an API Management service resource description. 8073type ServiceProperties struct { 8074 // PublisherEmail - Publisher email. 8075 PublisherEmail *string `json:"publisherEmail,omitempty"` 8076 // PublisherName - Publisher name. 8077 PublisherName *string `json:"publisherName,omitempty"` 8078 // NotificationSenderEmail - Email address from which the notification will be sent. 8079 NotificationSenderEmail *string `json:"notificationSenderEmail,omitempty"` 8080 // ProvisioningState - The current provisioning state of the API Management service which can be one of the following: Created/Activating/Succeeded/Updating/Failed/Stopped/Terminating/TerminationFailed/Deleted. 8081 ProvisioningState *string `json:"provisioningState,omitempty"` 8082 // TargetProvisioningState - The provisioning state of the API Management service, which is targeted by the long running operation started on the service. 8083 TargetProvisioningState *string `json:"targetProvisioningState,omitempty"` 8084 // CreatedAtUtc - Creation UTC date of the API Management service.The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. 8085 CreatedAtUtc *date.Time `json:"createdAtUtc,omitempty"` 8086 // GatewayURL - Gateway URL of the API Management service. 8087 GatewayURL *string `json:"gatewayUrl,omitempty"` 8088 // GatewayRegionalURL - Gateway URL of the API Management service in the Default Region. 8089 GatewayRegionalURL *string `json:"gatewayRegionalUrl,omitempty"` 8090 // PortalURL - Publisher portal endpoint Url of the API Management service. 8091 PortalURL *string `json:"portalUrl,omitempty"` 8092 // ManagementAPIURL - Management API endpoint URL of the API Management service. 8093 ManagementAPIURL *string `json:"managementApiUrl,omitempty"` 8094 // ScmURL - SCM endpoint URL of the API Management service. 8095 ScmURL *string `json:"scmUrl,omitempty"` 8096 // HostnameConfigurations - Custom hostname configuration of the API Management service. 8097 HostnameConfigurations *[]HostnameConfiguration `json:"hostnameConfigurations,omitempty"` 8098 // PublicIPAddresses - Public Static Load Balanced IP addresses of the API Management service in Primary region. Available only for Basic, Standard and Premium SKU. 8099 PublicIPAddresses *[]string `json:"publicIPAddresses,omitempty"` 8100 // PrivateIPAddresses - Private Static Load Balanced IP addresses of the API Management service in Primary region which is deployed in an Internal Virtual Network. Available only for Basic, Standard and Premium SKU. 8101 PrivateIPAddresses *[]string `json:"privateIPAddresses,omitempty"` 8102 // VirtualNetworkConfiguration - Virtual network configuration of the API Management service. 8103 VirtualNetworkConfiguration *VirtualNetworkConfiguration `json:"virtualNetworkConfiguration,omitempty"` 8104 // AdditionalLocations - Additional datacenter locations of the API Management service. 8105 AdditionalLocations *[]AdditionalLocation `json:"additionalLocations,omitempty"` 8106 // CustomProperties - Custom properties of the API Management service. Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TripleDes168` will disable the cipher TLS_RSA_WITH_3DES_EDE_CBC_SHA for all TLS(1.0, 1.1 and 1.2). Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls11` can be used to disable just TLS 1.1 and setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls10` can be used to disable TLS 1.0 on an API Management service. 8107 CustomProperties map[string]*string `json:"customProperties"` 8108 // Certificates - List of Certificates that need to be installed in the API Management service. Max supported certificates that can be installed is 10. 8109 Certificates *[]CertificateConfiguration `json:"certificates,omitempty"` 8110 // VirtualNetworkType - The type of VPN in which API Managemet service needs to be configured in. None (Default Value) means the API Management service is not part of any Virtual Network, External means the API Management deployment is set up inside a Virtual Network having an Internet Facing Endpoint, and Internal means that API Management deployment is setup inside a Virtual Network having an Intranet Facing Endpoint only. Possible values include: 'VirtualNetworkTypeNone', 'VirtualNetworkTypeExternal', 'VirtualNetworkTypeInternal' 8111 VirtualNetworkType VirtualNetworkType `json:"virtualNetworkType,omitempty"` 8112} 8113 8114// MarshalJSON is the custom marshaler for ServiceProperties. 8115func (sp ServiceProperties) MarshalJSON() ([]byte, error) { 8116 objectMap := make(map[string]interface{}) 8117 if sp.PublisherEmail != nil { 8118 objectMap["publisherEmail"] = sp.PublisherEmail 8119 } 8120 if sp.PublisherName != nil { 8121 objectMap["publisherName"] = sp.PublisherName 8122 } 8123 if sp.NotificationSenderEmail != nil { 8124 objectMap["notificationSenderEmail"] = sp.NotificationSenderEmail 8125 } 8126 if sp.ProvisioningState != nil { 8127 objectMap["provisioningState"] = sp.ProvisioningState 8128 } 8129 if sp.TargetProvisioningState != nil { 8130 objectMap["targetProvisioningState"] = sp.TargetProvisioningState 8131 } 8132 if sp.CreatedAtUtc != nil { 8133 objectMap["createdAtUtc"] = sp.CreatedAtUtc 8134 } 8135 if sp.GatewayURL != nil { 8136 objectMap["gatewayUrl"] = sp.GatewayURL 8137 } 8138 if sp.GatewayRegionalURL != nil { 8139 objectMap["gatewayRegionalUrl"] = sp.GatewayRegionalURL 8140 } 8141 if sp.PortalURL != nil { 8142 objectMap["portalUrl"] = sp.PortalURL 8143 } 8144 if sp.ManagementAPIURL != nil { 8145 objectMap["managementApiUrl"] = sp.ManagementAPIURL 8146 } 8147 if sp.ScmURL != nil { 8148 objectMap["scmUrl"] = sp.ScmURL 8149 } 8150 if sp.HostnameConfigurations != nil { 8151 objectMap["hostnameConfigurations"] = sp.HostnameConfigurations 8152 } 8153 if sp.PublicIPAddresses != nil { 8154 objectMap["publicIPAddresses"] = sp.PublicIPAddresses 8155 } 8156 if sp.PrivateIPAddresses != nil { 8157 objectMap["privateIPAddresses"] = sp.PrivateIPAddresses 8158 } 8159 if sp.VirtualNetworkConfiguration != nil { 8160 objectMap["virtualNetworkConfiguration"] = sp.VirtualNetworkConfiguration 8161 } 8162 if sp.AdditionalLocations != nil { 8163 objectMap["additionalLocations"] = sp.AdditionalLocations 8164 } 8165 if sp.CustomProperties != nil { 8166 objectMap["customProperties"] = sp.CustomProperties 8167 } 8168 if sp.Certificates != nil { 8169 objectMap["certificates"] = sp.Certificates 8170 } 8171 if sp.VirtualNetworkType != "" { 8172 objectMap["virtualNetworkType"] = sp.VirtualNetworkType 8173 } 8174 return json.Marshal(objectMap) 8175} 8176 8177// ServiceResource a single API Management service resource in List or Get response. 8178type ServiceResource struct { 8179 autorest.Response `json:"-"` 8180 // ServiceProperties - Properties of the API Management service. 8181 *ServiceProperties `json:"properties,omitempty"` 8182 // Sku - SKU properties of the API Management service. 8183 Sku *ServiceSkuProperties `json:"sku,omitempty"` 8184 // Identity - Managed service identity of the Api Management service. 8185 Identity *ServiceIdentity `json:"identity,omitempty"` 8186 // Location - Resource location. 8187 Location *string `json:"location,omitempty"` 8188 // Etag - ETag of the resource. 8189 Etag *string `json:"etag,omitempty"` 8190 // ID - Resource ID. 8191 ID *string `json:"id,omitempty"` 8192 // Name - Resource name. 8193 Name *string `json:"name,omitempty"` 8194 // Type - Resource type for API Management resource is set to Microsoft.ApiManagement. 8195 Type *string `json:"type,omitempty"` 8196 // Tags - Resource tags. 8197 Tags map[string]*string `json:"tags"` 8198} 8199 8200// MarshalJSON is the custom marshaler for ServiceResource. 8201func (sr ServiceResource) MarshalJSON() ([]byte, error) { 8202 objectMap := make(map[string]interface{}) 8203 if sr.ServiceProperties != nil { 8204 objectMap["properties"] = sr.ServiceProperties 8205 } 8206 if sr.Sku != nil { 8207 objectMap["sku"] = sr.Sku 8208 } 8209 if sr.Identity != nil { 8210 objectMap["identity"] = sr.Identity 8211 } 8212 if sr.Location != nil { 8213 objectMap["location"] = sr.Location 8214 } 8215 if sr.Etag != nil { 8216 objectMap["etag"] = sr.Etag 8217 } 8218 if sr.ID != nil { 8219 objectMap["id"] = sr.ID 8220 } 8221 if sr.Name != nil { 8222 objectMap["name"] = sr.Name 8223 } 8224 if sr.Type != nil { 8225 objectMap["type"] = sr.Type 8226 } 8227 if sr.Tags != nil { 8228 objectMap["tags"] = sr.Tags 8229 } 8230 return json.Marshal(objectMap) 8231} 8232 8233// UnmarshalJSON is the custom unmarshaler for ServiceResource struct. 8234func (sr *ServiceResource) UnmarshalJSON(body []byte) error { 8235 var m map[string]*json.RawMessage 8236 err := json.Unmarshal(body, &m) 8237 if err != nil { 8238 return err 8239 } 8240 for k, v := range m { 8241 switch k { 8242 case "properties": 8243 if v != nil { 8244 var serviceProperties ServiceProperties 8245 err = json.Unmarshal(*v, &serviceProperties) 8246 if err != nil { 8247 return err 8248 } 8249 sr.ServiceProperties = &serviceProperties 8250 } 8251 case "sku": 8252 if v != nil { 8253 var sku ServiceSkuProperties 8254 err = json.Unmarshal(*v, &sku) 8255 if err != nil { 8256 return err 8257 } 8258 sr.Sku = &sku 8259 } 8260 case "identity": 8261 if v != nil { 8262 var identity ServiceIdentity 8263 err = json.Unmarshal(*v, &identity) 8264 if err != nil { 8265 return err 8266 } 8267 sr.Identity = &identity 8268 } 8269 case "location": 8270 if v != nil { 8271 var location string 8272 err = json.Unmarshal(*v, &location) 8273 if err != nil { 8274 return err 8275 } 8276 sr.Location = &location 8277 } 8278 case "etag": 8279 if v != nil { 8280 var etag string 8281 err = json.Unmarshal(*v, &etag) 8282 if err != nil { 8283 return err 8284 } 8285 sr.Etag = &etag 8286 } 8287 case "id": 8288 if v != nil { 8289 var ID string 8290 err = json.Unmarshal(*v, &ID) 8291 if err != nil { 8292 return err 8293 } 8294 sr.ID = &ID 8295 } 8296 case "name": 8297 if v != nil { 8298 var name string 8299 err = json.Unmarshal(*v, &name) 8300 if err != nil { 8301 return err 8302 } 8303 sr.Name = &name 8304 } 8305 case "type": 8306 if v != nil { 8307 var typeVar string 8308 err = json.Unmarshal(*v, &typeVar) 8309 if err != nil { 8310 return err 8311 } 8312 sr.Type = &typeVar 8313 } 8314 case "tags": 8315 if v != nil { 8316 var tags map[string]*string 8317 err = json.Unmarshal(*v, &tags) 8318 if err != nil { 8319 return err 8320 } 8321 sr.Tags = tags 8322 } 8323 } 8324 } 8325 8326 return nil 8327} 8328 8329// ServiceRestoreFuture an abstraction for monitoring and retrieving the results of a long-running operation. 8330type ServiceRestoreFuture struct { 8331 azure.Future 8332} 8333 8334// Result returns the result of the asynchronous operation. 8335// If the operation has not completed it will return an error. 8336func (future *ServiceRestoreFuture) Result(client ServiceClient) (sr ServiceResource, err error) { 8337 var done bool 8338 done, err = future.Done(client) 8339 if err != nil { 8340 err = autorest.NewErrorWithError(err, "apimanagement.ServiceRestoreFuture", "Result", future.Response(), "Polling failure") 8341 return 8342 } 8343 if !done { 8344 err = azure.NewAsyncOpIncompleteError("apimanagement.ServiceRestoreFuture") 8345 return 8346 } 8347 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 8348 if sr.Response.Response, err = future.GetResult(sender); err == nil && sr.Response.Response.StatusCode != http.StatusNoContent { 8349 sr, err = client.RestoreResponder(sr.Response.Response) 8350 if err != nil { 8351 err = autorest.NewErrorWithError(err, "apimanagement.ServiceRestoreFuture", "Result", sr.Response.Response, "Failure responding to request") 8352 } 8353 } 8354 return 8355} 8356 8357// ServiceSkuProperties API Management service resource SKU properties. 8358type ServiceSkuProperties struct { 8359 // Name - Name of the Sku. Possible values include: 'SkuTypeDeveloper', 'SkuTypeStandard', 'SkuTypePremium', 'SkuTypeBasic' 8360 Name SkuType `json:"name,omitempty"` 8361 // Capacity - Capacity of the SKU (number of deployed units of the SKU). The default value is 1. 8362 Capacity *int32 `json:"capacity,omitempty"` 8363} 8364 8365// ServiceUpdateFuture an abstraction for monitoring and retrieving the results of a long-running operation. 8366type ServiceUpdateFuture struct { 8367 azure.Future 8368} 8369 8370// Result returns the result of the asynchronous operation. 8371// If the operation has not completed it will return an error. 8372func (future *ServiceUpdateFuture) Result(client ServiceClient) (sr ServiceResource, err error) { 8373 var done bool 8374 done, err = future.Done(client) 8375 if err != nil { 8376 err = autorest.NewErrorWithError(err, "apimanagement.ServiceUpdateFuture", "Result", future.Response(), "Polling failure") 8377 return 8378 } 8379 if !done { 8380 err = azure.NewAsyncOpIncompleteError("apimanagement.ServiceUpdateFuture") 8381 return 8382 } 8383 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 8384 if sr.Response.Response, err = future.GetResult(sender); err == nil && sr.Response.Response.StatusCode != http.StatusNoContent { 8385 sr, err = client.UpdateResponder(sr.Response.Response) 8386 if err != nil { 8387 err = autorest.NewErrorWithError(err, "apimanagement.ServiceUpdateFuture", "Result", sr.Response.Response, "Failure responding to request") 8388 } 8389 } 8390 return 8391} 8392 8393// ServiceUpdateHostnameFuture an abstraction for monitoring and retrieving the results of a long-running 8394// operation. 8395type ServiceUpdateHostnameFuture struct { 8396 azure.Future 8397} 8398 8399// Result returns the result of the asynchronous operation. 8400// If the operation has not completed it will return an error. 8401func (future *ServiceUpdateHostnameFuture) Result(client ServiceClient) (sr ServiceResource, err error) { 8402 var done bool 8403 done, err = future.Done(client) 8404 if err != nil { 8405 err = autorest.NewErrorWithError(err, "apimanagement.ServiceUpdateHostnameFuture", "Result", future.Response(), "Polling failure") 8406 return 8407 } 8408 if !done { 8409 err = azure.NewAsyncOpIncompleteError("apimanagement.ServiceUpdateHostnameFuture") 8410 return 8411 } 8412 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 8413 if sr.Response.Response, err = future.GetResult(sender); err == nil && sr.Response.Response.StatusCode != http.StatusNoContent { 8414 sr, err = client.UpdateHostnameResponder(sr.Response.Response) 8415 if err != nil { 8416 err = autorest.NewErrorWithError(err, "apimanagement.ServiceUpdateHostnameFuture", "Result", sr.Response.Response, "Failure responding to request") 8417 } 8418 } 8419 return 8420} 8421 8422// ServiceUpdateHostnameParameters parameters supplied to the UpdateHostname operation. 8423type ServiceUpdateHostnameParameters struct { 8424 // Update - Hostnames to create or update. 8425 Update *[]HostnameConfigurationOld `json:"update,omitempty"` 8426 // Delete - Hostnames types to delete. 8427 Delete *[]HostnameType `json:"delete,omitempty"` 8428} 8429 8430// ServiceUpdateParameters parameter supplied to Update Api Management Service. 8431type ServiceUpdateParameters struct { 8432 // ServiceUpdateProperties - Properties of the API Management service. 8433 *ServiceUpdateProperties `json:"properties,omitempty"` 8434 // Sku - SKU properties of the API Management service. 8435 Sku *ServiceSkuProperties `json:"sku,omitempty"` 8436 // Identity - Managed service identity of the Api Management service. 8437 Identity *ServiceIdentity `json:"identity,omitempty"` 8438 // Etag - ETag of the resource. 8439 Etag *string `json:"etag,omitempty"` 8440 // ID - Resource ID. 8441 ID *string `json:"id,omitempty"` 8442 // Name - Resource name. 8443 Name *string `json:"name,omitempty"` 8444 // Type - Resource type for API Management resource is set to Microsoft.ApiManagement. 8445 Type *string `json:"type,omitempty"` 8446 // Tags - Resource tags. 8447 Tags map[string]*string `json:"tags"` 8448} 8449 8450// MarshalJSON is the custom marshaler for ServiceUpdateParameters. 8451func (sup ServiceUpdateParameters) MarshalJSON() ([]byte, error) { 8452 objectMap := make(map[string]interface{}) 8453 if sup.ServiceUpdateProperties != nil { 8454 objectMap["properties"] = sup.ServiceUpdateProperties 8455 } 8456 if sup.Sku != nil { 8457 objectMap["sku"] = sup.Sku 8458 } 8459 if sup.Identity != nil { 8460 objectMap["identity"] = sup.Identity 8461 } 8462 if sup.Etag != nil { 8463 objectMap["etag"] = sup.Etag 8464 } 8465 if sup.ID != nil { 8466 objectMap["id"] = sup.ID 8467 } 8468 if sup.Name != nil { 8469 objectMap["name"] = sup.Name 8470 } 8471 if sup.Type != nil { 8472 objectMap["type"] = sup.Type 8473 } 8474 if sup.Tags != nil { 8475 objectMap["tags"] = sup.Tags 8476 } 8477 return json.Marshal(objectMap) 8478} 8479 8480// UnmarshalJSON is the custom unmarshaler for ServiceUpdateParameters struct. 8481func (sup *ServiceUpdateParameters) UnmarshalJSON(body []byte) error { 8482 var m map[string]*json.RawMessage 8483 err := json.Unmarshal(body, &m) 8484 if err != nil { 8485 return err 8486 } 8487 for k, v := range m { 8488 switch k { 8489 case "properties": 8490 if v != nil { 8491 var serviceUpdateProperties ServiceUpdateProperties 8492 err = json.Unmarshal(*v, &serviceUpdateProperties) 8493 if err != nil { 8494 return err 8495 } 8496 sup.ServiceUpdateProperties = &serviceUpdateProperties 8497 } 8498 case "sku": 8499 if v != nil { 8500 var sku ServiceSkuProperties 8501 err = json.Unmarshal(*v, &sku) 8502 if err != nil { 8503 return err 8504 } 8505 sup.Sku = &sku 8506 } 8507 case "identity": 8508 if v != nil { 8509 var identity ServiceIdentity 8510 err = json.Unmarshal(*v, &identity) 8511 if err != nil { 8512 return err 8513 } 8514 sup.Identity = &identity 8515 } 8516 case "etag": 8517 if v != nil { 8518 var etag string 8519 err = json.Unmarshal(*v, &etag) 8520 if err != nil { 8521 return err 8522 } 8523 sup.Etag = &etag 8524 } 8525 case "id": 8526 if v != nil { 8527 var ID string 8528 err = json.Unmarshal(*v, &ID) 8529 if err != nil { 8530 return err 8531 } 8532 sup.ID = &ID 8533 } 8534 case "name": 8535 if v != nil { 8536 var name string 8537 err = json.Unmarshal(*v, &name) 8538 if err != nil { 8539 return err 8540 } 8541 sup.Name = &name 8542 } 8543 case "type": 8544 if v != nil { 8545 var typeVar string 8546 err = json.Unmarshal(*v, &typeVar) 8547 if err != nil { 8548 return err 8549 } 8550 sup.Type = &typeVar 8551 } 8552 case "tags": 8553 if v != nil { 8554 var tags map[string]*string 8555 err = json.Unmarshal(*v, &tags) 8556 if err != nil { 8557 return err 8558 } 8559 sup.Tags = tags 8560 } 8561 } 8562 } 8563 8564 return nil 8565} 8566 8567// ServiceUpdateProperties properties of an API Management service resource description. 8568type ServiceUpdateProperties struct { 8569 // PublisherEmail - Publisher email. 8570 PublisherEmail *string `json:"publisherEmail,omitempty"` 8571 // PublisherName - Publisher name. 8572 PublisherName *string `json:"publisherName,omitempty"` 8573 // NotificationSenderEmail - Email address from which the notification will be sent. 8574 NotificationSenderEmail *string `json:"notificationSenderEmail,omitempty"` 8575 // ProvisioningState - The current provisioning state of the API Management service which can be one of the following: Created/Activating/Succeeded/Updating/Failed/Stopped/Terminating/TerminationFailed/Deleted. 8576 ProvisioningState *string `json:"provisioningState,omitempty"` 8577 // TargetProvisioningState - The provisioning state of the API Management service, which is targeted by the long running operation started on the service. 8578 TargetProvisioningState *string `json:"targetProvisioningState,omitempty"` 8579 // CreatedAtUtc - Creation UTC date of the API Management service.The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. 8580 CreatedAtUtc *date.Time `json:"createdAtUtc,omitempty"` 8581 // GatewayURL - Gateway URL of the API Management service. 8582 GatewayURL *string `json:"gatewayUrl,omitempty"` 8583 // GatewayRegionalURL - Gateway URL of the API Management service in the Default Region. 8584 GatewayRegionalURL *string `json:"gatewayRegionalUrl,omitempty"` 8585 // PortalURL - Publisher portal endpoint Url of the API Management service. 8586 PortalURL *string `json:"portalUrl,omitempty"` 8587 // ManagementAPIURL - Management API endpoint URL of the API Management service. 8588 ManagementAPIURL *string `json:"managementApiUrl,omitempty"` 8589 // ScmURL - SCM endpoint URL of the API Management service. 8590 ScmURL *string `json:"scmUrl,omitempty"` 8591 // HostnameConfigurations - Custom hostname configuration of the API Management service. 8592 HostnameConfigurations *[]HostnameConfiguration `json:"hostnameConfigurations,omitempty"` 8593 // PublicIPAddresses - Public Static Load Balanced IP addresses of the API Management service in Primary region. Available only for Basic, Standard and Premium SKU. 8594 PublicIPAddresses *[]string `json:"publicIPAddresses,omitempty"` 8595 // PrivateIPAddresses - Private Static Load Balanced IP addresses of the API Management service in Primary region which is deployed in an Internal Virtual Network. Available only for Basic, Standard and Premium SKU. 8596 PrivateIPAddresses *[]string `json:"privateIPAddresses,omitempty"` 8597 // VirtualNetworkConfiguration - Virtual network configuration of the API Management service. 8598 VirtualNetworkConfiguration *VirtualNetworkConfiguration `json:"virtualNetworkConfiguration,omitempty"` 8599 // AdditionalLocations - Additional datacenter locations of the API Management service. 8600 AdditionalLocations *[]AdditionalLocation `json:"additionalLocations,omitempty"` 8601 // CustomProperties - Custom properties of the API Management service. Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TripleDes168` will disable the cipher TLS_RSA_WITH_3DES_EDE_CBC_SHA for all TLS(1.0, 1.1 and 1.2). Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls11` can be used to disable just TLS 1.1 and setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls10` can be used to disable TLS 1.0 on an API Management service. 8602 CustomProperties map[string]*string `json:"customProperties"` 8603 // Certificates - List of Certificates that need to be installed in the API Management service. Max supported certificates that can be installed is 10. 8604 Certificates *[]CertificateConfiguration `json:"certificates,omitempty"` 8605 // VirtualNetworkType - The type of VPN in which API Managemet service needs to be configured in. None (Default Value) means the API Management service is not part of any Virtual Network, External means the API Management deployment is set up inside a Virtual Network having an Internet Facing Endpoint, and Internal means that API Management deployment is setup inside a Virtual Network having an Intranet Facing Endpoint only. Possible values include: 'VirtualNetworkTypeNone', 'VirtualNetworkTypeExternal', 'VirtualNetworkTypeInternal' 8606 VirtualNetworkType VirtualNetworkType `json:"virtualNetworkType,omitempty"` 8607} 8608 8609// MarshalJSON is the custom marshaler for ServiceUpdateProperties. 8610func (sup ServiceUpdateProperties) MarshalJSON() ([]byte, error) { 8611 objectMap := make(map[string]interface{}) 8612 if sup.PublisherEmail != nil { 8613 objectMap["publisherEmail"] = sup.PublisherEmail 8614 } 8615 if sup.PublisherName != nil { 8616 objectMap["publisherName"] = sup.PublisherName 8617 } 8618 if sup.NotificationSenderEmail != nil { 8619 objectMap["notificationSenderEmail"] = sup.NotificationSenderEmail 8620 } 8621 if sup.ProvisioningState != nil { 8622 objectMap["provisioningState"] = sup.ProvisioningState 8623 } 8624 if sup.TargetProvisioningState != nil { 8625 objectMap["targetProvisioningState"] = sup.TargetProvisioningState 8626 } 8627 if sup.CreatedAtUtc != nil { 8628 objectMap["createdAtUtc"] = sup.CreatedAtUtc 8629 } 8630 if sup.GatewayURL != nil { 8631 objectMap["gatewayUrl"] = sup.GatewayURL 8632 } 8633 if sup.GatewayRegionalURL != nil { 8634 objectMap["gatewayRegionalUrl"] = sup.GatewayRegionalURL 8635 } 8636 if sup.PortalURL != nil { 8637 objectMap["portalUrl"] = sup.PortalURL 8638 } 8639 if sup.ManagementAPIURL != nil { 8640 objectMap["managementApiUrl"] = sup.ManagementAPIURL 8641 } 8642 if sup.ScmURL != nil { 8643 objectMap["scmUrl"] = sup.ScmURL 8644 } 8645 if sup.HostnameConfigurations != nil { 8646 objectMap["hostnameConfigurations"] = sup.HostnameConfigurations 8647 } 8648 if sup.PublicIPAddresses != nil { 8649 objectMap["publicIPAddresses"] = sup.PublicIPAddresses 8650 } 8651 if sup.PrivateIPAddresses != nil { 8652 objectMap["privateIPAddresses"] = sup.PrivateIPAddresses 8653 } 8654 if sup.VirtualNetworkConfiguration != nil { 8655 objectMap["virtualNetworkConfiguration"] = sup.VirtualNetworkConfiguration 8656 } 8657 if sup.AdditionalLocations != nil { 8658 objectMap["additionalLocations"] = sup.AdditionalLocations 8659 } 8660 if sup.CustomProperties != nil { 8661 objectMap["customProperties"] = sup.CustomProperties 8662 } 8663 if sup.Certificates != nil { 8664 objectMap["certificates"] = sup.Certificates 8665 } 8666 if sup.VirtualNetworkType != "" { 8667 objectMap["virtualNetworkType"] = sup.VirtualNetworkType 8668 } 8669 return json.Marshal(objectMap) 8670} 8671 8672// ServiceUploadCertificateParameters parameters supplied to the Upload SSL certificate for an API Management 8673// service operation. 8674type ServiceUploadCertificateParameters struct { 8675 // Type - Hostname type. Possible values include: 'Proxy', 'Portal', 'Management', 'Scm' 8676 Type HostnameType `json:"type,omitempty"` 8677 // Certificate - Base64 Encoded certificate. 8678 Certificate *string `json:"certificate,omitempty"` 8679 // CertificatePassword - Certificate password. 8680 CertificatePassword *string `json:"certificate_password,omitempty"` 8681} 8682 8683// SubscriptionCollection paged Subscriptions list representation. 8684type SubscriptionCollection struct { 8685 autorest.Response `json:"-"` 8686 // Value - Page values. 8687 Value *[]SubscriptionContract `json:"value,omitempty"` 8688 // NextLink - Next page link if any. 8689 NextLink *string `json:"nextLink,omitempty"` 8690} 8691 8692// SubscriptionCollectionIterator provides access to a complete listing of SubscriptionContract values. 8693type SubscriptionCollectionIterator struct { 8694 i int 8695 page SubscriptionCollectionPage 8696} 8697 8698// Next advances to the next value. If there was an error making 8699// the request the iterator does not advance and the error is returned. 8700func (iter *SubscriptionCollectionIterator) Next() error { 8701 iter.i++ 8702 if iter.i < len(iter.page.Values()) { 8703 return nil 8704 } 8705 err := iter.page.Next() 8706 if err != nil { 8707 iter.i-- 8708 return err 8709 } 8710 iter.i = 0 8711 return nil 8712} 8713 8714// NotDone returns true if the enumeration should be started or is not yet complete. 8715func (iter SubscriptionCollectionIterator) NotDone() bool { 8716 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 8717} 8718 8719// Response returns the raw server response from the last page request. 8720func (iter SubscriptionCollectionIterator) Response() SubscriptionCollection { 8721 return iter.page.Response() 8722} 8723 8724// Value returns the current value or a zero-initialized value if the 8725// iterator has advanced beyond the end of the collection. 8726func (iter SubscriptionCollectionIterator) Value() SubscriptionContract { 8727 if !iter.page.NotDone() { 8728 return SubscriptionContract{} 8729 } 8730 return iter.page.Values()[iter.i] 8731} 8732 8733// IsEmpty returns true if the ListResult contains no values. 8734func (sc SubscriptionCollection) IsEmpty() bool { 8735 return sc.Value == nil || len(*sc.Value) == 0 8736} 8737 8738// subscriptionCollectionPreparer prepares a request to retrieve the next set of results. 8739// It returns nil if no more results exist. 8740func (sc SubscriptionCollection) subscriptionCollectionPreparer() (*http.Request, error) { 8741 if sc.NextLink == nil || len(to.String(sc.NextLink)) < 1 { 8742 return nil, nil 8743 } 8744 return autorest.Prepare(&http.Request{}, 8745 autorest.AsJSON(), 8746 autorest.AsGet(), 8747 autorest.WithBaseURL(to.String(sc.NextLink))) 8748} 8749 8750// SubscriptionCollectionPage contains a page of SubscriptionContract values. 8751type SubscriptionCollectionPage struct { 8752 fn func(SubscriptionCollection) (SubscriptionCollection, error) 8753 sc SubscriptionCollection 8754} 8755 8756// Next advances to the next page of values. If there was an error making 8757// the request the page does not advance and the error is returned. 8758func (page *SubscriptionCollectionPage) Next() error { 8759 next, err := page.fn(page.sc) 8760 if err != nil { 8761 return err 8762 } 8763 page.sc = next 8764 return nil 8765} 8766 8767// NotDone returns true if the page enumeration should be started or is not yet complete. 8768func (page SubscriptionCollectionPage) NotDone() bool { 8769 return !page.sc.IsEmpty() 8770} 8771 8772// Response returns the raw server response from the last page request. 8773func (page SubscriptionCollectionPage) Response() SubscriptionCollection { 8774 return page.sc 8775} 8776 8777// Values returns the slice of values for the current page or nil if there are no values. 8778func (page SubscriptionCollectionPage) Values() []SubscriptionContract { 8779 if page.sc.IsEmpty() { 8780 return nil 8781 } 8782 return *page.sc.Value 8783} 8784 8785// SubscriptionContract subscription details. 8786type SubscriptionContract struct { 8787 autorest.Response `json:"-"` 8788 // SubscriptionContractProperties - Subscription contract properties. 8789 *SubscriptionContractProperties `json:"properties,omitempty"` 8790 // ID - Resource ID. 8791 ID *string `json:"id,omitempty"` 8792 // Name - Resource name. 8793 Name *string `json:"name,omitempty"` 8794 // Type - Resource type for API Management resource. 8795 Type *string `json:"type,omitempty"` 8796} 8797 8798// MarshalJSON is the custom marshaler for SubscriptionContract. 8799func (sc SubscriptionContract) MarshalJSON() ([]byte, error) { 8800 objectMap := make(map[string]interface{}) 8801 if sc.SubscriptionContractProperties != nil { 8802 objectMap["properties"] = sc.SubscriptionContractProperties 8803 } 8804 if sc.ID != nil { 8805 objectMap["id"] = sc.ID 8806 } 8807 if sc.Name != nil { 8808 objectMap["name"] = sc.Name 8809 } 8810 if sc.Type != nil { 8811 objectMap["type"] = sc.Type 8812 } 8813 return json.Marshal(objectMap) 8814} 8815 8816// UnmarshalJSON is the custom unmarshaler for SubscriptionContract struct. 8817func (sc *SubscriptionContract) UnmarshalJSON(body []byte) error { 8818 var m map[string]*json.RawMessage 8819 err := json.Unmarshal(body, &m) 8820 if err != nil { 8821 return err 8822 } 8823 for k, v := range m { 8824 switch k { 8825 case "properties": 8826 if v != nil { 8827 var subscriptionContractProperties SubscriptionContractProperties 8828 err = json.Unmarshal(*v, &subscriptionContractProperties) 8829 if err != nil { 8830 return err 8831 } 8832 sc.SubscriptionContractProperties = &subscriptionContractProperties 8833 } 8834 case "id": 8835 if v != nil { 8836 var ID string 8837 err = json.Unmarshal(*v, &ID) 8838 if err != nil { 8839 return err 8840 } 8841 sc.ID = &ID 8842 } 8843 case "name": 8844 if v != nil { 8845 var name string 8846 err = json.Unmarshal(*v, &name) 8847 if err != nil { 8848 return err 8849 } 8850 sc.Name = &name 8851 } 8852 case "type": 8853 if v != nil { 8854 var typeVar string 8855 err = json.Unmarshal(*v, &typeVar) 8856 if err != nil { 8857 return err 8858 } 8859 sc.Type = &typeVar 8860 } 8861 } 8862 } 8863 8864 return nil 8865} 8866 8867// SubscriptionContractProperties subscription details. 8868type SubscriptionContractProperties struct { 8869 // UserID - The user resource identifier of the subscription owner. The value is a valid relative URL in the format of /users/{uid} where {uid} is a user identifier. 8870 UserID *string `json:"userId,omitempty"` 8871 // ProductID - The product resource identifier of the subscribed product. The value is a valid relative URL in the format of /products/{productId} where {productId} is a product identifier. 8872 ProductID *string `json:"productId,omitempty"` 8873 // DisplayName - The name of the subscription, or null if the subscription has no name. 8874 DisplayName *string `json:"displayName,omitempty"` 8875 // State - Subscription state. Possible states are * active – the subscription is active, * suspended – the subscription is blocked, and the subscriber cannot call any APIs of the product, * submitted – the subscription request has been made by the developer, but has not yet been approved or rejected, * rejected – the subscription request has been denied by an administrator, * cancelled – the subscription has been cancelled by the developer or administrator, * expired – the subscription reached its expiration date and was deactivated. Possible values include: 'Suspended', 'Active', 'Expired', 'Submitted', 'Rejected', 'Cancelled' 8876 State SubscriptionState `json:"state,omitempty"` 8877 // CreatedDate - Subscription creation date. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. 8878 CreatedDate *date.Time `json:"createdDate,omitempty"` 8879 // StartDate - Subscription activation date. The setting is for audit purposes only and the subscription is not automatically activated. The subscription lifecycle can be managed by using the `state` property. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. 8880 StartDate *date.Time `json:"startDate,omitempty"` 8881 // ExpirationDate - Subscription expiration date. The setting is for audit purposes only and the subscription is not automatically expired. The subscription lifecycle can be managed by using the `state` property. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. 8882 ExpirationDate *date.Time `json:"expirationDate,omitempty"` 8883 // EndDate - Date when subscription was cancelled or expired. The setting is for audit purposes only and the subscription is not automatically cancelled. The subscription lifecycle can be managed by using the `state` property. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. 8884 EndDate *date.Time `json:"endDate,omitempty"` 8885 // NotificationDate - Upcoming subscription expiration notification date. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. 8886 NotificationDate *date.Time `json:"notificationDate,omitempty"` 8887 // PrimaryKey - Subscription primary key. 8888 PrimaryKey *string `json:"primaryKey,omitempty"` 8889 // SecondaryKey - Subscription secondary key. 8890 SecondaryKey *string `json:"secondaryKey,omitempty"` 8891 // StateComment - Optional subscription comment added by an administrator. 8892 StateComment *string `json:"stateComment,omitempty"` 8893} 8894 8895// SubscriptionCreateParameterProperties parameters supplied to the Create subscription operation. 8896type SubscriptionCreateParameterProperties struct { 8897 // UserID - User (user id path) for whom subscription is being created in form /users/{uid} 8898 UserID *string `json:"userId,omitempty"` 8899 // ProductID - Product (product id path) for which subscription is being created in form /products/{productid} 8900 ProductID *string `json:"productId,omitempty"` 8901 // DisplayName - Subscription name. 8902 DisplayName *string `json:"displayName,omitempty"` 8903 // PrimaryKey - Primary subscription key. If not specified during request key will be generated automatically. 8904 PrimaryKey *string `json:"primaryKey,omitempty"` 8905 // SecondaryKey - Secondary subscription key. If not specified during request key will be generated automatically. 8906 SecondaryKey *string `json:"secondaryKey,omitempty"` 8907 // State - Initial subscription state. If no value is specified, subscription is created with Submitted state. Possible states are * active – the subscription is active, * suspended – the subscription is blocked, and the subscriber cannot call any APIs of the product, * submitted – the subscription request has been made by the developer, but has not yet been approved or rejected, * rejected – the subscription request has been denied by an administrator, * cancelled – the subscription has been cancelled by the developer or administrator, * expired – the subscription reached its expiration date and was deactivated. Possible values include: 'Suspended', 'Active', 'Expired', 'Submitted', 'Rejected', 'Cancelled' 8908 State SubscriptionState `json:"state,omitempty"` 8909} 8910 8911// SubscriptionCreateParameters subscription create details. 8912type SubscriptionCreateParameters struct { 8913 // SubscriptionCreateParameterProperties - Subscription contract properties. 8914 *SubscriptionCreateParameterProperties `json:"properties,omitempty"` 8915} 8916 8917// MarshalJSON is the custom marshaler for SubscriptionCreateParameters. 8918func (scp SubscriptionCreateParameters) MarshalJSON() ([]byte, error) { 8919 objectMap := make(map[string]interface{}) 8920 if scp.SubscriptionCreateParameterProperties != nil { 8921 objectMap["properties"] = scp.SubscriptionCreateParameterProperties 8922 } 8923 return json.Marshal(objectMap) 8924} 8925 8926// UnmarshalJSON is the custom unmarshaler for SubscriptionCreateParameters struct. 8927func (scp *SubscriptionCreateParameters) UnmarshalJSON(body []byte) error { 8928 var m map[string]*json.RawMessage 8929 err := json.Unmarshal(body, &m) 8930 if err != nil { 8931 return err 8932 } 8933 for k, v := range m { 8934 switch k { 8935 case "properties": 8936 if v != nil { 8937 var subscriptionCreateParameterProperties SubscriptionCreateParameterProperties 8938 err = json.Unmarshal(*v, &subscriptionCreateParameterProperties) 8939 if err != nil { 8940 return err 8941 } 8942 scp.SubscriptionCreateParameterProperties = &subscriptionCreateParameterProperties 8943 } 8944 } 8945 } 8946 8947 return nil 8948} 8949 8950// SubscriptionKeyParameterNamesContract subscription key parameter names details. 8951type SubscriptionKeyParameterNamesContract struct { 8952 // Header - Subscription key header name. 8953 Header *string `json:"header,omitempty"` 8954 // Query - Subscription key query string parameter name. 8955 Query *string `json:"query,omitempty"` 8956} 8957 8958// SubscriptionsDelegationSettingsProperties subscriptions delegation settings properties. 8959type SubscriptionsDelegationSettingsProperties struct { 8960 // Enabled - Enable or disable delegation for subscriptions. 8961 Enabled *bool `json:"enabled,omitempty"` 8962} 8963 8964// SubscriptionUpdateParameterProperties parameters supplied to the Update subscription operation. 8965type SubscriptionUpdateParameterProperties struct { 8966 // UserID - User identifier path: /users/{uid} 8967 UserID *string `json:"userId,omitempty"` 8968 // ProductID - Product identifier path: /products/{productId} 8969 ProductID *string `json:"productId,omitempty"` 8970 // ExpirationDate - Subscription expiration date. The setting is for audit purposes only and the subscription is not automatically expired. The subscription lifecycle can be managed by using the `state` property. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. 8971 ExpirationDate *date.Time `json:"expirationDate,omitempty"` 8972 // DisplayName - Subscription name. 8973 DisplayName *string `json:"displayName,omitempty"` 8974 // PrimaryKey - Primary subscription key. 8975 PrimaryKey *string `json:"primaryKey,omitempty"` 8976 // SecondaryKey - Secondary subscription key. 8977 SecondaryKey *string `json:"secondaryKey,omitempty"` 8978 // State - Subscription state. Possible states are * active – the subscription is active, * suspended – the subscription is blocked, and the subscriber cannot call any APIs of the product, * submitted – the subscription request has been made by the developer, but has not yet been approved or rejected, * rejected – the subscription request has been denied by an administrator, * cancelled – the subscription has been cancelled by the developer or administrator, * expired – the subscription reached its expiration date and was deactivated. Possible values include: 'Suspended', 'Active', 'Expired', 'Submitted', 'Rejected', 'Cancelled' 8979 State SubscriptionState `json:"state,omitempty"` 8980 // StateComment - Comments describing subscription state change by the administrator. 8981 StateComment *string `json:"stateComment,omitempty"` 8982} 8983 8984// SubscriptionUpdateParameters subscription update details. 8985type SubscriptionUpdateParameters struct { 8986 // SubscriptionUpdateParameterProperties - Subscription Update contract properties. 8987 *SubscriptionUpdateParameterProperties `json:"properties,omitempty"` 8988} 8989 8990// MarshalJSON is the custom marshaler for SubscriptionUpdateParameters. 8991func (sup SubscriptionUpdateParameters) MarshalJSON() ([]byte, error) { 8992 objectMap := make(map[string]interface{}) 8993 if sup.SubscriptionUpdateParameterProperties != nil { 8994 objectMap["properties"] = sup.SubscriptionUpdateParameterProperties 8995 } 8996 return json.Marshal(objectMap) 8997} 8998 8999// UnmarshalJSON is the custom unmarshaler for SubscriptionUpdateParameters struct. 9000func (sup *SubscriptionUpdateParameters) UnmarshalJSON(body []byte) error { 9001 var m map[string]*json.RawMessage 9002 err := json.Unmarshal(body, &m) 9003 if err != nil { 9004 return err 9005 } 9006 for k, v := range m { 9007 switch k { 9008 case "properties": 9009 if v != nil { 9010 var subscriptionUpdateParameterProperties SubscriptionUpdateParameterProperties 9011 err = json.Unmarshal(*v, &subscriptionUpdateParameterProperties) 9012 if err != nil { 9013 return err 9014 } 9015 sup.SubscriptionUpdateParameterProperties = &subscriptionUpdateParameterProperties 9016 } 9017 } 9018 } 9019 9020 return nil 9021} 9022 9023// TagCollection paged Tag list representation. 9024type TagCollection struct { 9025 autorest.Response `json:"-"` 9026 // Value - Page values. 9027 Value *[]TagContract `json:"value,omitempty"` 9028 // NextLink - Next page link if any. 9029 NextLink *string `json:"nextLink,omitempty"` 9030} 9031 9032// TagCollectionIterator provides access to a complete listing of TagContract values. 9033type TagCollectionIterator struct { 9034 i int 9035 page TagCollectionPage 9036} 9037 9038// Next advances to the next value. If there was an error making 9039// the request the iterator does not advance and the error is returned. 9040func (iter *TagCollectionIterator) Next() error { 9041 iter.i++ 9042 if iter.i < len(iter.page.Values()) { 9043 return nil 9044 } 9045 err := iter.page.Next() 9046 if err != nil { 9047 iter.i-- 9048 return err 9049 } 9050 iter.i = 0 9051 return nil 9052} 9053 9054// NotDone returns true if the enumeration should be started or is not yet complete. 9055func (iter TagCollectionIterator) NotDone() bool { 9056 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 9057} 9058 9059// Response returns the raw server response from the last page request. 9060func (iter TagCollectionIterator) Response() TagCollection { 9061 return iter.page.Response() 9062} 9063 9064// Value returns the current value or a zero-initialized value if the 9065// iterator has advanced beyond the end of the collection. 9066func (iter TagCollectionIterator) Value() TagContract { 9067 if !iter.page.NotDone() { 9068 return TagContract{} 9069 } 9070 return iter.page.Values()[iter.i] 9071} 9072 9073// IsEmpty returns true if the ListResult contains no values. 9074func (tc TagCollection) IsEmpty() bool { 9075 return tc.Value == nil || len(*tc.Value) == 0 9076} 9077 9078// tagCollectionPreparer prepares a request to retrieve the next set of results. 9079// It returns nil if no more results exist. 9080func (tc TagCollection) tagCollectionPreparer() (*http.Request, error) { 9081 if tc.NextLink == nil || len(to.String(tc.NextLink)) < 1 { 9082 return nil, nil 9083 } 9084 return autorest.Prepare(&http.Request{}, 9085 autorest.AsJSON(), 9086 autorest.AsGet(), 9087 autorest.WithBaseURL(to.String(tc.NextLink))) 9088} 9089 9090// TagCollectionPage contains a page of TagContract values. 9091type TagCollectionPage struct { 9092 fn func(TagCollection) (TagCollection, error) 9093 tc TagCollection 9094} 9095 9096// Next advances to the next page of values. If there was an error making 9097// the request the page does not advance and the error is returned. 9098func (page *TagCollectionPage) Next() error { 9099 next, err := page.fn(page.tc) 9100 if err != nil { 9101 return err 9102 } 9103 page.tc = next 9104 return nil 9105} 9106 9107// NotDone returns true if the page enumeration should be started or is not yet complete. 9108func (page TagCollectionPage) NotDone() bool { 9109 return !page.tc.IsEmpty() 9110} 9111 9112// Response returns the raw server response from the last page request. 9113func (page TagCollectionPage) Response() TagCollection { 9114 return page.tc 9115} 9116 9117// Values returns the slice of values for the current page or nil if there are no values. 9118func (page TagCollectionPage) Values() []TagContract { 9119 if page.tc.IsEmpty() { 9120 return nil 9121 } 9122 return *page.tc.Value 9123} 9124 9125// TagContract tag Contract details. 9126type TagContract struct { 9127 autorest.Response `json:"-"` 9128 // TagContractProperties - Tag entity contract properties. 9129 *TagContractProperties `json:"properties,omitempty"` 9130 // ID - Resource ID. 9131 ID *string `json:"id,omitempty"` 9132 // Name - Resource name. 9133 Name *string `json:"name,omitempty"` 9134 // Type - Resource type for API Management resource. 9135 Type *string `json:"type,omitempty"` 9136} 9137 9138// MarshalJSON is the custom marshaler for TagContract. 9139func (tc TagContract) MarshalJSON() ([]byte, error) { 9140 objectMap := make(map[string]interface{}) 9141 if tc.TagContractProperties != nil { 9142 objectMap["properties"] = tc.TagContractProperties 9143 } 9144 if tc.ID != nil { 9145 objectMap["id"] = tc.ID 9146 } 9147 if tc.Name != nil { 9148 objectMap["name"] = tc.Name 9149 } 9150 if tc.Type != nil { 9151 objectMap["type"] = tc.Type 9152 } 9153 return json.Marshal(objectMap) 9154} 9155 9156// UnmarshalJSON is the custom unmarshaler for TagContract struct. 9157func (tc *TagContract) UnmarshalJSON(body []byte) error { 9158 var m map[string]*json.RawMessage 9159 err := json.Unmarshal(body, &m) 9160 if err != nil { 9161 return err 9162 } 9163 for k, v := range m { 9164 switch k { 9165 case "properties": 9166 if v != nil { 9167 var tagContractProperties TagContractProperties 9168 err = json.Unmarshal(*v, &tagContractProperties) 9169 if err != nil { 9170 return err 9171 } 9172 tc.TagContractProperties = &tagContractProperties 9173 } 9174 case "id": 9175 if v != nil { 9176 var ID string 9177 err = json.Unmarshal(*v, &ID) 9178 if err != nil { 9179 return err 9180 } 9181 tc.ID = &ID 9182 } 9183 case "name": 9184 if v != nil { 9185 var name string 9186 err = json.Unmarshal(*v, &name) 9187 if err != nil { 9188 return err 9189 } 9190 tc.Name = &name 9191 } 9192 case "type": 9193 if v != nil { 9194 var typeVar string 9195 err = json.Unmarshal(*v, &typeVar) 9196 if err != nil { 9197 return err 9198 } 9199 tc.Type = &typeVar 9200 } 9201 } 9202 } 9203 9204 return nil 9205} 9206 9207// TagContractProperties tag contract Properties. 9208type TagContractProperties struct { 9209 // DisplayName - Tag name. 9210 DisplayName *string `json:"displayName,omitempty"` 9211} 9212 9213// TagCreateUpdateParameters parameters supplied to Create/Update Tag operations. 9214type TagCreateUpdateParameters struct { 9215 // TagContractProperties - Properties supplied to Create Tag operation. 9216 *TagContractProperties `json:"properties,omitempty"` 9217} 9218 9219// MarshalJSON is the custom marshaler for TagCreateUpdateParameters. 9220func (tcup TagCreateUpdateParameters) MarshalJSON() ([]byte, error) { 9221 objectMap := make(map[string]interface{}) 9222 if tcup.TagContractProperties != nil { 9223 objectMap["properties"] = tcup.TagContractProperties 9224 } 9225 return json.Marshal(objectMap) 9226} 9227 9228// UnmarshalJSON is the custom unmarshaler for TagCreateUpdateParameters struct. 9229func (tcup *TagCreateUpdateParameters) UnmarshalJSON(body []byte) error { 9230 var m map[string]*json.RawMessage 9231 err := json.Unmarshal(body, &m) 9232 if err != nil { 9233 return err 9234 } 9235 for k, v := range m { 9236 switch k { 9237 case "properties": 9238 if v != nil { 9239 var tagContractProperties TagContractProperties 9240 err = json.Unmarshal(*v, &tagContractProperties) 9241 if err != nil { 9242 return err 9243 } 9244 tcup.TagContractProperties = &tagContractProperties 9245 } 9246 } 9247 } 9248 9249 return nil 9250} 9251 9252// TagDescriptionBaseProperties parameters supplied to the Create TagDescription operation. 9253type TagDescriptionBaseProperties struct { 9254 // Description - Description of the Tag. 9255 Description *string `json:"description,omitempty"` 9256 // ExternalDocsURL - Absolute URL of external resources describing the tag. 9257 ExternalDocsURL *string `json:"externalDocsUrl,omitempty"` 9258 // ExternalDocsDescription - Description of the external resources describing the tag. 9259 ExternalDocsDescription *string `json:"externalDocsDescription,omitempty"` 9260} 9261 9262// TagDescriptionCollection paged TagDescription list representation. 9263type TagDescriptionCollection struct { 9264 autorest.Response `json:"-"` 9265 // Value - Page values. 9266 Value *[]TagDescriptionContract `json:"value,omitempty"` 9267 // NextLink - Next page link if any. 9268 NextLink *string `json:"nextLink,omitempty"` 9269} 9270 9271// TagDescriptionCollectionIterator provides access to a complete listing of TagDescriptionContract values. 9272type TagDescriptionCollectionIterator struct { 9273 i int 9274 page TagDescriptionCollectionPage 9275} 9276 9277// Next advances to the next value. If there was an error making 9278// the request the iterator does not advance and the error is returned. 9279func (iter *TagDescriptionCollectionIterator) Next() error { 9280 iter.i++ 9281 if iter.i < len(iter.page.Values()) { 9282 return nil 9283 } 9284 err := iter.page.Next() 9285 if err != nil { 9286 iter.i-- 9287 return err 9288 } 9289 iter.i = 0 9290 return nil 9291} 9292 9293// NotDone returns true if the enumeration should be started or is not yet complete. 9294func (iter TagDescriptionCollectionIterator) NotDone() bool { 9295 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 9296} 9297 9298// Response returns the raw server response from the last page request. 9299func (iter TagDescriptionCollectionIterator) Response() TagDescriptionCollection { 9300 return iter.page.Response() 9301} 9302 9303// Value returns the current value or a zero-initialized value if the 9304// iterator has advanced beyond the end of the collection. 9305func (iter TagDescriptionCollectionIterator) Value() TagDescriptionContract { 9306 if !iter.page.NotDone() { 9307 return TagDescriptionContract{} 9308 } 9309 return iter.page.Values()[iter.i] 9310} 9311 9312// IsEmpty returns true if the ListResult contains no values. 9313func (tdc TagDescriptionCollection) IsEmpty() bool { 9314 return tdc.Value == nil || len(*tdc.Value) == 0 9315} 9316 9317// tagDescriptionCollectionPreparer prepares a request to retrieve the next set of results. 9318// It returns nil if no more results exist. 9319func (tdc TagDescriptionCollection) tagDescriptionCollectionPreparer() (*http.Request, error) { 9320 if tdc.NextLink == nil || len(to.String(tdc.NextLink)) < 1 { 9321 return nil, nil 9322 } 9323 return autorest.Prepare(&http.Request{}, 9324 autorest.AsJSON(), 9325 autorest.AsGet(), 9326 autorest.WithBaseURL(to.String(tdc.NextLink))) 9327} 9328 9329// TagDescriptionCollectionPage contains a page of TagDescriptionContract values. 9330type TagDescriptionCollectionPage struct { 9331 fn func(TagDescriptionCollection) (TagDescriptionCollection, error) 9332 tdc TagDescriptionCollection 9333} 9334 9335// Next advances to the next page of values. If there was an error making 9336// the request the page does not advance and the error is returned. 9337func (page *TagDescriptionCollectionPage) Next() error { 9338 next, err := page.fn(page.tdc) 9339 if err != nil { 9340 return err 9341 } 9342 page.tdc = next 9343 return nil 9344} 9345 9346// NotDone returns true if the page enumeration should be started or is not yet complete. 9347func (page TagDescriptionCollectionPage) NotDone() bool { 9348 return !page.tdc.IsEmpty() 9349} 9350 9351// Response returns the raw server response from the last page request. 9352func (page TagDescriptionCollectionPage) Response() TagDescriptionCollection { 9353 return page.tdc 9354} 9355 9356// Values returns the slice of values for the current page or nil if there are no values. 9357func (page TagDescriptionCollectionPage) Values() []TagDescriptionContract { 9358 if page.tdc.IsEmpty() { 9359 return nil 9360 } 9361 return *page.tdc.Value 9362} 9363 9364// TagDescriptionContract contract details. 9365type TagDescriptionContract struct { 9366 autorest.Response `json:"-"` 9367 // TagDescriptionContractProperties - TagDescription entity contract properties. 9368 *TagDescriptionContractProperties `json:"properties,omitempty"` 9369 // ID - Resource ID. 9370 ID *string `json:"id,omitempty"` 9371 // Name - Resource name. 9372 Name *string `json:"name,omitempty"` 9373 // Type - Resource type for API Management resource. 9374 Type *string `json:"type,omitempty"` 9375} 9376 9377// MarshalJSON is the custom marshaler for TagDescriptionContract. 9378func (tdc TagDescriptionContract) MarshalJSON() ([]byte, error) { 9379 objectMap := make(map[string]interface{}) 9380 if tdc.TagDescriptionContractProperties != nil { 9381 objectMap["properties"] = tdc.TagDescriptionContractProperties 9382 } 9383 if tdc.ID != nil { 9384 objectMap["id"] = tdc.ID 9385 } 9386 if tdc.Name != nil { 9387 objectMap["name"] = tdc.Name 9388 } 9389 if tdc.Type != nil { 9390 objectMap["type"] = tdc.Type 9391 } 9392 return json.Marshal(objectMap) 9393} 9394 9395// UnmarshalJSON is the custom unmarshaler for TagDescriptionContract struct. 9396func (tdc *TagDescriptionContract) UnmarshalJSON(body []byte) error { 9397 var m map[string]*json.RawMessage 9398 err := json.Unmarshal(body, &m) 9399 if err != nil { 9400 return err 9401 } 9402 for k, v := range m { 9403 switch k { 9404 case "properties": 9405 if v != nil { 9406 var tagDescriptionContractProperties TagDescriptionContractProperties 9407 err = json.Unmarshal(*v, &tagDescriptionContractProperties) 9408 if err != nil { 9409 return err 9410 } 9411 tdc.TagDescriptionContractProperties = &tagDescriptionContractProperties 9412 } 9413 case "id": 9414 if v != nil { 9415 var ID string 9416 err = json.Unmarshal(*v, &ID) 9417 if err != nil { 9418 return err 9419 } 9420 tdc.ID = &ID 9421 } 9422 case "name": 9423 if v != nil { 9424 var name string 9425 err = json.Unmarshal(*v, &name) 9426 if err != nil { 9427 return err 9428 } 9429 tdc.Name = &name 9430 } 9431 case "type": 9432 if v != nil { 9433 var typeVar string 9434 err = json.Unmarshal(*v, &typeVar) 9435 if err != nil { 9436 return err 9437 } 9438 tdc.Type = &typeVar 9439 } 9440 } 9441 } 9442 9443 return nil 9444} 9445 9446// TagDescriptionContractProperties tagDescription contract Properties. 9447type TagDescriptionContractProperties struct { 9448 // DisplayName - Tag name. 9449 DisplayName *string `json:"displayName,omitempty"` 9450 // Description - Description of the Tag. 9451 Description *string `json:"description,omitempty"` 9452 // ExternalDocsURL - Absolute URL of external resources describing the tag. 9453 ExternalDocsURL *string `json:"externalDocsUrl,omitempty"` 9454 // ExternalDocsDescription - Description of the external resources describing the tag. 9455 ExternalDocsDescription *string `json:"externalDocsDescription,omitempty"` 9456} 9457 9458// TagDescriptionCreateParameters parameters supplied to the Create TagDescription operation. 9459type TagDescriptionCreateParameters struct { 9460 // TagDescriptionBaseProperties - Properties supplied to Create TagDescription operation. 9461 *TagDescriptionBaseProperties `json:"properties,omitempty"` 9462} 9463 9464// MarshalJSON is the custom marshaler for TagDescriptionCreateParameters. 9465func (tdcp TagDescriptionCreateParameters) MarshalJSON() ([]byte, error) { 9466 objectMap := make(map[string]interface{}) 9467 if tdcp.TagDescriptionBaseProperties != nil { 9468 objectMap["properties"] = tdcp.TagDescriptionBaseProperties 9469 } 9470 return json.Marshal(objectMap) 9471} 9472 9473// UnmarshalJSON is the custom unmarshaler for TagDescriptionCreateParameters struct. 9474func (tdcp *TagDescriptionCreateParameters) UnmarshalJSON(body []byte) error { 9475 var m map[string]*json.RawMessage 9476 err := json.Unmarshal(body, &m) 9477 if err != nil { 9478 return err 9479 } 9480 for k, v := range m { 9481 switch k { 9482 case "properties": 9483 if v != nil { 9484 var tagDescriptionBaseProperties TagDescriptionBaseProperties 9485 err = json.Unmarshal(*v, &tagDescriptionBaseProperties) 9486 if err != nil { 9487 return err 9488 } 9489 tdcp.TagDescriptionBaseProperties = &tagDescriptionBaseProperties 9490 } 9491 } 9492 } 9493 9494 return nil 9495} 9496 9497// TagResourceCollection paged Tag list representation. 9498type TagResourceCollection struct { 9499 autorest.Response `json:"-"` 9500 // Value - Page values. 9501 Value *[]TagResourceContract `json:"value,omitempty"` 9502 // Count - Total record count number across all pages. 9503 Count *int64 `json:"count,omitempty"` 9504 // NextLink - Next page link if any. 9505 NextLink *string `json:"nextLink,omitempty"` 9506} 9507 9508// TagResourceCollectionIterator provides access to a complete listing of TagResourceContract values. 9509type TagResourceCollectionIterator struct { 9510 i int 9511 page TagResourceCollectionPage 9512} 9513 9514// Next advances to the next value. If there was an error making 9515// the request the iterator does not advance and the error is returned. 9516func (iter *TagResourceCollectionIterator) Next() error { 9517 iter.i++ 9518 if iter.i < len(iter.page.Values()) { 9519 return nil 9520 } 9521 err := iter.page.Next() 9522 if err != nil { 9523 iter.i-- 9524 return err 9525 } 9526 iter.i = 0 9527 return nil 9528} 9529 9530// NotDone returns true if the enumeration should be started or is not yet complete. 9531func (iter TagResourceCollectionIterator) NotDone() bool { 9532 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 9533} 9534 9535// Response returns the raw server response from the last page request. 9536func (iter TagResourceCollectionIterator) Response() TagResourceCollection { 9537 return iter.page.Response() 9538} 9539 9540// Value returns the current value or a zero-initialized value if the 9541// iterator has advanced beyond the end of the collection. 9542func (iter TagResourceCollectionIterator) Value() TagResourceContract { 9543 if !iter.page.NotDone() { 9544 return TagResourceContract{} 9545 } 9546 return iter.page.Values()[iter.i] 9547} 9548 9549// IsEmpty returns true if the ListResult contains no values. 9550func (trc TagResourceCollection) IsEmpty() bool { 9551 return trc.Value == nil || len(*trc.Value) == 0 9552} 9553 9554// tagResourceCollectionPreparer prepares a request to retrieve the next set of results. 9555// It returns nil if no more results exist. 9556func (trc TagResourceCollection) tagResourceCollectionPreparer() (*http.Request, error) { 9557 if trc.NextLink == nil || len(to.String(trc.NextLink)) < 1 { 9558 return nil, nil 9559 } 9560 return autorest.Prepare(&http.Request{}, 9561 autorest.AsJSON(), 9562 autorest.AsGet(), 9563 autorest.WithBaseURL(to.String(trc.NextLink))) 9564} 9565 9566// TagResourceCollectionPage contains a page of TagResourceContract values. 9567type TagResourceCollectionPage struct { 9568 fn func(TagResourceCollection) (TagResourceCollection, error) 9569 trc TagResourceCollection 9570} 9571 9572// Next advances to the next page of values. If there was an error making 9573// the request the page does not advance and the error is returned. 9574func (page *TagResourceCollectionPage) Next() error { 9575 next, err := page.fn(page.trc) 9576 if err != nil { 9577 return err 9578 } 9579 page.trc = next 9580 return nil 9581} 9582 9583// NotDone returns true if the page enumeration should be started or is not yet complete. 9584func (page TagResourceCollectionPage) NotDone() bool { 9585 return !page.trc.IsEmpty() 9586} 9587 9588// Response returns the raw server response from the last page request. 9589func (page TagResourceCollectionPage) Response() TagResourceCollection { 9590 return page.trc 9591} 9592 9593// Values returns the slice of values for the current page or nil if there are no values. 9594func (page TagResourceCollectionPage) Values() []TagResourceContract { 9595 if page.trc.IsEmpty() { 9596 return nil 9597 } 9598 return *page.trc.Value 9599} 9600 9601// TagResourceContract tagResource contract properties. 9602type TagResourceContract struct { 9603 // Tag - Tag associated with the resource. 9604 Tag *TagTagResourceContractProperties `json:"tag,omitempty"` 9605 // API - Api associated with the tag. 9606 API *APITagResourceContractProperties `json:"api,omitempty"` 9607 // Operation - Operation associated with the tag. 9608 Operation *OperationTagResourceContractProperties `json:"operation,omitempty"` 9609 // Product - Product associated with the tag. 9610 Product *ProductTagResourceContractProperties `json:"product,omitempty"` 9611} 9612 9613// TagTagResourceContractProperties contract defining the Tag property in the Tag Resource Contract 9614type TagTagResourceContractProperties struct { 9615 // ID - Tag identifier 9616 ID *string `json:"id,omitempty"` 9617 // Name - Tag Name 9618 Name *string `json:"name,omitempty"` 9619} 9620 9621// TenantConfigurationDeployFuture an abstraction for monitoring and retrieving the results of a long-running 9622// operation. 9623type TenantConfigurationDeployFuture struct { 9624 azure.Future 9625} 9626 9627// Result returns the result of the asynchronous operation. 9628// If the operation has not completed it will return an error. 9629func (future *TenantConfigurationDeployFuture) Result(client TenantConfigurationClient) (orc OperationResultContract, err error) { 9630 var done bool 9631 done, err = future.Done(client) 9632 if err != nil { 9633 err = autorest.NewErrorWithError(err, "apimanagement.TenantConfigurationDeployFuture", "Result", future.Response(), "Polling failure") 9634 return 9635 } 9636 if !done { 9637 err = azure.NewAsyncOpIncompleteError("apimanagement.TenantConfigurationDeployFuture") 9638 return 9639 } 9640 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 9641 if orc.Response.Response, err = future.GetResult(sender); err == nil && orc.Response.Response.StatusCode != http.StatusNoContent { 9642 orc, err = client.DeployResponder(orc.Response.Response) 9643 if err != nil { 9644 err = autorest.NewErrorWithError(err, "apimanagement.TenantConfigurationDeployFuture", "Result", orc.Response.Response, "Failure responding to request") 9645 } 9646 } 9647 return 9648} 9649 9650// TenantConfigurationSaveFuture an abstraction for monitoring and retrieving the results of a long-running 9651// operation. 9652type TenantConfigurationSaveFuture struct { 9653 azure.Future 9654} 9655 9656// Result returns the result of the asynchronous operation. 9657// If the operation has not completed it will return an error. 9658func (future *TenantConfigurationSaveFuture) Result(client TenantConfigurationClient) (orc OperationResultContract, err error) { 9659 var done bool 9660 done, err = future.Done(client) 9661 if err != nil { 9662 err = autorest.NewErrorWithError(err, "apimanagement.TenantConfigurationSaveFuture", "Result", future.Response(), "Polling failure") 9663 return 9664 } 9665 if !done { 9666 err = azure.NewAsyncOpIncompleteError("apimanagement.TenantConfigurationSaveFuture") 9667 return 9668 } 9669 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 9670 if orc.Response.Response, err = future.GetResult(sender); err == nil && orc.Response.Response.StatusCode != http.StatusNoContent { 9671 orc, err = client.SaveResponder(orc.Response.Response) 9672 if err != nil { 9673 err = autorest.NewErrorWithError(err, "apimanagement.TenantConfigurationSaveFuture", "Result", orc.Response.Response, "Failure responding to request") 9674 } 9675 } 9676 return 9677} 9678 9679// TenantConfigurationSyncStateContract tenant Configuration Synchronization State. 9680type TenantConfigurationSyncStateContract struct { 9681 autorest.Response `json:"-"` 9682 // Branch - The name of Git branch. 9683 Branch *string `json:"branch,omitempty"` 9684 // CommitID - The latest commit Id. 9685 CommitID *string `json:"commitId,omitempty"` 9686 // IsExport - value indicating if last sync was save (true) or deploy (false) operation. 9687 IsExport *bool `json:"isExport,omitempty"` 9688 // IsSynced - value indicating if last synchronization was later than the configuration change. 9689 IsSynced *bool `json:"isSynced,omitempty"` 9690 // IsGitEnabled - value indicating whether Git configuration access is enabled. 9691 IsGitEnabled *bool `json:"isGitEnabled,omitempty"` 9692 // SyncDate - The date of the latest synchronization. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. 9693 SyncDate *date.Time `json:"syncDate,omitempty"` 9694 // ConfigurationChangeDate - The date of the latest configuration change. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. 9695 ConfigurationChangeDate *date.Time `json:"configurationChangeDate,omitempty"` 9696} 9697 9698// TenantConfigurationValidateFuture an abstraction for monitoring and retrieving the results of a long-running 9699// operation. 9700type TenantConfigurationValidateFuture struct { 9701 azure.Future 9702} 9703 9704// Result returns the result of the asynchronous operation. 9705// If the operation has not completed it will return an error. 9706func (future *TenantConfigurationValidateFuture) Result(client TenantConfigurationClient) (orc OperationResultContract, err error) { 9707 var done bool 9708 done, err = future.Done(client) 9709 if err != nil { 9710 err = autorest.NewErrorWithError(err, "apimanagement.TenantConfigurationValidateFuture", "Result", future.Response(), "Polling failure") 9711 return 9712 } 9713 if !done { 9714 err = azure.NewAsyncOpIncompleteError("apimanagement.TenantConfigurationValidateFuture") 9715 return 9716 } 9717 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 9718 if orc.Response.Response, err = future.GetResult(sender); err == nil && orc.Response.Response.StatusCode != http.StatusNoContent { 9719 orc, err = client.ValidateResponder(orc.Response.Response) 9720 if err != nil { 9721 err = autorest.NewErrorWithError(err, "apimanagement.TenantConfigurationValidateFuture", "Result", orc.Response.Response, "Failure responding to request") 9722 } 9723 } 9724 return 9725} 9726 9727// TermsOfServiceProperties terms of service contract properties. 9728type TermsOfServiceProperties struct { 9729 // Text - A terms of service text. 9730 Text *string `json:"text,omitempty"` 9731 // Enabled - Display terms of service during a sign-up process. 9732 Enabled *bool `json:"enabled,omitempty"` 9733 // ConsentRequired - Ask user for consent to the terms of service. 9734 ConsentRequired *bool `json:"consentRequired,omitempty"` 9735} 9736 9737// TokenBodyParameterContract oAuth acquire token request body parameter (www-url-form-encoded). 9738type TokenBodyParameterContract struct { 9739 // Name - body parameter name. 9740 Name *string `json:"name,omitempty"` 9741 // Value - body parameter value. 9742 Value *string `json:"value,omitempty"` 9743} 9744 9745// UserCollection paged Users list representation. 9746type UserCollection struct { 9747 autorest.Response `json:"-"` 9748 // Value - Page values. 9749 Value *[]UserContract `json:"value,omitempty"` 9750 // NextLink - Next page link if any. 9751 NextLink *string `json:"nextLink,omitempty"` 9752} 9753 9754// UserCollectionIterator provides access to a complete listing of UserContract values. 9755type UserCollectionIterator struct { 9756 i int 9757 page UserCollectionPage 9758} 9759 9760// Next advances to the next value. If there was an error making 9761// the request the iterator does not advance and the error is returned. 9762func (iter *UserCollectionIterator) Next() error { 9763 iter.i++ 9764 if iter.i < len(iter.page.Values()) { 9765 return nil 9766 } 9767 err := iter.page.Next() 9768 if err != nil { 9769 iter.i-- 9770 return err 9771 } 9772 iter.i = 0 9773 return nil 9774} 9775 9776// NotDone returns true if the enumeration should be started or is not yet complete. 9777func (iter UserCollectionIterator) NotDone() bool { 9778 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 9779} 9780 9781// Response returns the raw server response from the last page request. 9782func (iter UserCollectionIterator) Response() UserCollection { 9783 return iter.page.Response() 9784} 9785 9786// Value returns the current value or a zero-initialized value if the 9787// iterator has advanced beyond the end of the collection. 9788func (iter UserCollectionIterator) Value() UserContract { 9789 if !iter.page.NotDone() { 9790 return UserContract{} 9791 } 9792 return iter.page.Values()[iter.i] 9793} 9794 9795// IsEmpty returns true if the ListResult contains no values. 9796func (uc UserCollection) IsEmpty() bool { 9797 return uc.Value == nil || len(*uc.Value) == 0 9798} 9799 9800// userCollectionPreparer prepares a request to retrieve the next set of results. 9801// It returns nil if no more results exist. 9802func (uc UserCollection) userCollectionPreparer() (*http.Request, error) { 9803 if uc.NextLink == nil || len(to.String(uc.NextLink)) < 1 { 9804 return nil, nil 9805 } 9806 return autorest.Prepare(&http.Request{}, 9807 autorest.AsJSON(), 9808 autorest.AsGet(), 9809 autorest.WithBaseURL(to.String(uc.NextLink))) 9810} 9811 9812// UserCollectionPage contains a page of UserContract values. 9813type UserCollectionPage struct { 9814 fn func(UserCollection) (UserCollection, error) 9815 uc UserCollection 9816} 9817 9818// Next advances to the next page of values. If there was an error making 9819// the request the page does not advance and the error is returned. 9820func (page *UserCollectionPage) Next() error { 9821 next, err := page.fn(page.uc) 9822 if err != nil { 9823 return err 9824 } 9825 page.uc = next 9826 return nil 9827} 9828 9829// NotDone returns true if the page enumeration should be started or is not yet complete. 9830func (page UserCollectionPage) NotDone() bool { 9831 return !page.uc.IsEmpty() 9832} 9833 9834// Response returns the raw server response from the last page request. 9835func (page UserCollectionPage) Response() UserCollection { 9836 return page.uc 9837} 9838 9839// Values returns the slice of values for the current page or nil if there are no values. 9840func (page UserCollectionPage) Values() []UserContract { 9841 if page.uc.IsEmpty() { 9842 return nil 9843 } 9844 return *page.uc.Value 9845} 9846 9847// UserContract user details. 9848type UserContract struct { 9849 autorest.Response `json:"-"` 9850 // UserContractProperties - User entity contract properties. 9851 *UserContractProperties `json:"properties,omitempty"` 9852 // ID - Resource ID. 9853 ID *string `json:"id,omitempty"` 9854 // Name - Resource name. 9855 Name *string `json:"name,omitempty"` 9856 // Type - Resource type for API Management resource. 9857 Type *string `json:"type,omitempty"` 9858} 9859 9860// MarshalJSON is the custom marshaler for UserContract. 9861func (uc UserContract) MarshalJSON() ([]byte, error) { 9862 objectMap := make(map[string]interface{}) 9863 if uc.UserContractProperties != nil { 9864 objectMap["properties"] = uc.UserContractProperties 9865 } 9866 if uc.ID != nil { 9867 objectMap["id"] = uc.ID 9868 } 9869 if uc.Name != nil { 9870 objectMap["name"] = uc.Name 9871 } 9872 if uc.Type != nil { 9873 objectMap["type"] = uc.Type 9874 } 9875 return json.Marshal(objectMap) 9876} 9877 9878// UnmarshalJSON is the custom unmarshaler for UserContract struct. 9879func (uc *UserContract) UnmarshalJSON(body []byte) error { 9880 var m map[string]*json.RawMessage 9881 err := json.Unmarshal(body, &m) 9882 if err != nil { 9883 return err 9884 } 9885 for k, v := range m { 9886 switch k { 9887 case "properties": 9888 if v != nil { 9889 var userContractProperties UserContractProperties 9890 err = json.Unmarshal(*v, &userContractProperties) 9891 if err != nil { 9892 return err 9893 } 9894 uc.UserContractProperties = &userContractProperties 9895 } 9896 case "id": 9897 if v != nil { 9898 var ID string 9899 err = json.Unmarshal(*v, &ID) 9900 if err != nil { 9901 return err 9902 } 9903 uc.ID = &ID 9904 } 9905 case "name": 9906 if v != nil { 9907 var name string 9908 err = json.Unmarshal(*v, &name) 9909 if err != nil { 9910 return err 9911 } 9912 uc.Name = &name 9913 } 9914 case "type": 9915 if v != nil { 9916 var typeVar string 9917 err = json.Unmarshal(*v, &typeVar) 9918 if err != nil { 9919 return err 9920 } 9921 uc.Type = &typeVar 9922 } 9923 } 9924 } 9925 9926 return nil 9927} 9928 9929// UserContractProperties user profile. 9930type UserContractProperties struct { 9931 // FirstName - First name. 9932 FirstName *string `json:"firstName,omitempty"` 9933 // LastName - Last name. 9934 LastName *string `json:"lastName,omitempty"` 9935 // Email - Email address. 9936 Email *string `json:"email,omitempty"` 9937 // RegistrationDate - Date of user registration. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. 9938 RegistrationDate *date.Time `json:"registrationDate,omitempty"` 9939 // Groups - Collection of groups user is part of. 9940 Groups *[]GroupContractProperties `json:"groups,omitempty"` 9941 // State - Account state. Specifies whether the user is active or not. Blocked users are unable to sign into the developer portal or call any APIs of subscribed products. Default state is Active. Possible values include: 'UserStateActive', 'UserStateBlocked', 'UserStatePending', 'UserStateDeleted' 9942 State UserState `json:"state,omitempty"` 9943 // Note - Optional note about a user set by the administrator. 9944 Note *string `json:"note,omitempty"` 9945 // Identities - Collection of user identities. 9946 Identities *[]UserIdentityContract `json:"identities,omitempty"` 9947} 9948 9949// UserCreateParameterProperties parameters supplied to the Create User operation. 9950type UserCreateParameterProperties struct { 9951 // Email - Email address. Must not be empty and must be unique within the service instance. 9952 Email *string `json:"email,omitempty"` 9953 // FirstName - First name. 9954 FirstName *string `json:"firstName,omitempty"` 9955 // LastName - Last name. 9956 LastName *string `json:"lastName,omitempty"` 9957 // Password - User Password. If no value is provided, a default password is generated. 9958 Password *string `json:"password,omitempty"` 9959 // Confirmation - Determines the type of confirmation e-mail that will be sent to the newly created user. Possible values include: 'Signup', 'Invite' 9960 Confirmation Confirmation `json:"confirmation,omitempty"` 9961 // State - Account state. Specifies whether the user is active or not. Blocked users are unable to sign into the developer portal or call any APIs of subscribed products. Default state is Active. Possible values include: 'UserStateActive', 'UserStateBlocked', 'UserStatePending', 'UserStateDeleted' 9962 State UserState `json:"state,omitempty"` 9963 // Note - Optional note about a user set by the administrator. 9964 Note *string `json:"note,omitempty"` 9965 // Identities - Collection of user identities. 9966 Identities *[]UserIdentityContract `json:"identities,omitempty"` 9967} 9968 9969// UserCreateParameters user create details. 9970type UserCreateParameters struct { 9971 // UserCreateParameterProperties - User entity create contract properties. 9972 *UserCreateParameterProperties `json:"properties,omitempty"` 9973} 9974 9975// MarshalJSON is the custom marshaler for UserCreateParameters. 9976func (ucp UserCreateParameters) MarshalJSON() ([]byte, error) { 9977 objectMap := make(map[string]interface{}) 9978 if ucp.UserCreateParameterProperties != nil { 9979 objectMap["properties"] = ucp.UserCreateParameterProperties 9980 } 9981 return json.Marshal(objectMap) 9982} 9983 9984// UnmarshalJSON is the custom unmarshaler for UserCreateParameters struct. 9985func (ucp *UserCreateParameters) UnmarshalJSON(body []byte) error { 9986 var m map[string]*json.RawMessage 9987 err := json.Unmarshal(body, &m) 9988 if err != nil { 9989 return err 9990 } 9991 for k, v := range m { 9992 switch k { 9993 case "properties": 9994 if v != nil { 9995 var userCreateParameterProperties UserCreateParameterProperties 9996 err = json.Unmarshal(*v, &userCreateParameterProperties) 9997 if err != nil { 9998 return err 9999 } 10000 ucp.UserCreateParameterProperties = &userCreateParameterProperties 10001 } 10002 } 10003 } 10004 10005 return nil 10006} 10007 10008// UserEntityBaseParameters user Entity Base Parameters set. 10009type UserEntityBaseParameters struct { 10010 // State - Account state. Specifies whether the user is active or not. Blocked users are unable to sign into the developer portal or call any APIs of subscribed products. Default state is Active. Possible values include: 'UserStateActive', 'UserStateBlocked', 'UserStatePending', 'UserStateDeleted' 10011 State UserState `json:"state,omitempty"` 10012 // Note - Optional note about a user set by the administrator. 10013 Note *string `json:"note,omitempty"` 10014 // Identities - Collection of user identities. 10015 Identities *[]UserIdentityContract `json:"identities,omitempty"` 10016} 10017 10018// UserIdentityCollection list of Users Identity list representation. 10019type UserIdentityCollection struct { 10020 autorest.Response `json:"-"` 10021 // Value - User Identity values. 10022 Value *[]UserIdentityContract `json:"value,omitempty"` 10023 // Count - Total record count number across all pages. 10024 Count *int64 `json:"count,omitempty"` 10025 // NextLink - Next page link if any. 10026 NextLink *string `json:"nextLink,omitempty"` 10027} 10028 10029// UserIdentityCollectionIterator provides access to a complete listing of UserIdentityContract values. 10030type UserIdentityCollectionIterator struct { 10031 i int 10032 page UserIdentityCollectionPage 10033} 10034 10035// Next advances to the next value. If there was an error making 10036// the request the iterator does not advance and the error is returned. 10037func (iter *UserIdentityCollectionIterator) Next() error { 10038 iter.i++ 10039 if iter.i < len(iter.page.Values()) { 10040 return nil 10041 } 10042 err := iter.page.Next() 10043 if err != nil { 10044 iter.i-- 10045 return err 10046 } 10047 iter.i = 0 10048 return nil 10049} 10050 10051// NotDone returns true if the enumeration should be started or is not yet complete. 10052func (iter UserIdentityCollectionIterator) NotDone() bool { 10053 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 10054} 10055 10056// Response returns the raw server response from the last page request. 10057func (iter UserIdentityCollectionIterator) Response() UserIdentityCollection { 10058 return iter.page.Response() 10059} 10060 10061// Value returns the current value or a zero-initialized value if the 10062// iterator has advanced beyond the end of the collection. 10063func (iter UserIdentityCollectionIterator) Value() UserIdentityContract { 10064 if !iter.page.NotDone() { 10065 return UserIdentityContract{} 10066 } 10067 return iter.page.Values()[iter.i] 10068} 10069 10070// IsEmpty returns true if the ListResult contains no values. 10071func (uic UserIdentityCollection) IsEmpty() bool { 10072 return uic.Value == nil || len(*uic.Value) == 0 10073} 10074 10075// userIdentityCollectionPreparer prepares a request to retrieve the next set of results. 10076// It returns nil if no more results exist. 10077func (uic UserIdentityCollection) userIdentityCollectionPreparer() (*http.Request, error) { 10078 if uic.NextLink == nil || len(to.String(uic.NextLink)) < 1 { 10079 return nil, nil 10080 } 10081 return autorest.Prepare(&http.Request{}, 10082 autorest.AsJSON(), 10083 autorest.AsGet(), 10084 autorest.WithBaseURL(to.String(uic.NextLink))) 10085} 10086 10087// UserIdentityCollectionPage contains a page of UserIdentityContract values. 10088type UserIdentityCollectionPage struct { 10089 fn func(UserIdentityCollection) (UserIdentityCollection, error) 10090 uic UserIdentityCollection 10091} 10092 10093// Next advances to the next page of values. If there was an error making 10094// the request the page does not advance and the error is returned. 10095func (page *UserIdentityCollectionPage) Next() error { 10096 next, err := page.fn(page.uic) 10097 if err != nil { 10098 return err 10099 } 10100 page.uic = next 10101 return nil 10102} 10103 10104// NotDone returns true if the page enumeration should be started or is not yet complete. 10105func (page UserIdentityCollectionPage) NotDone() bool { 10106 return !page.uic.IsEmpty() 10107} 10108 10109// Response returns the raw server response from the last page request. 10110func (page UserIdentityCollectionPage) Response() UserIdentityCollection { 10111 return page.uic 10112} 10113 10114// Values returns the slice of values for the current page or nil if there are no values. 10115func (page UserIdentityCollectionPage) Values() []UserIdentityContract { 10116 if page.uic.IsEmpty() { 10117 return nil 10118 } 10119 return *page.uic.Value 10120} 10121 10122// UserIdentityContract user identity details. 10123type UserIdentityContract struct { 10124 // Provider - Identity provider name. 10125 Provider *string `json:"provider,omitempty"` 10126 // ID - Identifier value within provider. 10127 ID *string `json:"id,omitempty"` 10128} 10129 10130// UserTokenParameters parameters supplied to the Get User Token operation. 10131type UserTokenParameters struct { 10132 // KeyType - The Key to be used to generate token for user. Possible values include: 'Primary', 'Secondary' 10133 KeyType KeyType `json:"keyType,omitempty"` 10134 // Expiry - The Expiry time of the Token. Maximum token expiry time is set to 30 days. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. 10135 Expiry *date.Time `json:"expiry,omitempty"` 10136} 10137 10138// UserTokenResult get User Token response details. 10139type UserTokenResult struct { 10140 autorest.Response `json:"-"` 10141 // Value - Shared Access Authorization token for the User. 10142 Value *string `json:"value,omitempty"` 10143} 10144 10145// UserUpdateParameters user update parameters. 10146type UserUpdateParameters struct { 10147 // UserUpdateParametersProperties - User entity update contract properties. 10148 *UserUpdateParametersProperties `json:"properties,omitempty"` 10149} 10150 10151// MarshalJSON is the custom marshaler for UserUpdateParameters. 10152func (uup UserUpdateParameters) MarshalJSON() ([]byte, error) { 10153 objectMap := make(map[string]interface{}) 10154 if uup.UserUpdateParametersProperties != nil { 10155 objectMap["properties"] = uup.UserUpdateParametersProperties 10156 } 10157 return json.Marshal(objectMap) 10158} 10159 10160// UnmarshalJSON is the custom unmarshaler for UserUpdateParameters struct. 10161func (uup *UserUpdateParameters) UnmarshalJSON(body []byte) error { 10162 var m map[string]*json.RawMessage 10163 err := json.Unmarshal(body, &m) 10164 if err != nil { 10165 return err 10166 } 10167 for k, v := range m { 10168 switch k { 10169 case "properties": 10170 if v != nil { 10171 var userUpdateParametersProperties UserUpdateParametersProperties 10172 err = json.Unmarshal(*v, &userUpdateParametersProperties) 10173 if err != nil { 10174 return err 10175 } 10176 uup.UserUpdateParametersProperties = &userUpdateParametersProperties 10177 } 10178 } 10179 } 10180 10181 return nil 10182} 10183 10184// UserUpdateParametersProperties parameters supplied to the Update User operation. 10185type UserUpdateParametersProperties struct { 10186 // Email - Email address. Must not be empty and must be unique within the service instance. 10187 Email *string `json:"email,omitempty"` 10188 // Password - User Password. 10189 Password *string `json:"password,omitempty"` 10190 // FirstName - First name. 10191 FirstName *string `json:"firstName,omitempty"` 10192 // LastName - Last name. 10193 LastName *string `json:"lastName,omitempty"` 10194 // State - Account state. Specifies whether the user is active or not. Blocked users are unable to sign into the developer portal or call any APIs of subscribed products. Default state is Active. Possible values include: 'UserStateActive', 'UserStateBlocked', 'UserStatePending', 'UserStateDeleted' 10195 State UserState `json:"state,omitempty"` 10196 // Note - Optional note about a user set by the administrator. 10197 Note *string `json:"note,omitempty"` 10198 // Identities - Collection of user identities. 10199 Identities *[]UserIdentityContract `json:"identities,omitempty"` 10200} 10201 10202// VirtualNetworkConfiguration configuration of a virtual network to which API Management service is deployed. 10203type VirtualNetworkConfiguration struct { 10204 // Vnetid - The virtual network ID. This is typically a GUID. Expect a null GUID by default. 10205 Vnetid *string `json:"vnetid,omitempty"` 10206 // Subnetname - The name of the subnet. 10207 Subnetname *string `json:"subnetname,omitempty"` 10208 // SubnetResourceID - The full resource ID of a subnet in a virtual network to deploy the API Management service in. 10209 SubnetResourceID *string `json:"subnetResourceId,omitempty"` 10210} 10211 10212// X509CertificateName properties of server X509Names. 10213type X509CertificateName struct { 10214 // Name - Common Name of the Certificate. 10215 Name *string `json:"name,omitempty"` 10216 // IssuerCertificateThumbprint - Thumbprint for the Issuer of the Certificate. 10217 IssuerCertificateThumbprint *string `json:"issuerCertificateThumbprint,omitempty"` 10218} 10219