From 666e86a3cf7f4ae64d00760a212b2dcdce93e2a2 Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Tue, 1 Dec 2020 03:00:30 +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/2017-04-02/cdn/models.go | 114 +++++++++++++-------- 1 file changed, 72 insertions(+), 42 deletions(-) diff --git a/services/cdn/mgmt/2017-04-02/cdn/models.go b/services/cdn/mgmt/2017-04-02/cdn/models.go index 21b2c4558796..95fb778e1bbc 100644 --- a/services/cdn/mgmt/2017-04-02/cdn/models.go +++ b/services/cdn/mgmt/2017-04-02/cdn/models.go @@ -57,8 +57,8 @@ type CidrIPAddress struct { PrefixLength *int32 `json:"prefixLength,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"` @@ -292,8 +292,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. @@ -566,8 +569,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. @@ -728,8 +731,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 @@ -834,8 +840,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 @@ -996,8 +1002,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. @@ -1095,7 +1104,8 @@ type EndpointPropertiesUpdateParameters struct { GeoFilters *[]GeoFilter `json:"geoFilters,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 } @@ -1123,7 +1133,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 } @@ -1191,7 +1202,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 } @@ -1219,7 +1231,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 } @@ -1247,7 +1260,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 } @@ -1327,8 +1341,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"` @@ -1389,8 +1403,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. @@ -1551,13 +1565,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"` @@ -1657,8 +1674,8 @@ func (o *Origin) UnmarshalJSON(body []byte) error { return nil } -// 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 @@ -1819,8 +1836,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. @@ -1862,7 +1882,8 @@ type OriginPropertiesParameters struct { HTTPSPort *int32 `json:"httpsPort,omitempty"` } -// 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 } @@ -1928,8 +1949,8 @@ func (oup *OriginUpdateParameters) UnmarshalJSON(body []byte) error { return nil } -// 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. @@ -2043,8 +2064,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. @@ -2205,8 +2226,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. @@ -2217,7 +2241,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 } @@ -2245,7 +2270,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 } @@ -2267,7 +2293,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 } @@ -2510,8 +2537,11 @@ 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, + } } // Sku the pricing tier (defines a CDN provider, feature list and rate) of the CDN profile.