From f17f941c5454033439c14d85a40745cf6bbb883d Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Thu, 29 Apr 2021 06:50:53 +0000 Subject: [PATCH] CodeGen from PR 14161 in Azure/azure-rest-api-specs Merge 8ae3f9bc38d1e80ca62ea55dc52d1156c2c790ab into dad4abaabaf043b347551523185925fac5b72543 --- .../src/Generated/IResourceGraphClient.cs | 46 +- .../src/Generated/Models/ChangeCategory.cs | 60 ++ .../src/Generated/Models/ChangeType.cs | 66 ++ .../src/Generated/Models/DateTimeInterval.cs | 81 +++ .../Generated/Models/PropertyChangeType.cs | 66 ++ .../Generated/Models/ResourceChangeData.cs | 142 +++++ .../Models/ResourceChangeDataAfterSnapshot.cs | 65 ++ .../ResourceChangeDataBeforeSnapshot.cs | 65 ++ .../ResourceChangeDetailsRequestParameters.cs | 85 +++ .../Generated/Models/ResourceChangeList.cs | 80 +++ .../ResourceChangesRequestParameters.cs | 147 +++++ ...esourceChangesRequestParametersInterval.cs | 63 ++ .../Models/ResourcePropertyChange.cs | 103 ++++ .../Generated/Models/ResourceSnapshotData.cs | 91 +++ .../Models/ResourcesHistoryRequest.cs | 79 +++ .../Models/ResourcesHistoryRequestOptions.cs | 88 +++ .../src/Generated/Operations.cs | 16 +- .../src/Generated/ResourceGraphClient.cs | 567 +++++++++++++++++- .../ResourceGraphClientExtensions.cs | 102 ++++ .../Generated/SdkInfo_ResourceGraphClient.cs | 14 +- 20 files changed, 1986 insertions(+), 40 deletions(-) create mode 100644 sdk/resourcegraph/Microsoft.Azure.Management.ResourceGraph/src/Generated/Models/ChangeCategory.cs create mode 100644 sdk/resourcegraph/Microsoft.Azure.Management.ResourceGraph/src/Generated/Models/ChangeType.cs create mode 100644 sdk/resourcegraph/Microsoft.Azure.Management.ResourceGraph/src/Generated/Models/DateTimeInterval.cs create mode 100644 sdk/resourcegraph/Microsoft.Azure.Management.ResourceGraph/src/Generated/Models/PropertyChangeType.cs create mode 100644 sdk/resourcegraph/Microsoft.Azure.Management.ResourceGraph/src/Generated/Models/ResourceChangeData.cs create mode 100644 sdk/resourcegraph/Microsoft.Azure.Management.ResourceGraph/src/Generated/Models/ResourceChangeDataAfterSnapshot.cs create mode 100644 sdk/resourcegraph/Microsoft.Azure.Management.ResourceGraph/src/Generated/Models/ResourceChangeDataBeforeSnapshot.cs create mode 100644 sdk/resourcegraph/Microsoft.Azure.Management.ResourceGraph/src/Generated/Models/ResourceChangeDetailsRequestParameters.cs create mode 100644 sdk/resourcegraph/Microsoft.Azure.Management.ResourceGraph/src/Generated/Models/ResourceChangeList.cs create mode 100644 sdk/resourcegraph/Microsoft.Azure.Management.ResourceGraph/src/Generated/Models/ResourceChangesRequestParameters.cs create mode 100644 sdk/resourcegraph/Microsoft.Azure.Management.ResourceGraph/src/Generated/Models/ResourceChangesRequestParametersInterval.cs create mode 100644 sdk/resourcegraph/Microsoft.Azure.Management.ResourceGraph/src/Generated/Models/ResourcePropertyChange.cs create mode 100644 sdk/resourcegraph/Microsoft.Azure.Management.ResourceGraph/src/Generated/Models/ResourceSnapshotData.cs create mode 100644 sdk/resourcegraph/Microsoft.Azure.Management.ResourceGraph/src/Generated/Models/ResourcesHistoryRequest.cs create mode 100644 sdk/resourcegraph/Microsoft.Azure.Management.ResourceGraph/src/Generated/Models/ResourcesHistoryRequestOptions.cs diff --git a/sdk/resourcegraph/Microsoft.Azure.Management.ResourceGraph/src/Generated/IResourceGraphClient.cs b/sdk/resourcegraph/Microsoft.Azure.Management.ResourceGraph/src/Generated/IResourceGraphClient.cs index 13b63ca9df67..89da58e16e79 100644 --- a/sdk/resourcegraph/Microsoft.Azure.Management.ResourceGraph/src/Generated/IResourceGraphClient.cs +++ b/sdk/resourcegraph/Microsoft.Azure.Management.ResourceGraph/src/Generated/IResourceGraphClient.cs @@ -44,11 +44,6 @@ public partial interface IResourceGraphClient : System.IDisposable /// ServiceClientCredentials Credentials { get; } - /// - /// Api Version. - /// - string ApiVersion { get; } - /// /// The preferred language for the response. /// @@ -73,6 +68,34 @@ public partial interface IResourceGraphClient : System.IDisposable /// IOperations Operations { get; } + /// + /// List changes to a resource for a given time interval. + /// + /// + /// the parameters for this request for changes. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> ResourceChangesWithHttpMessagesAsync(ResourceChangesRequestParameters parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// Get resource change details. + /// + /// + /// The parameters for this request for resource change details. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task>> ResourceChangeDetailsWithHttpMessagesAsync(ResourceChangeDetailsRequestParameters parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// /// Queries the resources managed by Azure Resource Manager for scopes /// specified in the request. @@ -88,5 +111,18 @@ public partial interface IResourceGraphClient : System.IDisposable /// Task> ResourcesWithHttpMessagesAsync(QueryRequest query, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// List all snapshots of a resource for a given time interval. + /// + /// + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> ResourcesHistoryWithHttpMessagesAsync(ResourcesHistoryRequest request, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + } } diff --git a/sdk/resourcegraph/Microsoft.Azure.Management.ResourceGraph/src/Generated/Models/ChangeCategory.cs b/sdk/resourcegraph/Microsoft.Azure.Management.ResourceGraph/src/Generated/Models/ChangeCategory.cs new file mode 100644 index 000000000000..d178c1890da1 --- /dev/null +++ b/sdk/resourcegraph/Microsoft.Azure.Management.ResourceGraph/src/Generated/Models/ChangeCategory.cs @@ -0,0 +1,60 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.ResourceGraph.Models +{ + using Newtonsoft.Json; + using Newtonsoft.Json.Converters; + using System.Runtime; + using System.Runtime.Serialization; + + /// + /// Defines values for ChangeCategory. + /// + [JsonConverter(typeof(StringEnumConverter))] + public enum ChangeCategory + { + [EnumMember(Value = "User")] + User, + [EnumMember(Value = "System")] + System + } + internal static class ChangeCategoryEnumExtension + { + internal static string ToSerializedValue(this ChangeCategory? value) + { + return value == null ? null : ((ChangeCategory)value).ToSerializedValue(); + } + + internal static string ToSerializedValue(this ChangeCategory value) + { + switch( value ) + { + case ChangeCategory.User: + return "User"; + case ChangeCategory.System: + return "System"; + } + return null; + } + + internal static ChangeCategory? ParseChangeCategory(this string value) + { + switch( value ) + { + case "User": + return ChangeCategory.User; + case "System": + return ChangeCategory.System; + } + return null; + } + } +} diff --git a/sdk/resourcegraph/Microsoft.Azure.Management.ResourceGraph/src/Generated/Models/ChangeType.cs b/sdk/resourcegraph/Microsoft.Azure.Management.ResourceGraph/src/Generated/Models/ChangeType.cs new file mode 100644 index 000000000000..a4cec0160bb0 --- /dev/null +++ b/sdk/resourcegraph/Microsoft.Azure.Management.ResourceGraph/src/Generated/Models/ChangeType.cs @@ -0,0 +1,66 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.ResourceGraph.Models +{ + using Newtonsoft.Json; + using Newtonsoft.Json.Converters; + using System.Runtime; + using System.Runtime.Serialization; + + /// + /// Defines values for ChangeType. + /// + [JsonConverter(typeof(StringEnumConverter))] + public enum ChangeType + { + [EnumMember(Value = "Create")] + Create, + [EnumMember(Value = "Update")] + Update, + [EnumMember(Value = "Delete")] + Delete + } + internal static class ChangeTypeEnumExtension + { + internal static string ToSerializedValue(this ChangeType? value) + { + return value == null ? null : ((ChangeType)value).ToSerializedValue(); + } + + internal static string ToSerializedValue(this ChangeType value) + { + switch( value ) + { + case ChangeType.Create: + return "Create"; + case ChangeType.Update: + return "Update"; + case ChangeType.Delete: + return "Delete"; + } + return null; + } + + internal static ChangeType? ParseChangeType(this string value) + { + switch( value ) + { + case "Create": + return ChangeType.Create; + case "Update": + return ChangeType.Update; + case "Delete": + return ChangeType.Delete; + } + return null; + } + } +} diff --git a/sdk/resourcegraph/Microsoft.Azure.Management.ResourceGraph/src/Generated/Models/DateTimeInterval.cs b/sdk/resourcegraph/Microsoft.Azure.Management.ResourceGraph/src/Generated/Models/DateTimeInterval.cs new file mode 100644 index 000000000000..d9afca89cddf --- /dev/null +++ b/sdk/resourcegraph/Microsoft.Azure.Management.ResourceGraph/src/Generated/Models/DateTimeInterval.cs @@ -0,0 +1,81 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.ResourceGraph.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// An interval in time specifying the date and time for the inclusive + /// start and exclusive end, i.e. `[start, end)`. + /// + public partial class DateTimeInterval + { + /// + /// Initializes a new instance of the DateTimeInterval class. + /// + public DateTimeInterval() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the DateTimeInterval class. + /// + /// A datetime indicating the inclusive/closed + /// start of the time interval, i.e. `[`**`start`**`, end)`. Specifying + /// a `start` that occurs chronologically after `end` will result in an + /// error. + /// A datetime indicating the exclusive/open end of + /// the time interval, i.e. `[start, `**`end`**`)`. Specifying an `end` + /// that occurs chronologically before `start` will result in an + /// error. + public DateTimeInterval(System.DateTime start, System.DateTime end) + { + Start = start; + End = end; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets a datetime indicating the inclusive/closed start of + /// the time interval, i.e. `[`**`start`**`, end)`. Specifying a + /// `start` that occurs chronologically after `end` will result in an + /// error. + /// + [JsonProperty(PropertyName = "start")] + public System.DateTime Start { get; set; } + + /// + /// Gets or sets a datetime indicating the exclusive/open end of the + /// time interval, i.e. `[start, `**`end`**`)`. Specifying an `end` + /// that occurs chronologically before `start` will result in an error. + /// + [JsonProperty(PropertyName = "end")] + public System.DateTime End { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + //Nothing to validate + } + } +} diff --git a/sdk/resourcegraph/Microsoft.Azure.Management.ResourceGraph/src/Generated/Models/PropertyChangeType.cs b/sdk/resourcegraph/Microsoft.Azure.Management.ResourceGraph/src/Generated/Models/PropertyChangeType.cs new file mode 100644 index 000000000000..c8b071bdfe7d --- /dev/null +++ b/sdk/resourcegraph/Microsoft.Azure.Management.ResourceGraph/src/Generated/Models/PropertyChangeType.cs @@ -0,0 +1,66 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.ResourceGraph.Models +{ + using Newtonsoft.Json; + using Newtonsoft.Json.Converters; + using System.Runtime; + using System.Runtime.Serialization; + + /// + /// Defines values for PropertyChangeType. + /// + [JsonConverter(typeof(StringEnumConverter))] + public enum PropertyChangeType + { + [EnumMember(Value = "Insert")] + Insert, + [EnumMember(Value = "Update")] + Update, + [EnumMember(Value = "Remove")] + Remove + } + internal static class PropertyChangeTypeEnumExtension + { + internal static string ToSerializedValue(this PropertyChangeType? value) + { + return value == null ? null : ((PropertyChangeType)value).ToSerializedValue(); + } + + internal static string ToSerializedValue(this PropertyChangeType value) + { + switch( value ) + { + case PropertyChangeType.Insert: + return "Insert"; + case PropertyChangeType.Update: + return "Update"; + case PropertyChangeType.Remove: + return "Remove"; + } + return null; + } + + internal static PropertyChangeType? ParsePropertyChangeType(this string value) + { + switch( value ) + { + case "Insert": + return PropertyChangeType.Insert; + case "Update": + return PropertyChangeType.Update; + case "Remove": + return PropertyChangeType.Remove; + } + return null; + } + } +} diff --git a/sdk/resourcegraph/Microsoft.Azure.Management.ResourceGraph/src/Generated/Models/ResourceChangeData.cs b/sdk/resourcegraph/Microsoft.Azure.Management.ResourceGraph/src/Generated/Models/ResourceChangeData.cs new file mode 100644 index 000000000000..425f231ceb8a --- /dev/null +++ b/sdk/resourcegraph/Microsoft.Azure.Management.ResourceGraph/src/Generated/Models/ResourceChangeData.cs @@ -0,0 +1,142 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.ResourceGraph.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Data on a specific change, represented by a pair of before and after + /// resource snapshots. + /// + public partial class ResourceChangeData + { + /// + /// Initializes a new instance of the ResourceChangeData class. + /// + public ResourceChangeData() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the ResourceChangeData class. + /// + /// The change ID. Valid and unique within the + /// specified resource only. + /// The snapshot before the + /// change. + /// The snapshot after the change. + /// The resource for a change. + /// The change type for snapshot. + /// PropertyChanges will be provided in case of Update change type. + /// Possible values include: 'Create', 'Update', 'Delete' + /// An array of resource property + /// change + public ResourceChangeData(string changeId, ResourceChangeDataBeforeSnapshot beforeSnapshot, ResourceChangeDataAfterSnapshot afterSnapshot, string resourceId = default(string), ChangeType? changeType = default(ChangeType?), IList propertyChanges = default(IList)) + { + ResourceId = resourceId; + ChangeId = changeId; + BeforeSnapshot = beforeSnapshot; + AfterSnapshot = afterSnapshot; + ChangeType = changeType; + PropertyChanges = propertyChanges; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the resource for a change. + /// + [JsonProperty(PropertyName = "resourceId")] + public string ResourceId { get; set; } + + /// + /// Gets or sets the change ID. Valid and unique within the specified + /// resource only. + /// + [JsonProperty(PropertyName = "changeId")] + public string ChangeId { get; set; } + + /// + /// Gets or sets the snapshot before the change. + /// + [JsonProperty(PropertyName = "beforeSnapshot")] + public ResourceChangeDataBeforeSnapshot BeforeSnapshot { get; set; } + + /// + /// Gets or sets the snapshot after the change. + /// + [JsonProperty(PropertyName = "afterSnapshot")] + public ResourceChangeDataAfterSnapshot AfterSnapshot { get; set; } + + /// + /// Gets or sets the change type for snapshot. PropertyChanges will be + /// provided in case of Update change type. Possible values include: + /// 'Create', 'Update', 'Delete' + /// + [JsonProperty(PropertyName = "changeType")] + public ChangeType? ChangeType { get; set; } + + /// + /// Gets or sets an array of resource property change + /// + [JsonProperty(PropertyName = "propertyChanges")] + public IList PropertyChanges { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (ChangeId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "ChangeId"); + } + if (BeforeSnapshot == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "BeforeSnapshot"); + } + if (AfterSnapshot == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "AfterSnapshot"); + } + if (BeforeSnapshot != null) + { + BeforeSnapshot.Validate(); + } + if (AfterSnapshot != null) + { + AfterSnapshot.Validate(); + } + if (PropertyChanges != null) + { + foreach (var element in PropertyChanges) + { + if (element != null) + { + element.Validate(); + } + } + } + } + } +} diff --git a/sdk/resourcegraph/Microsoft.Azure.Management.ResourceGraph/src/Generated/Models/ResourceChangeDataAfterSnapshot.cs b/sdk/resourcegraph/Microsoft.Azure.Management.ResourceGraph/src/Generated/Models/ResourceChangeDataAfterSnapshot.cs new file mode 100644 index 000000000000..c4b5470fb019 --- /dev/null +++ b/sdk/resourcegraph/Microsoft.Azure.Management.ResourceGraph/src/Generated/Models/ResourceChangeDataAfterSnapshot.cs @@ -0,0 +1,65 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.ResourceGraph.Models +{ + using System.Linq; + + /// + /// The snapshot after the change. + /// + public partial class ResourceChangeDataAfterSnapshot : ResourceSnapshotData + { + /// + /// Initializes a new instance of the ResourceChangeDataAfterSnapshot + /// class. + /// + public ResourceChangeDataAfterSnapshot() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the ResourceChangeDataAfterSnapshot + /// class. + /// + /// The time when the snapshot was created. + /// The snapshot timestamp provides an approximation as to when a + /// modification to a resource was detected. There can be a difference + /// between the actual modification time and the detection time. This + /// is due to differences in how operations that modify a resource are + /// processed, versus how operation that record resource snapshots are + /// processed. + /// The ID of the snapshot. + /// The resource snapshot content (in + /// resourceChangeDetails response only). + public ResourceChangeDataAfterSnapshot(System.DateTime timestamp, string snapshotId = default(string), object content = default(object)) + : base(timestamp, snapshotId, content) + { + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + } + } +} diff --git a/sdk/resourcegraph/Microsoft.Azure.Management.ResourceGraph/src/Generated/Models/ResourceChangeDataBeforeSnapshot.cs b/sdk/resourcegraph/Microsoft.Azure.Management.ResourceGraph/src/Generated/Models/ResourceChangeDataBeforeSnapshot.cs new file mode 100644 index 000000000000..d9849ec63a04 --- /dev/null +++ b/sdk/resourcegraph/Microsoft.Azure.Management.ResourceGraph/src/Generated/Models/ResourceChangeDataBeforeSnapshot.cs @@ -0,0 +1,65 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.ResourceGraph.Models +{ + using System.Linq; + + /// + /// The snapshot before the change. + /// + public partial class ResourceChangeDataBeforeSnapshot : ResourceSnapshotData + { + /// + /// Initializes a new instance of the ResourceChangeDataBeforeSnapshot + /// class. + /// + public ResourceChangeDataBeforeSnapshot() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the ResourceChangeDataBeforeSnapshot + /// class. + /// + /// The time when the snapshot was created. + /// The snapshot timestamp provides an approximation as to when a + /// modification to a resource was detected. There can be a difference + /// between the actual modification time and the detection time. This + /// is due to differences in how operations that modify a resource are + /// processed, versus how operation that record resource snapshots are + /// processed. + /// The ID of the snapshot. + /// The resource snapshot content (in + /// resourceChangeDetails response only). + public ResourceChangeDataBeforeSnapshot(System.DateTime timestamp, string snapshotId = default(string), object content = default(object)) + : base(timestamp, snapshotId, content) + { + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + } + } +} diff --git a/sdk/resourcegraph/Microsoft.Azure.Management.ResourceGraph/src/Generated/Models/ResourceChangeDetailsRequestParameters.cs b/sdk/resourcegraph/Microsoft.Azure.Management.ResourceGraph/src/Generated/Models/ResourceChangeDetailsRequestParameters.cs new file mode 100644 index 000000000000..a4111a303189 --- /dev/null +++ b/sdk/resourcegraph/Microsoft.Azure.Management.ResourceGraph/src/Generated/Models/ResourceChangeDetailsRequestParameters.cs @@ -0,0 +1,85 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.ResourceGraph.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// The parameters for a specific change details request. + /// + public partial class ResourceChangeDetailsRequestParameters + { + /// + /// Initializes a new instance of the + /// ResourceChangeDetailsRequestParameters class. + /// + public ResourceChangeDetailsRequestParameters() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the + /// ResourceChangeDetailsRequestParameters class. + /// + /// Specifies the list of resources for a + /// change details request. + /// Specifies the list of change IDs for a + /// change details request. + public ResourceChangeDetailsRequestParameters(IList resourceIds, IList changeIds) + { + ResourceIds = resourceIds; + ChangeIds = changeIds; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets specifies the list of resources for a change details + /// request. + /// + [JsonProperty(PropertyName = "resourceIds")] + public IList ResourceIds { get; set; } + + /// + /// Gets or sets specifies the list of change IDs for a change details + /// request. + /// + [JsonProperty(PropertyName = "changeIds")] + public IList ChangeIds { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (ResourceIds == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "ResourceIds"); + } + if (ChangeIds == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "ChangeIds"); + } + } + } +} diff --git a/sdk/resourcegraph/Microsoft.Azure.Management.ResourceGraph/src/Generated/Models/ResourceChangeList.cs b/sdk/resourcegraph/Microsoft.Azure.Management.ResourceGraph/src/Generated/Models/ResourceChangeList.cs new file mode 100644 index 000000000000..1b3757e0f024 --- /dev/null +++ b/sdk/resourcegraph/Microsoft.Azure.Management.ResourceGraph/src/Generated/Models/ResourceChangeList.cs @@ -0,0 +1,80 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.ResourceGraph.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// A list of changes associated with a resource over a specific time + /// interval. + /// + public partial class ResourceChangeList + { + /// + /// Initializes a new instance of the ResourceChangeList class. + /// + public ResourceChangeList() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the ResourceChangeList class. + /// + /// The pageable value returned by the operation, + /// i.e. a list of changes to the resource. + /// + /// - The list is ordered from the most recent changes to the least + /// recent changes. + /// - This list will be empty if there were no changes during the + /// requested interval. + /// - The `Before` snapshot timestamp value of the oldest change can be + /// outside of the specified time interval. + /// Skip token that encodes the skip + /// information while executing the current request + public ResourceChangeList(IList changes = default(IList), object skipToken = default(object)) + { + Changes = changes; + SkipToken = skipToken; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the pageable value returned by the operation, i.e. a + /// list of changes to the resource. + /// + /// - The list is ordered from the most recent changes to the least + /// recent changes. + /// - This list will be empty if there were no changes during the + /// requested interval. + /// - The `Before` snapshot timestamp value of the oldest change can be + /// outside of the specified time interval. + /// + [JsonProperty(PropertyName = "changes")] + public IList Changes { get; set; } + + /// + /// Gets or sets skip token that encodes the skip information while + /// executing the current request + /// + [JsonProperty(PropertyName = "$skipToken")] + public object SkipToken { get; set; } + + } +} diff --git a/sdk/resourcegraph/Microsoft.Azure.Management.ResourceGraph/src/Generated/Models/ResourceChangesRequestParameters.cs b/sdk/resourcegraph/Microsoft.Azure.Management.ResourceGraph/src/Generated/Models/ResourceChangesRequestParameters.cs new file mode 100644 index 000000000000..8d7a0cb44f21 --- /dev/null +++ b/sdk/resourcegraph/Microsoft.Azure.Management.ResourceGraph/src/Generated/Models/ResourceChangesRequestParameters.cs @@ -0,0 +1,147 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.ResourceGraph.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// The parameters for a specific changes request. + /// + public partial class ResourceChangesRequestParameters + { + /// + /// Initializes a new instance of the ResourceChangesRequestParameters + /// class. + /// + public ResourceChangesRequestParameters() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the ResourceChangesRequestParameters + /// class. + /// + /// Specifies the date and time interval for a + /// changes request. + /// Specifies the list of resources for a + /// changes request. + /// The subscription id of resources to + /// query the changes from. + /// Acts as the continuation token for paged + /// responses. + /// The maximum number of changes the client can + /// accept in a paged response. + /// The table name to query resources from. + /// The flag if set to true will + /// fetch property changes + /// The flag if set to true will fetch + /// change snapshots + public ResourceChangesRequestParameters(ResourceChangesRequestParametersInterval interval, IList resourceIds = default(IList), string subscriptionId = default(string), string skipToken = default(string), int? top = default(int?), string table = default(string), bool? fetchPropertyChanges = default(bool?), bool? fetchSnapshots = default(bool?)) + { + ResourceIds = resourceIds; + SubscriptionId = subscriptionId; + Interval = interval; + SkipToken = skipToken; + Top = top; + Table = table; + FetchPropertyChanges = fetchPropertyChanges; + FetchSnapshots = fetchSnapshots; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets specifies the list of resources for a changes request. + /// + [JsonProperty(PropertyName = "resourceIds")] + public IList ResourceIds { get; set; } + + /// + /// Gets or sets the subscription id of resources to query the changes + /// from. + /// + [JsonProperty(PropertyName = "subscriptionId")] + public string SubscriptionId { get; set; } + + /// + /// Gets or sets specifies the date and time interval for a changes + /// request. + /// + [JsonProperty(PropertyName = "interval")] + public ResourceChangesRequestParametersInterval Interval { get; set; } + + /// + /// Gets or sets acts as the continuation token for paged responses. + /// + [JsonProperty(PropertyName = "$skipToken")] + public string SkipToken { get; set; } + + /// + /// Gets or sets the maximum number of changes the client can accept in + /// a paged response. + /// + [JsonProperty(PropertyName = "$top")] + public int? Top { get; set; } + + /// + /// Gets or sets the table name to query resources from. + /// + [JsonProperty(PropertyName = "table")] + public string Table { get; set; } + + /// + /// Gets or sets the flag if set to true will fetch property changes + /// + [JsonProperty(PropertyName = "fetchPropertyChanges")] + public bool? FetchPropertyChanges { get; set; } + + /// + /// Gets or sets the flag if set to true will fetch change snapshots + /// + [JsonProperty(PropertyName = "fetchSnapshots")] + public bool? FetchSnapshots { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Interval == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Interval"); + } + if (Interval != null) + { + Interval.Validate(); + } + if (Top > 1000) + { + throw new ValidationException(ValidationRules.InclusiveMaximum, "Top", 1000); + } + if (Top < 1) + { + throw new ValidationException(ValidationRules.InclusiveMinimum, "Top", 1); + } + } + } +} diff --git a/sdk/resourcegraph/Microsoft.Azure.Management.ResourceGraph/src/Generated/Models/ResourceChangesRequestParametersInterval.cs b/sdk/resourcegraph/Microsoft.Azure.Management.ResourceGraph/src/Generated/Models/ResourceChangesRequestParametersInterval.cs new file mode 100644 index 000000000000..8e117167d651 --- /dev/null +++ b/sdk/resourcegraph/Microsoft.Azure.Management.ResourceGraph/src/Generated/Models/ResourceChangesRequestParametersInterval.cs @@ -0,0 +1,63 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.ResourceGraph.Models +{ + using System.Linq; + + /// + /// Specifies the date and time interval for a changes request. + /// + public partial class ResourceChangesRequestParametersInterval : DateTimeInterval + { + /// + /// Initializes a new instance of the + /// ResourceChangesRequestParametersInterval class. + /// + public ResourceChangesRequestParametersInterval() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the + /// ResourceChangesRequestParametersInterval class. + /// + /// A datetime indicating the inclusive/closed + /// start of the time interval, i.e. `[`**`start`**`, end)`. Specifying + /// a `start` that occurs chronologically after `end` will result in an + /// error. + /// A datetime indicating the exclusive/open end of + /// the time interval, i.e. `[start, `**`end`**`)`. Specifying an `end` + /// that occurs chronologically before `start` will result in an + /// error. + public ResourceChangesRequestParametersInterval(System.DateTime start, System.DateTime end) + : base(start, end) + { + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + } + } +} diff --git a/sdk/resourcegraph/Microsoft.Azure.Management.ResourceGraph/src/Generated/Models/ResourcePropertyChange.cs b/sdk/resourcegraph/Microsoft.Azure.Management.ResourceGraph/src/Generated/Models/ResourcePropertyChange.cs new file mode 100644 index 000000000000..88af33680740 --- /dev/null +++ b/sdk/resourcegraph/Microsoft.Azure.Management.ResourceGraph/src/Generated/Models/ResourcePropertyChange.cs @@ -0,0 +1,103 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.ResourceGraph.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Linq; + + /// + /// The resource property change + /// + public partial class ResourcePropertyChange + { + /// + /// Initializes a new instance of the ResourcePropertyChange class. + /// + public ResourcePropertyChange() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the ResourcePropertyChange class. + /// + /// The property name + /// The change category. Possible values + /// include: 'User', 'System' + /// The property change Type. Possible + /// values include: 'Insert', 'Update', 'Remove' + /// The property value in before + /// snapshot + /// The property value in after + /// snapshot + public ResourcePropertyChange(string propertyName, ChangeCategory changeCategory, PropertyChangeType propertyChangeType, string beforeValue = default(string), string afterValue = default(string)) + { + PropertyName = propertyName; + BeforeValue = beforeValue; + AfterValue = afterValue; + ChangeCategory = changeCategory; + PropertyChangeType = propertyChangeType; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the property name + /// + [JsonProperty(PropertyName = "propertyName")] + public string PropertyName { get; set; } + + /// + /// Gets or sets the property value in before snapshot + /// + [JsonProperty(PropertyName = "beforeValue")] + public string BeforeValue { get; set; } + + /// + /// Gets or sets the property value in after snapshot + /// + [JsonProperty(PropertyName = "afterValue")] + public string AfterValue { get; set; } + + /// + /// Gets or sets the change category. Possible values include: 'User', + /// 'System' + /// + [JsonProperty(PropertyName = "changeCategory")] + public ChangeCategory ChangeCategory { get; set; } + + /// + /// Gets or sets the property change Type. Possible values include: + /// 'Insert', 'Update', 'Remove' + /// + [JsonProperty(PropertyName = "propertyChangeType")] + public PropertyChangeType PropertyChangeType { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (PropertyName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "PropertyName"); + } + } + } +} diff --git a/sdk/resourcegraph/Microsoft.Azure.Management.ResourceGraph/src/Generated/Models/ResourceSnapshotData.cs b/sdk/resourcegraph/Microsoft.Azure.Management.ResourceGraph/src/Generated/Models/ResourceSnapshotData.cs new file mode 100644 index 000000000000..80d1f12fa5d8 --- /dev/null +++ b/sdk/resourcegraph/Microsoft.Azure.Management.ResourceGraph/src/Generated/Models/ResourceSnapshotData.cs @@ -0,0 +1,91 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.ResourceGraph.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// Data on a specific resource snapshot. + /// + public partial class ResourceSnapshotData + { + /// + /// Initializes a new instance of the ResourceSnapshotData class. + /// + public ResourceSnapshotData() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the ResourceSnapshotData class. + /// + /// The time when the snapshot was created. + /// The snapshot timestamp provides an approximation as to when a + /// modification to a resource was detected. There can be a difference + /// between the actual modification time and the detection time. This + /// is due to differences in how operations that modify a resource are + /// processed, versus how operation that record resource snapshots are + /// processed. + /// The ID of the snapshot. + /// The resource snapshot content (in + /// resourceChangeDetails response only). + public ResourceSnapshotData(System.DateTime timestamp, string snapshotId = default(string), object content = default(object)) + { + SnapshotId = snapshotId; + Timestamp = timestamp; + Content = content; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the ID of the snapshot. + /// + [JsonProperty(PropertyName = "snapshotId")] + public string SnapshotId { get; set; } + + /// + /// Gets or sets the time when the snapshot was created. + /// The snapshot timestamp provides an approximation as to when a + /// modification to a resource was detected. There can be a difference + /// between the actual modification time and the detection time. This + /// is due to differences in how operations that modify a resource are + /// processed, versus how operation that record resource snapshots are + /// processed. + /// + [JsonProperty(PropertyName = "timestamp")] + public System.DateTime Timestamp { get; set; } + + /// + /// Gets or sets the resource snapshot content (in + /// resourceChangeDetails response only). + /// + [JsonProperty(PropertyName = "content")] + public object Content { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + //Nothing to validate + } + } +} diff --git a/sdk/resourcegraph/Microsoft.Azure.Management.ResourceGraph/src/Generated/Models/ResourcesHistoryRequest.cs b/sdk/resourcegraph/Microsoft.Azure.Management.ResourceGraph/src/Generated/Models/ResourcesHistoryRequest.cs new file mode 100644 index 000000000000..4baa5e1c1185 --- /dev/null +++ b/sdk/resourcegraph/Microsoft.Azure.Management.ResourceGraph/src/Generated/Models/ResourcesHistoryRequest.cs @@ -0,0 +1,79 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.ResourceGraph.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + public partial class ResourcesHistoryRequest + { + /// + /// Initializes a new instance of the ResourcesHistoryRequest class. + /// + public ResourcesHistoryRequest() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the ResourcesHistoryRequest class. + /// + public ResourcesHistoryRequest(IList subscriptions = default(IList), string query = default(string), ResourcesHistoryRequestOptions options = default(ResourcesHistoryRequestOptions), string managementGroupId = default(string)) + { + Subscriptions = subscriptions; + Query = query; + Options = options; + ManagementGroupId = managementGroupId; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// + [JsonProperty(PropertyName = "subscriptions")] + public IList Subscriptions { get; set; } + + /// + /// + [JsonProperty(PropertyName = "query")] + public string Query { get; set; } + + /// + /// + [JsonProperty(PropertyName = "options")] + public ResourcesHistoryRequestOptions Options { get; set; } + + /// + /// + [JsonProperty(PropertyName = "managementGroupId")] + public string ManagementGroupId { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Options != null) + { + Options.Validate(); + } + } + } +} diff --git a/sdk/resourcegraph/Microsoft.Azure.Management.ResourceGraph/src/Generated/Models/ResourcesHistoryRequestOptions.cs b/sdk/resourcegraph/Microsoft.Azure.Management.ResourceGraph/src/Generated/Models/ResourcesHistoryRequestOptions.cs new file mode 100644 index 000000000000..45e00ecb1f21 --- /dev/null +++ b/sdk/resourcegraph/Microsoft.Azure.Management.ResourceGraph/src/Generated/Models/ResourcesHistoryRequestOptions.cs @@ -0,0 +1,88 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.ResourceGraph.Models +{ + using Newtonsoft.Json; + using System.Linq; + + public partial class ResourcesHistoryRequestOptions + { + /// + /// Initializes a new instance of the ResourcesHistoryRequestOptions + /// class. + /// + public ResourcesHistoryRequestOptions() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the ResourcesHistoryRequestOptions + /// class. + /// + /// Possible values include: 'table', + /// 'objectArray' + public ResourcesHistoryRequestOptions(DateTimeInterval interval = default(DateTimeInterval), int? top = default(int?), int? skip = default(int?), string skipToken = default(string), string resultFormat = default(string)) + { + Interval = interval; + Top = top; + Skip = skip; + SkipToken = skipToken; + ResultFormat = resultFormat; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// + [JsonProperty(PropertyName = "interval")] + public DateTimeInterval Interval { get; set; } + + /// + /// + [JsonProperty(PropertyName = "$top")] + public int? Top { get; set; } + + /// + /// + [JsonProperty(PropertyName = "$skip")] + public int? Skip { get; set; } + + /// + /// + [JsonProperty(PropertyName = "$skipToken")] + public string SkipToken { get; set; } + + /// + /// Gets or sets possible values include: 'table', 'objectArray' + /// + [JsonProperty(PropertyName = "resultFormat")] + public string ResultFormat { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Interval != null) + { + Interval.Validate(); + } + } + } +} diff --git a/sdk/resourcegraph/Microsoft.Azure.Management.ResourceGraph/src/Generated/Operations.cs b/sdk/resourcegraph/Microsoft.Azure.Management.ResourceGraph/src/Generated/Operations.cs index 9f1a76bfdbeb..eb7507853d83 100644 --- a/sdk/resourcegraph/Microsoft.Azure.Management.ResourceGraph/src/Generated/Operations.cs +++ b/sdk/resourcegraph/Microsoft.Azure.Management.ResourceGraph/src/Generated/Operations.cs @@ -65,21 +65,12 @@ internal Operations(ResourceGraphClient client) /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - /// - /// Thrown when a required parameter is null - /// /// /// A response object containing the response body and response headers. /// public async Task>> ListWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { - if (Client.ApiVersion == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); - } + string apiVersion = "2021-03-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -87,6 +78,7 @@ internal Operations(ResourceGraphClient client) { _invocationId = ServiceClientTracing.NextInvocationId.ToString(); Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("apiVersion", apiVersion); tracingParameters.Add("cancellationToken", cancellationToken); ServiceClientTracing.Enter(_invocationId, this, "List", tracingParameters); } @@ -94,9 +86,9 @@ internal Operations(ResourceGraphClient client) var _baseUrl = Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "providers/Microsoft.ResourceGraph/operations").ToString(); List _queryParameters = new List(); - if (Client.ApiVersion != null) + if (apiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion))); } if (_queryParameters.Count > 0) { diff --git a/sdk/resourcegraph/Microsoft.Azure.Management.ResourceGraph/src/Generated/ResourceGraphClient.cs b/sdk/resourcegraph/Microsoft.Azure.Management.ResourceGraph/src/Generated/ResourceGraphClient.cs index f230d8267d40..62d61d33fa25 100644 --- a/sdk/resourcegraph/Microsoft.Azure.Management.ResourceGraph/src/Generated/ResourceGraphClient.cs +++ b/sdk/resourcegraph/Microsoft.Azure.Management.ResourceGraph/src/Generated/ResourceGraphClient.cs @@ -48,11 +48,6 @@ public partial class ResourceGraphClient : ServiceClient, I /// public ServiceClientCredentials Credentials { get; private set; } - /// - /// Api Version. - /// - public string ApiVersion { get; private set; } - /// /// The preferred language for the response. /// @@ -319,7 +314,6 @@ private void Initialize() { Operations = new Operations(this); BaseUri = new System.Uri("https://management.azure.com"); - ApiVersion = "2021-03-01"; AcceptLanguage = "en-US"; LongRunningOperationRetryTimeout = 30; GenerateClientRequestId = true; @@ -353,6 +347,374 @@ private void Initialize() CustomInitialize(); DeserializationSettings.Converters.Add(new CloudErrorJsonConverter()); } + /// + /// List changes to a resource for a given time interval. + /// + /// + /// the parameters for this request for changes. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ResourceChangesWithHttpMessagesAsync(ResourceChangesRequestParameters parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (parameters == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "parameters"); + } + if (parameters != null) + { + parameters.Validate(); + } + string apiVersion = "2020-09-01-preview"; + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("apiVersion", apiVersion); + tracingParameters.Add("parameters", parameters); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ResourceChanges", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "providers/Microsoft.ResourceGraph/resourceChanges").ToString(); + List _queryParameters = new List(); + if (apiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("POST"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (GenerateClientRequestId != null && GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(parameters != null) + { + _requestContent = SafeJsonConvert.SerializeObject(parameters, SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); + } + // Set Credentials + if (Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ErrorResponse _errorBody = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + if (_errorBody != null) + { + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Get resource change details. + /// + /// + /// The parameters for this request for resource change details. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task>> ResourceChangeDetailsWithHttpMessagesAsync(ResourceChangeDetailsRequestParameters parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (parameters == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "parameters"); + } + if (parameters != null) + { + parameters.Validate(); + } + string apiVersion = "2020-09-01-preview"; + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("apiVersion", apiVersion); + tracingParameters.Add("parameters", parameters); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ResourceChangeDetails", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "providers/Microsoft.ResourceGraph/resourceChangeDetails").ToString(); + List _queryParameters = new List(); + if (apiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("POST"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (GenerateClientRequestId != null && GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(parameters != null) + { + _requestContent = SafeJsonConvert.SerializeObject(parameters, SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); + } + // Set Credentials + if (Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ErrorResponse _errorBody = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + if (_errorBody != null) + { + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse>(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject>(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + /// /// Queries the resources managed by Azure Resource Manager for scopes /// specified in the request. @@ -384,10 +746,6 @@ private void Initialize() /// public async Task> ResourcesWithHttpMessagesAsync(QueryRequest query, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { - if (ApiVersion == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.ApiVersion"); - } if (query == null) { throw new ValidationException(ValidationRules.CannotBeNull, "query"); @@ -396,6 +754,7 @@ private void Initialize() { query.Validate(); } + string apiVersion = "2021-03-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -403,6 +762,7 @@ private void Initialize() { _invocationId = ServiceClientTracing.NextInvocationId.ToString(); Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("apiVersion", apiVersion); tracingParameters.Add("query", query); tracingParameters.Add("cancellationToken", cancellationToken); ServiceClientTracing.Enter(_invocationId, this, "Resources", tracingParameters); @@ -411,9 +771,9 @@ private void Initialize() var _baseUrl = BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "providers/Microsoft.ResourceGraph/resources").ToString(); List _queryParameters = new List(); - if (ApiVersion != null) + if (apiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion))); } if (_queryParameters.Count > 0) { @@ -541,5 +901,188 @@ private void Initialize() return _result; } + /// + /// List all snapshots of a resource for a given time interval. + /// + /// + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ResourcesHistoryWithHttpMessagesAsync(ResourcesHistoryRequest request, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (request == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "request"); + } + if (request != null) + { + request.Validate(); + } + string apiVersion = "2020-04-01-preview"; + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("request", request); + tracingParameters.Add("apiVersion", apiVersion); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ResourcesHistory", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "providers/Microsoft.ResourceGraph/resourcesHistory").ToString(); + List _queryParameters = new List(); + if (apiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("POST"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (GenerateClientRequestId != null && GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(request != null) + { + _requestContent = SafeJsonConvert.SerializeObject(request, SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); + } + // Set Credentials + if (Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ErrorResponse _errorBody = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + if (_errorBody != null) + { + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + } } diff --git a/sdk/resourcegraph/Microsoft.Azure.Management.ResourceGraph/src/Generated/ResourceGraphClientExtensions.cs b/sdk/resourcegraph/Microsoft.Azure.Management.ResourceGraph/src/Generated/ResourceGraphClientExtensions.cs index d2cfe98f861f..17743a9b7cb1 100644 --- a/sdk/resourcegraph/Microsoft.Azure.Management.ResourceGraph/src/Generated/ResourceGraphClientExtensions.cs +++ b/sdk/resourcegraph/Microsoft.Azure.Management.ResourceGraph/src/Generated/ResourceGraphClientExtensions.cs @@ -13,6 +13,8 @@ namespace Microsoft.Azure.Management.ResourceGraph using Microsoft.Rest; using Microsoft.Rest.Azure; using Models; + using System.Collections; + using System.Collections.Generic; using System.Threading; using System.Threading.Tasks; @@ -21,6 +23,74 @@ namespace Microsoft.Azure.Management.ResourceGraph /// public static partial class ResourceGraphClientExtensions { + /// + /// List changes to a resource for a given time interval. + /// + /// + /// The operations group for this extension method. + /// + /// + /// the parameters for this request for changes. + /// + public static ResourceChangeList ResourceChanges(this IResourceGraphClient operations, ResourceChangesRequestParameters parameters) + { + return operations.ResourceChangesAsync(parameters).GetAwaiter().GetResult(); + } + + /// + /// List changes to a resource for a given time interval. + /// + /// + /// The operations group for this extension method. + /// + /// + /// the parameters for this request for changes. + /// + /// + /// The cancellation token. + /// + public static async Task ResourceChangesAsync(this IResourceGraphClient operations, ResourceChangesRequestParameters parameters, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ResourceChangesWithHttpMessagesAsync(parameters, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Get resource change details. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The parameters for this request for resource change details. + /// + public static IList ResourceChangeDetails(this IResourceGraphClient operations, ResourceChangeDetailsRequestParameters parameters) + { + return operations.ResourceChangeDetailsAsync(parameters).GetAwaiter().GetResult(); + } + + /// + /// Get resource change details. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The parameters for this request for resource change details. + /// + /// + /// The cancellation token. + /// + public static async Task> ResourceChangeDetailsAsync(this IResourceGraphClient operations, ResourceChangeDetailsRequestParameters parameters, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ResourceChangeDetailsWithHttpMessagesAsync(parameters, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// /// Queries the resources managed by Azure Resource Manager for scopes /// specified in the request. @@ -59,5 +129,37 @@ public static QueryResponse Resources(this IResourceGraphClient operations, Quer } } + /// + /// List all snapshots of a resource for a given time interval. + /// + /// + /// The operations group for this extension method. + /// + /// + /// + public static object ResourcesHistory(this IResourceGraphClient operations, ResourcesHistoryRequest request) + { + return operations.ResourcesHistoryAsync(request).GetAwaiter().GetResult(); + } + + /// + /// List all snapshots of a resource for a given time interval. + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// The cancellation token. + /// + public static async Task ResourcesHistoryAsync(this IResourceGraphClient operations, ResourcesHistoryRequest request, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ResourcesHistoryWithHttpMessagesAsync(request, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + } } diff --git a/sdk/resourcegraph/Microsoft.Azure.Management.ResourceGraph/src/Generated/SdkInfo_ResourceGraphClient.cs b/sdk/resourcegraph/Microsoft.Azure.Management.ResourceGraph/src/Generated/SdkInfo_ResourceGraphClient.cs index 5b24d34b6292..848f3f08645a 100644 --- a/sdk/resourcegraph/Microsoft.Azure.Management.ResourceGraph/src/Generated/SdkInfo_ResourceGraphClient.cs +++ b/sdk/resourcegraph/Microsoft.Azure.Management.ResourceGraph/src/Generated/SdkInfo_ResourceGraphClient.cs @@ -20,20 +20,12 @@ public static IEnumerable> ApiInfo_ResourceGraphCl return new Tuple[] { new Tuple("ResourceGraph", "Operations", "2021-03-01"), + new Tuple("ResourceGraph", "ResourceChangeDetails", "2020-09-01-preview"), + new Tuple("ResourceGraph", "ResourceChanges", "2020-09-01-preview"), new Tuple("ResourceGraph", "Resources", "2021-03-01"), + new Tuple("ResourceGraph", "ResourcesHistory", "2020-04-01-preview"), }.AsEnumerable(); } } - // BEGIN: Code Generation Metadata Section - public static readonly String AutoRestVersion = "v2"; - public static readonly String AutoRestBootStrapperVersion = "autorest@2.0.4413"; - public static readonly String AutoRestCmdExecuted = "cmd.exe /c autorest.cmd https://github.com/Azure/azure-rest-api-specs/blob/master/specification/resourcegraph/resource-manager/readme.md --csharp --version=v2 --reflect-api-versions --csharp-sdks-folder=C:\\Graph\\azure-sdk-for-net\\sdk"; - public static readonly String GithubForkName = "Azure"; - public static readonly String GithubBranchName = "master"; - public static readonly String GithubCommidId = "413612b5f24da120e83eac227264f2e0b262ed8a"; - public static readonly String CodeGenerationErrors = ""; - public static readonly String GithubRepoName = "azure-rest-api-specs"; - // END: Code Generation Metadata Section } } -