From 0c85cd025bd7b3981aa20eab27b1e90a28236973 Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Wed, 24 Apr 2019 14:58:34 -0700 Subject: [PATCH] Generated from 5964a9567e075efc8279833610ebd33a0b8e0944 (#4655) upper case XML --- .../mgmt/apimanagement/models.go | 12 +++++++++++ .../mgmt/apimanagement/models.go | 12 +++++++++++ .../apimanagementapi/interfaces.go | 8 +++---- .../apimanagement/apioperationpolicy.go | 12 ++++++++--- .../2019-01-01/apimanagement/apipolicy.go | 12 ++++++++--- .../mgmt/2019-01-01/apimanagement/models.go | 21 +++++++++++++++++++ .../mgmt/2019-01-01/apimanagement/policy.go | 12 ++++++++--- .../2019-01-01/apimanagement/productpolicy.go | 12 ++++++++--- 8 files changed, 85 insertions(+), 16 deletions(-) diff --git a/profiles/latest/apimanagement/mgmt/apimanagement/models.go b/profiles/latest/apimanagement/mgmt/apimanagement/models.go index e81163a082ca..748c6bc04530 100644 --- a/profiles/latest/apimanagement/mgmt/apimanagement/models.go +++ b/profiles/latest/apimanagement/mgmt/apimanagement/models.go @@ -220,6 +220,15 @@ const ( XMLLink PolicyContentFormat = original.XMLLink ) +type PolicyExportFormat = original.PolicyExportFormat + +const ( + PolicyExportFormatRawxml PolicyExportFormat = original.PolicyExportFormatRawxml + PolicyExportFormatRawxmlLink PolicyExportFormat = original.PolicyExportFormatRawxmlLink + PolicyExportFormatXML PolicyExportFormat = original.PolicyExportFormatXML + PolicyExportFormatXMLLink PolicyExportFormat = original.PolicyExportFormatXMLLink +) + type PolicyScopeContract = original.PolicyScopeContract const ( @@ -1378,6 +1387,9 @@ func PossibleNotificationNameValues() []NotificationName { func PossiblePolicyContentFormatValues() []PolicyContentFormat { return original.PossiblePolicyContentFormatValues() } +func PossiblePolicyExportFormatValues() []PolicyExportFormat { + return original.PossiblePolicyExportFormatValues() +} func PossiblePolicyScopeContractValues() []PolicyScopeContract { return original.PossiblePolicyScopeContractValues() } diff --git a/profiles/preview/apimanagement/mgmt/apimanagement/models.go b/profiles/preview/apimanagement/mgmt/apimanagement/models.go index d811f5eb9f4b..64ca4ec41b80 100644 --- a/profiles/preview/apimanagement/mgmt/apimanagement/models.go +++ b/profiles/preview/apimanagement/mgmt/apimanagement/models.go @@ -220,6 +220,15 @@ const ( XMLLink PolicyContentFormat = original.XMLLink ) +type PolicyExportFormat = original.PolicyExportFormat + +const ( + PolicyExportFormatRawxml PolicyExportFormat = original.PolicyExportFormatRawxml + PolicyExportFormatRawxmlLink PolicyExportFormat = original.PolicyExportFormatRawxmlLink + PolicyExportFormatXML PolicyExportFormat = original.PolicyExportFormatXML + PolicyExportFormatXMLLink PolicyExportFormat = original.PolicyExportFormatXMLLink +) + type PolicyScopeContract = original.PolicyScopeContract const ( @@ -1378,6 +1387,9 @@ func PossibleNotificationNameValues() []NotificationName { func PossiblePolicyContentFormatValues() []PolicyContentFormat { return original.PossiblePolicyContentFormatValues() } +func PossiblePolicyExportFormatValues() []PolicyExportFormat { + return original.PossiblePolicyExportFormatValues() +} func PossiblePolicyScopeContractValues() []PolicyScopeContract { return original.PossiblePolicyScopeContractValues() } diff --git a/services/apimanagement/mgmt/2019-01-01/apimanagement/apimanagementapi/interfaces.go b/services/apimanagement/mgmt/2019-01-01/apimanagement/apimanagementapi/interfaces.go index a0ca7d566de6..97b3a1c04bc1 100644 --- a/services/apimanagement/mgmt/2019-01-01/apimanagement/apimanagementapi/interfaces.go +++ b/services/apimanagement/mgmt/2019-01-01/apimanagement/apimanagementapi/interfaces.go @@ -72,7 +72,7 @@ type APIOperationPolicyClientAPI interface { CreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, apiid string, operationID string, parameters apimanagement.PolicyContract, ifMatch string) (result apimanagement.PolicyContract, err error) Delete(ctx context.Context, resourceGroupName string, serviceName string, apiid string, operationID string, ifMatch string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, serviceName string, apiid string, operationID string) (result apimanagement.PolicyContract, err error) - GetEntityTag(ctx context.Context, resourceGroupName string, serviceName string, apiid string, operationID string) (result autorest.Response, err error) + GetEntityTag(ctx context.Context, resourceGroupName string, serviceName string, apiid string, operationID string, formatParameter apimanagement.PolicyExportFormat) (result autorest.Response, err error) ListByOperation(ctx context.Context, resourceGroupName string, serviceName string, apiid string, operationID string) (result apimanagement.PolicyCollection, err error) } @@ -116,7 +116,7 @@ var _ APIProductClientAPI = (*apimanagement.APIProductClient)(nil) type APIPolicyClientAPI interface { CreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, apiid string, parameters apimanagement.PolicyContract, ifMatch string) (result apimanagement.PolicyContract, err error) Delete(ctx context.Context, resourceGroupName string, serviceName string, apiid string, ifMatch string) (result autorest.Response, err error) - Get(ctx context.Context, resourceGroupName string, serviceName string, apiid string) (result apimanagement.PolicyContract, err error) + Get(ctx context.Context, resourceGroupName string, serviceName string, apiid string, formatParameter apimanagement.PolicyExportFormat) (result apimanagement.PolicyContract, err error) GetEntityTag(ctx context.Context, resourceGroupName string, serviceName string, apiid string) (result autorest.Response, err error) ListByAPI(ctx context.Context, resourceGroupName string, serviceName string, apiid string) (result apimanagement.PolicyCollection, err error) } @@ -420,7 +420,7 @@ var _ OpenIDConnectProviderClientAPI = (*apimanagement.OpenIDConnectProviderClie type PolicyClientAPI interface { CreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, parameters apimanagement.PolicyContract, ifMatch string) (result apimanagement.PolicyContract, err error) Delete(ctx context.Context, resourceGroupName string, serviceName string, ifMatch string) (result autorest.Response, err error) - Get(ctx context.Context, resourceGroupName string, serviceName string) (result apimanagement.PolicyContract, err error) + Get(ctx context.Context, resourceGroupName string, serviceName string, formatParameter apimanagement.PolicyExportFormat) (result apimanagement.PolicyContract, err error) GetEntityTag(ctx context.Context, resourceGroupName string, serviceName string) (result autorest.Response, err error) ListByService(ctx context.Context, resourceGroupName string, serviceName string) (result apimanagement.PolicyCollection, err error) } @@ -508,7 +508,7 @@ var _ ProductSubscriptionsClientAPI = (*apimanagement.ProductSubscriptionsClient type ProductPolicyClientAPI interface { CreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, productID string, parameters apimanagement.PolicyContract, ifMatch string) (result apimanagement.PolicyContract, err error) Delete(ctx context.Context, resourceGroupName string, serviceName string, productID string, ifMatch string) (result autorest.Response, err error) - Get(ctx context.Context, resourceGroupName string, serviceName string, productID string) (result apimanagement.PolicyContract, err error) + Get(ctx context.Context, resourceGroupName string, serviceName string, productID string, formatParameter apimanagement.PolicyExportFormat) (result apimanagement.PolicyContract, err error) GetEntityTag(ctx context.Context, resourceGroupName string, serviceName string, productID string) (result autorest.Response, err error) ListByProduct(ctx context.Context, resourceGroupName string, serviceName string, productID string) (result apimanagement.PolicyCollection, err error) } diff --git a/services/apimanagement/mgmt/2019-01-01/apimanagement/apioperationpolicy.go b/services/apimanagement/mgmt/2019-01-01/apimanagement/apioperationpolicy.go index fba4a4f7ccfd..95c6ae72448d 100644 --- a/services/apimanagement/mgmt/2019-01-01/apimanagement/apioperationpolicy.go +++ b/services/apimanagement/mgmt/2019-01-01/apimanagement/apioperationpolicy.go @@ -362,7 +362,8 @@ func (client APIOperationPolicyClient) GetResponder(resp *http.Response) (result // revision has ;rev=n as a suffix where n is the revision number. // operationID - operation identifier within an API. Must be unique in the current API Management service // instance. -func (client APIOperationPolicyClient) GetEntityTag(ctx context.Context, resourceGroupName string, serviceName string, apiid string, operationID string) (result autorest.Response, err error) { +// formatParameter - policy Export Format. +func (client APIOperationPolicyClient) GetEntityTag(ctx context.Context, resourceGroupName string, serviceName string, apiid string, operationID string, formatParameter PolicyExportFormat) (result autorest.Response, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/APIOperationPolicyClient.GetEntityTag") defer func() { @@ -389,7 +390,7 @@ func (client APIOperationPolicyClient) GetEntityTag(ctx context.Context, resourc return result, validation.NewError("apimanagement.APIOperationPolicyClient", "GetEntityTag", err.Error()) } - req, err := client.GetEntityTagPreparer(ctx, resourceGroupName, serviceName, apiid, operationID) + req, err := client.GetEntityTagPreparer(ctx, resourceGroupName, serviceName, apiid, operationID, formatParameter) if err != nil { err = autorest.NewErrorWithError(err, "apimanagement.APIOperationPolicyClient", "GetEntityTag", nil, "Failure preparing request") return @@ -411,7 +412,7 @@ func (client APIOperationPolicyClient) GetEntityTag(ctx context.Context, resourc } // GetEntityTagPreparer prepares the GetEntityTag request. -func (client APIOperationPolicyClient) GetEntityTagPreparer(ctx context.Context, resourceGroupName string, serviceName string, apiid string, operationID string) (*http.Request, error) { +func (client APIOperationPolicyClient) GetEntityTagPreparer(ctx context.Context, resourceGroupName string, serviceName string, apiid string, operationID string, formatParameter PolicyExportFormat) (*http.Request, error) { pathParameters := map[string]interface{}{ "apiId": autorest.Encode("path", apiid), "operationId": autorest.Encode("path", operationID), @@ -425,6 +426,11 @@ func (client APIOperationPolicyClient) GetEntityTagPreparer(ctx context.Context, queryParameters := map[string]interface{}{ "api-version": APIVersion, } + if len(string(formatParameter)) > 0 { + queryParameters["format"] = autorest.Encode("query", formatParameter) + } else { + queryParameters["format"] = autorest.Encode("query", "xml") + } preparer := autorest.CreatePreparer( autorest.AsHead(), diff --git a/services/apimanagement/mgmt/2019-01-01/apimanagement/apipolicy.go b/services/apimanagement/mgmt/2019-01-01/apimanagement/apipolicy.go index 035dd8a01134..a045237950b6 100644 --- a/services/apimanagement/mgmt/2019-01-01/apimanagement/apipolicy.go +++ b/services/apimanagement/mgmt/2019-01-01/apimanagement/apipolicy.go @@ -246,7 +246,8 @@ func (client APIPolicyClient) DeleteResponder(resp *http.Response) (result autor // serviceName - the name of the API Management service. // apiid - API revision identifier. Must be unique in the current API Management service instance. Non-current // revision has ;rev=n as a suffix where n is the revision number. -func (client APIPolicyClient) Get(ctx context.Context, resourceGroupName string, serviceName string, apiid string) (result PolicyContract, err error) { +// formatParameter - policy Export Format. +func (client APIPolicyClient) Get(ctx context.Context, resourceGroupName string, serviceName string, apiid string, formatParameter PolicyExportFormat) (result PolicyContract, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/APIPolicyClient.Get") defer func() { @@ -269,7 +270,7 @@ func (client APIPolicyClient) Get(ctx context.Context, resourceGroupName string, return result, validation.NewError("apimanagement.APIPolicyClient", "Get", err.Error()) } - req, err := client.GetPreparer(ctx, resourceGroupName, serviceName, apiid) + req, err := client.GetPreparer(ctx, resourceGroupName, serviceName, apiid, formatParameter) if err != nil { err = autorest.NewErrorWithError(err, "apimanagement.APIPolicyClient", "Get", nil, "Failure preparing request") return @@ -291,7 +292,7 @@ func (client APIPolicyClient) Get(ctx context.Context, resourceGroupName string, } // GetPreparer prepares the Get request. -func (client APIPolicyClient) GetPreparer(ctx context.Context, resourceGroupName string, serviceName string, apiid string) (*http.Request, error) { +func (client APIPolicyClient) GetPreparer(ctx context.Context, resourceGroupName string, serviceName string, apiid string, formatParameter PolicyExportFormat) (*http.Request, error) { pathParameters := map[string]interface{}{ "apiId": autorest.Encode("path", apiid), "policyId": autorest.Encode("path", "policy"), @@ -304,6 +305,11 @@ func (client APIPolicyClient) GetPreparer(ctx context.Context, resourceGroupName queryParameters := map[string]interface{}{ "api-version": APIVersion, } + if len(string(formatParameter)) > 0 { + queryParameters["format"] = autorest.Encode("query", formatParameter) + } else { + queryParameters["format"] = autorest.Encode("query", "xml") + } preparer := autorest.CreatePreparer( autorest.AsGet(), diff --git a/services/apimanagement/mgmt/2019-01-01/apimanagement/models.go b/services/apimanagement/mgmt/2019-01-01/apimanagement/models.go index 0c0b1d4110e6..d718d9cb0f37 100644 --- a/services/apimanagement/mgmt/2019-01-01/apimanagement/models.go +++ b/services/apimanagement/mgmt/2019-01-01/apimanagement/models.go @@ -450,6 +450,27 @@ func PossiblePolicyContentFormatValues() []PolicyContentFormat { return []PolicyContentFormat{Rawxml, RawxmlLink, XML, XMLLink} } +// PolicyExportFormat enumerates the values for policy export format. +type PolicyExportFormat string + +const ( + // PolicyExportFormatRawxml The contents are inline and Content type is a non XML encoded policy document. + PolicyExportFormatRawxml PolicyExportFormat = "rawxml" + // PolicyExportFormatRawxmlLink The policy document is not XML encoded is exported to a storage blob with + // SAS Key valid for 5 minutes. + PolicyExportFormatRawxmlLink PolicyExportFormat = "rawxml-link" + // PolicyExportFormatXML The contents are inline and Content type is an XML document. + PolicyExportFormatXML PolicyExportFormat = "xml" + // PolicyExportFormatXMLLink The policy XML document is exported to a storage blob with SAS key valid for 5 + // minutes. + PolicyExportFormatXMLLink PolicyExportFormat = "xml-link" +) + +// PossiblePolicyExportFormatValues returns an array of possible values for the PolicyExportFormat const type. +func PossiblePolicyExportFormatValues() []PolicyExportFormat { + return []PolicyExportFormat{PolicyExportFormatRawxml, PolicyExportFormatRawxmlLink, PolicyExportFormatXML, PolicyExportFormatXMLLink} +} + // PolicyScopeContract enumerates the values for policy scope contract. type PolicyScopeContract string diff --git a/services/apimanagement/mgmt/2019-01-01/apimanagement/policy.go b/services/apimanagement/mgmt/2019-01-01/apimanagement/policy.go index d813b88d83fc..a7b0e111e383 100644 --- a/services/apimanagement/mgmt/2019-01-01/apimanagement/policy.go +++ b/services/apimanagement/mgmt/2019-01-01/apimanagement/policy.go @@ -230,7 +230,8 @@ func (client PolicyClient) DeleteResponder(resp *http.Response) (result autorest // Parameters: // resourceGroupName - the name of the resource group. // serviceName - the name of the API Management service. -func (client PolicyClient) Get(ctx context.Context, resourceGroupName string, serviceName string) (result PolicyContract, err error) { +// formatParameter - policy Export Format. +func (client PolicyClient) Get(ctx context.Context, resourceGroupName string, serviceName string, formatParameter PolicyExportFormat) (result PolicyContract, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/PolicyClient.Get") defer func() { @@ -249,7 +250,7 @@ func (client PolicyClient) Get(ctx context.Context, resourceGroupName string, se return result, validation.NewError("apimanagement.PolicyClient", "Get", err.Error()) } - req, err := client.GetPreparer(ctx, resourceGroupName, serviceName) + req, err := client.GetPreparer(ctx, resourceGroupName, serviceName, formatParameter) if err != nil { err = autorest.NewErrorWithError(err, "apimanagement.PolicyClient", "Get", nil, "Failure preparing request") return @@ -271,7 +272,7 @@ func (client PolicyClient) Get(ctx context.Context, resourceGroupName string, se } // GetPreparer prepares the Get request. -func (client PolicyClient) GetPreparer(ctx context.Context, resourceGroupName string, serviceName string) (*http.Request, error) { +func (client PolicyClient) GetPreparer(ctx context.Context, resourceGroupName string, serviceName string, formatParameter PolicyExportFormat) (*http.Request, error) { pathParameters := map[string]interface{}{ "policyId": autorest.Encode("path", "policy"), "resourceGroupName": autorest.Encode("path", resourceGroupName), @@ -283,6 +284,11 @@ func (client PolicyClient) GetPreparer(ctx context.Context, resourceGroupName st queryParameters := map[string]interface{}{ "api-version": APIVersion, } + if len(string(formatParameter)) > 0 { + queryParameters["format"] = autorest.Encode("query", formatParameter) + } else { + queryParameters["format"] = autorest.Encode("query", "xml") + } preparer := autorest.CreatePreparer( autorest.AsGet(), diff --git a/services/apimanagement/mgmt/2019-01-01/apimanagement/productpolicy.go b/services/apimanagement/mgmt/2019-01-01/apimanagement/productpolicy.go index 4615e7023f90..af027b29282d 100644 --- a/services/apimanagement/mgmt/2019-01-01/apimanagement/productpolicy.go +++ b/services/apimanagement/mgmt/2019-01-01/apimanagement/productpolicy.go @@ -243,7 +243,8 @@ func (client ProductPolicyClient) DeleteResponder(resp *http.Response) (result a // resourceGroupName - the name of the resource group. // serviceName - the name of the API Management service. // productID - product identifier. Must be unique in the current API Management service instance. -func (client ProductPolicyClient) Get(ctx context.Context, resourceGroupName string, serviceName string, productID string) (result PolicyContract, err error) { +// formatParameter - policy Export Format. +func (client ProductPolicyClient) Get(ctx context.Context, resourceGroupName string, serviceName string, productID string, formatParameter PolicyExportFormat) (result PolicyContract, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/ProductPolicyClient.Get") defer func() { @@ -266,7 +267,7 @@ func (client ProductPolicyClient) Get(ctx context.Context, resourceGroupName str return result, validation.NewError("apimanagement.ProductPolicyClient", "Get", err.Error()) } - req, err := client.GetPreparer(ctx, resourceGroupName, serviceName, productID) + req, err := client.GetPreparer(ctx, resourceGroupName, serviceName, productID, formatParameter) if err != nil { err = autorest.NewErrorWithError(err, "apimanagement.ProductPolicyClient", "Get", nil, "Failure preparing request") return @@ -288,7 +289,7 @@ func (client ProductPolicyClient) Get(ctx context.Context, resourceGroupName str } // GetPreparer prepares the Get request. -func (client ProductPolicyClient) GetPreparer(ctx context.Context, resourceGroupName string, serviceName string, productID string) (*http.Request, error) { +func (client ProductPolicyClient) GetPreparer(ctx context.Context, resourceGroupName string, serviceName string, productID string, formatParameter PolicyExportFormat) (*http.Request, error) { pathParameters := map[string]interface{}{ "policyId": autorest.Encode("path", "policy"), "productId": autorest.Encode("path", productID), @@ -301,6 +302,11 @@ func (client ProductPolicyClient) GetPreparer(ctx context.Context, resourceGroup queryParameters := map[string]interface{}{ "api-version": APIVersion, } + if len(string(formatParameter)) > 0 { + queryParameters["format"] = autorest.Encode("query", formatParameter) + } else { + queryParameters["format"] = autorest.Encode("query", "xml") + } preparer := autorest.CreatePreparer( autorest.AsGet(),