From 87236f0c3bccf31662a943d7936cb04772d5ed56 Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Tue, 1 Dec 2020 02:58:56 +0000 Subject: [PATCH] CodeGen from PR 11655 in Azure/azure-rest-api-specs Adding AFDX swagger and its examples (#11655) * Adding AFDX swagger and its examples * fix examples and added odata back * added readme and fixed small sematic problems * fix log analytics * updates * updates * updates * updates * updates * updates * updates * UPDATES * add secret version back * lint errors 1 * lint error 2 * lint 3 * lint 4 * updates * spell check * add origingroupoverrideaction * address comments * fixes * updates * remove ruleset update * updates Co-authored-by: Shirley Jiang --- services/cdn/mgmt/2020-04-15/cdn/models.go | 175 +++++++++++++-------- 1 file changed, 109 insertions(+), 66 deletions(-) diff --git a/services/cdn/mgmt/2020-04-15/cdn/models.go b/services/cdn/mgmt/2020-04-15/cdn/models.go index 55ea9a5aa81a..3c78f1dc9426 100644 --- a/services/cdn/mgmt/2020-04-15/cdn/models.go +++ b/services/cdn/mgmt/2020-04-15/cdn/models.go @@ -100,8 +100,8 @@ type CookiesMatchConditionParameters struct { Transforms *[]Transform `json:"transforms,omitempty"` } -// CustomDomain friendly domain name mapping to the endpoint hostname that the customer provides for branding -// purposes, e.g. www.contoso.com. +// CustomDomain friendly domain name mapping to the endpoint hostname that the customer provides for +// branding purposes, e.g. www.contoso.com. type CustomDomain struct { autorest.Response `json:"-"` *CustomDomainProperties `json:"properties,omitempty"` @@ -429,8 +429,11 @@ func (page CustomDomainListResultPage) Values() []CustomDomain { } // Creates a new instance of the CustomDomainListResultPage type. -func NewCustomDomainListResultPage(getNextPage func(context.Context, CustomDomainListResult) (CustomDomainListResult, error)) CustomDomainListResultPage { - return CustomDomainListResultPage{fn: getNextPage} +func NewCustomDomainListResultPage(cur CustomDomainListResult, getNextPage func(context.Context, CustomDomainListResult) (CustomDomainListResult, error)) CustomDomainListResultPage { + return CustomDomainListResultPage{ + fn: getNextPage, + cdlr: cur, + } } // CustomDomainParameters the customDomain JSON object required for custom domain creation or update. @@ -636,8 +639,8 @@ func (dco *DeepCreatedOrigin) UnmarshalJSON(body []byte) error { return nil } -// DeepCreatedOriginGroup the origin group for CDN content which is added when creating a CDN endpoint. Traffic -// is sent to the origins within the origin group based on origin health. +// DeepCreatedOriginGroup the origin group for CDN content which is added when creating a CDN endpoint. +// Traffic is sent to the origins within the origin group based on origin health. type DeepCreatedOriginGroup struct { // Name - Origin group name which must be unique within the endpoint. Name *string `json:"name,omitempty"` @@ -2881,8 +2884,8 @@ type EdgeNodeProperties struct { IPAddressGroups *[]IPAddressGroup `json:"ipAddressGroups,omitempty"` } -// EdgenodeResult result of the request to list CDN edgenodes. It contains a list of ip address group and a URL -// link to get the next set of results. +// EdgenodeResult result of the request to list CDN edgenodes. It contains a list of ip address group and a +// URL link to get the next set of results. type EdgenodeResult struct { autorest.Response `json:"-"` // Value - READ-ONLY; Edge node of CDN service. @@ -3043,8 +3046,11 @@ func (page EdgenodeResultPage) Values() []EdgeNode { } // Creates a new instance of the EdgenodeResultPage type. -func NewEdgenodeResultPage(getNextPage func(context.Context, EdgenodeResult) (EdgenodeResult, error)) EdgenodeResultPage { - return EdgenodeResultPage{fn: getNextPage} +func NewEdgenodeResultPage(cur EdgenodeResult, getNextPage func(context.Context, EdgenodeResult) (EdgenodeResult, error)) EdgenodeResultPage { + return EdgenodeResultPage{ + fn: getNextPage, + er: cur, + } } // Endpoint CDN endpoint is the entity within a CDN profile containing configuration information such as @@ -3149,8 +3155,8 @@ func (e *Endpoint) UnmarshalJSON(body []byte) error { return nil } -// EndpointListResult result of the request to list endpoints. It contains a list of endpoint objects and a URL -// link to get the next set of results. +// EndpointListResult result of the request to list endpoints. It contains a list of endpoint objects and a +// URL link to get the next set of results. type EndpointListResult struct { autorest.Response `json:"-"` // Value - READ-ONLY; List of CDN endpoints within a profile @@ -3311,8 +3317,11 @@ func (page EndpointListResultPage) Values() []Endpoint { } // Creates a new instance of the EndpointListResultPage type. -func NewEndpointListResultPage(getNextPage func(context.Context, EndpointListResult) (EndpointListResult, error)) EndpointListResultPage { - return EndpointListResultPage{fn: getNextPage} +func NewEndpointListResultPage(cur EndpointListResult, getNextPage func(context.Context, EndpointListResult) (EndpointListResult, error)) EndpointListResultPage { + return EndpointListResultPage{ + fn: getNextPage, + elr: cur, + } } // EndpointProperties the JSON object that contains the properties required to create an endpoint. @@ -3443,8 +3452,8 @@ type EndpointPropertiesUpdateParameters struct { WebApplicationFirewallPolicyLink *EndpointPropertiesUpdateParametersWebApplicationFirewallPolicyLink `json:"webApplicationFirewallPolicyLink,omitempty"` } -// EndpointPropertiesUpdateParametersDeliveryPolicy a policy that specifies the delivery rules to be used for -// an endpoint. +// EndpointPropertiesUpdateParametersDeliveryPolicy a policy that specifies the delivery rules to be used +// for an endpoint. type EndpointPropertiesUpdateParametersDeliveryPolicy struct { // Description - User-friendly description of the policy. Description *string `json:"description,omitempty"` @@ -3459,7 +3468,8 @@ type EndpointPropertiesUpdateParametersWebApplicationFirewallPolicyLink struct { ID *string `json:"id,omitempty"` } -// EndpointsCreateFuture an abstraction for monitoring and retrieving the results of a long-running operation. +// EndpointsCreateFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. type EndpointsCreateFuture struct { azure.Future } @@ -3487,7 +3497,8 @@ func (future *EndpointsCreateFuture) Result(client EndpointsClient) (e Endpoint, return } -// EndpointsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation. +// EndpointsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. type EndpointsDeleteFuture struct { azure.Future } @@ -3555,7 +3566,8 @@ func (future *EndpointsPurgeContentFuture) Result(client EndpointsClient) (ar au return } -// EndpointsStartFuture an abstraction for monitoring and retrieving the results of a long-running operation. +// EndpointsStartFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. type EndpointsStartFuture struct { azure.Future } @@ -3583,7 +3595,8 @@ func (future *EndpointsStartFuture) Result(client EndpointsClient) (e Endpoint, return } -// EndpointsStopFuture an abstraction for monitoring and retrieving the results of a long-running operation. +// EndpointsStopFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. type EndpointsStopFuture struct { azure.Future } @@ -3611,7 +3624,8 @@ func (future *EndpointsStopFuture) Result(client EndpointsClient) (e Endpoint, e return } -// EndpointsUpdateFuture an abstraction for monitoring and retrieving the results of a long-running operation. +// EndpointsUpdateFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. type EndpointsUpdateFuture struct { azure.Future } @@ -3697,8 +3711,8 @@ func (eup *EndpointUpdateParameters) UnmarshalJSON(body []byte) error { return nil } -// ErrorResponse error response indicates CDN service is not able to process the incoming request. The reason -// is provided in the error message. +// ErrorResponse error response indicates CDN service is not able to process the incoming request. The +// reason is provided in the error message. type ErrorResponse struct { // Code - READ-ONLY; Error code. Code *string `json:"code,omitempty"` @@ -3822,8 +3836,8 @@ type LoadParameters struct { ContentPaths *[]string `json:"contentPaths,omitempty"` } -// ManagedHTTPSParameters defines the certificate source parameters using CDN managed certificate for enabling -// SSL. +// ManagedHTTPSParameters defines the certificate source parameters using CDN managed certificate for +// enabling SSL. type ManagedHTTPSParameters struct { // CertificateSourceParameters - Defines the certificate source parameters using CDN managed certificate for enabling SSL. CertificateSourceParameters *CertificateSourceParameters `json:"certificateSourceParameters,omitempty"` @@ -4170,8 +4184,11 @@ func (page ManagedRuleSetDefinitionListPage) Values() []ManagedRuleSetDefinition } // Creates a new instance of the ManagedRuleSetDefinitionListPage type. -func NewManagedRuleSetDefinitionListPage(getNextPage func(context.Context, ManagedRuleSetDefinitionList) (ManagedRuleSetDefinitionList, error)) ManagedRuleSetDefinitionListPage { - return ManagedRuleSetDefinitionListPage{fn: getNextPage} +func NewManagedRuleSetDefinitionListPage(cur ManagedRuleSetDefinitionList, getNextPage func(context.Context, ManagedRuleSetDefinitionList) (ManagedRuleSetDefinitionList, error)) ManagedRuleSetDefinitionListPage { + return ManagedRuleSetDefinitionListPage{ + fn: getNextPage, + mrsdl: cur, + } } // ManagedRuleSetDefinitionProperties properties for a managed rule set definition. @@ -4235,8 +4252,8 @@ type OperationDisplay struct { Operation *string `json:"operation,omitempty"` } -// OperationsListResult result of the request to list CDN operations. It contains a list of operations and a -// URL link to get the next set of results. +// OperationsListResult result of the request to list CDN operations. It contains a list of operations and +// a URL link to get the next set of results. type OperationsListResult struct { autorest.Response `json:"-"` // Value - READ-ONLY; List of CDN operations supported by the CDN resource provider. @@ -4397,13 +4414,16 @@ func (page OperationsListResultPage) Values() []Operation { } // Creates a new instance of the OperationsListResultPage type. -func NewOperationsListResultPage(getNextPage func(context.Context, OperationsListResult) (OperationsListResult, error)) OperationsListResultPage { - return OperationsListResultPage{fn: getNextPage} +func NewOperationsListResultPage(cur OperationsListResult, getNextPage func(context.Context, OperationsListResult) (OperationsListResult, error)) OperationsListResultPage { + return OperationsListResultPage{ + fn: getNextPage, + olr: cur, + } } -// Origin CDN origin is the source of the content being delivered via CDN. When the edge nodes represented by -// an endpoint do not have the requested content cached, they attempt to fetch it from one or more of the -// configured origins. +// Origin CDN origin is the source of the content being delivered via CDN. When the edge nodes represented +// by an endpoint do not have the requested content cached, they attempt to fetch it from one or more of +// the configured origins. type Origin struct { autorest.Response `json:"-"` *OriginProperties `json:"properties,omitempty"` @@ -4475,8 +4495,8 @@ func (o *Origin) UnmarshalJSON(body []byte) error { return nil } -// OriginGroup origin group comprising of origins is used for load balancing to origins when the content cannot -// be served from CDN. +// OriginGroup origin group comprising of origins is used for load balancing to origins when the content +// cannot be served from CDN. type OriginGroup struct { autorest.Response `json:"-"` *OriginGroupProperties `json:"properties,omitempty"` @@ -4710,8 +4730,11 @@ func (page OriginGroupListResultPage) Values() []OriginGroup { } // Creates a new instance of the OriginGroupListResultPage type. -func NewOriginGroupListResultPage(getNextPage func(context.Context, OriginGroupListResult) (OriginGroupListResult, error)) OriginGroupListResultPage { - return OriginGroupListResultPage{fn: getNextPage} +func NewOriginGroupListResultPage(cur OriginGroupListResult, getNextPage func(context.Context, OriginGroupListResult) (OriginGroupListResult, error)) OriginGroupListResultPage { + return OriginGroupListResultPage{ + fn: getNextPage, + oglr: cur, + } } // OriginGroupProperties the JSON object that contains the properties of the origin group. @@ -4879,8 +4902,8 @@ type OriginGroupUpdatePropertiesParameters struct { ResponseBasedOriginErrorDetectionSettings *ResponseBasedOriginErrorDetectionParameters `json:"responseBasedOriginErrorDetectionSettings,omitempty"` } -// OriginListResult result of the request to list origins. It contains a list of origin objects and a URL link -// to get the next set of results. +// OriginListResult result of the request to list origins. It contains a list of origin objects and a URL +// link to get the next set of results. type OriginListResult struct { autorest.Response `json:"-"` // Value - READ-ONLY; List of CDN origins within an endpoint @@ -5041,8 +5064,11 @@ func (page OriginListResultPage) Values() []Origin { } // Creates a new instance of the OriginListResultPage type. -func NewOriginListResultPage(getNextPage func(context.Context, OriginListResult) (OriginListResult, error)) OriginListResultPage { - return OriginListResultPage{fn: getNextPage} +func NewOriginListResultPage(cur OriginListResult, getNextPage func(context.Context, OriginListResult) (OriginListResult, error)) OriginListResultPage { + return OriginListResultPage{ + fn: getNextPage, + olr: cur, + } } // OriginProperties the JSON object that contains the properties of the origin. @@ -5116,7 +5142,8 @@ func (op OriginProperties) MarshalJSON() ([]byte, error) { return json.Marshal(objectMap) } -// OriginsCreateFuture an abstraction for monitoring and retrieving the results of a long-running operation. +// OriginsCreateFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. type OriginsCreateFuture struct { azure.Future } @@ -5144,7 +5171,8 @@ func (future *OriginsCreateFuture) Result(client OriginsClient) (o Origin, err e return } -// OriginsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation. +// OriginsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. type OriginsDeleteFuture struct { azure.Future } @@ -5166,7 +5194,8 @@ func (future *OriginsDeleteFuture) Result(client OriginsClient) (ar autorest.Res return } -// OriginsUpdateFuture an abstraction for monitoring and retrieving the results of a long-running operation. +// OriginsUpdateFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. type OriginsUpdateFuture struct { azure.Future } @@ -5287,7 +5316,8 @@ func (future *PoliciesCreateOrUpdateFuture) Result(client PoliciesClient) (wafp return } -// PoliciesUpdateFuture an abstraction for monitoring and retrieving the results of a long-running operation. +// PoliciesUpdateFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. type PoliciesUpdateFuture struct { azure.Future } @@ -5344,8 +5374,8 @@ type PostArgsMatchConditionParameters struct { Transforms *[]Transform `json:"transforms,omitempty"` } -// Profile CDN profile is a logical grouping of endpoints that share the same settings, such as CDN provider -// and pricing tier. +// Profile CDN profile is a logical grouping of endpoints that share the same settings, such as CDN +// provider and pricing tier. type Profile struct { autorest.Response `json:"-"` // Sku - The pricing tier (defines a CDN provider, feature list and rate) of the CDN profile. @@ -5459,8 +5489,8 @@ func (p *Profile) UnmarshalJSON(body []byte) error { return nil } -// ProfileListResult result of the request to list profiles. It contains a list of profile objects and a URL -// link to get the next set of results. +// ProfileListResult result of the request to list profiles. It contains a list of profile objects and a +// URL link to get the next set of results. type ProfileListResult struct { autorest.Response `json:"-"` // Value - READ-ONLY; List of CDN profiles within a resource group. @@ -5621,8 +5651,11 @@ func (page ProfileListResultPage) Values() []Profile { } // Creates a new instance of the ProfileListResultPage type. -func NewProfileListResultPage(getNextPage func(context.Context, ProfileListResult) (ProfileListResult, error)) ProfileListResultPage { - return ProfileListResultPage{fn: getNextPage} +func NewProfileListResultPage(cur ProfileListResult, getNextPage func(context.Context, ProfileListResult) (ProfileListResult, error)) ProfileListResultPage { + return ProfileListResultPage{ + fn: getNextPage, + plr: cur, + } } // ProfileProperties the JSON object that contains the properties required to create a profile. @@ -5633,7 +5666,8 @@ type ProfileProperties struct { ProvisioningState *string `json:"provisioningState,omitempty"` } -// ProfilesCreateFuture an abstraction for monitoring and retrieving the results of a long-running operation. +// ProfilesCreateFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. type ProfilesCreateFuture struct { azure.Future } @@ -5661,7 +5695,8 @@ func (future *ProfilesCreateFuture) Result(client ProfilesClient) (p Profile, er return } -// ProfilesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation. +// ProfilesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. type ProfilesDeleteFuture struct { azure.Future } @@ -5683,7 +5718,8 @@ func (future *ProfilesDeleteFuture) Result(client ProfilesClient) (ar autorest.R return } -// ProfilesUpdateFuture an abstraction for monitoring and retrieving the results of a long-running operation. +// ProfilesUpdateFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. type ProfilesUpdateFuture struct { azure.Future } @@ -6045,12 +6081,15 @@ func (page ResourceUsageListResultPage) Values() []ResourceUsage { } // Creates a new instance of the ResourceUsageListResultPage type. -func NewResourceUsageListResultPage(getNextPage func(context.Context, ResourceUsageListResult) (ResourceUsageListResult, error)) ResourceUsageListResultPage { - return ResourceUsageListResultPage{fn: getNextPage} +func NewResourceUsageListResultPage(cur ResourceUsageListResult, getNextPage func(context.Context, ResourceUsageListResult) (ResourceUsageListResult, error)) ResourceUsageListResultPage { + return ResourceUsageListResultPage{ + fn: getNextPage, + rulr: cur, + } } -// ResponseBasedOriginErrorDetectionParameters the JSON object that contains the properties to determine origin -// health using real requests/responses. +// ResponseBasedOriginErrorDetectionParameters the JSON object that contains the properties to determine +// origin health using real requests/responses. type ResponseBasedOriginErrorDetectionParameters struct { // ResponseBasedDetectedErrorTypes - Type of response errors for real user requests for which origin will be deemed unhealthy. Possible values include: 'ResponseBasedDetectedErrorTypesNone', 'ResponseBasedDetectedErrorTypesTCPErrorsOnly', 'ResponseBasedDetectedErrorTypesTCPAndHTTPErrors' ResponseBasedDetectedErrorTypes ResponseBasedDetectedErrorTypes `json:"responseBasedDetectedErrorTypes,omitempty"` @@ -6401,8 +6440,8 @@ type URLSigningParamIdentifier struct { ParamName *string `json:"paramName,omitempty"` } -// UserManagedHTTPSParameters defines the certificate source parameters using user's keyvault certificate for -// enabling SSL. +// UserManagedHTTPSParameters defines the certificate source parameters using user's keyvault certificate +// for enabling SSL. type UserManagedHTTPSParameters struct { // CertificateSourceParameters - Defines the certificate source parameters using user's keyvault certificate for enabling SSL. CertificateSourceParameters *KeyVaultCertificateSourceParameters `json:"certificateSourceParameters,omitempty"` @@ -6616,8 +6655,8 @@ func (wafp *WebApplicationFirewallPolicy) UnmarshalJSON(body []byte) error { return nil } -// WebApplicationFirewallPolicyList defines a list of WebApplicationFirewallPolicies for Azure CDN. It contains -// a list of WebApplicationFirewallPolicy objects and a URL link to get the next set of results. +// WebApplicationFirewallPolicyList defines a list of WebApplicationFirewallPolicies for Azure CDN. It +// contains a list of WebApplicationFirewallPolicy objects and a URL link to get the next set of results. type WebApplicationFirewallPolicyList struct { autorest.Response `json:"-"` // Value - READ-ONLY; List of Azure CDN WebApplicationFirewallPolicies within a resource group. @@ -6779,11 +6818,15 @@ func (page WebApplicationFirewallPolicyListPage) Values() []WebApplicationFirewa } // Creates a new instance of the WebApplicationFirewallPolicyListPage type. -func NewWebApplicationFirewallPolicyListPage(getNextPage func(context.Context, WebApplicationFirewallPolicyList) (WebApplicationFirewallPolicyList, error)) WebApplicationFirewallPolicyListPage { - return WebApplicationFirewallPolicyListPage{fn: getNextPage} +func NewWebApplicationFirewallPolicyListPage(cur WebApplicationFirewallPolicyList, getNextPage func(context.Context, WebApplicationFirewallPolicyList) (WebApplicationFirewallPolicyList, error)) WebApplicationFirewallPolicyListPage { + return WebApplicationFirewallPolicyListPage{ + fn: getNextPage, + wafpl: cur, + } } -// WebApplicationFirewallPolicyPatchParameters properties required to update a CdnWebApplicationFirewallPolicy. +// WebApplicationFirewallPolicyPatchParameters properties required to update a +// CdnWebApplicationFirewallPolicy. type WebApplicationFirewallPolicyPatchParameters struct { // Tags - CdnWebApplicationFirewallPolicy tags Tags map[string]*string `json:"tags"`