forked from Azure/azure-sdk-for-net
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
.NET SDK Resource Provider:'ResourceGraph'
REST Spec PR 'Azure/azure-rest-api-specs#5451' REST Spec PR Author 'AnatoliB' REST Spec PR Last commit
- Loading branch information
Showing
14 changed files
with
1,226 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
81 changes: 81 additions & 0 deletions
81
...Ks/ResourceGraph/Management/Management.ResourceGraph/Generated/Models/DateTimeInterval.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
// <auto-generated> | ||
// 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. | ||
// </auto-generated> | ||
|
||
namespace Microsoft.Azure.Management.ResourceGraph.Models | ||
{ | ||
using Newtonsoft.Json; | ||
using System.Linq; | ||
|
||
/// <summary> | ||
/// An interval in time specifying the date and time for the inclusive | ||
/// start and exclusive end, i.e. `[start, end)`. | ||
/// </summary> | ||
public partial class DateTimeInterval | ||
{ | ||
/// <summary> | ||
/// Initializes a new instance of the DateTimeInterval class. | ||
/// </summary> | ||
public DateTimeInterval() | ||
{ | ||
CustomInit(); | ||
} | ||
|
||
/// <summary> | ||
/// Initializes a new instance of the DateTimeInterval class. | ||
/// </summary> | ||
/// <param name="start">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.</param> | ||
/// <param name="end">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.</param> | ||
public DateTimeInterval(System.DateTime start, System.DateTime end) | ||
{ | ||
Start = start; | ||
End = end; | ||
CustomInit(); | ||
} | ||
|
||
/// <summary> | ||
/// An initialization method that performs custom operations like setting defaults | ||
/// </summary> | ||
partial void CustomInit(); | ||
|
||
/// <summary> | ||
/// 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. | ||
/// </summary> | ||
[JsonProperty(PropertyName = "start")] | ||
public System.DateTime Start { get; set; } | ||
|
||
/// <summary> | ||
/// 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. | ||
/// </summary> | ||
[JsonProperty(PropertyName = "end")] | ||
public System.DateTime End { get; set; } | ||
|
||
/// <summary> | ||
/// Validate the object. | ||
/// </summary> | ||
/// <exception cref="Rest.ValidationException"> | ||
/// Thrown if validation fails | ||
/// </exception> | ||
public virtual void Validate() | ||
{ | ||
//Nothing to validate | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
101 changes: 101 additions & 0 deletions
101
.../ResourceGraph/Management/Management.ResourceGraph/Generated/Models/ResourceChangeData.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,101 @@ | ||
// <auto-generated> | ||
// 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. | ||
// </auto-generated> | ||
|
||
namespace Microsoft.Azure.Management.ResourceGraph.Models | ||
{ | ||
using Microsoft.Rest; | ||
using Newtonsoft.Json; | ||
using System.Linq; | ||
|
||
/// <summary> | ||
/// Data on a specific change, represented by a pair of before and after | ||
/// resource snapshots. | ||
/// </summary> | ||
public partial class ResourceChangeData | ||
{ | ||
/// <summary> | ||
/// Initializes a new instance of the ResourceChangeData class. | ||
/// </summary> | ||
public ResourceChangeData() | ||
{ | ||
CustomInit(); | ||
} | ||
|
||
/// <summary> | ||
/// Initializes a new instance of the ResourceChangeData class. | ||
/// </summary> | ||
/// <param name="changeId">The change ID. Valid and unique within the | ||
/// specified resource only.</param> | ||
/// <param name="beforeSnapshot">The snapshot before the | ||
/// change.</param> | ||
/// <param name="afterSnapshot">The snapshot after the change.</param> | ||
public ResourceChangeData(string changeId, ResourceChangeDataBeforeSnapshot beforeSnapshot, ResourceChangeDataAfterSnapshot afterSnapshot) | ||
{ | ||
ChangeId = changeId; | ||
BeforeSnapshot = beforeSnapshot; | ||
AfterSnapshot = afterSnapshot; | ||
CustomInit(); | ||
} | ||
|
||
/// <summary> | ||
/// An initialization method that performs custom operations like setting defaults | ||
/// </summary> | ||
partial void CustomInit(); | ||
|
||
/// <summary> | ||
/// Gets or sets the change ID. Valid and unique within the specified | ||
/// resource only. | ||
/// </summary> | ||
[JsonProperty(PropertyName = "changeId")] | ||
public string ChangeId { get; set; } | ||
|
||
/// <summary> | ||
/// Gets or sets the snapshot before the change. | ||
/// </summary> | ||
[JsonProperty(PropertyName = "beforeSnapshot")] | ||
public ResourceChangeDataBeforeSnapshot BeforeSnapshot { get; set; } | ||
|
||
/// <summary> | ||
/// Gets or sets the snapshot after the change. | ||
/// </summary> | ||
[JsonProperty(PropertyName = "afterSnapshot")] | ||
public ResourceChangeDataAfterSnapshot AfterSnapshot { get; set; } | ||
|
||
/// <summary> | ||
/// Validate the object. | ||
/// </summary> | ||
/// <exception cref="ValidationException"> | ||
/// Thrown if validation fails | ||
/// </exception> | ||
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(); | ||
} | ||
} | ||
} | ||
} |
64 changes: 64 additions & 0 deletions
64
...h/Management/Management.ResourceGraph/Generated/Models/ResourceChangeDataAfterSnapshot.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
// <auto-generated> | ||
// 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. | ||
// </auto-generated> | ||
|
||
namespace Microsoft.Azure.Management.ResourceGraph.Models | ||
{ | ||
using System.Linq; | ||
|
||
/// <summary> | ||
/// The snapshot after the change. | ||
/// </summary> | ||
public partial class ResourceChangeDataAfterSnapshot : ResourceSnapshotData | ||
{ | ||
/// <summary> | ||
/// Initializes a new instance of the ResourceChangeDataAfterSnapshot | ||
/// class. | ||
/// </summary> | ||
public ResourceChangeDataAfterSnapshot() | ||
{ | ||
CustomInit(); | ||
} | ||
|
||
/// <summary> | ||
/// Initializes a new instance of the ResourceChangeDataAfterSnapshot | ||
/// class. | ||
/// </summary> | ||
/// <param name="timestamp">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.</param> | ||
/// <param name="content">The resource snapshot content (in | ||
/// resourceChangeDetails response only).</param> | ||
public ResourceChangeDataAfterSnapshot(System.DateTime timestamp, object content = default(object)) | ||
: base(timestamp, content) | ||
{ | ||
CustomInit(); | ||
} | ||
|
||
/// <summary> | ||
/// An initialization method that performs custom operations like setting defaults | ||
/// </summary> | ||
partial void CustomInit(); | ||
|
||
/// <summary> | ||
/// Validate the object. | ||
/// </summary> | ||
/// <exception cref="Rest.ValidationException"> | ||
/// Thrown if validation fails | ||
/// </exception> | ||
public override void Validate() | ||
{ | ||
base.Validate(); | ||
} | ||
} | ||
} |
Oops, something went wrong.