|
9 | 9 |
|
10 | 10 | namespace Authress.SDK
|
11 | 11 | {
|
12 |
| - /// <summary> |
13 |
| - /// Represents a collection of functions to interact with the API endpoints |
14 |
| - /// </summary> |
15 |
| - internal partial class AuthressClient : IResourcePermissionsApi |
16 |
| - { |
17 |
| - /// <summary> |
18 |
| - /// List resource configurations Permissions can be set globally at a resource level. Lists any resources with a globally set resource policy |
19 |
| - /// </summary> |
20 |
| - /// <returns>ResourcePermissionCollection</returns> |
21 |
| - public async Task<ResourcePermissionCollection> GetResources () |
22 |
| - { |
| 12 | + // /// <summary> |
| 13 | + // /// Represents a collection of functions to interact with the API endpoints |
| 14 | + // /// </summary> |
| 15 | + // internal partial class AuthressClient : IResourcePermissionsApi |
| 16 | + // { |
| 17 | + // /// <summary> |
| 18 | + // /// List resource configurations Permissions can be set globally at a resource level. Lists any resources with a globally set resource policy |
| 19 | + // /// </summary> |
| 20 | + // /// <returns>ResourcePermissionCollection</returns> |
| 21 | + // public async Task<ResourcePermissionCollection> GetResources () |
| 22 | + // { |
23 | 23 |
|
24 |
| - var path = "/v1/resources"; |
25 |
| - var client = await authressHttpClientProvider.GetHttpClientAsync(); |
26 |
| - using (var response = await client.GetAsync(path)) |
27 |
| - { |
28 |
| - await response.ThrowIfNotSuccessStatusCode(); |
29 |
| - return await response.Content.ReadAsAsync<ResourcePermissionCollection>(); |
30 |
| - } |
31 |
| - } |
| 24 | + // var path = "/v1/resources"; |
| 25 | + // var client = await authressHttpClientProvider.GetHttpClientAsync(); |
| 26 | + // using (var response = await client.GetAsync(path)) |
| 27 | + // { |
| 28 | + // await response.ThrowIfNotSuccessStatusCode(); |
| 29 | + // return await response.Content.ReadAsAsync<ResourcePermissionCollection>(); |
| 30 | + // } |
| 31 | + // } |
32 | 32 |
|
33 |
| - /// <summary> |
34 |
| - /// Get a resource permissions object. Permissions can be set globally at a resource level. This will apply to all users in an account. |
35 |
| - /// </summary> |
36 |
| - /// <param name="resourceUri">The uri path of a resource to validate, uri segments are allowed.</param> |
37 |
| - /// <returns>ResourcePermission</returns> |
38 |
| - public async Task<ResourcePermission> GetResourcePermissions (string resourceUri) |
39 |
| - { |
40 |
| - // verify the required parameter 'resourceUri' is set |
41 |
| - if (resourceUri == null) throw new ArgumentNullException("Missing required parameter 'resourceUri'."); |
| 33 | + // /// <summary> |
| 34 | + // /// Get a resource permissions object. Permissions can be set globally at a resource level. This will apply to all users in an account. |
| 35 | + // /// </summary> |
| 36 | + // /// <param name="resourceUri">The uri path of a resource to validate, uri segments are allowed.</param> |
| 37 | + // /// <returns>ResourcePermission</returns> |
| 38 | + // public async Task<ResourcePermission> GetResourcePermissions (string resourceUri) |
| 39 | + // { |
| 40 | + // // verify the required parameter 'resourceUri' is set |
| 41 | + // if (resourceUri == null) throw new ArgumentNullException("Missing required parameter 'resourceUri'."); |
42 | 42 |
|
43 |
| - var path = $"/v1/resources/{System.Web.HttpUtility.UrlEncode(resourceUri)}"; |
44 |
| - var client = await authressHttpClientProvider.GetHttpClientAsync(); |
45 |
| - using (var response = await client.GetAsync(path)) |
46 |
| - { |
47 |
| - await response.ThrowIfNotSuccessStatusCode(); |
48 |
| - return await response.Content.ReadAsAsync<ResourcePermission>(); |
49 |
| - } |
50 |
| - } |
| 43 | + // var path = $"/v1/resources/{System.Web.HttpUtility.UrlEncode(resourceUri)}"; |
| 44 | + // var client = await authressHttpClientProvider.GetHttpClientAsync(); |
| 45 | + // using (var response = await client.GetAsync(path)) |
| 46 | + // { |
| 47 | + // await response.ThrowIfNotSuccessStatusCode(); |
| 48 | + // return await response.Content.ReadAsAsync<ResourcePermission>(); |
| 49 | + // } |
| 50 | + // } |
51 | 51 |
|
52 |
| - /// <summary> |
53 |
| - /// Update a resource permissions object. Updates the global permissions on a resource. This applies to all users in an account. |
54 |
| - /// </summary> |
55 |
| - /// <param name="body">The contents of the permission to set on the resource. Overwrites existing data.</param> |
56 |
| - /// <param name="resourceUri">The uri path of a resource to validate, uri segments are allowed.</param> |
57 |
| - /// <returns>Object</returns> |
58 |
| - public async Task SetResourcePermissions (string resourceUri, ResourcePermission body) |
59 |
| - { |
60 |
| - // verify the required parameter 'body' is set |
61 |
| - if (body == null) throw new ArgumentNullException("Missing required parameter 'body'."); |
62 |
| - // verify the required parameter 'resourceUri' is set |
63 |
| - if (resourceUri == null) throw new ArgumentNullException("Missing required parameter 'resourceUri'."); |
| 52 | + // /// <summary> |
| 53 | + // /// Update a resource permissions object. Updates the global permissions on a resource. This applies to all users in an account. |
| 54 | + // /// </summary> |
| 55 | + // /// <param name="body">The contents of the permission to set on the resource. Overwrites existing data.</param> |
| 56 | + // /// <param name="resourceUri">The uri path of a resource to validate, uri segments are allowed.</param> |
| 57 | + // /// <returns>Object</returns> |
| 58 | + // public async Task SetResourcePermissions (string resourceUri, ResourcePermission body) |
| 59 | + // { |
| 60 | + // // verify the required parameter 'body' is set |
| 61 | + // if (body == null) throw new ArgumentNullException("Missing required parameter 'body'."); |
| 62 | + // // verify the required parameter 'resourceUri' is set |
| 63 | + // if (resourceUri == null) throw new ArgumentNullException("Missing required parameter 'resourceUri'."); |
64 | 64 |
|
65 |
| - var path = $"/v1/resources/{System.Web.HttpUtility.UrlEncode(resourceUri)}"; |
66 |
| - var client = await authressHttpClientProvider.GetHttpClientAsync(); |
67 |
| - using (var response = await client.PutAsync(path, body.ToHttpContent())) |
68 |
| - { |
69 |
| - await response.ThrowIfNotSuccessStatusCode(); |
70 |
| - } |
71 |
| - } |
| 65 | + // var path = $"/v1/resources/{System.Web.HttpUtility.UrlEncode(resourceUri)}"; |
| 66 | + // var client = await authressHttpClientProvider.GetHttpClientAsync(); |
| 67 | + // using (var response = await client.PutAsync(path, body.ToHttpContent())) |
| 68 | + // { |
| 69 | + // await response.ThrowIfNotSuccessStatusCode(); |
| 70 | + // } |
| 71 | + // } |
72 | 72 |
|
73 |
| - } |
| 73 | + // } |
74 | 74 | }
|
0 commit comments