diff --git a/src/main/java/com/microsoft/graph/requests/generated/BaseDriveItemCollectionRequest.java b/src/main/java/com/microsoft/graph/requests/generated/BaseDriveItemCollectionRequest.java index 2a0af2416df..b9c2ff997fa 100644 --- a/src/main/java/com/microsoft/graph/requests/generated/BaseDriveItemCollectionRequest.java +++ b/src/main/java/com/microsoft/graph/requests/generated/BaseDriveItemCollectionRequest.java @@ -5,18 +5,21 @@ // **NOTE** This file was generated by a tool and any changes will be overwritten. package com.microsoft.graph.requests.generated; -import com.microsoft.graph.concurrency.*; -import com.microsoft.graph.core.*; -import com.microsoft.graph.models.extensions.*; -import com.microsoft.graph.models.generated.*; -import com.microsoft.graph.http.*; -import com.microsoft.graph.requests.extensions.*; -import com.microsoft.graph.requests.generated.*; -import com.microsoft.graph.options.*; -import com.microsoft.graph.serializer.*; - -import java.util.Arrays; -import java.util.EnumSet; +import com.microsoft.graph.concurrency.ICallback; +import com.microsoft.graph.concurrency.IExecutors; +import com.microsoft.graph.core.ClientException; +import com.microsoft.graph.core.IBaseClient; +import com.microsoft.graph.http.BaseCollectionRequest; +import com.microsoft.graph.models.extensions.DriveItem; +import com.microsoft.graph.options.Option; +import com.microsoft.graph.options.QueryOption; +import com.microsoft.graph.requests.extensions.DriveItemCollectionPage; +import com.microsoft.graph.requests.extensions.DriveItemCollectionRequest; +import com.microsoft.graph.requests.extensions.DriveItemCollectionRequestBuilder; +import com.microsoft.graph.requests.extensions.DriveItemRequestBuilder; +import com.microsoft.graph.requests.extensions.IDriveItemCollectionPage; +import com.microsoft.graph.requests.extensions.IDriveItemCollectionRequest; +import com.microsoft.graph.requests.extensions.IDriveItemCollectionRequestBuilder; // **NOTE** This file was generated by a tool and any changes will be overwritten. @@ -101,6 +104,19 @@ public IDriveItemCollectionRequest top(final int value) { addQueryOption(new QueryOption("$top", value + "")); return (DriveItemCollectionRequest)this; } + /** + * Add Skip token for pagination + * @param skipToken - Token for pagination + * @return the updated request + * @author K.Samraj + * @since 1.0 + */ + public IDriveItemCollectionRequest skipToken(final String skipToken) { + if(!isBlank(skipToken)) { + addQueryOption(new QueryOption("$skiptoken", skipToken)); + } + return (DriveItemCollectionRequest)this; + } public IDriveItemCollectionPage buildFromResponse(final BaseDriveItemCollectionResponse response) { final IDriveItemCollectionRequestBuilder builder; @@ -113,4 +129,17 @@ public IDriveItemCollectionPage buildFromResponse(final BaseDriveItemCollectionR page.setRawObject(response.getSerializer(), response.getRawObject()); return page; } + + public static boolean isBlank(final CharSequence cs) { + int strLen; + if (cs == null || (strLen = cs.length()) == 0) { + return true; + } + for (int i = 0; i < strLen; i++) { + if (!Character.isWhitespace(cs.charAt(i))) { + return false; + } + } + return true; + } } diff --git a/src/main/java/com/microsoft/graph/requests/generated/IBaseDriveItemCollectionRequest.java b/src/main/java/com/microsoft/graph/requests/generated/IBaseDriveItemCollectionRequest.java index f63200a573f..85b87b58c63 100644 --- a/src/main/java/com/microsoft/graph/requests/generated/IBaseDriveItemCollectionRequest.java +++ b/src/main/java/com/microsoft/graph/requests/generated/IBaseDriveItemCollectionRequest.java @@ -4,56 +4,63 @@ package com.microsoft.graph.requests.generated; -import com.microsoft.graph.concurrency.*; -import com.microsoft.graph.core.*; -import com.microsoft.graph.models.extensions.*; -import com.microsoft.graph.models.generated.*; -import com.microsoft.graph.http.*; -import com.microsoft.graph.requests.extensions.*; -import com.microsoft.graph.requests.generated.*; -import com.microsoft.graph.options.*; -import com.microsoft.graph.serializer.*; - -import java.util.Arrays; -import java.util.EnumSet; +import com.microsoft.graph.concurrency.ICallback; +import com.microsoft.graph.core.ClientException; +import com.microsoft.graph.models.extensions.DriveItem; +import com.microsoft.graph.requests.extensions.IDriveItemCollectionPage; +import com.microsoft.graph.requests.extensions.IDriveItemCollectionRequest; // **NOTE** This file was generated by a tool and any changes will be overwritten. /** * The interface for the Base Drive Item Collection Request. */ -public interface IBaseDriveItemCollectionRequest { +public interface IBaseDriveItemCollectionRequest +{ - void get(final ICallback callback); + void get(final ICallback callback); - IDriveItemCollectionPage get() throws ClientException; + IDriveItemCollectionPage get() throws ClientException; - void post(final DriveItem newDriveItem, final ICallback callback); + void post(final DriveItem newDriveItem, final ICallback callback); - DriveItem post(final DriveItem newDriveItem) throws ClientException; + DriveItem post(final DriveItem newDriveItem) throws ClientException; - /** - * Sets the expand clause for the request - * - * @param value the expand clause - * @return the updated request - */ - IDriveItemCollectionRequest expand(final String value); + /** + * Sets the expand clause for the request + * + * @param value + * the expand clause + * @return the updated request + */ + IDriveItemCollectionRequest expand(final String value); - /** - * Sets the select clause for the request - * - * @param value the select clause - * @return the updated request - */ - IDriveItemCollectionRequest select(final String value); + /** + * Sets the select clause for the request + * + * @param value + * the select clause + * @return the updated request + */ + IDriveItemCollectionRequest select(final String value); - /** - * Sets the top value for the request - * - * @param value the max number of items to return - * @return the updated request - */ - IDriveItemCollectionRequest top(final int value); + /** + * Sets the top value for the request + * + * @param value + * the max number of items to return + * @return the updated request + */ + IDriveItemCollectionRequest top(final int value); + /** + * Sets the skip token value for the request + * + * @param skipToken + * value for pagination + * @return the updated request + * @author K.Samraj + * @since 1.0 + */ + IDriveItemCollectionRequest skipToken(String skipToken); }