|
| 1 | +// Template Source: BaseEntityRequest.java.tt |
| 2 | +// ------------------------------------------------------------------------------ |
| 3 | +// Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. |
| 4 | +// ------------------------------------------------------------------------------ |
| 5 | + |
| 6 | +package com.microsoft.graph.ediscovery.requests; |
| 7 | + |
| 8 | +import com.microsoft.graph.http.IRequestBuilder; |
| 9 | +import com.microsoft.graph.core.ClientException; |
| 10 | +import com.microsoft.graph.ediscovery.models.CaseSettings; |
| 11 | +import java.util.Arrays; |
| 12 | +import java.util.EnumSet; |
| 13 | +import javax.annotation.Nullable; |
| 14 | +import javax.annotation.Nonnull; |
| 15 | +import com.microsoft.graph.core.IBaseClient; |
| 16 | +import com.microsoft.graph.http.BaseRequest; |
| 17 | +import com.microsoft.graph.http.HttpMethod; |
| 18 | + |
| 19 | +// **NOTE** This file was generated by a tool and any changes will be overwritten. |
| 20 | + |
| 21 | +/** |
| 22 | + * The class for the Case Settings Request. |
| 23 | + */ |
| 24 | +public class CaseSettingsRequest extends BaseRequest<CaseSettings> { |
| 25 | + |
| 26 | + /** |
| 27 | + * The request for the CaseSettings |
| 28 | + * |
| 29 | + * @param requestUrl the request URL |
| 30 | + * @param client the service client |
| 31 | + * @param requestOptions the options for this request |
| 32 | + */ |
| 33 | + public CaseSettingsRequest(@Nonnull final String requestUrl, @Nonnull final IBaseClient<?> client, @Nullable final java.util.List<? extends com.microsoft.graph.options.Option> requestOptions) { |
| 34 | + super(requestUrl, client, requestOptions, CaseSettings.class); |
| 35 | + } |
| 36 | + |
| 37 | + /** |
| 38 | + * Gets the CaseSettings from the service |
| 39 | + * |
| 40 | + * @return a future with the result |
| 41 | + */ |
| 42 | + @Nonnull |
| 43 | + public java.util.concurrent.CompletableFuture<CaseSettings> getAsync() { |
| 44 | + return sendAsync(HttpMethod.GET, null); |
| 45 | + } |
| 46 | + |
| 47 | + /** |
| 48 | + * Gets the CaseSettings from the service |
| 49 | + * |
| 50 | + * @return the CaseSettings from the request |
| 51 | + * @throws ClientException this exception occurs if the request was unable to complete for any reason |
| 52 | + */ |
| 53 | + @Nullable |
| 54 | + public CaseSettings get() throws ClientException { |
| 55 | + return send(HttpMethod.GET, null); |
| 56 | + } |
| 57 | + |
| 58 | + /** |
| 59 | + * Delete this item from the service |
| 60 | + * |
| 61 | + * @return a future with the deletion result |
| 62 | + */ |
| 63 | + @Nonnull |
| 64 | + public java.util.concurrent.CompletableFuture<CaseSettings> deleteAsync() { |
| 65 | + return sendAsync(HttpMethod.DELETE, null); |
| 66 | + } |
| 67 | + |
| 68 | + /** |
| 69 | + * Delete this item from the service |
| 70 | + * @return the resulting response if the service returns anything on deletion |
| 71 | + * |
| 72 | + * @throws ClientException if there was an exception during the delete operation |
| 73 | + */ |
| 74 | + @Nullable |
| 75 | + public CaseSettings delete() throws ClientException { |
| 76 | + return send(HttpMethod.DELETE, null); |
| 77 | + } |
| 78 | + |
| 79 | + /** |
| 80 | + * Patches this CaseSettings with a source |
| 81 | + * |
| 82 | + * @param sourceCaseSettings the source object with updates |
| 83 | + * @return a future with the result |
| 84 | + */ |
| 85 | + @Nonnull |
| 86 | + public java.util.concurrent.CompletableFuture<CaseSettings> patchAsync(@Nonnull final CaseSettings sourceCaseSettings) { |
| 87 | + return sendAsync(HttpMethod.PATCH, sourceCaseSettings); |
| 88 | + } |
| 89 | + |
| 90 | + /** |
| 91 | + * Patches this CaseSettings with a source |
| 92 | + * |
| 93 | + * @param sourceCaseSettings the source object with updates |
| 94 | + * @return the updated CaseSettings |
| 95 | + * @throws ClientException this exception occurs if the request was unable to complete for any reason |
| 96 | + */ |
| 97 | + @Nullable |
| 98 | + public CaseSettings patch(@Nonnull final CaseSettings sourceCaseSettings) throws ClientException { |
| 99 | + return send(HttpMethod.PATCH, sourceCaseSettings); |
| 100 | + } |
| 101 | + |
| 102 | + /** |
| 103 | + * Creates a CaseSettings with a new object |
| 104 | + * |
| 105 | + * @param newCaseSettings the new object to create |
| 106 | + * @return a future with the result |
| 107 | + */ |
| 108 | + @Nonnull |
| 109 | + public java.util.concurrent.CompletableFuture<CaseSettings> postAsync(@Nonnull final CaseSettings newCaseSettings) { |
| 110 | + return sendAsync(HttpMethod.POST, newCaseSettings); |
| 111 | + } |
| 112 | + |
| 113 | + /** |
| 114 | + * Creates a CaseSettings with a new object |
| 115 | + * |
| 116 | + * @param newCaseSettings the new object to create |
| 117 | + * @return the created CaseSettings |
| 118 | + * @throws ClientException this exception occurs if the request was unable to complete for any reason |
| 119 | + */ |
| 120 | + @Nullable |
| 121 | + public CaseSettings post(@Nonnull final CaseSettings newCaseSettings) throws ClientException { |
| 122 | + return send(HttpMethod.POST, newCaseSettings); |
| 123 | + } |
| 124 | + |
| 125 | + /** |
| 126 | + * Creates a CaseSettings with a new object |
| 127 | + * |
| 128 | + * @param newCaseSettings the object to create/update |
| 129 | + * @return a future with the result |
| 130 | + */ |
| 131 | + @Nonnull |
| 132 | + public java.util.concurrent.CompletableFuture<CaseSettings> putAsync(@Nonnull final CaseSettings newCaseSettings) { |
| 133 | + return sendAsync(HttpMethod.PUT, newCaseSettings); |
| 134 | + } |
| 135 | + |
| 136 | + /** |
| 137 | + * Creates a CaseSettings with a new object |
| 138 | + * |
| 139 | + * @param newCaseSettings the object to create/update |
| 140 | + * @return the created CaseSettings |
| 141 | + * @throws ClientException this exception occurs if the request was unable to complete for any reason |
| 142 | + */ |
| 143 | + @Nullable |
| 144 | + public CaseSettings put(@Nonnull final CaseSettings newCaseSettings) throws ClientException { |
| 145 | + return send(HttpMethod.PUT, newCaseSettings); |
| 146 | + } |
| 147 | + |
| 148 | + /** |
| 149 | + * Sets the select clause for the request |
| 150 | + * |
| 151 | + * @param value the select clause |
| 152 | + * @return the updated request |
| 153 | + */ |
| 154 | + @Nonnull |
| 155 | + public CaseSettingsRequest select(@Nonnull final String value) { |
| 156 | + addSelectOption(value); |
| 157 | + return this; |
| 158 | + } |
| 159 | + |
| 160 | + /** |
| 161 | + * Sets the expand clause for the request |
| 162 | + * |
| 163 | + * @param value the expand clause |
| 164 | + * @return the updated request |
| 165 | + */ |
| 166 | + @Nonnull |
| 167 | + public CaseSettingsRequest expand(@Nonnull final String value) { |
| 168 | + addExpandOption(value); |
| 169 | + return this; |
| 170 | + } |
| 171 | + |
| 172 | +} |
| 173 | + |
0 commit comments