diff --git a/services/policyinsights/mgmt/2018-04-04/policyinsights/enums.go b/services/policyinsights/mgmt/2018-04-04/policyinsights/enums.go new file mode 100644 index 000000000000..bbc7aa9c2f76 --- /dev/null +++ b/services/policyinsights/mgmt/2018-04-04/policyinsights/enums.go @@ -0,0 +1,33 @@ +package policyinsights + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +// PolicyStatesResource enumerates the values for policy states resource. +type PolicyStatesResource string + +const ( + // Default ... + Default PolicyStatesResource = "default" + // Latest ... + Latest PolicyStatesResource = "latest" +) + +// PossiblePolicyStatesResourceValues returns an array of possible values for the PolicyStatesResource const type. +func PossiblePolicyStatesResourceValues() []PolicyStatesResource { + return []PolicyStatesResource{Default, Latest} +} diff --git a/services/policyinsights/mgmt/2018-04-04/policyinsights/models.go b/services/policyinsights/mgmt/2018-04-04/policyinsights/models.go index 464569a1d91f..cbf6745b4a2e 100644 --- a/services/policyinsights/mgmt/2018-04-04/policyinsights/models.go +++ b/services/policyinsights/mgmt/2018-04-04/policyinsights/models.go @@ -26,21 +26,6 @@ import ( // The package's fully qualified name. const fqdn = "github.com/Azure/azure-sdk-for-go/services/policyinsights/mgmt/2018-04-04/policyinsights" -// PolicyStatesResource enumerates the values for policy states resource. -type PolicyStatesResource string - -const ( - // Default ... - Default PolicyStatesResource = "default" - // Latest ... - Latest PolicyStatesResource = "latest" -) - -// PossiblePolicyStatesResourceValues returns an array of possible values for the PolicyStatesResource const type. -func PossiblePolicyStatesResourceValues() []PolicyStatesResource { - return []PolicyStatesResource{Default, Latest} -} - // Operation operation definition. type Operation struct { // Name - Operation name. @@ -998,6 +983,12 @@ type QueryFailureError struct { Message *string `json:"message,omitempty"` } +// MarshalJSON is the custom marshaler for QueryFailureError. +func (qf QueryFailureError) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + return json.Marshal(objectMap) +} + // String ... type String struct { autorest.Response `json:"-"` diff --git a/services/policyinsights/mgmt/2018-04-04/policyinsights/operations.go b/services/policyinsights/mgmt/2018-04-04/policyinsights/operations.go index 1cef960579ad..a8e866915cf7 100644 --- a/services/policyinsights/mgmt/2018-04-04/policyinsights/operations.go +++ b/services/policyinsights/mgmt/2018-04-04/policyinsights/operations.go @@ -100,7 +100,6 @@ func (client OperationsClient) ListSender(req *http.Request) (*http.Response, er func (client OperationsClient) ListResponder(resp *http.Response) (result OperationsListResults, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) diff --git a/services/policyinsights/mgmt/2018-04-04/policyinsights/policyevents.go b/services/policyinsights/mgmt/2018-04-04/policyinsights/policyevents.go index a20596f95cc9..7719977189a0 100644 --- a/services/policyinsights/mgmt/2018-04-04/policyinsights/policyevents.go +++ b/services/policyinsights/mgmt/2018-04-04/policyinsights/policyevents.go @@ -109,7 +109,6 @@ func (client PolicyEventsClient) GetMetadataSender(req *http.Request) (*http.Res func (client PolicyEventsClient) GetMetadataResponder(resp *http.Response) (result String, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result.Value), autorest.ByClosing()) @@ -223,7 +222,6 @@ func (client PolicyEventsClient) ListQueryResultsForManagementGroupSender(req *h func (client PolicyEventsClient) ListQueryResultsForManagementGroupResponder(resp *http.Response) (result PolicyEventsQueryResults, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -339,7 +337,6 @@ func (client PolicyEventsClient) ListQueryResultsForPolicyDefinitionSender(req * func (client PolicyEventsClient) ListQueryResultsForPolicyDefinitionResponder(resp *http.Response) (result PolicyEventsQueryResults, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -455,7 +452,6 @@ func (client PolicyEventsClient) ListQueryResultsForPolicySetDefinitionSender(re func (client PolicyEventsClient) ListQueryResultsForPolicySetDefinitionResponder(resp *http.Response) (result PolicyEventsQueryResults, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -568,7 +564,6 @@ func (client PolicyEventsClient) ListQueryResultsForResourceSender(req *http.Req func (client PolicyEventsClient) ListQueryResultsForResourceResponder(resp *http.Response) (result PolicyEventsQueryResults, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -683,7 +678,6 @@ func (client PolicyEventsClient) ListQueryResultsForResourceGroupSender(req *htt func (client PolicyEventsClient) ListQueryResultsForResourceGroupResponder(resp *http.Response) (result PolicyEventsQueryResults, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -802,7 +796,6 @@ func (client PolicyEventsClient) ListQueryResultsForResourceGroupLevelPolicyAssi func (client PolicyEventsClient) ListQueryResultsForResourceGroupLevelPolicyAssignmentResponder(resp *http.Response) (result PolicyEventsQueryResults, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -915,7 +908,6 @@ func (client PolicyEventsClient) ListQueryResultsForSubscriptionSender(req *http func (client PolicyEventsClient) ListQueryResultsForSubscriptionResponder(resp *http.Response) (result PolicyEventsQueryResults, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -1032,7 +1024,6 @@ func (client PolicyEventsClient) ListQueryResultsForSubscriptionLevelPolicyAssig func (client PolicyEventsClient) ListQueryResultsForSubscriptionLevelPolicyAssignmentResponder(resp *http.Response) (result PolicyEventsQueryResults, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) diff --git a/services/policyinsights/mgmt/2018-04-04/policyinsights/policystates.go b/services/policyinsights/mgmt/2018-04-04/policyinsights/policystates.go index cbb526fc46bf..27301e6e431e 100644 --- a/services/policyinsights/mgmt/2018-04-04/policyinsights/policystates.go +++ b/services/policyinsights/mgmt/2018-04-04/policyinsights/policystates.go @@ -109,7 +109,6 @@ func (client PolicyStatesClient) GetMetadataSender(req *http.Request) (*http.Res func (client PolicyStatesClient) GetMetadataResponder(resp *http.Response) (result String, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result.Value), autorest.ByClosing()) @@ -225,7 +224,6 @@ func (client PolicyStatesClient) ListQueryResultsForManagementGroupSender(req *h func (client PolicyStatesClient) ListQueryResultsForManagementGroupResponder(resp *http.Response) (result PolicyStatesQueryResults, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -343,7 +341,6 @@ func (client PolicyStatesClient) ListQueryResultsForPolicyDefinitionSender(req * func (client PolicyStatesClient) ListQueryResultsForPolicyDefinitionResponder(resp *http.Response) (result PolicyStatesQueryResults, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -461,7 +458,6 @@ func (client PolicyStatesClient) ListQueryResultsForPolicySetDefinitionSender(re func (client PolicyStatesClient) ListQueryResultsForPolicySetDefinitionResponder(resp *http.Response) (result PolicyStatesQueryResults, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -576,7 +572,6 @@ func (client PolicyStatesClient) ListQueryResultsForResourceSender(req *http.Req func (client PolicyStatesClient) ListQueryResultsForResourceResponder(resp *http.Response) (result PolicyStatesQueryResults, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -693,7 +688,6 @@ func (client PolicyStatesClient) ListQueryResultsForResourceGroupSender(req *htt func (client PolicyStatesClient) ListQueryResultsForResourceGroupResponder(resp *http.Response) (result PolicyStatesQueryResults, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -814,7 +808,6 @@ func (client PolicyStatesClient) ListQueryResultsForResourceGroupLevelPolicyAssi func (client PolicyStatesClient) ListQueryResultsForResourceGroupLevelPolicyAssignmentResponder(resp *http.Response) (result PolicyStatesQueryResults, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -929,7 +922,6 @@ func (client PolicyStatesClient) ListQueryResultsForSubscriptionSender(req *http func (client PolicyStatesClient) ListQueryResultsForSubscriptionResponder(resp *http.Response) (result PolicyStatesQueryResults, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -1048,7 +1040,6 @@ func (client PolicyStatesClient) ListQueryResultsForSubscriptionLevelPolicyAssig func (client PolicyStatesClient) ListQueryResultsForSubscriptionLevelPolicyAssignmentResponder(resp *http.Response) (result PolicyStatesQueryResults, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -1148,7 +1139,6 @@ func (client PolicyStatesClient) SummarizeForManagementGroupSender(req *http.Req func (client PolicyStatesClient) SummarizeForManagementGroupResponder(resp *http.Response) (result SummarizeResults, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -1250,7 +1240,6 @@ func (client PolicyStatesClient) SummarizeForPolicyDefinitionSender(req *http.Re func (client PolicyStatesClient) SummarizeForPolicyDefinitionResponder(resp *http.Response) (result SummarizeResults, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -1352,7 +1341,6 @@ func (client PolicyStatesClient) SummarizeForPolicySetDefinitionSender(req *http func (client PolicyStatesClient) SummarizeForPolicySetDefinitionResponder(resp *http.Response) (result SummarizeResults, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -1451,7 +1439,6 @@ func (client PolicyStatesClient) SummarizeForResourceSender(req *http.Request) ( func (client PolicyStatesClient) SummarizeForResourceResponder(resp *http.Response) (result SummarizeResults, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -1552,7 +1539,6 @@ func (client PolicyStatesClient) SummarizeForResourceGroupSender(req *http.Reque func (client PolicyStatesClient) SummarizeForResourceGroupResponder(resp *http.Response) (result SummarizeResults, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -1657,7 +1643,6 @@ func (client PolicyStatesClient) SummarizeForResourceGroupLevelPolicyAssignmentS func (client PolicyStatesClient) SummarizeForResourceGroupLevelPolicyAssignmentResponder(resp *http.Response) (result SummarizeResults, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -1756,7 +1741,6 @@ func (client PolicyStatesClient) SummarizeForSubscriptionSender(req *http.Reques func (client PolicyStatesClient) SummarizeForSubscriptionResponder(resp *http.Response) (result SummarizeResults, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -1858,7 +1842,6 @@ func (client PolicyStatesClient) SummarizeForSubscriptionLevelPolicyAssignmentSe func (client PolicyStatesClient) SummarizeForSubscriptionLevelPolicyAssignmentResponder(resp *http.Response) (result SummarizeResults, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) diff --git a/services/policyinsights/mgmt/2018-04-04/policyinsights/version.go b/services/policyinsights/mgmt/2018-04-04/policyinsights/version.go index 22fe6d195c90..95819fbdfb99 100644 --- a/services/policyinsights/mgmt/2018-04-04/policyinsights/version.go +++ b/services/policyinsights/mgmt/2018-04-04/policyinsights/version.go @@ -21,7 +21,7 @@ import "github.com/Azure/azure-sdk-for-go/version" // UserAgent returns the UserAgent string to use when sending http.Requests. func UserAgent() string { - return "Azure-SDK-For-Go/" + version.Number + " policyinsights/2018-04-04" + return "Azure-SDK-For-Go/" + Version() + " policyinsights/2018-04-04" } // Version returns the semantic version (see http://semver.org) of the client.