# LansApi

## LansApi

All URIs are relative to *<https://api.ionos.com/cloudapi/v6>*

| Method                                                          | HTTP request                                                  | Description            |
| --------------------------------------------------------------- | ------------------------------------------------------------- | ---------------------- |
| [**datacentersLansDelete**](#datacenterslansdelete)             | **DELETE** /datacenters/{datacenterId}/lans/{lanId}           | Delete LANs            |
| [**datacentersLansFindById**](#datacenterslansfindbyid)         | **GET** /datacenters/{datacenterId}/lans/{lanId}              | Retrieve LANs          |
| [**datacentersLansGet**](#datacenterslansget)                   | **GET** /datacenters/{datacenterId}/lans                      | List LANs              |
| [**datacentersLansNicsFindById**](#datacenterslansnicsfindbyid) | **GET** /datacenters/{datacenterId}/lans/{lanId}/nics/{nicId} | Retrieve attached NICs |
| [**datacentersLansNicsGet**](#datacenterslansnicsget)           | **GET** /datacenters/{datacenterId}/lans/{lanId}/nics         | List LAN members       |
| [**datacentersLansNicsPost**](#datacenterslansnicspost)         | **POST** /datacenters/{datacenterId}/lans/{lanId}/nics        | Attach NICs            |
| [**datacentersLansPatch**](#datacenterslanspatch)               | **PATCH** /datacenters/{datacenterId}/lans/{lanId}            | Partially modify LANs  |
| [**datacentersLansPost**](#datacenterslanspost)                 | **POST** /datacenters/{datacenterId}/lans                     | Create LANs            |
| [**datacentersLansPut**](#datacenterslansput)                   | **PUT** /datacenters/{datacenterId}/lans/{lanId}              | Modify LANs            |

## **datacentersLansDelete**

> datacentersLansDelete(datacenterId, lanId, pretty, depth, xContractNumber)

Delete LANs

Delete the specified LAN within the data center.

#### Parameters

| Name                | Type        | Description                                                                                                                                                                                                                                                                                                                                                                                                                              | Notes                          |
| ------------------- | ----------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------ |
| **datacenterId**    | **String**  | The unique ID of the data center.                                                                                                                                                                                                                                                                                                                                                                                                        |                                |
| **lanId**           | **String**  | The unique ID of the LAN.                                                                                                                                                                                                                                                                                                                                                                                                                |                                |
| **pretty**          | **Boolean** | Controls whether the response is pretty-printed (with indentations and new lines).                                                                                                                                                                                                                                                                                                                                                       | \[optional] \[default to true] |
| **depth**           | **Integer** | Controls the detail depth of the response objects. GET /datacenters/\[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | \[optional] \[default to 0]    |
| **xContractNumber** | **Integer** | Users with multiple contracts must provide the contract number, for which all API requests are to be executed.                                                                                                                                                                                                                                                                                                                           | \[optional]                    |

#### Return type

null (empty response body)

#### HTTP request headers

* **Content-Type**: Not defined
* **Accept**: application/json

⚠️ **Note**: the example bellow uses the datacentersLansDeleteWithHttpInfo which also returns the status code and the headers, if you don't need them you may use datacentersLansDelete instead

#### Example

```java
// Import classes:
import com.ionoscloud.ApiClient;
import com.ionoscloud.ApiException;
import com.ionoscloud.ApiResponse;
import com.ionoscloud.Configuration;
import com.ionoscloud.auth.*;
import com.ionoscloud.model.*;
import com.ionoscloud.api.LansApi;

public class Example {
  public static void main(String[] args) {
    ApiClient defaultClient = Configuration.getDefaultApiClient();
    
    // Configure HTTP basic authorization: Basic Authentication
    HttpBasicAuth basicAuthentication = (HttpBasicAuth) defaultClient.getAuthentication("Basic Authentication");
    basicAuthentication.setUsername("YOUR USERNAME");
    basicAuthentication.setPassword("YOUR PASSWORD");

    // Configure Api Key authorization: Token Authentication
    defaultClient.setApiKeyWithBearerPrefix("YOUR TOKEN");

    LansApi apiInstance = new LansApi(defaultClient);
    String datacenterId = "datacenterId_example"; // String | The unique ID of the data center.
    String lanId = "lanId_example"; // String | The unique ID of the LAN.
    Boolean pretty = true; // Boolean | Controls whether the response is pretty-printed (with indentations and new lines).
    Integer depth = 0; // Integer | Controls the detail depth of the response objects.  GET /datacenters/[ID]  - depth=0: Only direct properties are included; children (servers and other elements) are not included.  - depth=1: Direct properties and children references are included.  - depth=2: Direct properties and children properties are included.  - depth=3: Direct properties and children properties and children's children are included.  - depth=... and so on
    Integer xContractNumber = 56; // Integer | Users with multiple contracts must provide the contract number, for which all API requests are to be executed.
    try {
      apiInstance.datacentersLansDeleteWithHttpInfo(datacenterId, lanId, pretty, depth, xContractNumber);
    } catch (ApiException e) {
      System.err.println("Exception when calling LansApi#datacentersLansDelete");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getResponseBody());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}
```

⚠️ **Note**: for the example above, you need to provide all parameters to the method call. Null values will resolve to the API defaults.

For convenience, you can alternatively use a builder, which allows to omit optional parameters:

```java
    try {
        apiInstance.datacentersLansDelete(datacenterId, lanId)
                .pretty(true)
                .depth(0)
                .xContractNumber(56)
                .execute();
        System.out.println(result);
    } catch (ApiException e) {
        System.err.println("Exception when calling LansApi#datacentersLansDelete");
        System.err.println("Status code: " + e.getCode());
        System.err.println("Reason: " + e.getResponseBody());
        System.err.println("Response headers: " + e.getResponseHeaders());
        e.printStackTrace();
    }
```

## **datacentersLansFindById**

> Lan datacentersLansFindById(datacenterId, lanId, pretty, depth, xContractNumber)

Retrieve LANs

Retrieve the properties of the specified LAN within the data center.

#### Parameters

| Name                | Type        | Description                                                                                                                                                                                                                                                                                                                                                                                                                              | Notes                          |
| ------------------- | ----------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------ |
| **datacenterId**    | **String**  | The unique ID of the data center.                                                                                                                                                                                                                                                                                                                                                                                                        |                                |
| **lanId**           | **String**  | The unique ID of the LAN.                                                                                                                                                                                                                                                                                                                                                                                                                |                                |
| **pretty**          | **Boolean** | Controls whether the response is pretty-printed (with indentations and new lines).                                                                                                                                                                                                                                                                                                                                                       | \[optional] \[default to true] |
| **depth**           | **Integer** | Controls the detail depth of the response objects. GET /datacenters/\[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | \[optional] \[default to 0]    |
| **xContractNumber** | **Integer** | Users with multiple contracts must provide the contract number, for which all API requests are to be executed.                                                                                                                                                                                                                                                                                                                           | \[optional]                    |

#### Return type

[**Lan**](https://docs.ionos.com/sections-test/java-sdk/cloud-api-java-sdk/models/lan)

#### HTTP request headers

* **Content-Type**: Not defined
* **Accept**: application/json

⚠️ **Note**: the example bellow uses the datacentersLansFindByIdWithHttpInfo which also returns the status code and the headers, if you don't need them you may use datacentersLansFindById instead

#### Example

```java
// Import classes:
import com.ionoscloud.ApiClient;
import com.ionoscloud.ApiException;
import com.ionoscloud.ApiResponse;
import com.ionoscloud.Configuration;
import com.ionoscloud.auth.*;
import com.ionoscloud.model.*;
import com.ionoscloud.api.LansApi;

public class Example {
  public static void main(String[] args) {
    ApiClient defaultClient = Configuration.getDefaultApiClient();
    
    // Configure HTTP basic authorization: Basic Authentication
    HttpBasicAuth basicAuthentication = (HttpBasicAuth) defaultClient.getAuthentication("Basic Authentication");
    basicAuthentication.setUsername("YOUR USERNAME");
    basicAuthentication.setPassword("YOUR PASSWORD");

    // Configure Api Key authorization: Token Authentication
    defaultClient.setApiKeyWithBearerPrefix("YOUR TOKEN");

    LansApi apiInstance = new LansApi(defaultClient);
    String datacenterId = "datacenterId_example"; // String | The unique ID of the data center.
    String lanId = "lanId_example"; // String | The unique ID of the LAN.
    Boolean pretty = true; // Boolean | Controls whether the response is pretty-printed (with indentations and new lines).
    Integer depth = 0; // Integer | Controls the detail depth of the response objects.  GET /datacenters/[ID]  - depth=0: Only direct properties are included; children (servers and other elements) are not included.  - depth=1: Direct properties and children references are included.  - depth=2: Direct properties and children properties are included.  - depth=3: Direct properties and children properties and children's children are included.  - depth=... and so on
    Integer xContractNumber = 56; // Integer | Users with multiple contracts must provide the contract number, for which all API requests are to be executed.
    try {
      ApiResponse<Lan> result = apiInstance.datacentersLansFindByIdWithHttpInfo(datacenterId, lanId, pretty, depth, xContractNumber);
      System.out.println("Response: " + result.getData());
      System.out.println("Status Code: " + result.getStatusCode());
      System.out.println("Headers: " + result.getHeaders());
    } catch (ApiException e) {
      System.err.println("Exception when calling LansApi#datacentersLansFindById");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getResponseBody());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}
```

⚠️ **Note**: for the example above, you need to provide all parameters to the method call. Null values will resolve to the API defaults.

For convenience, you can alternatively use a builder, which allows to omit optional parameters:

```java
    try {
        Lan result = apiInstance.datacentersLansFindById(datacenterId, lanId)
                .pretty(true)
                .depth(0)
                .xContractNumber(56)
                .execute();
        System.out.println(result);
    } catch (ApiException e) {
        System.err.println("Exception when calling LansApi#datacentersLansFindById");
        System.err.println("Status code: " + e.getCode());
        System.err.println("Reason: " + e.getResponseBody());
        System.err.println("Response headers: " + e.getResponseHeaders());
        e.printStackTrace();
    }
```

## **datacentersLansGet**

> Lans datacentersLansGet(datacenterId, pretty, depth, xContractNumber, offset, limit)

List LANs

List all LANs within the data center.

#### Parameters

| Name                | Type                 | Description                                                                                                                                                                                                                                                                                                                                                                                                                              | Notes                          |
| ------------------- | -------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------ |
| **datacenterId**    | **String**           | The unique ID of the data center.                                                                                                                                                                                                                                                                                                                                                                                                        |                                |
| **pretty**          | **Boolean**          | Controls whether the response is pretty-printed (with indentations and new lines).                                                                                                                                                                                                                                                                                                                                                       | \[optional] \[default to true] |
| **depth**           | **Integer**          | Controls the detail depth of the response objects. GET /datacenters/\[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | \[optional] \[default to 0]    |
| **xContractNumber** | **Integer**          | Users with multiple contracts must provide the contract number, for which all API requests are to be executed.                                                                                                                                                                                                                                                                                                                           | \[optional]                    |
| **offset**          | **Integer**          | The first element (from the complete list of the elements) to include in the response (used together with \<b>\<i>limit\</i>\</b> for pagination).                                                                                                                                                                                                                                                                                       | \[optional] \[default to 0]    |
| **limit**           | **Integer**          | The maximum number of elements to return (use together with offset for pagination).                                                                                                                                                                                                                                                                                                                                                      | \[optional] \[default to 1000] |
| orderBy             | String               | Sorts the results alphanumerically in ascending order based on the specified property.                                                                                                                                                                                                                                                                                                                                                   | \[optional]                    |
| maxResults          | Integer              | Limits the number of results returned.                                                                                                                                                                                                                                                                                                                                                                                                   | \[optional]                    |
| filters             | Map\<String, String> | Limit results to those containing a matching value for a specific property.                                                                                                                                                                                                                                                                                                                                                              | \[optional]                    |

#### Return type

[**Lans**](https://docs.ionos.com/sections-test/java-sdk/cloud-api-java-sdk/models/lans)

#### HTTP request headers

* **Content-Type**: Not defined
* **Accept**: application/json

⚠️ **Note**: the example bellow uses the datacentersLansGetWithHttpInfo which also returns the status code and the headers, if you don't need them you may use datacentersLansGet instead

#### Example

```java
// Import classes:
import com.ionoscloud.ApiClient;
import com.ionoscloud.ApiException;
import com.ionoscloud.ApiResponse;
import com.ionoscloud.Configuration;
import com.ionoscloud.auth.*;
import com.ionoscloud.model.*;
import com.ionoscloud.api.LansApi;

public class Example {
  public static void main(String[] args) {
    ApiClient defaultClient = Configuration.getDefaultApiClient();
    
    // Configure HTTP basic authorization: Basic Authentication
    HttpBasicAuth basicAuthentication = (HttpBasicAuth) defaultClient.getAuthentication("Basic Authentication");
    basicAuthentication.setUsername("YOUR USERNAME");
    basicAuthentication.setPassword("YOUR PASSWORD");

    // Configure Api Key authorization: Token Authentication
    defaultClient.setApiKeyWithBearerPrefix("YOUR TOKEN");

    LansApi apiInstance = new LansApi(defaultClient);
    String datacenterId = "datacenterId_example"; // String | The unique ID of the data center.
    Boolean pretty = true; // Boolean | Controls whether the response is pretty-printed (with indentations and new lines).
    Integer depth = 0; // Integer | Controls the detail depth of the response objects.  GET /datacenters/[ID]  - depth=0: Only direct properties are included; children (servers and other elements) are not included.  - depth=1: Direct properties and children references are included.  - depth=2: Direct properties and children properties are included.  - depth=3: Direct properties and children properties and children's children are included.  - depth=... and so on
    Integer xContractNumber = 56; // Integer | Users with multiple contracts must provide the contract number, for which all API requests are to be executed.
    Integer offset = 0; // Integer | The first element (from the complete list of the elements) to include in the response (used together with <b><i>limit</i></b> for pagination).
    Integer limit = 1000; // Integer | The maximum number of elements to return (use together with offset for pagination).
    String orderBy = "orderBy_example"; // String | Order by field
    Integer maxResults = "maxResults_example"; // Integer | Maximum number of results to return
    Map<String, String> filters = new HashMap<String, String>(); // Map<String, String> | Filter results by field
    try {
      ApiResponse<Lans> result = apiInstance.datacentersLansGetWithHttpInfo(datacenterId, pretty, depth, xContractNumber, offset, limit, orderBy, maxResults, filters);
      System.out.println("Response: " + result.getData());
      System.out.println("Status Code: " + result.getStatusCode());
      System.out.println("Headers: " + result.getHeaders());
    } catch (ApiException e) {
      System.err.println("Exception when calling LansApi#datacentersLansGet");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getResponseBody());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}
```

⚠️ **Note**: for the example above, you need to provide all parameters to the method call. Null values will resolve to the API defaults.

For convenience, you can alternatively use a builder, which allows to omit optional parameters:

```java
    try {
        Lans result = apiInstance.datacentersLansGet(datacenterId)
                .pretty(true)
                .depth(0)
                .offset(0)
                .limit(1000)
                .xContractNumber(56)
                .orderBy("orderBy_example")
                .maxResults(5)
                .filters(filters)
                .execute();
        System.out.println(result);
    } catch (ApiException e) {
        System.err.println("Exception when calling LansApi#datacentersLansGet");
        System.err.println("Status code: " + e.getCode());
        System.err.println("Reason: " + e.getResponseBody());
        System.err.println("Response headers: " + e.getResponseHeaders());
        e.printStackTrace();
    }
```

## **datacentersLansNicsFindById**

> Nic datacentersLansNicsFindById(datacenterId, lanId, nicId, pretty, depth, xContractNumber)

Retrieve attached NICs

Retrieve the properties of the NIC, attached to the specified LAN.

#### Parameters

| Name                | Type        | Description                                                                                                                                                                                                                                                                                                                                                                                                                              | Notes                          |
| ------------------- | ----------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------ |
| **datacenterId**    | **String**  | The unique ID of the data center.                                                                                                                                                                                                                                                                                                                                                                                                        |                                |
| **lanId**           | **String**  | The unique ID of the LAN.                                                                                                                                                                                                                                                                                                                                                                                                                |                                |
| **nicId**           | **String**  | The unique ID of the NIC.                                                                                                                                                                                                                                                                                                                                                                                                                |                                |
| **pretty**          | **Boolean** | Controls whether the response is pretty-printed (with indentations and new lines).                                                                                                                                                                                                                                                                                                                                                       | \[optional] \[default to true] |
| **depth**           | **Integer** | Controls the detail depth of the response objects. GET /datacenters/\[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | \[optional] \[default to 0]    |
| **xContractNumber** | **Integer** | Users with multiple contracts must provide the contract number, for which all API requests are to be executed.                                                                                                                                                                                                                                                                                                                           | \[optional]                    |

#### Return type

[**Nic**](https://docs.ionos.com/sections-test/java-sdk/cloud-api-java-sdk/models/nic)

#### HTTP request headers

* **Content-Type**: Not defined
* **Accept**: application/json

⚠️ **Note**: the example bellow uses the datacentersLansNicsFindByIdWithHttpInfo which also returns the status code and the headers, if you don't need them you may use datacentersLansNicsFindById instead

#### Example

```java
// Import classes:
import com.ionoscloud.ApiClient;
import com.ionoscloud.ApiException;
import com.ionoscloud.ApiResponse;
import com.ionoscloud.Configuration;
import com.ionoscloud.auth.*;
import com.ionoscloud.model.*;
import com.ionoscloud.api.LansApi;

public class Example {
  public static void main(String[] args) {
    ApiClient defaultClient = Configuration.getDefaultApiClient();
    
    // Configure HTTP basic authorization: Basic Authentication
    HttpBasicAuth basicAuthentication = (HttpBasicAuth) defaultClient.getAuthentication("Basic Authentication");
    basicAuthentication.setUsername("YOUR USERNAME");
    basicAuthentication.setPassword("YOUR PASSWORD");

    // Configure Api Key authorization: Token Authentication
    defaultClient.setApiKeyWithBearerPrefix("YOUR TOKEN");

    LansApi apiInstance = new LansApi(defaultClient);
    String datacenterId = "datacenterId_example"; // String | The unique ID of the data center.
    String lanId = "lanId_example"; // String | The unique ID of the LAN.
    String nicId = "nicId_example"; // String | The unique ID of the NIC.
    Boolean pretty = true; // Boolean | Controls whether the response is pretty-printed (with indentations and new lines).
    Integer depth = 0; // Integer | Controls the detail depth of the response objects.  GET /datacenters/[ID]  - depth=0: Only direct properties are included; children (servers and other elements) are not included.  - depth=1: Direct properties and children references are included.  - depth=2: Direct properties and children properties are included.  - depth=3: Direct properties and children properties and children's children are included.  - depth=... and so on
    Integer xContractNumber = 56; // Integer | Users with multiple contracts must provide the contract number, for which all API requests are to be executed.
    try {
      ApiResponse<Nic> result = apiInstance.datacentersLansNicsFindByIdWithHttpInfo(datacenterId, lanId, nicId, pretty, depth, xContractNumber);
      System.out.println("Response: " + result.getData());
      System.out.println("Status Code: " + result.getStatusCode());
      System.out.println("Headers: " + result.getHeaders());
    } catch (ApiException e) {
      System.err.println("Exception when calling LansApi#datacentersLansNicsFindById");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getResponseBody());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}
```

⚠️ **Note**: for the example above, you need to provide all parameters to the method call. Null values will resolve to the API defaults.

For convenience, you can alternatively use a builder, which allows to omit optional parameters:

```java
    try {
        Nic result = apiInstance.datacentersLansNicsFindById(datacenterId, lanId, nicId)
                .pretty(true)
                .depth(0)
                .xContractNumber(56)
                .execute();
        System.out.println(result);
    } catch (ApiException e) {
        System.err.println("Exception when calling LansApi#datacentersLansNicsFindById");
        System.err.println("Status code: " + e.getCode());
        System.err.println("Reason: " + e.getResponseBody());
        System.err.println("Response headers: " + e.getResponseHeaders());
        e.printStackTrace();
    }
```

## **datacentersLansNicsGet**

> LanNics datacentersLansNicsGet(datacenterId, lanId, pretty, depth, xContractNumber, offset, limit)

List LAN members

List all NICs, attached to the specified LAN.

#### Parameters

| Name                | Type                 | Description                                                                                                                                                                                                                                                                                                                                                                                                                              | Notes                          |
| ------------------- | -------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------ |
| **datacenterId**    | **String**           | The unique ID of the data center.                                                                                                                                                                                                                                                                                                                                                                                                        |                                |
| **lanId**           | **String**           | The unique ID of the LAN.                                                                                                                                                                                                                                                                                                                                                                                                                |                                |
| **pretty**          | **Boolean**          | Controls whether the response is pretty-printed (with indentations and new lines).                                                                                                                                                                                                                                                                                                                                                       | \[optional] \[default to true] |
| **depth**           | **Integer**          | Controls the detail depth of the response objects. GET /datacenters/\[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | \[optional] \[default to 0]    |
| **xContractNumber** | **Integer**          | Users with multiple contracts must provide the contract number, for which all API requests are to be executed.                                                                                                                                                                                                                                                                                                                           | \[optional]                    |
| **offset**          | **Integer**          | The first element (from the complete list of the elements) to include in the response (used together with \<b>\<i>limit\</i>\</b> for pagination).                                                                                                                                                                                                                                                                                       | \[optional] \[default to 0]    |
| **limit**           | **Integer**          | The maximum number of elements to return (use together with offset for pagination).                                                                                                                                                                                                                                                                                                                                                      | \[optional] \[default to 1000] |
| orderBy             | String               | Sorts the results alphanumerically in ascending order based on the specified property.                                                                                                                                                                                                                                                                                                                                                   | \[optional]                    |
| maxResults          | Integer              | Limits the number of results returned.                                                                                                                                                                                                                                                                                                                                                                                                   | \[optional]                    |
| filters             | Map\<String, String> | Limit results to those containing a matching value for a specific property.                                                                                                                                                                                                                                                                                                                                                              | \[optional]                    |

#### Return type

[**LanNics**](https://docs.ionos.com/sections-test/java-sdk/cloud-api-java-sdk/models/lannics)

#### HTTP request headers

* **Content-Type**: Not defined
* **Accept**: application/json

⚠️ **Note**: the example bellow uses the datacentersLansNicsGetWithHttpInfo which also returns the status code and the headers, if you don't need them you may use datacentersLansNicsGet instead

#### Example

```java
// Import classes:
import com.ionoscloud.ApiClient;
import com.ionoscloud.ApiException;
import com.ionoscloud.ApiResponse;
import com.ionoscloud.Configuration;
import com.ionoscloud.auth.*;
import com.ionoscloud.model.*;
import com.ionoscloud.api.LansApi;

public class Example {
  public static void main(String[] args) {
    ApiClient defaultClient = Configuration.getDefaultApiClient();
    
    // Configure HTTP basic authorization: Basic Authentication
    HttpBasicAuth basicAuthentication = (HttpBasicAuth) defaultClient.getAuthentication("Basic Authentication");
    basicAuthentication.setUsername("YOUR USERNAME");
    basicAuthentication.setPassword("YOUR PASSWORD");

    // Configure Api Key authorization: Token Authentication
    defaultClient.setApiKeyWithBearerPrefix("YOUR TOKEN");

    LansApi apiInstance = new LansApi(defaultClient);
    String datacenterId = "datacenterId_example"; // String | The unique ID of the data center.
    String lanId = "lanId_example"; // String | The unique ID of the LAN.
    Boolean pretty = true; // Boolean | Controls whether the response is pretty-printed (with indentations and new lines).
    Integer depth = 0; // Integer | Controls the detail depth of the response objects.  GET /datacenters/[ID]  - depth=0: Only direct properties are included; children (servers and other elements) are not included.  - depth=1: Direct properties and children references are included.  - depth=2: Direct properties and children properties are included.  - depth=3: Direct properties and children properties and children's children are included.  - depth=... and so on
    Integer xContractNumber = 56; // Integer | Users with multiple contracts must provide the contract number, for which all API requests are to be executed.
    Integer offset = 0; // Integer | The first element (from the complete list of the elements) to include in the response (used together with <b><i>limit</i></b> for pagination).
    Integer limit = 1000; // Integer | The maximum number of elements to return (use together with offset for pagination).
    String orderBy = "orderBy_example"; // String | Order by field
    Integer maxResults = "maxResults_example"; // Integer | Maximum number of results to return
    Map<String, String> filters = new HashMap<String, String>(); // Map<String, String> | Filter results by field
    try {
      ApiResponse<LanNics> result = apiInstance.datacentersLansNicsGetWithHttpInfo(datacenterId, lanId, pretty, depth, xContractNumber, offset, limit, orderBy, maxResults, filters);
      System.out.println("Response: " + result.getData());
      System.out.println("Status Code: " + result.getStatusCode());
      System.out.println("Headers: " + result.getHeaders());
    } catch (ApiException e) {
      System.err.println("Exception when calling LansApi#datacentersLansNicsGet");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getResponseBody());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}
```

⚠️ **Note**: for the example above, you need to provide all parameters to the method call. Null values will resolve to the API defaults.

For convenience, you can alternatively use a builder, which allows to omit optional parameters:

```java
    try {
        LanNics result = apiInstance.datacentersLansNicsGet(datacenterId, lanId)
                .pretty(true)
                .depth(0)
                .offset(0)
                .limit(1000)
                .xContractNumber(56)
                .orderBy("orderBy_example")
                .maxResults(5)
                .filters(filters)
                .execute();
        System.out.println(result);
    } catch (ApiException e) {
        System.err.println("Exception when calling LansApi#datacentersLansNicsGet");
        System.err.println("Status code: " + e.getCode());
        System.err.println("Reason: " + e.getResponseBody());
        System.err.println("Response headers: " + e.getResponseHeaders());
        e.printStackTrace();
    }
```

## **datacentersLansNicsPost**

> Nic datacentersLansNicsPost(datacenterId, lanId, nic, pretty, depth, xContractNumber)

Attach NICs

Attach an existing NIC to the specified LAN.

#### Parameters

| Name                | Type                                                                                   | Description                                                                                                                                                                                                                                                                                                                                                                                                                              | Notes                          |
| ------------------- | -------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------ |
| **datacenterId**    | **String**                                                                             | The unique ID of the data center.                                                                                                                                                                                                                                                                                                                                                                                                        |                                |
| **lanId**           | **String**                                                                             | The unique ID of the LAN.                                                                                                                                                                                                                                                                                                                                                                                                                |                                |
| **nic**             | [**Nic**](https://docs.ionos.com/sections-test/java-sdk/cloud-api-java-sdk/models/nic) | The NIC to be attached.                                                                                                                                                                                                                                                                                                                                                                                                                  |                                |
| **pretty**          | **Boolean**                                                                            | Controls whether the response is pretty-printed (with indentations and new lines).                                                                                                                                                                                                                                                                                                                                                       | \[optional] \[default to true] |
| **depth**           | **Integer**                                                                            | Controls the detail depth of the response objects. GET /datacenters/\[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | \[optional] \[default to 0]    |
| **xContractNumber** | **Integer**                                                                            | Users with multiple contracts must provide the contract number, for which all API requests are to be executed.                                                                                                                                                                                                                                                                                                                           | \[optional]                    |

#### Return type

[**Nic**](https://docs.ionos.com/sections-test/java-sdk/cloud-api-java-sdk/models/nic)

#### HTTP request headers

* **Content-Type**: application/json
* **Accept**: application/json

⚠️ **Note**: the example bellow uses the datacentersLansNicsPostWithHttpInfo which also returns the status code and the headers, if you don't need them you may use datacentersLansNicsPost instead

#### Example

```java
// Import classes:
import com.ionoscloud.ApiClient;
import com.ionoscloud.ApiException;
import com.ionoscloud.ApiResponse;
import com.ionoscloud.Configuration;
import com.ionoscloud.auth.*;
import com.ionoscloud.model.*;
import com.ionoscloud.api.LansApi;

public class Example {
  public static void main(String[] args) {
    ApiClient defaultClient = Configuration.getDefaultApiClient();
    
    // Configure HTTP basic authorization: Basic Authentication
    HttpBasicAuth basicAuthentication = (HttpBasicAuth) defaultClient.getAuthentication("Basic Authentication");
    basicAuthentication.setUsername("YOUR USERNAME");
    basicAuthentication.setPassword("YOUR PASSWORD");

    // Configure Api Key authorization: Token Authentication
    defaultClient.setApiKeyWithBearerPrefix("YOUR TOKEN");

    LansApi apiInstance = new LansApi(defaultClient);
    String datacenterId = "datacenterId_example"; // String | The unique ID of the data center.
    String lanId = "lanId_example"; // String | The unique ID of the LAN.
    properties = new NicProperties(); // NicProperties | 
    nic = new Nic(NicProperties); // Nic | The NIC to be attached.
    Boolean pretty = true; // Boolean | Controls whether the response is pretty-printed (with indentations and new lines).
    Integer depth = 0; // Integer | Controls the detail depth of the response objects.  GET /datacenters/[ID]  - depth=0: Only direct properties are included; children (servers and other elements) are not included.  - depth=1: Direct properties and children references are included.  - depth=2: Direct properties and children properties are included.  - depth=3: Direct properties and children properties and children's children are included.  - depth=... and so on
    Integer xContractNumber = 56; // Integer | Users with multiple contracts must provide the contract number, for which all API requests are to be executed.
    try {
      ApiResponse<Nic> result = apiInstance.datacentersLansNicsPostWithHttpInfo(datacenterId, lanId, nic, pretty, depth, xContractNumber);
      System.out.println("Response: " + result.getData());
      System.out.println("Status Code: " + result.getStatusCode());
      System.out.println("Headers: " + result.getHeaders());
    } catch (ApiException e) {
      System.err.println("Exception when calling LansApi#datacentersLansNicsPost");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getResponseBody());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}
```

⚠️ **Note**: for the example above, you need to provide all parameters to the method call. Null values will resolve to the API defaults.

For convenience, you can alternatively use a builder, which allows to omit optional parameters:

```java
    try {
        Nic result = apiInstance.datacentersLansNicsPost(datacenterId, lanId, nic)
                .pretty(true)
                .depth(0)
                .xContractNumber(56)
                .execute();
        System.out.println(result);
    } catch (ApiException e) {
        System.err.println("Exception when calling LansApi#datacentersLansNicsPost");
        System.err.println("Status code: " + e.getCode());
        System.err.println("Reason: " + e.getResponseBody());
        System.err.println("Response headers: " + e.getResponseHeaders());
        e.printStackTrace();
    }
```

## **datacentersLansPatch**

> Lan datacentersLansPatch(datacenterId, lanId, lan, pretty, depth, xContractNumber)

Partially modify LANs

Update the properties of the specified LAN within the data center.

#### Parameters

| Name                | Type                                                                                                       | Description                                                                                                                                                                                                                                                                                                                                                                                                                              | Notes                          |
| ------------------- | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------ |
| **datacenterId**    | **String**                                                                                                 | The unique ID of the data center.                                                                                                                                                                                                                                                                                                                                                                                                        |                                |
| **lanId**           | **String**                                                                                                 | The unique ID of the LAN.                                                                                                                                                                                                                                                                                                                                                                                                                |                                |
| **lan**             | [**LanProperties**](https://docs.ionos.com/sections-test/java-sdk/cloud-api-java-sdk/models/lanproperties) | The properties of the LAN to be updated.                                                                                                                                                                                                                                                                                                                                                                                                 |                                |
| **pretty**          | **Boolean**                                                                                                | Controls whether the response is pretty-printed (with indentations and new lines).                                                                                                                                                                                                                                                                                                                                                       | \[optional] \[default to true] |
| **depth**           | **Integer**                                                                                                | Controls the detail depth of the response objects. GET /datacenters/\[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | \[optional] \[default to 0]    |
| **xContractNumber** | **Integer**                                                                                                | Users with multiple contracts must provide the contract number, for which all API requests are to be executed.                                                                                                                                                                                                                                                                                                                           | \[optional]                    |

#### Return type

[**Lan**](https://docs.ionos.com/sections-test/java-sdk/cloud-api-java-sdk/models/lan)

#### HTTP request headers

* **Content-Type**: application/json
* **Accept**: application/json

⚠️ **Note**: the example bellow uses the datacentersLansPatchWithHttpInfo which also returns the status code and the headers, if you don't need them you may use datacentersLansPatch instead

#### Example

```java
// Import classes:
import com.ionoscloud.ApiClient;
import com.ionoscloud.ApiException;
import com.ionoscloud.ApiResponse;
import com.ionoscloud.Configuration;
import com.ionoscloud.auth.*;
import com.ionoscloud.model.*;
import com.ionoscloud.api.LansApi;

public class Example {
  public static void main(String[] args) {
    ApiClient defaultClient = Configuration.getDefaultApiClient();
    
    // Configure HTTP basic authorization: Basic Authentication
    HttpBasicAuth basicAuthentication = (HttpBasicAuth) defaultClient.getAuthentication("Basic Authentication");
    basicAuthentication.setUsername("YOUR USERNAME");
    basicAuthentication.setPassword("YOUR PASSWORD");

    // Configure Api Key authorization: Token Authentication
    defaultClient.setApiKeyWithBearerPrefix("YOUR TOKEN");

    LansApi apiInstance = new LansApi(defaultClient);
    String datacenterId = "datacenterId_example"; // String | The unique ID of the data center.
    String lanId = "lanId_example"; // String | The unique ID of the LAN.
    LanProperties lan = new LanProperties(); // LanProperties | The properties of the LAN to be updated.
    Boolean pretty = true; // Boolean | Controls whether the response is pretty-printed (with indentations and new lines).
    Integer depth = 0; // Integer | Controls the detail depth of the response objects.  GET /datacenters/[ID]  - depth=0: Only direct properties are included; children (servers and other elements) are not included.  - depth=1: Direct properties and children references are included.  - depth=2: Direct properties and children properties are included.  - depth=3: Direct properties and children properties and children's children are included.  - depth=... and so on
    Integer xContractNumber = 56; // Integer | Users with multiple contracts must provide the contract number, for which all API requests are to be executed.
    try {
      ApiResponse<Lan> result = apiInstance.datacentersLansPatchWithHttpInfo(datacenterId, lanId, lan, pretty, depth, xContractNumber);
      System.out.println("Response: " + result.getData());
      System.out.println("Status Code: " + result.getStatusCode());
      System.out.println("Headers: " + result.getHeaders());
    } catch (ApiException e) {
      System.err.println("Exception when calling LansApi#datacentersLansPatch");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getResponseBody());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}
```

⚠️ **Note**: for the example above, you need to provide all parameters to the method call. Null values will resolve to the API defaults.

For convenience, you can alternatively use a builder, which allows to omit optional parameters:

```java
    try {
        Lan result = apiInstance.datacentersLansPatch(datacenterId, lanId, lan)
                .pretty(true)
                .depth(0)
                .xContractNumber(56)
                .execute();
        System.out.println(result);
    } catch (ApiException e) {
        System.err.println("Exception when calling LansApi#datacentersLansPatch");
        System.err.println("Status code: " + e.getCode());
        System.err.println("Reason: " + e.getResponseBody());
        System.err.println("Response headers: " + e.getResponseHeaders());
        e.printStackTrace();
    }
```

## **datacentersLansPost**

> LanPost datacentersLansPost(datacenterId, lan, pretty, depth, xContractNumber)

Create LANs

Creates a LAN within the data center.

#### Parameters

| Name                | Type                                                                                           | Description                                                                                                                                                                                                                                                                                                                                                                                                                              | Notes                          |
| ------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------ |
| **datacenterId**    | **String**                                                                                     | The unique ID of the data center.                                                                                                                                                                                                                                                                                                                                                                                                        |                                |
| **lan**             | [**LanPost**](https://docs.ionos.com/sections-test/java-sdk/cloud-api-java-sdk/models/lanpost) | The LAN to create.                                                                                                                                                                                                                                                                                                                                                                                                                       |                                |
| **pretty**          | **Boolean**                                                                                    | Controls whether the response is pretty-printed (with indentations and new lines).                                                                                                                                                                                                                                                                                                                                                       | \[optional] \[default to true] |
| **depth**           | **Integer**                                                                                    | Controls the detail depth of the response objects. GET /datacenters/\[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | \[optional] \[default to 0]    |
| **xContractNumber** | **Integer**                                                                                    | Users with multiple contracts must provide the contract number, for which all API requests are to be executed.                                                                                                                                                                                                                                                                                                                           | \[optional]                    |

#### Return type

[**LanPost**](https://docs.ionos.com/sections-test/java-sdk/cloud-api-java-sdk/models/lanpost)

#### HTTP request headers

* **Content-Type**: application/json
* **Accept**: application/json

⚠️ **Note**: the example bellow uses the datacentersLansPostWithHttpInfo which also returns the status code and the headers, if you don't need them you may use datacentersLansPost instead

#### Example

```java
// Import classes:
import com.ionoscloud.ApiClient;
import com.ionoscloud.ApiException;
import com.ionoscloud.ApiResponse;
import com.ionoscloud.Configuration;
import com.ionoscloud.auth.*;
import com.ionoscloud.model.*;
import com.ionoscloud.api.LansApi;

public class Example {
  public static void main(String[] args) {
    ApiClient defaultClient = Configuration.getDefaultApiClient();
    
    // Configure HTTP basic authorization: Basic Authentication
    HttpBasicAuth basicAuthentication = (HttpBasicAuth) defaultClient.getAuthentication("Basic Authentication");
    basicAuthentication.setUsername("YOUR USERNAME");
    basicAuthentication.setPassword("YOUR PASSWORD");

    // Configure Api Key authorization: Token Authentication
    defaultClient.setApiKeyWithBearerPrefix("YOUR TOKEN");

    LansApi apiInstance = new LansApi(defaultClient);
    String datacenterId = "datacenterId_example"; // String | The unique ID of the data center.
    properties = new LanPropertiesPost(); // LanPropertiesPost | 
    lan = new LanPost(LanPropertiesPost); // LanPost | The LAN to create.
    Boolean pretty = true; // Boolean | Controls whether the response is pretty-printed (with indentations and new lines).
    Integer depth = 0; // Integer | Controls the detail depth of the response objects.  GET /datacenters/[ID]  - depth=0: Only direct properties are included; children (servers and other elements) are not included.  - depth=1: Direct properties and children references are included.  - depth=2: Direct properties and children properties are included.  - depth=3: Direct properties and children properties and children's children are included.  - depth=... and so on
    Integer xContractNumber = 56; // Integer | Users with multiple contracts must provide the contract number, for which all API requests are to be executed.
    try {
      ApiResponse<LanPost> result = apiInstance.datacentersLansPostWithHttpInfo(datacenterId, lan, pretty, depth, xContractNumber);
      System.out.println("Response: " + result.getData());
      System.out.println("Status Code: " + result.getStatusCode());
      System.out.println("Headers: " + result.getHeaders());
    } catch (ApiException e) {
      System.err.println("Exception when calling LansApi#datacentersLansPost");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getResponseBody());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}
```

⚠️ **Note**: for the example above, you need to provide all parameters to the method call. Null values will resolve to the API defaults.

For convenience, you can alternatively use a builder, which allows to omit optional parameters:

```java
    try {
        LanPost result = apiInstance.datacentersLansPost(datacenterId, lan)
                .pretty(true)
                .depth(0)
                .xContractNumber(56)
                .execute();
        System.out.println(result);
    } catch (ApiException e) {
        System.err.println("Exception when calling LansApi#datacentersLansPost");
        System.err.println("Status code: " + e.getCode());
        System.err.println("Reason: " + e.getResponseBody());
        System.err.println("Response headers: " + e.getResponseHeaders());
        e.printStackTrace();
    }
```

## **datacentersLansPut**

> Lan datacentersLansPut(datacenterId, lanId, lan, pretty, depth, xContractNumber)

Modify LANs

Modify the properties of the specified LAN within the data center.

#### Parameters

| Name                | Type                                                                                   | Description                                                                                                                                                                                                                                                                                                                                                                                                                              | Notes                          |
| ------------------- | -------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------ |
| **datacenterId**    | **String**                                                                             | The unique ID of the data center.                                                                                                                                                                                                                                                                                                                                                                                                        |                                |
| **lanId**           | **String**                                                                             | The unique ID of the LAN.                                                                                                                                                                                                                                                                                                                                                                                                                |                                |
| **lan**             | [**Lan**](https://docs.ionos.com/sections-test/java-sdk/cloud-api-java-sdk/models/lan) | The modified LAN                                                                                                                                                                                                                                                                                                                                                                                                                         |                                |
| **pretty**          | **Boolean**                                                                            | Controls whether the response is pretty-printed (with indentations and new lines).                                                                                                                                                                                                                                                                                                                                                       | \[optional] \[default to true] |
| **depth**           | **Integer**                                                                            | Controls the detail depth of the response objects. GET /datacenters/\[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | \[optional] \[default to 0]    |
| **xContractNumber** | **Integer**                                                                            | Users with multiple contracts must provide the contract number, for which all API requests are to be executed.                                                                                                                                                                                                                                                                                                                           | \[optional]                    |

#### Return type

[**Lan**](https://docs.ionos.com/sections-test/java-sdk/cloud-api-java-sdk/models/lan)

#### HTTP request headers

* **Content-Type**: application/json
* **Accept**: application/json

⚠️ **Note**: the example bellow uses the datacentersLansPutWithHttpInfo which also returns the status code and the headers, if you don't need them you may use datacentersLansPut instead

#### Example

```java
// Import classes:
import com.ionoscloud.ApiClient;
import com.ionoscloud.ApiException;
import com.ionoscloud.ApiResponse;
import com.ionoscloud.Configuration;
import com.ionoscloud.auth.*;
import com.ionoscloud.model.*;
import com.ionoscloud.api.LansApi;

public class Example {
  public static void main(String[] args) {
    ApiClient defaultClient = Configuration.getDefaultApiClient();
    
    // Configure HTTP basic authorization: Basic Authentication
    HttpBasicAuth basicAuthentication = (HttpBasicAuth) defaultClient.getAuthentication("Basic Authentication");
    basicAuthentication.setUsername("YOUR USERNAME");
    basicAuthentication.setPassword("YOUR PASSWORD");

    // Configure Api Key authorization: Token Authentication
    defaultClient.setApiKeyWithBearerPrefix("YOUR TOKEN");

    LansApi apiInstance = new LansApi(defaultClient);
    String datacenterId = "datacenterId_example"; // String | The unique ID of the data center.
    String lanId = "lanId_example"; // String | The unique ID of the LAN.
    properties = new LanProperties(); // LanProperties | 
    lan = new Lan(LanProperties); // Lan | The modified LAN
    Boolean pretty = true; // Boolean | Controls whether the response is pretty-printed (with indentations and new lines).
    Integer depth = 0; // Integer | Controls the detail depth of the response objects.  GET /datacenters/[ID]  - depth=0: Only direct properties are included; children (servers and other elements) are not included.  - depth=1: Direct properties and children references are included.  - depth=2: Direct properties and children properties are included.  - depth=3: Direct properties and children properties and children's children are included.  - depth=... and so on
    Integer xContractNumber = 56; // Integer | Users with multiple contracts must provide the contract number, for which all API requests are to be executed.
    try {
      ApiResponse<Lan> result = apiInstance.datacentersLansPutWithHttpInfo(datacenterId, lanId, lan, pretty, depth, xContractNumber);
      System.out.println("Response: " + result.getData());
      System.out.println("Status Code: " + result.getStatusCode());
      System.out.println("Headers: " + result.getHeaders());
    } catch (ApiException e) {
      System.err.println("Exception when calling LansApi#datacentersLansPut");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getResponseBody());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}
```

⚠️ **Note**: for the example above, you need to provide all parameters to the method call. Null values will resolve to the API defaults.

For convenience, you can alternatively use a builder, which allows to omit optional parameters:

```java
    try {
        Lan result = apiInstance.datacentersLansPut(datacenterId, lanId, lan)
                .pretty(true)
                .depth(0)
                .xContractNumber(56)
                .execute();
        System.out.println(result);
    } catch (ApiException e) {
        System.err.println("Exception when calling LansApi#datacentersLansPut");
        System.err.println("Status code: " + e.getCode());
        System.err.println("Reason: " + e.getResponseBody());
        System.err.println("Response headers: " + e.getResponseHeaders());
        e.printStackTrace();
    }
```
