@@ -54,6 +54,26 @@ public MailboxFolderItemRequestBuilder(@jakarta.annotation.Nonnull final HashMap
5454 public MailboxFolderItemRequestBuilder (@ jakarta .annotation .Nonnull final String rawUrl , @ jakarta .annotation .Nonnull final RequestAdapter requestAdapter ) {
5555 super (requestAdapter , "{+baseurl}/admin/exchange/mailboxes/{mailbox%2Did}/folders/{mailboxFolder%2Did}{?%24expand,%24select}" , rawUrl );
5656 }
57+ /**
58+ * Delete a mailboxFolder or a child mailboxFolder within a mailbox.
59+ * @throws ODataError When receiving a 4XX or 5XX status code
60+ * @see <a href="https://learn.microsoft.com/graph/api/mailbox-delete-folders?view=graph-rest-1.0">Find more info here</a>
61+ */
62+ public void delete () {
63+ delete (null );
64+ }
65+ /**
66+ * Delete a mailboxFolder or a child mailboxFolder within a mailbox.
67+ * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
68+ * @throws ODataError When receiving a 4XX or 5XX status code
69+ * @see <a href="https://learn.microsoft.com/graph/api/mailbox-delete-folders?view=graph-rest-1.0">Find more info here</a>
70+ */
71+ public void delete (@ jakarta .annotation .Nullable final java .util .function .Consumer <DeleteRequestConfiguration > requestConfiguration ) {
72+ final RequestInformation requestInfo = toDeleteRequestInformation (requestConfiguration );
73+ final HashMap <String , ParsableFactory <? extends Parsable >> errorMapping = new HashMap <String , ParsableFactory <? extends Parsable >>();
74+ errorMapping .put ("XXX" , ODataError ::createFromDiscriminatorValue );
75+ this .requestAdapter .sendPrimitive (requestInfo , errorMapping , Void .class );
76+ }
5777 /**
5878 * Read the properties and relationships of a mailboxFolder object.
5979 * @return a {@link MailboxFolder}
@@ -78,6 +98,53 @@ public MailboxFolder get(@jakarta.annotation.Nullable final java.util.function.C
7898 errorMapping .put ("XXX" , ODataError ::createFromDiscriminatorValue );
7999 return this .requestAdapter .send (requestInfo , errorMapping , MailboxFolder ::createFromDiscriminatorValue );
80100 }
101+ /**
102+ * Update mailboxFolder properties such as the displayName within a mailbox.
103+ * @param body The request body
104+ * @return a {@link MailboxFolder}
105+ * @throws ODataError When receiving a 4XX or 5XX status code
106+ * @see <a href="https://learn.microsoft.com/graph/api/mailboxfolder-update?view=graph-rest-1.0">Find more info here</a>
107+ */
108+ @ jakarta .annotation .Nullable
109+ public MailboxFolder patch (@ jakarta .annotation .Nonnull final MailboxFolder body ) {
110+ return patch (body , null );
111+ }
112+ /**
113+ * Update mailboxFolder properties such as the displayName within a mailbox.
114+ * @param body The request body
115+ * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
116+ * @return a {@link MailboxFolder}
117+ * @throws ODataError When receiving a 4XX or 5XX status code
118+ * @see <a href="https://learn.microsoft.com/graph/api/mailboxfolder-update?view=graph-rest-1.0">Find more info here</a>
119+ */
120+ @ jakarta .annotation .Nullable
121+ public MailboxFolder patch (@ jakarta .annotation .Nonnull final MailboxFolder body , @ jakarta .annotation .Nullable final java .util .function .Consumer <PatchRequestConfiguration > requestConfiguration ) {
122+ Objects .requireNonNull (body );
123+ final RequestInformation requestInfo = toPatchRequestInformation (body , requestConfiguration );
124+ final HashMap <String , ParsableFactory <? extends Parsable >> errorMapping = new HashMap <String , ParsableFactory <? extends Parsable >>();
125+ errorMapping .put ("XXX" , ODataError ::createFromDiscriminatorValue );
126+ return this .requestAdapter .send (requestInfo , errorMapping , MailboxFolder ::createFromDiscriminatorValue );
127+ }
128+ /**
129+ * Delete a mailboxFolder or a child mailboxFolder within a mailbox.
130+ * @return a {@link RequestInformation}
131+ */
132+ @ jakarta .annotation .Nonnull
133+ public RequestInformation toDeleteRequestInformation () {
134+ return toDeleteRequestInformation (null );
135+ }
136+ /**
137+ * Delete a mailboxFolder or a child mailboxFolder within a mailbox.
138+ * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
139+ * @return a {@link RequestInformation}
140+ */
141+ @ jakarta .annotation .Nonnull
142+ public RequestInformation toDeleteRequestInformation (@ jakarta .annotation .Nullable final java .util .function .Consumer <DeleteRequestConfiguration > requestConfiguration ) {
143+ final RequestInformation requestInfo = new RequestInformation (HttpMethod .DELETE , urlTemplate , pathParameters );
144+ requestInfo .configure (requestConfiguration , DeleteRequestConfiguration ::new );
145+ requestInfo .headers .tryAdd ("Accept" , "application/json" );
146+ return requestInfo ;
147+ }
81148 /**
82149 * Read the properties and relationships of a mailboxFolder object.
83150 * @return a {@link RequestInformation}
@@ -98,6 +165,30 @@ public RequestInformation toGetRequestInformation(@jakarta.annotation.Nullable f
98165 requestInfo .headers .tryAdd ("Accept" , "application/json" );
99166 return requestInfo ;
100167 }
168+ /**
169+ * Update mailboxFolder properties such as the displayName within a mailbox.
170+ * @param body The request body
171+ * @return a {@link RequestInformation}
172+ */
173+ @ jakarta .annotation .Nonnull
174+ public RequestInformation toPatchRequestInformation (@ jakarta .annotation .Nonnull final MailboxFolder body ) {
175+ return toPatchRequestInformation (body , null );
176+ }
177+ /**
178+ * Update mailboxFolder properties such as the displayName within a mailbox.
179+ * @param body The request body
180+ * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
181+ * @return a {@link RequestInformation}
182+ */
183+ @ jakarta .annotation .Nonnull
184+ public RequestInformation toPatchRequestInformation (@ jakarta .annotation .Nonnull final MailboxFolder body , @ jakarta .annotation .Nullable final java .util .function .Consumer <PatchRequestConfiguration > requestConfiguration ) {
185+ Objects .requireNonNull (body );
186+ final RequestInformation requestInfo = new RequestInformation (HttpMethod .PATCH , urlTemplate , pathParameters );
187+ requestInfo .configure (requestConfiguration , PatchRequestConfiguration ::new );
188+ requestInfo .headers .tryAdd ("Accept" , "application/json" );
189+ requestInfo .setContentFromParsable (requestAdapter , "application/json" , body );
190+ return requestInfo ;
191+ }
101192 /**
102193 * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored.
103194 * @param rawUrl The raw URL to use for the request builder.
@@ -108,6 +199,12 @@ public MailboxFolderItemRequestBuilder withUrl(@jakarta.annotation.Nonnull final
108199 Objects .requireNonNull (rawUrl );
109200 return new MailboxFolderItemRequestBuilder (rawUrl , requestAdapter );
110201 }
202+ /**
203+ * Configuration for the request such as headers, query parameters, and middleware options.
204+ */
205+ @ jakarta .annotation .Generated ("com.microsoft.kiota" )
206+ public class DeleteRequestConfiguration extends BaseRequestConfiguration {
207+ }
111208 /**
112209 * Read the properties and relationships of a mailboxFolder object.
113210 */
@@ -146,4 +243,10 @@ public class GetRequestConfiguration extends BaseRequestConfiguration {
146243 @ jakarta .annotation .Nullable
147244 public GetQueryParameters queryParameters = new GetQueryParameters ();
148245 }
246+ /**
247+ * Configuration for the request such as headers, query parameters, and middleware options.
248+ */
249+ @ jakarta .annotation .Generated ("com.microsoft.kiota" )
250+ public class PatchRequestConfiguration extends BaseRequestConfiguration {
251+ }
149252}
0 commit comments