Package com.launchdarkly.api.api
Class LayersApi
- java.lang.Object
-
- com.launchdarkly.api.api.LayersApi
-
public class LayersApi extends java.lang.Object
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description LayerRepcreateLayer(java.lang.String projectKey, LayerPost layerPost)Create layer Create a layer.okhttp3.CallcreateLayerAsync(java.lang.String projectKey, LayerPost layerPost, ApiCallback<LayerRep> _callback)Create layer (asynchronously) Create a layer.okhttp3.CallcreateLayerCall(java.lang.String projectKey, LayerPost layerPost, ApiCallback _callback)Build call for createLayerApiResponse<LayerRep>createLayerWithHttpInfo(java.lang.String projectKey, LayerPost layerPost)Create layer Create a layer.ApiClientgetApiClient()java.lang.StringgetCustomBaseUrl()intgetHostIndex()LayerCollectionRepgetLayers(java.lang.String projectKey, java.lang.String filter)Get layers Get a collection of all layers for a projectokhttp3.CallgetLayersAsync(java.lang.String projectKey, java.lang.String filter, ApiCallback<LayerCollectionRep> _callback)Get layers (asynchronously) Get a collection of all layers for a projectokhttp3.CallgetLayersCall(java.lang.String projectKey, java.lang.String filter, ApiCallback _callback)Build call for getLayersApiResponse<LayerCollectionRep>getLayersWithHttpInfo(java.lang.String projectKey, java.lang.String filter)Get layers Get a collection of all layers for a projectvoidsetApiClient(ApiClient apiClient)voidsetCustomBaseUrl(java.lang.String customBaseUrl)voidsetHostIndex(int hostIndex)LayerRepupdateLayer(java.lang.String projectKey, java.lang.String layerKey, LayerPatchInput layerPatchInput)Update layer Update a layer by adding, changing, or removing traffic reservations for experiments, or by changing layer name or description.okhttp3.CallupdateLayerAsync(java.lang.String projectKey, java.lang.String layerKey, LayerPatchInput layerPatchInput, ApiCallback<LayerRep> _callback)Update layer (asynchronously) Update a layer by adding, changing, or removing traffic reservations for experiments, or by changing layer name or description.okhttp3.CallupdateLayerCall(java.lang.String projectKey, java.lang.String layerKey, LayerPatchInput layerPatchInput, ApiCallback _callback)Build call for updateLayerApiResponse<LayerRep>updateLayerWithHttpInfo(java.lang.String projectKey, java.lang.String layerKey, LayerPatchInput layerPatchInput)Update layer Update a layer by adding, changing, or removing traffic reservations for experiments, or by changing layer name or description.
-
-
-
Constructor Detail
-
LayersApi
public LayersApi()
-
LayersApi
public LayersApi(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)
-
createLayerCall
public okhttp3.Call createLayerCall(@Nonnull java.lang.String projectKey, @Nonnull LayerPost layerPost, ApiCallback _callback) throws ApiExceptionBuild call for createLayer- Parameters:
projectKey- The project key (required)layerPost- (required)_callback- Callback for upload/download progress- Returns:
- Call to execute
- Throws:
ApiException- If fail to serialize the request body object
-
createLayer
public LayerRep createLayer(@Nonnull java.lang.String projectKey, @Nonnull LayerPost layerPost) throws ApiException
Create layer Create a layer. Experiments running in the same layer are granted mutually-exclusive traffic.- Parameters:
projectKey- The project key (required)layerPost- (required)- Returns:
- LayerRep
- Throws:
ApiException- If fail to call the API, e.g. server error or cannot deserialize the response body
-
createLayerWithHttpInfo
public ApiResponse<LayerRep> createLayerWithHttpInfo(@Nonnull java.lang.String projectKey, @Nonnull LayerPost layerPost) throws ApiException
Create layer Create a layer. Experiments running in the same layer are granted mutually-exclusive traffic.- Parameters:
projectKey- The project key (required)layerPost- (required)- Returns:
- ApiResponse<LayerRep>
- Throws:
ApiException- If fail to call the API, e.g. server error or cannot deserialize the response body
-
createLayerAsync
public okhttp3.Call createLayerAsync(@Nonnull java.lang.String projectKey, @Nonnull LayerPost layerPost, ApiCallback<LayerRep> _callback) throws ApiExceptionCreate layer (asynchronously) Create a layer. Experiments running in the same layer are granted mutually-exclusive traffic.- Parameters:
projectKey- The project key (required)layerPost- (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
-
getLayersCall
public okhttp3.Call getLayersCall(@Nonnull java.lang.String projectKey, @Nullable java.lang.String filter, ApiCallback _callback) throws ApiExceptionBuild call for getLayers- Parameters:
projectKey- The project key (required)filter- A comma-separated list of filters. This endpoint only accepts filtering by `experimentKey`. The filter returns layers which include that experiment for the selected environment(s). For example: `filter=reservations.experimentKey contains expKey`. (optional)_callback- Callback for upload/download progress- Returns:
- Call to execute
- Throws:
ApiException- If fail to serialize the request body object
-
getLayers
public LayerCollectionRep getLayers(@Nonnull java.lang.String projectKey, @Nullable java.lang.String filter) throws ApiException
Get layers Get a collection of all layers for a project- Parameters:
projectKey- The project key (required)filter- A comma-separated list of filters. This endpoint only accepts filtering by `experimentKey`. The filter returns layers which include that experiment for the selected environment(s). For example: `filter=reservations.experimentKey contains expKey`. (optional)- Returns:
- LayerCollectionRep
- Throws:
ApiException- If fail to call the API, e.g. server error or cannot deserialize the response body
-
getLayersWithHttpInfo
public ApiResponse<LayerCollectionRep> getLayersWithHttpInfo(@Nonnull java.lang.String projectKey, @Nullable java.lang.String filter) throws ApiException
Get layers Get a collection of all layers for a project- Parameters:
projectKey- The project key (required)filter- A comma-separated list of filters. This endpoint only accepts filtering by `experimentKey`. The filter returns layers which include that experiment for the selected environment(s). For example: `filter=reservations.experimentKey contains expKey`. (optional)- Returns:
- ApiResponse<LayerCollectionRep>
- Throws:
ApiException- If fail to call the API, e.g. server error or cannot deserialize the response body
-
getLayersAsync
public okhttp3.Call getLayersAsync(@Nonnull java.lang.String projectKey, @Nullable java.lang.String filter, ApiCallback<LayerCollectionRep> _callback) throws ApiExceptionGet layers (asynchronously) Get a collection of all layers for a project- Parameters:
projectKey- The project key (required)filter- A comma-separated list of filters. This endpoint only accepts filtering by `experimentKey`. The filter returns layers which include that experiment for the selected environment(s). For example: `filter=reservations.experimentKey contains expKey`. (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
-
updateLayerCall
public okhttp3.Call updateLayerCall(@Nonnull java.lang.String projectKey, @Nonnull java.lang.String layerKey, @Nonnull LayerPatchInput layerPatchInput, ApiCallback _callback) throws ApiExceptionBuild call for updateLayer- Parameters:
projectKey- The project key (required)layerKey- The layer key (required)layerPatchInput- (required)_callback- Callback for upload/download progress- Returns:
- Call to execute
- Throws:
ApiException- If fail to serialize the request body object
-
updateLayer
public LayerRep updateLayer(@Nonnull java.lang.String projectKey, @Nonnull java.lang.String layerKey, @Nonnull LayerPatchInput layerPatchInput) throws ApiException
Update layer Update a layer by adding, changing, or removing traffic reservations for experiments, or by changing layer name or description. Updating a layer uses the semantic patch format. To make a semantic patch request, you must append `domain-model=launchdarkly.semanticpatch` to your `Content-Type` header. To learn more, read [Updates using semantic patch](https://launchdarkly.com/docs/api#updates-using-semantic-patch). ### Instructions Semantic patch requests support the following `kind` instructions for updating layers. <details> <summary>Click to expand instructions for <strong>updating layers</strong></summary> #### updateName Updates the layer name. ##### Parameters - `name`: The new layer name. Here's an example: ```json { \"instructions\": [{ \"kind\": \"updateName\", \"name\": \"New name\" }] } ``` #### updateDescription Updates the layer description. ##### Parameters - `description`: The new description. Here's an example: ```json { \"instructions\": [{ \"kind\": \"updateDescription\", \"description\": \"New description\" }] } ``` #### updateExperimentReservation Adds or updates a traffic reservation for an experiment in a layer. ##### Parameters - `experimentKey`: The key of the experiment whose reservation you are adding to or updating in the layer. - `reservationPercent`: The amount of traffic in the layer to reserve. Must be an integer. Zero is allowed until iteration start. Here's an example: ```json { \"environmentKey\": \"production\", \"instructions\": [{ \"kind\": \"updateExperimentReservation\", \"experimentKey\": \"exp-key\", \"reservationPercent\": 10 }] } ``` #### removeExperiment Removes a traffic reservation for an experiment from a layer. ##### Parameters - `experimentKey`: The key of the experiment whose reservation you want to remove from the layer. Here's an example: ```json { \"environmentKey\": \"production\", \"instructions\": [{ \"kind\": \"removeExperiment\", \"experimentKey\": \"exp-key\" }] } ``` </details>- Parameters:
projectKey- The project key (required)layerKey- The layer key (required)layerPatchInput- (required)- Returns:
- LayerRep
- Throws:
ApiException- If fail to call the API, e.g. server error or cannot deserialize the response body
-
updateLayerWithHttpInfo
public ApiResponse<LayerRep> updateLayerWithHttpInfo(@Nonnull java.lang.String projectKey, @Nonnull java.lang.String layerKey, @Nonnull LayerPatchInput layerPatchInput) throws ApiException
Update layer Update a layer by adding, changing, or removing traffic reservations for experiments, or by changing layer name or description. Updating a layer uses the semantic patch format. To make a semantic patch request, you must append `domain-model=launchdarkly.semanticpatch` to your `Content-Type` header. To learn more, read [Updates using semantic patch](https://launchdarkly.com/docs/api#updates-using-semantic-patch). ### Instructions Semantic patch requests support the following `kind` instructions for updating layers. <details> <summary>Click to expand instructions for <strong>updating layers</strong></summary> #### updateName Updates the layer name. ##### Parameters - `name`: The new layer name. Here's an example: ```json { \"instructions\": [{ \"kind\": \"updateName\", \"name\": \"New name\" }] } ``` #### updateDescription Updates the layer description. ##### Parameters - `description`: The new description. Here's an example: ```json { \"instructions\": [{ \"kind\": \"updateDescription\", \"description\": \"New description\" }] } ``` #### updateExperimentReservation Adds or updates a traffic reservation for an experiment in a layer. ##### Parameters - `experimentKey`: The key of the experiment whose reservation you are adding to or updating in the layer. - `reservationPercent`: The amount of traffic in the layer to reserve. Must be an integer. Zero is allowed until iteration start. Here's an example: ```json { \"environmentKey\": \"production\", \"instructions\": [{ \"kind\": \"updateExperimentReservation\", \"experimentKey\": \"exp-key\", \"reservationPercent\": 10 }] } ``` #### removeExperiment Removes a traffic reservation for an experiment from a layer. ##### Parameters - `experimentKey`: The key of the experiment whose reservation you want to remove from the layer. Here's an example: ```json { \"environmentKey\": \"production\", \"instructions\": [{ \"kind\": \"removeExperiment\", \"experimentKey\": \"exp-key\" }] } ``` </details>- Parameters:
projectKey- The project key (required)layerKey- The layer key (required)layerPatchInput- (required)- Returns:
- ApiResponse<LayerRep>
- Throws:
ApiException- If fail to call the API, e.g. server error or cannot deserialize the response body
-
updateLayerAsync
public okhttp3.Call updateLayerAsync(@Nonnull java.lang.String projectKey, @Nonnull java.lang.String layerKey, @Nonnull LayerPatchInput layerPatchInput, ApiCallback<LayerRep> _callback) throws ApiExceptionUpdate layer (asynchronously) Update a layer by adding, changing, or removing traffic reservations for experiments, or by changing layer name or description. Updating a layer uses the semantic patch format. To make a semantic patch request, you must append `domain-model=launchdarkly.semanticpatch` to your `Content-Type` header. To learn more, read [Updates using semantic patch](https://launchdarkly.com/docs/api#updates-using-semantic-patch). ### Instructions Semantic patch requests support the following `kind` instructions for updating layers. <details> <summary>Click to expand instructions for <strong>updating layers</strong></summary> #### updateName Updates the layer name. ##### Parameters - `name`: The new layer name. Here's an example: ```json { \"instructions\": [{ \"kind\": \"updateName\", \"name\": \"New name\" }] } ``` #### updateDescription Updates the layer description. ##### Parameters - `description`: The new description. Here's an example: ```json { \"instructions\": [{ \"kind\": \"updateDescription\", \"description\": \"New description\" }] } ``` #### updateExperimentReservation Adds or updates a traffic reservation for an experiment in a layer. ##### Parameters - `experimentKey`: The key of the experiment whose reservation you are adding to or updating in the layer. - `reservationPercent`: The amount of traffic in the layer to reserve. Must be an integer. Zero is allowed until iteration start. Here's an example: ```json { \"environmentKey\": \"production\", \"instructions\": [{ \"kind\": \"updateExperimentReservation\", \"experimentKey\": \"exp-key\", \"reservationPercent\": 10 }] } ``` #### removeExperiment Removes a traffic reservation for an experiment from a layer. ##### Parameters - `experimentKey`: The key of the experiment whose reservation you want to remove from the layer. Here's an example: ```json { \"environmentKey\": \"production\", \"instructions\": [{ \"kind\": \"removeExperiment\", \"experimentKey\": \"exp-key\" }] } ``` </details>- Parameters:
projectKey- The project key (required)layerKey- The layer key (required)layerPatchInput- (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
-
-