Skip to content

Commit 28135b3

Browse files
JoyerJindunnryan
andauthored
[Az.PolicyInsight] Migrated SDK to autorest generated. (#27165)
* generate PolicyInsights SDK * update * Autorest powershell generate and migration, test case fix and playback * updated some tests and validated changes * modified comments * add license * Update AttestationTests.ps1 * sync latest autorest generated code --------- Co-authored-by: Ryan Dunn <[email protected]>
1 parent 7135b75 commit 28135b3

File tree

176 files changed

+53308
-9640
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

176 files changed

+53308
-9640
lines changed
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
// ----------------------------------------------------------------------------------
2+
//
3+
// Copyright Microsoft Corporation
4+
// Licensed under the Apache License, Version 2.0 (the "License");
5+
// you may not use this file except in compliance with the License.
6+
// You may obtain a copy of the License at
7+
// http://www.apache.org/licenses/LICENSE-2.0
8+
// Unless required by applicable law or agreed to in writing, software
9+
// distributed under the License is distributed on an "AS IS" BASIS,
10+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11+
// See the License for the specific language governing permissions and
12+
// limitations under the License.
13+
// ----------------------------------------------------------------------------------
14+
15+
using System.Collections.Generic;
16+
17+
namespace Microsoft.Azure.Management.PolicyInsights.Models
18+
{
19+
public partial class Attestation : Resource
20+
{
21+
public Attestation(string policyAssignmentId, string id = default(string), string name = default(string), string type = default(string), string policyDefinitionReferenceId = default(string), string complianceState = default(string), System.DateTime? expiresOn = default(System.DateTime?), string owner = default(string), string comments = default(string), IList<AttestationEvidence> evidence = default(IList<AttestationEvidence>), string provisioningState = default(string), System.DateTime? lastComplianceStateChangeAt = default(System.DateTime?), SystemData systemData = default(SystemData))
22+
: base(id, name, type)
23+
{
24+
PolicyAssignmentId = policyAssignmentId;
25+
PolicyDefinitionReferenceId = policyDefinitionReferenceId;
26+
ComplianceState = complianceState;
27+
ExpiresOn = expiresOn;
28+
Owner = owner;
29+
Comments = comments;
30+
Evidence = evidence;
31+
ProvisioningState = provisioningState;
32+
LastComplianceStateChangeAt = lastComplianceStateChangeAt;
33+
SystemData = systemData;
34+
CustomInit();
35+
}
36+
}
37+
}

src/PolicyInsights/PolicyInsights.Management.Sdk/Generated/AttestationsOperations.cs

Lines changed: 3288 additions & 0 deletions
Large diffs are not rendered by default.

src/PolicyInsights/PolicyInsights.Management.Sdk/Generated/AttestationsOperationsExtensions.cs

Lines changed: 661 additions & 0 deletions
Large diffs are not rendered by default.

src/PolicyInsights/PolicyInsights.Management.Sdk/Generated/IAttestationsOperations.cs

Lines changed: 470 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
// Copyright (c) Microsoft Corporation. All rights reserved.
2+
// Licensed under the MIT License. See License.txt in the project root for license information.
3+
// Code generated by Microsoft (R) AutoRest Code Generator.
4+
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
5+
6+
namespace Microsoft.Azure.Management.PolicyInsights
7+
{
8+
using Microsoft.Rest.Azure;
9+
using Models;
10+
11+
/// <summary>
12+
/// Operations operations.
13+
/// </summary>
14+
public partial interface IOperations
15+
{
16+
/// <summary>
17+
/// Lists available operations.
18+
/// </summary>
19+
/// <remarks>
20+
/// Lists available operations.
21+
/// </remarks>
22+
/// <param name='customHeaders'>
23+
/// The headers that will be added to request.
24+
/// </param>
25+
/// <param name='cancellationToken'>
26+
/// The cancellation token.
27+
/// </param>
28+
/// <exception cref="Microsoft.Rest.Azure.CloudException">
29+
/// Thrown when the operation returned an invalid status code
30+
/// </exception>
31+
/// <exception cref="Microsoft.Rest.SerializationException">
32+
/// Thrown when unable to deserialize the response
33+
/// </exception>
34+
System.Threading.Tasks.Task<Microsoft.Rest.Azure.AzureOperationResponse<OperationsListResults>> ListWithHttpMessagesAsync(System.Collections.Generic.Dictionary<string, System.Collections.Generic.List<string>> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
35+
36+
}
37+
}

src/PolicyInsights/PolicyInsights.Management.Sdk/Generated/IPolicyEventsOperations.cs

Lines changed: 427 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 106 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,106 @@
1+
// Copyright (c) Microsoft Corporation. All rights reserved.
2+
// Licensed under the MIT License. See License.txt in the project root for license information.
3+
// Code generated by Microsoft (R) AutoRest Code Generator.
4+
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
5+
6+
namespace Microsoft.Azure.Management.PolicyInsights
7+
{
8+
using Microsoft.Rest;
9+
using Microsoft.Rest.Azure;
10+
using Models;
11+
12+
/// <summary>
13+
///
14+
/// </summary>
15+
public partial interface IPolicyInsightsClient : System.IDisposable
16+
{
17+
/// <summary>
18+
/// The base URI of the service.
19+
/// </summary>
20+
System.Uri BaseUri { get; set; }
21+
22+
/// <summary>
23+
/// Gets or sets json serialization settings.
24+
/// </summary>
25+
Newtonsoft.Json.JsonSerializerSettings SerializationSettings { get; }
26+
27+
/// <summary>
28+
/// Gets or sets json deserialization settings.
29+
/// </summary>
30+
Newtonsoft.Json.JsonSerializerSettings DeserializationSettings { get; }
31+
32+
/// <summary>
33+
/// Credentials needed for the client to connect to Azure.
34+
/// </summary>
35+
Microsoft.Rest.ServiceClientCredentials Credentials { get;}
36+
37+
38+
/// <summary>
39+
/// Microsoft Azure subscription ID.
40+
/// </summary>
41+
string SubscriptionId { get; set;}
42+
43+
44+
/// <summary>
45+
/// The preferred language for the response.
46+
/// </summary>
47+
string AcceptLanguage { get; set;}
48+
49+
50+
/// <summary>
51+
/// The retry timeout in seconds for Long Running Operations. Default
52+
/// /// value is 30.
53+
/// </summary>
54+
int? LongRunningOperationRetryTimeout { get; set;}
55+
56+
57+
/// <summary>
58+
/// Whether a unique x-ms-client-request-id should be generated. When
59+
/// /// set to true a unique x-ms-client-request-id value is generated and
60+
/// /// included in each request. Default is true.
61+
/// </summary>
62+
bool? GenerateClientRequestId { get; set;}
63+
64+
65+
/// <summary>
66+
/// Gets the IPolicyTrackedResourcesOperations
67+
/// </summary>
68+
IPolicyTrackedResourcesOperations PolicyTrackedResources { get; }
69+
70+
/// <summary>
71+
/// Gets the IRemediationsOperations
72+
/// </summary>
73+
IRemediationsOperations Remediations { get; }
74+
75+
/// <summary>
76+
/// Gets the IPolicyEventsOperations
77+
/// </summary>
78+
IPolicyEventsOperations PolicyEvents { get; }
79+
80+
/// <summary>
81+
/// Gets the IPolicyStatesOperations
82+
/// </summary>
83+
IPolicyStatesOperations PolicyStates { get; }
84+
85+
/// <summary>
86+
/// Gets the IOperations
87+
/// </summary>
88+
IOperations Operations { get; }
89+
90+
/// <summary>
91+
/// Gets the IPolicyMetadataOperations
92+
/// </summary>
93+
IPolicyMetadataOperations PolicyMetadata { get; }
94+
95+
/// <summary>
96+
/// Gets the IPolicyRestrictionsOperations
97+
/// </summary>
98+
IPolicyRestrictionsOperations PolicyRestrictions { get; }
99+
100+
/// <summary>
101+
/// Gets the IAttestationsOperations
102+
/// </summary>
103+
IAttestationsOperations Attestations { get; }
104+
105+
}
106+
}
Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
// Copyright (c) Microsoft Corporation. All rights reserved.
2+
// Licensed under the MIT License. See License.txt in the project root for license information.
3+
// Code generated by Microsoft (R) AutoRest Code Generator.
4+
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
5+
6+
namespace Microsoft.Azure.Management.PolicyInsights
7+
{
8+
using Microsoft.Rest.Azure;
9+
using Models;
10+
11+
/// <summary>
12+
/// PolicyMetadataOperations operations.
13+
/// </summary>
14+
public partial interface IPolicyMetadataOperations
15+
{
16+
/// <summary>
17+
/// Get policy metadata resource.
18+
/// </summary>
19+
/// <remarks>
20+
/// Get policy metadata resource.
21+
/// </remarks>
22+
/// <param name='resourceName'>
23+
/// The name of the policy metadata resource.
24+
/// </param>
25+
/// <param name='customHeaders'>
26+
/// The headers that will be added to request.
27+
/// </param>
28+
/// <param name='cancellationToken'>
29+
/// The cancellation token.
30+
/// </param>
31+
/// <exception cref="Microsoft.Rest.Azure.CloudException">
32+
/// Thrown when the operation returned an invalid status code
33+
/// </exception>
34+
/// <exception cref="Microsoft.Rest.SerializationException">
35+
/// Thrown when unable to deserialize the response
36+
/// </exception>
37+
System.Threading.Tasks.Task<Microsoft.Rest.Azure.AzureOperationResponse<PolicyMetadata>> GetResourceWithHttpMessagesAsync(string resourceName, System.Collections.Generic.Dictionary<string, System.Collections.Generic.List<string>> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
38+
39+
/// <summary>
40+
/// Get a list of the policy metadata resources.
41+
/// </summary>
42+
/// <remarks>
43+
/// Get a list of the policy metadata resources.
44+
/// </remarks>
45+
/// <param name='queryOptions'>
46+
///
47+
/// </param>
48+
/// <param name='customHeaders'>
49+
/// The headers that will be added to request.
50+
/// </param>
51+
/// <param name='cancellationToken'>
52+
/// The cancellation token.
53+
/// </param>
54+
/// <exception cref="Microsoft.Rest.Azure.CloudException">
55+
/// Thrown when the operation returned an invalid status code
56+
/// </exception>
57+
/// <exception cref="Microsoft.Rest.SerializationException">
58+
/// Thrown when unable to deserialize the response
59+
/// </exception>
60+
System.Threading.Tasks.Task<Microsoft.Rest.Azure.AzureOperationResponse<Microsoft.Rest.Azure.IPage<SlimPolicyMetadata>>> ListWithHttpMessagesAsync(QueryOptions queryOptions = default(QueryOptions), System.Collections.Generic.Dictionary<string, System.Collections.Generic.List<string>> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
61+
62+
/// <summary>
63+
/// Get a list of the policy metadata resources.
64+
/// </summary>
65+
/// <remarks>
66+
/// Get a list of the policy metadata resources.
67+
/// </remarks>
68+
/// <param name='nextPageLink'>
69+
/// The NextLink from the previous successful call to List operation.
70+
/// </param>
71+
/// <param name='customHeaders'>
72+
/// The headers that will be added to request.
73+
/// </param>
74+
/// <param name='cancellationToken'>
75+
/// The cancellation token.
76+
/// </param>
77+
/// <exception cref="Microsoft.Rest.Azure.CloudException">
78+
/// Thrown when the operation returned an invalid status code
79+
/// </exception>
80+
/// <exception cref="Microsoft.Rest.SerializationException">
81+
/// Thrown when unable to deserialize the response
82+
/// </exception>
83+
System.Threading.Tasks.Task<Microsoft.Rest.Azure.AzureOperationResponse<Microsoft.Rest.Azure.IPage<SlimPolicyMetadata>>> ListNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary<string, System.Collections.Generic.List<string>> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
84+
85+
}
86+
}
Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
1+
// Copyright (c) Microsoft Corporation. All rights reserved.
2+
// Licensed under the MIT License. See License.txt in the project root for license information.
3+
// Code generated by Microsoft (R) AutoRest Code Generator.
4+
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
5+
6+
namespace Microsoft.Azure.Management.PolicyInsights
7+
{
8+
using Microsoft.Rest.Azure;
9+
using Models;
10+
11+
/// <summary>
12+
/// PolicyRestrictionsOperations operations.
13+
/// </summary>
14+
public partial interface IPolicyRestrictionsOperations
15+
{
16+
/// <summary>
17+
/// Checks what restrictions Azure Policy will place on a resource within a
18+
/// subscription.
19+
/// </summary>
20+
/// <remarks>
21+
/// Checks what restrictions Azure Policy will place on a resource within a
22+
/// subscription.
23+
/// </remarks>
24+
/// <param name='parameters'>
25+
/// The check policy restrictions parameters.
26+
/// </param>
27+
/// <param name='customHeaders'>
28+
/// The headers that will be added to request.
29+
/// </param>
30+
/// <param name='cancellationToken'>
31+
/// The cancellation token.
32+
/// </param>
33+
/// <exception cref="Microsoft.Rest.Azure.CloudException">
34+
/// Thrown when the operation returned an invalid status code
35+
/// </exception>
36+
/// <exception cref="Microsoft.Rest.SerializationException">
37+
/// Thrown when unable to deserialize the response
38+
/// </exception>
39+
System.Threading.Tasks.Task<Microsoft.Rest.Azure.AzureOperationResponse<CheckRestrictionsResult>> CheckAtSubscriptionScopeWithHttpMessagesAsync(CheckRestrictionsRequest parameters, System.Collections.Generic.Dictionary<string, System.Collections.Generic.List<string>> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
40+
41+
/// <summary>
42+
/// Checks what restrictions Azure Policy will place on a resource within a
43+
/// resource group. Use this when the resource group the resource will be
44+
/// created in is already known.
45+
/// </summary>
46+
/// <remarks>
47+
/// Checks what restrictions Azure Policy will place on a resource within a
48+
/// resource group. Use this when the resource group the resource will be
49+
/// created in is already known.
50+
/// </remarks>
51+
/// <param name='resourceGroupName'>
52+
/// The name of the resource group. The name is case insensitive.
53+
/// </param>
54+
/// <param name='parameters'>
55+
/// The check policy restrictions parameters.
56+
/// </param>
57+
/// <param name='customHeaders'>
58+
/// The headers that will be added to request.
59+
/// </param>
60+
/// <param name='cancellationToken'>
61+
/// The cancellation token.
62+
/// </param>
63+
/// <exception cref="Microsoft.Rest.Azure.CloudException">
64+
/// Thrown when the operation returned an invalid status code
65+
/// </exception>
66+
/// <exception cref="Microsoft.Rest.SerializationException">
67+
/// Thrown when unable to deserialize the response
68+
/// </exception>
69+
System.Threading.Tasks.Task<Microsoft.Rest.Azure.AzureOperationResponse<CheckRestrictionsResult>> CheckAtResourceGroupScopeWithHttpMessagesAsync(string resourceGroupName, CheckRestrictionsRequest parameters, System.Collections.Generic.Dictionary<string, System.Collections.Generic.List<string>> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
70+
71+
/// <summary>
72+
/// Checks what restrictions Azure Policy will place on resources within a
73+
/// management group.
74+
/// </summary>
75+
/// <remarks>
76+
/// Checks what restrictions Azure Policy will place on resources within a
77+
/// management group.
78+
/// </remarks>
79+
/// <param name='managementGroupId'>
80+
/// Management group ID.
81+
/// </param>
82+
/// <param name='parameters'>
83+
/// The check policy restrictions parameters.
84+
/// </param>
85+
/// <param name='customHeaders'>
86+
/// The headers that will be added to request.
87+
/// </param>
88+
/// <param name='cancellationToken'>
89+
/// The cancellation token.
90+
/// </param>
91+
/// <exception cref="Microsoft.Rest.Azure.CloudException">
92+
/// Thrown when the operation returned an invalid status code
93+
/// </exception>
94+
/// <exception cref="Microsoft.Rest.SerializationException">
95+
/// Thrown when unable to deserialize the response
96+
/// </exception>
97+
System.Threading.Tasks.Task<Microsoft.Rest.Azure.AzureOperationResponse<CheckRestrictionsResult>> CheckAtManagementGroupScopeWithHttpMessagesAsync(string managementGroupId, CheckManagementGroupRestrictionsRequest parameters, System.Collections.Generic.Dictionary<string, System.Collections.Generic.List<string>> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
98+
99+
}
100+
}

0 commit comments

Comments
 (0)