Class SegmentsApi


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

      • SegmentsApi

        public SegmentsApi()
      • SegmentsApi

        public SegmentsApi​(ApiClient apiClient)
    • Method Detail

      • getApiClient

        public ApiClient getApiClient()
      • setApiClient

        public void setApiClient​(ApiClient apiClient)
      • deleteSegmentCall

        public okhttp3.Call deleteSegmentCall​(java.lang.String projKey,
                                              java.lang.String envKey,
                                              java.lang.String key,
                                              ApiCallback _callback)
                                       throws ApiException
        Build call for deleteSegment
        Parameters:
        projKey - The project key. (required)
        envKey - The environment key. (required)
        key - The user segment key. (required)
        _callback - Callback for upload/download progress
        Returns:
        Call to execute
        Throws:
        ApiException - If fail to serialize the request body object
      • deleteSegment

        public void deleteSegment​(java.lang.String projKey,
                                  java.lang.String envKey,
                                  java.lang.String key)
                           throws ApiException
        Delete segment Delete a user segment.
        Parameters:
        projKey - The project key. (required)
        envKey - The environment key. (required)
        key - The user segment key. (required)
        Throws:
        ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
      • deleteSegmentWithHttpInfo

        public ApiResponse<java.lang.Void> deleteSegmentWithHttpInfo​(java.lang.String projKey,
                                                                     java.lang.String envKey,
                                                                     java.lang.String key)
                                                              throws ApiException
        Delete segment Delete a user segment.
        Parameters:
        projKey - The project key. (required)
        envKey - The environment key. (required)
        key - The user segment key. (required)
        Returns:
        ApiResponse<Void>
        Throws:
        ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
      • deleteSegmentAsync

        public okhttp3.Call deleteSegmentAsync​(java.lang.String projKey,
                                               java.lang.String envKey,
                                               java.lang.String key,
                                               ApiCallback<java.lang.Void> _callback)
                                        throws ApiException
        Delete segment (asynchronously) Delete a user segment.
        Parameters:
        projKey - The project key. (required)
        envKey - The environment key. (required)
        key - The user segment 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
      • getExpiringUserTargetsForSegmentCall

        public okhttp3.Call getExpiringUserTargetsForSegmentCall​(java.lang.String projKey,
                                                                 java.lang.String envKey,
                                                                 java.lang.String segmentKey,
                                                                 ApiCallback _callback)
                                                          throws ApiException
        Build call for getExpiringUserTargetsForSegment
        Parameters:
        projKey - The project key. (required)
        envKey - The environment key. (required)
        segmentKey - The segment key. (required)
        _callback - Callback for upload/download progress
        Returns:
        Call to execute
        Throws:
        ApiException - If fail to serialize the request body object
      • getExpiringUserTargetsForSegment

        public ExpiringUserTargetGetResponse getExpiringUserTargetsForSegment​(java.lang.String projKey,
                                                                              java.lang.String envKey,
                                                                              java.lang.String segmentKey)
                                                                       throws ApiException
        Get expiring user targets for segment Get a list of a segment's user targets that are scheduled for removal
        Parameters:
        projKey - The project key. (required)
        envKey - The environment key. (required)
        segmentKey - The segment key. (required)
        Returns:
        ExpiringUserTargetGetResponse
        Throws:
        ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
      • getExpiringUserTargetsForSegmentWithHttpInfo

        public ApiResponse<ExpiringUserTargetGetResponse> getExpiringUserTargetsForSegmentWithHttpInfo​(java.lang.String projKey,
                                                                                                       java.lang.String envKey,
                                                                                                       java.lang.String segmentKey)
                                                                                                throws ApiException
        Get expiring user targets for segment Get a list of a segment's user targets that are scheduled for removal
        Parameters:
        projKey - The project key. (required)
        envKey - The environment key. (required)
        segmentKey - The segment key. (required)
        Returns:
        ApiResponse<ExpiringUserTargetGetResponse>
        Throws:
        ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
      • getExpiringUserTargetsForSegmentAsync

        public okhttp3.Call getExpiringUserTargetsForSegmentAsync​(java.lang.String projKey,
                                                                  java.lang.String envKey,
                                                                  java.lang.String segmentKey,
                                                                  ApiCallback<ExpiringUserTargetGetResponse> _callback)
                                                           throws ApiException
        Get expiring user targets for segment (asynchronously) Get a list of a segment's user targets that are scheduled for removal
        Parameters:
        projKey - The project key. (required)
        envKey - The environment key. (required)
        segmentKey - The segment 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
      • getSegmentCall

        public okhttp3.Call getSegmentCall​(java.lang.String projKey,
                                           java.lang.String envKey,
                                           java.lang.String key,
                                           ApiCallback _callback)
                                    throws ApiException
        Build call for getSegment
        Parameters:
        projKey - The project key. (required)
        envKey - The environment key. (required)
        key - The segment key (required)
        _callback - Callback for upload/download progress
        Returns:
        Call to execute
        Throws:
        ApiException - If fail to serialize the request body object
      • getSegment

        public UserSegment getSegment​(java.lang.String projKey,
                                      java.lang.String envKey,
                                      java.lang.String key)
                               throws ApiException
        Get segment Get a single user segment by key
        Parameters:
        projKey - The project key. (required)
        envKey - The environment key. (required)
        key - The segment key (required)
        Returns:
        UserSegment
        Throws:
        ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
      • getSegmentWithHttpInfo

        public ApiResponse<UserSegment> getSegmentWithHttpInfo​(java.lang.String projKey,
                                                               java.lang.String envKey,
                                                               java.lang.String key)
                                                        throws ApiException
        Get segment Get a single user segment by key
        Parameters:
        projKey - The project key. (required)
        envKey - The environment key. (required)
        key - The segment key (required)
        Returns:
        ApiResponse<UserSegment>
        Throws:
        ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
      • getSegmentAsync

        public okhttp3.Call getSegmentAsync​(java.lang.String projKey,
                                            java.lang.String envKey,
                                            java.lang.String key,
                                            ApiCallback<UserSegment> _callback)
                                     throws ApiException
        Get segment (asynchronously) Get a single user segment by key
        Parameters:
        projKey - The project key. (required)
        envKey - The environment key. (required)
        key - The segment 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
      • getSegmentMembershipForUserCall

        public okhttp3.Call getSegmentMembershipForUserCall​(java.lang.String projKey,
                                                            java.lang.String envKey,
                                                            java.lang.String key,
                                                            java.lang.String userKey,
                                                            ApiCallback _callback)
                                                     throws ApiException
        Build call for getSegmentMembershipForUser
        Parameters:
        projKey - The project key. (required)
        envKey - The environment key. (required)
        key - The segment key. (required)
        userKey - The user key. (required)
        _callback - Callback for upload/download progress
        Returns:
        Call to execute
        Throws:
        ApiException - If fail to serialize the request body object
      • getSegmentMembershipForUser

        public BigSegmentTarget getSegmentMembershipForUser​(java.lang.String projKey,
                                                            java.lang.String envKey,
                                                            java.lang.String key,
                                                            java.lang.String userKey)
                                                     throws ApiException
        Get Big Segment membership for user Returns the membership status (included/excluded) for a given user in this segment. This operation does not support basic Segments.
        Parameters:
        projKey - The project key. (required)
        envKey - The environment key. (required)
        key - The segment key. (required)
        userKey - The user key. (required)
        Returns:
        BigSegmentTarget
        Throws:
        ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
      • getSegmentMembershipForUserWithHttpInfo

        public ApiResponse<BigSegmentTarget> getSegmentMembershipForUserWithHttpInfo​(java.lang.String projKey,
                                                                                     java.lang.String envKey,
                                                                                     java.lang.String key,
                                                                                     java.lang.String userKey)
                                                                              throws ApiException
        Get Big Segment membership for user Returns the membership status (included/excluded) for a given user in this segment. This operation does not support basic Segments.
        Parameters:
        projKey - The project key. (required)
        envKey - The environment key. (required)
        key - The segment key. (required)
        userKey - The user key. (required)
        Returns:
        ApiResponse<BigSegmentTarget>
        Throws:
        ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
      • getSegmentMembershipForUserAsync

        public okhttp3.Call getSegmentMembershipForUserAsync​(java.lang.String projKey,
                                                             java.lang.String envKey,
                                                             java.lang.String key,
                                                             java.lang.String userKey,
                                                             ApiCallback<BigSegmentTarget> _callback)
                                                      throws ApiException
        Get Big Segment membership for user (asynchronously) Returns the membership status (included/excluded) for a given user in this segment. This operation does not support basic Segments.
        Parameters:
        projKey - The project key. (required)
        envKey - The environment key. (required)
        key - The segment key. (required)
        userKey - The user 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
      • getSegmentsCall

        public okhttp3.Call getSegmentsCall​(java.lang.String projKey,
                                            java.lang.String envKey,
                                            ApiCallback _callback)
                                     throws ApiException
        Build call for getSegments
        Parameters:
        projKey - The project key. (required)
        envKey - The environment key. (required)
        _callback - Callback for upload/download progress
        Returns:
        Call to execute
        Throws:
        ApiException - If fail to serialize the request body object
      • getSegments

        public UserSegments getSegments​(java.lang.String projKey,
                                        java.lang.String envKey)
                                 throws ApiException
        List segments Get a list of all user segments in the given project
        Parameters:
        projKey - The project key. (required)
        envKey - The environment key. (required)
        Returns:
        UserSegments
        Throws:
        ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
      • getSegmentsWithHttpInfo

        public ApiResponse<UserSegments> getSegmentsWithHttpInfo​(java.lang.String projKey,
                                                                 java.lang.String envKey)
                                                          throws ApiException
        List segments Get a list of all user segments in the given project
        Parameters:
        projKey - The project key. (required)
        envKey - The environment key. (required)
        Returns:
        ApiResponse<UserSegments>
        Throws:
        ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
      • getSegmentsAsync

        public okhttp3.Call getSegmentsAsync​(java.lang.String projKey,
                                             java.lang.String envKey,
                                             ApiCallback<UserSegments> _callback)
                                      throws ApiException
        List segments (asynchronously) Get a list of all user segments in the given project
        Parameters:
        projKey - The project key. (required)
        envKey - The environment 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
      • patchExpiringUserTargetsForSegmentCall

        public okhttp3.Call patchExpiringUserTargetsForSegmentCall​(java.lang.String projKey,
                                                                   java.lang.String envKey,
                                                                   java.lang.String segmentKey,
                                                                   PatchSegmentRequest patchSegmentRequest,
                                                                   ApiCallback _callback)
                                                            throws ApiException
        Build call for patchExpiringUserTargetsForSegment
        Parameters:
        projKey - The project key. (required)
        envKey - The environment key. (required)
        segmentKey - The user segment key. (required)
        patchSegmentRequest - (required)
        _callback - Callback for upload/download progress
        Returns:
        Call to execute
        Throws:
        ApiException - If fail to serialize the request body object
      • patchExpiringUserTargetsForSegment

        public ExpiringUserTargetPatchResponse patchExpiringUserTargetsForSegment​(java.lang.String projKey,
                                                                                  java.lang.String envKey,
                                                                                  java.lang.String segmentKey,
                                                                                  PatchSegmentRequest patchSegmentRequest)
                                                                           throws ApiException
        Update expiring user targets for segment Update the list of a segment's user targets that are scheduled for removal<br /><br />Requires a semantic patch representation of the desired changes to the resource. To learn more about semantic patches, read [Updates](/#section/Updates/Updates-via-semantic-patches).<br /><br />If the request is well-formed but any of its instructions failed to process, this operation returns status code `200`. In this case, the response `errors` array will be non-empty.
        Parameters:
        projKey - The project key. (required)
        envKey - The environment key. (required)
        segmentKey - The user segment key. (required)
        patchSegmentRequest - (required)
        Returns:
        ExpiringUserTargetPatchResponse
        Throws:
        ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
      • patchExpiringUserTargetsForSegmentWithHttpInfo

        public ApiResponse<ExpiringUserTargetPatchResponse> patchExpiringUserTargetsForSegmentWithHttpInfo​(java.lang.String projKey,
                                                                                                           java.lang.String envKey,
                                                                                                           java.lang.String segmentKey,
                                                                                                           PatchSegmentRequest patchSegmentRequest)
                                                                                                    throws ApiException
        Update expiring user targets for segment Update the list of a segment's user targets that are scheduled for removal<br /><br />Requires a semantic patch representation of the desired changes to the resource. To learn more about semantic patches, read [Updates](/#section/Updates/Updates-via-semantic-patches).<br /><br />If the request is well-formed but any of its instructions failed to process, this operation returns status code `200`. In this case, the response `errors` array will be non-empty.
        Parameters:
        projKey - The project key. (required)
        envKey - The environment key. (required)
        segmentKey - The user segment key. (required)
        patchSegmentRequest - (required)
        Returns:
        ApiResponse<ExpiringUserTargetPatchResponse>
        Throws:
        ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
      • patchExpiringUserTargetsForSegmentAsync

        public okhttp3.Call patchExpiringUserTargetsForSegmentAsync​(java.lang.String projKey,
                                                                    java.lang.String envKey,
                                                                    java.lang.String segmentKey,
                                                                    PatchSegmentRequest patchSegmentRequest,
                                                                    ApiCallback<ExpiringUserTargetPatchResponse> _callback)
                                                             throws ApiException
        Update expiring user targets for segment (asynchronously) Update the list of a segment's user targets that are scheduled for removal<br /><br />Requires a semantic patch representation of the desired changes to the resource. To learn more about semantic patches, read [Updates](/#section/Updates/Updates-via-semantic-patches).<br /><br />If the request is well-formed but any of its instructions failed to process, this operation returns status code `200`. In this case, the response `errors` array will be non-empty.
        Parameters:
        projKey - The project key. (required)
        envKey - The environment key. (required)
        segmentKey - The user segment key. (required)
        patchSegmentRequest - (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
      • patchSegmentCall

        public okhttp3.Call patchSegmentCall​(java.lang.String projKey,
                                             java.lang.String envKey,
                                             java.lang.String key,
                                             PatchWithComment patchWithComment,
                                             ApiCallback _callback)
                                      throws ApiException
        Build call for patchSegment
        Parameters:
        projKey - The project key. (required)
        envKey - The environment key. (required)
        key - The user segment key. (required)
        patchWithComment - (required)
        _callback - Callback for upload/download progress
        Returns:
        Call to execute
        Throws:
        ApiException - If fail to serialize the request body object
      • patchSegment

        public UserSegment patchSegment​(java.lang.String projKey,
                                        java.lang.String envKey,
                                        java.lang.String key,
                                        PatchWithComment patchWithComment)
                                 throws ApiException
        Patch segment Update a user segment. The request body must be a valid JSON patch or JSON merge patch document. To learn more about semantic patches, read [Updates](/#section/Updates).
        Parameters:
        projKey - The project key. (required)
        envKey - The environment key. (required)
        key - The user segment key. (required)
        patchWithComment - (required)
        Returns:
        UserSegment
        Throws:
        ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
      • patchSegmentWithHttpInfo

        public ApiResponse<UserSegment> patchSegmentWithHttpInfo​(java.lang.String projKey,
                                                                 java.lang.String envKey,
                                                                 java.lang.String key,
                                                                 PatchWithComment patchWithComment)
                                                          throws ApiException
        Patch segment Update a user segment. The request body must be a valid JSON patch or JSON merge patch document. To learn more about semantic patches, read [Updates](/#section/Updates).
        Parameters:
        projKey - The project key. (required)
        envKey - The environment key. (required)
        key - The user segment key. (required)
        patchWithComment - (required)
        Returns:
        ApiResponse<UserSegment>
        Throws:
        ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
      • patchSegmentAsync

        public okhttp3.Call patchSegmentAsync​(java.lang.String projKey,
                                              java.lang.String envKey,
                                              java.lang.String key,
                                              PatchWithComment patchWithComment,
                                              ApiCallback<UserSegment> _callback)
                                       throws ApiException
        Patch segment (asynchronously) Update a user segment. The request body must be a valid JSON patch or JSON merge patch document. To learn more about semantic patches, read [Updates](/#section/Updates).
        Parameters:
        projKey - The project key. (required)
        envKey - The environment key. (required)
        key - The user segment 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
      • postSegmentCall

        public okhttp3.Call postSegmentCall​(java.lang.String projKey,
                                            java.lang.String envKey,
                                            SegmentBody segmentBody,
                                            ApiCallback _callback)
                                     throws ApiException
        Build call for postSegment
        Parameters:
        projKey - The project key. (required)
        envKey - The environment key. (required)
        segmentBody - (required)
        _callback - Callback for upload/download progress
        Returns:
        Call to execute
        Throws:
        ApiException - If fail to serialize the request body object
      • postSegment

        public UserSegment postSegment​(java.lang.String projKey,
                                       java.lang.String envKey,
                                       SegmentBody segmentBody)
                                throws ApiException
        Create segment Create a new user segment
        Parameters:
        projKey - The project key. (required)
        envKey - The environment key. (required)
        segmentBody - (required)
        Returns:
        UserSegment
        Throws:
        ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
      • postSegmentWithHttpInfo

        public ApiResponse<UserSegment> postSegmentWithHttpInfo​(java.lang.String projKey,
                                                                java.lang.String envKey,
                                                                SegmentBody segmentBody)
                                                         throws ApiException
        Create segment Create a new user segment
        Parameters:
        projKey - The project key. (required)
        envKey - The environment key. (required)
        segmentBody - (required)
        Returns:
        ApiResponse<UserSegment>
        Throws:
        ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
      • postSegmentAsync

        public okhttp3.Call postSegmentAsync​(java.lang.String projKey,
                                             java.lang.String envKey,
                                             SegmentBody segmentBody,
                                             ApiCallback<UserSegment> _callback)
                                      throws ApiException
        Create segment (asynchronously) Create a new user segment
        Parameters:
        projKey - The project key. (required)
        envKey - The environment key. (required)
        segmentBody - (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
      • updateBigSegmentTargetsCall

        public okhttp3.Call updateBigSegmentTargetsCall​(java.lang.String projKey,
                                                        java.lang.String envKey,
                                                        java.lang.String key,
                                                        SegmentUserState segmentUserState,
                                                        ApiCallback _callback)
                                                 throws ApiException
        Build call for updateBigSegmentTargets
        Parameters:
        projKey - The project key. (required)
        envKey - The environment key. (required)
        key - The segment key. (required)
        segmentUserState - (required)
        _callback - Callback for upload/download progress
        Returns:
        Call to execute
        Throws:
        ApiException - If fail to serialize the request body object
      • updateBigSegmentTargets

        public void updateBigSegmentTargets​(java.lang.String projKey,
                                            java.lang.String envKey,
                                            java.lang.String key,
                                            SegmentUserState segmentUserState)
                                     throws ApiException
        Update targets on a Big Segment Update targets included or excluded in a Big Segment
        Parameters:
        projKey - The project key. (required)
        envKey - The environment key. (required)
        key - The segment key. (required)
        segmentUserState - (required)
        Throws:
        ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
      • updateBigSegmentTargetsWithHttpInfo

        public ApiResponse<java.lang.Void> updateBigSegmentTargetsWithHttpInfo​(java.lang.String projKey,
                                                                               java.lang.String envKey,
                                                                               java.lang.String key,
                                                                               SegmentUserState segmentUserState)
                                                                        throws ApiException
        Update targets on a Big Segment Update targets included or excluded in a Big Segment
        Parameters:
        projKey - The project key. (required)
        envKey - The environment key. (required)
        key - The segment key. (required)
        segmentUserState - (required)
        Returns:
        ApiResponse<Void>
        Throws:
        ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
      • updateBigSegmentTargetsAsync

        public okhttp3.Call updateBigSegmentTargetsAsync​(java.lang.String projKey,
                                                         java.lang.String envKey,
                                                         java.lang.String key,
                                                         SegmentUserState segmentUserState,
                                                         ApiCallback<java.lang.Void> _callback)
                                                  throws ApiException
        Update targets on a Big Segment (asynchronously) Update targets included or excluded in a Big Segment
        Parameters:
        projKey - The project key. (required)
        envKey - The environment key. (required)
        key - The segment key. (required)
        segmentUserState - (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