From 7caa42704e79aa408b3c98beddb2f9bacaab1262 Mon Sep 17 00:00:00 2001 From: Ryan Kes Date: Fri, 27 Dec 2024 11:35:31 +0100 Subject: [PATCH] chore: rename ips to ipMgmt --- {ips => ipmgmt}/.gitignore | 0 {ips => ipmgmt}/.openapi-generator-ignore | 0 {ips => ipmgmt}/.openapi-generator/FILES | 6 +- {ips => ipmgmt}/.openapi-generator/VERSION | 0 {ips => ipmgmt}/.travis.yml | 0 {ips => ipmgmt}/README.md | 44 +- {ips => ipmgmt}/api/openapi.yaml | 24 +- ips/api_ips.go => ipmgmt/api_ipmgmt.go | 708 +++++++++--------- {ips => ipmgmt}/client.go | 6 +- {ips => ipmgmt}/configuration.go | 2 +- {ips => ipmgmt}/docs/AssignedContract.md | 0 {ips => ipmgmt}/docs/ErrorResult.md | 0 {ips => ipmgmt}/docs/GetIPListResult.md | 0 .../docs/GetNullRouteHistoryListResult.md | 0 .../docs/GetReverseLookupRecordListResult.md | 0 {ips => ipmgmt}/docs/Ip.md | 0 {ips => ipmgmt}/docs/IpType.md | 0 .../IpsAPI.md => ipmgmt/docs/IpmgmtAPI.md | 282 +++---- {ips => ipmgmt}/docs/Metadata.md | 0 {ips => ipmgmt}/docs/NullRouteIPOpts.md | 0 {ips => ipmgmt}/docs/NullRoutedIP.md | 0 {ips => ipmgmt}/docs/ProtocolVersion.md | 0 {ips => ipmgmt}/docs/ReverseLookup.md | 0 {ips => ipmgmt}/docs/Subnet.md | 0 {ips => ipmgmt}/docs/UpdateIPOpts.md | 0 {ips => ipmgmt}/docs/UpdateNullRouteOpts.md | 0 .../docs/UpdateReverseLookupRecordsOpts.md | 0 .../docs/UpdateReverseLookupRecordsResult.md | 0 {ips => ipmgmt}/git_push.sh | 0 ipmgmt/go.mod | 6 + {ips => ipmgmt}/go.sum | 0 {ips => ipmgmt}/model__metadata.go | 2 +- {ips => ipmgmt}/model_assigned_contract.go | 2 +- {ips => ipmgmt}/model_error_result.go | 2 +- {ips => ipmgmt}/model_get_ip_list_result.go | 2 +- ...odel_get_null_route_history_list_result.go | 2 +- ...l_get_reverse_lookup_record_list_result.go | 2 +- {ips => ipmgmt}/model_ip.go | 2 +- {ips => ipmgmt}/model_ip_type.go | 2 +- {ips => ipmgmt}/model_null_route_ip_opts.go | 2 +- {ips => ipmgmt}/model_null_routed_ip.go | 2 +- {ips => ipmgmt}/model_protocol_version.go | 2 +- {ips => ipmgmt}/model_reverse_lookup.go | 2 +- {ips => ipmgmt}/model_subnet.go | 2 +- {ips => ipmgmt}/model_update_ip_opts.go | 2 +- .../model_update_null_route_opts.go | 2 +- ...odel_update_reverse_lookup_records_opts.go | 2 +- ...el_update_reverse_lookup_records_result.go | 2 +- {ips => ipmgmt}/response.go | 2 +- .../test/api_ipmgmt_test.go | 56 +- {ips => ipmgmt}/utils.go | 2 +- ips/go.mod | 6 - main.go | 2 +- 53 files changed, 591 insertions(+), 589 deletions(-) rename {ips => ipmgmt}/.gitignore (100%) rename {ips => ipmgmt}/.openapi-generator-ignore (100%) rename {ips => ipmgmt}/.openapi-generator/FILES (92%) rename {ips => ipmgmt}/.openapi-generator/VERSION (100%) rename {ips => ipmgmt}/.travis.yml (100%) rename {ips => ipmgmt}/README.md (63%) rename {ips => ipmgmt}/api/openapi.yaml (99%) rename ips/api_ips.go => ipmgmt/api_ipmgmt.go (94%) rename {ips => ipmgmt}/client.go (99%) rename {ips => ipmgmt}/configuration.go (99%) rename {ips => ipmgmt}/docs/AssignedContract.md (100%) rename {ips => ipmgmt}/docs/ErrorResult.md (100%) rename {ips => ipmgmt}/docs/GetIPListResult.md (100%) rename {ips => ipmgmt}/docs/GetNullRouteHistoryListResult.md (100%) rename {ips => ipmgmt}/docs/GetReverseLookupRecordListResult.md (100%) rename {ips => ipmgmt}/docs/Ip.md (100%) rename {ips => ipmgmt}/docs/IpType.md (100%) rename ips/docs/IpsAPI.md => ipmgmt/docs/IpmgmtAPI.md (81%) rename {ips => ipmgmt}/docs/Metadata.md (100%) rename {ips => ipmgmt}/docs/NullRouteIPOpts.md (100%) rename {ips => ipmgmt}/docs/NullRoutedIP.md (100%) rename {ips => ipmgmt}/docs/ProtocolVersion.md (100%) rename {ips => ipmgmt}/docs/ReverseLookup.md (100%) rename {ips => ipmgmt}/docs/Subnet.md (100%) rename {ips => ipmgmt}/docs/UpdateIPOpts.md (100%) rename {ips => ipmgmt}/docs/UpdateNullRouteOpts.md (100%) rename {ips => ipmgmt}/docs/UpdateReverseLookupRecordsOpts.md (100%) rename {ips => ipmgmt}/docs/UpdateReverseLookupRecordsResult.md (100%) rename {ips => ipmgmt}/git_push.sh (100%) create mode 100644 ipmgmt/go.mod rename {ips => ipmgmt}/go.sum (100%) rename {ips => ipmgmt}/model__metadata.go (99%) rename {ips => ipmgmt}/model_assigned_contract.go (99%) rename {ips => ipmgmt}/model_error_result.go (99%) rename {ips => ipmgmt}/model_get_ip_list_result.go (99%) rename {ips => ipmgmt}/model_get_null_route_history_list_result.go (99%) rename {ips => ipmgmt}/model_get_reverse_lookup_record_list_result.go (99%) rename {ips => ipmgmt}/model_ip.go (99%) rename {ips => ipmgmt}/model_ip_type.go (99%) rename {ips => ipmgmt}/model_null_route_ip_opts.go (99%) rename {ips => ipmgmt}/model_null_routed_ip.go (99%) rename {ips => ipmgmt}/model_protocol_version.go (99%) rename {ips => ipmgmt}/model_reverse_lookup.go (99%) rename {ips => ipmgmt}/model_subnet.go (99%) rename {ips => ipmgmt}/model_update_ip_opts.go (99%) rename {ips => ipmgmt}/model_update_null_route_opts.go (99%) rename {ips => ipmgmt}/model_update_reverse_lookup_records_opts.go (99%) rename {ips => ipmgmt}/model_update_reverse_lookup_records_result.go (99%) rename {ips => ipmgmt}/response.go (98%) rename ips/test/api_ips_test.go => ipmgmt/test/api_ipmgmt_test.go (52%) rename {ips => ipmgmt}/utils.go (99%) delete mode 100644 ips/go.mod diff --git a/ips/.gitignore b/ipmgmt/.gitignore similarity index 100% rename from ips/.gitignore rename to ipmgmt/.gitignore diff --git a/ips/.openapi-generator-ignore b/ipmgmt/.openapi-generator-ignore similarity index 100% rename from ips/.openapi-generator-ignore rename to ipmgmt/.openapi-generator-ignore diff --git a/ips/.openapi-generator/FILES b/ipmgmt/.openapi-generator/FILES similarity index 92% rename from ips/.openapi-generator/FILES rename to ipmgmt/.openapi-generator/FILES index a326d95..6d55d66 100644 --- a/ips/.openapi-generator/FILES +++ b/ipmgmt/.openapi-generator/FILES @@ -1,8 +1,9 @@ .gitignore +.openapi-generator-ignore .travis.yml README.md api/openapi.yaml -api_ips.go +api_ipmgmt.go client.go configuration.go docs/AssignedContract.md @@ -12,7 +13,7 @@ docs/GetNullRouteHistoryListResult.md docs/GetReverseLookupRecordListResult.md docs/Ip.md docs/IpType.md -docs/IpsAPI.md +docs/IpmgmtAPI.md docs/Metadata.md docs/NullRouteIPOpts.md docs/NullRoutedIP.md @@ -44,4 +45,5 @@ model_update_null_route_opts.go model_update_reverse_lookup_records_opts.go model_update_reverse_lookup_records_result.go response.go +test/api_ipmgmt_test.go utils.go diff --git a/ips/.openapi-generator/VERSION b/ipmgmt/.openapi-generator/VERSION similarity index 100% rename from ips/.openapi-generator/VERSION rename to ipmgmt/.openapi-generator/VERSION diff --git a/ips/.travis.yml b/ipmgmt/.travis.yml similarity index 100% rename from ips/.travis.yml rename to ipmgmt/.travis.yml diff --git a/ips/README.md b/ipmgmt/README.md similarity index 63% rename from ips/README.md rename to ipmgmt/README.md index c16d653..1200662 100644 --- a/ips/README.md +++ b/ipmgmt/README.md @@ -1,4 +1,4 @@ -# Go API client for ips +# Go API client for ipmgmt > The base URL for this API is: **https://api.leaseweb.com/ipMgmt/v2/_** @@ -22,7 +22,7 @@ go get golang.org/x/net/context Put the package under your project folder and add the following in import: ```go -import ips "github.com/leaseweb/leaseweb-go-sdk/ips" +import ipmgmt "github.com/leaseweb/leaseweb-go-sdk/ipmgmt" ``` To use a proxy, set the environment variable `HTTP_PROXY`: @@ -37,18 +37,18 @@ Default configuration comes with `Servers` field that contains server objects as ### Select Server Configuration -For using other server than the one defined on index 0 set context value `ips.ContextServerIndex` of type `int`. +For using other server than the one defined on index 0 set context value `ipmgmt.ContextServerIndex` of type `int`. ```go -ctx := context.WithValue(context.Background(), ips.ContextServerIndex, 1) +ctx := context.WithValue(context.Background(), ipmgmt.ContextServerIndex, 1) ``` ### Templated Server URL -Templated server URL is formatted using default variables from configuration or from context value `ips.ContextServerVariables` of type `map[string]string`. +Templated server URL is formatted using default variables from configuration or from context value `ipmgmt.ContextServerVariables` of type `map[string]string`. ```go -ctx := context.WithValue(context.Background(), ips.ContextServerVariables, map[string]string{ +ctx := context.WithValue(context.Background(), ipmgmt.ContextServerVariables, map[string]string{ "basePath": "v2", }) ``` @@ -59,13 +59,13 @@ Note, enum values are always validated and all unused variables are silently ign Each operation can use different server URL defined using `OperationServers` map in the `Configuration`. An operation is uniquely identified by `"{classname}Service.{nickname}"` string. -Similar rules for overriding default operation server index and variables applies by using `ips.ContextOperationServerIndices` and `ips.ContextOperationServerVariables` context maps. +Similar rules for overriding default operation server index and variables applies by using `ipmgmt.ContextOperationServerIndices` and `ipmgmt.ContextOperationServerVariables` context maps. ```go -ctx := context.WithValue(context.Background(), ips.ContextOperationServerIndices, map[string]int{ +ctx := context.WithValue(context.Background(), ipmgmt.ContextOperationServerIndices, map[string]int{ "{classname}Service.{nickname}": 2, }) -ctx = context.WithValue(context.Background(), ips.ContextOperationServerVariables, map[string]map[string]string{ +ctx = context.WithValue(context.Background(), ipmgmt.ContextOperationServerVariables, map[string]map[string]string{ "{classname}Service.{nickname}": { "port": "8443", }, @@ -78,16 +78,16 @@ All URIs are relative to *https://api.leaseweb.com/ipMgmt/v2* Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- -*IpsAPI* | [**GetIP**](docs/IpsAPI.md#getip) | **Get** /ips/{ip} | Inspect an IP -*IpsAPI* | [**GetIPList**](docs/IpsAPI.md#getiplist) | **Get** /ips | List IPs -*IpsAPI* | [**GetNullRouteHistory**](docs/IpsAPI.md#getnullroutehistory) | **Get** /nullRoutes/{id} | Inspect null route history -*IpsAPI* | [**GetNullRouteHistoryList**](docs/IpsAPI.md#getnullroutehistorylist) | **Get** /nullRoutes | Inspect null route history -*IpsAPI* | [**GetReverseLookupRecordList**](docs/IpsAPI.md#getreverselookuprecordlist) | **Get** /ips/{ip}/reverseLookup | List reverse lookup records for an IPv6 range -*IpsAPI* | [**NullRouteIP**](docs/IpsAPI.md#nullrouteip) | **Post** /ips/{ip}/nullRoute | Null route an IP -*IpsAPI* | [**RemoveIPNullRoute**](docs/IpsAPI.md#removeipnullroute) | **Delete** /ips/{ip}/nullRoute | Remove a null route -*IpsAPI* | [**UpdateIP**](docs/IpsAPI.md#updateip) | **Put** /ips/{ip} | Update an IP -*IpsAPI* | [**UpdateNullRoute**](docs/IpsAPI.md#updatenullroute) | **Put** /nullRoutes/{id} | Update a null route -*IpsAPI* | [**UpdateReverseLookupRecords**](docs/IpsAPI.md#updatereverselookuprecords) | **Put** /ips/{ip}/reverseLookup | Set or remove reverse lookup records for an IPv6 range +*IpmgmtAPI* | [**GetIPList**](docs/IpmgmtAPI.md#getiplist) | **Get** /ips | List IPs +*IpmgmtAPI* | [**GetNullRouteHistoryList**](docs/IpmgmtAPI.md#getnullroutehistorylist) | **Get** /nullRoutes | Inspect null route history +*IpmgmtAPI* | [**GetReverseLookupRecordList**](docs/IpmgmtAPI.md#getreverselookuprecordlist) | **Get** /ips/{ip}/reverseLookup | List reverse lookup records for an IPv6 range +*IpmgmtAPI* | [**InspectIP**](docs/IpmgmtAPI.md#inspectip) | **Get** /ips/{ip} | Inspect an IP +*IpmgmtAPI* | [**InspectNullRouteHistory**](docs/IpmgmtAPI.md#inspectnullroutehistory) | **Get** /nullRoutes/{id} | Inspect null route history +*IpmgmtAPI* | [**NullRouteIP**](docs/IpmgmtAPI.md#nullrouteip) | **Post** /ips/{ip}/nullRoute | Null route an IP +*IpmgmtAPI* | [**RemoveIPNullRoute**](docs/IpmgmtAPI.md#removeipnullroute) | **Delete** /ips/{ip}/nullRoute | Remove a null route +*IpmgmtAPI* | [**UpdateIP**](docs/IpmgmtAPI.md#updateip) | **Put** /ips/{ip} | Update an IP +*IpmgmtAPI* | [**UpdateNullRoute**](docs/IpmgmtAPI.md#updatenullroute) | **Put** /nullRoutes/{id} | Update a null route +*IpmgmtAPI* | [**UpdateReverseLookupRecords**](docs/IpmgmtAPI.md#updatereverselookuprecords) | **Put** /ips/{ip}/reverseLookup | Set or remove reverse lookup records for an IPv6 range ## Documentation For Models @@ -122,7 +122,7 @@ Authentication schemes defined for the API: Example ```go -auth := context.WithValue(context.Background(), ips.ContextAccessToken, "BEARER_TOKEN_STRING") +auth := context.WithValue(context.Background(), ipmgmt.ContextAccessToken, "BEARER_TOKEN_STRING") r, err := client.Service.Operation(auth, args) ``` @@ -139,8 +139,8 @@ Example ```go auth := context.WithValue( context.Background(), - ips.ContextAPIKeys, - map[string]ips.APIKey{ + ipmgmt.ContextAPIKeys, + map[string]ipmgmt.APIKey{ "X-LSW-Auth": {Key: "API_KEY_STRING"}, }, ) diff --git a/ips/api/openapi.yaml b/ipmgmt/api/openapi.yaml similarity index 99% rename from ips/api/openapi.yaml rename to ipmgmt/api/openapi.yaml index 27cb6f6..b6c3ff0 100644 --- a/ips/api/openapi.yaml +++ b/ipmgmt/api/openapi.yaml @@ -251,10 +251,10 @@ paths: description: Service Unavailable. summary: List IPs tags: - - ips + - ipmgmt /ips/{ip}: get: - operationId: getIP + operationId: inspectIP parameters: - description: "IP address or IP address with prefixLength {ip}_{prefix}. If\ \ prefixLength is not given, then we assume 32 (for IPv4) or 128 (for IPv6).\ @@ -335,7 +335,7 @@ paths: description: Service Unavailable. summary: Inspect an IP tags: - - ips + - ipmgmt put: description: Use this operation to set reverse lookup for IPv4 IP addresses. operationId: updateIP @@ -424,7 +424,7 @@ paths: description: Service Unavailable. summary: Update an IP tags: - - ips + - ipmgmt /ips/{ip}/reverseLookup: get: description: Get reverse lookup values set for IPs in the specified range @@ -528,7 +528,7 @@ paths: description: Service Unavailable. summary: List reverse lookup records for an IPv6 range tags: - - ips + - ipmgmt put: description: | This endpoint allows to set or unset reverse lookup for multiple IPv6 IPs in a specific IP range. To remove reverse lookup for an IP address set it to `null` or `""`. @@ -625,7 +625,7 @@ paths: description: Service Unavailable. summary: Set or remove reverse lookup records for an IPv6 range tags: - - ips + - ipmgmt /ips/{ip}/nullRoute: delete: operationId: removeIPNullRoute @@ -688,7 +688,7 @@ paths: description: Service Unavailable. summary: Remove a null route tags: - - ips + - ipmgmt post: operationId: nullRouteIP parameters: @@ -777,7 +777,7 @@ paths: description: Service Unavailable. summary: Null route an IP tags: - - ips + - ipmgmt /nullRoutes: get: operationId: getNullRouteHistoryList @@ -970,10 +970,10 @@ paths: description: Service Unavailable. summary: Inspect null route history tags: - - ips + - ipmgmt /nullRoutes/{id}: get: - operationId: getNullRouteHistory + operationId: inspectNullRouteHistory parameters: - description: Null route ID explode: false @@ -1047,7 +1047,7 @@ paths: description: Service Unavailable. summary: Inspect null route history tags: - - ips + - ipmgmt put: operationId: updateNullRoute parameters: @@ -1132,7 +1132,7 @@ paths: description: Service Unavailable. summary: Update a null route tags: - - ips + - ipmgmt components: parameters: limit: diff --git a/ips/api_ips.go b/ipmgmt/api_ipmgmt.go similarity index 94% rename from ips/api_ips.go rename to ipmgmt/api_ipmgmt.go index 0f50610..7197b90 100644 --- a/ips/api_ips.go +++ b/ipmgmt/api_ipmgmt.go @@ -8,7 +8,7 @@ API version: v2 // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. -package ips +package ipmgmt import ( "bytes" @@ -20,20 +20,7 @@ import ( ) -type IpsAPI interface { - - /* - GetIP Inspect an IP - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param ip IP address or IP address with prefixLength {ip}_{prefix}. If prefixLength is not given, then we assume 32 (for IPv4) or 128 (for IPv6). PrefixLength is mandatory for IP range, for example, the IPv6 address range with prefixLength = 112 - @return ApiGetIPRequest - */ - GetIP(ctx context.Context, ip string) ApiGetIPRequest - - // GetIPExecute executes the request - // @return Ip - GetIPExecute(r ApiGetIPRequest) (*Ip, *http.Response, error) +type IpmgmtAPI interface { /* GetIPList List IPs @@ -47,19 +34,6 @@ type IpsAPI interface { // @return GetIPListResult GetIPListExecute(r ApiGetIPListRequest) (*GetIPListResult, *http.Response, error) - /* - GetNullRouteHistory Inspect null route history - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id Null route ID - @return ApiGetNullRouteHistoryRequest - */ - GetNullRouteHistory(ctx context.Context, id string) ApiGetNullRouteHistoryRequest - - // GetNullRouteHistoryExecute executes the request - // @return NullRoutedIP - GetNullRouteHistoryExecute(r ApiGetNullRouteHistoryRequest) (*NullRoutedIP, *http.Response, error) - /* GetNullRouteHistoryList Inspect null route history @@ -87,6 +61,32 @@ type IpsAPI interface { // @return GetReverseLookupRecordListResult GetReverseLookupRecordListExecute(r ApiGetReverseLookupRecordListRequest) (*GetReverseLookupRecordListResult, *http.Response, error) + /* + InspectIP Inspect an IP + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ip IP address or IP address with prefixLength {ip}_{prefix}. If prefixLength is not given, then we assume 32 (for IPv4) or 128 (for IPv6). PrefixLength is mandatory for IP range, for example, the IPv6 address range with prefixLength = 112 + @return ApiInspectIPRequest + */ + InspectIP(ctx context.Context, ip string) ApiInspectIPRequest + + // InspectIPExecute executes the request + // @return Ip + InspectIPExecute(r ApiInspectIPRequest) (*Ip, *http.Response, error) + + /* + InspectNullRouteHistory Inspect null route history + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id Null route ID + @return ApiInspectNullRouteHistoryRequest + */ + InspectNullRouteHistory(ctx context.Context, id string) ApiInspectNullRouteHistoryRequest + + // InspectNullRouteHistoryExecute executes the request + // @return NullRoutedIP + InspectNullRouteHistoryExecute(r ApiInspectNullRouteHistoryRequest) (*NullRoutedIP, *http.Response, error) + /* NullRouteIP Null route an IP @@ -159,56 +159,192 @@ You can set up to 20 records in a single request. UpdateReverseLookupRecordsExecute(r ApiUpdateReverseLookupRecordsRequest) (*UpdateReverseLookupRecordsResult, *http.Response, error) } -// IpsAPIService IpsAPI service -type IpsAPIService service +// IpmgmtAPIService IpmgmtAPI service +type IpmgmtAPIService service -type ApiGetIPRequest struct { +type ApiGetIPListRequest struct { ctx context.Context - ApiService IpsAPI - ip string + ApiService IpmgmtAPI + limit *int32 + offset *int32 + subnetId *string + version *ProtocolVersion + type_ *IpType + nullRouted *bool + primary *bool + fromIp *string + toIp *string + ips *string + equipmentIds *string + assignedContractIds *string + sort *string + reverseLookup *string +} + +// Limit the number of results returned. +func (r ApiGetIPListRequest) Limit(limit int32) ApiGetIPListRequest { + r.limit = &limit + return r +} + +// Return results starting from the given offset. +func (r ApiGetIPListRequest) Offset(offset int32) ApiGetIPListRequest { + r.offset = &offset + return r +} + +// Filter by subnet +func (r ApiGetIPListRequest) SubnetId(subnetId string) ApiGetIPListRequest { + r.subnetId = &subnetId + return r +} + +// Filter by protocol version +func (r ApiGetIPListRequest) Version(version ProtocolVersion) ApiGetIPListRequest { + r.version = &version + return r +} + +// Filter by IP type +func (r ApiGetIPListRequest) Type_(type_ IpType) ApiGetIPListRequest { + r.type_ = &type_ + return r +} + +// Filter by whether or not the IP has an active null route (true or false) +func (r ApiGetIPListRequest) NullRouted(nullRouted bool) ApiGetIPListRequest { + r.nullRouted = &nullRouted + return r +} + +// Filter by whether or not the IP is primary (true or false) +func (r ApiGetIPListRequest) Primary(primary bool) ApiGetIPListRequest { + r.primary = &primary + return r +} + +// Return only IPs greater or equal to the specified address +func (r ApiGetIPListRequest) FromIp(fromIp string) ApiGetIPListRequest { + r.fromIp = &fromIp + return r +} + +// Return only IPs lower or equal to the specified address +func (r ApiGetIPListRequest) ToIp(toIp string) ApiGetIPListRequest { + r.toIp = &toIp + return r +} + +// Return only IPs specified as a comma-separated list +func (r ApiGetIPListRequest) Ips(ips string) ApiGetIPListRequest { + r.ips = &ips + return r +} + +// Return only IPs assigned to equipment items specified as a comma-separated list of IDs +func (r ApiGetIPListRequest) EquipmentIds(equipmentIds string) ApiGetIPListRequest { + r.equipmentIds = &equipmentIds + return r +} + +// Return only IPs assigned to contracts specified as a comma-separated list of IDs +func (r ApiGetIPListRequest) AssignedContractIds(assignedContractIds string) ApiGetIPListRequest { + r.assignedContractIds = &assignedContractIds + return r } -func (r ApiGetIPRequest) Execute() (*Ip, *http.Response, error) { - return r.ApiService.GetIPExecute(r) +// Comma-separated list of sort field names. Prepend the field name with '-' for descending order. E.g. `sort=ip,-nullrouted`. Sortable field names are ip, nullRouted, reverseLookup. +func (r ApiGetIPListRequest) Sort(sort string) ApiGetIPListRequest { + r.sort = &sort + return r +} + +// Filter by reverse lookup. +func (r ApiGetIPListRequest) ReverseLookup(reverseLookup string) ApiGetIPListRequest { + r.reverseLookup = &reverseLookup + return r +} + +func (r ApiGetIPListRequest) Execute() (*GetIPListResult, *http.Response, error) { + return r.ApiService.GetIPListExecute(r) } /* -GetIP Inspect an IP +GetIPList List IPs @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param ip IP address or IP address with prefixLength {ip}_{prefix}. If prefixLength is not given, then we assume 32 (for IPv4) or 128 (for IPv6). PrefixLength is mandatory for IP range, for example, the IPv6 address range with prefixLength = 112 - @return ApiGetIPRequest + @return ApiGetIPListRequest */ -func (a *IpsAPIService) GetIP(ctx context.Context, ip string) ApiGetIPRequest { - return ApiGetIPRequest{ +func (a *IpmgmtAPIService) GetIPList(ctx context.Context) ApiGetIPListRequest { + return ApiGetIPListRequest{ ApiService: a, ctx: ctx, - ip: ip, } } // Execute executes the request -// @return Ip -func (a *IpsAPIService) GetIPExecute(r ApiGetIPRequest) (*Ip, *http.Response, error) { +// @return GetIPListResult +func (a *IpmgmtAPIService) GetIPListExecute(r ApiGetIPListRequest) (*GetIPListResult, *http.Response, error) { var ( localVarHTTPMethod = http.MethodGet localVarPostBody interface{} formFiles []formFile - localVarReturnValue *Ip + localVarReturnValue *GetIPListResult ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "IpsAPIService.GetIP") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "IpmgmtAPIService.GetIPList") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/ips/{ip}" - localVarPath = strings.Replace(localVarPath, "{"+"ip"+"}", url.PathEscape(parameterValueToString(r.ip, "ip")), -1) + localVarPath := localBasePath + "/ips" localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} localVarFormParams := url.Values{} + if r.limit != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "form", "") + } + if r.offset != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "offset", r.offset, "form", "") + } + if r.subnetId != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "subnetId", r.subnetId, "form", "") + } + if r.version != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "version", r.version, "form", "") + } + if r.type_ != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "type", r.type_, "form", "") + } + if r.nullRouted != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "nullRouted", r.nullRouted, "form", "") + } + if r.primary != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "primary", r.primary, "form", "") + } + if r.fromIp != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "fromIp", r.fromIp, "form", "") + } + if r.toIp != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "toIp", r.toIp, "form", "") + } + if r.ips != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "ips", r.ips, "form", "") + } + if r.equipmentIds != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "equipmentIds", r.equipmentIds, "form", "") + } + if r.assignedContractIds != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "assignedContractIds", r.assignedContractIds, "form", "") + } + if r.sort != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "sort", r.sort, "form", "") + } + if r.reverseLookup != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "reverseLookup", r.reverseLookup, "form", "") + } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -320,142 +456,128 @@ func (a *IpsAPIService) GetIPExecute(r ApiGetIPRequest) (*Ip, *http.Response, er return localVarReturnValue, localVarHTTPResponse, nil } -type ApiGetIPListRequest struct { +type ApiGetNullRouteHistoryListRequest struct { ctx context.Context - ApiService IpsAPI + ApiService IpmgmtAPI limit *int32 offset *int32 - subnetId *string - version *ProtocolVersion - type_ *IpType - nullRouted *bool - primary *bool fromIp *string toIp *string - ips *string - equipmentIds *string - assignedContractIds *string + fromDate *string + toDate *string + nulledBy *string + unnulledBy *string + ticketId *string + contractId *string + equipmentId *string sort *string - reverseLookup *string } // Limit the number of results returned. -func (r ApiGetIPListRequest) Limit(limit int32) ApiGetIPListRequest { +func (r ApiGetNullRouteHistoryListRequest) Limit(limit int32) ApiGetNullRouteHistoryListRequest { r.limit = &limit return r } // Return results starting from the given offset. -func (r ApiGetIPListRequest) Offset(offset int32) ApiGetIPListRequest { +func (r ApiGetNullRouteHistoryListRequest) Offset(offset int32) ApiGetNullRouteHistoryListRequest { r.offset = &offset return r } -// Filter by subnet -func (r ApiGetIPListRequest) SubnetId(subnetId string) ApiGetIPListRequest { - r.subnetId = &subnetId - return r -} - -// Filter by protocol version -func (r ApiGetIPListRequest) Version(version ProtocolVersion) ApiGetIPListRequest { - r.version = &version +// Return only IPs greater or equal to the specified address +func (r ApiGetNullRouteHistoryListRequest) FromIp(fromIp string) ApiGetNullRouteHistoryListRequest { + r.fromIp = &fromIp return r } -// Filter by IP type -func (r ApiGetIPListRequest) Type_(type_ IpType) ApiGetIPListRequest { - r.type_ = &type_ +// Return only IPs lower or equal to the specified address +func (r ApiGetNullRouteHistoryListRequest) ToIp(toIp string) ApiGetNullRouteHistoryListRequest { + r.toIp = &toIp return r } -// Filter by whether or not the IP has an active null route (true or false) -func (r ApiGetIPListRequest) NullRouted(nullRouted bool) ApiGetIPListRequest { - r.nullRouted = &nullRouted +// Return only null routes active after the specified date and time +func (r ApiGetNullRouteHistoryListRequest) FromDate(fromDate string) ApiGetNullRouteHistoryListRequest { + r.fromDate = &fromDate return r } -// Filter by whether or not the IP is primary (true or false) -func (r ApiGetIPListRequest) Primary(primary bool) ApiGetIPListRequest { - r.primary = &primary +// Return only null routes active before the specified date and time +func (r ApiGetNullRouteHistoryListRequest) ToDate(toDate string) ApiGetNullRouteHistoryListRequest { + r.toDate = &toDate return r } -// Return only IPs greater or equal to the specified address -func (r ApiGetIPListRequest) FromIp(fromIp string) ApiGetIPListRequest { - r.fromIp = &fromIp +// Filter by the email address of the user who created the null route +func (r ApiGetNullRouteHistoryListRequest) NulledBy(nulledBy string) ApiGetNullRouteHistoryListRequest { + r.nulledBy = &nulledBy return r } -// Return only IPs lower or equal to the specified address -func (r ApiGetIPListRequest) ToIp(toIp string) ApiGetIPListRequest { - r.toIp = &toIp +// Filter by the email address of the user who removed the null route +func (r ApiGetNullRouteHistoryListRequest) UnnulledBy(unnulledBy string) ApiGetNullRouteHistoryListRequest { + r.unnulledBy = &unnulledBy return r } -// Return only IPs specified as a comma-separated list -func (r ApiGetIPListRequest) Ips(ips string) ApiGetIPListRequest { - r.ips = &ips +// Filter by the reference stored with the null route +func (r ApiGetNullRouteHistoryListRequest) TicketId(ticketId string) ApiGetNullRouteHistoryListRequest { + r.ticketId = &ticketId return r } -// Return only IPs assigned to equipment items specified as a comma-separated list of IDs -func (r ApiGetIPListRequest) EquipmentIds(equipmentIds string) ApiGetIPListRequest { - r.equipmentIds = &equipmentIds +// Filter by ID of the contract assigned to the IP at the time of null route creation +func (r ApiGetNullRouteHistoryListRequest) ContractId(contractId string) ApiGetNullRouteHistoryListRequest { + r.contractId = &contractId return r } -// Return only IPs assigned to contracts specified as a comma-separated list of IDs -func (r ApiGetIPListRequest) AssignedContractIds(assignedContractIds string) ApiGetIPListRequest { - r.assignedContractIds = &assignedContractIds +// Filter by ID of the server assigned to the IP at the time of null route creation +func (r ApiGetNullRouteHistoryListRequest) EquipmentId(equipmentId string) ApiGetNullRouteHistoryListRequest { + r.equipmentId = &equipmentId return r } // Comma-separated list of sort field names. Prepend the field name with '-' for descending order. E.g. `sort=ip,-nullrouted`. Sortable field names are ip, nullRouted, reverseLookup. -func (r ApiGetIPListRequest) Sort(sort string) ApiGetIPListRequest { +func (r ApiGetNullRouteHistoryListRequest) Sort(sort string) ApiGetNullRouteHistoryListRequest { r.sort = &sort return r } -// Filter by reverse lookup. -func (r ApiGetIPListRequest) ReverseLookup(reverseLookup string) ApiGetIPListRequest { - r.reverseLookup = &reverseLookup - return r -} - -func (r ApiGetIPListRequest) Execute() (*GetIPListResult, *http.Response, error) { - return r.ApiService.GetIPListExecute(r) +func (r ApiGetNullRouteHistoryListRequest) Execute() (*GetNullRouteHistoryListResult, *http.Response, error) { + return r.ApiService.GetNullRouteHistoryListExecute(r) } /* -GetIPList List IPs +GetNullRouteHistoryList Inspect null route history @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiGetIPListRequest + @return ApiGetNullRouteHistoryListRequest */ -func (a *IpsAPIService) GetIPList(ctx context.Context) ApiGetIPListRequest { - return ApiGetIPListRequest{ +func (a *IpmgmtAPIService) GetNullRouteHistoryList(ctx context.Context) ApiGetNullRouteHistoryListRequest { + return ApiGetNullRouteHistoryListRequest{ ApiService: a, ctx: ctx, } } // Execute executes the request -// @return GetIPListResult -func (a *IpsAPIService) GetIPListExecute(r ApiGetIPListRequest) (*GetIPListResult, *http.Response, error) { +// @return GetNullRouteHistoryListResult +func (a *IpmgmtAPIService) GetNullRouteHistoryListExecute(r ApiGetNullRouteHistoryListRequest) (*GetNullRouteHistoryListResult, *http.Response, error) { var ( localVarHTTPMethod = http.MethodGet localVarPostBody interface{} formFiles []formFile - localVarReturnValue *GetIPListResult + localVarReturnValue *GetNullRouteHistoryListResult ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "IpsAPIService.GetIPList") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "IpmgmtAPIService.GetNullRouteHistoryList") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/ips" + localVarPath := localBasePath + "/nullRoutes" localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -467,42 +589,36 @@ func (a *IpsAPIService) GetIPListExecute(r ApiGetIPListRequest) (*GetIPListResul if r.offset != nil { parameterAddToHeaderOrQuery(localVarQueryParams, "offset", r.offset, "form", "") } - if r.subnetId != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "subnetId", r.subnetId, "form", "") - } - if r.version != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "version", r.version, "form", "") - } - if r.type_ != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "type", r.type_, "form", "") - } - if r.nullRouted != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "nullRouted", r.nullRouted, "form", "") - } - if r.primary != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "primary", r.primary, "form", "") - } if r.fromIp != nil { parameterAddToHeaderOrQuery(localVarQueryParams, "fromIp", r.fromIp, "form", "") } if r.toIp != nil { parameterAddToHeaderOrQuery(localVarQueryParams, "toIp", r.toIp, "form", "") } - if r.ips != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "ips", r.ips, "form", "") + if r.fromDate != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "fromDate", r.fromDate, "form", "") + } + if r.toDate != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "toDate", r.toDate, "form", "") + } + if r.nulledBy != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "nulledBy", r.nulledBy, "form", "") + } + if r.unnulledBy != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "unnulledBy", r.unnulledBy, "form", "") + } + if r.ticketId != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "ticketId", r.ticketId, "form", "") } - if r.equipmentIds != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "equipmentIds", r.equipmentIds, "form", "") + if r.contractId != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "contractId", r.contractId, "form", "") } - if r.assignedContractIds != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "assignedContractIds", r.assignedContractIds, "form", "") + if r.equipmentId != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "equipmentId", r.equipmentId, "form", "") } if r.sort != nil { parameterAddToHeaderOrQuery(localVarQueryParams, "sort", r.sort, "form", "") } - if r.reverseLookup != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "reverseLookup", r.reverseLookup, "form", "") - } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -614,53 +730,85 @@ func (a *IpsAPIService) GetIPListExecute(r ApiGetIPListRequest) (*GetIPListResul return localVarReturnValue, localVarHTTPResponse, nil } -type ApiGetNullRouteHistoryRequest struct { +type ApiGetReverseLookupRecordListRequest struct { ctx context.Context - ApiService IpsAPI - id string + ApiService IpmgmtAPI + ip string + reverseLookup *string + limit *int32 + offset *int32 +} + +// Filter by reverse lookup. +func (r ApiGetReverseLookupRecordListRequest) ReverseLookup(reverseLookup string) ApiGetReverseLookupRecordListRequest { + r.reverseLookup = &reverseLookup + return r +} + +// Limit the number of results returned. +func (r ApiGetReverseLookupRecordListRequest) Limit(limit int32) ApiGetReverseLookupRecordListRequest { + r.limit = &limit + return r +} + +// Return results starting from the given offset. +func (r ApiGetReverseLookupRecordListRequest) Offset(offset int32) ApiGetReverseLookupRecordListRequest { + r.offset = &offset + return r } -func (r ApiGetNullRouteHistoryRequest) Execute() (*NullRoutedIP, *http.Response, error) { - return r.ApiService.GetNullRouteHistoryExecute(r) +func (r ApiGetReverseLookupRecordListRequest) Execute() (*GetReverseLookupRecordListResult, *http.Response, error) { + return r.ApiService.GetReverseLookupRecordListExecute(r) } /* -GetNullRouteHistory Inspect null route history +GetReverseLookupRecordList List reverse lookup records for an IPv6 range + +Get reverse lookup values set for IPs in the specified range @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id Null route ID - @return ApiGetNullRouteHistoryRequest + @param ip IP address or IP address with prefixLength {ip}_{prefix}. If prefixLength is not given, then we assume 32 (for IPv4) or 128 (for IPv6). PrefixLength is mandatory for IP range, for example, the IPv6 address range with prefixLength = 112 + @return ApiGetReverseLookupRecordListRequest */ -func (a *IpsAPIService) GetNullRouteHistory(ctx context.Context, id string) ApiGetNullRouteHistoryRequest { - return ApiGetNullRouteHistoryRequest{ +func (a *IpmgmtAPIService) GetReverseLookupRecordList(ctx context.Context, ip string) ApiGetReverseLookupRecordListRequest { + return ApiGetReverseLookupRecordListRequest{ ApiService: a, ctx: ctx, - id: id, + ip: ip, } } // Execute executes the request -// @return NullRoutedIP -func (a *IpsAPIService) GetNullRouteHistoryExecute(r ApiGetNullRouteHistoryRequest) (*NullRoutedIP, *http.Response, error) { +// @return GetReverseLookupRecordListResult +func (a *IpmgmtAPIService) GetReverseLookupRecordListExecute(r ApiGetReverseLookupRecordListRequest) (*GetReverseLookupRecordListResult, *http.Response, error) { var ( localVarHTTPMethod = http.MethodGet localVarPostBody interface{} formFiles []formFile - localVarReturnValue *NullRoutedIP + localVarReturnValue *GetReverseLookupRecordListResult ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "IpsAPIService.GetNullRouteHistory") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "IpmgmtAPIService.GetReverseLookupRecordList") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/nullRoutes/{id}" - localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + localVarPath := localBasePath + "/ips/{ip}/reverseLookup" + localVarPath = strings.Replace(localVarPath, "{"+"ip"+"}", url.PathEscape(parameterValueToString(r.ip, "ip")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} localVarFormParams := url.Values{} + if r.reverseLookup != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "reverseLookup", r.reverseLookup, "form", "") + } + if r.limit != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "form", "") + } + if r.offset != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "offset", r.offset, "form", "") + } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -772,169 +920,53 @@ func (a *IpsAPIService) GetNullRouteHistoryExecute(r ApiGetNullRouteHistoryReque return localVarReturnValue, localVarHTTPResponse, nil } -type ApiGetNullRouteHistoryListRequest struct { +type ApiInspectIPRequest struct { ctx context.Context - ApiService IpsAPI - limit *int32 - offset *int32 - fromIp *string - toIp *string - fromDate *string - toDate *string - nulledBy *string - unnulledBy *string - ticketId *string - contractId *string - equipmentId *string - sort *string -} - -// Limit the number of results returned. -func (r ApiGetNullRouteHistoryListRequest) Limit(limit int32) ApiGetNullRouteHistoryListRequest { - r.limit = &limit - return r -} - -// Return results starting from the given offset. -func (r ApiGetNullRouteHistoryListRequest) Offset(offset int32) ApiGetNullRouteHistoryListRequest { - r.offset = &offset - return r -} - -// Return only IPs greater or equal to the specified address -func (r ApiGetNullRouteHistoryListRequest) FromIp(fromIp string) ApiGetNullRouteHistoryListRequest { - r.fromIp = &fromIp - return r -} - -// Return only IPs lower or equal to the specified address -func (r ApiGetNullRouteHistoryListRequest) ToIp(toIp string) ApiGetNullRouteHistoryListRequest { - r.toIp = &toIp - return r -} - -// Return only null routes active after the specified date and time -func (r ApiGetNullRouteHistoryListRequest) FromDate(fromDate string) ApiGetNullRouteHistoryListRequest { - r.fromDate = &fromDate - return r -} - -// Return only null routes active before the specified date and time -func (r ApiGetNullRouteHistoryListRequest) ToDate(toDate string) ApiGetNullRouteHistoryListRequest { - r.toDate = &toDate - return r -} - -// Filter by the email address of the user who created the null route -func (r ApiGetNullRouteHistoryListRequest) NulledBy(nulledBy string) ApiGetNullRouteHistoryListRequest { - r.nulledBy = &nulledBy - return r -} - -// Filter by the email address of the user who removed the null route -func (r ApiGetNullRouteHistoryListRequest) UnnulledBy(unnulledBy string) ApiGetNullRouteHistoryListRequest { - r.unnulledBy = &unnulledBy - return r -} - -// Filter by the reference stored with the null route -func (r ApiGetNullRouteHistoryListRequest) TicketId(ticketId string) ApiGetNullRouteHistoryListRequest { - r.ticketId = &ticketId - return r -} - -// Filter by ID of the contract assigned to the IP at the time of null route creation -func (r ApiGetNullRouteHistoryListRequest) ContractId(contractId string) ApiGetNullRouteHistoryListRequest { - r.contractId = &contractId - return r -} - -// Filter by ID of the server assigned to the IP at the time of null route creation -func (r ApiGetNullRouteHistoryListRequest) EquipmentId(equipmentId string) ApiGetNullRouteHistoryListRequest { - r.equipmentId = &equipmentId - return r -} - -// Comma-separated list of sort field names. Prepend the field name with '-' for descending order. E.g. `sort=ip,-nullrouted`. Sortable field names are ip, nullRouted, reverseLookup. -func (r ApiGetNullRouteHistoryListRequest) Sort(sort string) ApiGetNullRouteHistoryListRequest { - r.sort = &sort - return r + ApiService IpmgmtAPI + ip string } -func (r ApiGetNullRouteHistoryListRequest) Execute() (*GetNullRouteHistoryListResult, *http.Response, error) { - return r.ApiService.GetNullRouteHistoryListExecute(r) +func (r ApiInspectIPRequest) Execute() (*Ip, *http.Response, error) { + return r.ApiService.InspectIPExecute(r) } /* -GetNullRouteHistoryList Inspect null route history +InspectIP Inspect an IP @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiGetNullRouteHistoryListRequest + @param ip IP address or IP address with prefixLength {ip}_{prefix}. If prefixLength is not given, then we assume 32 (for IPv4) or 128 (for IPv6). PrefixLength is mandatory for IP range, for example, the IPv6 address range with prefixLength = 112 + @return ApiInspectIPRequest */ -func (a *IpsAPIService) GetNullRouteHistoryList(ctx context.Context) ApiGetNullRouteHistoryListRequest { - return ApiGetNullRouteHistoryListRequest{ +func (a *IpmgmtAPIService) InspectIP(ctx context.Context, ip string) ApiInspectIPRequest { + return ApiInspectIPRequest{ ApiService: a, ctx: ctx, + ip: ip, } } // Execute executes the request -// @return GetNullRouteHistoryListResult -func (a *IpsAPIService) GetNullRouteHistoryListExecute(r ApiGetNullRouteHistoryListRequest) (*GetNullRouteHistoryListResult, *http.Response, error) { +// @return Ip +func (a *IpmgmtAPIService) InspectIPExecute(r ApiInspectIPRequest) (*Ip, *http.Response, error) { var ( localVarHTTPMethod = http.MethodGet localVarPostBody interface{} formFiles []formFile - localVarReturnValue *GetNullRouteHistoryListResult + localVarReturnValue *Ip ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "IpsAPIService.GetNullRouteHistoryList") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "IpmgmtAPIService.InspectIP") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/nullRoutes" + localVarPath := localBasePath + "/ips/{ip}" + localVarPath = strings.Replace(localVarPath, "{"+"ip"+"}", url.PathEscape(parameterValueToString(r.ip, "ip")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} localVarFormParams := url.Values{} - if r.limit != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "form", "") - } - if r.offset != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "offset", r.offset, "form", "") - } - if r.fromIp != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "fromIp", r.fromIp, "form", "") - } - if r.toIp != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "toIp", r.toIp, "form", "") - } - if r.fromDate != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "fromDate", r.fromDate, "form", "") - } - if r.toDate != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "toDate", r.toDate, "form", "") - } - if r.nulledBy != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "nulledBy", r.nulledBy, "form", "") - } - if r.unnulledBy != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "unnulledBy", r.unnulledBy, "form", "") - } - if r.ticketId != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "ticketId", r.ticketId, "form", "") - } - if r.contractId != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "contractId", r.contractId, "form", "") - } - if r.equipmentId != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "equipmentId", r.equipmentId, "form", "") - } - if r.sort != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "sort", r.sort, "form", "") - } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -1046,85 +1078,53 @@ func (a *IpsAPIService) GetNullRouteHistoryListExecute(r ApiGetNullRouteHistoryL return localVarReturnValue, localVarHTTPResponse, nil } -type ApiGetReverseLookupRecordListRequest struct { +type ApiInspectNullRouteHistoryRequest struct { ctx context.Context - ApiService IpsAPI - ip string - reverseLookup *string - limit *int32 - offset *int32 -} - -// Filter by reverse lookup. -func (r ApiGetReverseLookupRecordListRequest) ReverseLookup(reverseLookup string) ApiGetReverseLookupRecordListRequest { - r.reverseLookup = &reverseLookup - return r -} - -// Limit the number of results returned. -func (r ApiGetReverseLookupRecordListRequest) Limit(limit int32) ApiGetReverseLookupRecordListRequest { - r.limit = &limit - return r -} - -// Return results starting from the given offset. -func (r ApiGetReverseLookupRecordListRequest) Offset(offset int32) ApiGetReverseLookupRecordListRequest { - r.offset = &offset - return r + ApiService IpmgmtAPI + id string } -func (r ApiGetReverseLookupRecordListRequest) Execute() (*GetReverseLookupRecordListResult, *http.Response, error) { - return r.ApiService.GetReverseLookupRecordListExecute(r) +func (r ApiInspectNullRouteHistoryRequest) Execute() (*NullRoutedIP, *http.Response, error) { + return r.ApiService.InspectNullRouteHistoryExecute(r) } /* -GetReverseLookupRecordList List reverse lookup records for an IPv6 range - -Get reverse lookup values set for IPs in the specified range +InspectNullRouteHistory Inspect null route history @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param ip IP address or IP address with prefixLength {ip}_{prefix}. If prefixLength is not given, then we assume 32 (for IPv4) or 128 (for IPv6). PrefixLength is mandatory for IP range, for example, the IPv6 address range with prefixLength = 112 - @return ApiGetReverseLookupRecordListRequest + @param id Null route ID + @return ApiInspectNullRouteHistoryRequest */ -func (a *IpsAPIService) GetReverseLookupRecordList(ctx context.Context, ip string) ApiGetReverseLookupRecordListRequest { - return ApiGetReverseLookupRecordListRequest{ +func (a *IpmgmtAPIService) InspectNullRouteHistory(ctx context.Context, id string) ApiInspectNullRouteHistoryRequest { + return ApiInspectNullRouteHistoryRequest{ ApiService: a, ctx: ctx, - ip: ip, + id: id, } } // Execute executes the request -// @return GetReverseLookupRecordListResult -func (a *IpsAPIService) GetReverseLookupRecordListExecute(r ApiGetReverseLookupRecordListRequest) (*GetReverseLookupRecordListResult, *http.Response, error) { +// @return NullRoutedIP +func (a *IpmgmtAPIService) InspectNullRouteHistoryExecute(r ApiInspectNullRouteHistoryRequest) (*NullRoutedIP, *http.Response, error) { var ( localVarHTTPMethod = http.MethodGet localVarPostBody interface{} formFiles []formFile - localVarReturnValue *GetReverseLookupRecordListResult + localVarReturnValue *NullRoutedIP ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "IpsAPIService.GetReverseLookupRecordList") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "IpmgmtAPIService.InspectNullRouteHistory") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/ips/{ip}/reverseLookup" - localVarPath = strings.Replace(localVarPath, "{"+"ip"+"}", url.PathEscape(parameterValueToString(r.ip, "ip")), -1) + localVarPath := localBasePath + "/nullRoutes/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} localVarFormParams := url.Values{} - if r.reverseLookup != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "reverseLookup", r.reverseLookup, "form", "") - } - if r.limit != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "form", "") - } - if r.offset != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "offset", r.offset, "form", "") - } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -1238,7 +1238,7 @@ func (a *IpsAPIService) GetReverseLookupRecordListExecute(r ApiGetReverseLookupR type ApiNullRouteIPRequest struct { ctx context.Context - ApiService IpsAPI + ApiService IpmgmtAPI ip string nullRouteIPOpts *NullRouteIPOpts } @@ -1260,7 +1260,7 @@ NullRouteIP Null route an IP @param ip IP address or IP address with prefixLength {ip}_{prefix}. If prefixLength is not given, then we assume 32 (for IPv4) or 128 (for IPv6). PrefixLength is mandatory for IP range, for example, the IPv6 address range with prefixLength = 112 @return ApiNullRouteIPRequest */ -func (a *IpsAPIService) NullRouteIP(ctx context.Context, ip string) ApiNullRouteIPRequest { +func (a *IpmgmtAPIService) NullRouteIP(ctx context.Context, ip string) ApiNullRouteIPRequest { return ApiNullRouteIPRequest{ ApiService: a, ctx: ctx, @@ -1270,7 +1270,7 @@ func (a *IpsAPIService) NullRouteIP(ctx context.Context, ip string) ApiNullRoute // Execute executes the request // @return NullRoutedIP -func (a *IpsAPIService) NullRouteIPExecute(r ApiNullRouteIPRequest) (*NullRoutedIP, *http.Response, error) { +func (a *IpmgmtAPIService) NullRouteIPExecute(r ApiNullRouteIPRequest) (*NullRoutedIP, *http.Response, error) { var ( localVarHTTPMethod = http.MethodPost localVarPostBody interface{} @@ -1278,7 +1278,7 @@ func (a *IpsAPIService) NullRouteIPExecute(r ApiNullRouteIPRequest) (*NullRouted localVarReturnValue *NullRoutedIP ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "IpsAPIService.NullRouteIP") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "IpmgmtAPIService.NullRouteIP") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } @@ -1405,7 +1405,7 @@ func (a *IpsAPIService) NullRouteIPExecute(r ApiNullRouteIPRequest) (*NullRouted type ApiRemoveIPNullRouteRequest struct { ctx context.Context - ApiService IpsAPI + ApiService IpmgmtAPI ip string } @@ -1420,7 +1420,7 @@ RemoveIPNullRoute Remove a null route @param ip IP address or IP address with prefixLength {ip}_{prefix}. If prefixLength is not given, then we assume 32 (for IPv4) or 128 (for IPv6). PrefixLength is mandatory for IP range, for example, the IPv6 address range with prefixLength = 112 @return ApiRemoveIPNullRouteRequest */ -func (a *IpsAPIService) RemoveIPNullRoute(ctx context.Context, ip string) ApiRemoveIPNullRouteRequest { +func (a *IpmgmtAPIService) RemoveIPNullRoute(ctx context.Context, ip string) ApiRemoveIPNullRouteRequest { return ApiRemoveIPNullRouteRequest{ ApiService: a, ctx: ctx, @@ -1429,14 +1429,14 @@ func (a *IpsAPIService) RemoveIPNullRoute(ctx context.Context, ip string) ApiRem } // Execute executes the request -func (a *IpsAPIService) RemoveIPNullRouteExecute(r ApiRemoveIPNullRouteRequest) (*http.Response, error) { +func (a *IpmgmtAPIService) RemoveIPNullRouteExecute(r ApiRemoveIPNullRouteRequest) (*http.Response, error) { var ( localVarHTTPMethod = http.MethodDelete localVarPostBody interface{} formFiles []formFile ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "IpsAPIService.RemoveIPNullRoute") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "IpmgmtAPIService.RemoveIPNullRoute") if err != nil { return nil, &GenericOpenAPIError{error: err.Error()} } @@ -1552,7 +1552,7 @@ func (a *IpsAPIService) RemoveIPNullRouteExecute(r ApiRemoveIPNullRouteRequest) type ApiUpdateIPRequest struct { ctx context.Context - ApiService IpsAPI + ApiService IpmgmtAPI ip string updateIPOpts *UpdateIPOpts } @@ -1575,7 +1575,7 @@ Use this operation to set reverse lookup for IPv4 IP addresses. @param ip IP address or IP address with prefixLength {ip}_{prefix}. If prefixLength is not given, then we assume 32 @return ApiUpdateIPRequest */ -func (a *IpsAPIService) UpdateIP(ctx context.Context, ip string) ApiUpdateIPRequest { +func (a *IpmgmtAPIService) UpdateIP(ctx context.Context, ip string) ApiUpdateIPRequest { return ApiUpdateIPRequest{ ApiService: a, ctx: ctx, @@ -1585,7 +1585,7 @@ func (a *IpsAPIService) UpdateIP(ctx context.Context, ip string) ApiUpdateIPRequ // Execute executes the request // @return Ip -func (a *IpsAPIService) UpdateIPExecute(r ApiUpdateIPRequest) (*Ip, *http.Response, error) { +func (a *IpmgmtAPIService) UpdateIPExecute(r ApiUpdateIPRequest) (*Ip, *http.Response, error) { var ( localVarHTTPMethod = http.MethodPut localVarPostBody interface{} @@ -1593,7 +1593,7 @@ func (a *IpsAPIService) UpdateIPExecute(r ApiUpdateIPRequest) (*Ip, *http.Respon localVarReturnValue *Ip ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "IpsAPIService.UpdateIP") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "IpmgmtAPIService.UpdateIP") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } @@ -1720,7 +1720,7 @@ func (a *IpsAPIService) UpdateIPExecute(r ApiUpdateIPRequest) (*Ip, *http.Respon type ApiUpdateNullRouteRequest struct { ctx context.Context - ApiService IpsAPI + ApiService IpmgmtAPI id string updateNullRouteOpts *UpdateNullRouteOpts } @@ -1741,7 +1741,7 @@ UpdateNullRoute Update a null route @param id Null route ID @return ApiUpdateNullRouteRequest */ -func (a *IpsAPIService) UpdateNullRoute(ctx context.Context, id string) ApiUpdateNullRouteRequest { +func (a *IpmgmtAPIService) UpdateNullRoute(ctx context.Context, id string) ApiUpdateNullRouteRequest { return ApiUpdateNullRouteRequest{ ApiService: a, ctx: ctx, @@ -1751,7 +1751,7 @@ func (a *IpsAPIService) UpdateNullRoute(ctx context.Context, id string) ApiUpdat // Execute executes the request // @return NullRoutedIP -func (a *IpsAPIService) UpdateNullRouteExecute(r ApiUpdateNullRouteRequest) (*NullRoutedIP, *http.Response, error) { +func (a *IpmgmtAPIService) UpdateNullRouteExecute(r ApiUpdateNullRouteRequest) (*NullRoutedIP, *http.Response, error) { var ( localVarHTTPMethod = http.MethodPut localVarPostBody interface{} @@ -1759,7 +1759,7 @@ func (a *IpsAPIService) UpdateNullRouteExecute(r ApiUpdateNullRouteRequest) (*Nu localVarReturnValue *NullRoutedIP ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "IpsAPIService.UpdateNullRoute") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "IpmgmtAPIService.UpdateNullRoute") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } @@ -1886,7 +1886,7 @@ func (a *IpsAPIService) UpdateNullRouteExecute(r ApiUpdateNullRouteRequest) (*Nu type ApiUpdateReverseLookupRecordsRequest struct { ctx context.Context - ApiService IpsAPI + ApiService IpmgmtAPI ip string updateReverseLookupRecordsOpts *UpdateReverseLookupRecordsOpts } @@ -1912,7 +1912,7 @@ You can set up to 20 records in a single request. @param ip IP address or IP address with prefixLength {ip}_{prefix}. If prefixLength is not given, then we assume 32 (for IPv4) or 128 (for IPv6). PrefixLength is mandatory for IP range, for example, the IPv6 address range with prefixLength = 112 @return ApiUpdateReverseLookupRecordsRequest */ -func (a *IpsAPIService) UpdateReverseLookupRecords(ctx context.Context, ip string) ApiUpdateReverseLookupRecordsRequest { +func (a *IpmgmtAPIService) UpdateReverseLookupRecords(ctx context.Context, ip string) ApiUpdateReverseLookupRecordsRequest { return ApiUpdateReverseLookupRecordsRequest{ ApiService: a, ctx: ctx, @@ -1922,7 +1922,7 @@ func (a *IpsAPIService) UpdateReverseLookupRecords(ctx context.Context, ip strin // Execute executes the request // @return UpdateReverseLookupRecordsResult -func (a *IpsAPIService) UpdateReverseLookupRecordsExecute(r ApiUpdateReverseLookupRecordsRequest) (*UpdateReverseLookupRecordsResult, *http.Response, error) { +func (a *IpmgmtAPIService) UpdateReverseLookupRecordsExecute(r ApiUpdateReverseLookupRecordsRequest) (*UpdateReverseLookupRecordsResult, *http.Response, error) { var ( localVarHTTPMethod = http.MethodPut localVarPostBody interface{} @@ -1930,7 +1930,7 @@ func (a *IpsAPIService) UpdateReverseLookupRecordsExecute(r ApiUpdateReverseLook localVarReturnValue *UpdateReverseLookupRecordsResult ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "IpsAPIService.UpdateReverseLookupRecords") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "IpmgmtAPIService.UpdateReverseLookupRecords") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } diff --git a/ips/client.go b/ipmgmt/client.go similarity index 99% rename from ips/client.go rename to ipmgmt/client.go index 6fe5ccc..7a2c888 100644 --- a/ips/client.go +++ b/ipmgmt/client.go @@ -8,7 +8,7 @@ API version: v2 // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. -package ips +package ipmgmt import ( "bytes" @@ -49,7 +49,7 @@ type APIClient struct { // API Services - IpsAPI IpsAPI + IpmgmtAPI IpmgmtAPI } type service struct { @@ -68,7 +68,7 @@ func NewAPIClient(cfg *Configuration) *APIClient { c.common.client = c // API Services - c.IpsAPI = (*IpsAPIService)(&c.common) + c.IpmgmtAPI = (*IpmgmtAPIService)(&c.common) return c } diff --git a/ips/configuration.go b/ipmgmt/configuration.go similarity index 99% rename from ips/configuration.go rename to ipmgmt/configuration.go index 086c7d5..ba6bbd5 100644 --- a/ips/configuration.go +++ b/ipmgmt/configuration.go @@ -8,7 +8,7 @@ API version: v2 // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. -package ips +package ipmgmt import ( "context" diff --git a/ips/docs/AssignedContract.md b/ipmgmt/docs/AssignedContract.md similarity index 100% rename from ips/docs/AssignedContract.md rename to ipmgmt/docs/AssignedContract.md diff --git a/ips/docs/ErrorResult.md b/ipmgmt/docs/ErrorResult.md similarity index 100% rename from ips/docs/ErrorResult.md rename to ipmgmt/docs/ErrorResult.md diff --git a/ips/docs/GetIPListResult.md b/ipmgmt/docs/GetIPListResult.md similarity index 100% rename from ips/docs/GetIPListResult.md rename to ipmgmt/docs/GetIPListResult.md diff --git a/ips/docs/GetNullRouteHistoryListResult.md b/ipmgmt/docs/GetNullRouteHistoryListResult.md similarity index 100% rename from ips/docs/GetNullRouteHistoryListResult.md rename to ipmgmt/docs/GetNullRouteHistoryListResult.md diff --git a/ips/docs/GetReverseLookupRecordListResult.md b/ipmgmt/docs/GetReverseLookupRecordListResult.md similarity index 100% rename from ips/docs/GetReverseLookupRecordListResult.md rename to ipmgmt/docs/GetReverseLookupRecordListResult.md diff --git a/ips/docs/Ip.md b/ipmgmt/docs/Ip.md similarity index 100% rename from ips/docs/Ip.md rename to ipmgmt/docs/Ip.md diff --git a/ips/docs/IpType.md b/ipmgmt/docs/IpType.md similarity index 100% rename from ips/docs/IpType.md rename to ipmgmt/docs/IpType.md diff --git a/ips/docs/IpsAPI.md b/ipmgmt/docs/IpmgmtAPI.md similarity index 81% rename from ips/docs/IpsAPI.md rename to ipmgmt/docs/IpmgmtAPI.md index 74ac2f6..f42256d 100644 --- a/ips/docs/IpsAPI.md +++ b/ipmgmt/docs/IpmgmtAPI.md @@ -1,27 +1,27 @@ -# \IpsAPI +# \IpmgmtAPI All URIs are relative to *https://api.leaseweb.com/ipMgmt/v2* Method | HTTP request | Description ------------- | ------------- | ------------- -[**GetIP**](IpsAPI.md#GetIP) | **Get** /ips/{ip} | Inspect an IP -[**GetIPList**](IpsAPI.md#GetIPList) | **Get** /ips | List IPs -[**GetNullRouteHistory**](IpsAPI.md#GetNullRouteHistory) | **Get** /nullRoutes/{id} | Inspect null route history -[**GetNullRouteHistoryList**](IpsAPI.md#GetNullRouteHistoryList) | **Get** /nullRoutes | Inspect null route history -[**GetReverseLookupRecordList**](IpsAPI.md#GetReverseLookupRecordList) | **Get** /ips/{ip}/reverseLookup | List reverse lookup records for an IPv6 range -[**NullRouteIP**](IpsAPI.md#NullRouteIP) | **Post** /ips/{ip}/nullRoute | Null route an IP -[**RemoveIPNullRoute**](IpsAPI.md#RemoveIPNullRoute) | **Delete** /ips/{ip}/nullRoute | Remove a null route -[**UpdateIP**](IpsAPI.md#UpdateIP) | **Put** /ips/{ip} | Update an IP -[**UpdateNullRoute**](IpsAPI.md#UpdateNullRoute) | **Put** /nullRoutes/{id} | Update a null route -[**UpdateReverseLookupRecords**](IpsAPI.md#UpdateReverseLookupRecords) | **Put** /ips/{ip}/reverseLookup | Set or remove reverse lookup records for an IPv6 range +[**GetIPList**](IpmgmtAPI.md#GetIPList) | **Get** /ips | List IPs +[**GetNullRouteHistoryList**](IpmgmtAPI.md#GetNullRouteHistoryList) | **Get** /nullRoutes | Inspect null route history +[**GetReverseLookupRecordList**](IpmgmtAPI.md#GetReverseLookupRecordList) | **Get** /ips/{ip}/reverseLookup | List reverse lookup records for an IPv6 range +[**InspectIP**](IpmgmtAPI.md#InspectIP) | **Get** /ips/{ip} | Inspect an IP +[**InspectNullRouteHistory**](IpmgmtAPI.md#InspectNullRouteHistory) | **Get** /nullRoutes/{id} | Inspect null route history +[**NullRouteIP**](IpmgmtAPI.md#NullRouteIP) | **Post** /ips/{ip}/nullRoute | Null route an IP +[**RemoveIPNullRoute**](IpmgmtAPI.md#RemoveIPNullRoute) | **Delete** /ips/{ip}/nullRoute | Remove a null route +[**UpdateIP**](IpmgmtAPI.md#UpdateIP) | **Put** /ips/{ip} | Update an IP +[**UpdateNullRoute**](IpmgmtAPI.md#UpdateNullRoute) | **Put** /nullRoutes/{id} | Update a null route +[**UpdateReverseLookupRecords**](IpmgmtAPI.md#UpdateReverseLookupRecords) | **Put** /ips/{ip}/reverseLookup | Set or remove reverse lookup records for an IPv6 range -## GetIP +## GetIPList -> Ip GetIP(ctx, ip).Execute() +> GetIPListResult GetIPList(ctx).Limit(limit).Offset(offset).SubnetId(subnetId).Version(version).Type_(type_).NullRouted(nullRouted).Primary(primary).FromIp(fromIp).ToIp(toIp).Ips(ips).EquipmentIds(equipmentIds).AssignedContractIds(assignedContractIds).Sort(sort).ReverseLookup(reverseLookup).Execute() -Inspect an IP +List IPs ### Example @@ -32,44 +32,66 @@ import ( "context" "fmt" "os" - openapiclient "github.com/leaseweb/leaseweb-go-sdk/ips" + openapiclient "github.com/leaseweb/leaseweb-go-sdk/ipmgmt" ) func main() { - ip := "192.0.2.1" // string | IP address or IP address with prefixLength {ip}_{prefix}. If prefixLength is not given, then we assume 32 (for IPv4) or 128 (for IPv6). PrefixLength is mandatory for IP range, for example, the IPv6 address range with prefixLength = 112 + limit := int32(20) // int32 | Limit the number of results returned. (optional) + offset := int32(10) // int32 | Return results starting from the given offset. (optional) + subnetId := "subnetId_example" // string | Filter by subnet (optional) + version := openapiclient.protocolVersion(4) // ProtocolVersion | Filter by protocol version (optional) + type_ := openapiclient.ipType("NORMAL_IP") // IpType | Filter by IP type (optional) + nullRouted := true // bool | Filter by whether or not the IP has an active null route (true or false) (optional) + primary := true // bool | Filter by whether or not the IP is primary (true or false) (optional) + fromIp := "fromIp_example" // string | Return only IPs greater or equal to the specified address (optional) + toIp := "toIp_example" // string | Return only IPs lower or equal to the specified address (optional) + ips := "ips_example" // string | Return only IPs specified as a comma-separated list (optional) + equipmentIds := "equipmentIds_example" // string | Return only IPs assigned to equipment items specified as a comma-separated list of IDs (optional) + assignedContractIds := "assignedContractIds_example" // string | Return only IPs assigned to contracts specified as a comma-separated list of IDs (optional) + sort := "sort_example" // string | Comma-separated list of sort field names. Prepend the field name with '-' for descending order. E.g. `sort=ip,-nullrouted`. Sortable field names are ip, nullRouted, reverseLookup. (optional) + reverseLookup := "mydomain1.example.com" // string | Filter by reverse lookup. (optional) configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.IpsAPI.GetIP(context.Background(), ip).Execute() + resp, r, err := apiClient.IpmgmtAPI.GetIPList(context.Background()).Limit(limit).Offset(offset).SubnetId(subnetId).Version(version).Type_(type_).NullRouted(nullRouted).Primary(primary).FromIp(fromIp).ToIp(toIp).Ips(ips).EquipmentIds(equipmentIds).AssignedContractIds(assignedContractIds).Sort(sort).ReverseLookup(reverseLookup).Execute() if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `IpsAPI.GetIP``: %v\n", err) + fmt.Fprintf(os.Stderr, "Error when calling `IpmgmtAPI.GetIPList``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } - // response from `GetIP`: Ip - fmt.Fprintf(os.Stdout, "Response from `IpsAPI.GetIP`: %v\n", resp) + // response from `GetIPList`: GetIPListResult + fmt.Fprintf(os.Stdout, "Response from `IpmgmtAPI.GetIPList`: %v\n", resp) } ``` ### Path Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**ip** | **string** | IP address or IP address with prefixLength {ip}_{prefix}. If prefixLength is not given, then we assume 32 (for IPv4) or 128 (for IPv6). PrefixLength is mandatory for IP range, for example, the IPv6 address range with prefixLength = 112 | ### Other Parameters -Other parameters are passed through a pointer to a apiGetIPRequest struct via the builder pattern +Other parameters are passed through a pointer to a apiGetIPListRequest struct via the builder pattern Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - + **limit** | **int32** | Limit the number of results returned. | + **offset** | **int32** | Return results starting from the given offset. | + **subnetId** | **string** | Filter by subnet | + **version** | [**ProtocolVersion**](ProtocolVersion.md) | Filter by protocol version | + **type_** | [**IpType**](IpType.md) | Filter by IP type | + **nullRouted** | **bool** | Filter by whether or not the IP has an active null route (true or false) | + **primary** | **bool** | Filter by whether or not the IP is primary (true or false) | + **fromIp** | **string** | Return only IPs greater or equal to the specified address | + **toIp** | **string** | Return only IPs lower or equal to the specified address | + **ips** | **string** | Return only IPs specified as a comma-separated list | + **equipmentIds** | **string** | Return only IPs assigned to equipment items specified as a comma-separated list of IDs | + **assignedContractIds** | **string** | Return only IPs assigned to contracts specified as a comma-separated list of IDs | + **sort** | **string** | Comma-separated list of sort field names. Prepend the field name with '-' for descending order. E.g. `sort=ip,-nullrouted`. Sortable field names are ip, nullRouted, reverseLookup. | + **reverseLookup** | **string** | Filter by reverse lookup. | ### Return type -[**Ip**](Ip.md) +[**GetIPListResult**](GetIPListResult.md) ### Authorization @@ -85,11 +107,11 @@ Name | Type | Description | Notes [[Back to README]](../README.md) -## GetIPList +## GetNullRouteHistoryList -> GetIPListResult GetIPList(ctx).Limit(limit).Offset(offset).SubnetId(subnetId).Version(version).Type_(type_).NullRouted(nullRouted).Primary(primary).FromIp(fromIp).ToIp(toIp).Ips(ips).EquipmentIds(equipmentIds).AssignedContractIds(assignedContractIds).Sort(sort).ReverseLookup(reverseLookup).Execute() +> GetNullRouteHistoryListResult GetNullRouteHistoryList(ctx).Limit(limit).Offset(offset).FromIp(fromIp).ToIp(toIp).FromDate(fromDate).ToDate(toDate).NulledBy(nulledBy).UnnulledBy(unnulledBy).TicketId(ticketId).ContractId(contractId).EquipmentId(equipmentId).Sort(sort).Execute() -List IPs +Inspect null route history ### Example @@ -100,34 +122,33 @@ import ( "context" "fmt" "os" - openapiclient "github.com/leaseweb/leaseweb-go-sdk/ips" + "time" + openapiclient "github.com/leaseweb/leaseweb-go-sdk/ipmgmt" ) func main() { limit := int32(20) // int32 | Limit the number of results returned. (optional) offset := int32(10) // int32 | Return results starting from the given offset. (optional) - subnetId := "subnetId_example" // string | Filter by subnet (optional) - version := openapiclient.protocolVersion(4) // ProtocolVersion | Filter by protocol version (optional) - type_ := openapiclient.ipType("NORMAL_IP") // IpType | Filter by IP type (optional) - nullRouted := true // bool | Filter by whether or not the IP has an active null route (true or false) (optional) - primary := true // bool | Filter by whether or not the IP is primary (true or false) (optional) fromIp := "fromIp_example" // string | Return only IPs greater or equal to the specified address (optional) toIp := "toIp_example" // string | Return only IPs lower or equal to the specified address (optional) - ips := "ips_example" // string | Return only IPs specified as a comma-separated list (optional) - equipmentIds := "equipmentIds_example" // string | Return only IPs assigned to equipment items specified as a comma-separated list of IDs (optional) - assignedContractIds := "assignedContractIds_example" // string | Return only IPs assigned to contracts specified as a comma-separated list of IDs (optional) + fromDate := time.Now() // string | Return only null routes active after the specified date and time (optional) + toDate := time.Now() // string | Return only null routes active before the specified date and time (optional) + nulledBy := "nulledBy_example" // string | Filter by the email address of the user who created the null route (optional) + unnulledBy := "unnulledBy_example" // string | Filter by the email address of the user who removed the null route (optional) + ticketId := "ticketId_example" // string | Filter by the reference stored with the null route (optional) + contractId := "contractId_example" // string | Filter by ID of the contract assigned to the IP at the time of null route creation (optional) + equipmentId := "equipmentId_example" // string | Filter by ID of the server assigned to the IP at the time of null route creation (optional) sort := "sort_example" // string | Comma-separated list of sort field names. Prepend the field name with '-' for descending order. E.g. `sort=ip,-nullrouted`. Sortable field names are ip, nullRouted, reverseLookup. (optional) - reverseLookup := "mydomain1.example.com" // string | Filter by reverse lookup. (optional) configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.IpsAPI.GetIPList(context.Background()).Limit(limit).Offset(offset).SubnetId(subnetId).Version(version).Type_(type_).NullRouted(nullRouted).Primary(primary).FromIp(fromIp).ToIp(toIp).Ips(ips).EquipmentIds(equipmentIds).AssignedContractIds(assignedContractIds).Sort(sort).ReverseLookup(reverseLookup).Execute() + resp, r, err := apiClient.IpmgmtAPI.GetNullRouteHistoryList(context.Background()).Limit(limit).Offset(offset).FromIp(fromIp).ToIp(toIp).FromDate(fromDate).ToDate(toDate).NulledBy(nulledBy).UnnulledBy(unnulledBy).TicketId(ticketId).ContractId(contractId).EquipmentId(equipmentId).Sort(sort).Execute() if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `IpsAPI.GetIPList``: %v\n", err) + fmt.Fprintf(os.Stderr, "Error when calling `IpmgmtAPI.GetNullRouteHistoryList``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } - // response from `GetIPList`: GetIPListResult - fmt.Fprintf(os.Stdout, "Response from `IpsAPI.GetIPList`: %v\n", resp) + // response from `GetNullRouteHistoryList`: GetNullRouteHistoryListResult + fmt.Fprintf(os.Stdout, "Response from `IpmgmtAPI.GetNullRouteHistoryList`: %v\n", resp) } ``` @@ -137,29 +158,27 @@ func main() { ### Other Parameters -Other parameters are passed through a pointer to a apiGetIPListRequest struct via the builder pattern +Other parameters are passed through a pointer to a apiGetNullRouteHistoryListRequest struct via the builder pattern Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **limit** | **int32** | Limit the number of results returned. | **offset** | **int32** | Return results starting from the given offset. | - **subnetId** | **string** | Filter by subnet | - **version** | [**ProtocolVersion**](ProtocolVersion.md) | Filter by protocol version | - **type_** | [**IpType**](IpType.md) | Filter by IP type | - **nullRouted** | **bool** | Filter by whether or not the IP has an active null route (true or false) | - **primary** | **bool** | Filter by whether or not the IP is primary (true or false) | **fromIp** | **string** | Return only IPs greater or equal to the specified address | **toIp** | **string** | Return only IPs lower or equal to the specified address | - **ips** | **string** | Return only IPs specified as a comma-separated list | - **equipmentIds** | **string** | Return only IPs assigned to equipment items specified as a comma-separated list of IDs | - **assignedContractIds** | **string** | Return only IPs assigned to contracts specified as a comma-separated list of IDs | + **fromDate** | **string** | Return only null routes active after the specified date and time | + **toDate** | **string** | Return only null routes active before the specified date and time | + **nulledBy** | **string** | Filter by the email address of the user who created the null route | + **unnulledBy** | **string** | Filter by the email address of the user who removed the null route | + **ticketId** | **string** | Filter by the reference stored with the null route | + **contractId** | **string** | Filter by ID of the contract assigned to the IP at the time of null route creation | + **equipmentId** | **string** | Filter by ID of the server assigned to the IP at the time of null route creation | **sort** | **string** | Comma-separated list of sort field names. Prepend the field name with '-' for descending order. E.g. `sort=ip,-nullrouted`. Sortable field names are ip, nullRouted, reverseLookup. | - **reverseLookup** | **string** | Filter by reverse lookup. | ### Return type -[**GetIPListResult**](GetIPListResult.md) +[**GetNullRouteHistoryListResult**](GetNullRouteHistoryListResult.md) ### Authorization @@ -175,11 +194,13 @@ Name | Type | Description | Notes [[Back to README]](../README.md) -## GetNullRouteHistory +## GetReverseLookupRecordList + +> GetReverseLookupRecordListResult GetReverseLookupRecordList(ctx, ip).ReverseLookup(reverseLookup).Limit(limit).Offset(offset).Execute() + +List reverse lookup records for an IPv6 range -> NullRoutedIP GetNullRouteHistory(ctx, id).Execute() -Inspect null route history ### Example @@ -190,21 +211,24 @@ import ( "context" "fmt" "os" - openapiclient "github.com/leaseweb/leaseweb-go-sdk/ips" + openapiclient "github.com/leaseweb/leaseweb-go-sdk/ipmgmt" ) func main() { - id := "23234" // string | Null route ID + ip := "192.0.2.1" // string | IP address or IP address with prefixLength {ip}_{prefix}. If prefixLength is not given, then we assume 32 (for IPv4) or 128 (for IPv6). PrefixLength is mandatory for IP range, for example, the IPv6 address range with prefixLength = 112 + reverseLookup := "mydomain1.example.com" // string | Filter by reverse lookup. (optional) + limit := int32(20) // int32 | Limit the number of results returned. (optional) + offset := int32(10) // int32 | Return results starting from the given offset. (optional) configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.IpsAPI.GetNullRouteHistory(context.Background(), id).Execute() + resp, r, err := apiClient.IpmgmtAPI.GetReverseLookupRecordList(context.Background(), ip).ReverseLookup(reverseLookup).Limit(limit).Offset(offset).Execute() if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `IpsAPI.GetNullRouteHistory``: %v\n", err) + fmt.Fprintf(os.Stderr, "Error when calling `IpmgmtAPI.GetReverseLookupRecordList``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } - // response from `GetNullRouteHistory`: NullRoutedIP - fmt.Fprintf(os.Stdout, "Response from `IpsAPI.GetNullRouteHistory`: %v\n", resp) + // response from `GetReverseLookupRecordList`: GetReverseLookupRecordListResult + fmt.Fprintf(os.Stdout, "Response from `IpmgmtAPI.GetReverseLookupRecordList`: %v\n", resp) } ``` @@ -214,20 +238,23 @@ func main() { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**id** | **string** | Null route ID | +**ip** | **string** | IP address or IP address with prefixLength {ip}_{prefix}. If prefixLength is not given, then we assume 32 (for IPv4) or 128 (for IPv6). PrefixLength is mandatory for IP range, for example, the IPv6 address range with prefixLength = 112 | ### Other Parameters -Other parameters are passed through a pointer to a apiGetNullRouteHistoryRequest struct via the builder pattern +Other parameters are passed through a pointer to a apiGetReverseLookupRecordListRequest struct via the builder pattern Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- + **reverseLookup** | **string** | Filter by reverse lookup. | + **limit** | **int32** | Limit the number of results returned. | + **offset** | **int32** | Return results starting from the given offset. | ### Return type -[**NullRoutedIP**](NullRoutedIP.md) +[**GetReverseLookupRecordListResult**](GetReverseLookupRecordListResult.md) ### Authorization @@ -243,11 +270,11 @@ Name | Type | Description | Notes [[Back to README]](../README.md) -## GetNullRouteHistoryList +## InspectIP -> GetNullRouteHistoryListResult GetNullRouteHistoryList(ctx).Limit(limit).Offset(offset).FromIp(fromIp).ToIp(toIp).FromDate(fromDate).ToDate(toDate).NulledBy(nulledBy).UnnulledBy(unnulledBy).TicketId(ticketId).ContractId(contractId).EquipmentId(equipmentId).Sort(sort).Execute() +> Ip InspectIP(ctx, ip).Execute() -Inspect null route history +Inspect an IP ### Example @@ -258,63 +285,44 @@ import ( "context" "fmt" "os" - "time" - openapiclient "github.com/leaseweb/leaseweb-go-sdk/ips" + openapiclient "github.com/leaseweb/leaseweb-go-sdk/ipmgmt" ) func main() { - limit := int32(20) // int32 | Limit the number of results returned. (optional) - offset := int32(10) // int32 | Return results starting from the given offset. (optional) - fromIp := "fromIp_example" // string | Return only IPs greater or equal to the specified address (optional) - toIp := "toIp_example" // string | Return only IPs lower or equal to the specified address (optional) - fromDate := time.Now() // string | Return only null routes active after the specified date and time (optional) - toDate := time.Now() // string | Return only null routes active before the specified date and time (optional) - nulledBy := "nulledBy_example" // string | Filter by the email address of the user who created the null route (optional) - unnulledBy := "unnulledBy_example" // string | Filter by the email address of the user who removed the null route (optional) - ticketId := "ticketId_example" // string | Filter by the reference stored with the null route (optional) - contractId := "contractId_example" // string | Filter by ID of the contract assigned to the IP at the time of null route creation (optional) - equipmentId := "equipmentId_example" // string | Filter by ID of the server assigned to the IP at the time of null route creation (optional) - sort := "sort_example" // string | Comma-separated list of sort field names. Prepend the field name with '-' for descending order. E.g. `sort=ip,-nullrouted`. Sortable field names are ip, nullRouted, reverseLookup. (optional) + ip := "192.0.2.1" // string | IP address or IP address with prefixLength {ip}_{prefix}. If prefixLength is not given, then we assume 32 (for IPv4) or 128 (for IPv6). PrefixLength is mandatory for IP range, for example, the IPv6 address range with prefixLength = 112 configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.IpsAPI.GetNullRouteHistoryList(context.Background()).Limit(limit).Offset(offset).FromIp(fromIp).ToIp(toIp).FromDate(fromDate).ToDate(toDate).NulledBy(nulledBy).UnnulledBy(unnulledBy).TicketId(ticketId).ContractId(contractId).EquipmentId(equipmentId).Sort(sort).Execute() + resp, r, err := apiClient.IpmgmtAPI.InspectIP(context.Background(), ip).Execute() if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `IpsAPI.GetNullRouteHistoryList``: %v\n", err) + fmt.Fprintf(os.Stderr, "Error when calling `IpmgmtAPI.InspectIP``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } - // response from `GetNullRouteHistoryList`: GetNullRouteHistoryListResult - fmt.Fprintf(os.Stdout, "Response from `IpsAPI.GetNullRouteHistoryList`: %v\n", resp) + // response from `InspectIP`: Ip + fmt.Fprintf(os.Stdout, "Response from `IpmgmtAPI.InspectIP`: %v\n", resp) } ``` ### Path Parameters +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ip** | **string** | IP address or IP address with prefixLength {ip}_{prefix}. If prefixLength is not given, then we assume 32 (for IPv4) or 128 (for IPv6). PrefixLength is mandatory for IP range, for example, the IPv6 address range with prefixLength = 112 | ### Other Parameters -Other parameters are passed through a pointer to a apiGetNullRouteHistoryListRequest struct via the builder pattern +Other parameters are passed through a pointer to a apiInspectIPRequest struct via the builder pattern Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **limit** | **int32** | Limit the number of results returned. | - **offset** | **int32** | Return results starting from the given offset. | - **fromIp** | **string** | Return only IPs greater or equal to the specified address | - **toIp** | **string** | Return only IPs lower or equal to the specified address | - **fromDate** | **string** | Return only null routes active after the specified date and time | - **toDate** | **string** | Return only null routes active before the specified date and time | - **nulledBy** | **string** | Filter by the email address of the user who created the null route | - **unnulledBy** | **string** | Filter by the email address of the user who removed the null route | - **ticketId** | **string** | Filter by the reference stored with the null route | - **contractId** | **string** | Filter by ID of the contract assigned to the IP at the time of null route creation | - **equipmentId** | **string** | Filter by ID of the server assigned to the IP at the time of null route creation | - **sort** | **string** | Comma-separated list of sort field names. Prepend the field name with '-' for descending order. E.g. `sort=ip,-nullrouted`. Sortable field names are ip, nullRouted, reverseLookup. | + ### Return type -[**GetNullRouteHistoryListResult**](GetNullRouteHistoryListResult.md) +[**Ip**](Ip.md) ### Authorization @@ -330,13 +338,11 @@ Name | Type | Description | Notes [[Back to README]](../README.md) -## GetReverseLookupRecordList - -> GetReverseLookupRecordListResult GetReverseLookupRecordList(ctx, ip).ReverseLookup(reverseLookup).Limit(limit).Offset(offset).Execute() - -List reverse lookup records for an IPv6 range +## InspectNullRouteHistory +> NullRoutedIP InspectNullRouteHistory(ctx, id).Execute() +Inspect null route history ### Example @@ -347,24 +353,21 @@ import ( "context" "fmt" "os" - openapiclient "github.com/leaseweb/leaseweb-go-sdk/ips" + openapiclient "github.com/leaseweb/leaseweb-go-sdk/ipmgmt" ) func main() { - ip := "192.0.2.1" // string | IP address or IP address with prefixLength {ip}_{prefix}. If prefixLength is not given, then we assume 32 (for IPv4) or 128 (for IPv6). PrefixLength is mandatory for IP range, for example, the IPv6 address range with prefixLength = 112 - reverseLookup := "mydomain1.example.com" // string | Filter by reverse lookup. (optional) - limit := int32(20) // int32 | Limit the number of results returned. (optional) - offset := int32(10) // int32 | Return results starting from the given offset. (optional) + id := "23234" // string | Null route ID configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.IpsAPI.GetReverseLookupRecordList(context.Background(), ip).ReverseLookup(reverseLookup).Limit(limit).Offset(offset).Execute() + resp, r, err := apiClient.IpmgmtAPI.InspectNullRouteHistory(context.Background(), id).Execute() if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `IpsAPI.GetReverseLookupRecordList``: %v\n", err) + fmt.Fprintf(os.Stderr, "Error when calling `IpmgmtAPI.InspectNullRouteHistory``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } - // response from `GetReverseLookupRecordList`: GetReverseLookupRecordListResult - fmt.Fprintf(os.Stdout, "Response from `IpsAPI.GetReverseLookupRecordList`: %v\n", resp) + // response from `InspectNullRouteHistory`: NullRoutedIP + fmt.Fprintf(os.Stdout, "Response from `IpmgmtAPI.InspectNullRouteHistory`: %v\n", resp) } ``` @@ -374,23 +377,20 @@ func main() { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**ip** | **string** | IP address or IP address with prefixLength {ip}_{prefix}. If prefixLength is not given, then we assume 32 (for IPv4) or 128 (for IPv6). PrefixLength is mandatory for IP range, for example, the IPv6 address range with prefixLength = 112 | +**id** | **string** | Null route ID | ### Other Parameters -Other parameters are passed through a pointer to a apiGetReverseLookupRecordListRequest struct via the builder pattern +Other parameters are passed through a pointer to a apiInspectNullRouteHistoryRequest struct via the builder pattern Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **reverseLookup** | **string** | Filter by reverse lookup. | - **limit** | **int32** | Limit the number of results returned. | - **offset** | **int32** | Return results starting from the given offset. | ### Return type -[**GetReverseLookupRecordListResult**](GetReverseLookupRecordListResult.md) +[**NullRoutedIP**](NullRoutedIP.md) ### Authorization @@ -421,7 +421,7 @@ import ( "context" "fmt" "os" - openapiclient "github.com/leaseweb/leaseweb-go-sdk/ips" + openapiclient "github.com/leaseweb/leaseweb-go-sdk/ipmgmt" ) func main() { @@ -430,13 +430,13 @@ func main() { configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.IpsAPI.NullRouteIP(context.Background(), ip).NullRouteIPOpts(nullRouteIPOpts).Execute() + resp, r, err := apiClient.IpmgmtAPI.NullRouteIP(context.Background(), ip).NullRouteIPOpts(nullRouteIPOpts).Execute() if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `IpsAPI.NullRouteIP``: %v\n", err) + fmt.Fprintf(os.Stderr, "Error when calling `IpmgmtAPI.NullRouteIP``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `NullRouteIP`: NullRoutedIP - fmt.Fprintf(os.Stdout, "Response from `IpsAPI.NullRouteIP`: %v\n", resp) + fmt.Fprintf(os.Stdout, "Response from `IpmgmtAPI.NullRouteIP`: %v\n", resp) } ``` @@ -491,7 +491,7 @@ import ( "context" "fmt" "os" - openapiclient "github.com/leaseweb/leaseweb-go-sdk/ips" + openapiclient "github.com/leaseweb/leaseweb-go-sdk/ipmgmt" ) func main() { @@ -499,9 +499,9 @@ func main() { configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - r, err := apiClient.IpsAPI.RemoveIPNullRoute(context.Background(), ip).Execute() + r, err := apiClient.IpmgmtAPI.RemoveIPNullRoute(context.Background(), ip).Execute() if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `IpsAPI.RemoveIPNullRoute``: %v\n", err) + fmt.Fprintf(os.Stderr, "Error when calling `IpmgmtAPI.RemoveIPNullRoute``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } } @@ -559,7 +559,7 @@ import ( "context" "fmt" "os" - openapiclient "github.com/leaseweb/leaseweb-go-sdk/ips" + openapiclient "github.com/leaseweb/leaseweb-go-sdk/ipmgmt" ) func main() { @@ -568,13 +568,13 @@ func main() { configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.IpsAPI.UpdateIP(context.Background(), ip).UpdateIPOpts(updateIPOpts).Execute() + resp, r, err := apiClient.IpmgmtAPI.UpdateIP(context.Background(), ip).UpdateIPOpts(updateIPOpts).Execute() if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `IpsAPI.UpdateIP``: %v\n", err) + fmt.Fprintf(os.Stderr, "Error when calling `IpmgmtAPI.UpdateIP``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `UpdateIP`: Ip - fmt.Fprintf(os.Stdout, "Response from `IpsAPI.UpdateIP`: %v\n", resp) + fmt.Fprintf(os.Stdout, "Response from `IpmgmtAPI.UpdateIP`: %v\n", resp) } ``` @@ -629,7 +629,7 @@ import ( "context" "fmt" "os" - openapiclient "github.com/leaseweb/leaseweb-go-sdk/ips" + openapiclient "github.com/leaseweb/leaseweb-go-sdk/ipmgmt" ) func main() { @@ -638,13 +638,13 @@ func main() { configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.IpsAPI.UpdateNullRoute(context.Background(), id).UpdateNullRouteOpts(updateNullRouteOpts).Execute() + resp, r, err := apiClient.IpmgmtAPI.UpdateNullRoute(context.Background(), id).UpdateNullRouteOpts(updateNullRouteOpts).Execute() if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `IpsAPI.UpdateNullRoute``: %v\n", err) + fmt.Fprintf(os.Stderr, "Error when calling `IpmgmtAPI.UpdateNullRoute``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `UpdateNullRoute`: NullRoutedIP - fmt.Fprintf(os.Stdout, "Response from `IpsAPI.UpdateNullRoute`: %v\n", resp) + fmt.Fprintf(os.Stdout, "Response from `IpmgmtAPI.UpdateNullRoute`: %v\n", resp) } ``` @@ -701,7 +701,7 @@ import ( "context" "fmt" "os" - openapiclient "github.com/leaseweb/leaseweb-go-sdk/ips" + openapiclient "github.com/leaseweb/leaseweb-go-sdk/ipmgmt" ) func main() { @@ -710,13 +710,13 @@ func main() { configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.IpsAPI.UpdateReverseLookupRecords(context.Background(), ip).UpdateReverseLookupRecordsOpts(updateReverseLookupRecordsOpts).Execute() + resp, r, err := apiClient.IpmgmtAPI.UpdateReverseLookupRecords(context.Background(), ip).UpdateReverseLookupRecordsOpts(updateReverseLookupRecordsOpts).Execute() if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `IpsAPI.UpdateReverseLookupRecords``: %v\n", err) + fmt.Fprintf(os.Stderr, "Error when calling `IpmgmtAPI.UpdateReverseLookupRecords``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `UpdateReverseLookupRecords`: UpdateReverseLookupRecordsResult - fmt.Fprintf(os.Stdout, "Response from `IpsAPI.UpdateReverseLookupRecords`: %v\n", resp) + fmt.Fprintf(os.Stdout, "Response from `IpmgmtAPI.UpdateReverseLookupRecords`: %v\n", resp) } ``` diff --git a/ips/docs/Metadata.md b/ipmgmt/docs/Metadata.md similarity index 100% rename from ips/docs/Metadata.md rename to ipmgmt/docs/Metadata.md diff --git a/ips/docs/NullRouteIPOpts.md b/ipmgmt/docs/NullRouteIPOpts.md similarity index 100% rename from ips/docs/NullRouteIPOpts.md rename to ipmgmt/docs/NullRouteIPOpts.md diff --git a/ips/docs/NullRoutedIP.md b/ipmgmt/docs/NullRoutedIP.md similarity index 100% rename from ips/docs/NullRoutedIP.md rename to ipmgmt/docs/NullRoutedIP.md diff --git a/ips/docs/ProtocolVersion.md b/ipmgmt/docs/ProtocolVersion.md similarity index 100% rename from ips/docs/ProtocolVersion.md rename to ipmgmt/docs/ProtocolVersion.md diff --git a/ips/docs/ReverseLookup.md b/ipmgmt/docs/ReverseLookup.md similarity index 100% rename from ips/docs/ReverseLookup.md rename to ipmgmt/docs/ReverseLookup.md diff --git a/ips/docs/Subnet.md b/ipmgmt/docs/Subnet.md similarity index 100% rename from ips/docs/Subnet.md rename to ipmgmt/docs/Subnet.md diff --git a/ips/docs/UpdateIPOpts.md b/ipmgmt/docs/UpdateIPOpts.md similarity index 100% rename from ips/docs/UpdateIPOpts.md rename to ipmgmt/docs/UpdateIPOpts.md diff --git a/ips/docs/UpdateNullRouteOpts.md b/ipmgmt/docs/UpdateNullRouteOpts.md similarity index 100% rename from ips/docs/UpdateNullRouteOpts.md rename to ipmgmt/docs/UpdateNullRouteOpts.md diff --git a/ips/docs/UpdateReverseLookupRecordsOpts.md b/ipmgmt/docs/UpdateReverseLookupRecordsOpts.md similarity index 100% rename from ips/docs/UpdateReverseLookupRecordsOpts.md rename to ipmgmt/docs/UpdateReverseLookupRecordsOpts.md diff --git a/ips/docs/UpdateReverseLookupRecordsResult.md b/ipmgmt/docs/UpdateReverseLookupRecordsResult.md similarity index 100% rename from ips/docs/UpdateReverseLookupRecordsResult.md rename to ipmgmt/docs/UpdateReverseLookupRecordsResult.md diff --git a/ips/git_push.sh b/ipmgmt/git_push.sh similarity index 100% rename from ips/git_push.sh rename to ipmgmt/git_push.sh diff --git a/ipmgmt/go.mod b/ipmgmt/go.mod new file mode 100644 index 0000000..6316a1f --- /dev/null +++ b/ipmgmt/go.mod @@ -0,0 +1,6 @@ +module github.com/leaseweb/leaseweb-go-sdk/ipmgmt + +go 1.18 + +require ( +) diff --git a/ips/go.sum b/ipmgmt/go.sum similarity index 100% rename from ips/go.sum rename to ipmgmt/go.sum diff --git a/ips/model__metadata.go b/ipmgmt/model__metadata.go similarity index 99% rename from ips/model__metadata.go rename to ipmgmt/model__metadata.go index 4b9ab52..83ad257 100644 --- a/ips/model__metadata.go +++ b/ipmgmt/model__metadata.go @@ -8,7 +8,7 @@ API version: v2 // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. -package ips +package ipmgmt import ( "encoding/json" diff --git a/ips/model_assigned_contract.go b/ipmgmt/model_assigned_contract.go similarity index 99% rename from ips/model_assigned_contract.go rename to ipmgmt/model_assigned_contract.go index 5093dcd..f47a7f9 100644 --- a/ips/model_assigned_contract.go +++ b/ipmgmt/model_assigned_contract.go @@ -8,7 +8,7 @@ API version: v2 // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. -package ips +package ipmgmt import ( "encoding/json" diff --git a/ips/model_error_result.go b/ipmgmt/model_error_result.go similarity index 99% rename from ips/model_error_result.go rename to ipmgmt/model_error_result.go index a6311a8..70bae16 100644 --- a/ips/model_error_result.go +++ b/ipmgmt/model_error_result.go @@ -8,7 +8,7 @@ API version: v2 // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. -package ips +package ipmgmt import ( "encoding/json" diff --git a/ips/model_get_ip_list_result.go b/ipmgmt/model_get_ip_list_result.go similarity index 99% rename from ips/model_get_ip_list_result.go rename to ipmgmt/model_get_ip_list_result.go index cddda56..6922640 100644 --- a/ips/model_get_ip_list_result.go +++ b/ipmgmt/model_get_ip_list_result.go @@ -8,7 +8,7 @@ API version: v2 // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. -package ips +package ipmgmt import ( "encoding/json" diff --git a/ips/model_get_null_route_history_list_result.go b/ipmgmt/model_get_null_route_history_list_result.go similarity index 99% rename from ips/model_get_null_route_history_list_result.go rename to ipmgmt/model_get_null_route_history_list_result.go index b5a6bed..f9b1e63 100644 --- a/ips/model_get_null_route_history_list_result.go +++ b/ipmgmt/model_get_null_route_history_list_result.go @@ -8,7 +8,7 @@ API version: v2 // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. -package ips +package ipmgmt import ( "encoding/json" diff --git a/ips/model_get_reverse_lookup_record_list_result.go b/ipmgmt/model_get_reverse_lookup_record_list_result.go similarity index 99% rename from ips/model_get_reverse_lookup_record_list_result.go rename to ipmgmt/model_get_reverse_lookup_record_list_result.go index 6a421e4..823827e 100644 --- a/ips/model_get_reverse_lookup_record_list_result.go +++ b/ipmgmt/model_get_reverse_lookup_record_list_result.go @@ -8,7 +8,7 @@ API version: v2 // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. -package ips +package ipmgmt import ( "encoding/json" diff --git a/ips/model_ip.go b/ipmgmt/model_ip.go similarity index 99% rename from ips/model_ip.go rename to ipmgmt/model_ip.go index 269d9d9..5f4aa2f 100644 --- a/ips/model_ip.go +++ b/ipmgmt/model_ip.go @@ -8,7 +8,7 @@ API version: v2 // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. -package ips +package ipmgmt import ( "encoding/json" diff --git a/ips/model_ip_type.go b/ipmgmt/model_ip_type.go similarity index 99% rename from ips/model_ip_type.go rename to ipmgmt/model_ip_type.go index 5af006c..834ee32 100644 --- a/ips/model_ip_type.go +++ b/ipmgmt/model_ip_type.go @@ -8,7 +8,7 @@ API version: v2 // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. -package ips +package ipmgmt import ( "encoding/json" diff --git a/ips/model_null_route_ip_opts.go b/ipmgmt/model_null_route_ip_opts.go similarity index 99% rename from ips/model_null_route_ip_opts.go rename to ipmgmt/model_null_route_ip_opts.go index 477cbf9..133e736 100644 --- a/ips/model_null_route_ip_opts.go +++ b/ipmgmt/model_null_route_ip_opts.go @@ -8,7 +8,7 @@ API version: v2 // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. -package ips +package ipmgmt import ( "encoding/json" diff --git a/ips/model_null_routed_ip.go b/ipmgmt/model_null_routed_ip.go similarity index 99% rename from ips/model_null_routed_ip.go rename to ipmgmt/model_null_routed_ip.go index 26f49e4..34f2be4 100644 --- a/ips/model_null_routed_ip.go +++ b/ipmgmt/model_null_routed_ip.go @@ -8,7 +8,7 @@ API version: v2 // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. -package ips +package ipmgmt import ( "encoding/json" diff --git a/ips/model_protocol_version.go b/ipmgmt/model_protocol_version.go similarity index 99% rename from ips/model_protocol_version.go rename to ipmgmt/model_protocol_version.go index 61e340c..e2996f1 100644 --- a/ips/model_protocol_version.go +++ b/ipmgmt/model_protocol_version.go @@ -8,7 +8,7 @@ API version: v2 // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. -package ips +package ipmgmt import ( "encoding/json" diff --git a/ips/model_reverse_lookup.go b/ipmgmt/model_reverse_lookup.go similarity index 99% rename from ips/model_reverse_lookup.go rename to ipmgmt/model_reverse_lookup.go index ec8e54a..2be0b69 100644 --- a/ips/model_reverse_lookup.go +++ b/ipmgmt/model_reverse_lookup.go @@ -8,7 +8,7 @@ API version: v2 // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. -package ips +package ipmgmt import ( "encoding/json" diff --git a/ips/model_subnet.go b/ipmgmt/model_subnet.go similarity index 99% rename from ips/model_subnet.go rename to ipmgmt/model_subnet.go index 43290b7..e619e65 100644 --- a/ips/model_subnet.go +++ b/ipmgmt/model_subnet.go @@ -8,7 +8,7 @@ API version: v2 // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. -package ips +package ipmgmt import ( "encoding/json" diff --git a/ips/model_update_ip_opts.go b/ipmgmt/model_update_ip_opts.go similarity index 99% rename from ips/model_update_ip_opts.go rename to ipmgmt/model_update_ip_opts.go index 7e6a208..3590409 100644 --- a/ips/model_update_ip_opts.go +++ b/ipmgmt/model_update_ip_opts.go @@ -8,7 +8,7 @@ API version: v2 // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. -package ips +package ipmgmt import ( "encoding/json" diff --git a/ips/model_update_null_route_opts.go b/ipmgmt/model_update_null_route_opts.go similarity index 99% rename from ips/model_update_null_route_opts.go rename to ipmgmt/model_update_null_route_opts.go index 7296cd7..a112d36 100644 --- a/ips/model_update_null_route_opts.go +++ b/ipmgmt/model_update_null_route_opts.go @@ -8,7 +8,7 @@ API version: v2 // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. -package ips +package ipmgmt import ( "encoding/json" diff --git a/ips/model_update_reverse_lookup_records_opts.go b/ipmgmt/model_update_reverse_lookup_records_opts.go similarity index 99% rename from ips/model_update_reverse_lookup_records_opts.go rename to ipmgmt/model_update_reverse_lookup_records_opts.go index ac41935..4c6a78d 100644 --- a/ips/model_update_reverse_lookup_records_opts.go +++ b/ipmgmt/model_update_reverse_lookup_records_opts.go @@ -8,7 +8,7 @@ API version: v2 // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. -package ips +package ipmgmt import ( "encoding/json" diff --git a/ips/model_update_reverse_lookup_records_result.go b/ipmgmt/model_update_reverse_lookup_records_result.go similarity index 99% rename from ips/model_update_reverse_lookup_records_result.go rename to ipmgmt/model_update_reverse_lookup_records_result.go index 7ec2e02..cda467c 100644 --- a/ips/model_update_reverse_lookup_records_result.go +++ b/ipmgmt/model_update_reverse_lookup_records_result.go @@ -8,7 +8,7 @@ API version: v2 // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. -package ips +package ipmgmt import ( "encoding/json" diff --git a/ips/response.go b/ipmgmt/response.go similarity index 98% rename from ips/response.go rename to ipmgmt/response.go index 4200514..8be1f07 100644 --- a/ips/response.go +++ b/ipmgmt/response.go @@ -8,7 +8,7 @@ API version: v2 // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. -package ips +package ipmgmt import ( "net/http" diff --git a/ips/test/api_ips_test.go b/ipmgmt/test/api_ipmgmt_test.go similarity index 52% rename from ips/test/api_ips_test.go rename to ipmgmt/test/api_ipmgmt_test.go index 2c4c339..bebf454 100644 --- a/ips/test/api_ips_test.go +++ b/ipmgmt/test/api_ipmgmt_test.go @@ -1,34 +1,32 @@ /* LeaseWeb API for IP address management -Testing IpsAPIService +Testing IpmgmtAPIService */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); -package ips +package ipmgmt import ( "context" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "testing" - openapiclient "github.com/leaseweb/leaseweb-go-sdk/ips" + openapiclient "github.com/leaseweb/leaseweb-go-sdk/ipmgmt" ) -func Test_ips_IpsAPIService(t *testing.T) { +func Test_ipmgmt_IpmgmtAPIService(t *testing.T) { configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - t.Run("Test IpsAPIService GetIP", func(t *testing.T) { + t.Run("Test IpmgmtAPIService GetIPList", func(t *testing.T) { t.Skip("skip test") // remove to run test - var ip string - - resp, httpRes, err := apiClient.IpsAPI.GetIP(context.Background(), ip).Execute() + resp, httpRes, err := apiClient.IpmgmtAPI.GetIPList(context.Background()).Execute() require.Nil(t, err) require.NotNil(t, resp) @@ -36,11 +34,11 @@ func Test_ips_IpsAPIService(t *testing.T) { }) - t.Run("Test IpsAPIService GetIPList", func(t *testing.T) { + t.Run("Test IpmgmtAPIService GetNullRouteHistoryList", func(t *testing.T) { t.Skip("skip test") // remove to run test - resp, httpRes, err := apiClient.IpsAPI.GetIPList(context.Background()).Execute() + resp, httpRes, err := apiClient.IpmgmtAPI.GetNullRouteHistoryList(context.Background()).Execute() require.Nil(t, err) require.NotNil(t, resp) @@ -48,13 +46,13 @@ func Test_ips_IpsAPIService(t *testing.T) { }) - t.Run("Test IpsAPIService GetNullRouteHistory", func(t *testing.T) { + t.Run("Test IpmgmtAPIService GetReverseLookupRecordList", func(t *testing.T) { t.Skip("skip test") // remove to run test - var id string + var ip string - resp, httpRes, err := apiClient.IpsAPI.GetNullRouteHistory(context.Background(), id).Execute() + resp, httpRes, err := apiClient.IpmgmtAPI.GetReverseLookupRecordList(context.Background(), ip).Execute() require.Nil(t, err) require.NotNil(t, resp) @@ -62,11 +60,13 @@ func Test_ips_IpsAPIService(t *testing.T) { }) - t.Run("Test IpsAPIService GetNullRouteHistoryList", func(t *testing.T) { + t.Run("Test IpmgmtAPIService InspectIP", func(t *testing.T) { t.Skip("skip test") // remove to run test - resp, httpRes, err := apiClient.IpsAPI.GetNullRouteHistoryList(context.Background()).Execute() + var ip string + + resp, httpRes, err := apiClient.IpmgmtAPI.InspectIP(context.Background(), ip).Execute() require.Nil(t, err) require.NotNil(t, resp) @@ -74,13 +74,13 @@ func Test_ips_IpsAPIService(t *testing.T) { }) - t.Run("Test IpsAPIService GetReverseLookupRecordList", func(t *testing.T) { + t.Run("Test IpmgmtAPIService InspectNullRouteHistory", func(t *testing.T) { t.Skip("skip test") // remove to run test - var ip string + var id string - resp, httpRes, err := apiClient.IpsAPI.GetReverseLookupRecordList(context.Background(), ip).Execute() + resp, httpRes, err := apiClient.IpmgmtAPI.InspectNullRouteHistory(context.Background(), id).Execute() require.Nil(t, err) require.NotNil(t, resp) @@ -88,13 +88,13 @@ func Test_ips_IpsAPIService(t *testing.T) { }) - t.Run("Test IpsAPIService NullRouteIP", func(t *testing.T) { + t.Run("Test IpmgmtAPIService NullRouteIP", func(t *testing.T) { t.Skip("skip test") // remove to run test var ip string - resp, httpRes, err := apiClient.IpsAPI.NullRouteIP(context.Background(), ip).Execute() + resp, httpRes, err := apiClient.IpmgmtAPI.NullRouteIP(context.Background(), ip).Execute() require.Nil(t, err) require.NotNil(t, resp) @@ -102,26 +102,26 @@ func Test_ips_IpsAPIService(t *testing.T) { }) - t.Run("Test IpsAPIService RemoveIPNullRoute", func(t *testing.T) { + t.Run("Test IpmgmtAPIService RemoveIPNullRoute", func(t *testing.T) { t.Skip("skip test") // remove to run test var ip string - httpRes, err := apiClient.IpsAPI.RemoveIPNullRoute(context.Background(), ip).Execute() + httpRes, err := apiClient.IpmgmtAPI.RemoveIPNullRoute(context.Background(), ip).Execute() require.Nil(t, err) assert.Equal(t, 200, httpRes.StatusCode) }) - t.Run("Test IpsAPIService UpdateIP", func(t *testing.T) { + t.Run("Test IpmgmtAPIService UpdateIP", func(t *testing.T) { t.Skip("skip test") // remove to run test var ip string - resp, httpRes, err := apiClient.IpsAPI.UpdateIP(context.Background(), ip).Execute() + resp, httpRes, err := apiClient.IpmgmtAPI.UpdateIP(context.Background(), ip).Execute() require.Nil(t, err) require.NotNil(t, resp) @@ -129,13 +129,13 @@ func Test_ips_IpsAPIService(t *testing.T) { }) - t.Run("Test IpsAPIService UpdateNullRoute", func(t *testing.T) { + t.Run("Test IpmgmtAPIService UpdateNullRoute", func(t *testing.T) { t.Skip("skip test") // remove to run test var id string - resp, httpRes, err := apiClient.IpsAPI.UpdateNullRoute(context.Background(), id).Execute() + resp, httpRes, err := apiClient.IpmgmtAPI.UpdateNullRoute(context.Background(), id).Execute() require.Nil(t, err) require.NotNil(t, resp) @@ -143,13 +143,13 @@ func Test_ips_IpsAPIService(t *testing.T) { }) - t.Run("Test IpsAPIService UpdateReverseLookupRecords", func(t *testing.T) { + t.Run("Test IpmgmtAPIService UpdateReverseLookupRecords", func(t *testing.T) { t.Skip("skip test") // remove to run test var ip string - resp, httpRes, err := apiClient.IpsAPI.UpdateReverseLookupRecords(context.Background(), ip).Execute() + resp, httpRes, err := apiClient.IpmgmtAPI.UpdateReverseLookupRecords(context.Background(), ip).Execute() require.Nil(t, err) require.NotNil(t, resp) diff --git a/ips/utils.go b/ipmgmt/utils.go similarity index 99% rename from ips/utils.go rename to ipmgmt/utils.go index dab93b1..c89ecce 100644 --- a/ips/utils.go +++ b/ipmgmt/utils.go @@ -8,7 +8,7 @@ API version: v2 // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. -package ips +package ipmgmt import ( "bytes" diff --git a/ips/go.mod b/ips/go.mod deleted file mode 100644 index 1fc7074..0000000 --- a/ips/go.mod +++ /dev/null @@ -1,6 +0,0 @@ -module github.com/leaseweb/leaseweb-go-sdk/ips - -go 1.18 - -require ( -) diff --git a/main.go b/main.go index 45d42f6..30e2a42 100644 --- a/main.go +++ b/main.go @@ -7,7 +7,7 @@ import ( _ "github.com/leaseweb/leaseweb-go-sdk/dedicatedserver" _ "github.com/leaseweb/leaseweb-go-sdk/dns" _ "github.com/leaseweb/leaseweb-go-sdk/invoice" - _ "github.com/leaseweb/leaseweb-go-sdk/ips" + _ "github.com/leaseweb/leaseweb-go-sdk/ipmgmt" _ "github.com/leaseweb/leaseweb-go-sdk/publiccloud" )