Class CustomRolesApi


  • public class CustomRolesApi
    extends java.lang.Object
    • Constructor Detail

      • CustomRolesApi

        public CustomRolesApi()
      • CustomRolesApi

        public CustomRolesApi​(ApiClient apiClient)
    • Method Detail

      • getApiClient

        public ApiClient getApiClient()
      • setApiClient

        public void setApiClient​(ApiClient apiClient)
      • getHostIndex

        public int getHostIndex()
      • setHostIndex

        public void setHostIndex​(int hostIndex)
      • getCustomBaseUrl

        public java.lang.String getCustomBaseUrl()
      • setCustomBaseUrl

        public void setCustomBaseUrl​(java.lang.String customBaseUrl)
      • deleteCustomRoleCall

        public okhttp3.Call deleteCustomRoleCall​(@Nonnull
                                                 java.lang.String customRoleKey,
                                                 ApiCallback _callback)
                                          throws ApiException
        Build call for deleteCustomRole
        Parameters:
        customRoleKey - The custom role key (required)
        _callback - Callback for upload/download progress
        Returns:
        Call to execute
        Throws:
        ApiException - If fail to serialize the request body object
      • deleteCustomRole

        public void deleteCustomRole​(@Nonnull
                                     java.lang.String customRoleKey)
                              throws ApiException
        Delete custom role Delete a custom role by key
        Parameters:
        customRoleKey - The custom role key (required)
        Throws:
        ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
      • deleteCustomRoleWithHttpInfo

        public ApiResponse<java.lang.Void> deleteCustomRoleWithHttpInfo​(@Nonnull
                                                                        java.lang.String customRoleKey)
                                                                 throws ApiException
        Delete custom role Delete a custom role by key
        Parameters:
        customRoleKey - The custom role key (required)
        Returns:
        ApiResponse<Void>
        Throws:
        ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
      • deleteCustomRoleAsync

        public okhttp3.Call deleteCustomRoleAsync​(@Nonnull
                                                  java.lang.String customRoleKey,
                                                  ApiCallback<java.lang.Void> _callback)
                                           throws ApiException
        Delete custom role (asynchronously) Delete a custom role by key
        Parameters:
        customRoleKey - The custom role key (required)
        _callback - The callback to be executed when the API call finishes
        Returns:
        The request call
        Throws:
        ApiException - If fail to process the API call, e.g. serializing the request body object
      • getCustomRoleCall

        public okhttp3.Call getCustomRoleCall​(@Nonnull
                                              java.lang.String customRoleKey,
                                              ApiCallback _callback)
                                       throws ApiException
        Build call for getCustomRole
        Parameters:
        customRoleKey - The custom role key or ID (required)
        _callback - Callback for upload/download progress
        Returns:
        Call to execute
        Throws:
        ApiException - If fail to serialize the request body object
      • getCustomRole

        public CustomRole getCustomRole​(@Nonnull
                                        java.lang.String customRoleKey)
                                 throws ApiException
        Get custom role Get a single custom role by key or ID
        Parameters:
        customRoleKey - The custom role key or ID (required)
        Returns:
        CustomRole
        Throws:
        ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
      • getCustomRoleWithHttpInfo

        public ApiResponse<CustomRole> getCustomRoleWithHttpInfo​(@Nonnull
                                                                 java.lang.String customRoleKey)
                                                          throws ApiException
        Get custom role Get a single custom role by key or ID
        Parameters:
        customRoleKey - The custom role key or ID (required)
        Returns:
        ApiResponse<CustomRole>
        Throws:
        ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
      • getCustomRoleAsync

        public okhttp3.Call getCustomRoleAsync​(@Nonnull
                                               java.lang.String customRoleKey,
                                               ApiCallback<CustomRole> _callback)
                                        throws ApiException
        Get custom role (asynchronously) Get a single custom role by key or ID
        Parameters:
        customRoleKey - The custom role key or ID (required)
        _callback - The callback to be executed when the API call finishes
        Returns:
        The request call
        Throws:
        ApiException - If fail to process the API call, e.g. serializing the request body object
      • getCustomRolesCall

        public okhttp3.Call getCustomRolesCall​(@Nullable
                                               java.lang.Long limit,
                                               @Nullable
                                               java.lang.Long offset,
                                               ApiCallback _callback)
                                        throws ApiException
        Build call for getCustomRoles
        Parameters:
        limit - The maximum number of custom roles to return. Defaults to 20. (optional)
        offset - Where to start in the list. Defaults to 0. Use this with pagination. For example, an offset of 10 skips the first ten items and then returns the next items in the list, up to the query `limit`. (optional)
        _callback - Callback for upload/download progress
        Returns:
        Call to execute
        Throws:
        ApiException - If fail to serialize the request body object
      • getCustomRoles

        public CustomRoles getCustomRoles​(@Nullable
                                          java.lang.Long limit,
                                          @Nullable
                                          java.lang.Long offset)
                                   throws ApiException
        List custom roles Get a complete list of custom roles. This includes project and organization roles that you create, or that are provided as presets by LaunchDarkly. It does not include base roles.
        Parameters:
        limit - The maximum number of custom roles to return. Defaults to 20. (optional)
        offset - Where to start in the list. Defaults to 0. Use this with pagination. For example, an offset of 10 skips the first ten items and then returns the next items in the list, up to the query `limit`. (optional)
        Returns:
        CustomRoles
        Throws:
        ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
      • getCustomRolesWithHttpInfo

        public ApiResponse<CustomRoles> getCustomRolesWithHttpInfo​(@Nullable
                                                                   java.lang.Long limit,
                                                                   @Nullable
                                                                   java.lang.Long offset)
                                                            throws ApiException
        List custom roles Get a complete list of custom roles. This includes project and organization roles that you create, or that are provided as presets by LaunchDarkly. It does not include base roles.
        Parameters:
        limit - The maximum number of custom roles to return. Defaults to 20. (optional)
        offset - Where to start in the list. Defaults to 0. Use this with pagination. For example, an offset of 10 skips the first ten items and then returns the next items in the list, up to the query `limit`. (optional)
        Returns:
        ApiResponse<CustomRoles>
        Throws:
        ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
      • getCustomRolesAsync

        public okhttp3.Call getCustomRolesAsync​(@Nullable
                                                java.lang.Long limit,
                                                @Nullable
                                                java.lang.Long offset,
                                                ApiCallback<CustomRoles> _callback)
                                         throws ApiException
        List custom roles (asynchronously) Get a complete list of custom roles. This includes project and organization roles that you create, or that are provided as presets by LaunchDarkly. It does not include base roles.
        Parameters:
        limit - The maximum number of custom roles to return. Defaults to 20. (optional)
        offset - Where to start in the list. Defaults to 0. Use this with pagination. For example, an offset of 10 skips the first ten items and then returns the next items in the list, up to the query `limit`. (optional)
        _callback - The callback to be executed when the API call finishes
        Returns:
        The request call
        Throws:
        ApiException - If fail to process the API call, e.g. serializing the request body object
      • patchCustomRoleCall

        public okhttp3.Call patchCustomRoleCall​(@Nonnull
                                                java.lang.String customRoleKey,
                                                @Nonnull
                                                PatchWithComment patchWithComment,
                                                ApiCallback _callback)
                                         throws ApiException
        Build call for patchCustomRole
        Parameters:
        customRoleKey - The custom role key (required)
        patchWithComment - (required)
        _callback - Callback for upload/download progress
        Returns:
        Call to execute
        Throws:
        ApiException - If fail to serialize the request body object
      • patchCustomRole

        public CustomRole patchCustomRole​(@Nonnull
                                          java.lang.String customRoleKey,
                                          @Nonnull
                                          PatchWithComment patchWithComment)
                                   throws ApiException
        Update custom role Update a single custom role. Updating a custom role uses a [JSON patch](https://datatracker.ietf.org/doc/html/rfc6902) or [JSON merge patch](https://datatracker.ietf.org/doc/html/rfc7386) representation of the desired changes. To learn more, read [Updates](https://launchdarkly.com/docs/api#updates).<br/><br/>To add an element to the `policy` array, set the `path` to `/policy` and then append `/<array index>`. Use `/0` to add to the beginning of the array. Use `/-` to add to the end of the array.
        Parameters:
        customRoleKey - The custom role key (required)
        patchWithComment - (required)
        Returns:
        CustomRole
        Throws:
        ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
      • patchCustomRoleWithHttpInfo

        public ApiResponse<CustomRole> patchCustomRoleWithHttpInfo​(@Nonnull
                                                                   java.lang.String customRoleKey,
                                                                   @Nonnull
                                                                   PatchWithComment patchWithComment)
                                                            throws ApiException
        Update custom role Update a single custom role. Updating a custom role uses a [JSON patch](https://datatracker.ietf.org/doc/html/rfc6902) or [JSON merge patch](https://datatracker.ietf.org/doc/html/rfc7386) representation of the desired changes. To learn more, read [Updates](https://launchdarkly.com/docs/api#updates).<br/><br/>To add an element to the `policy` array, set the `path` to `/policy` and then append `/<array index>`. Use `/0` to add to the beginning of the array. Use `/-` to add to the end of the array.
        Parameters:
        customRoleKey - The custom role key (required)
        patchWithComment - (required)
        Returns:
        ApiResponse<CustomRole>
        Throws:
        ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
      • patchCustomRoleAsync

        public okhttp3.Call patchCustomRoleAsync​(@Nonnull
                                                 java.lang.String customRoleKey,
                                                 @Nonnull
                                                 PatchWithComment patchWithComment,
                                                 ApiCallback<CustomRole> _callback)
                                          throws ApiException
        Update custom role (asynchronously) Update a single custom role. Updating a custom role uses a [JSON patch](https://datatracker.ietf.org/doc/html/rfc6902) or [JSON merge patch](https://datatracker.ietf.org/doc/html/rfc7386) representation of the desired changes. To learn more, read [Updates](https://launchdarkly.com/docs/api#updates).<br/><br/>To add an element to the `policy` array, set the `path` to `/policy` and then append `/<array index>`. Use `/0` to add to the beginning of the array. Use `/-` to add to the end of the array.
        Parameters:
        customRoleKey - The custom role key (required)
        patchWithComment - (required)
        _callback - The callback to be executed when the API call finishes
        Returns:
        The request call
        Throws:
        ApiException - If fail to process the API call, e.g. serializing the request body object
      • postCustomRoleCall

        public okhttp3.Call postCustomRoleCall​(@Nonnull
                                               CustomRolePost customRolePost,
                                               ApiCallback _callback)
                                        throws ApiException
        Build call for postCustomRole
        Parameters:
        customRolePost - (required)
        _callback - Callback for upload/download progress
        Returns:
        Call to execute
        Throws:
        ApiException - If fail to serialize the request body object
      • postCustomRole

        public CustomRole postCustomRole​(@Nonnull
                                         CustomRolePost customRolePost)
                                  throws ApiException
        Create custom role Create a new custom role
        Parameters:
        customRolePost - (required)
        Returns:
        CustomRole
        Throws:
        ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
      • postCustomRoleWithHttpInfo

        public ApiResponse<CustomRole> postCustomRoleWithHttpInfo​(@Nonnull
                                                                  CustomRolePost customRolePost)
                                                           throws ApiException
        Create custom role Create a new custom role
        Parameters:
        customRolePost - (required)
        Returns:
        ApiResponse<CustomRole>
        Throws:
        ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
      • postCustomRoleAsync

        public okhttp3.Call postCustomRoleAsync​(@Nonnull
                                                CustomRolePost customRolePost,
                                                ApiCallback<CustomRole> _callback)
                                         throws ApiException
        Create custom role (asynchronously) Create a new custom role
        Parameters:
        customRolePost - (required)
        _callback - The callback to be executed when the API call finishes
        Returns:
        The request call
        Throws:
        ApiException - If fail to process the API call, e.g. serializing the request body object