|
6 | 6 |
|
7 | 7 | import com.azure.core.annotation.ReturnType;
|
8 | 8 | import com.azure.core.annotation.ServiceMethod;
|
| 9 | +import com.azure.core.http.rest.PagedFlux; |
9 | 10 | import com.azure.core.http.rest.PagedIterable;
|
10 | 11 | import com.azure.core.http.rest.Response;
|
11 | 12 | import com.azure.core.management.polling.PollResult;
|
12 | 13 | import com.azure.core.util.Context;
|
| 14 | +import com.azure.core.util.polling.PollerFlux; |
13 | 15 | import com.azure.core.util.polling.SyncPoller;
|
14 | 16 | import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.ActiveDirectoryAdministratorInner;
|
15 | 17 | import com.azure.resourcemanager.postgresqlflexibleserver.models.ActiveDirectoryAdministratorAdd;
|
| 18 | +import java.nio.ByteBuffer; |
| 19 | +import reactor.core.publisher.Flux; |
| 20 | +import reactor.core.publisher.Mono; |
16 | 21 |
|
17 | 22 | /** An instance of this class provides access to all the operations defined in AdministratorsClient. */
|
18 | 23 | public interface AdministratorsClient {
|
| 24 | + /** |
| 25 | + * Creates a new server. |
| 26 | + * |
| 27 | + * @param resourceGroupName The name of the resource group. The name is case insensitive. |
| 28 | + * @param serverName The name of the server. |
| 29 | + * @param objectId Guid of the objectId for the administrator. |
| 30 | + * @param parameters The required parameters for adding an active directory administrator for a server. |
| 31 | + * @throws IllegalArgumentException thrown if parameters fail the validation. |
| 32 | + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. |
| 33 | + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. |
| 34 | + * @return represents an Active Directory administrator along with {@link Response} on successful completion of |
| 35 | + * {@link Mono}. |
| 36 | + */ |
| 37 | + @ServiceMethod(returns = ReturnType.SINGLE) |
| 38 | + Mono<Response<Flux<ByteBuffer>>> createWithResponseAsync( |
| 39 | + String resourceGroupName, String serverName, String objectId, ActiveDirectoryAdministratorAdd parameters); |
| 40 | + |
| 41 | + /** |
| 42 | + * Creates a new server. |
| 43 | + * |
| 44 | + * @param resourceGroupName The name of the resource group. The name is case insensitive. |
| 45 | + * @param serverName The name of the server. |
| 46 | + * @param objectId Guid of the objectId for the administrator. |
| 47 | + * @param parameters The required parameters for adding an active directory administrator for a server. |
| 48 | + * @throws IllegalArgumentException thrown if parameters fail the validation. |
| 49 | + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. |
| 50 | + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. |
| 51 | + * @return the {@link PollerFlux} for polling of represents an Active Directory administrator. |
| 52 | + */ |
| 53 | + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) |
| 54 | + PollerFlux<PollResult<ActiveDirectoryAdministratorInner>, ActiveDirectoryAdministratorInner> beginCreateAsync( |
| 55 | + String resourceGroupName, String serverName, String objectId, ActiveDirectoryAdministratorAdd parameters); |
| 56 | + |
19 | 57 | /**
|
20 | 58 | * Creates a new server.
|
21 | 59 | *
|
@@ -53,6 +91,22 @@ SyncPoller<PollResult<ActiveDirectoryAdministratorInner>, ActiveDirectoryAdminis
|
53 | 91 | ActiveDirectoryAdministratorAdd parameters,
|
54 | 92 | Context context);
|
55 | 93 |
|
| 94 | + /** |
| 95 | + * Creates a new server. |
| 96 | + * |
| 97 | + * @param resourceGroupName The name of the resource group. The name is case insensitive. |
| 98 | + * @param serverName The name of the server. |
| 99 | + * @param objectId Guid of the objectId for the administrator. |
| 100 | + * @param parameters The required parameters for adding an active directory administrator for a server. |
| 101 | + * @throws IllegalArgumentException thrown if parameters fail the validation. |
| 102 | + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. |
| 103 | + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. |
| 104 | + * @return represents an Active Directory administrator on successful completion of {@link Mono}. |
| 105 | + */ |
| 106 | + @ServiceMethod(returns = ReturnType.SINGLE) |
| 107 | + Mono<ActiveDirectoryAdministratorInner> createAsync( |
| 108 | + String resourceGroupName, String serverName, String objectId, ActiveDirectoryAdministratorAdd parameters); |
| 109 | + |
56 | 110 | /**
|
57 | 111 | * Creates a new server.
|
58 | 112 | *
|
@@ -90,6 +144,35 @@ ActiveDirectoryAdministratorInner create(
|
90 | 144 | ActiveDirectoryAdministratorAdd parameters,
|
91 | 145 | Context context);
|
92 | 146 |
|
| 147 | + /** |
| 148 | + * Deletes an Active Directory Administrator associated with the server. |
| 149 | + * |
| 150 | + * @param resourceGroupName The name of the resource group. The name is case insensitive. |
| 151 | + * @param serverName The name of the server. |
| 152 | + * @param objectId Guid of the objectId for the administrator. |
| 153 | + * @throws IllegalArgumentException thrown if parameters fail the validation. |
| 154 | + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. |
| 155 | + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. |
| 156 | + * @return the {@link Response} on successful completion of {@link Mono}. |
| 157 | + */ |
| 158 | + @ServiceMethod(returns = ReturnType.SINGLE) |
| 159 | + Mono<Response<Flux<ByteBuffer>>> deleteWithResponseAsync( |
| 160 | + String resourceGroupName, String serverName, String objectId); |
| 161 | + |
| 162 | + /** |
| 163 | + * Deletes an Active Directory Administrator associated with the server. |
| 164 | + * |
| 165 | + * @param resourceGroupName The name of the resource group. The name is case insensitive. |
| 166 | + * @param serverName The name of the server. |
| 167 | + * @param objectId Guid of the objectId for the administrator. |
| 168 | + * @throws IllegalArgumentException thrown if parameters fail the validation. |
| 169 | + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. |
| 170 | + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. |
| 171 | + * @return the {@link PollerFlux} for polling of long-running operation. |
| 172 | + */ |
| 173 | + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) |
| 174 | + PollerFlux<PollResult<Void>, Void> beginDeleteAsync(String resourceGroupName, String serverName, String objectId); |
| 175 | + |
93 | 176 | /**
|
94 | 177 | * Deletes an Active Directory Administrator associated with the server.
|
95 | 178 | *
|
@@ -120,6 +203,20 @@ ActiveDirectoryAdministratorInner create(
|
120 | 203 | SyncPoller<PollResult<Void>, Void> beginDelete(
|
121 | 204 | String resourceGroupName, String serverName, String objectId, Context context);
|
122 | 205 |
|
| 206 | + /** |
| 207 | + * Deletes an Active Directory Administrator associated with the server. |
| 208 | + * |
| 209 | + * @param resourceGroupName The name of the resource group. The name is case insensitive. |
| 210 | + * @param serverName The name of the server. |
| 211 | + * @param objectId Guid of the objectId for the administrator. |
| 212 | + * @throws IllegalArgumentException thrown if parameters fail the validation. |
| 213 | + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. |
| 214 | + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. |
| 215 | + * @return A {@link Mono} that completes when a successful response is received. |
| 216 | + */ |
| 217 | + @ServiceMethod(returns = ReturnType.SINGLE) |
| 218 | + Mono<Void> deleteAsync(String resourceGroupName, String serverName, String objectId); |
| 219 | + |
123 | 220 | /**
|
124 | 221 | * Deletes an Active Directory Administrator associated with the server.
|
125 | 222 | *
|
@@ -147,6 +244,35 @@ SyncPoller<PollResult<Void>, Void> beginDelete(
|
147 | 244 | @ServiceMethod(returns = ReturnType.SINGLE)
|
148 | 245 | void delete(String resourceGroupName, String serverName, String objectId, Context context);
|
149 | 246 |
|
| 247 | + /** |
| 248 | + * Gets information about a server. |
| 249 | + * |
| 250 | + * @param resourceGroupName The name of the resource group. The name is case insensitive. |
| 251 | + * @param serverName The name of the server. |
| 252 | + * @param objectId Guid of the objectId for the administrator. |
| 253 | + * @throws IllegalArgumentException thrown if parameters fail the validation. |
| 254 | + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. |
| 255 | + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. |
| 256 | + * @return information about a server along with {@link Response} on successful completion of {@link Mono}. |
| 257 | + */ |
| 258 | + @ServiceMethod(returns = ReturnType.SINGLE) |
| 259 | + Mono<Response<ActiveDirectoryAdministratorInner>> getWithResponseAsync( |
| 260 | + String resourceGroupName, String serverName, String objectId); |
| 261 | + |
| 262 | + /** |
| 263 | + * Gets information about a server. |
| 264 | + * |
| 265 | + * @param resourceGroupName The name of the resource group. The name is case insensitive. |
| 266 | + * @param serverName The name of the server. |
| 267 | + * @param objectId Guid of the objectId for the administrator. |
| 268 | + * @throws IllegalArgumentException thrown if parameters fail the validation. |
| 269 | + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. |
| 270 | + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. |
| 271 | + * @return information about a server on successful completion of {@link Mono}. |
| 272 | + */ |
| 273 | + @ServiceMethod(returns = ReturnType.SINGLE) |
| 274 | + Mono<ActiveDirectoryAdministratorInner> getAsync(String resourceGroupName, String serverName, String objectId); |
| 275 | + |
150 | 276 | /**
|
151 | 277 | * Gets information about a server.
|
152 | 278 | *
|
@@ -177,6 +303,19 @@ Response<ActiveDirectoryAdministratorInner> getWithResponse(
|
177 | 303 | @ServiceMethod(returns = ReturnType.SINGLE)
|
178 | 304 | ActiveDirectoryAdministratorInner get(String resourceGroupName, String serverName, String objectId);
|
179 | 305 |
|
| 306 | + /** |
| 307 | + * List all the AAD administrators for a given server. |
| 308 | + * |
| 309 | + * @param resourceGroupName The name of the resource group. The name is case insensitive. |
| 310 | + * @param serverName The name of the server. |
| 311 | + * @throws IllegalArgumentException thrown if parameters fail the validation. |
| 312 | + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. |
| 313 | + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. |
| 314 | + * @return a list of active directory administrators as paginated response with {@link PagedFlux}. |
| 315 | + */ |
| 316 | + @ServiceMethod(returns = ReturnType.COLLECTION) |
| 317 | + PagedFlux<ActiveDirectoryAdministratorInner> listByServerAsync(String resourceGroupName, String serverName); |
| 318 | + |
180 | 319 | /**
|
181 | 320 | * List all the AAD administrators for a given server.
|
182 | 321 | *
|
|
0 commit comments