Skip to content

Commit f666000

Browse files
committed
Update graph service client
1 parent b0ec071 commit f666000

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

src/main/java/com/microsoft/serviceClient/GraphServiceClient.java

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,18 +8,19 @@
88
import com.microsoft.kiota.authentication.AnonymousAuthenticationProvider;
99
import com.microsoft.kiota.authentication.AuthenticationProvider;
1010
import com.microsoft.kiota.authentication.AzureIdentityAuthenticationProvider;
11-
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
1211

1312
import okhttp3.OkHttpClient;
1413

1514
import javax.annotation.Nonnull;
15+
import javax.annotation.Nullable;
1616

1717
public class GraphServiceClient extends com.microsoft.graph.BaseGraphServiceClient {
1818

1919
/**
2020
* Sets a few basic values for the GraphClientOptions to pass to the client.
2121
* @return the GraphClientOptions instance for the GraphServiceClient.
2222
*/
23+
@Nonnull
2324
public static GraphClientOption getGraphClientOptions() {
2425
GraphClientOption graphClientOptions = new GraphClientOption();
2526
graphClientOptions.setGraphServiceTargetVersion("beta");
@@ -37,22 +38,23 @@ public GraphServiceClient(@Nonnull RequestAdapter requestAdapter) {
3738
* Instantiate the GraphServiceClient using an AuthenticationProvider.
3839
* @param authenticationProvider The AuthenticationProvider for this GraphServiceClient.
3940
*/
40-
public GraphServiceClient(AuthenticationProvider authenticationProvider) {
41+
public GraphServiceClient(@Nonnull AuthenticationProvider authenticationProvider) {
4142
super(new BaseGraphRequestAdapter(authenticationProvider, null, "beta" , getGraphClientOptions()));
4243
}
4344
/**
4445
* Instantiate the GraphServiceClient using a TokenCredential and Scopes.
4546
* @param tokenCredential The TokenCredential for this GraphServiceClient.
4647
* @param scopes The Scopes for this GraphServiceClient.
4748
*/
48-
public GraphServiceClient(TokenCredential tokenCredential, String... scopes) {
49+
@SuppressWarnings("LambdaLast")
50+
public GraphServiceClient(@Nonnull TokenCredential tokenCredential, @Nullable String... scopes) {
4951
this(new AzureIdentityAuthenticationProvider(tokenCredential, null, scopes));
5052
}
5153
/**
5254
* Instantiate the GraphServiceClient using an OkHttpClient
5355
* @param client The OkHttpClient for the GraphServiceClient.
5456
*/
55-
public GraphServiceClient(OkHttpClient client) {
57+
public GraphServiceClient(@Nonnull OkHttpClient client) {
5658
super(new BaseGraphRequestAdapter(new AnonymousAuthenticationProvider(), null, "beta", client));
5759
}
5860
}

0 commit comments

Comments
 (0)