@@ -22,7 +22,7 @@ public class NetworkingApiBuilder
2222 protected readonly IAuthenticationProvider AuthenticationProvider ;
2323
2424 /// <summary />
25- protected readonly ServiceUrlBuilder UrlBuilder ;
25+ protected readonly ServiceEndpoint Endpoint ;
2626
2727 /// <summary>
2828 /// Initializes a new instance of the <see cref="NetworkingApiBuilder"/> class.
@@ -40,7 +40,7 @@ public NetworkingApiBuilder(IServiceType serviceType, IAuthenticationProvider au
4040 throw new ArgumentException ( "region cannot be null or empty" , "region" ) ;
4141
4242 AuthenticationProvider = authenticationProvider ;
43- UrlBuilder = new ServiceUrlBuilder ( serviceType , authenticationProvider , region ) ;
43+ Endpoint = new ServiceEndpoint ( serviceType , authenticationProvider , region ) ;
4444 }
4545
4646 #region Networks
@@ -53,7 +53,7 @@ public NetworkingApiBuilder(IServiceType serviceType, IAuthenticationProvider au
5353 /// </returns>
5454 public async Task < PreparedRequest > ListNetworksAsync ( CancellationToken cancellationToken = default ( CancellationToken ) )
5555 {
56- Url endpoint = await UrlBuilder . GetEndpoint ( cancellationToken ) . ConfigureAwait ( false ) ;
56+ Url endpoint = await Endpoint . GetEndpoint ( cancellationToken ) . ConfigureAwait ( false ) ;
5757
5858 return endpoint
5959 . AppendPathSegments ( "networks" )
@@ -71,7 +71,7 @@ public NetworkingApiBuilder(IServiceType serviceType, IAuthenticationProvider au
7171 /// </returns>
7272 public virtual async Task < PreparedRequest > GetNetworkAsync ( string networkId , CancellationToken cancellationToken = default ( CancellationToken ) )
7373 {
74- Url endpoint = await UrlBuilder . GetEndpoint ( cancellationToken ) . ConfigureAwait ( false ) ;
74+ Url endpoint = await Endpoint . GetEndpoint ( cancellationToken ) . ConfigureAwait ( false ) ;
7575
7676 return endpoint
7777 . AppendPathSegments ( "networks" , networkId )
@@ -89,7 +89,7 @@ public NetworkingApiBuilder(IServiceType serviceType, IAuthenticationProvider au
8989 /// </returns>
9090 public virtual async Task < PreparedRequest > CreateNetworkAsync ( object network , CancellationToken cancellationToken = default ( CancellationToken ) )
9191 {
92- Url endpoint = await UrlBuilder . GetEndpoint ( cancellationToken ) . ConfigureAwait ( false ) ;
92+ Url endpoint = await Endpoint . GetEndpoint ( cancellationToken ) . ConfigureAwait ( false ) ;
9393
9494 return endpoint
9595 . AppendPathSegments ( "networks" )
@@ -107,7 +107,7 @@ public NetworkingApiBuilder(IServiceType serviceType, IAuthenticationProvider au
107107 /// </returns>
108108 public virtual async Task < PreparedRequest > CreateNetworksAsync ( IEnumerable < object > networks , CancellationToken cancellationToken = default ( CancellationToken ) )
109109 {
110- Url endpoint = await UrlBuilder . GetEndpoint ( cancellationToken ) . ConfigureAwait ( false ) ;
110+ Url endpoint = await Endpoint . GetEndpoint ( cancellationToken ) . ConfigureAwait ( false ) ;
111111
112112 return endpoint
113113 . AppendPathSegments ( "networks" )
@@ -126,7 +126,7 @@ public NetworkingApiBuilder(IServiceType serviceType, IAuthenticationProvider au
126126 /// </returns>
127127 public virtual async Task < PreparedRequest > UpdateNetworkAsync ( string networkId , object network , CancellationToken cancellationToken = default ( CancellationToken ) )
128128 {
129- string endpoint = await UrlBuilder . GetEndpoint ( cancellationToken ) . ConfigureAwait ( false ) ;
129+ string endpoint = await Endpoint . GetEndpoint ( cancellationToken ) . ConfigureAwait ( false ) ;
130130
131131 return endpoint
132132 . AppendPathSegments ( "networks" , networkId )
@@ -141,7 +141,7 @@ public NetworkingApiBuilder(IServiceType serviceType, IAuthenticationProvider au
141141 /// <param name="cancellationToken">A cancellation token that can be used by other objects or threads to receive notice of cancellation.</param>
142142 public virtual async Task < PreparedRequest > DeleteNetworkAsync ( string networkId , CancellationToken cancellationToken = default ( CancellationToken ) )
143143 {
144- Url endpoint = await UrlBuilder . GetEndpoint ( cancellationToken ) . ConfigureAwait ( false ) ;
144+ Url endpoint = await Endpoint . GetEndpoint ( cancellationToken ) . ConfigureAwait ( false ) ;
145145
146146 return ( PreparedRequest ) endpoint
147147 . AppendPathSegments ( "networks" , networkId )
@@ -162,7 +162,7 @@ public NetworkingApiBuilder(IServiceType serviceType, IAuthenticationProvider au
162162 /// </returns>
163163 public virtual async Task < PreparedRequest > ListSubnetsAsync ( CancellationToken cancellationToken = default ( CancellationToken ) )
164164 {
165- Url endpoint = await UrlBuilder . GetEndpoint ( cancellationToken ) . ConfigureAwait ( false ) ;
165+ Url endpoint = await Endpoint . GetEndpoint ( cancellationToken ) . ConfigureAwait ( false ) ;
166166
167167 return endpoint
168168 . AppendPathSegment ( "subnets" )
@@ -180,7 +180,7 @@ public NetworkingApiBuilder(IServiceType serviceType, IAuthenticationProvider au
180180 /// </returns>
181181 public virtual async Task < PreparedRequest > CreateSubnetAsync ( object subnet , CancellationToken cancellationToken = default ( CancellationToken ) )
182182 {
183- Url endpoint = await UrlBuilder . GetEndpoint ( cancellationToken ) . ConfigureAwait ( false ) ;
183+ Url endpoint = await Endpoint . GetEndpoint ( cancellationToken ) . ConfigureAwait ( false ) ;
184184
185185 return endpoint
186186 . AppendPathSegments ( "subnets" )
@@ -198,7 +198,7 @@ public NetworkingApiBuilder(IServiceType serviceType, IAuthenticationProvider au
198198 /// </returns>
199199 public virtual async Task < PreparedRequest > CreateSubnetsAsync ( IEnumerable < object > subnets , CancellationToken cancellationToken = default ( CancellationToken ) )
200200 {
201- Url endpoint = await UrlBuilder . GetEndpoint ( cancellationToken ) . ConfigureAwait ( false ) ;
201+ Url endpoint = await Endpoint . GetEndpoint ( cancellationToken ) . ConfigureAwait ( false ) ;
202202
203203 return endpoint
204204 . AppendPathSegments ( "subnets" )
@@ -216,7 +216,7 @@ public NetworkingApiBuilder(IServiceType serviceType, IAuthenticationProvider au
216216 /// </returns>
217217 public virtual async Task < PreparedRequest > GetSubnetAsync ( string subnetId , CancellationToken cancellationToken = default ( CancellationToken ) )
218218 {
219- Url endpoint = await UrlBuilder . GetEndpoint ( cancellationToken ) . ConfigureAwait ( false ) ;
219+ Url endpoint = await Endpoint . GetEndpoint ( cancellationToken ) . ConfigureAwait ( false ) ;
220220
221221 return endpoint
222222 . AppendPathSegments ( "subnets" , subnetId )
@@ -235,7 +235,7 @@ public NetworkingApiBuilder(IServiceType serviceType, IAuthenticationProvider au
235235 /// </returns>
236236 public virtual async Task < PreparedRequest > UpdateSubnetAsync ( string subnetId , object subnet , CancellationToken cancellationToken = default ( CancellationToken ) )
237237 {
238- string endpoint = await UrlBuilder . GetEndpoint ( cancellationToken ) . ConfigureAwait ( false ) ;
238+ string endpoint = await Endpoint . GetEndpoint ( cancellationToken ) . ConfigureAwait ( false ) ;
239239
240240 return endpoint
241241 . AppendPathSegments ( "subnets" , subnetId )
@@ -250,7 +250,7 @@ public NetworkingApiBuilder(IServiceType serviceType, IAuthenticationProvider au
250250 /// <param name="cancellationToken">A cancellation token that can be used by other objects or threads to receive notice of cancellation.</param>
251251 public virtual async Task < PreparedRequest > DeleteSubnetAsync ( string subnetId , CancellationToken cancellationToken = default ( CancellationToken ) )
252252 {
253- Url endpoint = await UrlBuilder . GetEndpoint ( cancellationToken ) . ConfigureAwait ( false ) ;
253+ Url endpoint = await Endpoint . GetEndpoint ( cancellationToken ) . ConfigureAwait ( false ) ;
254254
255255 return ( PreparedRequest ) endpoint
256256 . AppendPathSegments ( "subnets" , subnetId )
@@ -270,7 +270,7 @@ public NetworkingApiBuilder(IServiceType serviceType, IAuthenticationProvider au
270270 /// </returns>
271271 public virtual async Task < PreparedRequest > ListPortsAsync ( CancellationToken cancellationToken = default ( CancellationToken ) )
272272 {
273- Url endpoint = await UrlBuilder . GetEndpoint ( cancellationToken ) . ConfigureAwait ( false ) ;
273+ Url endpoint = await Endpoint . GetEndpoint ( cancellationToken ) . ConfigureAwait ( false ) ;
274274
275275 return endpoint
276276 . AppendPathSegment ( "ports" )
@@ -288,7 +288,7 @@ public NetworkingApiBuilder(IServiceType serviceType, IAuthenticationProvider au
288288 /// </returns>
289289 public virtual async Task < PreparedRequest > CreatePortAsync ( object port , CancellationToken cancellationToken = default ( CancellationToken ) )
290290 {
291- Url endpoint = await UrlBuilder . GetEndpoint ( cancellationToken ) . ConfigureAwait ( false ) ;
291+ Url endpoint = await Endpoint . GetEndpoint ( cancellationToken ) . ConfigureAwait ( false ) ;
292292
293293 return endpoint
294294 . AppendPathSegments ( "ports" )
@@ -306,7 +306,7 @@ public NetworkingApiBuilder(IServiceType serviceType, IAuthenticationProvider au
306306 /// </returns>
307307 public virtual async Task < PreparedRequest > CreatePortsAsync ( IEnumerable < object > ports , CancellationToken cancellationToken = default ( CancellationToken ) )
308308 {
309- Url endpoint = await UrlBuilder . GetEndpoint ( cancellationToken ) . ConfigureAwait ( false ) ;
309+ Url endpoint = await Endpoint . GetEndpoint ( cancellationToken ) . ConfigureAwait ( false ) ;
310310
311311 return endpoint
312312 . AppendPathSegments ( "ports" )
@@ -324,7 +324,7 @@ public NetworkingApiBuilder(IServiceType serviceType, IAuthenticationProvider au
324324 /// </returns>
325325 public virtual async Task < PreparedRequest > GetPortAsync ( string portId , CancellationToken cancellationToken = default ( CancellationToken ) )
326326 {
327- Url endpoint = await UrlBuilder . GetEndpoint ( cancellationToken ) . ConfigureAwait ( false ) ;
327+ Url endpoint = await Endpoint . GetEndpoint ( cancellationToken ) . ConfigureAwait ( false ) ;
328328
329329 return endpoint
330330 . AppendPathSegments ( "ports" , portId )
@@ -343,7 +343,7 @@ public NetworkingApiBuilder(IServiceType serviceType, IAuthenticationProvider au
343343 /// </returns>
344344 public virtual async Task < PreparedRequest > UpdatePortAsync ( string portId , object port , CancellationToken cancellationToken = default ( CancellationToken ) )
345345 {
346- string endpoint = await UrlBuilder . GetEndpoint ( cancellationToken ) . ConfigureAwait ( false ) ;
346+ string endpoint = await Endpoint . GetEndpoint ( cancellationToken ) . ConfigureAwait ( false ) ;
347347
348348 return endpoint
349349 . AppendPathSegments ( "ports" , portId )
@@ -358,7 +358,7 @@ public NetworkingApiBuilder(IServiceType serviceType, IAuthenticationProvider au
358358 /// <param name="cancellationToken">A cancellation token that can be used by other objects or threads to receive notice of cancellation.</param>
359359 public virtual async Task < PreparedRequest > DeletePortAsync ( string portId , CancellationToken cancellationToken = default ( CancellationToken ) )
360360 {
361- Url endpoint = await UrlBuilder . GetEndpoint ( cancellationToken ) . ConfigureAwait ( false ) ;
361+ Url endpoint = await Endpoint . GetEndpoint ( cancellationToken ) . ConfigureAwait ( false ) ;
362362
363363 return ( PreparedRequest ) endpoint
364364 . AppendPathSegments ( "ports" , portId )
0 commit comments