@@ -928,6 +928,25 @@ public CompletableFuture<ApiResponse<RoleResponse>> getRoleWithHttpInfoAsync(Str
928928 new GenericType <RoleResponse >() {});
929929 }
930930
931+ /** Manage optional parameters to listPermissions. */
932+ public static class ListPermissionsOptionalParameters {
933+ private Boolean includeScopes ;
934+
935+ /**
936+ * Set includeScopes.
937+ *
938+ * @param includeScopes Set to <code>true</code> to return all permissions, including both
939+ * permissions that can be assigned to user roles and permissions that can only be used as
940+ * scopes for OAuth clients and scoped credentials. When <code>false</code> (default), only
941+ * permissions that can be assigned to user roles are returned. (optional)
942+ * @return ListPermissionsOptionalParameters
943+ */
944+ public ListPermissionsOptionalParameters includeScopes (Boolean includeScopes ) {
945+ this .includeScopes = includeScopes ;
946+ return this ;
947+ }
948+ }
949+
931950 /**
932951 * List permissions.
933952 *
@@ -937,7 +956,7 @@ public CompletableFuture<ApiResponse<RoleResponse>> getRoleWithHttpInfoAsync(Str
937956 * @throws ApiException if fails to make API call
938957 */
939958 public PermissionsResponse listPermissions () throws ApiException {
940- return listPermissionsWithHttpInfo ().getData ();
959+ return listPermissionsWithHttpInfo (new ListPermissionsOptionalParameters () ).getData ();
941960 }
942961
943962 /**
@@ -948,7 +967,38 @@ public PermissionsResponse listPermissions() throws ApiException {
948967 * @return CompletableFuture<PermissionsResponse>
949968 */
950969 public CompletableFuture <PermissionsResponse > listPermissionsAsync () {
951- return listPermissionsWithHttpInfoAsync ()
970+ return listPermissionsWithHttpInfoAsync (new ListPermissionsOptionalParameters ())
971+ .thenApply (
972+ response -> {
973+ return response .getData ();
974+ });
975+ }
976+
977+ /**
978+ * List permissions.
979+ *
980+ * <p>See {@link #listPermissionsWithHttpInfo}.
981+ *
982+ * @param parameters Optional parameters for the request.
983+ * @return PermissionsResponse
984+ * @throws ApiException if fails to make API call
985+ */
986+ public PermissionsResponse listPermissions (ListPermissionsOptionalParameters parameters )
987+ throws ApiException {
988+ return listPermissionsWithHttpInfo (parameters ).getData ();
989+ }
990+
991+ /**
992+ * List permissions.
993+ *
994+ * <p>See {@link #listPermissionsWithHttpInfoAsync}.
995+ *
996+ * @param parameters Optional parameters for the request.
997+ * @return CompletableFuture<PermissionsResponse>
998+ */
999+ public CompletableFuture <PermissionsResponse > listPermissionsAsync (
1000+ ListPermissionsOptionalParameters parameters ) {
1001+ return listPermissionsWithHttpInfoAsync (parameters )
9521002 .thenApply (
9531003 response -> {
9541004 return response .getData ();
@@ -958,6 +1008,7 @@ public CompletableFuture<PermissionsResponse> listPermissionsAsync() {
9581008 /**
9591009 * Returns a list of all permissions, including name, description, and ID.
9601010 *
1011+ * @param parameters Optional parameters for the request.
9611012 * @return ApiResponse<PermissionsResponse>
9621013 * @throws ApiException if fails to make API call
9631014 * @http.response.details
@@ -970,18 +1021,23 @@ public CompletableFuture<PermissionsResponse> listPermissionsAsync() {
9701021 * <tr><td> 429 </td><td> Too many requests </td><td> - </td></tr>
9711022 * </table>
9721023 */
973- public ApiResponse <PermissionsResponse > listPermissionsWithHttpInfo () throws ApiException {
1024+ public ApiResponse <PermissionsResponse > listPermissionsWithHttpInfo (
1025+ ListPermissionsOptionalParameters parameters ) throws ApiException {
9741026 Object localVarPostBody = null ;
1027+ Boolean includeScopes = parameters .includeScopes ;
9751028 // create path and map variables
9761029 String localVarPath = "/api/v2/permissions" ;
9771030
1031+ List <Pair > localVarQueryParams = new ArrayList <Pair >();
9781032 Map <String , String > localVarHeaderParams = new HashMap <String , String >();
9791033
1034+ localVarQueryParams .addAll (apiClient .parameterToPairs ("" , "include_scopes" , includeScopes ));
1035+
9801036 Invocation .Builder builder =
9811037 apiClient .createBuilder (
9821038 "v2.RolesApi.listPermissions" ,
9831039 localVarPath ,
984- new ArrayList < Pair >() ,
1040+ localVarQueryParams ,
9851041 localVarHeaderParams ,
9861042 new HashMap <String , String >(),
9871043 new String [] {"application/json" },
@@ -1002,22 +1058,28 @@ public ApiResponse<PermissionsResponse> listPermissionsWithHttpInfo() throws Api
10021058 *
10031059 * <p>See {@link #listPermissionsWithHttpInfo}.
10041060 *
1061+ * @param parameters Optional parameters for the request.
10051062 * @return CompletableFuture<ApiResponse<PermissionsResponse>>
10061063 */
1007- public CompletableFuture <ApiResponse <PermissionsResponse >> listPermissionsWithHttpInfoAsync () {
1064+ public CompletableFuture <ApiResponse <PermissionsResponse >> listPermissionsWithHttpInfoAsync (
1065+ ListPermissionsOptionalParameters parameters ) {
10081066 Object localVarPostBody = null ;
1067+ Boolean includeScopes = parameters .includeScopes ;
10091068 // create path and map variables
10101069 String localVarPath = "/api/v2/permissions" ;
10111070
1071+ List <Pair > localVarQueryParams = new ArrayList <Pair >();
10121072 Map <String , String > localVarHeaderParams = new HashMap <String , String >();
10131073
1074+ localVarQueryParams .addAll (apiClient .parameterToPairs ("" , "include_scopes" , includeScopes ));
1075+
10141076 Invocation .Builder builder ;
10151077 try {
10161078 builder =
10171079 apiClient .createBuilder (
10181080 "v2.RolesApi.listPermissions" ,
10191081 localVarPath ,
1020- new ArrayList < Pair >() ,
1082+ localVarQueryParams ,
10211083 localVarHeaderParams ,
10221084 new HashMap <String , String >(),
10231085 new String [] {"application/json" },
0 commit comments