-
Notifications
You must be signed in to change notification settings - Fork 4.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dns ZoneType Change #15236
Dns ZoneType Change #15236
Changes from 31 commits
b2a4f14
38b9eb1
e15afb3
4c799eb
3f88fd3
90204f1
ce4d0de
6fee9cf
66d2634
a92d37c
c0abf80
8fed2c7
f34768b
040df84
f28d520
936583d
6cf295d
212e5c4
88c43bf
a3e2c57
5cf8665
556c220
becddf3
932730f
2c0317c
0f02877
67eba6d
0e2d874
bb4b9c6
3520322
f43c483
3ddd8b7
3990ca9
18738ce
70bd17b
aa1154d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
// Copyright (c) Microsoft Corporation. All rights reserved. | ||
// Licensed under the MIT License. | ||
|
||
// <auto-generated/> | ||
|
||
#nullable disable | ||
|
||
using System; | ||
using System.Collections.Generic; | ||
using Azure.Core; | ||
|
||
namespace Azure.ResourceManager.Dns.Models | ||
{ | ||
/// <summary> Describes a DNS zone. </summary> | ||
public partial class Zone : Resource | ||
{ | ||
/// <summary> Initializes a new instance of Zone. </summary> | ||
/// <param name="location"> Resource location. </param> | ||
/// <exception cref="ArgumentNullException"> <paramref name="location"/> is null. </exception> | ||
public Zone(string location) : base(location) | ||
{ | ||
if (location == null) | ||
{ | ||
throw new ArgumentNullException(nameof(location)); | ||
} | ||
|
||
NameServers = new ChangeTrackingList<string>(); | ||
RegistrationVirtualNetworks = new ChangeTrackingList<SubResource>(); | ||
ResolutionVirtualNetworks = new ChangeTrackingList<SubResource>(); | ||
} | ||
|
||
/// <summary> Initializes a new instance of Zone. </summary> | ||
/// <param name="id"> Resource ID. </param> | ||
/// <param name="name"> Resource name. </param> | ||
/// <param name="type"> Resource type. </param> | ||
/// <param name="location"> Resource location. </param> | ||
/// <param name="tags"> Resource tags. </param> | ||
/// <param name="etag"> The etag of the zone. </param> | ||
/// <param name="maxNumberOfRecordSets"> The maximum number of record sets that can be created in this DNS zone. This is a read-only property and any attempt to set this value will be ignored. </param> | ||
/// <param name="numberOfRecordSets"> The current number of record sets in this DNS zone. This is a read-only property and any attempt to set this value will be ignored. </param> | ||
/// <param name="nameServers"> The name servers for this DNS zone. This is a read-only property and any attempt to set this value will be ignored. </param> | ||
/// <param name="zoneType"> The type of this DNS zone (Public or Private). </param> | ||
/// <param name="registrationVirtualNetworks"> A list of references to virtual networks that register hostnames in this DNS zone. This is a only when ZoneType is Private. </param> | ||
/// <param name="resolutionVirtualNetworks"> A list of references to virtual networks that resolve records in this DNS zone. This is a only when ZoneType is Private. </param> | ||
internal Zone(string id, string name, string type, string location, IDictionary<string, string> tags, string etag, long? maxNumberOfRecordSets, long? numberOfRecordSets, IReadOnlyList<string> nameServers, ZoneType? zoneType, IList<SubResource> registrationVirtualNetworks, IList<SubResource> resolutionVirtualNetworks) : base(id, name, type, location, tags) | ||
allenjzhang marked this conversation as resolved.
Show resolved
Hide resolved
|
||
{ | ||
Etag = etag; | ||
MaxNumberOfRecordSets = maxNumberOfRecordSets; | ||
NumberOfRecordSets = numberOfRecordSets; | ||
NameServers = nameServers; | ||
ZoneType = zoneType; | ||
RegistrationVirtualNetworks = registrationVirtualNetworks; | ||
ResolutionVirtualNetworks = resolutionVirtualNetworks; | ||
} | ||
|
||
/// <summary> The etag of the zone. </summary> | ||
public string Etag { get; set; } | ||
/// <summary> The maximum number of record sets that can be created in this DNS zone. This is a read-only property and any attempt to set this value will be ignored. </summary> | ||
public long? MaxNumberOfRecordSets { get; } | ||
/// <summary> The current number of record sets in this DNS zone. This is a read-only property and any attempt to set this value will be ignored. </summary> | ||
public long? NumberOfRecordSets { get; } | ||
/// <summary> The name servers for this DNS zone. This is a read-only property and any attempt to set this value will be ignored. </summary> | ||
public IReadOnlyList<string> NameServers { get; } | ||
/// <summary> The type of this DNS zone (Public or Private). </summary> | ||
[Obsolete("Private DNS is not allowed in this API anymore, use the privatedns API")] | ||
public ZoneType? ZoneType { get; } | ||
/// <summary> A list of references to virtual networks that register hostnames in this DNS zone. This is a only when ZoneType is Private. </summary> | ||
[Obsolete("Private DNS is not allowed in this API anymore, use the privatedns API")] | ||
public IList<SubResource> RegistrationVirtualNetworks { get; } | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do we need [Obsolete] on these two properties? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. hmm actually do want to do this? Since a user could want to view these and they would get a compile error trying to get these unless that suppress that warning? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. they are only read-only, so they would only come back from a GET on a private DNS zone There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. compile warning not error. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think [Obsolete] can be applied here. If user is using these properties, they will get a compiler warning which is what we wanted. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Well depends on how one builds I suppose. Dotnet core on Ubuntu throws a compile error. I will make this change. |
||
/// <summary> A list of references to virtual networks that resolve records in this DNS zone. This is a only when ZoneType is Private. </summary> | ||
[Obsolete("Private DNS is not allowed in this API anymore, use the privatedns API")] | ||
public IList<SubResource> ResolutionVirtualNetworks { get; } | ||
} | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would recommend not copying all the members, just ones you need to add attributes to.