From 9a24f7c85b62304c42dd6bbcb33ab9a0ef4b567b Mon Sep 17 00:00:00 2001 From: Anil Gadiyar Date: Wed, 28 Aug 2024 16:54:47 +0530 Subject: [PATCH 1/3] Generated schemas for ipam-federation in go client --- ipamfederation/.openapi-generator-ignore | 23 + ipamfederation/.openapi-generator/FILES | 82 + ipamfederation/.openapi-generator/VERSION | 1 + ipamfederation/README.md | 164 ++ ipamfederation/api/openapi.yaml | 2012 +++++++++++++++++ ipamfederation/api_federated_block.go | 706 ++++++ ipamfederation/api_federated_realm.go | 704 ++++++ .../api_next_available_federated_block.go | 583 +++++ .../api_next_available_overlapping_block.go | 181 ++ .../api_next_available_reserved_block.go | 181 ++ ipamfederation/api_overlapping_block.go | 706 ++++++ ipamfederation/api_reserved_block.go | 706 ++++++ ipamfederation/client.go | 62 + ipamfederation/docs/Allocation.md | 134 ++ .../docs/CreateFederatedBlockResponse.md | 56 + .../docs/CreateFederatedRealmResponse.md | 56 + ...eateNextAvailableFederatedBlockResponse.md | 56 + ...teNextAvailableOverlappingBlockResponse.md | 56 + ...reateNextAvailableReservedBlockResponse.md | 56 + .../docs/CreateOverlappingBlockResponse.md | 56 + .../docs/CreateReservedBlockResponse.md | 56 + ipamfederation/docs/FederatedBlock.md | 342 +++ ipamfederation/docs/FederatedBlockAPI.md | 359 +++ ipamfederation/docs/FederatedRealm.md | 207 ++ ipamfederation/docs/FederatedRealmAPI.md | 359 +++ .../docs/ListFederatedBlockResponse.md | 56 + .../docs/ListFederatedRealmResponse.md | 56 + ...ListNextAvailableFederatedBlockResponse.md | 56 + ...stNextAvailableOverlappingBlockResponse.md | 56 + .../ListNextAvailableReservedBlockResponse.md | 56 + .../docs/ListOverlappingBlockResponse.md | 56 + .../docs/ListReservedBlockResponse.md | 56 + .../docs/NextAvailableBlockRequest.md | 186 ++ .../docs/NextAvailableFederatedBlockAPI.md | 298 +++ .../docs/NextAvailableOverlappingBlockAPI.md | 82 + .../docs/NextAvailableReservedBlockAPI.md | 82 + ipamfederation/docs/OverlappingBlock.md | 306 +++ ipamfederation/docs/OverlappingBlockAPI.md | 359 +++ .../docs/ReadFederatedBlockResponse.md | 56 + .../docs/ReadFederatedRealmResponse.md | 56 + .../docs/ReadOverlappingBlockResponse.md | 56 + .../docs/ReadReservedBlockResponse.md | 56 + ipamfederation/docs/ReservedBlock.md | 306 +++ ipamfederation/docs/ReservedBlockAPI.md | 359 +++ .../docs/UpdateFederatedBlockResponse.md | 56 + .../docs/UpdateFederatedRealmResponse.md | 56 + .../docs/UpdateOverlappingBlockResponse.md | 56 + .../docs/UpdateReservedBlockResponse.md | 56 + ipamfederation/model_allocation.go | 268 +++ .../model_create_federated_block_response.go | 154 ++ .../model_create_federated_realm_response.go | 154 ++ ...next_available_federated_block_response.go | 153 ++ ...xt_available_overlapping_block_response.go | 153 ++ ..._next_available_reserved_block_response.go | 153 ++ ...model_create_overlapping_block_response.go | 154 ++ .../model_create_reserved_block_response.go | 154 ++ ipamfederation/model_federated_block.go | 573 +++++ ipamfederation/model_federated_realm.go | 396 ++++ .../model_list_federated_block_response.go | 154 ++ .../model_list_federated_realm_response.go | 154 ++ ...next_available_federated_block_response.go | 153 ++ ...xt_available_overlapping_block_response.go | 153 ++ ..._next_available_reserved_block_response.go | 153 ++ .../model_list_overlapping_block_response.go | 154 ++ .../model_list_reserved_block_response.go | 154 ++ .../model_next_available_block_request.go | 344 +++ ipamfederation/model_overlapping_block.go | 540 +++++ .../model_read_federated_block_response.go | 154 ++ .../model_read_federated_realm_response.go | 154 ++ .../model_read_overlapping_block_response.go | 154 ++ .../model_read_reserved_block_response.go | 154 ++ ipamfederation/model_reserved_block.go | 540 +++++ .../model_update_federated_block_response.go | 154 ++ .../model_update_federated_realm_response.go | 154 ++ ...model_update_overlapping_block_response.go | 154 ++ .../model_update_reserved_block_response.go | 154 ++ .../test/api_federated_block_test.go | 91 + .../test/api_federated_realm_test.go | 91 + ...api_next_available_federated_block_test.go | 82 + ...i_next_available_overlapping_block_test.go | 40 + .../api_next_available_reserved_block_test.go | 40 + .../test/api_overlapping_block_test.go | 91 + .../test/api_reserved_block_test.go | 91 + ipamfederation/utils.go | 347 +++ 84 files changed, 17638 insertions(+) create mode 100644 ipamfederation/.openapi-generator-ignore create mode 100644 ipamfederation/.openapi-generator/FILES create mode 100644 ipamfederation/.openapi-generator/VERSION create mode 100644 ipamfederation/README.md create mode 100644 ipamfederation/api/openapi.yaml create mode 100644 ipamfederation/api_federated_block.go create mode 100644 ipamfederation/api_federated_realm.go create mode 100644 ipamfederation/api_next_available_federated_block.go create mode 100644 ipamfederation/api_next_available_overlapping_block.go create mode 100644 ipamfederation/api_next_available_reserved_block.go create mode 100644 ipamfederation/api_overlapping_block.go create mode 100644 ipamfederation/api_reserved_block.go create mode 100644 ipamfederation/client.go create mode 100644 ipamfederation/docs/Allocation.md create mode 100644 ipamfederation/docs/CreateFederatedBlockResponse.md create mode 100644 ipamfederation/docs/CreateFederatedRealmResponse.md create mode 100644 ipamfederation/docs/CreateNextAvailableFederatedBlockResponse.md create mode 100644 ipamfederation/docs/CreateNextAvailableOverlappingBlockResponse.md create mode 100644 ipamfederation/docs/CreateNextAvailableReservedBlockResponse.md create mode 100644 ipamfederation/docs/CreateOverlappingBlockResponse.md create mode 100644 ipamfederation/docs/CreateReservedBlockResponse.md create mode 100644 ipamfederation/docs/FederatedBlock.md create mode 100644 ipamfederation/docs/FederatedBlockAPI.md create mode 100644 ipamfederation/docs/FederatedRealm.md create mode 100644 ipamfederation/docs/FederatedRealmAPI.md create mode 100644 ipamfederation/docs/ListFederatedBlockResponse.md create mode 100644 ipamfederation/docs/ListFederatedRealmResponse.md create mode 100644 ipamfederation/docs/ListNextAvailableFederatedBlockResponse.md create mode 100644 ipamfederation/docs/ListNextAvailableOverlappingBlockResponse.md create mode 100644 ipamfederation/docs/ListNextAvailableReservedBlockResponse.md create mode 100644 ipamfederation/docs/ListOverlappingBlockResponse.md create mode 100644 ipamfederation/docs/ListReservedBlockResponse.md create mode 100644 ipamfederation/docs/NextAvailableBlockRequest.md create mode 100644 ipamfederation/docs/NextAvailableFederatedBlockAPI.md create mode 100644 ipamfederation/docs/NextAvailableOverlappingBlockAPI.md create mode 100644 ipamfederation/docs/NextAvailableReservedBlockAPI.md create mode 100644 ipamfederation/docs/OverlappingBlock.md create mode 100644 ipamfederation/docs/OverlappingBlockAPI.md create mode 100644 ipamfederation/docs/ReadFederatedBlockResponse.md create mode 100644 ipamfederation/docs/ReadFederatedRealmResponse.md create mode 100644 ipamfederation/docs/ReadOverlappingBlockResponse.md create mode 100644 ipamfederation/docs/ReadReservedBlockResponse.md create mode 100644 ipamfederation/docs/ReservedBlock.md create mode 100644 ipamfederation/docs/ReservedBlockAPI.md create mode 100644 ipamfederation/docs/UpdateFederatedBlockResponse.md create mode 100644 ipamfederation/docs/UpdateFederatedRealmResponse.md create mode 100644 ipamfederation/docs/UpdateOverlappingBlockResponse.md create mode 100644 ipamfederation/docs/UpdateReservedBlockResponse.md create mode 100644 ipamfederation/model_allocation.go create mode 100644 ipamfederation/model_create_federated_block_response.go create mode 100644 ipamfederation/model_create_federated_realm_response.go create mode 100644 ipamfederation/model_create_next_available_federated_block_response.go create mode 100644 ipamfederation/model_create_next_available_overlapping_block_response.go create mode 100644 ipamfederation/model_create_next_available_reserved_block_response.go create mode 100644 ipamfederation/model_create_overlapping_block_response.go create mode 100644 ipamfederation/model_create_reserved_block_response.go create mode 100644 ipamfederation/model_federated_block.go create mode 100644 ipamfederation/model_federated_realm.go create mode 100644 ipamfederation/model_list_federated_block_response.go create mode 100644 ipamfederation/model_list_federated_realm_response.go create mode 100644 ipamfederation/model_list_next_available_federated_block_response.go create mode 100644 ipamfederation/model_list_next_available_overlapping_block_response.go create mode 100644 ipamfederation/model_list_next_available_reserved_block_response.go create mode 100644 ipamfederation/model_list_overlapping_block_response.go create mode 100644 ipamfederation/model_list_reserved_block_response.go create mode 100644 ipamfederation/model_next_available_block_request.go create mode 100644 ipamfederation/model_overlapping_block.go create mode 100644 ipamfederation/model_read_federated_block_response.go create mode 100644 ipamfederation/model_read_federated_realm_response.go create mode 100644 ipamfederation/model_read_overlapping_block_response.go create mode 100644 ipamfederation/model_read_reserved_block_response.go create mode 100644 ipamfederation/model_reserved_block.go create mode 100644 ipamfederation/model_update_federated_block_response.go create mode 100644 ipamfederation/model_update_federated_realm_response.go create mode 100644 ipamfederation/model_update_overlapping_block_response.go create mode 100644 ipamfederation/model_update_reserved_block_response.go create mode 100644 ipamfederation/test/api_federated_block_test.go create mode 100644 ipamfederation/test/api_federated_realm_test.go create mode 100644 ipamfederation/test/api_next_available_federated_block_test.go create mode 100644 ipamfederation/test/api_next_available_overlapping_block_test.go create mode 100644 ipamfederation/test/api_next_available_reserved_block_test.go create mode 100644 ipamfederation/test/api_overlapping_block_test.go create mode 100644 ipamfederation/test/api_reserved_block_test.go create mode 100644 ipamfederation/utils.go diff --git a/ipamfederation/.openapi-generator-ignore b/ipamfederation/.openapi-generator-ignore new file mode 100644 index 0000000..7484ee5 --- /dev/null +++ b/ipamfederation/.openapi-generator-ignore @@ -0,0 +1,23 @@ +# OpenAPI Generator Ignore +# Generated by openapi-generator https://github.com/openapitools/openapi-generator + +# Use this file to prevent files from being overwritten by the generator. +# The patterns follow closely to .gitignore or .dockerignore. + +# As an example, the C# client generator defines ApiClient.cs. +# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: +#ApiClient.cs + +# You can match any string of characters against a directory, file or extension with a single asterisk (*): +#foo/*/qux +# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux + +# You can recursively match patterns against a directory, file or extension with a double asterisk (**): +#foo/**/qux +# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux + +# You can also negate patterns with an exclamation (!). +# For example, you can ignore all files in a docs folder with the file extension .md: +#docs/*.md +# Then explicitly reverse the ignore rule for a single file: +#!docs/README.md diff --git a/ipamfederation/.openapi-generator/FILES b/ipamfederation/.openapi-generator/FILES new file mode 100644 index 0000000..56f19c7 --- /dev/null +++ b/ipamfederation/.openapi-generator/FILES @@ -0,0 +1,82 @@ +.openapi-generator-ignore +README.md +api/openapi.yaml +api_federated_block.go +api_federated_realm.go +api_next_available_federated_block.go +api_next_available_overlapping_block.go +api_next_available_reserved_block.go +api_overlapping_block.go +api_reserved_block.go +client.go +docs/Allocation.md +docs/CreateFederatedBlockResponse.md +docs/CreateFederatedRealmResponse.md +docs/CreateNextAvailableFederatedBlockResponse.md +docs/CreateNextAvailableOverlappingBlockResponse.md +docs/CreateNextAvailableReservedBlockResponse.md +docs/CreateOverlappingBlockResponse.md +docs/CreateReservedBlockResponse.md +docs/FederatedBlock.md +docs/FederatedBlockAPI.md +docs/FederatedRealm.md +docs/FederatedRealmAPI.md +docs/ListFederatedBlockResponse.md +docs/ListFederatedRealmResponse.md +docs/ListNextAvailableFederatedBlockResponse.md +docs/ListNextAvailableOverlappingBlockResponse.md +docs/ListNextAvailableReservedBlockResponse.md +docs/ListOverlappingBlockResponse.md +docs/ListReservedBlockResponse.md +docs/NextAvailableBlockRequest.md +docs/NextAvailableFederatedBlockAPI.md +docs/NextAvailableOverlappingBlockAPI.md +docs/NextAvailableReservedBlockAPI.md +docs/OverlappingBlock.md +docs/OverlappingBlockAPI.md +docs/ReadFederatedBlockResponse.md +docs/ReadFederatedRealmResponse.md +docs/ReadOverlappingBlockResponse.md +docs/ReadReservedBlockResponse.md +docs/ReservedBlock.md +docs/ReservedBlockAPI.md +docs/UpdateFederatedBlockResponse.md +docs/UpdateFederatedRealmResponse.md +docs/UpdateOverlappingBlockResponse.md +docs/UpdateReservedBlockResponse.md +model_allocation.go +model_create_federated_block_response.go +model_create_federated_realm_response.go +model_create_next_available_federated_block_response.go +model_create_next_available_overlapping_block_response.go +model_create_next_available_reserved_block_response.go +model_create_overlapping_block_response.go +model_create_reserved_block_response.go +model_federated_block.go +model_federated_realm.go +model_list_federated_block_response.go +model_list_federated_realm_response.go +model_list_next_available_federated_block_response.go +model_list_next_available_overlapping_block_response.go +model_list_next_available_reserved_block_response.go +model_list_overlapping_block_response.go +model_list_reserved_block_response.go +model_next_available_block_request.go +model_overlapping_block.go +model_read_federated_block_response.go +model_read_federated_realm_response.go +model_read_overlapping_block_response.go +model_read_reserved_block_response.go +model_reserved_block.go +model_update_federated_block_response.go +model_update_federated_realm_response.go +model_update_overlapping_block_response.go +model_update_reserved_block_response.go +test/api_federated_block_test.go +test/api_federated_realm_test.go +test/api_next_available_federated_block_test.go +test/api_next_available_overlapping_block_test.go +test/api_next_available_reserved_block_test.go +test/api_overlapping_block_test.go +test/api_reserved_block_test.go +utils.go diff --git a/ipamfederation/.openapi-generator/VERSION b/ipamfederation/.openapi-generator/VERSION new file mode 100644 index 0000000..18bb418 --- /dev/null +++ b/ipamfederation/.openapi-generator/VERSION @@ -0,0 +1 @@ +7.5.0 diff --git a/ipamfederation/README.md b/ipamfederation/README.md new file mode 100644 index 0000000..20fea11 --- /dev/null +++ b/ipamfederation/README.md @@ -0,0 +1,164 @@ +# Go API client for IPAM Federation API + +The DDI IPAM Federation application enables a SaaS administrator to manage multiple IPAM systems from one central control point CSP. + + + +## Overview +This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. By using the [OpenAPI-spec](https://www.openapis.org/) from a remote server, you can easily generate an API client. + +- API version: v1 +- Generator version: 7.5.0 +- Build package: com.infoblox.codegen.BloxoneGoClientCodegen + +## Installation + +Install the package using `go get`: +```bash +go get github.com/infobloxopen/bloxone-go-client/ipamfederation +``` + +Import the package into your code: +```go +import "github.com/infobloxopen/bloxone-go-client/ipamfederation" +``` + +To use a proxy, set the environment variable `HTTP_PROXY`: + +```go +os.Setenv("HTTP_PROXY", "http://proxy_name:proxy_port") +``` + +To create a new API client, you can use the `NewAPIClient` function as shown below +```go +client := ipamfederation.NewAPIClient() +``` + +## Configuration + +The `NewAPIClient` function accepts a variadic list of `option.ClientOption` functions that can be used to configure the client. +It requires the `option` package to be imported. You can import the package using: +```go +import "github.com/infobloxopen/bloxone-go-client/option" +``` + +### Client Name +The client name is used to identify the client in the logs. By default, the client name is set to `bloxone-go-client`. You can change this using the `option.WithClientName` option. For example: +```go +client := ipamfederation.NewAPIClient(option.WithClientName("my-client")) +``` + +### Server URL + +The default URL for the Cloud Services Portal is `https://csp.infoblox.com`. If you need to change this, you can use `option.WithCSPUrl` to set the URL. For example: + +```go +client := ipamfederation.NewAPIClient(option.WithCSPUrl("https://csp.eu.infoblox.com")) +``` + +You can also set the URL using the environment variable `BLOXONE_CSP_URL` + +### Authorization + +An API key is required to access IPAM Federation API. You can obtain an API key by following the instructions in the guide for [Configuring User API Keys](https://docs.infoblox.com/space/BloxOneCloud/35430405/Configuring+User+API+Keys). + +To use an API key with IPAM Federation API, you can use the `option.WithAPIKey` option. For example: + +```go +client := ipamfederation.NewAPIClient(option.WithAPIKey("YOUR_API_KEY")) +``` + +You can also set the API key using the environment variable `BLOXONE_API_KEY` + +Note: The API key is a secret and should be handled securely. Hardcoding the API key in your code is not recommended. + +### Default Tags + +You can set default tags for all API requests using the `option.WithDefaultTags` option. For example: + +```go +client := ipamfederation.NewAPIClient(option.WithDefaultTags(map[string]string{"tag1": "value1", "tag2": "value2"})) +``` +This will add the tags `tag1=value1` and `tag2=value2` to all API requests that support tags in the request body. + +## Documentation for API Endpoints + +All URIs are relative to */api/ddi/v1* + +Class | Method | HTTP request | Description +------------ | ------------- | ------------- | ------------- +*FederatedBlockAPI* | [**Create**](docs/FederatedBlockAPI.md#create) | **Post** /federation/federated_block | Create the federated block. +*FederatedBlockAPI* | [**Delete**](docs/FederatedBlockAPI.md#delete) | **Delete** /federation/federated_block/{id} | Delete the federated block. +*FederatedBlockAPI* | [**List**](docs/FederatedBlockAPI.md#list) | **Get** /federation/federated_block | Retrieve the federated blocks. +*FederatedBlockAPI* | [**Read**](docs/FederatedBlockAPI.md#read) | **Get** /federation/federated_block/{id} | Retrieve the federated block. +*FederatedBlockAPI* | [**Update**](docs/FederatedBlockAPI.md#update) | **Patch** /federation/federated_block/{id} | Update the federated block. +*FederatedRealmAPI* | [**Create**](docs/FederatedRealmAPI.md#create) | **Post** /federation/federated_realm | Create the federated realm. +*FederatedRealmAPI* | [**Delete**](docs/FederatedRealmAPI.md#delete) | **Delete** /federation/federated_realm/{id} | Delete federated realm. +*FederatedRealmAPI* | [**List**](docs/FederatedRealmAPI.md#list) | **Get** /federation/federated_realm | Retrieve federated realms. +*FederatedRealmAPI* | [**Read**](docs/FederatedRealmAPI.md#read) | **Get** /federation/federated_realm/{id} | Retrieve the federated realm. +*FederatedRealmAPI* | [**Update**](docs/FederatedRealmAPI.md#update) | **Patch** /federation/federated_realm/{id} | Update the federated realm. +*NextAvailableFederatedBlockAPI* | [**CreateNextAvailableFederatedBlocks**](docs/NextAvailableFederatedBlockAPI.md#createnextavailablefederatedblocks) | **Post** /federation/federated_block/{id}/next_available_federated_block | Retrieve the next available federated block. +*NextAvailableFederatedBlockAPI* | [**CreateNextAvailableOverlappingBlocks**](docs/NextAvailableFederatedBlockAPI.md#createnextavailableoverlappingblocks) | **Post** /federation/federated_block/{id}/next_available_overlapping_block | Retrieve the next available overlapping block. +*NextAvailableFederatedBlockAPI* | [**CreateNextAvailableReservedBlocks**](docs/NextAvailableFederatedBlockAPI.md#createnextavailablereservedblocks) | **Post** /federation/federated_block/{id}/next_available_reserved_block | Retrieve the next available reserved block. +*NextAvailableFederatedBlockAPI* | [**ListNextAvailableFederatedBlocks**](docs/NextAvailableFederatedBlockAPI.md#listnextavailablefederatedblocks) | **Get** /federation/federated_block/{id}/next_available_federated_block | List the next available federated block. +*NextAvailableOverlappingBlockAPI* | [**ListNextAvailableOverlappingBlocks**](docs/NextAvailableOverlappingBlockAPI.md#listnextavailableoverlappingblocks) | **Get** /federation/federated_block/{id}/next_available_overlapping_block | List the next available overlapping block. +*NextAvailableReservedBlockAPI* | [**ListNextAvailableReservedBlocks**](docs/NextAvailableReservedBlockAPI.md#listnextavailablereservedblocks) | **Get** /federation/federated_block/{id}/next_available_reserved_block | List the next available reserved block. +*OverlappingBlockAPI* | [**Create**](docs/OverlappingBlockAPI.md#create) | **Post** /federation/overlapping_block | Create the overlapping block. +*OverlappingBlockAPI* | [**Delete**](docs/OverlappingBlockAPI.md#delete) | **Delete** /federation/overlapping_block/{id} | Delete the overlapping block. +*OverlappingBlockAPI* | [**List**](docs/OverlappingBlockAPI.md#list) | **Get** /federation/overlapping_block | Retrieve the overlapping block. +*OverlappingBlockAPI* | [**Read**](docs/OverlappingBlockAPI.md#read) | **Get** /federation/overlapping_block/{id} | Retrieve the overlapping block. +*OverlappingBlockAPI* | [**Update**](docs/OverlappingBlockAPI.md#update) | **Patch** /federation/overlapping_block/{id} | Update the overlapping block. +*ReservedBlockAPI* | [**Create**](docs/ReservedBlockAPI.md#create) | **Post** /federation/reserved_block | Create the reserved block. +*ReservedBlockAPI* | [**Delete**](docs/ReservedBlockAPI.md#delete) | **Delete** /federation/reserved_block/{id} | Delete the reserved block. +*ReservedBlockAPI* | [**List**](docs/ReservedBlockAPI.md#list) | **Get** /federation/reserved_block | Retrieve the reserved block. +*ReservedBlockAPI* | [**Read**](docs/ReservedBlockAPI.md#read) | **Get** /federation/reserved_block/{id} | Retrieve the reserved block. +*ReservedBlockAPI* | [**Update**](docs/ReservedBlockAPI.md#update) | **Patch** /federation/reserved_block/{id} | Update the reserved block. + + +## Documentation For Models + + - [Allocation](docs/Allocation.md) + - [CreateFederatedBlockResponse](docs/CreateFederatedBlockResponse.md) + - [CreateFederatedRealmResponse](docs/CreateFederatedRealmResponse.md) + - [CreateNextAvailableFederatedBlockResponse](docs/CreateNextAvailableFederatedBlockResponse.md) + - [CreateNextAvailableOverlappingBlockResponse](docs/CreateNextAvailableOverlappingBlockResponse.md) + - [CreateNextAvailableReservedBlockResponse](docs/CreateNextAvailableReservedBlockResponse.md) + - [CreateOverlappingBlockResponse](docs/CreateOverlappingBlockResponse.md) + - [CreateReservedBlockResponse](docs/CreateReservedBlockResponse.md) + - [FederatedBlock](docs/FederatedBlock.md) + - [FederatedRealm](docs/FederatedRealm.md) + - [ListFederatedBlockResponse](docs/ListFederatedBlockResponse.md) + - [ListFederatedRealmResponse](docs/ListFederatedRealmResponse.md) + - [ListNextAvailableFederatedBlockResponse](docs/ListNextAvailableFederatedBlockResponse.md) + - [ListNextAvailableOverlappingBlockResponse](docs/ListNextAvailableOverlappingBlockResponse.md) + - [ListNextAvailableReservedBlockResponse](docs/ListNextAvailableReservedBlockResponse.md) + - [ListOverlappingBlockResponse](docs/ListOverlappingBlockResponse.md) + - [ListReservedBlockResponse](docs/ListReservedBlockResponse.md) + - [NextAvailableBlockRequest](docs/NextAvailableBlockRequest.md) + - [OverlappingBlock](docs/OverlappingBlock.md) + - [ReadFederatedBlockResponse](docs/ReadFederatedBlockResponse.md) + - [ReadFederatedRealmResponse](docs/ReadFederatedRealmResponse.md) + - [ReadOverlappingBlockResponse](docs/ReadOverlappingBlockResponse.md) + - [ReadReservedBlockResponse](docs/ReadReservedBlockResponse.md) + - [ReservedBlock](docs/ReservedBlock.md) + - [UpdateFederatedBlockResponse](docs/UpdateFederatedBlockResponse.md) + - [UpdateFederatedRealmResponse](docs/UpdateFederatedRealmResponse.md) + - [UpdateOverlappingBlockResponse](docs/UpdateOverlappingBlockResponse.md) + - [UpdateReservedBlockResponse](docs/UpdateReservedBlockResponse.md) + + +## Documentation for Utility Methods + +Due to the fact that model structure members are all pointers, this package contains +a number of utility functions to easily obtain pointers to values of basic types. +Each of these functions takes a value of the given basic type and returns a pointer to it: + +* `PtrBool` +* `PtrInt` +* `PtrInt32` +* `PtrInt64` +* `PtrFloat` +* `PtrFloat32` +* `PtrFloat64` +* `PtrString` +* `PtrTime` diff --git a/ipamfederation/api/openapi.yaml b/ipamfederation/api/openapi.yaml new file mode 100644 index 0000000..08894db --- /dev/null +++ b/ipamfederation/api/openapi.yaml @@ -0,0 +1,2012 @@ +openapi: 3.0.1 +info: + description: "The DDI IPAM Federation application enables a SaaS administrator to\ + \ manage multiple IPAM systems from one central control point CSP. \n\n" + title: IPAM Federation API + version: v1 +servers: +- url: /api/ddi/v1 +security: +- ApiKeyAuth: [] +paths: + /federation/federated_block: + get: + description: |- + Use this method to retrieve __FederatedBlock__ objects. + The __FederatedBlock__ object allows a uniform representation of the address space segmentation, supporting functions such as administrative grouping, routing aggregation, delegation etc. + operationId: federated_blockList + parameters: + - description: "\n\nA collection of response resources can be transformed by\ + \ specifying a set of JSON tags to be returned. For a “flat” resource, the\ + \ tag name is straightforward. If field selection is allowed on non-flat\ + \ hierarchical resources, the service should implement a qualified naming\ + \ scheme such as dot-qualification to reference data down the hierarchy.\ + \ If a resource does not have the specified tag, the tag does not appear\ + \ in the output resource.\n\nSpecify this parameter as a comma-separated\ + \ list of JSON tag names.\n\n\t\t\t\t\t\t" + in: query + name: _fields + schema: + type: string + - description: "\n\nA collection of response resources can be filtered by a\ + \ logical expression string that includes JSON tag references to values\ + \ in each resource, literal values, and logical operators. If a resource\ + \ does not have the specified tag, its value is assumed to be null.\n\n\ + Literal values include numbers (integer and floating-point), and quoted\ + \ (both single- or double-quoted) literal strings, and 'null'. The following\ + \ operators are commonly used in filter expressions:\n\n| Op | Description\ + \ | \n| -- | ----------- | \n| == | \ + \ Equal | \n| != | Not Equal | \n\ + | > | Greater Than | \n| >= | Greater Than or Equal\ + \ To | \n| < | Less Than | \n| <= | Less Than\ + \ or Equal To | \n| and | Logical AND | \n| ~ |\ + \ Matches Regex | \n| !~ | Does Not Match Regex |\ + \ \n| or | Logical OR | \n| not | Logical NOT \ + \ | \n| () | Groupping Operators |\n\n\t\t\t\t\t\t" + in: query + name: _filter + schema: + type: string + - description: "\n\nThe integer index (zero-origin) of the offset into a collection\ + \ of resources. If omitted or null the value is assumed to be '0'.\n\n\t\ + \t\t\t\t\t\t" + in: query + name: _offset + schema: + type: integer + - description: "\n\nThe integer number of resources to be returned in the response.\ + \ The service may impose maximum value. If omitted the service may impose\ + \ a default value.\n\n\t\t\t\t\t\t\t" + in: query + name: _limit + schema: + type: integer + - description: "\n\nThe service-defined string used to identify a page of resources.\ + \ A null value indicates the first page.\n\n\t\t\t\t\t\t\t" + in: query + name: _page_token + schema: + type: string + - description: "\n\nA collection of response resources can be sorted by their\ + \ JSON tags. For a 'flat' resource, the tag name is straightforward. If\ + \ sorting is allowed on non-flat hierarchical resources, the service should\ + \ implement a qualified naming scheme such as dot-qualification to reference\ + \ data down the hierarchy. If a resource does not have the specified tag,\ + \ its value is assumed to be null.)\n\nSpecify this parameter as a comma-separated\ + \ list of JSON tag names. The sort direction can be specified by a suffix\ + \ separated by whitespace before the tag name. The suffix 'asc' sorts the\ + \ data in ascending order. The suffix 'desc' sorts the data in descending\ + \ order. If no suffix is specified the data is sorted in ascending order.\n\ + \n\t\t\t\t\t\t" + in: query + name: _order_by + schema: + type: string + - description: This parameter is used for sorting by tags. + in: query + name: _torder_by + schema: + type: string + - description: This parameter is used for filtering by tags. + in: query + name: _tfilter + schema: + type: string + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/federationListFederatedBlockResponse' + description: GET operation response + summary: Retrieve the federated blocks. + tags: + - federated_block + post: + description: |- + Use this method to create a __FederatedBlock__ object. + The __FederatedBlock__ object allows a uniform representation of the address space segmentation, supporting functions such as administrative grouping, routing aggregation, delegation etc. + operationId: federated_blockCreate + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/federationFederatedBlock' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/federationCreateFederatedBlockResponse' + description: POST operation response + summary: Create the federated block. + tags: + - federated_block + x-sdk-default-tags: true + x-codegen-request-body-name: body + /federation/federated_block/{id}: + delete: + description: |- + Use this method to delete a __FederatedBlock__ object. + The __FederatedBlock__ object allows a uniform representation of the address space segmentation, supporting functions such as administrative grouping, routing aggregation, delegation etc. + operationId: federated_blockDelete + parameters: + - description: An application specific resource identity of a resource + in: path + name: id + required: true + schema: + type: string + responses: + "200": + content: {} + description: OK + summary: Delete the federated block. + tags: + - federated_block + get: + description: |- + Use this method to retrieve a __FederatedBlock__ object. + The __FederatedBlock__ object allows a uniform representation of the address space segmentation, supporting functions such as administrative grouping, routing aggregation, delegation etc. + operationId: federated_blockRead + parameters: + - description: An application specific resource identity of a resource + in: path + name: id + required: true + schema: + type: string + - description: "\n\nA collection of response resources can be transformed by\ + \ specifying a set of JSON tags to be returned. For a “flat” resource, the\ + \ tag name is straightforward. If field selection is allowed on non-flat\ + \ hierarchical resources, the service should implement a qualified naming\ + \ scheme such as dot-qualification to reference data down the hierarchy.\ + \ If a resource does not have the specified tag, the tag does not appear\ + \ in the output resource.\n\nSpecify this parameter as a comma-separated\ + \ list of JSON tag names.\n\n\t\t\t\t\t\t" + in: query + name: _fields + schema: + type: string + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/federationReadFederatedBlockResponse' + description: GET operation response + summary: Retrieve the federated block. + tags: + - federated_block + patch: + description: |- + Use this method to update a __FederatedBlock__ object. + The __FederatedBlock__ object allows a uniform representation of the address space segmentation, supporting functions such as administrative grouping, routing aggregation, delegation etc. + operationId: federated_blockUpdate + parameters: + - description: An application specific resource identity of a resource + in: path + name: id + required: true + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/federationFederatedBlock' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/federationUpdateFederatedBlockResponse' + description: PATCH operation response + summary: Update the federated block. + tags: + - federated_block + x-sdk-default-tags: true + x-codegen-request-body-name: body + /federation/federated_block/{id}/next_available_federated_block: + get: + description: |- + Use this method to generate the next "n" available __FederatedBlock__ object with user specified predicates. + The response will be "n" __FederatedBlock__ objects. + operationId: next_available_federated_blockListNextAvailableFederatedBlocks + parameters: + - description: An application specific resource identity of a resource + in: path + name: id + required: true + schema: + type: string + - description: "The CIDR of the federated block. This is required, if _address_\ + \ does not specify it in its input." + in: query + name: cidr + schema: + format: int64 + type: integer + - description: "The count of __Block__ required. If not provided, it will default\ + \ to 1." + in: query + name: count + schema: + format: int64 + type: integer + - description: The name to be provided. + in: query + name: name + schema: + type: string + - description: The description for the _federation/federated_block_. May contain + 0 to 1024 characters. Can include UTF-8. + in: query + name: comment + schema: + type: string + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/federationListNextAvailableFederatedBlockResponse' + description: GET operation response + summary: List the next available federated block. + tags: + - next_available_federated_block + post: + description: |- + Use this method to generate the next "n" available __FederatedBlock__ object with user specified predicates. + The response will be "n" __FederatedBlock__ objects. + operationId: next_available_federated_blockCreateNextAvailableFederatedBlocks + parameters: + - description: An application specific resource identity of a resource + in: path + name: id + required: true + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/federationNextAvailableBlockRequest' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/federationCreateNextAvailableFederatedBlockResponse' + description: POST operation response + summary: Retrieve the next available federated block. + tags: + - next_available_federated_block + x-sdk-default-tags: true + x-codegen-request-body-name: body + /federation/federated_block/{id}/next_available_overlapping_block: + get: + description: |- + Use this method to list the next "n" available __OverlappingBlock__ object with user specified predicates. + The response will be "n" __OverlappingBlock__ objects. + operationId: next_available_overlapping_blockListNextAvailableOverlappingBlocks + parameters: + - description: An application specific resource identity of a resource + in: path + name: id + required: true + schema: + type: string + - description: "The CIDR of the federated block. This is required, if _address_\ + \ does not specify it in its input." + in: query + name: cidr + schema: + format: int64 + type: integer + - description: "The count of __Block__ required. If not provided, it will default\ + \ to 1." + in: query + name: count + schema: + format: int64 + type: integer + - description: The name to be provided. + in: query + name: name + schema: + type: string + - description: The description for the _federation/federated_block_. May contain + 0 to 1024 characters. Can include UTF-8. + in: query + name: comment + schema: + type: string + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/federationListNextAvailableOverlappingBlockResponse' + description: GET operation response + summary: List the next available overlapping block. + tags: + - next_available_overlapping_block + post: + description: |- + Use this method to generate the next "n" available __OverlappingBlock__ object with user specified predicates. + The response will be "n" __OverlappingBlock__ objects. + operationId: next_available_federated_blockCreateNextAvailableOverlappingBlocks + parameters: + - description: An application specific resource identity of a resource + in: path + name: id + required: true + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/federationNextAvailableBlockRequest' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/federationCreateNextAvailableOverlappingBlockResponse' + description: POST operation response + summary: Retrieve the next available overlapping block. + tags: + - next_available_federated_block + x-sdk-default-tags: true + x-codegen-request-body-name: body + /federation/federated_block/{id}/next_available_reserved_block: + get: + description: |- + Use this method to list the next "n" available __ReservedBlock__ object with user specified predicates. + The response will be "n" __ReservedBlock__ objects. + operationId: next_available_reserved_blockListNextAvailableReservedBlocks + parameters: + - description: An application specific resource identity of a resource + in: path + name: id + required: true + schema: + type: string + - description: "The CIDR of the federated block. This is required, if _address_\ + \ does not specify it in its input." + in: query + name: cidr + schema: + format: int64 + type: integer + - description: "The count of __Block__ required. If not provided, it will default\ + \ to 1." + in: query + name: count + schema: + format: int64 + type: integer + - description: The name to be provided. + in: query + name: name + schema: + type: string + - description: The description for the _federation/federated_block_. May contain + 0 to 1024 characters. Can include UTF-8. + in: query + name: comment + schema: + type: string + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/federationListNextAvailableReservedBlockResponse' + description: GET operation response + summary: List the next available reserved block. + tags: + - next_available_reserved_block + post: + description: |- + Use this method to generate the next "n" available __ReservedBlock__ object with user specified predicates. + The response will be "n" __ReservedBlock__ objects. + operationId: next_available_federated_blockCreateNextAvailableReservedBlocks + parameters: + - description: An application specific resource identity of a resource + in: path + name: id + required: true + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/federationNextAvailableBlockRequest' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/federationCreateNextAvailableReservedBlockResponse' + description: POST operation response + summary: Retrieve the next available reserved block. + tags: + - next_available_federated_block + x-sdk-default-tags: true + x-codegen-request-body-name: body + /federation/federated_realm: + get: + description: |- + Use this method to retrieve __FederatedRealm__ objects. + The __FederatedRealm__ object object is a unique set of federated blocks per realm. + operationId: federated_realmList + parameters: + - description: "\n\nA collection of response resources can be filtered by a\ + \ logical expression string that includes JSON tag references to values\ + \ in each resource, literal values, and logical operators. If a resource\ + \ does not have the specified tag, its value is assumed to be null.\n\n\ + Literal values include numbers (integer and floating-point), and quoted\ + \ (both single- or double-quoted) literal strings, and 'null'. The following\ + \ operators are commonly used in filter expressions:\n\n| Op | Description\ + \ | \n| -- | ----------- | \n| == | \ + \ Equal | \n| != | Not Equal | \n\ + | > | Greater Than | \n| >= | Greater Than or Equal\ + \ To | \n| < | Less Than | \n| <= | Less Than\ + \ or Equal To | \n| and | Logical AND | \n| ~ |\ + \ Matches Regex | \n| !~ | Does Not Match Regex |\ + \ \n| or | Logical OR | \n| not | Logical NOT \ + \ | \n| () | Groupping Operators |\n\n\t\t\t\t\t\t" + in: query + name: _filter + schema: + type: string + - description: "\n\nA collection of response resources can be sorted by their\ + \ JSON tags. For a 'flat' resource, the tag name is straightforward. If\ + \ sorting is allowed on non-flat hierarchical resources, the service should\ + \ implement a qualified naming scheme such as dot-qualification to reference\ + \ data down the hierarchy. If a resource does not have the specified tag,\ + \ its value is assumed to be null.)\n\nSpecify this parameter as a comma-separated\ + \ list of JSON tag names. The sort direction can be specified by a suffix\ + \ separated by whitespace before the tag name. The suffix 'asc' sorts the\ + \ data in ascending order. The suffix 'desc' sorts the data in descending\ + \ order. If no suffix is specified the data is sorted in ascending order.\n\ + \n\t\t\t\t\t\t" + in: query + name: _order_by + schema: + type: string + - description: "\n\nA collection of response resources can be transformed by\ + \ specifying a set of JSON tags to be returned. For a “flat” resource, the\ + \ tag name is straightforward. If field selection is allowed on non-flat\ + \ hierarchical resources, the service should implement a qualified naming\ + \ scheme such as dot-qualification to reference data down the hierarchy.\ + \ If a resource does not have the specified tag, the tag does not appear\ + \ in the output resource.\n\nSpecify this parameter as a comma-separated\ + \ list of JSON tag names.\n\n\t\t\t\t\t\t" + in: query + name: _fields + schema: + type: string + - description: "\n\nThe integer index (zero-origin) of the offset into a collection\ + \ of resources. If omitted or null the value is assumed to be '0'.\n\n\t\ + \t\t\t\t\t\t" + in: query + name: _offset + schema: + type: integer + - description: "\n\nThe integer number of resources to be returned in the response.\ + \ The service may impose maximum value. If omitted the service may impose\ + \ a default value.\n\n\t\t\t\t\t\t\t" + in: query + name: _limit + schema: + type: integer + - description: "\n\nThe service-defined string used to identify a page of resources.\ + \ A null value indicates the first page.\n\n\t\t\t\t\t\t\t" + in: query + name: _page_token + schema: + type: string + - description: This parameter is used for sorting by tags. + in: query + name: _torder_by + schema: + type: string + - description: This parameter is used for filtering by tags. + in: query + name: _tfilter + schema: + type: string + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/federationListFederatedRealmResponse' + description: GET operation response + summary: Retrieve federated realms. + tags: + - federated_realm + post: + description: |- + Use this method to create a __FederatedRealm__ object. + The __FederatedRealm__ object object is a unique set of federated blocks per realm. + operationId: federated_realmCreate + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/federationFederatedRealm' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/federationCreateFederatedRealmResponse' + description: POST operation response + summary: Create the federated realm. + tags: + - federated_realm + x-sdk-default-tags: true + x-codegen-request-body-name: body + /federation/federated_realm/{id}: + delete: + description: Use this method to delete a __FederatedRealm__ object. + operationId: federated_realmDelete + parameters: + - description: An application specific resource identity of a resource + in: path + name: id + required: true + schema: + type: string + responses: + "200": + content: {} + description: OK + summary: Delete federated realm. + tags: + - federated_realm + get: + description: |- + Use this method to retrieve a __FederatedRealm__ object. + The __FederatedRealm__ object object is a unique set of federated blocks per realm. + operationId: federated_realmRead + parameters: + - description: An application specific resource identity of a resource + in: path + name: id + required: true + schema: + type: string + - description: "\n\nA collection of response resources can be transformed by\ + \ specifying a set of JSON tags to be returned. For a “flat” resource, the\ + \ tag name is straightforward. If field selection is allowed on non-flat\ + \ hierarchical resources, the service should implement a qualified naming\ + \ scheme such as dot-qualification to reference data down the hierarchy.\ + \ If a resource does not have the specified tag, the tag does not appear\ + \ in the output resource.\n\nSpecify this parameter as a comma-separated\ + \ list of JSON tag names.\n\n\t\t\t\t\t\t" + in: query + name: _fields + schema: + type: string + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/federationReadFederatedRealmResponse' + description: GET operation response + summary: Retrieve the federated realm. + tags: + - federated_realm + patch: + description: |- + Use this method to update a __FederatedRealm__ object. + The __FederatedRealm__ object object is a unique set of federated blocks per realm. + operationId: federated_realmUpdate + parameters: + - description: An application specific resource identity of a resource + in: path + name: id + required: true + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/federationFederatedRealm' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/federationUpdateFederatedRealmResponse' + description: PATCH operation response + summary: Update the federated realm. + tags: + - federated_realm + x-sdk-default-tags: true + x-codegen-request-body-name: body + /federation/overlapping_block: + get: + description: |- + Use this method to retrieve __OverlappingBlock__ objects. + The __OverlappingBlock__ indicates an address range that may be managed independently by all participating IPAM services. + operationId: overlapping_blockList + parameters: + - description: "\n\nA collection of response resources can be transformed by\ + \ specifying a set of JSON tags to be returned. For a “flat” resource, the\ + \ tag name is straightforward. If field selection is allowed on non-flat\ + \ hierarchical resources, the service should implement a qualified naming\ + \ scheme such as dot-qualification to reference data down the hierarchy.\ + \ If a resource does not have the specified tag, the tag does not appear\ + \ in the output resource.\n\nSpecify this parameter as a comma-separated\ + \ list of JSON tag names.\n\n\t\t\t\t\t\t" + in: query + name: _fields + schema: + type: string + - description: "\n\nA collection of response resources can be filtered by a\ + \ logical expression string that includes JSON tag references to values\ + \ in each resource, literal values, and logical operators. If a resource\ + \ does not have the specified tag, its value is assumed to be null.\n\n\ + Literal values include numbers (integer and floating-point), and quoted\ + \ (both single- or double-quoted) literal strings, and 'null'. The following\ + \ operators are commonly used in filter expressions:\n\n| Op | Description\ + \ | \n| -- | ----------- | \n| == | \ + \ Equal | \n| != | Not Equal | \n\ + | > | Greater Than | \n| >= | Greater Than or Equal\ + \ To | \n| < | Less Than | \n| <= | Less Than\ + \ or Equal To | \n| and | Logical AND | \n| ~ |\ + \ Matches Regex | \n| !~ | Does Not Match Regex |\ + \ \n| or | Logical OR | \n| not | Logical NOT \ + \ | \n| () | Groupping Operators |\n\n\t\t\t\t\t\t" + in: query + name: _filter + schema: + type: string + - description: "\n\nThe integer index (zero-origin) of the offset into a collection\ + \ of resources. If omitted or null the value is assumed to be '0'.\n\n\t\ + \t\t\t\t\t\t" + in: query + name: _offset + schema: + type: integer + - description: "\n\nThe integer number of resources to be returned in the response.\ + \ The service may impose maximum value. If omitted the service may impose\ + \ a default value.\n\n\t\t\t\t\t\t\t" + in: query + name: _limit + schema: + type: integer + - description: "\n\nThe service-defined string used to identify a page of resources.\ + \ A null value indicates the first page.\n\n\t\t\t\t\t\t\t" + in: query + name: _page_token + schema: + type: string + - description: "\n\nA collection of response resources can be sorted by their\ + \ JSON tags. For a 'flat' resource, the tag name is straightforward. If\ + \ sorting is allowed on non-flat hierarchical resources, the service should\ + \ implement a qualified naming scheme such as dot-qualification to reference\ + \ data down the hierarchy. If a resource does not have the specified tag,\ + \ its value is assumed to be null.)\n\nSpecify this parameter as a comma-separated\ + \ list of JSON tag names. The sort direction can be specified by a suffix\ + \ separated by whitespace before the tag name. The suffix 'asc' sorts the\ + \ data in ascending order. The suffix 'desc' sorts the data in descending\ + \ order. If no suffix is specified the data is sorted in ascending order.\n\ + \n\t\t\t\t\t\t" + in: query + name: _order_by + schema: + type: string + - description: This parameter is used for sorting by tags. + in: query + name: _torder_by + schema: + type: string + - description: This parameter is used for filtering by tags. + in: query + name: _tfilter + schema: + type: string + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/federationListOverlappingBlockResponse' + description: GET operation response + summary: Retrieve the overlapping block. + tags: + - overlapping_block + post: + description: |- + Use this method to create an __OverlappingBlock__ object. + The __OverlappingBlock__ indicates an address range that may be managed independently by all participating IPAM services. + operationId: overlapping_blockCreate + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/federationOverlappingBlock' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/federationCreateOverlappingBlockResponse' + description: POST operation response + summary: Create the overlapping block. + tags: + - overlapping_block + x-sdk-default-tags: true + x-codegen-request-body-name: body + /federation/overlapping_block/{id}: + delete: + description: |- + Use this method to delete an __OverlappingBlock__ object. + The __OverlappingBlock__ indicates an address range that may be managed independently by all participating IPAM services. + operationId: overlapping_blockDelete + parameters: + - description: An application specific resource identity of a resource + in: path + name: id + required: true + schema: + type: string + responses: + "200": + content: {} + description: OK + summary: Delete the overlapping block. + tags: + - overlapping_block + get: + description: |- + Use this method to retrieve an __OverlappingBlock__ object. + The __OverlappingBlock__ indicates an address range that may be managed independently by all participating IPAM services. + operationId: overlapping_blockRead + parameters: + - description: An application specific resource identity of a resource + in: path + name: id + required: true + schema: + type: string + - description: "\n\nA collection of response resources can be transformed by\ + \ specifying a set of JSON tags to be returned. For a “flat” resource, the\ + \ tag name is straightforward. If field selection is allowed on non-flat\ + \ hierarchical resources, the service should implement a qualified naming\ + \ scheme such as dot-qualification to reference data down the hierarchy.\ + \ If a resource does not have the specified tag, the tag does not appear\ + \ in the output resource.\n\nSpecify this parameter as a comma-separated\ + \ list of JSON tag names.\n\n\t\t\t\t\t\t" + in: query + name: _fields + schema: + type: string + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/federationReadOverlappingBlockResponse' + description: GET operation response + summary: Retrieve the overlapping block. + tags: + - overlapping_block + patch: + description: |- + Use this method to update an __OverlappingBlock__ object. + The __OverlappingBlock__ indicates an address range that may be managed independently by all participating IPAM services. + operationId: overlapping_blockUpdate + parameters: + - description: An application specific resource identity of a resource + in: path + name: id + required: true + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/federationOverlappingBlock' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/federationUpdateOverlappingBlockResponse' + description: PATCH operation response + summary: Update the overlapping block. + tags: + - overlapping_block + x-sdk-default-tags: true + x-codegen-request-body-name: body + /federation/reserved_block: + get: + description: |- + Use this method to retrieve __ReservedBlock__ objects. + The __ReservedBlock__ indicates an address range for which authority is expressly forbidden. Cooperating IPAM services must not make allocations in this range. + operationId: reserved_blockList + parameters: + - description: "\n\nA collection of response resources can be transformed by\ + \ specifying a set of JSON tags to be returned. For a “flat” resource, the\ + \ tag name is straightforward. If field selection is allowed on non-flat\ + \ hierarchical resources, the service should implement a qualified naming\ + \ scheme such as dot-qualification to reference data down the hierarchy.\ + \ If a resource does not have the specified tag, the tag does not appear\ + \ in the output resource.\n\nSpecify this parameter as a comma-separated\ + \ list of JSON tag names.\n\n\t\t\t\t\t\t" + in: query + name: _fields + schema: + type: string + - description: "\n\nA collection of response resources can be filtered by a\ + \ logical expression string that includes JSON tag references to values\ + \ in each resource, literal values, and logical operators. If a resource\ + \ does not have the specified tag, its value is assumed to be null.\n\n\ + Literal values include numbers (integer and floating-point), and quoted\ + \ (both single- or double-quoted) literal strings, and 'null'. The following\ + \ operators are commonly used in filter expressions:\n\n| Op | Description\ + \ | \n| -- | ----------- | \n| == | \ + \ Equal | \n| != | Not Equal | \n\ + | > | Greater Than | \n| >= | Greater Than or Equal\ + \ To | \n| < | Less Than | \n| <= | Less Than\ + \ or Equal To | \n| and | Logical AND | \n| ~ |\ + \ Matches Regex | \n| !~ | Does Not Match Regex |\ + \ \n| or | Logical OR | \n| not | Logical NOT \ + \ | \n| () | Groupping Operators |\n\n\t\t\t\t\t\t" + in: query + name: _filter + schema: + type: string + - description: "\n\nThe integer index (zero-origin) of the offset into a collection\ + \ of resources. If omitted or null the value is assumed to be '0'.\n\n\t\ + \t\t\t\t\t\t" + in: query + name: _offset + schema: + type: integer + - description: "\n\nThe integer number of resources to be returned in the response.\ + \ The service may impose maximum value. If omitted the service may impose\ + \ a default value.\n\n\t\t\t\t\t\t\t" + in: query + name: _limit + schema: + type: integer + - description: "\n\nThe service-defined string used to identify a page of resources.\ + \ A null value indicates the first page.\n\n\t\t\t\t\t\t\t" + in: query + name: _page_token + schema: + type: string + - description: "\n\nA collection of response resources can be sorted by their\ + \ JSON tags. For a 'flat' resource, the tag name is straightforward. If\ + \ sorting is allowed on non-flat hierarchical resources, the service should\ + \ implement a qualified naming scheme such as dot-qualification to reference\ + \ data down the hierarchy. If a resource does not have the specified tag,\ + \ its value is assumed to be null.)\n\nSpecify this parameter as a comma-separated\ + \ list of JSON tag names. The sort direction can be specified by a suffix\ + \ separated by whitespace before the tag name. The suffix 'asc' sorts the\ + \ data in ascending order. The suffix 'desc' sorts the data in descending\ + \ order. If no suffix is specified the data is sorted in ascending order.\n\ + \n\t\t\t\t\t\t" + in: query + name: _order_by + schema: + type: string + - description: This parameter is used for sorting by tags. + in: query + name: _torder_by + schema: + type: string + - description: This parameter is used for filtering by tags. + in: query + name: _tfilter + schema: + type: string + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/federationListReservedBlockResponse' + description: GET operation response + summary: Retrieve the reserved block. + tags: + - reserved_block + post: + description: |- + Use this method to create a __ReservedBlock__ object. + The __ReservedBlock__ indicates an address range for which authority is expressly forbidden. Cooperating IPAM services must not make allocations in this range. + operationId: reserved_blockCreate + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/federationReservedBlock' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/federationCreateReservedBlockResponse' + description: POST operation response + summary: Create the reserved block. + tags: + - reserved_block + x-sdk-default-tags: true + x-codegen-request-body-name: body + /federation/reserved_block/{id}: + delete: + description: |- + Use this method to delete a __ReservedBlock__ object. + The __ReservedBlock__ indicates an address range for which authority is expressly forbidden. Cooperating IPAM services must not make allocations in this range. + operationId: reserved_blockDelete + parameters: + - description: An application specific resource identity of a resource + in: path + name: id + required: true + schema: + type: string + responses: + "200": + content: {} + description: OK + summary: Delete the reserved block. + tags: + - reserved_block + get: + description: |- + Use this method to retrieve a __ReservedBlock__ object. + The __ReservedBlock__ indicates an address range for which authority is expressly forbidden. Cooperating IPAM services must not make allocations in this range. + operationId: reserved_blockRead + parameters: + - description: An application specific resource identity of a resource + in: path + name: id + required: true + schema: + type: string + - description: "\n\nA collection of response resources can be transformed by\ + \ specifying a set of JSON tags to be returned. For a “flat” resource, the\ + \ tag name is straightforward. If field selection is allowed on non-flat\ + \ hierarchical resources, the service should implement a qualified naming\ + \ scheme such as dot-qualification to reference data down the hierarchy.\ + \ If a resource does not have the specified tag, the tag does not appear\ + \ in the output resource.\n\nSpecify this parameter as a comma-separated\ + \ list of JSON tag names.\n\n\t\t\t\t\t\t" + in: query + name: _fields + schema: + type: string + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/federationReadReservedBlockResponse' + description: GET operation response + summary: Retrieve the reserved block. + tags: + - reserved_block + patch: + description: |- + Use this method to update a __ReservedBlock__ object. + The __ReservedBlock__ indicates an address range for which authority is expressly forbidden. Cooperating IPAM services must not make allocations in this range. + operationId: reserved_blockUpdate + parameters: + - description: An application specific resource identity of a resource + in: path + name: id + required: true + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/federationReservedBlock' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/federationUpdateReservedBlockResponse' + description: PATCH operation response + summary: Update the reserved block. + tags: + - reserved_block + x-sdk-default-tags: true + x-codegen-request-body-name: body +components: + schemas: + federationAllocation: + description: The __Allocation__ tracks the distribution of Federated Blocks + within each of the supported objects. + example: + reserved: 5 + overlapping: 1 + delegated: 6 + allocated: 0 + properties: + allocated: + description: Percent of total space allocated. + format: int64 + readOnly: true + type: integer + delegated: + description: Percent of total space delegated. + format: int64 + readOnly: true + type: integer + overlapping: + description: Percent of total space in overlapping blocks. + format: int64 + readOnly: true + type: integer + reserved: + description: Percent of total space reserved. + format: int64 + readOnly: true + type: integer + title: Allocation + type: object + federationCreateFederatedBlockResponse: + description: The response format to create the __FederatedBlock__ object. + example: + result: + parent: parent + protocol: protocol + address: address + federated_realm: federated_realm + updated_at: 2000-01-23T04:56:07.000+00:00 + name: name + created_at: 2000-01-23T04:56:07.000+00:00 + cidr: 72 + comment: comment + id: id + allocation_v4: + reserved: 5 + overlapping: 1 + delegated: 6 + allocated: 0 + tags: "{}" + properties: + result: + $ref: '#/components/schemas/federationFederatedBlock' + title: CreateFederatedBlockResponse + type: object + federationCreateFederatedRealmResponse: + description: The response format to create the __FederatedRealm__ object. + example: + result: + updated_at: 2000-01-23T04:56:07.000+00:00 + name: name + created_at: 2000-01-23T04:56:07.000+00:00 + comment: comment + id: id + allocation_v4: + reserved: 5 + overlapping: 1 + delegated: 6 + allocated: 0 + tags: "{}" + properties: + result: + $ref: '#/components/schemas/federationFederatedRealm' + title: CreateFederatedRealmResponse + type: object + federationCreateNextAvailableFederatedBlockResponse: + description: The response format to allocate next available __FederatedBlock__ + objects. + example: + results: + - parent: parent + protocol: protocol + address: address + federated_realm: federated_realm + updated_at: 2000-01-23T04:56:07.000+00:00 + name: name + created_at: 2000-01-23T04:56:07.000+00:00 + cidr: 72 + comment: comment + id: id + allocation_v4: + reserved: 5 + overlapping: 1 + delegated: 6 + allocated: 0 + tags: "{}" + - parent: parent + protocol: protocol + address: address + federated_realm: federated_realm + updated_at: 2000-01-23T04:56:07.000+00:00 + name: name + created_at: 2000-01-23T04:56:07.000+00:00 + cidr: 72 + comment: comment + id: id + allocation_v4: + reserved: 5 + overlapping: 1 + delegated: 6 + allocated: 0 + tags: "{}" + properties: + results: + items: + $ref: '#/components/schemas/federationFederatedBlock' + type: array + title: CreateNextAvailableFederatedBlockResponse + type: object + federationCreateNextAvailableOverlappingBlockResponse: + description: The response format to allocate next available __OverlappingBlock__ + objects. + example: + results: + - parent: parent + protocol: protocol + address: address + federated_realm: federated_realm + updated_at: 2000-01-23T04:56:07.000+00:00 + name: name + created_at: 2000-01-23T04:56:07.000+00:00 + cidr: 11 + comment: comment + id: id + tags: "{}" + - parent: parent + protocol: protocol + address: address + federated_realm: federated_realm + updated_at: 2000-01-23T04:56:07.000+00:00 + name: name + created_at: 2000-01-23T04:56:07.000+00:00 + cidr: 11 + comment: comment + id: id + tags: "{}" + properties: + results: + items: + $ref: '#/components/schemas/federationOverlappingBlock' + type: array + title: CreateNextAvailableOverlappingBlockResponse + type: object + federationCreateNextAvailableReservedBlockResponse: + description: The response format to allocate next available __ReservedBlock__ + objects. + example: + results: + - parent: parent + protocol: protocol + address: address + federated_realm: federated_realm + updated_at: 2000-01-23T04:56:07.000+00:00 + name: name + created_at: 2000-01-23T04:56:07.000+00:00 + cidr: 11 + comment: comment + id: id + tags: "{}" + - parent: parent + protocol: protocol + address: address + federated_realm: federated_realm + updated_at: 2000-01-23T04:56:07.000+00:00 + name: name + created_at: 2000-01-23T04:56:07.000+00:00 + cidr: 11 + comment: comment + id: id + tags: "{}" + properties: + results: + items: + $ref: '#/components/schemas/federationReservedBlock' + type: array + title: CreateNextAvailableReservedBlockResponse + type: object + federationCreateOverlappingBlockResponse: + description: The response format to create the __OverlappingBlock__ object. + example: + result: + parent: parent + protocol: protocol + address: address + federated_realm: federated_realm + updated_at: 2000-01-23T04:56:07.000+00:00 + name: name + created_at: 2000-01-23T04:56:07.000+00:00 + cidr: 11 + comment: comment + id: id + tags: "{}" + properties: + result: + $ref: '#/components/schemas/federationOverlappingBlock' + title: CreateOverlappingBlockResponse + type: object + federationCreateReservedBlockResponse: + description: The response format to create the __ReservedBlock__ object. + example: + result: + parent: parent + protocol: protocol + address: address + federated_realm: federated_realm + updated_at: 2000-01-23T04:56:07.000+00:00 + name: name + created_at: 2000-01-23T04:56:07.000+00:00 + cidr: 11 + comment: comment + id: id + tags: "{}" + properties: + result: + $ref: '#/components/schemas/federationReservedBlock' + title: CreateReservedBlockResponse + type: object + federationFederatedBlock: + description: "A __FederatedBlock__ object (_federation/federated_block_) is\ + \ a set of contiguous IP addresses with no gap, expressed as a CIDR block.\ + \ Federated blocks are hierarchical and may be parented to other federated\ + \ blocks as long as the parent block fully contains the child and no sibling\ + \ overlaps. Top level federated blocks are parented to a federated realm." + example: + parent: parent + protocol: protocol + address: address + federated_realm: federated_realm + updated_at: 2000-01-23T04:56:07.000+00:00 + name: name + created_at: 2000-01-23T04:56:07.000+00:00 + cidr: 72 + comment: comment + id: id + allocation_v4: + reserved: 5 + overlapping: 1 + delegated: 6 + allocated: 0 + tags: "{}" + properties: + address: + description: "The address field in form “a.b.c.d/n” where the “/n” may be\ + \ omitted. In this case, the CIDR value must be defined in the _cidr_\ + \ field. When reading, the _address_ field is always in the form “a.b.c.d”\ + ." + type: string + allocation_v4: + $ref: '#/components/schemas/federationAllocation' + cidr: + description: "The CIDR of the federated block. This is required, if _address_\ + \ does not specify it in its input." + format: int64 + maximum: 128 + minimum: 1 + type: integer + comment: + description: The description for the federated block. May contain 0 to 1024 + characters. Can include UTF-8. + type: string + created_at: + description: Time when the object has been created. + format: date-time + readOnly: true + type: string + federated_realm: + description: The resource identifier. + type: string + id: + description: The resource identifier. + readOnly: true + type: string + name: + description: The name of the federated block. May contain 1 to 256 characters. + Can include UTF-8. + type: string + parent: + description: The resource identifier. + type: string + protocol: + description: The type of protocol of federated block (_ip4_ or _ip6_). + readOnly: true + type: string + tags: + additionalProperties: false + description: The tags for the federated block in JSON format. + type: object + updated_at: + description: Time when the object has been updated. Equals to _created_at_ + if not updated after creation. + format: date-time + readOnly: true + type: string + title: FederatedBlock + type: object + federationFederatedRealm: + description: A __FederatedRealm__ object is a unique set of federated blocks + per realm. + example: + updated_at: 2000-01-23T04:56:07.000+00:00 + name: name + created_at: 2000-01-23T04:56:07.000+00:00 + comment: comment + id: id + allocation_v4: + reserved: 5 + overlapping: 1 + delegated: 6 + allocated: 0 + tags: "{}" + properties: + allocation_v4: + $ref: '#/components/schemas/federationAllocation' + comment: + description: The description of the federated realm. May contain 0 to 1024 + characters. Can include UTF-8. + type: string + created_at: + description: Time when the object has been created. + format: date-time + readOnly: true + type: string + id: + description: The resource identifier. + readOnly: true + type: string + name: + description: The name of the federated realm. May contain 1 to 256 characters; + can include UTF-8. + type: string + tags: + additionalProperties: false + description: The tags for the federated realm in JSON format. + type: object + updated_at: + description: Time when the object has been updated. Equals to _created_at_ + if not updated after creation. + format: date-time + readOnly: true + type: string + required: + - name + title: FederatedRealm + type: object + federationListFederatedBlockResponse: + description: The response format to retrieve __FederatedBlock__ objects. + example: + results: + - parent: parent + protocol: protocol + address: address + federated_realm: federated_realm + updated_at: 2000-01-23T04:56:07.000+00:00 + name: name + created_at: 2000-01-23T04:56:07.000+00:00 + cidr: 72 + comment: comment + id: id + allocation_v4: + reserved: 5 + overlapping: 1 + delegated: 6 + allocated: 0 + tags: "{}" + - parent: parent + protocol: protocol + address: address + federated_realm: federated_realm + updated_at: 2000-01-23T04:56:07.000+00:00 + name: name + created_at: 2000-01-23T04:56:07.000+00:00 + cidr: 72 + comment: comment + id: id + allocation_v4: + reserved: 5 + overlapping: 1 + delegated: 6 + allocated: 0 + tags: "{}" + properties: + results: + description: A list of FederatedBlock objects. + items: + $ref: '#/components/schemas/federationFederatedBlock' + type: array + title: ListFederatedBlockResponse + type: object + federationListFederatedRealmResponse: + description: The response format to retrieve __FederatedRealm__ objects. + example: + results: + - updated_at: 2000-01-23T04:56:07.000+00:00 + name: name + created_at: 2000-01-23T04:56:07.000+00:00 + comment: comment + id: id + allocation_v4: + reserved: 5 + overlapping: 1 + delegated: 6 + allocated: 0 + tags: "{}" + - updated_at: 2000-01-23T04:56:07.000+00:00 + name: name + created_at: 2000-01-23T04:56:07.000+00:00 + comment: comment + id: id + allocation_v4: + reserved: 5 + overlapping: 1 + delegated: 6 + allocated: 0 + tags: "{}" + properties: + results: + description: The list of FederatedRealm objects. + items: + $ref: '#/components/schemas/federationFederatedRealm' + type: array + title: ListFederatedRealmResponse + type: object + federationListNextAvailableFederatedBlockResponse: + description: The response format to list next available __FederatedBlock__ objects. + example: + results: + - parent: parent + protocol: protocol + address: address + federated_realm: federated_realm + updated_at: 2000-01-23T04:56:07.000+00:00 + name: name + created_at: 2000-01-23T04:56:07.000+00:00 + cidr: 72 + comment: comment + id: id + allocation_v4: + reserved: 5 + overlapping: 1 + delegated: 6 + allocated: 0 + tags: "{}" + - parent: parent + protocol: protocol + address: address + federated_realm: federated_realm + updated_at: 2000-01-23T04:56:07.000+00:00 + name: name + created_at: 2000-01-23T04:56:07.000+00:00 + cidr: 72 + comment: comment + id: id + allocation_v4: + reserved: 5 + overlapping: 1 + delegated: 6 + allocated: 0 + tags: "{}" + properties: + results: + items: + $ref: '#/components/schemas/federationFederatedBlock' + type: array + title: ListNextAvailableFederatedBlockResponse + type: object + federationListNextAvailableOverlappingBlockResponse: + description: The response format to list next available __OverlappingBlock__ + objects. + example: + results: + - parent: parent + protocol: protocol + address: address + federated_realm: federated_realm + updated_at: 2000-01-23T04:56:07.000+00:00 + name: name + created_at: 2000-01-23T04:56:07.000+00:00 + cidr: 11 + comment: comment + id: id + tags: "{}" + - parent: parent + protocol: protocol + address: address + federated_realm: federated_realm + updated_at: 2000-01-23T04:56:07.000+00:00 + name: name + created_at: 2000-01-23T04:56:07.000+00:00 + cidr: 11 + comment: comment + id: id + tags: "{}" + properties: + results: + items: + $ref: '#/components/schemas/federationOverlappingBlock' + type: array + title: ListNextAvailableOverlappingBlockResponse + type: object + federationListNextAvailableReservedBlockResponse: + description: The response format to list next available __ReservedBlock__ objects. + example: + results: + - parent: parent + protocol: protocol + address: address + federated_realm: federated_realm + updated_at: 2000-01-23T04:56:07.000+00:00 + name: name + created_at: 2000-01-23T04:56:07.000+00:00 + cidr: 11 + comment: comment + id: id + tags: "{}" + - parent: parent + protocol: protocol + address: address + federated_realm: federated_realm + updated_at: 2000-01-23T04:56:07.000+00:00 + name: name + created_at: 2000-01-23T04:56:07.000+00:00 + cidr: 11 + comment: comment + id: id + tags: "{}" + properties: + results: + items: + $ref: '#/components/schemas/federationReservedBlock' + type: array + title: ListNextAvailableReservedBlockResponse + type: object + federationListOverlappingBlockResponse: + description: The response format to retrieve __OverlappingBlock__ objects. + example: + results: + - parent: parent + protocol: protocol + address: address + federated_realm: federated_realm + updated_at: 2000-01-23T04:56:07.000+00:00 + name: name + created_at: 2000-01-23T04:56:07.000+00:00 + cidr: 11 + comment: comment + id: id + tags: "{}" + - parent: parent + protocol: protocol + address: address + federated_realm: federated_realm + updated_at: 2000-01-23T04:56:07.000+00:00 + name: name + created_at: 2000-01-23T04:56:07.000+00:00 + cidr: 11 + comment: comment + id: id + tags: "{}" + properties: + results: + description: A list of OverlappingBlock objects. + items: + $ref: '#/components/schemas/federationOverlappingBlock' + type: array + title: ListOverlappingBlockResponse + type: object + federationListReservedBlockResponse: + description: The response format to retrieve __ReservedBlock__ objects. + example: + results: + - parent: parent + protocol: protocol + address: address + federated_realm: federated_realm + updated_at: 2000-01-23T04:56:07.000+00:00 + name: name + created_at: 2000-01-23T04:56:07.000+00:00 + cidr: 11 + comment: comment + id: id + tags: "{}" + - parent: parent + protocol: protocol + address: address + federated_realm: federated_realm + updated_at: 2000-01-23T04:56:07.000+00:00 + name: name + created_at: 2000-01-23T04:56:07.000+00:00 + cidr: 11 + comment: comment + id: id + tags: "{}" + properties: + results: + description: A list of ReservedBlock objects. + items: + $ref: '#/components/schemas/federationReservedBlock' + type: array + title: ListReservedBlockResponse + type: object + federationNextAvailableBlockRequest: + properties: + cidr: + description: "The CIDR of the federated block. This is required, if _address_\ + \ does not specify it in its input." + format: int64 + maximum: 128 + minimum: 1 + type: integer + comment: + description: The description for the _federation/federated_block_. May contain + 0 to 1024 characters. Can include UTF-8. + type: string + count: + description: "The count of __Block__ required. If not provided, it will\ + \ default to 1." + format: int64 + type: integer + id: + description: The resource identifier. + readOnly: true + type: string + name: + description: The name to be provided. + type: string + tags: + additionalProperties: false + description: The tags for the federated block in JSON format. + type: object + type: object + federationOverlappingBlock: + description: "An __OverlappingBlock__ object (_federation/overlapping_block_)\ + \ is a set of contiguous IP addresses with no gap, expressed as a CIDR block.\ + \ It is explicitly associated with a Federated Realm, and implicitly with\ + \ a Federated Block Parent. An __OverlappingBlock__ in a given realm is said\ + \ to be the child of the closest enclosing parent. An __OverlappingBlock__\ + \ indicates an address range that may be managed independently by all participating\ + \ IPAM services." + example: + parent: parent + protocol: protocol + address: address + federated_realm: federated_realm + updated_at: 2000-01-23T04:56:07.000+00:00 + name: name + created_at: 2000-01-23T04:56:07.000+00:00 + cidr: 11 + comment: comment + id: id + tags: "{}" + properties: + address: + description: "The address field in form “a.b.c.d/n” where the “/n” may be\ + \ omitted. In this case, the CIDR value must be defined in the _cidr_\ + \ field. When reading, the _address_ field is always in the form “a.b.c.d”\ + ." + type: string + cidr: + description: "The CIDR of the overlapping block. This is required, if _address_\ + \ does not specify it in its input." + format: int64 + maximum: 128 + minimum: 1 + type: integer + comment: + description: The description for the overlapping block. May contain 0 to + 1024 characters. Can include UTF-8. + type: string + created_at: + description: Time when the object has been created. + format: date-time + readOnly: true + type: string + federated_realm: + description: The resource identifier. + type: string + id: + description: The resource identifier. + readOnly: true + type: string + name: + description: The name of the overlapping block. May contain 1 to 256 characters. + Can include UTF-8. + type: string + parent: + description: The resource identifier. + type: string + protocol: + description: The type of protocol of overlapping block (_ip4_ or _ip6_). + readOnly: true + type: string + tags: + additionalProperties: false + description: The tags for the overlapping block in JSON format. + type: object + updated_at: + description: Time when the object has been updated. Equals to _created_at_ + if not updated after creation. + format: date-time + readOnly: true + type: string + required: + - address + - federated_realm + title: OverlappingBlock + type: object + federationReadFederatedBlockResponse: + description: The response format to retrieve the __FederatedBlock__ object. + example: + result: + parent: parent + protocol: protocol + address: address + federated_realm: federated_realm + updated_at: 2000-01-23T04:56:07.000+00:00 + name: name + created_at: 2000-01-23T04:56:07.000+00:00 + cidr: 72 + comment: comment + id: id + allocation_v4: + reserved: 5 + overlapping: 1 + delegated: 6 + allocated: 0 + tags: "{}" + properties: + result: + $ref: '#/components/schemas/federationFederatedBlock' + title: ReadFederatedBlockResponse + type: object + federationReadFederatedRealmResponse: + description: The response format to retrieve the __FederatedRealm__ object. + example: + result: + updated_at: 2000-01-23T04:56:07.000+00:00 + name: name + created_at: 2000-01-23T04:56:07.000+00:00 + comment: comment + id: id + allocation_v4: + reserved: 5 + overlapping: 1 + delegated: 6 + allocated: 0 + tags: "{}" + properties: + result: + $ref: '#/components/schemas/federationFederatedRealm' + title: ReadFederatedRealmResponse + type: object + federationReadOverlappingBlockResponse: + description: The response format to retrieve the __OverlappingBlock__ object. + example: + result: + parent: parent + protocol: protocol + address: address + federated_realm: federated_realm + updated_at: 2000-01-23T04:56:07.000+00:00 + name: name + created_at: 2000-01-23T04:56:07.000+00:00 + cidr: 11 + comment: comment + id: id + tags: "{}" + properties: + result: + $ref: '#/components/schemas/federationOverlappingBlock' + title: ReadOverlappingBlockResponse + type: object + federationReadReservedBlockResponse: + description: The response format to retrieve the __ReservedBlock__ object. + example: + result: + parent: parent + protocol: protocol + address: address + federated_realm: federated_realm + updated_at: 2000-01-23T04:56:07.000+00:00 + name: name + created_at: 2000-01-23T04:56:07.000+00:00 + cidr: 11 + comment: comment + id: id + tags: "{}" + properties: + result: + $ref: '#/components/schemas/federationReservedBlock' + title: ReadReservedBlockResponse + type: object + federationReservedBlock: + description: "A __ReservedBlock__ object (_federation/reserved_block_) is a\ + \ set of contiguous IP addresses with no gap, expressed as a CIDR block. It\ + \ is explicitly associated with a Federated Realm. A __ReservedBlock__ indicates\ + \ an address range for which authority is expressly forbidden. Cooperating\ + \ IPAM services must not make allocations in this range." + example: + parent: parent + protocol: protocol + address: address + federated_realm: federated_realm + updated_at: 2000-01-23T04:56:07.000+00:00 + name: name + created_at: 2000-01-23T04:56:07.000+00:00 + cidr: 11 + comment: comment + id: id + tags: "{}" + properties: + address: + description: "The address field in form “a.b.c.d/n” where the “/n” may be\ + \ omitted. In this case, the CIDR value must be defined in the _cidr_\ + \ field. When reading, the _address_ field is always in the form “a.b.c.d”\ + ." + type: string + cidr: + description: "The CIDR of the reserved block. This is required field, if\ + \ _address_ does not specify it in its input." + format: int64 + maximum: 128 + minimum: 1 + type: integer + comment: + description: The description for the reserved block. May contain 0 to 1024 + characters. Can include UTF-8. + type: string + created_at: + description: Time when the object has been created. + format: date-time + readOnly: true + type: string + federated_realm: + description: The resource identifier. + type: string + id: + description: The resource identifier. + readOnly: true + type: string + name: + description: The name of the reserved block. May contain 1 to 256 characters. + Can include UTF-8. + type: string + parent: + description: The resource identifier. + type: string + protocol: + description: The type of protocol of reserved block (_ip4_ or _ip6_). + readOnly: true + type: string + tags: + additionalProperties: false + description: The tags for the reserved block in JSON format. + type: object + updated_at: + description: Time when the object has been updated. Equals to _created_at_ + if not updated after creation. + format: date-time + readOnly: true + type: string + required: + - address + - federated_realm + title: ReservedBlock + type: object + federationUpdateFederatedBlockResponse: + description: The response format to update the __FederatedBlock__ object. + example: + result: + parent: parent + protocol: protocol + address: address + federated_realm: federated_realm + updated_at: 2000-01-23T04:56:07.000+00:00 + name: name + created_at: 2000-01-23T04:56:07.000+00:00 + cidr: 72 + comment: comment + id: id + allocation_v4: + reserved: 5 + overlapping: 1 + delegated: 6 + allocated: 0 + tags: "{}" + properties: + result: + $ref: '#/components/schemas/federationFederatedBlock' + title: UpdateFederatedBlockResponse + type: object + federationUpdateFederatedRealmResponse: + description: The response format to update the __FederatedRealm__ object. + example: + result: + updated_at: 2000-01-23T04:56:07.000+00:00 + name: name + created_at: 2000-01-23T04:56:07.000+00:00 + comment: comment + id: id + allocation_v4: + reserved: 5 + overlapping: 1 + delegated: 6 + allocated: 0 + tags: "{}" + properties: + result: + $ref: '#/components/schemas/federationFederatedRealm' + title: UpdateFederatedRealmResponse + type: object + federationUpdateOverlappingBlockResponse: + description: The response format to update the __OverlappingBlock__ object. + example: + result: + parent: parent + protocol: protocol + address: address + federated_realm: federated_realm + updated_at: 2000-01-23T04:56:07.000+00:00 + name: name + created_at: 2000-01-23T04:56:07.000+00:00 + cidr: 11 + comment: comment + id: id + tags: "{}" + properties: + result: + $ref: '#/components/schemas/federationOverlappingBlock' + title: UpdateOverlappingBlockResponse + type: object + federationUpdateReservedBlockResponse: + description: The response format to update the __ReservedBlock__ object. + example: + result: + parent: parent + protocol: protocol + address: address + federated_realm: federated_realm + updated_at: 2000-01-23T04:56:07.000+00:00 + name: name + created_at: 2000-01-23T04:56:07.000+00:00 + cidr: 11 + comment: comment + id: id + tags: "{}" + properties: + result: + $ref: '#/components/schemas/federationReservedBlock' + title: UpdateReservedBlockResponse + type: object + securitySchemes: + ApiKeyAuth: + in: header + name: Authorization + type: apiKey +x-original-swagger-version: "2.0" diff --git a/ipamfederation/api_federated_block.go b/ipamfederation/api_federated_block.go new file mode 100644 index 0000000..818255f --- /dev/null +++ b/ipamfederation/api_federated_block.go @@ -0,0 +1,706 @@ +/* +IPAM Federation API + +The DDI IPAM Federation application enables a SaaS administrator to manage multiple IPAM systems from one central control point CSP. + +API version: v1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package ipamfederation + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" + + "github.com/infobloxopen/bloxone-go-client/internal" +) + +type FederatedBlockAPI interface { + /* + Create Create the federated block. + + Use this method to create a __FederatedBlock__ object. + The __FederatedBlock__ object allows a uniform representation of the address space segmentation, supporting functions such as administrative grouping, routing aggregation, delegation etc. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return FederatedBlockAPICreateRequest + */ + Create(ctx context.Context) FederatedBlockAPICreateRequest + + // CreateExecute executes the request + // @return CreateFederatedBlockResponse + CreateExecute(r FederatedBlockAPICreateRequest) (*CreateFederatedBlockResponse, *http.Response, error) + /* + Delete Delete the federated block. + + Use this method to delete a __FederatedBlock__ object. + The __FederatedBlock__ object allows a uniform representation of the address space segmentation, supporting functions such as administrative grouping, routing aggregation, delegation etc. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return FederatedBlockAPIDeleteRequest + */ + Delete(ctx context.Context, id string) FederatedBlockAPIDeleteRequest + + // DeleteExecute executes the request + DeleteExecute(r FederatedBlockAPIDeleteRequest) (*http.Response, error) + /* + List Retrieve the federated blocks. + + Use this method to retrieve __FederatedBlock__ objects. + The __FederatedBlock__ object allows a uniform representation of the address space segmentation, supporting functions such as administrative grouping, routing aggregation, delegation etc. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return FederatedBlockAPIListRequest + */ + List(ctx context.Context) FederatedBlockAPIListRequest + + // ListExecute executes the request + // @return ListFederatedBlockResponse + ListExecute(r FederatedBlockAPIListRequest) (*ListFederatedBlockResponse, *http.Response, error) + /* + Read Retrieve the federated block. + + Use this method to retrieve a __FederatedBlock__ object. + The __FederatedBlock__ object allows a uniform representation of the address space segmentation, supporting functions such as administrative grouping, routing aggregation, delegation etc. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return FederatedBlockAPIReadRequest + */ + Read(ctx context.Context, id string) FederatedBlockAPIReadRequest + + // ReadExecute executes the request + // @return ReadFederatedBlockResponse + ReadExecute(r FederatedBlockAPIReadRequest) (*ReadFederatedBlockResponse, *http.Response, error) + /* + Update Update the federated block. + + Use this method to update a __FederatedBlock__ object. + The __FederatedBlock__ object allows a uniform representation of the address space segmentation, supporting functions such as administrative grouping, routing aggregation, delegation etc. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return FederatedBlockAPIUpdateRequest + */ + Update(ctx context.Context, id string) FederatedBlockAPIUpdateRequest + + // UpdateExecute executes the request + // @return UpdateFederatedBlockResponse + UpdateExecute(r FederatedBlockAPIUpdateRequest) (*UpdateFederatedBlockResponse, *http.Response, error) +} + +// FederatedBlockAPIService FederatedBlockAPI service +type FederatedBlockAPIService internal.Service + +type FederatedBlockAPICreateRequest struct { + ctx context.Context + ApiService FederatedBlockAPI + body *FederatedBlock +} + +func (r FederatedBlockAPICreateRequest) Body(body FederatedBlock) FederatedBlockAPICreateRequest { + r.body = &body + return r +} + +func (r FederatedBlockAPICreateRequest) Execute() (*CreateFederatedBlockResponse, *http.Response, error) { + return r.ApiService.CreateExecute(r) +} + +/* +Create Create the federated block. + +Use this method to create a __FederatedBlock__ object. +The __FederatedBlock__ object allows a uniform representation of the address space segmentation, supporting functions such as administrative grouping, routing aggregation, delegation etc. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return FederatedBlockAPICreateRequest +*/ +func (a *FederatedBlockAPIService) Create(ctx context.Context) FederatedBlockAPICreateRequest { + return FederatedBlockAPICreateRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return CreateFederatedBlockResponse +func (a *FederatedBlockAPIService) CreateExecute(r FederatedBlockAPICreateRequest) (*CreateFederatedBlockResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *CreateFederatedBlockResponse + ) + + localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "FederatedBlockAPIService.Create") + if err != nil { + return localVarReturnValue, nil, internal.NewGenericOpenAPIError(err.Error()) + } + + localVarPath := localBasePath + "/federation/federated_block" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.body == nil { + return localVarReturnValue, nil, internal.ReportError("body is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := internal.SelectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := internal.SelectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if len(a.Client.Cfg.DefaultTags) > 0 && r.body != nil { + if r.body.Tags == nil { + r.body.Tags = make(map[string]interface{}) + } + for k, v := range a.Client.Cfg.DefaultTags { + if _, ok := r.body.Tags[k]; !ok { + r.body.Tags[k] = v + } + } + } + // body params + localVarPostBody = r.body + req, err := a.Client.PrepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.Client.CallAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := internal.NewGenericOpenAPIErrorWithBody(localVarHTTPResponse.Status, localVarBody) + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.Client.Decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) + return localVarReturnValue, localVarHTTPResponse, newErr + } + return localVarReturnValue, localVarHTTPResponse, nil +} + +type FederatedBlockAPIDeleteRequest struct { + ctx context.Context + ApiService FederatedBlockAPI + id string +} + +func (r FederatedBlockAPIDeleteRequest) Execute() (*http.Response, error) { + return r.ApiService.DeleteExecute(r) +} + +/* +Delete Delete the federated block. + +Use this method to delete a __FederatedBlock__ object. +The __FederatedBlock__ object allows a uniform representation of the address space segmentation, supporting functions such as administrative grouping, routing aggregation, delegation etc. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return FederatedBlockAPIDeleteRequest +*/ +func (a *FederatedBlockAPIService) Delete(ctx context.Context, id string) FederatedBlockAPIDeleteRequest { + return FederatedBlockAPIDeleteRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +func (a *FederatedBlockAPIService) DeleteExecute(r FederatedBlockAPIDeleteRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []internal.FormFile + ) + + localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "FederatedBlockAPIService.Delete") + if err != nil { + return nil, internal.NewGenericOpenAPIError(err.Error()) + } + + localVarPath := localBasePath + "/federation/federated_block/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(internal.ParameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := internal.SelectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{} + + // set Accept header + localVarHTTPHeaderAccept := internal.SelectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.Client.PrepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return nil, err + } + + localVarHTTPResponse, err := a.Client.CallAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := internal.NewGenericOpenAPIErrorWithBody(localVarHTTPResponse.Status, localVarBody) + return localVarHTTPResponse, newErr + } + + return localVarHTTPResponse, nil +} + +type FederatedBlockAPIListRequest struct { + ctx context.Context + ApiService FederatedBlockAPI + fields *string + filter *string + offset *int32 + limit *int32 + pageToken *string + orderBy *string + torderBy *string + tfilter *string +} + +// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. +func (r FederatedBlockAPIListRequest) Fields(fields string) FederatedBlockAPIListRequest { + r.fields = &fields + return r +} + +// A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | +func (r FederatedBlockAPIListRequest) Filter(filter string) FederatedBlockAPIListRequest { + r.filter = &filter + return r +} + +// The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. +func (r FederatedBlockAPIListRequest) Offset(offset int32) FederatedBlockAPIListRequest { + r.offset = &offset + return r +} + +// The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. +func (r FederatedBlockAPIListRequest) Limit(limit int32) FederatedBlockAPIListRequest { + r.limit = &limit + return r +} + +// The service-defined string used to identify a page of resources. A null value indicates the first page. +func (r FederatedBlockAPIListRequest) PageToken(pageToken string) FederatedBlockAPIListRequest { + r.pageToken = &pageToken + return r +} + +// A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. +func (r FederatedBlockAPIListRequest) OrderBy(orderBy string) FederatedBlockAPIListRequest { + r.orderBy = &orderBy + return r +} + +// This parameter is used for sorting by tags. +func (r FederatedBlockAPIListRequest) TorderBy(torderBy string) FederatedBlockAPIListRequest { + r.torderBy = &torderBy + return r +} + +// This parameter is used for filtering by tags. +func (r FederatedBlockAPIListRequest) Tfilter(tfilter string) FederatedBlockAPIListRequest { + r.tfilter = &tfilter + return r +} + +func (r FederatedBlockAPIListRequest) Execute() (*ListFederatedBlockResponse, *http.Response, error) { + return r.ApiService.ListExecute(r) +} + +/* +List Retrieve the federated blocks. + +Use this method to retrieve __FederatedBlock__ objects. +The __FederatedBlock__ object allows a uniform representation of the address space segmentation, supporting functions such as administrative grouping, routing aggregation, delegation etc. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return FederatedBlockAPIListRequest +*/ +func (a *FederatedBlockAPIService) List(ctx context.Context) FederatedBlockAPIListRequest { + return FederatedBlockAPIListRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return ListFederatedBlockResponse +func (a *FederatedBlockAPIService) ListExecute(r FederatedBlockAPIListRequest) (*ListFederatedBlockResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *ListFederatedBlockResponse + ) + + localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "FederatedBlockAPIService.List") + if err != nil { + return localVarReturnValue, nil, internal.NewGenericOpenAPIError(err.Error()) + } + + localVarPath := localBasePath + "/federation/federated_block" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + internal.ParameterAddToHeaderOrQuery(localVarQueryParams, "_fields", r.fields, "") + } + if r.filter != nil { + internal.ParameterAddToHeaderOrQuery(localVarQueryParams, "_filter", r.filter, "") + } + if r.offset != nil { + internal.ParameterAddToHeaderOrQuery(localVarQueryParams, "_offset", r.offset, "") + } + if r.limit != nil { + internal.ParameterAddToHeaderOrQuery(localVarQueryParams, "_limit", r.limit, "") + } + if r.pageToken != nil { + internal.ParameterAddToHeaderOrQuery(localVarQueryParams, "_page_token", r.pageToken, "") + } + if r.orderBy != nil { + internal.ParameterAddToHeaderOrQuery(localVarQueryParams, "_order_by", r.orderBy, "") + } + if r.torderBy != nil { + internal.ParameterAddToHeaderOrQuery(localVarQueryParams, "_torder_by", r.torderBy, "") + } + if r.tfilter != nil { + internal.ParameterAddToHeaderOrQuery(localVarQueryParams, "_tfilter", r.tfilter, "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := internal.SelectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := internal.SelectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.Client.PrepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.Client.CallAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := internal.NewGenericOpenAPIErrorWithBody(localVarHTTPResponse.Status, localVarBody) + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.Client.Decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) + return localVarReturnValue, localVarHTTPResponse, newErr + } + return localVarReturnValue, localVarHTTPResponse, nil +} + +type FederatedBlockAPIReadRequest struct { + ctx context.Context + ApiService FederatedBlockAPI + id string + fields *string +} + +// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. +func (r FederatedBlockAPIReadRequest) Fields(fields string) FederatedBlockAPIReadRequest { + r.fields = &fields + return r +} + +func (r FederatedBlockAPIReadRequest) Execute() (*ReadFederatedBlockResponse, *http.Response, error) { + return r.ApiService.ReadExecute(r) +} + +/* +Read Retrieve the federated block. + +Use this method to retrieve a __FederatedBlock__ object. +The __FederatedBlock__ object allows a uniform representation of the address space segmentation, supporting functions such as administrative grouping, routing aggregation, delegation etc. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return FederatedBlockAPIReadRequest +*/ +func (a *FederatedBlockAPIService) Read(ctx context.Context, id string) FederatedBlockAPIReadRequest { + return FederatedBlockAPIReadRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// +// @return ReadFederatedBlockResponse +func (a *FederatedBlockAPIService) ReadExecute(r FederatedBlockAPIReadRequest) (*ReadFederatedBlockResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *ReadFederatedBlockResponse + ) + + localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "FederatedBlockAPIService.Read") + if err != nil { + return localVarReturnValue, nil, internal.NewGenericOpenAPIError(err.Error()) + } + + localVarPath := localBasePath + "/federation/federated_block/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(internal.ParameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + internal.ParameterAddToHeaderOrQuery(localVarQueryParams, "_fields", r.fields, "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := internal.SelectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := internal.SelectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.Client.PrepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.Client.CallAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := internal.NewGenericOpenAPIErrorWithBody(localVarHTTPResponse.Status, localVarBody) + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.Client.Decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) + return localVarReturnValue, localVarHTTPResponse, newErr + } + return localVarReturnValue, localVarHTTPResponse, nil +} + +type FederatedBlockAPIUpdateRequest struct { + ctx context.Context + ApiService FederatedBlockAPI + id string + body *FederatedBlock +} + +func (r FederatedBlockAPIUpdateRequest) Body(body FederatedBlock) FederatedBlockAPIUpdateRequest { + r.body = &body + return r +} + +func (r FederatedBlockAPIUpdateRequest) Execute() (*UpdateFederatedBlockResponse, *http.Response, error) { + return r.ApiService.UpdateExecute(r) +} + +/* +Update Update the federated block. + +Use this method to update a __FederatedBlock__ object. +The __FederatedBlock__ object allows a uniform representation of the address space segmentation, supporting functions such as administrative grouping, routing aggregation, delegation etc. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return FederatedBlockAPIUpdateRequest +*/ +func (a *FederatedBlockAPIService) Update(ctx context.Context, id string) FederatedBlockAPIUpdateRequest { + return FederatedBlockAPIUpdateRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// +// @return UpdateFederatedBlockResponse +func (a *FederatedBlockAPIService) UpdateExecute(r FederatedBlockAPIUpdateRequest) (*UpdateFederatedBlockResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *UpdateFederatedBlockResponse + ) + + localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "FederatedBlockAPIService.Update") + if err != nil { + return localVarReturnValue, nil, internal.NewGenericOpenAPIError(err.Error()) + } + + localVarPath := localBasePath + "/federation/federated_block/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(internal.ParameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.body == nil { + return localVarReturnValue, nil, internal.ReportError("body is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := internal.SelectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := internal.SelectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if len(a.Client.Cfg.DefaultTags) > 0 && r.body != nil { + if r.body.Tags == nil { + r.body.Tags = make(map[string]interface{}) + } + for k, v := range a.Client.Cfg.DefaultTags { + if _, ok := r.body.Tags[k]; !ok { + r.body.Tags[k] = v + } + } + } + // body params + localVarPostBody = r.body + req, err := a.Client.PrepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.Client.CallAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := internal.NewGenericOpenAPIErrorWithBody(localVarHTTPResponse.Status, localVarBody) + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.Client.Decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) + return localVarReturnValue, localVarHTTPResponse, newErr + } + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/ipamfederation/api_federated_realm.go b/ipamfederation/api_federated_realm.go new file mode 100644 index 0000000..e66a354 --- /dev/null +++ b/ipamfederation/api_federated_realm.go @@ -0,0 +1,704 @@ +/* +IPAM Federation API + +The DDI IPAM Federation application enables a SaaS administrator to manage multiple IPAM systems from one central control point CSP. + +API version: v1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package ipamfederation + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" + + "github.com/infobloxopen/bloxone-go-client/internal" +) + +type FederatedRealmAPI interface { + /* + Create Create the federated realm. + + Use this method to create a __FederatedRealm__ object. + The __FederatedRealm__ object object is a unique set of federated blocks per realm. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return FederatedRealmAPICreateRequest + */ + Create(ctx context.Context) FederatedRealmAPICreateRequest + + // CreateExecute executes the request + // @return CreateFederatedRealmResponse + CreateExecute(r FederatedRealmAPICreateRequest) (*CreateFederatedRealmResponse, *http.Response, error) + /* + Delete Delete federated realm. + + Use this method to delete a __FederatedRealm__ object. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return FederatedRealmAPIDeleteRequest + */ + Delete(ctx context.Context, id string) FederatedRealmAPIDeleteRequest + + // DeleteExecute executes the request + DeleteExecute(r FederatedRealmAPIDeleteRequest) (*http.Response, error) + /* + List Retrieve federated realms. + + Use this method to retrieve __FederatedRealm__ objects. + The __FederatedRealm__ object object is a unique set of federated blocks per realm. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return FederatedRealmAPIListRequest + */ + List(ctx context.Context) FederatedRealmAPIListRequest + + // ListExecute executes the request + // @return ListFederatedRealmResponse + ListExecute(r FederatedRealmAPIListRequest) (*ListFederatedRealmResponse, *http.Response, error) + /* + Read Retrieve the federated realm. + + Use this method to retrieve a __FederatedRealm__ object. + The __FederatedRealm__ object object is a unique set of federated blocks per realm. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return FederatedRealmAPIReadRequest + */ + Read(ctx context.Context, id string) FederatedRealmAPIReadRequest + + // ReadExecute executes the request + // @return ReadFederatedRealmResponse + ReadExecute(r FederatedRealmAPIReadRequest) (*ReadFederatedRealmResponse, *http.Response, error) + /* + Update Update the federated realm. + + Use this method to update a __FederatedRealm__ object. + The __FederatedRealm__ object object is a unique set of federated blocks per realm. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return FederatedRealmAPIUpdateRequest + */ + Update(ctx context.Context, id string) FederatedRealmAPIUpdateRequest + + // UpdateExecute executes the request + // @return UpdateFederatedRealmResponse + UpdateExecute(r FederatedRealmAPIUpdateRequest) (*UpdateFederatedRealmResponse, *http.Response, error) +} + +// FederatedRealmAPIService FederatedRealmAPI service +type FederatedRealmAPIService internal.Service + +type FederatedRealmAPICreateRequest struct { + ctx context.Context + ApiService FederatedRealmAPI + body *FederatedRealm +} + +func (r FederatedRealmAPICreateRequest) Body(body FederatedRealm) FederatedRealmAPICreateRequest { + r.body = &body + return r +} + +func (r FederatedRealmAPICreateRequest) Execute() (*CreateFederatedRealmResponse, *http.Response, error) { + return r.ApiService.CreateExecute(r) +} + +/* +Create Create the federated realm. + +Use this method to create a __FederatedRealm__ object. +The __FederatedRealm__ object object is a unique set of federated blocks per realm. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return FederatedRealmAPICreateRequest +*/ +func (a *FederatedRealmAPIService) Create(ctx context.Context) FederatedRealmAPICreateRequest { + return FederatedRealmAPICreateRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return CreateFederatedRealmResponse +func (a *FederatedRealmAPIService) CreateExecute(r FederatedRealmAPICreateRequest) (*CreateFederatedRealmResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *CreateFederatedRealmResponse + ) + + localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "FederatedRealmAPIService.Create") + if err != nil { + return localVarReturnValue, nil, internal.NewGenericOpenAPIError(err.Error()) + } + + localVarPath := localBasePath + "/federation/federated_realm" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.body == nil { + return localVarReturnValue, nil, internal.ReportError("body is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := internal.SelectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := internal.SelectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if len(a.Client.Cfg.DefaultTags) > 0 && r.body != nil { + if r.body.Tags == nil { + r.body.Tags = make(map[string]interface{}) + } + for k, v := range a.Client.Cfg.DefaultTags { + if _, ok := r.body.Tags[k]; !ok { + r.body.Tags[k] = v + } + } + } + // body params + localVarPostBody = r.body + req, err := a.Client.PrepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.Client.CallAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := internal.NewGenericOpenAPIErrorWithBody(localVarHTTPResponse.Status, localVarBody) + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.Client.Decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) + return localVarReturnValue, localVarHTTPResponse, newErr + } + return localVarReturnValue, localVarHTTPResponse, nil +} + +type FederatedRealmAPIDeleteRequest struct { + ctx context.Context + ApiService FederatedRealmAPI + id string +} + +func (r FederatedRealmAPIDeleteRequest) Execute() (*http.Response, error) { + return r.ApiService.DeleteExecute(r) +} + +/* +Delete Delete federated realm. + +Use this method to delete a __FederatedRealm__ object. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return FederatedRealmAPIDeleteRequest +*/ +func (a *FederatedRealmAPIService) Delete(ctx context.Context, id string) FederatedRealmAPIDeleteRequest { + return FederatedRealmAPIDeleteRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +func (a *FederatedRealmAPIService) DeleteExecute(r FederatedRealmAPIDeleteRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []internal.FormFile + ) + + localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "FederatedRealmAPIService.Delete") + if err != nil { + return nil, internal.NewGenericOpenAPIError(err.Error()) + } + + localVarPath := localBasePath + "/federation/federated_realm/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(internal.ParameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := internal.SelectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{} + + // set Accept header + localVarHTTPHeaderAccept := internal.SelectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.Client.PrepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return nil, err + } + + localVarHTTPResponse, err := a.Client.CallAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := internal.NewGenericOpenAPIErrorWithBody(localVarHTTPResponse.Status, localVarBody) + return localVarHTTPResponse, newErr + } + + return localVarHTTPResponse, nil +} + +type FederatedRealmAPIListRequest struct { + ctx context.Context + ApiService FederatedRealmAPI + filter *string + orderBy *string + fields *string + offset *int32 + limit *int32 + pageToken *string + torderBy *string + tfilter *string +} + +// A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | +func (r FederatedRealmAPIListRequest) Filter(filter string) FederatedRealmAPIListRequest { + r.filter = &filter + return r +} + +// A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. +func (r FederatedRealmAPIListRequest) OrderBy(orderBy string) FederatedRealmAPIListRequest { + r.orderBy = &orderBy + return r +} + +// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. +func (r FederatedRealmAPIListRequest) Fields(fields string) FederatedRealmAPIListRequest { + r.fields = &fields + return r +} + +// The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. +func (r FederatedRealmAPIListRequest) Offset(offset int32) FederatedRealmAPIListRequest { + r.offset = &offset + return r +} + +// The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. +func (r FederatedRealmAPIListRequest) Limit(limit int32) FederatedRealmAPIListRequest { + r.limit = &limit + return r +} + +// The service-defined string used to identify a page of resources. A null value indicates the first page. +func (r FederatedRealmAPIListRequest) PageToken(pageToken string) FederatedRealmAPIListRequest { + r.pageToken = &pageToken + return r +} + +// This parameter is used for sorting by tags. +func (r FederatedRealmAPIListRequest) TorderBy(torderBy string) FederatedRealmAPIListRequest { + r.torderBy = &torderBy + return r +} + +// This parameter is used for filtering by tags. +func (r FederatedRealmAPIListRequest) Tfilter(tfilter string) FederatedRealmAPIListRequest { + r.tfilter = &tfilter + return r +} + +func (r FederatedRealmAPIListRequest) Execute() (*ListFederatedRealmResponse, *http.Response, error) { + return r.ApiService.ListExecute(r) +} + +/* +List Retrieve federated realms. + +Use this method to retrieve __FederatedRealm__ objects. +The __FederatedRealm__ object object is a unique set of federated blocks per realm. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return FederatedRealmAPIListRequest +*/ +func (a *FederatedRealmAPIService) List(ctx context.Context) FederatedRealmAPIListRequest { + return FederatedRealmAPIListRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return ListFederatedRealmResponse +func (a *FederatedRealmAPIService) ListExecute(r FederatedRealmAPIListRequest) (*ListFederatedRealmResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *ListFederatedRealmResponse + ) + + localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "FederatedRealmAPIService.List") + if err != nil { + return localVarReturnValue, nil, internal.NewGenericOpenAPIError(err.Error()) + } + + localVarPath := localBasePath + "/federation/federated_realm" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.filter != nil { + internal.ParameterAddToHeaderOrQuery(localVarQueryParams, "_filter", r.filter, "") + } + if r.orderBy != nil { + internal.ParameterAddToHeaderOrQuery(localVarQueryParams, "_order_by", r.orderBy, "") + } + if r.fields != nil { + internal.ParameterAddToHeaderOrQuery(localVarQueryParams, "_fields", r.fields, "") + } + if r.offset != nil { + internal.ParameterAddToHeaderOrQuery(localVarQueryParams, "_offset", r.offset, "") + } + if r.limit != nil { + internal.ParameterAddToHeaderOrQuery(localVarQueryParams, "_limit", r.limit, "") + } + if r.pageToken != nil { + internal.ParameterAddToHeaderOrQuery(localVarQueryParams, "_page_token", r.pageToken, "") + } + if r.torderBy != nil { + internal.ParameterAddToHeaderOrQuery(localVarQueryParams, "_torder_by", r.torderBy, "") + } + if r.tfilter != nil { + internal.ParameterAddToHeaderOrQuery(localVarQueryParams, "_tfilter", r.tfilter, "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := internal.SelectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := internal.SelectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.Client.PrepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.Client.CallAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := internal.NewGenericOpenAPIErrorWithBody(localVarHTTPResponse.Status, localVarBody) + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.Client.Decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) + return localVarReturnValue, localVarHTTPResponse, newErr + } + return localVarReturnValue, localVarHTTPResponse, nil +} + +type FederatedRealmAPIReadRequest struct { + ctx context.Context + ApiService FederatedRealmAPI + id string + fields *string +} + +// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. +func (r FederatedRealmAPIReadRequest) Fields(fields string) FederatedRealmAPIReadRequest { + r.fields = &fields + return r +} + +func (r FederatedRealmAPIReadRequest) Execute() (*ReadFederatedRealmResponse, *http.Response, error) { + return r.ApiService.ReadExecute(r) +} + +/* +Read Retrieve the federated realm. + +Use this method to retrieve a __FederatedRealm__ object. +The __FederatedRealm__ object object is a unique set of federated blocks per realm. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return FederatedRealmAPIReadRequest +*/ +func (a *FederatedRealmAPIService) Read(ctx context.Context, id string) FederatedRealmAPIReadRequest { + return FederatedRealmAPIReadRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// +// @return ReadFederatedRealmResponse +func (a *FederatedRealmAPIService) ReadExecute(r FederatedRealmAPIReadRequest) (*ReadFederatedRealmResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *ReadFederatedRealmResponse + ) + + localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "FederatedRealmAPIService.Read") + if err != nil { + return localVarReturnValue, nil, internal.NewGenericOpenAPIError(err.Error()) + } + + localVarPath := localBasePath + "/federation/federated_realm/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(internal.ParameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + internal.ParameterAddToHeaderOrQuery(localVarQueryParams, "_fields", r.fields, "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := internal.SelectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := internal.SelectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.Client.PrepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.Client.CallAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := internal.NewGenericOpenAPIErrorWithBody(localVarHTTPResponse.Status, localVarBody) + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.Client.Decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) + return localVarReturnValue, localVarHTTPResponse, newErr + } + return localVarReturnValue, localVarHTTPResponse, nil +} + +type FederatedRealmAPIUpdateRequest struct { + ctx context.Context + ApiService FederatedRealmAPI + id string + body *FederatedRealm +} + +func (r FederatedRealmAPIUpdateRequest) Body(body FederatedRealm) FederatedRealmAPIUpdateRequest { + r.body = &body + return r +} + +func (r FederatedRealmAPIUpdateRequest) Execute() (*UpdateFederatedRealmResponse, *http.Response, error) { + return r.ApiService.UpdateExecute(r) +} + +/* +Update Update the federated realm. + +Use this method to update a __FederatedRealm__ object. +The __FederatedRealm__ object object is a unique set of federated blocks per realm. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return FederatedRealmAPIUpdateRequest +*/ +func (a *FederatedRealmAPIService) Update(ctx context.Context, id string) FederatedRealmAPIUpdateRequest { + return FederatedRealmAPIUpdateRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// +// @return UpdateFederatedRealmResponse +func (a *FederatedRealmAPIService) UpdateExecute(r FederatedRealmAPIUpdateRequest) (*UpdateFederatedRealmResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *UpdateFederatedRealmResponse + ) + + localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "FederatedRealmAPIService.Update") + if err != nil { + return localVarReturnValue, nil, internal.NewGenericOpenAPIError(err.Error()) + } + + localVarPath := localBasePath + "/federation/federated_realm/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(internal.ParameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.body == nil { + return localVarReturnValue, nil, internal.ReportError("body is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := internal.SelectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := internal.SelectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if len(a.Client.Cfg.DefaultTags) > 0 && r.body != nil { + if r.body.Tags == nil { + r.body.Tags = make(map[string]interface{}) + } + for k, v := range a.Client.Cfg.DefaultTags { + if _, ok := r.body.Tags[k]; !ok { + r.body.Tags[k] = v + } + } + } + // body params + localVarPostBody = r.body + req, err := a.Client.PrepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.Client.CallAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := internal.NewGenericOpenAPIErrorWithBody(localVarHTTPResponse.Status, localVarBody) + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.Client.Decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) + return localVarReturnValue, localVarHTTPResponse, newErr + } + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/ipamfederation/api_next_available_federated_block.go b/ipamfederation/api_next_available_federated_block.go new file mode 100644 index 0000000..11bdac9 --- /dev/null +++ b/ipamfederation/api_next_available_federated_block.go @@ -0,0 +1,583 @@ +/* +IPAM Federation API + +The DDI IPAM Federation application enables a SaaS administrator to manage multiple IPAM systems from one central control point CSP. + +API version: v1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package ipamfederation + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" + + "github.com/infobloxopen/bloxone-go-client/internal" +) + +type NextAvailableFederatedBlockAPI interface { + /* + CreateNextAvailableFederatedBlocks Retrieve the next available federated block. + + Use this method to generate the next "n" available __FederatedBlock__ object with user specified predicates. + The response will be "n" __FederatedBlock__ objects. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return NextAvailableFederatedBlockAPICreateNextAvailableFederatedBlocksRequest + */ + CreateNextAvailableFederatedBlocks(ctx context.Context, id string) NextAvailableFederatedBlockAPICreateNextAvailableFederatedBlocksRequest + + // CreateNextAvailableFederatedBlocksExecute executes the request + // @return CreateNextAvailableFederatedBlockResponse + CreateNextAvailableFederatedBlocksExecute(r NextAvailableFederatedBlockAPICreateNextAvailableFederatedBlocksRequest) (*CreateNextAvailableFederatedBlockResponse, *http.Response, error) + /* + CreateNextAvailableOverlappingBlocks Retrieve the next available overlapping block. + + Use this method to generate the next "n" available __OverlappingBlock__ object with user specified predicates. + The response will be "n" __OverlappingBlock__ objects. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return NextAvailableFederatedBlockAPICreateNextAvailableOverlappingBlocksRequest + */ + CreateNextAvailableOverlappingBlocks(ctx context.Context, id string) NextAvailableFederatedBlockAPICreateNextAvailableOverlappingBlocksRequest + + // CreateNextAvailableOverlappingBlocksExecute executes the request + // @return CreateNextAvailableOverlappingBlockResponse + CreateNextAvailableOverlappingBlocksExecute(r NextAvailableFederatedBlockAPICreateNextAvailableOverlappingBlocksRequest) (*CreateNextAvailableOverlappingBlockResponse, *http.Response, error) + /* + CreateNextAvailableReservedBlocks Retrieve the next available reserved block. + + Use this method to generate the next "n" available __ReservedBlock__ object with user specified predicates. + The response will be "n" __ReservedBlock__ objects. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return NextAvailableFederatedBlockAPICreateNextAvailableReservedBlocksRequest + */ + CreateNextAvailableReservedBlocks(ctx context.Context, id string) NextAvailableFederatedBlockAPICreateNextAvailableReservedBlocksRequest + + // CreateNextAvailableReservedBlocksExecute executes the request + // @return CreateNextAvailableReservedBlockResponse + CreateNextAvailableReservedBlocksExecute(r NextAvailableFederatedBlockAPICreateNextAvailableReservedBlocksRequest) (*CreateNextAvailableReservedBlockResponse, *http.Response, error) + /* + ListNextAvailableFederatedBlocks List the next available federated block. + + Use this method to generate the next "n" available __FederatedBlock__ object with user specified predicates. + The response will be "n" __FederatedBlock__ objects. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return NextAvailableFederatedBlockAPIListNextAvailableFederatedBlocksRequest + */ + ListNextAvailableFederatedBlocks(ctx context.Context, id string) NextAvailableFederatedBlockAPIListNextAvailableFederatedBlocksRequest + + // ListNextAvailableFederatedBlocksExecute executes the request + // @return ListNextAvailableFederatedBlockResponse + ListNextAvailableFederatedBlocksExecute(r NextAvailableFederatedBlockAPIListNextAvailableFederatedBlocksRequest) (*ListNextAvailableFederatedBlockResponse, *http.Response, error) +} + +// NextAvailableFederatedBlockAPIService NextAvailableFederatedBlockAPI service +type NextAvailableFederatedBlockAPIService internal.Service + +type NextAvailableFederatedBlockAPICreateNextAvailableFederatedBlocksRequest struct { + ctx context.Context + ApiService NextAvailableFederatedBlockAPI + id string + body *NextAvailableBlockRequest +} + +func (r NextAvailableFederatedBlockAPICreateNextAvailableFederatedBlocksRequest) Body(body NextAvailableBlockRequest) NextAvailableFederatedBlockAPICreateNextAvailableFederatedBlocksRequest { + r.body = &body + return r +} + +func (r NextAvailableFederatedBlockAPICreateNextAvailableFederatedBlocksRequest) Execute() (*CreateNextAvailableFederatedBlockResponse, *http.Response, error) { + return r.ApiService.CreateNextAvailableFederatedBlocksExecute(r) +} + +/* +CreateNextAvailableFederatedBlocks Retrieve the next available federated block. + +Use this method to generate the next "n" available __FederatedBlock__ object with user specified predicates. +The response will be "n" __FederatedBlock__ objects. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return NextAvailableFederatedBlockAPICreateNextAvailableFederatedBlocksRequest +*/ +func (a *NextAvailableFederatedBlockAPIService) CreateNextAvailableFederatedBlocks(ctx context.Context, id string) NextAvailableFederatedBlockAPICreateNextAvailableFederatedBlocksRequest { + return NextAvailableFederatedBlockAPICreateNextAvailableFederatedBlocksRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// +// @return CreateNextAvailableFederatedBlockResponse +func (a *NextAvailableFederatedBlockAPIService) CreateNextAvailableFederatedBlocksExecute(r NextAvailableFederatedBlockAPICreateNextAvailableFederatedBlocksRequest) (*CreateNextAvailableFederatedBlockResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *CreateNextAvailableFederatedBlockResponse + ) + + localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "NextAvailableFederatedBlockAPIService.CreateNextAvailableFederatedBlocks") + if err != nil { + return localVarReturnValue, nil, internal.NewGenericOpenAPIError(err.Error()) + } + + localVarPath := localBasePath + "/federation/federated_block/{id}/next_available_federated_block" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(internal.ParameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.body == nil { + return localVarReturnValue, nil, internal.ReportError("body is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := internal.SelectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := internal.SelectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if len(a.Client.Cfg.DefaultTags) > 0 && r.body != nil { + if r.body.Tags == nil { + r.body.Tags = make(map[string]interface{}) + } + for k, v := range a.Client.Cfg.DefaultTags { + if _, ok := r.body.Tags[k]; !ok { + r.body.Tags[k] = v + } + } + } + // body params + localVarPostBody = r.body + req, err := a.Client.PrepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.Client.CallAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := internal.NewGenericOpenAPIErrorWithBody(localVarHTTPResponse.Status, localVarBody) + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.Client.Decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) + return localVarReturnValue, localVarHTTPResponse, newErr + } + return localVarReturnValue, localVarHTTPResponse, nil +} + +type NextAvailableFederatedBlockAPICreateNextAvailableOverlappingBlocksRequest struct { + ctx context.Context + ApiService NextAvailableFederatedBlockAPI + id string + body *NextAvailableBlockRequest +} + +func (r NextAvailableFederatedBlockAPICreateNextAvailableOverlappingBlocksRequest) Body(body NextAvailableBlockRequest) NextAvailableFederatedBlockAPICreateNextAvailableOverlappingBlocksRequest { + r.body = &body + return r +} + +func (r NextAvailableFederatedBlockAPICreateNextAvailableOverlappingBlocksRequest) Execute() (*CreateNextAvailableOverlappingBlockResponse, *http.Response, error) { + return r.ApiService.CreateNextAvailableOverlappingBlocksExecute(r) +} + +/* +CreateNextAvailableOverlappingBlocks Retrieve the next available overlapping block. + +Use this method to generate the next "n" available __OverlappingBlock__ object with user specified predicates. +The response will be "n" __OverlappingBlock__ objects. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return NextAvailableFederatedBlockAPICreateNextAvailableOverlappingBlocksRequest +*/ +func (a *NextAvailableFederatedBlockAPIService) CreateNextAvailableOverlappingBlocks(ctx context.Context, id string) NextAvailableFederatedBlockAPICreateNextAvailableOverlappingBlocksRequest { + return NextAvailableFederatedBlockAPICreateNextAvailableOverlappingBlocksRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// +// @return CreateNextAvailableOverlappingBlockResponse +func (a *NextAvailableFederatedBlockAPIService) CreateNextAvailableOverlappingBlocksExecute(r NextAvailableFederatedBlockAPICreateNextAvailableOverlappingBlocksRequest) (*CreateNextAvailableOverlappingBlockResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *CreateNextAvailableOverlappingBlockResponse + ) + + localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "NextAvailableFederatedBlockAPIService.CreateNextAvailableOverlappingBlocks") + if err != nil { + return localVarReturnValue, nil, internal.NewGenericOpenAPIError(err.Error()) + } + + localVarPath := localBasePath + "/federation/federated_block/{id}/next_available_overlapping_block" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(internal.ParameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.body == nil { + return localVarReturnValue, nil, internal.ReportError("body is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := internal.SelectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := internal.SelectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if len(a.Client.Cfg.DefaultTags) > 0 && r.body != nil { + if r.body.Tags == nil { + r.body.Tags = make(map[string]interface{}) + } + for k, v := range a.Client.Cfg.DefaultTags { + if _, ok := r.body.Tags[k]; !ok { + r.body.Tags[k] = v + } + } + } + // body params + localVarPostBody = r.body + req, err := a.Client.PrepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.Client.CallAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := internal.NewGenericOpenAPIErrorWithBody(localVarHTTPResponse.Status, localVarBody) + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.Client.Decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) + return localVarReturnValue, localVarHTTPResponse, newErr + } + return localVarReturnValue, localVarHTTPResponse, nil +} + +type NextAvailableFederatedBlockAPICreateNextAvailableReservedBlocksRequest struct { + ctx context.Context + ApiService NextAvailableFederatedBlockAPI + id string + body *NextAvailableBlockRequest +} + +func (r NextAvailableFederatedBlockAPICreateNextAvailableReservedBlocksRequest) Body(body NextAvailableBlockRequest) NextAvailableFederatedBlockAPICreateNextAvailableReservedBlocksRequest { + r.body = &body + return r +} + +func (r NextAvailableFederatedBlockAPICreateNextAvailableReservedBlocksRequest) Execute() (*CreateNextAvailableReservedBlockResponse, *http.Response, error) { + return r.ApiService.CreateNextAvailableReservedBlocksExecute(r) +} + +/* +CreateNextAvailableReservedBlocks Retrieve the next available reserved block. + +Use this method to generate the next "n" available __ReservedBlock__ object with user specified predicates. +The response will be "n" __ReservedBlock__ objects. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return NextAvailableFederatedBlockAPICreateNextAvailableReservedBlocksRequest +*/ +func (a *NextAvailableFederatedBlockAPIService) CreateNextAvailableReservedBlocks(ctx context.Context, id string) NextAvailableFederatedBlockAPICreateNextAvailableReservedBlocksRequest { + return NextAvailableFederatedBlockAPICreateNextAvailableReservedBlocksRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// +// @return CreateNextAvailableReservedBlockResponse +func (a *NextAvailableFederatedBlockAPIService) CreateNextAvailableReservedBlocksExecute(r NextAvailableFederatedBlockAPICreateNextAvailableReservedBlocksRequest) (*CreateNextAvailableReservedBlockResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *CreateNextAvailableReservedBlockResponse + ) + + localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "NextAvailableFederatedBlockAPIService.CreateNextAvailableReservedBlocks") + if err != nil { + return localVarReturnValue, nil, internal.NewGenericOpenAPIError(err.Error()) + } + + localVarPath := localBasePath + "/federation/federated_block/{id}/next_available_reserved_block" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(internal.ParameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.body == nil { + return localVarReturnValue, nil, internal.ReportError("body is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := internal.SelectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := internal.SelectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if len(a.Client.Cfg.DefaultTags) > 0 && r.body != nil { + if r.body.Tags == nil { + r.body.Tags = make(map[string]interface{}) + } + for k, v := range a.Client.Cfg.DefaultTags { + if _, ok := r.body.Tags[k]; !ok { + r.body.Tags[k] = v + } + } + } + // body params + localVarPostBody = r.body + req, err := a.Client.PrepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.Client.CallAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := internal.NewGenericOpenAPIErrorWithBody(localVarHTTPResponse.Status, localVarBody) + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.Client.Decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) + return localVarReturnValue, localVarHTTPResponse, newErr + } + return localVarReturnValue, localVarHTTPResponse, nil +} + +type NextAvailableFederatedBlockAPIListNextAvailableFederatedBlocksRequest struct { + ctx context.Context + ApiService NextAvailableFederatedBlockAPI + id string + cidr *int64 + count *int64 + name *string + comment *string +} + +// The CIDR of the federated block. This is required, if _address_ does not specify it in its input. +func (r NextAvailableFederatedBlockAPIListNextAvailableFederatedBlocksRequest) Cidr(cidr int64) NextAvailableFederatedBlockAPIListNextAvailableFederatedBlocksRequest { + r.cidr = &cidr + return r +} + +// The count of __Block__ required. If not provided, it will default to 1. +func (r NextAvailableFederatedBlockAPIListNextAvailableFederatedBlocksRequest) Count(count int64) NextAvailableFederatedBlockAPIListNextAvailableFederatedBlocksRequest { + r.count = &count + return r +} + +// The name to be provided. +func (r NextAvailableFederatedBlockAPIListNextAvailableFederatedBlocksRequest) Name(name string) NextAvailableFederatedBlockAPIListNextAvailableFederatedBlocksRequest { + r.name = &name + return r +} + +// The description for the _federation/federated_block_. May contain 0 to 1024 characters. Can include UTF-8. +func (r NextAvailableFederatedBlockAPIListNextAvailableFederatedBlocksRequest) Comment(comment string) NextAvailableFederatedBlockAPIListNextAvailableFederatedBlocksRequest { + r.comment = &comment + return r +} + +func (r NextAvailableFederatedBlockAPIListNextAvailableFederatedBlocksRequest) Execute() (*ListNextAvailableFederatedBlockResponse, *http.Response, error) { + return r.ApiService.ListNextAvailableFederatedBlocksExecute(r) +} + +/* +ListNextAvailableFederatedBlocks List the next available federated block. + +Use this method to generate the next "n" available __FederatedBlock__ object with user specified predicates. +The response will be "n" __FederatedBlock__ objects. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return NextAvailableFederatedBlockAPIListNextAvailableFederatedBlocksRequest +*/ +func (a *NextAvailableFederatedBlockAPIService) ListNextAvailableFederatedBlocks(ctx context.Context, id string) NextAvailableFederatedBlockAPIListNextAvailableFederatedBlocksRequest { + return NextAvailableFederatedBlockAPIListNextAvailableFederatedBlocksRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// +// @return ListNextAvailableFederatedBlockResponse +func (a *NextAvailableFederatedBlockAPIService) ListNextAvailableFederatedBlocksExecute(r NextAvailableFederatedBlockAPIListNextAvailableFederatedBlocksRequest) (*ListNextAvailableFederatedBlockResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *ListNextAvailableFederatedBlockResponse + ) + + localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "NextAvailableFederatedBlockAPIService.ListNextAvailableFederatedBlocks") + if err != nil { + return localVarReturnValue, nil, internal.NewGenericOpenAPIError(err.Error()) + } + + localVarPath := localBasePath + "/federation/federated_block/{id}/next_available_federated_block" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(internal.ParameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.cidr != nil { + internal.ParameterAddToHeaderOrQuery(localVarQueryParams, "cidr", r.cidr, "") + } + if r.count != nil { + internal.ParameterAddToHeaderOrQuery(localVarQueryParams, "count", r.count, "") + } + if r.name != nil { + internal.ParameterAddToHeaderOrQuery(localVarQueryParams, "name", r.name, "") + } + if r.comment != nil { + internal.ParameterAddToHeaderOrQuery(localVarQueryParams, "comment", r.comment, "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := internal.SelectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := internal.SelectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.Client.PrepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.Client.CallAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := internal.NewGenericOpenAPIErrorWithBody(localVarHTTPResponse.Status, localVarBody) + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.Client.Decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) + return localVarReturnValue, localVarHTTPResponse, newErr + } + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/ipamfederation/api_next_available_overlapping_block.go b/ipamfederation/api_next_available_overlapping_block.go new file mode 100644 index 0000000..d0d8276 --- /dev/null +++ b/ipamfederation/api_next_available_overlapping_block.go @@ -0,0 +1,181 @@ +/* +IPAM Federation API + +The DDI IPAM Federation application enables a SaaS administrator to manage multiple IPAM systems from one central control point CSP. + +API version: v1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package ipamfederation + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" + + "github.com/infobloxopen/bloxone-go-client/internal" +) + +type NextAvailableOverlappingBlockAPI interface { + /* + ListNextAvailableOverlappingBlocks List the next available overlapping block. + + Use this method to list the next "n" available __OverlappingBlock__ object with user specified predicates. + The response will be "n" __OverlappingBlock__ objects. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return NextAvailableOverlappingBlockAPIListNextAvailableOverlappingBlocksRequest + */ + ListNextAvailableOverlappingBlocks(ctx context.Context, id string) NextAvailableOverlappingBlockAPIListNextAvailableOverlappingBlocksRequest + + // ListNextAvailableOverlappingBlocksExecute executes the request + // @return ListNextAvailableOverlappingBlockResponse + ListNextAvailableOverlappingBlocksExecute(r NextAvailableOverlappingBlockAPIListNextAvailableOverlappingBlocksRequest) (*ListNextAvailableOverlappingBlockResponse, *http.Response, error) +} + +// NextAvailableOverlappingBlockAPIService NextAvailableOverlappingBlockAPI service +type NextAvailableOverlappingBlockAPIService internal.Service + +type NextAvailableOverlappingBlockAPIListNextAvailableOverlappingBlocksRequest struct { + ctx context.Context + ApiService NextAvailableOverlappingBlockAPI + id string + cidr *int64 + count *int64 + name *string + comment *string +} + +// The CIDR of the federated block. This is required, if _address_ does not specify it in its input. +func (r NextAvailableOverlappingBlockAPIListNextAvailableOverlappingBlocksRequest) Cidr(cidr int64) NextAvailableOverlappingBlockAPIListNextAvailableOverlappingBlocksRequest { + r.cidr = &cidr + return r +} + +// The count of __Block__ required. If not provided, it will default to 1. +func (r NextAvailableOverlappingBlockAPIListNextAvailableOverlappingBlocksRequest) Count(count int64) NextAvailableOverlappingBlockAPIListNextAvailableOverlappingBlocksRequest { + r.count = &count + return r +} + +// The name to be provided. +func (r NextAvailableOverlappingBlockAPIListNextAvailableOverlappingBlocksRequest) Name(name string) NextAvailableOverlappingBlockAPIListNextAvailableOverlappingBlocksRequest { + r.name = &name + return r +} + +// The description for the _federation/federated_block_. May contain 0 to 1024 characters. Can include UTF-8. +func (r NextAvailableOverlappingBlockAPIListNextAvailableOverlappingBlocksRequest) Comment(comment string) NextAvailableOverlappingBlockAPIListNextAvailableOverlappingBlocksRequest { + r.comment = &comment + return r +} + +func (r NextAvailableOverlappingBlockAPIListNextAvailableOverlappingBlocksRequest) Execute() (*ListNextAvailableOverlappingBlockResponse, *http.Response, error) { + return r.ApiService.ListNextAvailableOverlappingBlocksExecute(r) +} + +/* +ListNextAvailableOverlappingBlocks List the next available overlapping block. + +Use this method to list the next "n" available __OverlappingBlock__ object with user specified predicates. +The response will be "n" __OverlappingBlock__ objects. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return NextAvailableOverlappingBlockAPIListNextAvailableOverlappingBlocksRequest +*/ +func (a *NextAvailableOverlappingBlockAPIService) ListNextAvailableOverlappingBlocks(ctx context.Context, id string) NextAvailableOverlappingBlockAPIListNextAvailableOverlappingBlocksRequest { + return NextAvailableOverlappingBlockAPIListNextAvailableOverlappingBlocksRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// +// @return ListNextAvailableOverlappingBlockResponse +func (a *NextAvailableOverlappingBlockAPIService) ListNextAvailableOverlappingBlocksExecute(r NextAvailableOverlappingBlockAPIListNextAvailableOverlappingBlocksRequest) (*ListNextAvailableOverlappingBlockResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *ListNextAvailableOverlappingBlockResponse + ) + + localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "NextAvailableOverlappingBlockAPIService.ListNextAvailableOverlappingBlocks") + if err != nil { + return localVarReturnValue, nil, internal.NewGenericOpenAPIError(err.Error()) + } + + localVarPath := localBasePath + "/federation/federated_block/{id}/next_available_overlapping_block" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(internal.ParameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.cidr != nil { + internal.ParameterAddToHeaderOrQuery(localVarQueryParams, "cidr", r.cidr, "") + } + if r.count != nil { + internal.ParameterAddToHeaderOrQuery(localVarQueryParams, "count", r.count, "") + } + if r.name != nil { + internal.ParameterAddToHeaderOrQuery(localVarQueryParams, "name", r.name, "") + } + if r.comment != nil { + internal.ParameterAddToHeaderOrQuery(localVarQueryParams, "comment", r.comment, "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := internal.SelectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := internal.SelectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.Client.PrepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.Client.CallAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := internal.NewGenericOpenAPIErrorWithBody(localVarHTTPResponse.Status, localVarBody) + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.Client.Decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) + return localVarReturnValue, localVarHTTPResponse, newErr + } + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/ipamfederation/api_next_available_reserved_block.go b/ipamfederation/api_next_available_reserved_block.go new file mode 100644 index 0000000..1cdc4c6 --- /dev/null +++ b/ipamfederation/api_next_available_reserved_block.go @@ -0,0 +1,181 @@ +/* +IPAM Federation API + +The DDI IPAM Federation application enables a SaaS administrator to manage multiple IPAM systems from one central control point CSP. + +API version: v1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package ipamfederation + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" + + "github.com/infobloxopen/bloxone-go-client/internal" +) + +type NextAvailableReservedBlockAPI interface { + /* + ListNextAvailableReservedBlocks List the next available reserved block. + + Use this method to list the next "n" available __ReservedBlock__ object with user specified predicates. + The response will be "n" __ReservedBlock__ objects. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return NextAvailableReservedBlockAPIListNextAvailableReservedBlocksRequest + */ + ListNextAvailableReservedBlocks(ctx context.Context, id string) NextAvailableReservedBlockAPIListNextAvailableReservedBlocksRequest + + // ListNextAvailableReservedBlocksExecute executes the request + // @return ListNextAvailableReservedBlockResponse + ListNextAvailableReservedBlocksExecute(r NextAvailableReservedBlockAPIListNextAvailableReservedBlocksRequest) (*ListNextAvailableReservedBlockResponse, *http.Response, error) +} + +// NextAvailableReservedBlockAPIService NextAvailableReservedBlockAPI service +type NextAvailableReservedBlockAPIService internal.Service + +type NextAvailableReservedBlockAPIListNextAvailableReservedBlocksRequest struct { + ctx context.Context + ApiService NextAvailableReservedBlockAPI + id string + cidr *int64 + count *int64 + name *string + comment *string +} + +// The CIDR of the federated block. This is required, if _address_ does not specify it in its input. +func (r NextAvailableReservedBlockAPIListNextAvailableReservedBlocksRequest) Cidr(cidr int64) NextAvailableReservedBlockAPIListNextAvailableReservedBlocksRequest { + r.cidr = &cidr + return r +} + +// The count of __Block__ required. If not provided, it will default to 1. +func (r NextAvailableReservedBlockAPIListNextAvailableReservedBlocksRequest) Count(count int64) NextAvailableReservedBlockAPIListNextAvailableReservedBlocksRequest { + r.count = &count + return r +} + +// The name to be provided. +func (r NextAvailableReservedBlockAPIListNextAvailableReservedBlocksRequest) Name(name string) NextAvailableReservedBlockAPIListNextAvailableReservedBlocksRequest { + r.name = &name + return r +} + +// The description for the _federation/federated_block_. May contain 0 to 1024 characters. Can include UTF-8. +func (r NextAvailableReservedBlockAPIListNextAvailableReservedBlocksRequest) Comment(comment string) NextAvailableReservedBlockAPIListNextAvailableReservedBlocksRequest { + r.comment = &comment + return r +} + +func (r NextAvailableReservedBlockAPIListNextAvailableReservedBlocksRequest) Execute() (*ListNextAvailableReservedBlockResponse, *http.Response, error) { + return r.ApiService.ListNextAvailableReservedBlocksExecute(r) +} + +/* +ListNextAvailableReservedBlocks List the next available reserved block. + +Use this method to list the next "n" available __ReservedBlock__ object with user specified predicates. +The response will be "n" __ReservedBlock__ objects. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return NextAvailableReservedBlockAPIListNextAvailableReservedBlocksRequest +*/ +func (a *NextAvailableReservedBlockAPIService) ListNextAvailableReservedBlocks(ctx context.Context, id string) NextAvailableReservedBlockAPIListNextAvailableReservedBlocksRequest { + return NextAvailableReservedBlockAPIListNextAvailableReservedBlocksRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// +// @return ListNextAvailableReservedBlockResponse +func (a *NextAvailableReservedBlockAPIService) ListNextAvailableReservedBlocksExecute(r NextAvailableReservedBlockAPIListNextAvailableReservedBlocksRequest) (*ListNextAvailableReservedBlockResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *ListNextAvailableReservedBlockResponse + ) + + localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "NextAvailableReservedBlockAPIService.ListNextAvailableReservedBlocks") + if err != nil { + return localVarReturnValue, nil, internal.NewGenericOpenAPIError(err.Error()) + } + + localVarPath := localBasePath + "/federation/federated_block/{id}/next_available_reserved_block" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(internal.ParameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.cidr != nil { + internal.ParameterAddToHeaderOrQuery(localVarQueryParams, "cidr", r.cidr, "") + } + if r.count != nil { + internal.ParameterAddToHeaderOrQuery(localVarQueryParams, "count", r.count, "") + } + if r.name != nil { + internal.ParameterAddToHeaderOrQuery(localVarQueryParams, "name", r.name, "") + } + if r.comment != nil { + internal.ParameterAddToHeaderOrQuery(localVarQueryParams, "comment", r.comment, "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := internal.SelectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := internal.SelectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.Client.PrepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.Client.CallAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := internal.NewGenericOpenAPIErrorWithBody(localVarHTTPResponse.Status, localVarBody) + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.Client.Decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) + return localVarReturnValue, localVarHTTPResponse, newErr + } + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/ipamfederation/api_overlapping_block.go b/ipamfederation/api_overlapping_block.go new file mode 100644 index 0000000..52c6e1d --- /dev/null +++ b/ipamfederation/api_overlapping_block.go @@ -0,0 +1,706 @@ +/* +IPAM Federation API + +The DDI IPAM Federation application enables a SaaS administrator to manage multiple IPAM systems from one central control point CSP. + +API version: v1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package ipamfederation + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" + + "github.com/infobloxopen/bloxone-go-client/internal" +) + +type OverlappingBlockAPI interface { + /* + Create Create the overlapping block. + + Use this method to create an __OverlappingBlock__ object. + The __OverlappingBlock__ indicates an address range that may be managed independently by all participating IPAM services. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return OverlappingBlockAPICreateRequest + */ + Create(ctx context.Context) OverlappingBlockAPICreateRequest + + // CreateExecute executes the request + // @return CreateOverlappingBlockResponse + CreateExecute(r OverlappingBlockAPICreateRequest) (*CreateOverlappingBlockResponse, *http.Response, error) + /* + Delete Delete the overlapping block. + + Use this method to delete an __OverlappingBlock__ object. + The __OverlappingBlock__ indicates an address range that may be managed independently by all participating IPAM services. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return OverlappingBlockAPIDeleteRequest + */ + Delete(ctx context.Context, id string) OverlappingBlockAPIDeleteRequest + + // DeleteExecute executes the request + DeleteExecute(r OverlappingBlockAPIDeleteRequest) (*http.Response, error) + /* + List Retrieve the overlapping block. + + Use this method to retrieve __OverlappingBlock__ objects. + The __OverlappingBlock__ indicates an address range that may be managed independently by all participating IPAM services. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return OverlappingBlockAPIListRequest + */ + List(ctx context.Context) OverlappingBlockAPIListRequest + + // ListExecute executes the request + // @return ListOverlappingBlockResponse + ListExecute(r OverlappingBlockAPIListRequest) (*ListOverlappingBlockResponse, *http.Response, error) + /* + Read Retrieve the overlapping block. + + Use this method to retrieve an __OverlappingBlock__ object. + The __OverlappingBlock__ indicates an address range that may be managed independently by all participating IPAM services. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return OverlappingBlockAPIReadRequest + */ + Read(ctx context.Context, id string) OverlappingBlockAPIReadRequest + + // ReadExecute executes the request + // @return ReadOverlappingBlockResponse + ReadExecute(r OverlappingBlockAPIReadRequest) (*ReadOverlappingBlockResponse, *http.Response, error) + /* + Update Update the overlapping block. + + Use this method to update an __OverlappingBlock__ object. + The __OverlappingBlock__ indicates an address range that may be managed independently by all participating IPAM services. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return OverlappingBlockAPIUpdateRequest + */ + Update(ctx context.Context, id string) OverlappingBlockAPIUpdateRequest + + // UpdateExecute executes the request + // @return UpdateOverlappingBlockResponse + UpdateExecute(r OverlappingBlockAPIUpdateRequest) (*UpdateOverlappingBlockResponse, *http.Response, error) +} + +// OverlappingBlockAPIService OverlappingBlockAPI service +type OverlappingBlockAPIService internal.Service + +type OverlappingBlockAPICreateRequest struct { + ctx context.Context + ApiService OverlappingBlockAPI + body *OverlappingBlock +} + +func (r OverlappingBlockAPICreateRequest) Body(body OverlappingBlock) OverlappingBlockAPICreateRequest { + r.body = &body + return r +} + +func (r OverlappingBlockAPICreateRequest) Execute() (*CreateOverlappingBlockResponse, *http.Response, error) { + return r.ApiService.CreateExecute(r) +} + +/* +Create Create the overlapping block. + +Use this method to create an __OverlappingBlock__ object. +The __OverlappingBlock__ indicates an address range that may be managed independently by all participating IPAM services. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return OverlappingBlockAPICreateRequest +*/ +func (a *OverlappingBlockAPIService) Create(ctx context.Context) OverlappingBlockAPICreateRequest { + return OverlappingBlockAPICreateRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return CreateOverlappingBlockResponse +func (a *OverlappingBlockAPIService) CreateExecute(r OverlappingBlockAPICreateRequest) (*CreateOverlappingBlockResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *CreateOverlappingBlockResponse + ) + + localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "OverlappingBlockAPIService.Create") + if err != nil { + return localVarReturnValue, nil, internal.NewGenericOpenAPIError(err.Error()) + } + + localVarPath := localBasePath + "/federation/overlapping_block" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.body == nil { + return localVarReturnValue, nil, internal.ReportError("body is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := internal.SelectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := internal.SelectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if len(a.Client.Cfg.DefaultTags) > 0 && r.body != nil { + if r.body.Tags == nil { + r.body.Tags = make(map[string]interface{}) + } + for k, v := range a.Client.Cfg.DefaultTags { + if _, ok := r.body.Tags[k]; !ok { + r.body.Tags[k] = v + } + } + } + // body params + localVarPostBody = r.body + req, err := a.Client.PrepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.Client.CallAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := internal.NewGenericOpenAPIErrorWithBody(localVarHTTPResponse.Status, localVarBody) + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.Client.Decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) + return localVarReturnValue, localVarHTTPResponse, newErr + } + return localVarReturnValue, localVarHTTPResponse, nil +} + +type OverlappingBlockAPIDeleteRequest struct { + ctx context.Context + ApiService OverlappingBlockAPI + id string +} + +func (r OverlappingBlockAPIDeleteRequest) Execute() (*http.Response, error) { + return r.ApiService.DeleteExecute(r) +} + +/* +Delete Delete the overlapping block. + +Use this method to delete an __OverlappingBlock__ object. +The __OverlappingBlock__ indicates an address range that may be managed independently by all participating IPAM services. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return OverlappingBlockAPIDeleteRequest +*/ +func (a *OverlappingBlockAPIService) Delete(ctx context.Context, id string) OverlappingBlockAPIDeleteRequest { + return OverlappingBlockAPIDeleteRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +func (a *OverlappingBlockAPIService) DeleteExecute(r OverlappingBlockAPIDeleteRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []internal.FormFile + ) + + localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "OverlappingBlockAPIService.Delete") + if err != nil { + return nil, internal.NewGenericOpenAPIError(err.Error()) + } + + localVarPath := localBasePath + "/federation/overlapping_block/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(internal.ParameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := internal.SelectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{} + + // set Accept header + localVarHTTPHeaderAccept := internal.SelectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.Client.PrepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return nil, err + } + + localVarHTTPResponse, err := a.Client.CallAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := internal.NewGenericOpenAPIErrorWithBody(localVarHTTPResponse.Status, localVarBody) + return localVarHTTPResponse, newErr + } + + return localVarHTTPResponse, nil +} + +type OverlappingBlockAPIListRequest struct { + ctx context.Context + ApiService OverlappingBlockAPI + fields *string + filter *string + offset *int32 + limit *int32 + pageToken *string + orderBy *string + torderBy *string + tfilter *string +} + +// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. +func (r OverlappingBlockAPIListRequest) Fields(fields string) OverlappingBlockAPIListRequest { + r.fields = &fields + return r +} + +// A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | +func (r OverlappingBlockAPIListRequest) Filter(filter string) OverlappingBlockAPIListRequest { + r.filter = &filter + return r +} + +// The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. +func (r OverlappingBlockAPIListRequest) Offset(offset int32) OverlappingBlockAPIListRequest { + r.offset = &offset + return r +} + +// The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. +func (r OverlappingBlockAPIListRequest) Limit(limit int32) OverlappingBlockAPIListRequest { + r.limit = &limit + return r +} + +// The service-defined string used to identify a page of resources. A null value indicates the first page. +func (r OverlappingBlockAPIListRequest) PageToken(pageToken string) OverlappingBlockAPIListRequest { + r.pageToken = &pageToken + return r +} + +// A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. +func (r OverlappingBlockAPIListRequest) OrderBy(orderBy string) OverlappingBlockAPIListRequest { + r.orderBy = &orderBy + return r +} + +// This parameter is used for sorting by tags. +func (r OverlappingBlockAPIListRequest) TorderBy(torderBy string) OverlappingBlockAPIListRequest { + r.torderBy = &torderBy + return r +} + +// This parameter is used for filtering by tags. +func (r OverlappingBlockAPIListRequest) Tfilter(tfilter string) OverlappingBlockAPIListRequest { + r.tfilter = &tfilter + return r +} + +func (r OverlappingBlockAPIListRequest) Execute() (*ListOverlappingBlockResponse, *http.Response, error) { + return r.ApiService.ListExecute(r) +} + +/* +List Retrieve the overlapping block. + +Use this method to retrieve __OverlappingBlock__ objects. +The __OverlappingBlock__ indicates an address range that may be managed independently by all participating IPAM services. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return OverlappingBlockAPIListRequest +*/ +func (a *OverlappingBlockAPIService) List(ctx context.Context) OverlappingBlockAPIListRequest { + return OverlappingBlockAPIListRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return ListOverlappingBlockResponse +func (a *OverlappingBlockAPIService) ListExecute(r OverlappingBlockAPIListRequest) (*ListOverlappingBlockResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *ListOverlappingBlockResponse + ) + + localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "OverlappingBlockAPIService.List") + if err != nil { + return localVarReturnValue, nil, internal.NewGenericOpenAPIError(err.Error()) + } + + localVarPath := localBasePath + "/federation/overlapping_block" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + internal.ParameterAddToHeaderOrQuery(localVarQueryParams, "_fields", r.fields, "") + } + if r.filter != nil { + internal.ParameterAddToHeaderOrQuery(localVarQueryParams, "_filter", r.filter, "") + } + if r.offset != nil { + internal.ParameterAddToHeaderOrQuery(localVarQueryParams, "_offset", r.offset, "") + } + if r.limit != nil { + internal.ParameterAddToHeaderOrQuery(localVarQueryParams, "_limit", r.limit, "") + } + if r.pageToken != nil { + internal.ParameterAddToHeaderOrQuery(localVarQueryParams, "_page_token", r.pageToken, "") + } + if r.orderBy != nil { + internal.ParameterAddToHeaderOrQuery(localVarQueryParams, "_order_by", r.orderBy, "") + } + if r.torderBy != nil { + internal.ParameterAddToHeaderOrQuery(localVarQueryParams, "_torder_by", r.torderBy, "") + } + if r.tfilter != nil { + internal.ParameterAddToHeaderOrQuery(localVarQueryParams, "_tfilter", r.tfilter, "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := internal.SelectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := internal.SelectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.Client.PrepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.Client.CallAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := internal.NewGenericOpenAPIErrorWithBody(localVarHTTPResponse.Status, localVarBody) + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.Client.Decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) + return localVarReturnValue, localVarHTTPResponse, newErr + } + return localVarReturnValue, localVarHTTPResponse, nil +} + +type OverlappingBlockAPIReadRequest struct { + ctx context.Context + ApiService OverlappingBlockAPI + id string + fields *string +} + +// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. +func (r OverlappingBlockAPIReadRequest) Fields(fields string) OverlappingBlockAPIReadRequest { + r.fields = &fields + return r +} + +func (r OverlappingBlockAPIReadRequest) Execute() (*ReadOverlappingBlockResponse, *http.Response, error) { + return r.ApiService.ReadExecute(r) +} + +/* +Read Retrieve the overlapping block. + +Use this method to retrieve an __OverlappingBlock__ object. +The __OverlappingBlock__ indicates an address range that may be managed independently by all participating IPAM services. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return OverlappingBlockAPIReadRequest +*/ +func (a *OverlappingBlockAPIService) Read(ctx context.Context, id string) OverlappingBlockAPIReadRequest { + return OverlappingBlockAPIReadRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// +// @return ReadOverlappingBlockResponse +func (a *OverlappingBlockAPIService) ReadExecute(r OverlappingBlockAPIReadRequest) (*ReadOverlappingBlockResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *ReadOverlappingBlockResponse + ) + + localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "OverlappingBlockAPIService.Read") + if err != nil { + return localVarReturnValue, nil, internal.NewGenericOpenAPIError(err.Error()) + } + + localVarPath := localBasePath + "/federation/overlapping_block/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(internal.ParameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + internal.ParameterAddToHeaderOrQuery(localVarQueryParams, "_fields", r.fields, "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := internal.SelectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := internal.SelectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.Client.PrepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.Client.CallAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := internal.NewGenericOpenAPIErrorWithBody(localVarHTTPResponse.Status, localVarBody) + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.Client.Decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) + return localVarReturnValue, localVarHTTPResponse, newErr + } + return localVarReturnValue, localVarHTTPResponse, nil +} + +type OverlappingBlockAPIUpdateRequest struct { + ctx context.Context + ApiService OverlappingBlockAPI + id string + body *OverlappingBlock +} + +func (r OverlappingBlockAPIUpdateRequest) Body(body OverlappingBlock) OverlappingBlockAPIUpdateRequest { + r.body = &body + return r +} + +func (r OverlappingBlockAPIUpdateRequest) Execute() (*UpdateOverlappingBlockResponse, *http.Response, error) { + return r.ApiService.UpdateExecute(r) +} + +/* +Update Update the overlapping block. + +Use this method to update an __OverlappingBlock__ object. +The __OverlappingBlock__ indicates an address range that may be managed independently by all participating IPAM services. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return OverlappingBlockAPIUpdateRequest +*/ +func (a *OverlappingBlockAPIService) Update(ctx context.Context, id string) OverlappingBlockAPIUpdateRequest { + return OverlappingBlockAPIUpdateRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// +// @return UpdateOverlappingBlockResponse +func (a *OverlappingBlockAPIService) UpdateExecute(r OverlappingBlockAPIUpdateRequest) (*UpdateOverlappingBlockResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *UpdateOverlappingBlockResponse + ) + + localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "OverlappingBlockAPIService.Update") + if err != nil { + return localVarReturnValue, nil, internal.NewGenericOpenAPIError(err.Error()) + } + + localVarPath := localBasePath + "/federation/overlapping_block/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(internal.ParameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.body == nil { + return localVarReturnValue, nil, internal.ReportError("body is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := internal.SelectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := internal.SelectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if len(a.Client.Cfg.DefaultTags) > 0 && r.body != nil { + if r.body.Tags == nil { + r.body.Tags = make(map[string]interface{}) + } + for k, v := range a.Client.Cfg.DefaultTags { + if _, ok := r.body.Tags[k]; !ok { + r.body.Tags[k] = v + } + } + } + // body params + localVarPostBody = r.body + req, err := a.Client.PrepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.Client.CallAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := internal.NewGenericOpenAPIErrorWithBody(localVarHTTPResponse.Status, localVarBody) + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.Client.Decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) + return localVarReturnValue, localVarHTTPResponse, newErr + } + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/ipamfederation/api_reserved_block.go b/ipamfederation/api_reserved_block.go new file mode 100644 index 0000000..a1fde39 --- /dev/null +++ b/ipamfederation/api_reserved_block.go @@ -0,0 +1,706 @@ +/* +IPAM Federation API + +The DDI IPAM Federation application enables a SaaS administrator to manage multiple IPAM systems from one central control point CSP. + +API version: v1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package ipamfederation + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" + + "github.com/infobloxopen/bloxone-go-client/internal" +) + +type ReservedBlockAPI interface { + /* + Create Create the reserved block. + + Use this method to create a __ReservedBlock__ object. + The __ReservedBlock__ indicates an address range for which authority is expressly forbidden. Cooperating IPAM services must not make allocations in this range. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ReservedBlockAPICreateRequest + */ + Create(ctx context.Context) ReservedBlockAPICreateRequest + + // CreateExecute executes the request + // @return CreateReservedBlockResponse + CreateExecute(r ReservedBlockAPICreateRequest) (*CreateReservedBlockResponse, *http.Response, error) + /* + Delete Delete the reserved block. + + Use this method to delete a __ReservedBlock__ object. + The __ReservedBlock__ indicates an address range for which authority is expressly forbidden. Cooperating IPAM services must not make allocations in this range. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ReservedBlockAPIDeleteRequest + */ + Delete(ctx context.Context, id string) ReservedBlockAPIDeleteRequest + + // DeleteExecute executes the request + DeleteExecute(r ReservedBlockAPIDeleteRequest) (*http.Response, error) + /* + List Retrieve the reserved block. + + Use this method to retrieve __ReservedBlock__ objects. + The __ReservedBlock__ indicates an address range for which authority is expressly forbidden. Cooperating IPAM services must not make allocations in this range. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ReservedBlockAPIListRequest + */ + List(ctx context.Context) ReservedBlockAPIListRequest + + // ListExecute executes the request + // @return ListReservedBlockResponse + ListExecute(r ReservedBlockAPIListRequest) (*ListReservedBlockResponse, *http.Response, error) + /* + Read Retrieve the reserved block. + + Use this method to retrieve a __ReservedBlock__ object. + The __ReservedBlock__ indicates an address range for which authority is expressly forbidden. Cooperating IPAM services must not make allocations in this range. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ReservedBlockAPIReadRequest + */ + Read(ctx context.Context, id string) ReservedBlockAPIReadRequest + + // ReadExecute executes the request + // @return ReadReservedBlockResponse + ReadExecute(r ReservedBlockAPIReadRequest) (*ReadReservedBlockResponse, *http.Response, error) + /* + Update Update the reserved block. + + Use this method to update a __ReservedBlock__ object. + The __ReservedBlock__ indicates an address range for which authority is expressly forbidden. Cooperating IPAM services must not make allocations in this range. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ReservedBlockAPIUpdateRequest + */ + Update(ctx context.Context, id string) ReservedBlockAPIUpdateRequest + + // UpdateExecute executes the request + // @return UpdateReservedBlockResponse + UpdateExecute(r ReservedBlockAPIUpdateRequest) (*UpdateReservedBlockResponse, *http.Response, error) +} + +// ReservedBlockAPIService ReservedBlockAPI service +type ReservedBlockAPIService internal.Service + +type ReservedBlockAPICreateRequest struct { + ctx context.Context + ApiService ReservedBlockAPI + body *ReservedBlock +} + +func (r ReservedBlockAPICreateRequest) Body(body ReservedBlock) ReservedBlockAPICreateRequest { + r.body = &body + return r +} + +func (r ReservedBlockAPICreateRequest) Execute() (*CreateReservedBlockResponse, *http.Response, error) { + return r.ApiService.CreateExecute(r) +} + +/* +Create Create the reserved block. + +Use this method to create a __ReservedBlock__ object. +The __ReservedBlock__ indicates an address range for which authority is expressly forbidden. Cooperating IPAM services must not make allocations in this range. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ReservedBlockAPICreateRequest +*/ +func (a *ReservedBlockAPIService) Create(ctx context.Context) ReservedBlockAPICreateRequest { + return ReservedBlockAPICreateRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return CreateReservedBlockResponse +func (a *ReservedBlockAPIService) CreateExecute(r ReservedBlockAPICreateRequest) (*CreateReservedBlockResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *CreateReservedBlockResponse + ) + + localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "ReservedBlockAPIService.Create") + if err != nil { + return localVarReturnValue, nil, internal.NewGenericOpenAPIError(err.Error()) + } + + localVarPath := localBasePath + "/federation/reserved_block" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.body == nil { + return localVarReturnValue, nil, internal.ReportError("body is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := internal.SelectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := internal.SelectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if len(a.Client.Cfg.DefaultTags) > 0 && r.body != nil { + if r.body.Tags == nil { + r.body.Tags = make(map[string]interface{}) + } + for k, v := range a.Client.Cfg.DefaultTags { + if _, ok := r.body.Tags[k]; !ok { + r.body.Tags[k] = v + } + } + } + // body params + localVarPostBody = r.body + req, err := a.Client.PrepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.Client.CallAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := internal.NewGenericOpenAPIErrorWithBody(localVarHTTPResponse.Status, localVarBody) + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.Client.Decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) + return localVarReturnValue, localVarHTTPResponse, newErr + } + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ReservedBlockAPIDeleteRequest struct { + ctx context.Context + ApiService ReservedBlockAPI + id string +} + +func (r ReservedBlockAPIDeleteRequest) Execute() (*http.Response, error) { + return r.ApiService.DeleteExecute(r) +} + +/* +Delete Delete the reserved block. + +Use this method to delete a __ReservedBlock__ object. +The __ReservedBlock__ indicates an address range for which authority is expressly forbidden. Cooperating IPAM services must not make allocations in this range. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ReservedBlockAPIDeleteRequest +*/ +func (a *ReservedBlockAPIService) Delete(ctx context.Context, id string) ReservedBlockAPIDeleteRequest { + return ReservedBlockAPIDeleteRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +func (a *ReservedBlockAPIService) DeleteExecute(r ReservedBlockAPIDeleteRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []internal.FormFile + ) + + localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "ReservedBlockAPIService.Delete") + if err != nil { + return nil, internal.NewGenericOpenAPIError(err.Error()) + } + + localVarPath := localBasePath + "/federation/reserved_block/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(internal.ParameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := internal.SelectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{} + + // set Accept header + localVarHTTPHeaderAccept := internal.SelectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.Client.PrepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return nil, err + } + + localVarHTTPResponse, err := a.Client.CallAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := internal.NewGenericOpenAPIErrorWithBody(localVarHTTPResponse.Status, localVarBody) + return localVarHTTPResponse, newErr + } + + return localVarHTTPResponse, nil +} + +type ReservedBlockAPIListRequest struct { + ctx context.Context + ApiService ReservedBlockAPI + fields *string + filter *string + offset *int32 + limit *int32 + pageToken *string + orderBy *string + torderBy *string + tfilter *string +} + +// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. +func (r ReservedBlockAPIListRequest) Fields(fields string) ReservedBlockAPIListRequest { + r.fields = &fields + return r +} + +// A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | +func (r ReservedBlockAPIListRequest) Filter(filter string) ReservedBlockAPIListRequest { + r.filter = &filter + return r +} + +// The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. +func (r ReservedBlockAPIListRequest) Offset(offset int32) ReservedBlockAPIListRequest { + r.offset = &offset + return r +} + +// The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. +func (r ReservedBlockAPIListRequest) Limit(limit int32) ReservedBlockAPIListRequest { + r.limit = &limit + return r +} + +// The service-defined string used to identify a page of resources. A null value indicates the first page. +func (r ReservedBlockAPIListRequest) PageToken(pageToken string) ReservedBlockAPIListRequest { + r.pageToken = &pageToken + return r +} + +// A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. +func (r ReservedBlockAPIListRequest) OrderBy(orderBy string) ReservedBlockAPIListRequest { + r.orderBy = &orderBy + return r +} + +// This parameter is used for sorting by tags. +func (r ReservedBlockAPIListRequest) TorderBy(torderBy string) ReservedBlockAPIListRequest { + r.torderBy = &torderBy + return r +} + +// This parameter is used for filtering by tags. +func (r ReservedBlockAPIListRequest) Tfilter(tfilter string) ReservedBlockAPIListRequest { + r.tfilter = &tfilter + return r +} + +func (r ReservedBlockAPIListRequest) Execute() (*ListReservedBlockResponse, *http.Response, error) { + return r.ApiService.ListExecute(r) +} + +/* +List Retrieve the reserved block. + +Use this method to retrieve __ReservedBlock__ objects. +The __ReservedBlock__ indicates an address range for which authority is expressly forbidden. Cooperating IPAM services must not make allocations in this range. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ReservedBlockAPIListRequest +*/ +func (a *ReservedBlockAPIService) List(ctx context.Context) ReservedBlockAPIListRequest { + return ReservedBlockAPIListRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return ListReservedBlockResponse +func (a *ReservedBlockAPIService) ListExecute(r ReservedBlockAPIListRequest) (*ListReservedBlockResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *ListReservedBlockResponse + ) + + localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "ReservedBlockAPIService.List") + if err != nil { + return localVarReturnValue, nil, internal.NewGenericOpenAPIError(err.Error()) + } + + localVarPath := localBasePath + "/federation/reserved_block" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + internal.ParameterAddToHeaderOrQuery(localVarQueryParams, "_fields", r.fields, "") + } + if r.filter != nil { + internal.ParameterAddToHeaderOrQuery(localVarQueryParams, "_filter", r.filter, "") + } + if r.offset != nil { + internal.ParameterAddToHeaderOrQuery(localVarQueryParams, "_offset", r.offset, "") + } + if r.limit != nil { + internal.ParameterAddToHeaderOrQuery(localVarQueryParams, "_limit", r.limit, "") + } + if r.pageToken != nil { + internal.ParameterAddToHeaderOrQuery(localVarQueryParams, "_page_token", r.pageToken, "") + } + if r.orderBy != nil { + internal.ParameterAddToHeaderOrQuery(localVarQueryParams, "_order_by", r.orderBy, "") + } + if r.torderBy != nil { + internal.ParameterAddToHeaderOrQuery(localVarQueryParams, "_torder_by", r.torderBy, "") + } + if r.tfilter != nil { + internal.ParameterAddToHeaderOrQuery(localVarQueryParams, "_tfilter", r.tfilter, "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := internal.SelectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := internal.SelectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.Client.PrepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.Client.CallAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := internal.NewGenericOpenAPIErrorWithBody(localVarHTTPResponse.Status, localVarBody) + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.Client.Decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) + return localVarReturnValue, localVarHTTPResponse, newErr + } + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ReservedBlockAPIReadRequest struct { + ctx context.Context + ApiService ReservedBlockAPI + id string + fields *string +} + +// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. +func (r ReservedBlockAPIReadRequest) Fields(fields string) ReservedBlockAPIReadRequest { + r.fields = &fields + return r +} + +func (r ReservedBlockAPIReadRequest) Execute() (*ReadReservedBlockResponse, *http.Response, error) { + return r.ApiService.ReadExecute(r) +} + +/* +Read Retrieve the reserved block. + +Use this method to retrieve a __ReservedBlock__ object. +The __ReservedBlock__ indicates an address range for which authority is expressly forbidden. Cooperating IPAM services must not make allocations in this range. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ReservedBlockAPIReadRequest +*/ +func (a *ReservedBlockAPIService) Read(ctx context.Context, id string) ReservedBlockAPIReadRequest { + return ReservedBlockAPIReadRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// +// @return ReadReservedBlockResponse +func (a *ReservedBlockAPIService) ReadExecute(r ReservedBlockAPIReadRequest) (*ReadReservedBlockResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *ReadReservedBlockResponse + ) + + localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "ReservedBlockAPIService.Read") + if err != nil { + return localVarReturnValue, nil, internal.NewGenericOpenAPIError(err.Error()) + } + + localVarPath := localBasePath + "/federation/reserved_block/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(internal.ParameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + internal.ParameterAddToHeaderOrQuery(localVarQueryParams, "_fields", r.fields, "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := internal.SelectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := internal.SelectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.Client.PrepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.Client.CallAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := internal.NewGenericOpenAPIErrorWithBody(localVarHTTPResponse.Status, localVarBody) + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.Client.Decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) + return localVarReturnValue, localVarHTTPResponse, newErr + } + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ReservedBlockAPIUpdateRequest struct { + ctx context.Context + ApiService ReservedBlockAPI + id string + body *ReservedBlock +} + +func (r ReservedBlockAPIUpdateRequest) Body(body ReservedBlock) ReservedBlockAPIUpdateRequest { + r.body = &body + return r +} + +func (r ReservedBlockAPIUpdateRequest) Execute() (*UpdateReservedBlockResponse, *http.Response, error) { + return r.ApiService.UpdateExecute(r) +} + +/* +Update Update the reserved block. + +Use this method to update a __ReservedBlock__ object. +The __ReservedBlock__ indicates an address range for which authority is expressly forbidden. Cooperating IPAM services must not make allocations in this range. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ReservedBlockAPIUpdateRequest +*/ +func (a *ReservedBlockAPIService) Update(ctx context.Context, id string) ReservedBlockAPIUpdateRequest { + return ReservedBlockAPIUpdateRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// +// @return UpdateReservedBlockResponse +func (a *ReservedBlockAPIService) UpdateExecute(r ReservedBlockAPIUpdateRequest) (*UpdateReservedBlockResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *UpdateReservedBlockResponse + ) + + localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "ReservedBlockAPIService.Update") + if err != nil { + return localVarReturnValue, nil, internal.NewGenericOpenAPIError(err.Error()) + } + + localVarPath := localBasePath + "/federation/reserved_block/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(internal.ParameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.body == nil { + return localVarReturnValue, nil, internal.ReportError("body is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := internal.SelectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := internal.SelectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if len(a.Client.Cfg.DefaultTags) > 0 && r.body != nil { + if r.body.Tags == nil { + r.body.Tags = make(map[string]interface{}) + } + for k, v := range a.Client.Cfg.DefaultTags { + if _, ok := r.body.Tags[k]; !ok { + r.body.Tags[k] = v + } + } + } + // body params + localVarPostBody = r.body + req, err := a.Client.PrepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.Client.CallAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := internal.NewGenericOpenAPIErrorWithBody(localVarHTTPResponse.Status, localVarBody) + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.Client.Decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) + return localVarReturnValue, localVarHTTPResponse, newErr + } + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/ipamfederation/client.go b/ipamfederation/client.go new file mode 100644 index 0000000..bc16a2f --- /dev/null +++ b/ipamfederation/client.go @@ -0,0 +1,62 @@ +/* +IPAM Federation API + +The DDI IPAM Federation application enables a SaaS administrator to manage multiple IPAM systems from one central control point CSP. + +API version: v1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package ipamfederation + +import ( + "github.com/infobloxopen/bloxone-go-client/internal" + "github.com/infobloxopen/bloxone-go-client/option" +) + +const serviceBasePath = "/api/ddi/v1" + +// APIClient manages communication with the IPAM Federation API v1 +// In most cases there should be only one, shared, APIClient. +type APIClient struct { + *internal.APIClient + + // API Services + FederatedBlockAPI FederatedBlockAPI + FederatedRealmAPI FederatedRealmAPI + NextAvailableFederatedBlockAPI NextAvailableFederatedBlockAPI + NextAvailableOverlappingBlockAPI NextAvailableOverlappingBlockAPI + NextAvailableReservedBlockAPI NextAvailableReservedBlockAPI + OverlappingBlockAPI OverlappingBlockAPI + ReservedBlockAPI ReservedBlockAPI +} + +// NewAPIClient creates a new API client. +// The client can be configured with a variadic option. The following options are available: +// - WithClientName(string) sets the name of the client using the SDK. +// - WithCSPUrl(string) sets the URL for BloxOne Cloud Services Portal. +// - WithAPIKey(string) sets the APIKey for accessing the BloxOne API. +// - WithHTTPClient(*http.Client) sets the HTTPClient to use for the SDK. +// - WithDefaultTags(map[string]string) sets the tags the client can set by default for objects that has tags support. +// - WithDebug() sets the debug mode. +func NewAPIClient(options ...option.ClientOption) *APIClient { + cfg := internal.NewConfiguration() + for _, o := range options { + o(cfg) + } + + c := &APIClient{} + c.APIClient = internal.NewAPIClient(serviceBasePath, cfg) + + // API Services + c.FederatedBlockAPI = (*FederatedBlockAPIService)(&c.Common) + c.FederatedRealmAPI = (*FederatedRealmAPIService)(&c.Common) + c.NextAvailableFederatedBlockAPI = (*NextAvailableFederatedBlockAPIService)(&c.Common) + c.NextAvailableOverlappingBlockAPI = (*NextAvailableOverlappingBlockAPIService)(&c.Common) + c.NextAvailableReservedBlockAPI = (*NextAvailableReservedBlockAPIService)(&c.Common) + c.OverlappingBlockAPI = (*OverlappingBlockAPIService)(&c.Common) + c.ReservedBlockAPI = (*ReservedBlockAPIService)(&c.Common) + + return c +} diff --git a/ipamfederation/docs/Allocation.md b/ipamfederation/docs/Allocation.md new file mode 100644 index 0000000..b99e298 --- /dev/null +++ b/ipamfederation/docs/Allocation.md @@ -0,0 +1,134 @@ +# Allocation + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Allocated** | Pointer to **int64** | Percent of total space allocated. | [optional] [readonly] +**Delegated** | Pointer to **int64** | Percent of total space delegated. | [optional] [readonly] +**Overlapping** | Pointer to **int64** | Percent of total space in overlapping blocks. | [optional] [readonly] +**Reserved** | Pointer to **int64** | Percent of total space reserved. | [optional] [readonly] + +## Methods + +### NewAllocation + +`func NewAllocation() *Allocation` + +NewAllocation instantiates a new Allocation object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewAllocationWithDefaults + +`func NewAllocationWithDefaults() *Allocation` + +NewAllocationWithDefaults instantiates a new Allocation object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetAllocated + +`func (o *Allocation) GetAllocated() int64` + +GetAllocated returns the Allocated field if non-nil, zero value otherwise. + +### GetAllocatedOk + +`func (o *Allocation) GetAllocatedOk() (*int64, bool)` + +GetAllocatedOk returns a tuple with the Allocated field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAllocated + +`func (o *Allocation) SetAllocated(v int64)` + +SetAllocated sets Allocated field to given value. + +### HasAllocated + +`func (o *Allocation) HasAllocated() bool` + +HasAllocated returns a boolean if a field has been set. + +### GetDelegated + +`func (o *Allocation) GetDelegated() int64` + +GetDelegated returns the Delegated field if non-nil, zero value otherwise. + +### GetDelegatedOk + +`func (o *Allocation) GetDelegatedOk() (*int64, bool)` + +GetDelegatedOk returns a tuple with the Delegated field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDelegated + +`func (o *Allocation) SetDelegated(v int64)` + +SetDelegated sets Delegated field to given value. + +### HasDelegated + +`func (o *Allocation) HasDelegated() bool` + +HasDelegated returns a boolean if a field has been set. + +### GetOverlapping + +`func (o *Allocation) GetOverlapping() int64` + +GetOverlapping returns the Overlapping field if non-nil, zero value otherwise. + +### GetOverlappingOk + +`func (o *Allocation) GetOverlappingOk() (*int64, bool)` + +GetOverlappingOk returns a tuple with the Overlapping field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetOverlapping + +`func (o *Allocation) SetOverlapping(v int64)` + +SetOverlapping sets Overlapping field to given value. + +### HasOverlapping + +`func (o *Allocation) HasOverlapping() bool` + +HasOverlapping returns a boolean if a field has been set. + +### GetReserved + +`func (o *Allocation) GetReserved() int64` + +GetReserved returns the Reserved field if non-nil, zero value otherwise. + +### GetReservedOk + +`func (o *Allocation) GetReservedOk() (*int64, bool)` + +GetReservedOk returns a tuple with the Reserved field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetReserved + +`func (o *Allocation) SetReserved(v int64)` + +SetReserved sets Reserved field to given value. + +### HasReserved + +`func (o *Allocation) HasReserved() bool` + +HasReserved returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/ipamfederation/docs/CreateFederatedBlockResponse.md b/ipamfederation/docs/CreateFederatedBlockResponse.md new file mode 100644 index 0000000..b3e0c8f --- /dev/null +++ b/ipamfederation/docs/CreateFederatedBlockResponse.md @@ -0,0 +1,56 @@ +# CreateFederatedBlockResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Result** | Pointer to [**FederatedBlock**](FederatedBlock.md) | The created FederatedBlock object. | [optional] + +## Methods + +### NewCreateFederatedBlockResponse + +`func NewCreateFederatedBlockResponse() *CreateFederatedBlockResponse` + +NewCreateFederatedBlockResponse instantiates a new CreateFederatedBlockResponse object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewCreateFederatedBlockResponseWithDefaults + +`func NewCreateFederatedBlockResponseWithDefaults() *CreateFederatedBlockResponse` + +NewCreateFederatedBlockResponseWithDefaults instantiates a new CreateFederatedBlockResponse object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetResult + +`func (o *CreateFederatedBlockResponse) GetResult() FederatedBlock` + +GetResult returns the Result field if non-nil, zero value otherwise. + +### GetResultOk + +`func (o *CreateFederatedBlockResponse) GetResultOk() (*FederatedBlock, bool)` + +GetResultOk returns a tuple with the Result field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetResult + +`func (o *CreateFederatedBlockResponse) SetResult(v FederatedBlock)` + +SetResult sets Result field to given value. + +### HasResult + +`func (o *CreateFederatedBlockResponse) HasResult() bool` + +HasResult returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/ipamfederation/docs/CreateFederatedRealmResponse.md b/ipamfederation/docs/CreateFederatedRealmResponse.md new file mode 100644 index 0000000..79f2461 --- /dev/null +++ b/ipamfederation/docs/CreateFederatedRealmResponse.md @@ -0,0 +1,56 @@ +# CreateFederatedRealmResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Result** | Pointer to [**FederatedRealm**](FederatedRealm.md) | The created Federated Realm object. | [optional] + +## Methods + +### NewCreateFederatedRealmResponse + +`func NewCreateFederatedRealmResponse() *CreateFederatedRealmResponse` + +NewCreateFederatedRealmResponse instantiates a new CreateFederatedRealmResponse object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewCreateFederatedRealmResponseWithDefaults + +`func NewCreateFederatedRealmResponseWithDefaults() *CreateFederatedRealmResponse` + +NewCreateFederatedRealmResponseWithDefaults instantiates a new CreateFederatedRealmResponse object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetResult + +`func (o *CreateFederatedRealmResponse) GetResult() FederatedRealm` + +GetResult returns the Result field if non-nil, zero value otherwise. + +### GetResultOk + +`func (o *CreateFederatedRealmResponse) GetResultOk() (*FederatedRealm, bool)` + +GetResultOk returns a tuple with the Result field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetResult + +`func (o *CreateFederatedRealmResponse) SetResult(v FederatedRealm)` + +SetResult sets Result field to given value. + +### HasResult + +`func (o *CreateFederatedRealmResponse) HasResult() bool` + +HasResult returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/ipamfederation/docs/CreateNextAvailableFederatedBlockResponse.md b/ipamfederation/docs/CreateNextAvailableFederatedBlockResponse.md new file mode 100644 index 0000000..49477ba --- /dev/null +++ b/ipamfederation/docs/CreateNextAvailableFederatedBlockResponse.md @@ -0,0 +1,56 @@ +# CreateNextAvailableFederatedBlockResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Results** | Pointer to [**[]FederatedBlock**](FederatedBlock.md) | | [optional] + +## Methods + +### NewCreateNextAvailableFederatedBlockResponse + +`func NewCreateNextAvailableFederatedBlockResponse() *CreateNextAvailableFederatedBlockResponse` + +NewCreateNextAvailableFederatedBlockResponse instantiates a new CreateNextAvailableFederatedBlockResponse object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewCreateNextAvailableFederatedBlockResponseWithDefaults + +`func NewCreateNextAvailableFederatedBlockResponseWithDefaults() *CreateNextAvailableFederatedBlockResponse` + +NewCreateNextAvailableFederatedBlockResponseWithDefaults instantiates a new CreateNextAvailableFederatedBlockResponse object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetResults + +`func (o *CreateNextAvailableFederatedBlockResponse) GetResults() []FederatedBlock` + +GetResults returns the Results field if non-nil, zero value otherwise. + +### GetResultsOk + +`func (o *CreateNextAvailableFederatedBlockResponse) GetResultsOk() (*[]FederatedBlock, bool)` + +GetResultsOk returns a tuple with the Results field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetResults + +`func (o *CreateNextAvailableFederatedBlockResponse) SetResults(v []FederatedBlock)` + +SetResults sets Results field to given value. + +### HasResults + +`func (o *CreateNextAvailableFederatedBlockResponse) HasResults() bool` + +HasResults returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/ipamfederation/docs/CreateNextAvailableOverlappingBlockResponse.md b/ipamfederation/docs/CreateNextAvailableOverlappingBlockResponse.md new file mode 100644 index 0000000..13221c1 --- /dev/null +++ b/ipamfederation/docs/CreateNextAvailableOverlappingBlockResponse.md @@ -0,0 +1,56 @@ +# CreateNextAvailableOverlappingBlockResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Results** | Pointer to [**[]OverlappingBlock**](OverlappingBlock.md) | | [optional] + +## Methods + +### NewCreateNextAvailableOverlappingBlockResponse + +`func NewCreateNextAvailableOverlappingBlockResponse() *CreateNextAvailableOverlappingBlockResponse` + +NewCreateNextAvailableOverlappingBlockResponse instantiates a new CreateNextAvailableOverlappingBlockResponse object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewCreateNextAvailableOverlappingBlockResponseWithDefaults + +`func NewCreateNextAvailableOverlappingBlockResponseWithDefaults() *CreateNextAvailableOverlappingBlockResponse` + +NewCreateNextAvailableOverlappingBlockResponseWithDefaults instantiates a new CreateNextAvailableOverlappingBlockResponse object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetResults + +`func (o *CreateNextAvailableOverlappingBlockResponse) GetResults() []OverlappingBlock` + +GetResults returns the Results field if non-nil, zero value otherwise. + +### GetResultsOk + +`func (o *CreateNextAvailableOverlappingBlockResponse) GetResultsOk() (*[]OverlappingBlock, bool)` + +GetResultsOk returns a tuple with the Results field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetResults + +`func (o *CreateNextAvailableOverlappingBlockResponse) SetResults(v []OverlappingBlock)` + +SetResults sets Results field to given value. + +### HasResults + +`func (o *CreateNextAvailableOverlappingBlockResponse) HasResults() bool` + +HasResults returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/ipamfederation/docs/CreateNextAvailableReservedBlockResponse.md b/ipamfederation/docs/CreateNextAvailableReservedBlockResponse.md new file mode 100644 index 0000000..548964f --- /dev/null +++ b/ipamfederation/docs/CreateNextAvailableReservedBlockResponse.md @@ -0,0 +1,56 @@ +# CreateNextAvailableReservedBlockResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Results** | Pointer to [**[]ReservedBlock**](ReservedBlock.md) | | [optional] + +## Methods + +### NewCreateNextAvailableReservedBlockResponse + +`func NewCreateNextAvailableReservedBlockResponse() *CreateNextAvailableReservedBlockResponse` + +NewCreateNextAvailableReservedBlockResponse instantiates a new CreateNextAvailableReservedBlockResponse object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewCreateNextAvailableReservedBlockResponseWithDefaults + +`func NewCreateNextAvailableReservedBlockResponseWithDefaults() *CreateNextAvailableReservedBlockResponse` + +NewCreateNextAvailableReservedBlockResponseWithDefaults instantiates a new CreateNextAvailableReservedBlockResponse object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetResults + +`func (o *CreateNextAvailableReservedBlockResponse) GetResults() []ReservedBlock` + +GetResults returns the Results field if non-nil, zero value otherwise. + +### GetResultsOk + +`func (o *CreateNextAvailableReservedBlockResponse) GetResultsOk() (*[]ReservedBlock, bool)` + +GetResultsOk returns a tuple with the Results field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetResults + +`func (o *CreateNextAvailableReservedBlockResponse) SetResults(v []ReservedBlock)` + +SetResults sets Results field to given value. + +### HasResults + +`func (o *CreateNextAvailableReservedBlockResponse) HasResults() bool` + +HasResults returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/ipamfederation/docs/CreateOverlappingBlockResponse.md b/ipamfederation/docs/CreateOverlappingBlockResponse.md new file mode 100644 index 0000000..273c07c --- /dev/null +++ b/ipamfederation/docs/CreateOverlappingBlockResponse.md @@ -0,0 +1,56 @@ +# CreateOverlappingBlockResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Result** | Pointer to [**OverlappingBlock**](OverlappingBlock.md) | The created OverlappingBlock object. | [optional] + +## Methods + +### NewCreateOverlappingBlockResponse + +`func NewCreateOverlappingBlockResponse() *CreateOverlappingBlockResponse` + +NewCreateOverlappingBlockResponse instantiates a new CreateOverlappingBlockResponse object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewCreateOverlappingBlockResponseWithDefaults + +`func NewCreateOverlappingBlockResponseWithDefaults() *CreateOverlappingBlockResponse` + +NewCreateOverlappingBlockResponseWithDefaults instantiates a new CreateOverlappingBlockResponse object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetResult + +`func (o *CreateOverlappingBlockResponse) GetResult() OverlappingBlock` + +GetResult returns the Result field if non-nil, zero value otherwise. + +### GetResultOk + +`func (o *CreateOverlappingBlockResponse) GetResultOk() (*OverlappingBlock, bool)` + +GetResultOk returns a tuple with the Result field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetResult + +`func (o *CreateOverlappingBlockResponse) SetResult(v OverlappingBlock)` + +SetResult sets Result field to given value. + +### HasResult + +`func (o *CreateOverlappingBlockResponse) HasResult() bool` + +HasResult returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/ipamfederation/docs/CreateReservedBlockResponse.md b/ipamfederation/docs/CreateReservedBlockResponse.md new file mode 100644 index 0000000..0125016 --- /dev/null +++ b/ipamfederation/docs/CreateReservedBlockResponse.md @@ -0,0 +1,56 @@ +# CreateReservedBlockResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Result** | Pointer to [**ReservedBlock**](ReservedBlock.md) | The created ReservedBlock object. | [optional] + +## Methods + +### NewCreateReservedBlockResponse + +`func NewCreateReservedBlockResponse() *CreateReservedBlockResponse` + +NewCreateReservedBlockResponse instantiates a new CreateReservedBlockResponse object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewCreateReservedBlockResponseWithDefaults + +`func NewCreateReservedBlockResponseWithDefaults() *CreateReservedBlockResponse` + +NewCreateReservedBlockResponseWithDefaults instantiates a new CreateReservedBlockResponse object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetResult + +`func (o *CreateReservedBlockResponse) GetResult() ReservedBlock` + +GetResult returns the Result field if non-nil, zero value otherwise. + +### GetResultOk + +`func (o *CreateReservedBlockResponse) GetResultOk() (*ReservedBlock, bool)` + +GetResultOk returns a tuple with the Result field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetResult + +`func (o *CreateReservedBlockResponse) SetResult(v ReservedBlock)` + +SetResult sets Result field to given value. + +### HasResult + +`func (o *CreateReservedBlockResponse) HasResult() bool` + +HasResult returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/ipamfederation/docs/FederatedBlock.md b/ipamfederation/docs/FederatedBlock.md new file mode 100644 index 0000000..097d7c4 --- /dev/null +++ b/ipamfederation/docs/FederatedBlock.md @@ -0,0 +1,342 @@ +# FederatedBlock + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Address** | Pointer to **string** | The address field in form “a.b.c.d/n” where the “/n” may be omitted. In this case, the CIDR value must be defined in the _cidr_ field. When reading, the _address_ field is always in the form “a.b.c.d”. | [optional] +**AllocationV4** | Pointer to [**Allocation**](Allocation.md) | The percentage of the Federated Block’s total address space that is consumed by Leaf Terminals. | [optional] +**Cidr** | Pointer to **int64** | The CIDR of the federated block. This is required, if _address_ does not specify it in its input. | [optional] +**Comment** | Pointer to **string** | The description for the federated block. May contain 0 to 1024 characters. Can include UTF-8. | [optional] +**CreatedAt** | Pointer to **time.Time** | Time when the object has been created. | [optional] [readonly] +**FederatedRealm** | Pointer to **string** | The resource identifier. | [optional] +**Id** | Pointer to **string** | The resource identifier. | [optional] [readonly] +**Name** | Pointer to **string** | The name of the federated block. May contain 1 to 256 characters. Can include UTF-8. | [optional] +**Parent** | Pointer to **string** | The resource identifier. | [optional] +**Protocol** | Pointer to **string** | The type of protocol of federated block (_ip4_ or _ip6_). | [optional] [readonly] +**Tags** | Pointer to **map[string]interface{}** | The tags for the federated block in JSON format. | [optional] +**UpdatedAt** | Pointer to **time.Time** | Time when the object has been updated. Equals to _created_at_ if not updated after creation. | [optional] [readonly] + +## Methods + +### NewFederatedBlock + +`func NewFederatedBlock() *FederatedBlock` + +NewFederatedBlock instantiates a new FederatedBlock object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewFederatedBlockWithDefaults + +`func NewFederatedBlockWithDefaults() *FederatedBlock` + +NewFederatedBlockWithDefaults instantiates a new FederatedBlock object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetAddress + +`func (o *FederatedBlock) GetAddress() string` + +GetAddress returns the Address field if non-nil, zero value otherwise. + +### GetAddressOk + +`func (o *FederatedBlock) GetAddressOk() (*string, bool)` + +GetAddressOk returns a tuple with the Address field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAddress + +`func (o *FederatedBlock) SetAddress(v string)` + +SetAddress sets Address field to given value. + +### HasAddress + +`func (o *FederatedBlock) HasAddress() bool` + +HasAddress returns a boolean if a field has been set. + +### GetAllocationV4 + +`func (o *FederatedBlock) GetAllocationV4() Allocation` + +GetAllocationV4 returns the AllocationV4 field if non-nil, zero value otherwise. + +### GetAllocationV4Ok + +`func (o *FederatedBlock) GetAllocationV4Ok() (*Allocation, bool)` + +GetAllocationV4Ok returns a tuple with the AllocationV4 field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAllocationV4 + +`func (o *FederatedBlock) SetAllocationV4(v Allocation)` + +SetAllocationV4 sets AllocationV4 field to given value. + +### HasAllocationV4 + +`func (o *FederatedBlock) HasAllocationV4() bool` + +HasAllocationV4 returns a boolean if a field has been set. + +### GetCidr + +`func (o *FederatedBlock) GetCidr() int64` + +GetCidr returns the Cidr field if non-nil, zero value otherwise. + +### GetCidrOk + +`func (o *FederatedBlock) GetCidrOk() (*int64, bool)` + +GetCidrOk returns a tuple with the Cidr field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCidr + +`func (o *FederatedBlock) SetCidr(v int64)` + +SetCidr sets Cidr field to given value. + +### HasCidr + +`func (o *FederatedBlock) HasCidr() bool` + +HasCidr returns a boolean if a field has been set. + +### GetComment + +`func (o *FederatedBlock) GetComment() string` + +GetComment returns the Comment field if non-nil, zero value otherwise. + +### GetCommentOk + +`func (o *FederatedBlock) GetCommentOk() (*string, bool)` + +GetCommentOk returns a tuple with the Comment field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetComment + +`func (o *FederatedBlock) SetComment(v string)` + +SetComment sets Comment field to given value. + +### HasComment + +`func (o *FederatedBlock) HasComment() bool` + +HasComment returns a boolean if a field has been set. + +### GetCreatedAt + +`func (o *FederatedBlock) GetCreatedAt() time.Time` + +GetCreatedAt returns the CreatedAt field if non-nil, zero value otherwise. + +### GetCreatedAtOk + +`func (o *FederatedBlock) GetCreatedAtOk() (*time.Time, bool)` + +GetCreatedAtOk returns a tuple with the CreatedAt field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreatedAt + +`func (o *FederatedBlock) SetCreatedAt(v time.Time)` + +SetCreatedAt sets CreatedAt field to given value. + +### HasCreatedAt + +`func (o *FederatedBlock) HasCreatedAt() bool` + +HasCreatedAt returns a boolean if a field has been set. + +### GetFederatedRealm + +`func (o *FederatedBlock) GetFederatedRealm() string` + +GetFederatedRealm returns the FederatedRealm field if non-nil, zero value otherwise. + +### GetFederatedRealmOk + +`func (o *FederatedBlock) GetFederatedRealmOk() (*string, bool)` + +GetFederatedRealmOk returns a tuple with the FederatedRealm field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetFederatedRealm + +`func (o *FederatedBlock) SetFederatedRealm(v string)` + +SetFederatedRealm sets FederatedRealm field to given value. + +### HasFederatedRealm + +`func (o *FederatedBlock) HasFederatedRealm() bool` + +HasFederatedRealm returns a boolean if a field has been set. + +### GetId + +`func (o *FederatedBlock) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *FederatedBlock) GetIdOk() (*string, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *FederatedBlock) SetId(v string)` + +SetId sets Id field to given value. + +### HasId + +`func (o *FederatedBlock) HasId() bool` + +HasId returns a boolean if a field has been set. + +### GetName + +`func (o *FederatedBlock) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *FederatedBlock) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *FederatedBlock) SetName(v string)` + +SetName sets Name field to given value. + +### HasName + +`func (o *FederatedBlock) HasName() bool` + +HasName returns a boolean if a field has been set. + +### GetParent + +`func (o *FederatedBlock) GetParent() string` + +GetParent returns the Parent field if non-nil, zero value otherwise. + +### GetParentOk + +`func (o *FederatedBlock) GetParentOk() (*string, bool)` + +GetParentOk returns a tuple with the Parent field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetParent + +`func (o *FederatedBlock) SetParent(v string)` + +SetParent sets Parent field to given value. + +### HasParent + +`func (o *FederatedBlock) HasParent() bool` + +HasParent returns a boolean if a field has been set. + +### GetProtocol + +`func (o *FederatedBlock) GetProtocol() string` + +GetProtocol returns the Protocol field if non-nil, zero value otherwise. + +### GetProtocolOk + +`func (o *FederatedBlock) GetProtocolOk() (*string, bool)` + +GetProtocolOk returns a tuple with the Protocol field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetProtocol + +`func (o *FederatedBlock) SetProtocol(v string)` + +SetProtocol sets Protocol field to given value. + +### HasProtocol + +`func (o *FederatedBlock) HasProtocol() bool` + +HasProtocol returns a boolean if a field has been set. + +### GetTags + +`func (o *FederatedBlock) GetTags() map[string]interface{}` + +GetTags returns the Tags field if non-nil, zero value otherwise. + +### GetTagsOk + +`func (o *FederatedBlock) GetTagsOk() (*map[string]interface{}, bool)` + +GetTagsOk returns a tuple with the Tags field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTags + +`func (o *FederatedBlock) SetTags(v map[string]interface{})` + +SetTags sets Tags field to given value. + +### HasTags + +`func (o *FederatedBlock) HasTags() bool` + +HasTags returns a boolean if a field has been set. + +### GetUpdatedAt + +`func (o *FederatedBlock) GetUpdatedAt() time.Time` + +GetUpdatedAt returns the UpdatedAt field if non-nil, zero value otherwise. + +### GetUpdatedAtOk + +`func (o *FederatedBlock) GetUpdatedAtOk() (*time.Time, bool)` + +GetUpdatedAtOk returns a tuple with the UpdatedAt field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUpdatedAt + +`func (o *FederatedBlock) SetUpdatedAt(v time.Time)` + +SetUpdatedAt sets UpdatedAt field to given value. + +### HasUpdatedAt + +`func (o *FederatedBlock) HasUpdatedAt() bool` + +HasUpdatedAt returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/ipamfederation/docs/FederatedBlockAPI.md b/ipamfederation/docs/FederatedBlockAPI.md new file mode 100644 index 0000000..fdb8540 --- /dev/null +++ b/ipamfederation/docs/FederatedBlockAPI.md @@ -0,0 +1,359 @@ +# FederatedBlockAPI + +All URIs are relative to */api/ddi/v1* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**Create**](FederatedBlockAPI.md#Create) | **Post** /federation/federated_block | Create the federated block. +[**Delete**](FederatedBlockAPI.md#Delete) | **Delete** /federation/federated_block/{id} | Delete the federated block. +[**List**](FederatedBlockAPI.md#List) | **Get** /federation/federated_block | Retrieve the federated blocks. +[**Read**](FederatedBlockAPI.md#Read) | **Get** /federation/federated_block/{id} | Retrieve the federated block. +[**Update**](FederatedBlockAPI.md#Update) | **Patch** /federation/federated_block/{id} | Update the federated block. + + + +## Create + +> CreateFederatedBlockResponse Create(ctx).Body(body).Execute() + +Create the federated block. + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + + "github.com/infobloxopen/bloxone-go-client/ipamfederation" +) + +func main() { + body := *ipamfederation.NewFederatedBlock() // FederatedBlock | + + apiClient := ipamfederation.NewAPIClient() + resp, r, err := apiClient.FederatedBlockAPI.Create(context.Background()).Body(body).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `FederatedBlockAPI.Create``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `Create`: CreateFederatedBlockResponse + fmt.Fprintf(os.Stdout, "Response from `FederatedBlockAPI.Create`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a `FederatedBlockAPICreateRequest` struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**body** | [**FederatedBlock**](FederatedBlock.md) | | + +### Return type + +[**CreateFederatedBlockResponse**](CreateFederatedBlockResponse.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## Delete + +> Delete(ctx, id).Execute() + +Delete the federated block. + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + + "github.com/infobloxopen/bloxone-go-client/ipamfederation" +) + +func main() { + id := "a5183192-1e00-475f-b334-38e1f0bb1bc7" // string | An application specific resource identity of a resource + + apiClient := ipamfederation.NewAPIClient() + r, err := apiClient.FederatedBlockAPI.Delete(context.Background(), id).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `FederatedBlockAPI.Delete``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**id** | **string** | An application specific resource identity of a resource | + +### Other Parameters + +Other parameters are passed through a pointer to a `FederatedBlockAPIDeleteRequest` struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + +### Return type + + (empty response body) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## List + +> ListFederatedBlockResponse List(ctx).Fields(fields).Filter(filter).Offset(offset).Limit(limit).PageToken(pageToken).OrderBy(orderBy).TorderBy(torderBy).Tfilter(tfilter).Execute() + +Retrieve the federated blocks. + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + + "github.com/infobloxopen/bloxone-go-client/ipamfederation" +) + +func main() { + + apiClient := ipamfederation.NewAPIClient() + resp, r, err := apiClient.FederatedBlockAPI.List(context.Background()).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `FederatedBlockAPI.List``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `List`: ListFederatedBlockResponse + fmt.Fprintf(os.Stdout, "Response from `FederatedBlockAPI.List`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a `FederatedBlockAPIListRequest` struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**fields** | **string** | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. | +**filter** | **string** | A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | | +**offset** | **int32** | The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. | +**limit** | **int32** | The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. | +**pageToken** | **string** | The service-defined string used to identify a page of resources. A null value indicates the first page. | +**orderBy** | **string** | A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. | +**torderBy** | **string** | This parameter is used for sorting by tags. | +**tfilter** | **string** | This parameter is used for filtering by tags. | + +### Return type + +[**ListFederatedBlockResponse**](ListFederatedBlockResponse.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## Read + +> ReadFederatedBlockResponse Read(ctx, id).Fields(fields).Execute() + +Retrieve the federated block. + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + + "github.com/infobloxopen/bloxone-go-client/ipamfederation" +) + +func main() { + id := "a5183192-1e00-475f-b334-38e1f0bb1bc7" // string | An application specific resource identity of a resource + + apiClient := ipamfederation.NewAPIClient() + resp, r, err := apiClient.FederatedBlockAPI.Read(context.Background(), id).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `FederatedBlockAPI.Read``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `Read`: ReadFederatedBlockResponse + fmt.Fprintf(os.Stdout, "Response from `FederatedBlockAPI.Read`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**id** | **string** | An application specific resource identity of a resource | + +### Other Parameters + +Other parameters are passed through a pointer to a `FederatedBlockAPIReadRequest` struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**fields** | **string** | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. | + +### Return type + +[**ReadFederatedBlockResponse**](ReadFederatedBlockResponse.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## Update + +> UpdateFederatedBlockResponse Update(ctx, id).Body(body).Execute() + +Update the federated block. + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + + "github.com/infobloxopen/bloxone-go-client/ipamfederation" +) + +func main() { + id := "a5183192-1e00-475f-b334-38e1f0bb1bc7" // string | An application specific resource identity of a resource + body := *ipamfederation.NewFederatedBlock() // FederatedBlock | + + apiClient := ipamfederation.NewAPIClient() + resp, r, err := apiClient.FederatedBlockAPI.Update(context.Background(), id).Body(body).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `FederatedBlockAPI.Update``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `Update`: UpdateFederatedBlockResponse + fmt.Fprintf(os.Stdout, "Response from `FederatedBlockAPI.Update`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**id** | **string** | An application specific resource identity of a resource | + +### Other Parameters + +Other parameters are passed through a pointer to a `FederatedBlockAPIUpdateRequest` struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**body** | [**FederatedBlock**](FederatedBlock.md) | | + +### Return type + +[**UpdateFederatedBlockResponse**](UpdateFederatedBlockResponse.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/ipamfederation/docs/FederatedRealm.md b/ipamfederation/docs/FederatedRealm.md new file mode 100644 index 0000000..ec53da1 --- /dev/null +++ b/ipamfederation/docs/FederatedRealm.md @@ -0,0 +1,207 @@ +# FederatedRealm + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AllocationV4** | Pointer to [**Allocation**](Allocation.md) | The aggregate of all Federated Blocks within the Realm. | [optional] +**Comment** | Pointer to **string** | The description of the federated realm. May contain 0 to 1024 characters. Can include UTF-8. | [optional] +**CreatedAt** | Pointer to **time.Time** | Time when the object has been created. | [optional] [readonly] +**Id** | Pointer to **string** | The resource identifier. | [optional] [readonly] +**Name** | **string** | The name of the federated realm. May contain 1 to 256 characters; can include UTF-8. | +**Tags** | Pointer to **map[string]interface{}** | The tags for the federated realm in JSON format. | [optional] +**UpdatedAt** | Pointer to **time.Time** | Time when the object has been updated. Equals to _created_at_ if not updated after creation. | [optional] [readonly] + +## Methods + +### NewFederatedRealm + +`func NewFederatedRealm(name string, ) *FederatedRealm` + +NewFederatedRealm instantiates a new FederatedRealm object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewFederatedRealmWithDefaults + +`func NewFederatedRealmWithDefaults() *FederatedRealm` + +NewFederatedRealmWithDefaults instantiates a new FederatedRealm object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetAllocationV4 + +`func (o *FederatedRealm) GetAllocationV4() Allocation` + +GetAllocationV4 returns the AllocationV4 field if non-nil, zero value otherwise. + +### GetAllocationV4Ok + +`func (o *FederatedRealm) GetAllocationV4Ok() (*Allocation, bool)` + +GetAllocationV4Ok returns a tuple with the AllocationV4 field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAllocationV4 + +`func (o *FederatedRealm) SetAllocationV4(v Allocation)` + +SetAllocationV4 sets AllocationV4 field to given value. + +### HasAllocationV4 + +`func (o *FederatedRealm) HasAllocationV4() bool` + +HasAllocationV4 returns a boolean if a field has been set. + +### GetComment + +`func (o *FederatedRealm) GetComment() string` + +GetComment returns the Comment field if non-nil, zero value otherwise. + +### GetCommentOk + +`func (o *FederatedRealm) GetCommentOk() (*string, bool)` + +GetCommentOk returns a tuple with the Comment field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetComment + +`func (o *FederatedRealm) SetComment(v string)` + +SetComment sets Comment field to given value. + +### HasComment + +`func (o *FederatedRealm) HasComment() bool` + +HasComment returns a boolean if a field has been set. + +### GetCreatedAt + +`func (o *FederatedRealm) GetCreatedAt() time.Time` + +GetCreatedAt returns the CreatedAt field if non-nil, zero value otherwise. + +### GetCreatedAtOk + +`func (o *FederatedRealm) GetCreatedAtOk() (*time.Time, bool)` + +GetCreatedAtOk returns a tuple with the CreatedAt field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreatedAt + +`func (o *FederatedRealm) SetCreatedAt(v time.Time)` + +SetCreatedAt sets CreatedAt field to given value. + +### HasCreatedAt + +`func (o *FederatedRealm) HasCreatedAt() bool` + +HasCreatedAt returns a boolean if a field has been set. + +### GetId + +`func (o *FederatedRealm) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *FederatedRealm) GetIdOk() (*string, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *FederatedRealm) SetId(v string)` + +SetId sets Id field to given value. + +### HasId + +`func (o *FederatedRealm) HasId() bool` + +HasId returns a boolean if a field has been set. + +### GetName + +`func (o *FederatedRealm) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *FederatedRealm) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *FederatedRealm) SetName(v string)` + +SetName sets Name field to given value. + + +### GetTags + +`func (o *FederatedRealm) GetTags() map[string]interface{}` + +GetTags returns the Tags field if non-nil, zero value otherwise. + +### GetTagsOk + +`func (o *FederatedRealm) GetTagsOk() (*map[string]interface{}, bool)` + +GetTagsOk returns a tuple with the Tags field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTags + +`func (o *FederatedRealm) SetTags(v map[string]interface{})` + +SetTags sets Tags field to given value. + +### HasTags + +`func (o *FederatedRealm) HasTags() bool` + +HasTags returns a boolean if a field has been set. + +### GetUpdatedAt + +`func (o *FederatedRealm) GetUpdatedAt() time.Time` + +GetUpdatedAt returns the UpdatedAt field if non-nil, zero value otherwise. + +### GetUpdatedAtOk + +`func (o *FederatedRealm) GetUpdatedAtOk() (*time.Time, bool)` + +GetUpdatedAtOk returns a tuple with the UpdatedAt field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUpdatedAt + +`func (o *FederatedRealm) SetUpdatedAt(v time.Time)` + +SetUpdatedAt sets UpdatedAt field to given value. + +### HasUpdatedAt + +`func (o *FederatedRealm) HasUpdatedAt() bool` + +HasUpdatedAt returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/ipamfederation/docs/FederatedRealmAPI.md b/ipamfederation/docs/FederatedRealmAPI.md new file mode 100644 index 0000000..51db6f5 --- /dev/null +++ b/ipamfederation/docs/FederatedRealmAPI.md @@ -0,0 +1,359 @@ +# FederatedRealmAPI + +All URIs are relative to */api/ddi/v1* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**Create**](FederatedRealmAPI.md#Create) | **Post** /federation/federated_realm | Create the federated realm. +[**Delete**](FederatedRealmAPI.md#Delete) | **Delete** /federation/federated_realm/{id} | Delete federated realm. +[**List**](FederatedRealmAPI.md#List) | **Get** /federation/federated_realm | Retrieve federated realms. +[**Read**](FederatedRealmAPI.md#Read) | **Get** /federation/federated_realm/{id} | Retrieve the federated realm. +[**Update**](FederatedRealmAPI.md#Update) | **Patch** /federation/federated_realm/{id} | Update the federated realm. + + + +## Create + +> CreateFederatedRealmResponse Create(ctx).Body(body).Execute() + +Create the federated realm. + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + + "github.com/infobloxopen/bloxone-go-client/ipamfederation" +) + +func main() { + body := *ipamfederation.NewFederatedRealm("Name_example") // FederatedRealm | + + apiClient := ipamfederation.NewAPIClient() + resp, r, err := apiClient.FederatedRealmAPI.Create(context.Background()).Body(body).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `FederatedRealmAPI.Create``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `Create`: CreateFederatedRealmResponse + fmt.Fprintf(os.Stdout, "Response from `FederatedRealmAPI.Create`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a `FederatedRealmAPICreateRequest` struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**body** | [**FederatedRealm**](FederatedRealm.md) | | + +### Return type + +[**CreateFederatedRealmResponse**](CreateFederatedRealmResponse.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## Delete + +> Delete(ctx, id).Execute() + +Delete federated realm. + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + + "github.com/infobloxopen/bloxone-go-client/ipamfederation" +) + +func main() { + id := "a5183192-1e00-475f-b334-38e1f0bb1bc7" // string | An application specific resource identity of a resource + + apiClient := ipamfederation.NewAPIClient() + r, err := apiClient.FederatedRealmAPI.Delete(context.Background(), id).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `FederatedRealmAPI.Delete``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**id** | **string** | An application specific resource identity of a resource | + +### Other Parameters + +Other parameters are passed through a pointer to a `FederatedRealmAPIDeleteRequest` struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + +### Return type + + (empty response body) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## List + +> ListFederatedRealmResponse List(ctx).Filter(filter).OrderBy(orderBy).Fields(fields).Offset(offset).Limit(limit).PageToken(pageToken).TorderBy(torderBy).Tfilter(tfilter).Execute() + +Retrieve federated realms. + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + + "github.com/infobloxopen/bloxone-go-client/ipamfederation" +) + +func main() { + + apiClient := ipamfederation.NewAPIClient() + resp, r, err := apiClient.FederatedRealmAPI.List(context.Background()).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `FederatedRealmAPI.List``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `List`: ListFederatedRealmResponse + fmt.Fprintf(os.Stdout, "Response from `FederatedRealmAPI.List`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a `FederatedRealmAPIListRequest` struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**filter** | **string** | A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | | +**orderBy** | **string** | A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. | +**fields** | **string** | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. | +**offset** | **int32** | The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. | +**limit** | **int32** | The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. | +**pageToken** | **string** | The service-defined string used to identify a page of resources. A null value indicates the first page. | +**torderBy** | **string** | This parameter is used for sorting by tags. | +**tfilter** | **string** | This parameter is used for filtering by tags. | + +### Return type + +[**ListFederatedRealmResponse**](ListFederatedRealmResponse.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## Read + +> ReadFederatedRealmResponse Read(ctx, id).Fields(fields).Execute() + +Retrieve the federated realm. + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + + "github.com/infobloxopen/bloxone-go-client/ipamfederation" +) + +func main() { + id := "a5183192-1e00-475f-b334-38e1f0bb1bc7" // string | An application specific resource identity of a resource + + apiClient := ipamfederation.NewAPIClient() + resp, r, err := apiClient.FederatedRealmAPI.Read(context.Background(), id).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `FederatedRealmAPI.Read``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `Read`: ReadFederatedRealmResponse + fmt.Fprintf(os.Stdout, "Response from `FederatedRealmAPI.Read`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**id** | **string** | An application specific resource identity of a resource | + +### Other Parameters + +Other parameters are passed through a pointer to a `FederatedRealmAPIReadRequest` struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**fields** | **string** | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. | + +### Return type + +[**ReadFederatedRealmResponse**](ReadFederatedRealmResponse.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## Update + +> UpdateFederatedRealmResponse Update(ctx, id).Body(body).Execute() + +Update the federated realm. + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + + "github.com/infobloxopen/bloxone-go-client/ipamfederation" +) + +func main() { + id := "a5183192-1e00-475f-b334-38e1f0bb1bc7" // string | An application specific resource identity of a resource + body := *ipamfederation.NewFederatedRealm("Name_example") // FederatedRealm | + + apiClient := ipamfederation.NewAPIClient() + resp, r, err := apiClient.FederatedRealmAPI.Update(context.Background(), id).Body(body).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `FederatedRealmAPI.Update``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `Update`: UpdateFederatedRealmResponse + fmt.Fprintf(os.Stdout, "Response from `FederatedRealmAPI.Update`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**id** | **string** | An application specific resource identity of a resource | + +### Other Parameters + +Other parameters are passed through a pointer to a `FederatedRealmAPIUpdateRequest` struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**body** | [**FederatedRealm**](FederatedRealm.md) | | + +### Return type + +[**UpdateFederatedRealmResponse**](UpdateFederatedRealmResponse.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/ipamfederation/docs/ListFederatedBlockResponse.md b/ipamfederation/docs/ListFederatedBlockResponse.md new file mode 100644 index 0000000..a1fe75d --- /dev/null +++ b/ipamfederation/docs/ListFederatedBlockResponse.md @@ -0,0 +1,56 @@ +# ListFederatedBlockResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Results** | Pointer to [**[]FederatedBlock**](FederatedBlock.md) | A list of FederatedBlock objects. | [optional] + +## Methods + +### NewListFederatedBlockResponse + +`func NewListFederatedBlockResponse() *ListFederatedBlockResponse` + +NewListFederatedBlockResponse instantiates a new ListFederatedBlockResponse object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewListFederatedBlockResponseWithDefaults + +`func NewListFederatedBlockResponseWithDefaults() *ListFederatedBlockResponse` + +NewListFederatedBlockResponseWithDefaults instantiates a new ListFederatedBlockResponse object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetResults + +`func (o *ListFederatedBlockResponse) GetResults() []FederatedBlock` + +GetResults returns the Results field if non-nil, zero value otherwise. + +### GetResultsOk + +`func (o *ListFederatedBlockResponse) GetResultsOk() (*[]FederatedBlock, bool)` + +GetResultsOk returns a tuple with the Results field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetResults + +`func (o *ListFederatedBlockResponse) SetResults(v []FederatedBlock)` + +SetResults sets Results field to given value. + +### HasResults + +`func (o *ListFederatedBlockResponse) HasResults() bool` + +HasResults returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/ipamfederation/docs/ListFederatedRealmResponse.md b/ipamfederation/docs/ListFederatedRealmResponse.md new file mode 100644 index 0000000..7f3ef25 --- /dev/null +++ b/ipamfederation/docs/ListFederatedRealmResponse.md @@ -0,0 +1,56 @@ +# ListFederatedRealmResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Results** | Pointer to [**[]FederatedRealm**](FederatedRealm.md) | The list of FederatedRealm objects. | [optional] + +## Methods + +### NewListFederatedRealmResponse + +`func NewListFederatedRealmResponse() *ListFederatedRealmResponse` + +NewListFederatedRealmResponse instantiates a new ListFederatedRealmResponse object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewListFederatedRealmResponseWithDefaults + +`func NewListFederatedRealmResponseWithDefaults() *ListFederatedRealmResponse` + +NewListFederatedRealmResponseWithDefaults instantiates a new ListFederatedRealmResponse object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetResults + +`func (o *ListFederatedRealmResponse) GetResults() []FederatedRealm` + +GetResults returns the Results field if non-nil, zero value otherwise. + +### GetResultsOk + +`func (o *ListFederatedRealmResponse) GetResultsOk() (*[]FederatedRealm, bool)` + +GetResultsOk returns a tuple with the Results field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetResults + +`func (o *ListFederatedRealmResponse) SetResults(v []FederatedRealm)` + +SetResults sets Results field to given value. + +### HasResults + +`func (o *ListFederatedRealmResponse) HasResults() bool` + +HasResults returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/ipamfederation/docs/ListNextAvailableFederatedBlockResponse.md b/ipamfederation/docs/ListNextAvailableFederatedBlockResponse.md new file mode 100644 index 0000000..1d74bef --- /dev/null +++ b/ipamfederation/docs/ListNextAvailableFederatedBlockResponse.md @@ -0,0 +1,56 @@ +# ListNextAvailableFederatedBlockResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Results** | Pointer to [**[]FederatedBlock**](FederatedBlock.md) | | [optional] + +## Methods + +### NewListNextAvailableFederatedBlockResponse + +`func NewListNextAvailableFederatedBlockResponse() *ListNextAvailableFederatedBlockResponse` + +NewListNextAvailableFederatedBlockResponse instantiates a new ListNextAvailableFederatedBlockResponse object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewListNextAvailableFederatedBlockResponseWithDefaults + +`func NewListNextAvailableFederatedBlockResponseWithDefaults() *ListNextAvailableFederatedBlockResponse` + +NewListNextAvailableFederatedBlockResponseWithDefaults instantiates a new ListNextAvailableFederatedBlockResponse object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetResults + +`func (o *ListNextAvailableFederatedBlockResponse) GetResults() []FederatedBlock` + +GetResults returns the Results field if non-nil, zero value otherwise. + +### GetResultsOk + +`func (o *ListNextAvailableFederatedBlockResponse) GetResultsOk() (*[]FederatedBlock, bool)` + +GetResultsOk returns a tuple with the Results field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetResults + +`func (o *ListNextAvailableFederatedBlockResponse) SetResults(v []FederatedBlock)` + +SetResults sets Results field to given value. + +### HasResults + +`func (o *ListNextAvailableFederatedBlockResponse) HasResults() bool` + +HasResults returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/ipamfederation/docs/ListNextAvailableOverlappingBlockResponse.md b/ipamfederation/docs/ListNextAvailableOverlappingBlockResponse.md new file mode 100644 index 0000000..09ab182 --- /dev/null +++ b/ipamfederation/docs/ListNextAvailableOverlappingBlockResponse.md @@ -0,0 +1,56 @@ +# ListNextAvailableOverlappingBlockResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Results** | Pointer to [**[]OverlappingBlock**](OverlappingBlock.md) | | [optional] + +## Methods + +### NewListNextAvailableOverlappingBlockResponse + +`func NewListNextAvailableOverlappingBlockResponse() *ListNextAvailableOverlappingBlockResponse` + +NewListNextAvailableOverlappingBlockResponse instantiates a new ListNextAvailableOverlappingBlockResponse object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewListNextAvailableOverlappingBlockResponseWithDefaults + +`func NewListNextAvailableOverlappingBlockResponseWithDefaults() *ListNextAvailableOverlappingBlockResponse` + +NewListNextAvailableOverlappingBlockResponseWithDefaults instantiates a new ListNextAvailableOverlappingBlockResponse object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetResults + +`func (o *ListNextAvailableOverlappingBlockResponse) GetResults() []OverlappingBlock` + +GetResults returns the Results field if non-nil, zero value otherwise. + +### GetResultsOk + +`func (o *ListNextAvailableOverlappingBlockResponse) GetResultsOk() (*[]OverlappingBlock, bool)` + +GetResultsOk returns a tuple with the Results field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetResults + +`func (o *ListNextAvailableOverlappingBlockResponse) SetResults(v []OverlappingBlock)` + +SetResults sets Results field to given value. + +### HasResults + +`func (o *ListNextAvailableOverlappingBlockResponse) HasResults() bool` + +HasResults returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/ipamfederation/docs/ListNextAvailableReservedBlockResponse.md b/ipamfederation/docs/ListNextAvailableReservedBlockResponse.md new file mode 100644 index 0000000..918a18c --- /dev/null +++ b/ipamfederation/docs/ListNextAvailableReservedBlockResponse.md @@ -0,0 +1,56 @@ +# ListNextAvailableReservedBlockResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Results** | Pointer to [**[]ReservedBlock**](ReservedBlock.md) | | [optional] + +## Methods + +### NewListNextAvailableReservedBlockResponse + +`func NewListNextAvailableReservedBlockResponse() *ListNextAvailableReservedBlockResponse` + +NewListNextAvailableReservedBlockResponse instantiates a new ListNextAvailableReservedBlockResponse object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewListNextAvailableReservedBlockResponseWithDefaults + +`func NewListNextAvailableReservedBlockResponseWithDefaults() *ListNextAvailableReservedBlockResponse` + +NewListNextAvailableReservedBlockResponseWithDefaults instantiates a new ListNextAvailableReservedBlockResponse object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetResults + +`func (o *ListNextAvailableReservedBlockResponse) GetResults() []ReservedBlock` + +GetResults returns the Results field if non-nil, zero value otherwise. + +### GetResultsOk + +`func (o *ListNextAvailableReservedBlockResponse) GetResultsOk() (*[]ReservedBlock, bool)` + +GetResultsOk returns a tuple with the Results field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetResults + +`func (o *ListNextAvailableReservedBlockResponse) SetResults(v []ReservedBlock)` + +SetResults sets Results field to given value. + +### HasResults + +`func (o *ListNextAvailableReservedBlockResponse) HasResults() bool` + +HasResults returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/ipamfederation/docs/ListOverlappingBlockResponse.md b/ipamfederation/docs/ListOverlappingBlockResponse.md new file mode 100644 index 0000000..1872ba4 --- /dev/null +++ b/ipamfederation/docs/ListOverlappingBlockResponse.md @@ -0,0 +1,56 @@ +# ListOverlappingBlockResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Results** | Pointer to [**[]OverlappingBlock**](OverlappingBlock.md) | A list of OverlappingBlock objects. | [optional] + +## Methods + +### NewListOverlappingBlockResponse + +`func NewListOverlappingBlockResponse() *ListOverlappingBlockResponse` + +NewListOverlappingBlockResponse instantiates a new ListOverlappingBlockResponse object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewListOverlappingBlockResponseWithDefaults + +`func NewListOverlappingBlockResponseWithDefaults() *ListOverlappingBlockResponse` + +NewListOverlappingBlockResponseWithDefaults instantiates a new ListOverlappingBlockResponse object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetResults + +`func (o *ListOverlappingBlockResponse) GetResults() []OverlappingBlock` + +GetResults returns the Results field if non-nil, zero value otherwise. + +### GetResultsOk + +`func (o *ListOverlappingBlockResponse) GetResultsOk() (*[]OverlappingBlock, bool)` + +GetResultsOk returns a tuple with the Results field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetResults + +`func (o *ListOverlappingBlockResponse) SetResults(v []OverlappingBlock)` + +SetResults sets Results field to given value. + +### HasResults + +`func (o *ListOverlappingBlockResponse) HasResults() bool` + +HasResults returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/ipamfederation/docs/ListReservedBlockResponse.md b/ipamfederation/docs/ListReservedBlockResponse.md new file mode 100644 index 0000000..c357c49 --- /dev/null +++ b/ipamfederation/docs/ListReservedBlockResponse.md @@ -0,0 +1,56 @@ +# ListReservedBlockResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Results** | Pointer to [**[]ReservedBlock**](ReservedBlock.md) | A list of ReservedBlock objects. | [optional] + +## Methods + +### NewListReservedBlockResponse + +`func NewListReservedBlockResponse() *ListReservedBlockResponse` + +NewListReservedBlockResponse instantiates a new ListReservedBlockResponse object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewListReservedBlockResponseWithDefaults + +`func NewListReservedBlockResponseWithDefaults() *ListReservedBlockResponse` + +NewListReservedBlockResponseWithDefaults instantiates a new ListReservedBlockResponse object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetResults + +`func (o *ListReservedBlockResponse) GetResults() []ReservedBlock` + +GetResults returns the Results field if non-nil, zero value otherwise. + +### GetResultsOk + +`func (o *ListReservedBlockResponse) GetResultsOk() (*[]ReservedBlock, bool)` + +GetResultsOk returns a tuple with the Results field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetResults + +`func (o *ListReservedBlockResponse) SetResults(v []ReservedBlock)` + +SetResults sets Results field to given value. + +### HasResults + +`func (o *ListReservedBlockResponse) HasResults() bool` + +HasResults returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/ipamfederation/docs/NextAvailableBlockRequest.md b/ipamfederation/docs/NextAvailableBlockRequest.md new file mode 100644 index 0000000..582ec4d --- /dev/null +++ b/ipamfederation/docs/NextAvailableBlockRequest.md @@ -0,0 +1,186 @@ +# NextAvailableBlockRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Cidr** | Pointer to **int64** | The CIDR of the federated block. This is required, if _address_ does not specify it in its input. | [optional] +**Comment** | Pointer to **string** | The description for the _federation/federated_block_. May contain 0 to 1024 characters. Can include UTF-8. | [optional] +**Count** | Pointer to **int64** | The count of __Block__ required. If not provided, it will default to 1. | [optional] +**Id** | Pointer to **string** | The resource identifier. | [optional] [readonly] +**Name** | Pointer to **string** | The name to be provided. | [optional] +**Tags** | Pointer to **map[string]interface{}** | The tags for the federated block in JSON format. | [optional] + +## Methods + +### NewNextAvailableBlockRequest + +`func NewNextAvailableBlockRequest() *NextAvailableBlockRequest` + +NewNextAvailableBlockRequest instantiates a new NextAvailableBlockRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewNextAvailableBlockRequestWithDefaults + +`func NewNextAvailableBlockRequestWithDefaults() *NextAvailableBlockRequest` + +NewNextAvailableBlockRequestWithDefaults instantiates a new NextAvailableBlockRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetCidr + +`func (o *NextAvailableBlockRequest) GetCidr() int64` + +GetCidr returns the Cidr field if non-nil, zero value otherwise. + +### GetCidrOk + +`func (o *NextAvailableBlockRequest) GetCidrOk() (*int64, bool)` + +GetCidrOk returns a tuple with the Cidr field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCidr + +`func (o *NextAvailableBlockRequest) SetCidr(v int64)` + +SetCidr sets Cidr field to given value. + +### HasCidr + +`func (o *NextAvailableBlockRequest) HasCidr() bool` + +HasCidr returns a boolean if a field has been set. + +### GetComment + +`func (o *NextAvailableBlockRequest) GetComment() string` + +GetComment returns the Comment field if non-nil, zero value otherwise. + +### GetCommentOk + +`func (o *NextAvailableBlockRequest) GetCommentOk() (*string, bool)` + +GetCommentOk returns a tuple with the Comment field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetComment + +`func (o *NextAvailableBlockRequest) SetComment(v string)` + +SetComment sets Comment field to given value. + +### HasComment + +`func (o *NextAvailableBlockRequest) HasComment() bool` + +HasComment returns a boolean if a field has been set. + +### GetCount + +`func (o *NextAvailableBlockRequest) GetCount() int64` + +GetCount returns the Count field if non-nil, zero value otherwise. + +### GetCountOk + +`func (o *NextAvailableBlockRequest) GetCountOk() (*int64, bool)` + +GetCountOk returns a tuple with the Count field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCount + +`func (o *NextAvailableBlockRequest) SetCount(v int64)` + +SetCount sets Count field to given value. + +### HasCount + +`func (o *NextAvailableBlockRequest) HasCount() bool` + +HasCount returns a boolean if a field has been set. + +### GetId + +`func (o *NextAvailableBlockRequest) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *NextAvailableBlockRequest) GetIdOk() (*string, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *NextAvailableBlockRequest) SetId(v string)` + +SetId sets Id field to given value. + +### HasId + +`func (o *NextAvailableBlockRequest) HasId() bool` + +HasId returns a boolean if a field has been set. + +### GetName + +`func (o *NextAvailableBlockRequest) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *NextAvailableBlockRequest) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *NextAvailableBlockRequest) SetName(v string)` + +SetName sets Name field to given value. + +### HasName + +`func (o *NextAvailableBlockRequest) HasName() bool` + +HasName returns a boolean if a field has been set. + +### GetTags + +`func (o *NextAvailableBlockRequest) GetTags() map[string]interface{}` + +GetTags returns the Tags field if non-nil, zero value otherwise. + +### GetTagsOk + +`func (o *NextAvailableBlockRequest) GetTagsOk() (*map[string]interface{}, bool)` + +GetTagsOk returns a tuple with the Tags field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTags + +`func (o *NextAvailableBlockRequest) SetTags(v map[string]interface{})` + +SetTags sets Tags field to given value. + +### HasTags + +`func (o *NextAvailableBlockRequest) HasTags() bool` + +HasTags returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/ipamfederation/docs/NextAvailableFederatedBlockAPI.md b/ipamfederation/docs/NextAvailableFederatedBlockAPI.md new file mode 100644 index 0000000..e2fbe39 --- /dev/null +++ b/ipamfederation/docs/NextAvailableFederatedBlockAPI.md @@ -0,0 +1,298 @@ +# NextAvailableFederatedBlockAPI + +All URIs are relative to */api/ddi/v1* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**CreateNextAvailableFederatedBlocks**](NextAvailableFederatedBlockAPI.md#CreateNextAvailableFederatedBlocks) | **Post** /federation/federated_block/{id}/next_available_federated_block | Retrieve the next available federated block. +[**CreateNextAvailableOverlappingBlocks**](NextAvailableFederatedBlockAPI.md#CreateNextAvailableOverlappingBlocks) | **Post** /federation/federated_block/{id}/next_available_overlapping_block | Retrieve the next available overlapping block. +[**CreateNextAvailableReservedBlocks**](NextAvailableFederatedBlockAPI.md#CreateNextAvailableReservedBlocks) | **Post** /federation/federated_block/{id}/next_available_reserved_block | Retrieve the next available reserved block. +[**ListNextAvailableFederatedBlocks**](NextAvailableFederatedBlockAPI.md#ListNextAvailableFederatedBlocks) | **Get** /federation/federated_block/{id}/next_available_federated_block | List the next available federated block. + + + +## CreateNextAvailableFederatedBlocks + +> CreateNextAvailableFederatedBlockResponse CreateNextAvailableFederatedBlocks(ctx, id).Body(body).Execute() + +Retrieve the next available federated block. + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + + "github.com/infobloxopen/bloxone-go-client/ipamfederation" +) + +func main() { + id := "a5183192-1e00-475f-b334-38e1f0bb1bc7" // string | An application specific resource identity of a resource + body := *ipamfederation.NewNextAvailableBlockRequest() // NextAvailableBlockRequest | + + apiClient := ipamfederation.NewAPIClient() + resp, r, err := apiClient.NextAvailableFederatedBlockAPI.CreateNextAvailableFederatedBlocks(context.Background(), id).Body(body).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `NextAvailableFederatedBlockAPI.CreateNextAvailableFederatedBlocks``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `CreateNextAvailableFederatedBlocks`: CreateNextAvailableFederatedBlockResponse + fmt.Fprintf(os.Stdout, "Response from `NextAvailableFederatedBlockAPI.CreateNextAvailableFederatedBlocks`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**id** | **string** | An application specific resource identity of a resource | + +### Other Parameters + +Other parameters are passed through a pointer to a `NextAvailableFederatedBlockAPICreateNextAvailableFederatedBlocksRequest` struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**body** | [**NextAvailableBlockRequest**](NextAvailableBlockRequest.md) | | + +### Return type + +[**CreateNextAvailableFederatedBlockResponse**](CreateNextAvailableFederatedBlockResponse.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## CreateNextAvailableOverlappingBlocks + +> CreateNextAvailableOverlappingBlockResponse CreateNextAvailableOverlappingBlocks(ctx, id).Body(body).Execute() + +Retrieve the next available overlapping block. + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + + "github.com/infobloxopen/bloxone-go-client/ipamfederation" +) + +func main() { + id := "a5183192-1e00-475f-b334-38e1f0bb1bc7" // string | An application specific resource identity of a resource + body := *ipamfederation.NewNextAvailableBlockRequest() // NextAvailableBlockRequest | + + apiClient := ipamfederation.NewAPIClient() + resp, r, err := apiClient.NextAvailableFederatedBlockAPI.CreateNextAvailableOverlappingBlocks(context.Background(), id).Body(body).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `NextAvailableFederatedBlockAPI.CreateNextAvailableOverlappingBlocks``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `CreateNextAvailableOverlappingBlocks`: CreateNextAvailableOverlappingBlockResponse + fmt.Fprintf(os.Stdout, "Response from `NextAvailableFederatedBlockAPI.CreateNextAvailableOverlappingBlocks`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**id** | **string** | An application specific resource identity of a resource | + +### Other Parameters + +Other parameters are passed through a pointer to a `NextAvailableFederatedBlockAPICreateNextAvailableOverlappingBlocksRequest` struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**body** | [**NextAvailableBlockRequest**](NextAvailableBlockRequest.md) | | + +### Return type + +[**CreateNextAvailableOverlappingBlockResponse**](CreateNextAvailableOverlappingBlockResponse.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## CreateNextAvailableReservedBlocks + +> CreateNextAvailableReservedBlockResponse CreateNextAvailableReservedBlocks(ctx, id).Body(body).Execute() + +Retrieve the next available reserved block. + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + + "github.com/infobloxopen/bloxone-go-client/ipamfederation" +) + +func main() { + id := "a5183192-1e00-475f-b334-38e1f0bb1bc7" // string | An application specific resource identity of a resource + body := *ipamfederation.NewNextAvailableBlockRequest() // NextAvailableBlockRequest | + + apiClient := ipamfederation.NewAPIClient() + resp, r, err := apiClient.NextAvailableFederatedBlockAPI.CreateNextAvailableReservedBlocks(context.Background(), id).Body(body).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `NextAvailableFederatedBlockAPI.CreateNextAvailableReservedBlocks``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `CreateNextAvailableReservedBlocks`: CreateNextAvailableReservedBlockResponse + fmt.Fprintf(os.Stdout, "Response from `NextAvailableFederatedBlockAPI.CreateNextAvailableReservedBlocks`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**id** | **string** | An application specific resource identity of a resource | + +### Other Parameters + +Other parameters are passed through a pointer to a `NextAvailableFederatedBlockAPICreateNextAvailableReservedBlocksRequest` struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**body** | [**NextAvailableBlockRequest**](NextAvailableBlockRequest.md) | | + +### Return type + +[**CreateNextAvailableReservedBlockResponse**](CreateNextAvailableReservedBlockResponse.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListNextAvailableFederatedBlocks + +> ListNextAvailableFederatedBlockResponse ListNextAvailableFederatedBlocks(ctx, id).Cidr(cidr).Count(count).Name(name).Comment(comment).Execute() + +List the next available federated block. + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + + "github.com/infobloxopen/bloxone-go-client/ipamfederation" +) + +func main() { + id := "a5183192-1e00-475f-b334-38e1f0bb1bc7" // string | An application specific resource identity of a resource + + apiClient := ipamfederation.NewAPIClient() + resp, r, err := apiClient.NextAvailableFederatedBlockAPI.ListNextAvailableFederatedBlocks(context.Background(), id).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `NextAvailableFederatedBlockAPI.ListNextAvailableFederatedBlocks``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ListNextAvailableFederatedBlocks`: ListNextAvailableFederatedBlockResponse + fmt.Fprintf(os.Stdout, "Response from `NextAvailableFederatedBlockAPI.ListNextAvailableFederatedBlocks`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**id** | **string** | An application specific resource identity of a resource | + +### Other Parameters + +Other parameters are passed through a pointer to a `NextAvailableFederatedBlockAPIListNextAvailableFederatedBlocksRequest` struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**cidr** | **int64** | The CIDR of the federated block. This is required, if _address_ does not specify it in its input. | +**count** | **int64** | The count of __Block__ required. If not provided, it will default to 1. | +**name** | **string** | The name to be provided. | +**comment** | **string** | The description for the _federation/federated_block_. May contain 0 to 1024 characters. Can include UTF-8. | + +### Return type + +[**ListNextAvailableFederatedBlockResponse**](ListNextAvailableFederatedBlockResponse.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/ipamfederation/docs/NextAvailableOverlappingBlockAPI.md b/ipamfederation/docs/NextAvailableOverlappingBlockAPI.md new file mode 100644 index 0000000..520e821 --- /dev/null +++ b/ipamfederation/docs/NextAvailableOverlappingBlockAPI.md @@ -0,0 +1,82 @@ +# NextAvailableOverlappingBlockAPI + +All URIs are relative to */api/ddi/v1* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ListNextAvailableOverlappingBlocks**](NextAvailableOverlappingBlockAPI.md#ListNextAvailableOverlappingBlocks) | **Get** /federation/federated_block/{id}/next_available_overlapping_block | List the next available overlapping block. + + + +## ListNextAvailableOverlappingBlocks + +> ListNextAvailableOverlappingBlockResponse ListNextAvailableOverlappingBlocks(ctx, id).Cidr(cidr).Count(count).Name(name).Comment(comment).Execute() + +List the next available overlapping block. + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + + "github.com/infobloxopen/bloxone-go-client/ipamfederation" +) + +func main() { + id := "a5183192-1e00-475f-b334-38e1f0bb1bc7" // string | An application specific resource identity of a resource + + apiClient := ipamfederation.NewAPIClient() + resp, r, err := apiClient.NextAvailableOverlappingBlockAPI.ListNextAvailableOverlappingBlocks(context.Background(), id).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `NextAvailableOverlappingBlockAPI.ListNextAvailableOverlappingBlocks``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ListNextAvailableOverlappingBlocks`: ListNextAvailableOverlappingBlockResponse + fmt.Fprintf(os.Stdout, "Response from `NextAvailableOverlappingBlockAPI.ListNextAvailableOverlappingBlocks`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**id** | **string** | An application specific resource identity of a resource | + +### Other Parameters + +Other parameters are passed through a pointer to a `NextAvailableOverlappingBlockAPIListNextAvailableOverlappingBlocksRequest` struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**cidr** | **int64** | The CIDR of the federated block. This is required, if _address_ does not specify it in its input. | +**count** | **int64** | The count of __Block__ required. If not provided, it will default to 1. | +**name** | **string** | The name to be provided. | +**comment** | **string** | The description for the _federation/federated_block_. May contain 0 to 1024 characters. Can include UTF-8. | + +### Return type + +[**ListNextAvailableOverlappingBlockResponse**](ListNextAvailableOverlappingBlockResponse.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/ipamfederation/docs/NextAvailableReservedBlockAPI.md b/ipamfederation/docs/NextAvailableReservedBlockAPI.md new file mode 100644 index 0000000..0a57a41 --- /dev/null +++ b/ipamfederation/docs/NextAvailableReservedBlockAPI.md @@ -0,0 +1,82 @@ +# NextAvailableReservedBlockAPI + +All URIs are relative to */api/ddi/v1* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ListNextAvailableReservedBlocks**](NextAvailableReservedBlockAPI.md#ListNextAvailableReservedBlocks) | **Get** /federation/federated_block/{id}/next_available_reserved_block | List the next available reserved block. + + + +## ListNextAvailableReservedBlocks + +> ListNextAvailableReservedBlockResponse ListNextAvailableReservedBlocks(ctx, id).Cidr(cidr).Count(count).Name(name).Comment(comment).Execute() + +List the next available reserved block. + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + + "github.com/infobloxopen/bloxone-go-client/ipamfederation" +) + +func main() { + id := "a5183192-1e00-475f-b334-38e1f0bb1bc7" // string | An application specific resource identity of a resource + + apiClient := ipamfederation.NewAPIClient() + resp, r, err := apiClient.NextAvailableReservedBlockAPI.ListNextAvailableReservedBlocks(context.Background(), id).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `NextAvailableReservedBlockAPI.ListNextAvailableReservedBlocks``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ListNextAvailableReservedBlocks`: ListNextAvailableReservedBlockResponse + fmt.Fprintf(os.Stdout, "Response from `NextAvailableReservedBlockAPI.ListNextAvailableReservedBlocks`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**id** | **string** | An application specific resource identity of a resource | + +### Other Parameters + +Other parameters are passed through a pointer to a `NextAvailableReservedBlockAPIListNextAvailableReservedBlocksRequest` struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**cidr** | **int64** | The CIDR of the federated block. This is required, if _address_ does not specify it in its input. | +**count** | **int64** | The count of __Block__ required. If not provided, it will default to 1. | +**name** | **string** | The name to be provided. | +**comment** | **string** | The description for the _federation/federated_block_. May contain 0 to 1024 characters. Can include UTF-8. | + +### Return type + +[**ListNextAvailableReservedBlockResponse**](ListNextAvailableReservedBlockResponse.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/ipamfederation/docs/OverlappingBlock.md b/ipamfederation/docs/OverlappingBlock.md new file mode 100644 index 0000000..6e49ad4 --- /dev/null +++ b/ipamfederation/docs/OverlappingBlock.md @@ -0,0 +1,306 @@ +# OverlappingBlock + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Address** | **string** | The address field in form “a.b.c.d/n” where the “/n” may be omitted. In this case, the CIDR value must be defined in the _cidr_ field. When reading, the _address_ field is always in the form “a.b.c.d”. | +**Cidr** | Pointer to **int64** | The CIDR of the overlapping block. This is required, if _address_ does not specify it in its input. | [optional] +**Comment** | Pointer to **string** | The description for the overlapping block. May contain 0 to 1024 characters. Can include UTF-8. | [optional] +**CreatedAt** | Pointer to **time.Time** | Time when the object has been created. | [optional] [readonly] +**FederatedRealm** | **string** | The resource identifier. | +**Id** | Pointer to **string** | The resource identifier. | [optional] [readonly] +**Name** | Pointer to **string** | The name of the overlapping block. May contain 1 to 256 characters. Can include UTF-8. | [optional] +**Parent** | Pointer to **string** | The resource identifier. | [optional] +**Protocol** | Pointer to **string** | The type of protocol of overlapping block (_ip4_ or _ip6_). | [optional] [readonly] +**Tags** | Pointer to **map[string]interface{}** | The tags for the overlapping block in JSON format. | [optional] +**UpdatedAt** | Pointer to **time.Time** | Time when the object has been updated. Equals to _created_at_ if not updated after creation. | [optional] [readonly] + +## Methods + +### NewOverlappingBlock + +`func NewOverlappingBlock(address string, federatedRealm string, ) *OverlappingBlock` + +NewOverlappingBlock instantiates a new OverlappingBlock object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewOverlappingBlockWithDefaults + +`func NewOverlappingBlockWithDefaults() *OverlappingBlock` + +NewOverlappingBlockWithDefaults instantiates a new OverlappingBlock object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetAddress + +`func (o *OverlappingBlock) GetAddress() string` + +GetAddress returns the Address field if non-nil, zero value otherwise. + +### GetAddressOk + +`func (o *OverlappingBlock) GetAddressOk() (*string, bool)` + +GetAddressOk returns a tuple with the Address field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAddress + +`func (o *OverlappingBlock) SetAddress(v string)` + +SetAddress sets Address field to given value. + + +### GetCidr + +`func (o *OverlappingBlock) GetCidr() int64` + +GetCidr returns the Cidr field if non-nil, zero value otherwise. + +### GetCidrOk + +`func (o *OverlappingBlock) GetCidrOk() (*int64, bool)` + +GetCidrOk returns a tuple with the Cidr field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCidr + +`func (o *OverlappingBlock) SetCidr(v int64)` + +SetCidr sets Cidr field to given value. + +### HasCidr + +`func (o *OverlappingBlock) HasCidr() bool` + +HasCidr returns a boolean if a field has been set. + +### GetComment + +`func (o *OverlappingBlock) GetComment() string` + +GetComment returns the Comment field if non-nil, zero value otherwise. + +### GetCommentOk + +`func (o *OverlappingBlock) GetCommentOk() (*string, bool)` + +GetCommentOk returns a tuple with the Comment field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetComment + +`func (o *OverlappingBlock) SetComment(v string)` + +SetComment sets Comment field to given value. + +### HasComment + +`func (o *OverlappingBlock) HasComment() bool` + +HasComment returns a boolean if a field has been set. + +### GetCreatedAt + +`func (o *OverlappingBlock) GetCreatedAt() time.Time` + +GetCreatedAt returns the CreatedAt field if non-nil, zero value otherwise. + +### GetCreatedAtOk + +`func (o *OverlappingBlock) GetCreatedAtOk() (*time.Time, bool)` + +GetCreatedAtOk returns a tuple with the CreatedAt field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreatedAt + +`func (o *OverlappingBlock) SetCreatedAt(v time.Time)` + +SetCreatedAt sets CreatedAt field to given value. + +### HasCreatedAt + +`func (o *OverlappingBlock) HasCreatedAt() bool` + +HasCreatedAt returns a boolean if a field has been set. + +### GetFederatedRealm + +`func (o *OverlappingBlock) GetFederatedRealm() string` + +GetFederatedRealm returns the FederatedRealm field if non-nil, zero value otherwise. + +### GetFederatedRealmOk + +`func (o *OverlappingBlock) GetFederatedRealmOk() (*string, bool)` + +GetFederatedRealmOk returns a tuple with the FederatedRealm field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetFederatedRealm + +`func (o *OverlappingBlock) SetFederatedRealm(v string)` + +SetFederatedRealm sets FederatedRealm field to given value. + + +### GetId + +`func (o *OverlappingBlock) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *OverlappingBlock) GetIdOk() (*string, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *OverlappingBlock) SetId(v string)` + +SetId sets Id field to given value. + +### HasId + +`func (o *OverlappingBlock) HasId() bool` + +HasId returns a boolean if a field has been set. + +### GetName + +`func (o *OverlappingBlock) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *OverlappingBlock) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *OverlappingBlock) SetName(v string)` + +SetName sets Name field to given value. + +### HasName + +`func (o *OverlappingBlock) HasName() bool` + +HasName returns a boolean if a field has been set. + +### GetParent + +`func (o *OverlappingBlock) GetParent() string` + +GetParent returns the Parent field if non-nil, zero value otherwise. + +### GetParentOk + +`func (o *OverlappingBlock) GetParentOk() (*string, bool)` + +GetParentOk returns a tuple with the Parent field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetParent + +`func (o *OverlappingBlock) SetParent(v string)` + +SetParent sets Parent field to given value. + +### HasParent + +`func (o *OverlappingBlock) HasParent() bool` + +HasParent returns a boolean if a field has been set. + +### GetProtocol + +`func (o *OverlappingBlock) GetProtocol() string` + +GetProtocol returns the Protocol field if non-nil, zero value otherwise. + +### GetProtocolOk + +`func (o *OverlappingBlock) GetProtocolOk() (*string, bool)` + +GetProtocolOk returns a tuple with the Protocol field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetProtocol + +`func (o *OverlappingBlock) SetProtocol(v string)` + +SetProtocol sets Protocol field to given value. + +### HasProtocol + +`func (o *OverlappingBlock) HasProtocol() bool` + +HasProtocol returns a boolean if a field has been set. + +### GetTags + +`func (o *OverlappingBlock) GetTags() map[string]interface{}` + +GetTags returns the Tags field if non-nil, zero value otherwise. + +### GetTagsOk + +`func (o *OverlappingBlock) GetTagsOk() (*map[string]interface{}, bool)` + +GetTagsOk returns a tuple with the Tags field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTags + +`func (o *OverlappingBlock) SetTags(v map[string]interface{})` + +SetTags sets Tags field to given value. + +### HasTags + +`func (o *OverlappingBlock) HasTags() bool` + +HasTags returns a boolean if a field has been set. + +### GetUpdatedAt + +`func (o *OverlappingBlock) GetUpdatedAt() time.Time` + +GetUpdatedAt returns the UpdatedAt field if non-nil, zero value otherwise. + +### GetUpdatedAtOk + +`func (o *OverlappingBlock) GetUpdatedAtOk() (*time.Time, bool)` + +GetUpdatedAtOk returns a tuple with the UpdatedAt field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUpdatedAt + +`func (o *OverlappingBlock) SetUpdatedAt(v time.Time)` + +SetUpdatedAt sets UpdatedAt field to given value. + +### HasUpdatedAt + +`func (o *OverlappingBlock) HasUpdatedAt() bool` + +HasUpdatedAt returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/ipamfederation/docs/OverlappingBlockAPI.md b/ipamfederation/docs/OverlappingBlockAPI.md new file mode 100644 index 0000000..6091404 --- /dev/null +++ b/ipamfederation/docs/OverlappingBlockAPI.md @@ -0,0 +1,359 @@ +# OverlappingBlockAPI + +All URIs are relative to */api/ddi/v1* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**Create**](OverlappingBlockAPI.md#Create) | **Post** /federation/overlapping_block | Create the overlapping block. +[**Delete**](OverlappingBlockAPI.md#Delete) | **Delete** /federation/overlapping_block/{id} | Delete the overlapping block. +[**List**](OverlappingBlockAPI.md#List) | **Get** /federation/overlapping_block | Retrieve the overlapping block. +[**Read**](OverlappingBlockAPI.md#Read) | **Get** /federation/overlapping_block/{id} | Retrieve the overlapping block. +[**Update**](OverlappingBlockAPI.md#Update) | **Patch** /federation/overlapping_block/{id} | Update the overlapping block. + + + +## Create + +> CreateOverlappingBlockResponse Create(ctx).Body(body).Execute() + +Create the overlapping block. + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + + "github.com/infobloxopen/bloxone-go-client/ipamfederation" +) + +func main() { + body := *ipamfederation.NewOverlappingBlock("Address_example", "FederatedRealm_example") // OverlappingBlock | + + apiClient := ipamfederation.NewAPIClient() + resp, r, err := apiClient.OverlappingBlockAPI.Create(context.Background()).Body(body).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `OverlappingBlockAPI.Create``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `Create`: CreateOverlappingBlockResponse + fmt.Fprintf(os.Stdout, "Response from `OverlappingBlockAPI.Create`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a `OverlappingBlockAPICreateRequest` struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**body** | [**OverlappingBlock**](OverlappingBlock.md) | | + +### Return type + +[**CreateOverlappingBlockResponse**](CreateOverlappingBlockResponse.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## Delete + +> Delete(ctx, id).Execute() + +Delete the overlapping block. + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + + "github.com/infobloxopen/bloxone-go-client/ipamfederation" +) + +func main() { + id := "a5183192-1e00-475f-b334-38e1f0bb1bc7" // string | An application specific resource identity of a resource + + apiClient := ipamfederation.NewAPIClient() + r, err := apiClient.OverlappingBlockAPI.Delete(context.Background(), id).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `OverlappingBlockAPI.Delete``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**id** | **string** | An application specific resource identity of a resource | + +### Other Parameters + +Other parameters are passed through a pointer to a `OverlappingBlockAPIDeleteRequest` struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + +### Return type + + (empty response body) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## List + +> ListOverlappingBlockResponse List(ctx).Fields(fields).Filter(filter).Offset(offset).Limit(limit).PageToken(pageToken).OrderBy(orderBy).TorderBy(torderBy).Tfilter(tfilter).Execute() + +Retrieve the overlapping block. + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + + "github.com/infobloxopen/bloxone-go-client/ipamfederation" +) + +func main() { + + apiClient := ipamfederation.NewAPIClient() + resp, r, err := apiClient.OverlappingBlockAPI.List(context.Background()).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `OverlappingBlockAPI.List``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `List`: ListOverlappingBlockResponse + fmt.Fprintf(os.Stdout, "Response from `OverlappingBlockAPI.List`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a `OverlappingBlockAPIListRequest` struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**fields** | **string** | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. | +**filter** | **string** | A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | | +**offset** | **int32** | The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. | +**limit** | **int32** | The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. | +**pageToken** | **string** | The service-defined string used to identify a page of resources. A null value indicates the first page. | +**orderBy** | **string** | A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. | +**torderBy** | **string** | This parameter is used for sorting by tags. | +**tfilter** | **string** | This parameter is used for filtering by tags. | + +### Return type + +[**ListOverlappingBlockResponse**](ListOverlappingBlockResponse.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## Read + +> ReadOverlappingBlockResponse Read(ctx, id).Fields(fields).Execute() + +Retrieve the overlapping block. + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + + "github.com/infobloxopen/bloxone-go-client/ipamfederation" +) + +func main() { + id := "a5183192-1e00-475f-b334-38e1f0bb1bc7" // string | An application specific resource identity of a resource + + apiClient := ipamfederation.NewAPIClient() + resp, r, err := apiClient.OverlappingBlockAPI.Read(context.Background(), id).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `OverlappingBlockAPI.Read``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `Read`: ReadOverlappingBlockResponse + fmt.Fprintf(os.Stdout, "Response from `OverlappingBlockAPI.Read`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**id** | **string** | An application specific resource identity of a resource | + +### Other Parameters + +Other parameters are passed through a pointer to a `OverlappingBlockAPIReadRequest` struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**fields** | **string** | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. | + +### Return type + +[**ReadOverlappingBlockResponse**](ReadOverlappingBlockResponse.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## Update + +> UpdateOverlappingBlockResponse Update(ctx, id).Body(body).Execute() + +Update the overlapping block. + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + + "github.com/infobloxopen/bloxone-go-client/ipamfederation" +) + +func main() { + id := "a5183192-1e00-475f-b334-38e1f0bb1bc7" // string | An application specific resource identity of a resource + body := *ipamfederation.NewOverlappingBlock("Address_example", "FederatedRealm_example") // OverlappingBlock | + + apiClient := ipamfederation.NewAPIClient() + resp, r, err := apiClient.OverlappingBlockAPI.Update(context.Background(), id).Body(body).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `OverlappingBlockAPI.Update``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `Update`: UpdateOverlappingBlockResponse + fmt.Fprintf(os.Stdout, "Response from `OverlappingBlockAPI.Update`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**id** | **string** | An application specific resource identity of a resource | + +### Other Parameters + +Other parameters are passed through a pointer to a `OverlappingBlockAPIUpdateRequest` struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**body** | [**OverlappingBlock**](OverlappingBlock.md) | | + +### Return type + +[**UpdateOverlappingBlockResponse**](UpdateOverlappingBlockResponse.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/ipamfederation/docs/ReadFederatedBlockResponse.md b/ipamfederation/docs/ReadFederatedBlockResponse.md new file mode 100644 index 0000000..91f446a --- /dev/null +++ b/ipamfederation/docs/ReadFederatedBlockResponse.md @@ -0,0 +1,56 @@ +# ReadFederatedBlockResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Result** | Pointer to [**FederatedBlock**](FederatedBlock.md) | The FederatedBlock object. | [optional] + +## Methods + +### NewReadFederatedBlockResponse + +`func NewReadFederatedBlockResponse() *ReadFederatedBlockResponse` + +NewReadFederatedBlockResponse instantiates a new ReadFederatedBlockResponse object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewReadFederatedBlockResponseWithDefaults + +`func NewReadFederatedBlockResponseWithDefaults() *ReadFederatedBlockResponse` + +NewReadFederatedBlockResponseWithDefaults instantiates a new ReadFederatedBlockResponse object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetResult + +`func (o *ReadFederatedBlockResponse) GetResult() FederatedBlock` + +GetResult returns the Result field if non-nil, zero value otherwise. + +### GetResultOk + +`func (o *ReadFederatedBlockResponse) GetResultOk() (*FederatedBlock, bool)` + +GetResultOk returns a tuple with the Result field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetResult + +`func (o *ReadFederatedBlockResponse) SetResult(v FederatedBlock)` + +SetResult sets Result field to given value. + +### HasResult + +`func (o *ReadFederatedBlockResponse) HasResult() bool` + +HasResult returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/ipamfederation/docs/ReadFederatedRealmResponse.md b/ipamfederation/docs/ReadFederatedRealmResponse.md new file mode 100644 index 0000000..b66b2bc --- /dev/null +++ b/ipamfederation/docs/ReadFederatedRealmResponse.md @@ -0,0 +1,56 @@ +# ReadFederatedRealmResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Result** | Pointer to [**FederatedRealm**](FederatedRealm.md) | The FederatedRealm object. | [optional] + +## Methods + +### NewReadFederatedRealmResponse + +`func NewReadFederatedRealmResponse() *ReadFederatedRealmResponse` + +NewReadFederatedRealmResponse instantiates a new ReadFederatedRealmResponse object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewReadFederatedRealmResponseWithDefaults + +`func NewReadFederatedRealmResponseWithDefaults() *ReadFederatedRealmResponse` + +NewReadFederatedRealmResponseWithDefaults instantiates a new ReadFederatedRealmResponse object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetResult + +`func (o *ReadFederatedRealmResponse) GetResult() FederatedRealm` + +GetResult returns the Result field if non-nil, zero value otherwise. + +### GetResultOk + +`func (o *ReadFederatedRealmResponse) GetResultOk() (*FederatedRealm, bool)` + +GetResultOk returns a tuple with the Result field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetResult + +`func (o *ReadFederatedRealmResponse) SetResult(v FederatedRealm)` + +SetResult sets Result field to given value. + +### HasResult + +`func (o *ReadFederatedRealmResponse) HasResult() bool` + +HasResult returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/ipamfederation/docs/ReadOverlappingBlockResponse.md b/ipamfederation/docs/ReadOverlappingBlockResponse.md new file mode 100644 index 0000000..5f8ba40 --- /dev/null +++ b/ipamfederation/docs/ReadOverlappingBlockResponse.md @@ -0,0 +1,56 @@ +# ReadOverlappingBlockResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Result** | Pointer to [**OverlappingBlock**](OverlappingBlock.md) | The OverlappingBlock object. | [optional] + +## Methods + +### NewReadOverlappingBlockResponse + +`func NewReadOverlappingBlockResponse() *ReadOverlappingBlockResponse` + +NewReadOverlappingBlockResponse instantiates a new ReadOverlappingBlockResponse object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewReadOverlappingBlockResponseWithDefaults + +`func NewReadOverlappingBlockResponseWithDefaults() *ReadOverlappingBlockResponse` + +NewReadOverlappingBlockResponseWithDefaults instantiates a new ReadOverlappingBlockResponse object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetResult + +`func (o *ReadOverlappingBlockResponse) GetResult() OverlappingBlock` + +GetResult returns the Result field if non-nil, zero value otherwise. + +### GetResultOk + +`func (o *ReadOverlappingBlockResponse) GetResultOk() (*OverlappingBlock, bool)` + +GetResultOk returns a tuple with the Result field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetResult + +`func (o *ReadOverlappingBlockResponse) SetResult(v OverlappingBlock)` + +SetResult sets Result field to given value. + +### HasResult + +`func (o *ReadOverlappingBlockResponse) HasResult() bool` + +HasResult returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/ipamfederation/docs/ReadReservedBlockResponse.md b/ipamfederation/docs/ReadReservedBlockResponse.md new file mode 100644 index 0000000..4d46ba1 --- /dev/null +++ b/ipamfederation/docs/ReadReservedBlockResponse.md @@ -0,0 +1,56 @@ +# ReadReservedBlockResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Result** | Pointer to [**ReservedBlock**](ReservedBlock.md) | The ReservedBlock object. | [optional] + +## Methods + +### NewReadReservedBlockResponse + +`func NewReadReservedBlockResponse() *ReadReservedBlockResponse` + +NewReadReservedBlockResponse instantiates a new ReadReservedBlockResponse object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewReadReservedBlockResponseWithDefaults + +`func NewReadReservedBlockResponseWithDefaults() *ReadReservedBlockResponse` + +NewReadReservedBlockResponseWithDefaults instantiates a new ReadReservedBlockResponse object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetResult + +`func (o *ReadReservedBlockResponse) GetResult() ReservedBlock` + +GetResult returns the Result field if non-nil, zero value otherwise. + +### GetResultOk + +`func (o *ReadReservedBlockResponse) GetResultOk() (*ReservedBlock, bool)` + +GetResultOk returns a tuple with the Result field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetResult + +`func (o *ReadReservedBlockResponse) SetResult(v ReservedBlock)` + +SetResult sets Result field to given value. + +### HasResult + +`func (o *ReadReservedBlockResponse) HasResult() bool` + +HasResult returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/ipamfederation/docs/ReservedBlock.md b/ipamfederation/docs/ReservedBlock.md new file mode 100644 index 0000000..44100f4 --- /dev/null +++ b/ipamfederation/docs/ReservedBlock.md @@ -0,0 +1,306 @@ +# ReservedBlock + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Address** | **string** | The address field in form “a.b.c.d/n” where the “/n” may be omitted. In this case, the CIDR value must be defined in the _cidr_ field. When reading, the _address_ field is always in the form “a.b.c.d”. | +**Cidr** | Pointer to **int64** | The CIDR of the reserved block. This is required field, if _address_ does not specify it in its input. | [optional] +**Comment** | Pointer to **string** | The description for the reserved block. May contain 0 to 1024 characters. Can include UTF-8. | [optional] +**CreatedAt** | Pointer to **time.Time** | Time when the object has been created. | [optional] [readonly] +**FederatedRealm** | **string** | The resource identifier. | +**Id** | Pointer to **string** | The resource identifier. | [optional] [readonly] +**Name** | Pointer to **string** | The name of the reserved block. May contain 1 to 256 characters. Can include UTF-8. | [optional] +**Parent** | Pointer to **string** | The resource identifier. | [optional] +**Protocol** | Pointer to **string** | The type of protocol of reserved block (_ip4_ or _ip6_). | [optional] [readonly] +**Tags** | Pointer to **map[string]interface{}** | The tags for the reserved block in JSON format. | [optional] +**UpdatedAt** | Pointer to **time.Time** | Time when the object has been updated. Equals to _created_at_ if not updated after creation. | [optional] [readonly] + +## Methods + +### NewReservedBlock + +`func NewReservedBlock(address string, federatedRealm string, ) *ReservedBlock` + +NewReservedBlock instantiates a new ReservedBlock object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewReservedBlockWithDefaults + +`func NewReservedBlockWithDefaults() *ReservedBlock` + +NewReservedBlockWithDefaults instantiates a new ReservedBlock object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetAddress + +`func (o *ReservedBlock) GetAddress() string` + +GetAddress returns the Address field if non-nil, zero value otherwise. + +### GetAddressOk + +`func (o *ReservedBlock) GetAddressOk() (*string, bool)` + +GetAddressOk returns a tuple with the Address field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAddress + +`func (o *ReservedBlock) SetAddress(v string)` + +SetAddress sets Address field to given value. + + +### GetCidr + +`func (o *ReservedBlock) GetCidr() int64` + +GetCidr returns the Cidr field if non-nil, zero value otherwise. + +### GetCidrOk + +`func (o *ReservedBlock) GetCidrOk() (*int64, bool)` + +GetCidrOk returns a tuple with the Cidr field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCidr + +`func (o *ReservedBlock) SetCidr(v int64)` + +SetCidr sets Cidr field to given value. + +### HasCidr + +`func (o *ReservedBlock) HasCidr() bool` + +HasCidr returns a boolean if a field has been set. + +### GetComment + +`func (o *ReservedBlock) GetComment() string` + +GetComment returns the Comment field if non-nil, zero value otherwise. + +### GetCommentOk + +`func (o *ReservedBlock) GetCommentOk() (*string, bool)` + +GetCommentOk returns a tuple with the Comment field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetComment + +`func (o *ReservedBlock) SetComment(v string)` + +SetComment sets Comment field to given value. + +### HasComment + +`func (o *ReservedBlock) HasComment() bool` + +HasComment returns a boolean if a field has been set. + +### GetCreatedAt + +`func (o *ReservedBlock) GetCreatedAt() time.Time` + +GetCreatedAt returns the CreatedAt field if non-nil, zero value otherwise. + +### GetCreatedAtOk + +`func (o *ReservedBlock) GetCreatedAtOk() (*time.Time, bool)` + +GetCreatedAtOk returns a tuple with the CreatedAt field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreatedAt + +`func (o *ReservedBlock) SetCreatedAt(v time.Time)` + +SetCreatedAt sets CreatedAt field to given value. + +### HasCreatedAt + +`func (o *ReservedBlock) HasCreatedAt() bool` + +HasCreatedAt returns a boolean if a field has been set. + +### GetFederatedRealm + +`func (o *ReservedBlock) GetFederatedRealm() string` + +GetFederatedRealm returns the FederatedRealm field if non-nil, zero value otherwise. + +### GetFederatedRealmOk + +`func (o *ReservedBlock) GetFederatedRealmOk() (*string, bool)` + +GetFederatedRealmOk returns a tuple with the FederatedRealm field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetFederatedRealm + +`func (o *ReservedBlock) SetFederatedRealm(v string)` + +SetFederatedRealm sets FederatedRealm field to given value. + + +### GetId + +`func (o *ReservedBlock) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *ReservedBlock) GetIdOk() (*string, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *ReservedBlock) SetId(v string)` + +SetId sets Id field to given value. + +### HasId + +`func (o *ReservedBlock) HasId() bool` + +HasId returns a boolean if a field has been set. + +### GetName + +`func (o *ReservedBlock) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *ReservedBlock) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *ReservedBlock) SetName(v string)` + +SetName sets Name field to given value. + +### HasName + +`func (o *ReservedBlock) HasName() bool` + +HasName returns a boolean if a field has been set. + +### GetParent + +`func (o *ReservedBlock) GetParent() string` + +GetParent returns the Parent field if non-nil, zero value otherwise. + +### GetParentOk + +`func (o *ReservedBlock) GetParentOk() (*string, bool)` + +GetParentOk returns a tuple with the Parent field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetParent + +`func (o *ReservedBlock) SetParent(v string)` + +SetParent sets Parent field to given value. + +### HasParent + +`func (o *ReservedBlock) HasParent() bool` + +HasParent returns a boolean if a field has been set. + +### GetProtocol + +`func (o *ReservedBlock) GetProtocol() string` + +GetProtocol returns the Protocol field if non-nil, zero value otherwise. + +### GetProtocolOk + +`func (o *ReservedBlock) GetProtocolOk() (*string, bool)` + +GetProtocolOk returns a tuple with the Protocol field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetProtocol + +`func (o *ReservedBlock) SetProtocol(v string)` + +SetProtocol sets Protocol field to given value. + +### HasProtocol + +`func (o *ReservedBlock) HasProtocol() bool` + +HasProtocol returns a boolean if a field has been set. + +### GetTags + +`func (o *ReservedBlock) GetTags() map[string]interface{}` + +GetTags returns the Tags field if non-nil, zero value otherwise. + +### GetTagsOk + +`func (o *ReservedBlock) GetTagsOk() (*map[string]interface{}, bool)` + +GetTagsOk returns a tuple with the Tags field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTags + +`func (o *ReservedBlock) SetTags(v map[string]interface{})` + +SetTags sets Tags field to given value. + +### HasTags + +`func (o *ReservedBlock) HasTags() bool` + +HasTags returns a boolean if a field has been set. + +### GetUpdatedAt + +`func (o *ReservedBlock) GetUpdatedAt() time.Time` + +GetUpdatedAt returns the UpdatedAt field if non-nil, zero value otherwise. + +### GetUpdatedAtOk + +`func (o *ReservedBlock) GetUpdatedAtOk() (*time.Time, bool)` + +GetUpdatedAtOk returns a tuple with the UpdatedAt field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUpdatedAt + +`func (o *ReservedBlock) SetUpdatedAt(v time.Time)` + +SetUpdatedAt sets UpdatedAt field to given value. + +### HasUpdatedAt + +`func (o *ReservedBlock) HasUpdatedAt() bool` + +HasUpdatedAt returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/ipamfederation/docs/ReservedBlockAPI.md b/ipamfederation/docs/ReservedBlockAPI.md new file mode 100644 index 0000000..0f46a42 --- /dev/null +++ b/ipamfederation/docs/ReservedBlockAPI.md @@ -0,0 +1,359 @@ +# ReservedBlockAPI + +All URIs are relative to */api/ddi/v1* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**Create**](ReservedBlockAPI.md#Create) | **Post** /federation/reserved_block | Create the reserved block. +[**Delete**](ReservedBlockAPI.md#Delete) | **Delete** /federation/reserved_block/{id} | Delete the reserved block. +[**List**](ReservedBlockAPI.md#List) | **Get** /federation/reserved_block | Retrieve the reserved block. +[**Read**](ReservedBlockAPI.md#Read) | **Get** /federation/reserved_block/{id} | Retrieve the reserved block. +[**Update**](ReservedBlockAPI.md#Update) | **Patch** /federation/reserved_block/{id} | Update the reserved block. + + + +## Create + +> CreateReservedBlockResponse Create(ctx).Body(body).Execute() + +Create the reserved block. + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + + "github.com/infobloxopen/bloxone-go-client/ipamfederation" +) + +func main() { + body := *ipamfederation.NewReservedBlock("Address_example", "FederatedRealm_example") // ReservedBlock | + + apiClient := ipamfederation.NewAPIClient() + resp, r, err := apiClient.ReservedBlockAPI.Create(context.Background()).Body(body).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ReservedBlockAPI.Create``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `Create`: CreateReservedBlockResponse + fmt.Fprintf(os.Stdout, "Response from `ReservedBlockAPI.Create`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a `ReservedBlockAPICreateRequest` struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**body** | [**ReservedBlock**](ReservedBlock.md) | | + +### Return type + +[**CreateReservedBlockResponse**](CreateReservedBlockResponse.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## Delete + +> Delete(ctx, id).Execute() + +Delete the reserved block. + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + + "github.com/infobloxopen/bloxone-go-client/ipamfederation" +) + +func main() { + id := "a5183192-1e00-475f-b334-38e1f0bb1bc7" // string | An application specific resource identity of a resource + + apiClient := ipamfederation.NewAPIClient() + r, err := apiClient.ReservedBlockAPI.Delete(context.Background(), id).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ReservedBlockAPI.Delete``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**id** | **string** | An application specific resource identity of a resource | + +### Other Parameters + +Other parameters are passed through a pointer to a `ReservedBlockAPIDeleteRequest` struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + +### Return type + + (empty response body) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## List + +> ListReservedBlockResponse List(ctx).Fields(fields).Filter(filter).Offset(offset).Limit(limit).PageToken(pageToken).OrderBy(orderBy).TorderBy(torderBy).Tfilter(tfilter).Execute() + +Retrieve the reserved block. + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + + "github.com/infobloxopen/bloxone-go-client/ipamfederation" +) + +func main() { + + apiClient := ipamfederation.NewAPIClient() + resp, r, err := apiClient.ReservedBlockAPI.List(context.Background()).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ReservedBlockAPI.List``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `List`: ListReservedBlockResponse + fmt.Fprintf(os.Stdout, "Response from `ReservedBlockAPI.List`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a `ReservedBlockAPIListRequest` struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**fields** | **string** | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. | +**filter** | **string** | A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | | +**offset** | **int32** | The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. | +**limit** | **int32** | The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. | +**pageToken** | **string** | The service-defined string used to identify a page of resources. A null value indicates the first page. | +**orderBy** | **string** | A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. | +**torderBy** | **string** | This parameter is used for sorting by tags. | +**tfilter** | **string** | This parameter is used for filtering by tags. | + +### Return type + +[**ListReservedBlockResponse**](ListReservedBlockResponse.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## Read + +> ReadReservedBlockResponse Read(ctx, id).Fields(fields).Execute() + +Retrieve the reserved block. + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + + "github.com/infobloxopen/bloxone-go-client/ipamfederation" +) + +func main() { + id := "a5183192-1e00-475f-b334-38e1f0bb1bc7" // string | An application specific resource identity of a resource + + apiClient := ipamfederation.NewAPIClient() + resp, r, err := apiClient.ReservedBlockAPI.Read(context.Background(), id).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ReservedBlockAPI.Read``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `Read`: ReadReservedBlockResponse + fmt.Fprintf(os.Stdout, "Response from `ReservedBlockAPI.Read`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**id** | **string** | An application specific resource identity of a resource | + +### Other Parameters + +Other parameters are passed through a pointer to a `ReservedBlockAPIReadRequest` struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**fields** | **string** | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. | + +### Return type + +[**ReadReservedBlockResponse**](ReadReservedBlockResponse.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## Update + +> UpdateReservedBlockResponse Update(ctx, id).Body(body).Execute() + +Update the reserved block. + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + + "github.com/infobloxopen/bloxone-go-client/ipamfederation" +) + +func main() { + id := "a5183192-1e00-475f-b334-38e1f0bb1bc7" // string | An application specific resource identity of a resource + body := *ipamfederation.NewReservedBlock("Address_example", "FederatedRealm_example") // ReservedBlock | + + apiClient := ipamfederation.NewAPIClient() + resp, r, err := apiClient.ReservedBlockAPI.Update(context.Background(), id).Body(body).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ReservedBlockAPI.Update``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `Update`: UpdateReservedBlockResponse + fmt.Fprintf(os.Stdout, "Response from `ReservedBlockAPI.Update`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**id** | **string** | An application specific resource identity of a resource | + +### Other Parameters + +Other parameters are passed through a pointer to a `ReservedBlockAPIUpdateRequest` struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**body** | [**ReservedBlock**](ReservedBlock.md) | | + +### Return type + +[**UpdateReservedBlockResponse**](UpdateReservedBlockResponse.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/ipamfederation/docs/UpdateFederatedBlockResponse.md b/ipamfederation/docs/UpdateFederatedBlockResponse.md new file mode 100644 index 0000000..3ac2a1a --- /dev/null +++ b/ipamfederation/docs/UpdateFederatedBlockResponse.md @@ -0,0 +1,56 @@ +# UpdateFederatedBlockResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Result** | Pointer to [**FederatedBlock**](FederatedBlock.md) | The FederatedBlock object. | [optional] + +## Methods + +### NewUpdateFederatedBlockResponse + +`func NewUpdateFederatedBlockResponse() *UpdateFederatedBlockResponse` + +NewUpdateFederatedBlockResponse instantiates a new UpdateFederatedBlockResponse object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewUpdateFederatedBlockResponseWithDefaults + +`func NewUpdateFederatedBlockResponseWithDefaults() *UpdateFederatedBlockResponse` + +NewUpdateFederatedBlockResponseWithDefaults instantiates a new UpdateFederatedBlockResponse object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetResult + +`func (o *UpdateFederatedBlockResponse) GetResult() FederatedBlock` + +GetResult returns the Result field if non-nil, zero value otherwise. + +### GetResultOk + +`func (o *UpdateFederatedBlockResponse) GetResultOk() (*FederatedBlock, bool)` + +GetResultOk returns a tuple with the Result field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetResult + +`func (o *UpdateFederatedBlockResponse) SetResult(v FederatedBlock)` + +SetResult sets Result field to given value. + +### HasResult + +`func (o *UpdateFederatedBlockResponse) HasResult() bool` + +HasResult returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/ipamfederation/docs/UpdateFederatedRealmResponse.md b/ipamfederation/docs/UpdateFederatedRealmResponse.md new file mode 100644 index 0000000..7eac987 --- /dev/null +++ b/ipamfederation/docs/UpdateFederatedRealmResponse.md @@ -0,0 +1,56 @@ +# UpdateFederatedRealmResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Result** | Pointer to [**FederatedRealm**](FederatedRealm.md) | The FederatedRealm object. | [optional] + +## Methods + +### NewUpdateFederatedRealmResponse + +`func NewUpdateFederatedRealmResponse() *UpdateFederatedRealmResponse` + +NewUpdateFederatedRealmResponse instantiates a new UpdateFederatedRealmResponse object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewUpdateFederatedRealmResponseWithDefaults + +`func NewUpdateFederatedRealmResponseWithDefaults() *UpdateFederatedRealmResponse` + +NewUpdateFederatedRealmResponseWithDefaults instantiates a new UpdateFederatedRealmResponse object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetResult + +`func (o *UpdateFederatedRealmResponse) GetResult() FederatedRealm` + +GetResult returns the Result field if non-nil, zero value otherwise. + +### GetResultOk + +`func (o *UpdateFederatedRealmResponse) GetResultOk() (*FederatedRealm, bool)` + +GetResultOk returns a tuple with the Result field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetResult + +`func (o *UpdateFederatedRealmResponse) SetResult(v FederatedRealm)` + +SetResult sets Result field to given value. + +### HasResult + +`func (o *UpdateFederatedRealmResponse) HasResult() bool` + +HasResult returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/ipamfederation/docs/UpdateOverlappingBlockResponse.md b/ipamfederation/docs/UpdateOverlappingBlockResponse.md new file mode 100644 index 0000000..dfdce2f --- /dev/null +++ b/ipamfederation/docs/UpdateOverlappingBlockResponse.md @@ -0,0 +1,56 @@ +# UpdateOverlappingBlockResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Result** | Pointer to [**OverlappingBlock**](OverlappingBlock.md) | The OverlappingBlock object. | [optional] + +## Methods + +### NewUpdateOverlappingBlockResponse + +`func NewUpdateOverlappingBlockResponse() *UpdateOverlappingBlockResponse` + +NewUpdateOverlappingBlockResponse instantiates a new UpdateOverlappingBlockResponse object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewUpdateOverlappingBlockResponseWithDefaults + +`func NewUpdateOverlappingBlockResponseWithDefaults() *UpdateOverlappingBlockResponse` + +NewUpdateOverlappingBlockResponseWithDefaults instantiates a new UpdateOverlappingBlockResponse object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetResult + +`func (o *UpdateOverlappingBlockResponse) GetResult() OverlappingBlock` + +GetResult returns the Result field if non-nil, zero value otherwise. + +### GetResultOk + +`func (o *UpdateOverlappingBlockResponse) GetResultOk() (*OverlappingBlock, bool)` + +GetResultOk returns a tuple with the Result field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetResult + +`func (o *UpdateOverlappingBlockResponse) SetResult(v OverlappingBlock)` + +SetResult sets Result field to given value. + +### HasResult + +`func (o *UpdateOverlappingBlockResponse) HasResult() bool` + +HasResult returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/ipamfederation/docs/UpdateReservedBlockResponse.md b/ipamfederation/docs/UpdateReservedBlockResponse.md new file mode 100644 index 0000000..1cabfb9 --- /dev/null +++ b/ipamfederation/docs/UpdateReservedBlockResponse.md @@ -0,0 +1,56 @@ +# UpdateReservedBlockResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Result** | Pointer to [**ReservedBlock**](ReservedBlock.md) | The ReservedBlock object. | [optional] + +## Methods + +### NewUpdateReservedBlockResponse + +`func NewUpdateReservedBlockResponse() *UpdateReservedBlockResponse` + +NewUpdateReservedBlockResponse instantiates a new UpdateReservedBlockResponse object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewUpdateReservedBlockResponseWithDefaults + +`func NewUpdateReservedBlockResponseWithDefaults() *UpdateReservedBlockResponse` + +NewUpdateReservedBlockResponseWithDefaults instantiates a new UpdateReservedBlockResponse object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetResult + +`func (o *UpdateReservedBlockResponse) GetResult() ReservedBlock` + +GetResult returns the Result field if non-nil, zero value otherwise. + +### GetResultOk + +`func (o *UpdateReservedBlockResponse) GetResultOk() (*ReservedBlock, bool)` + +GetResultOk returns a tuple with the Result field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetResult + +`func (o *UpdateReservedBlockResponse) SetResult(v ReservedBlock)` + +SetResult sets Result field to given value. + +### HasResult + +`func (o *UpdateReservedBlockResponse) HasResult() bool` + +HasResult returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/ipamfederation/model_allocation.go b/ipamfederation/model_allocation.go new file mode 100644 index 0000000..84096dd --- /dev/null +++ b/ipamfederation/model_allocation.go @@ -0,0 +1,268 @@ +/* +IPAM Federation API + +The DDI IPAM Federation application enables a SaaS administrator to manage multiple IPAM systems from one central control point CSP. + +API version: v1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package ipamfederation + +import ( + "encoding/json" +) + +// checks if the Allocation type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Allocation{} + +// Allocation The __Allocation__ tracks the distribution of Federated Blocks within each of the supported objects. +type Allocation struct { + // Percent of total space allocated. + Allocated *int64 `json:"allocated,omitempty"` + // Percent of total space delegated. + Delegated *int64 `json:"delegated,omitempty"` + // Percent of total space in overlapping blocks. + Overlapping *int64 `json:"overlapping,omitempty"` + // Percent of total space reserved. + Reserved *int64 `json:"reserved,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _Allocation Allocation + +// NewAllocation instantiates a new Allocation object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewAllocation() *Allocation { + this := Allocation{} + return &this +} + +// NewAllocationWithDefaults instantiates a new Allocation object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewAllocationWithDefaults() *Allocation { + this := Allocation{} + return &this +} + +// GetAllocated returns the Allocated field value if set, zero value otherwise. +func (o *Allocation) GetAllocated() int64 { + if o == nil || IsNil(o.Allocated) { + var ret int64 + return ret + } + return *o.Allocated +} + +// GetAllocatedOk returns a tuple with the Allocated field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Allocation) GetAllocatedOk() (*int64, bool) { + if o == nil || IsNil(o.Allocated) { + return nil, false + } + return o.Allocated, true +} + +// HasAllocated returns a boolean if a field has been set. +func (o *Allocation) HasAllocated() bool { + if o != nil && !IsNil(o.Allocated) { + return true + } + + return false +} + +// SetAllocated gets a reference to the given int64 and assigns it to the Allocated field. +func (o *Allocation) SetAllocated(v int64) { + o.Allocated = &v +} + +// GetDelegated returns the Delegated field value if set, zero value otherwise. +func (o *Allocation) GetDelegated() int64 { + if o == nil || IsNil(o.Delegated) { + var ret int64 + return ret + } + return *o.Delegated +} + +// GetDelegatedOk returns a tuple with the Delegated field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Allocation) GetDelegatedOk() (*int64, bool) { + if o == nil || IsNil(o.Delegated) { + return nil, false + } + return o.Delegated, true +} + +// HasDelegated returns a boolean if a field has been set. +func (o *Allocation) HasDelegated() bool { + if o != nil && !IsNil(o.Delegated) { + return true + } + + return false +} + +// SetDelegated gets a reference to the given int64 and assigns it to the Delegated field. +func (o *Allocation) SetDelegated(v int64) { + o.Delegated = &v +} + +// GetOverlapping returns the Overlapping field value if set, zero value otherwise. +func (o *Allocation) GetOverlapping() int64 { + if o == nil || IsNil(o.Overlapping) { + var ret int64 + return ret + } + return *o.Overlapping +} + +// GetOverlappingOk returns a tuple with the Overlapping field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Allocation) GetOverlappingOk() (*int64, bool) { + if o == nil || IsNil(o.Overlapping) { + return nil, false + } + return o.Overlapping, true +} + +// HasOverlapping returns a boolean if a field has been set. +func (o *Allocation) HasOverlapping() bool { + if o != nil && !IsNil(o.Overlapping) { + return true + } + + return false +} + +// SetOverlapping gets a reference to the given int64 and assigns it to the Overlapping field. +func (o *Allocation) SetOverlapping(v int64) { + o.Overlapping = &v +} + +// GetReserved returns the Reserved field value if set, zero value otherwise. +func (o *Allocation) GetReserved() int64 { + if o == nil || IsNil(o.Reserved) { + var ret int64 + return ret + } + return *o.Reserved +} + +// GetReservedOk returns a tuple with the Reserved field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Allocation) GetReservedOk() (*int64, bool) { + if o == nil || IsNil(o.Reserved) { + return nil, false + } + return o.Reserved, true +} + +// HasReserved returns a boolean if a field has been set. +func (o *Allocation) HasReserved() bool { + if o != nil && !IsNil(o.Reserved) { + return true + } + + return false +} + +// SetReserved gets a reference to the given int64 and assigns it to the Reserved field. +func (o *Allocation) SetReserved(v int64) { + o.Reserved = &v +} + +func (o Allocation) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o Allocation) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Allocated) { + toSerialize["allocated"] = o.Allocated + } + if !IsNil(o.Delegated) { + toSerialize["delegated"] = o.Delegated + } + if !IsNil(o.Overlapping) { + toSerialize["overlapping"] = o.Overlapping + } + if !IsNil(o.Reserved) { + toSerialize["reserved"] = o.Reserved + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *Allocation) UnmarshalJSON(data []byte) (err error) { + varAllocation := _Allocation{} + + err = json.Unmarshal(data, &varAllocation) + + if err != nil { + return err + } + + *o = Allocation(varAllocation) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "allocated") + delete(additionalProperties, "delegated") + delete(additionalProperties, "overlapping") + delete(additionalProperties, "reserved") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableAllocation struct { + value *Allocation + isSet bool +} + +func (v NullableAllocation) Get() *Allocation { + return v.value +} + +func (v *NullableAllocation) Set(val *Allocation) { + v.value = val + v.isSet = true +} + +func (v NullableAllocation) IsSet() bool { + return v.isSet +} + +func (v *NullableAllocation) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableAllocation(val *Allocation) *NullableAllocation { + return &NullableAllocation{value: val, isSet: true} +} + +func (v NullableAllocation) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableAllocation) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/ipamfederation/model_create_federated_block_response.go b/ipamfederation/model_create_federated_block_response.go new file mode 100644 index 0000000..dfc9c69 --- /dev/null +++ b/ipamfederation/model_create_federated_block_response.go @@ -0,0 +1,154 @@ +/* +IPAM Federation API + +The DDI IPAM Federation application enables a SaaS administrator to manage multiple IPAM systems from one central control point CSP. + +API version: v1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package ipamfederation + +import ( + "encoding/json" +) + +// checks if the CreateFederatedBlockResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreateFederatedBlockResponse{} + +// CreateFederatedBlockResponse The response format to create the __FederatedBlock__ object. +type CreateFederatedBlockResponse struct { + // The created FederatedBlock object. + Result *FederatedBlock `json:"result,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _CreateFederatedBlockResponse CreateFederatedBlockResponse + +// NewCreateFederatedBlockResponse instantiates a new CreateFederatedBlockResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewCreateFederatedBlockResponse() *CreateFederatedBlockResponse { + this := CreateFederatedBlockResponse{} + return &this +} + +// NewCreateFederatedBlockResponseWithDefaults instantiates a new CreateFederatedBlockResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewCreateFederatedBlockResponseWithDefaults() *CreateFederatedBlockResponse { + this := CreateFederatedBlockResponse{} + return &this +} + +// GetResult returns the Result field value if set, zero value otherwise. +func (o *CreateFederatedBlockResponse) GetResult() FederatedBlock { + if o == nil || IsNil(o.Result) { + var ret FederatedBlock + return ret + } + return *o.Result +} + +// GetResultOk returns a tuple with the Result field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateFederatedBlockResponse) GetResultOk() (*FederatedBlock, bool) { + if o == nil || IsNil(o.Result) { + return nil, false + } + return o.Result, true +} + +// HasResult returns a boolean if a field has been set. +func (o *CreateFederatedBlockResponse) HasResult() bool { + if o != nil && !IsNil(o.Result) { + return true + } + + return false +} + +// SetResult gets a reference to the given FederatedBlock and assigns it to the Result field. +func (o *CreateFederatedBlockResponse) SetResult(v FederatedBlock) { + o.Result = &v +} + +func (o CreateFederatedBlockResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CreateFederatedBlockResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Result) { + toSerialize["result"] = o.Result + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *CreateFederatedBlockResponse) UnmarshalJSON(data []byte) (err error) { + varCreateFederatedBlockResponse := _CreateFederatedBlockResponse{} + + err = json.Unmarshal(data, &varCreateFederatedBlockResponse) + + if err != nil { + return err + } + + *o = CreateFederatedBlockResponse(varCreateFederatedBlockResponse) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "result") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableCreateFederatedBlockResponse struct { + value *CreateFederatedBlockResponse + isSet bool +} + +func (v NullableCreateFederatedBlockResponse) Get() *CreateFederatedBlockResponse { + return v.value +} + +func (v *NullableCreateFederatedBlockResponse) Set(val *CreateFederatedBlockResponse) { + v.value = val + v.isSet = true +} + +func (v NullableCreateFederatedBlockResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableCreateFederatedBlockResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCreateFederatedBlockResponse(val *CreateFederatedBlockResponse) *NullableCreateFederatedBlockResponse { + return &NullableCreateFederatedBlockResponse{value: val, isSet: true} +} + +func (v NullableCreateFederatedBlockResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCreateFederatedBlockResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/ipamfederation/model_create_federated_realm_response.go b/ipamfederation/model_create_federated_realm_response.go new file mode 100644 index 0000000..3a1f789 --- /dev/null +++ b/ipamfederation/model_create_federated_realm_response.go @@ -0,0 +1,154 @@ +/* +IPAM Federation API + +The DDI IPAM Federation application enables a SaaS administrator to manage multiple IPAM systems from one central control point CSP. + +API version: v1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package ipamfederation + +import ( + "encoding/json" +) + +// checks if the CreateFederatedRealmResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreateFederatedRealmResponse{} + +// CreateFederatedRealmResponse The response format to create the __FederatedRealm__ object. +type CreateFederatedRealmResponse struct { + // The created Federated Realm object. + Result *FederatedRealm `json:"result,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _CreateFederatedRealmResponse CreateFederatedRealmResponse + +// NewCreateFederatedRealmResponse instantiates a new CreateFederatedRealmResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewCreateFederatedRealmResponse() *CreateFederatedRealmResponse { + this := CreateFederatedRealmResponse{} + return &this +} + +// NewCreateFederatedRealmResponseWithDefaults instantiates a new CreateFederatedRealmResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewCreateFederatedRealmResponseWithDefaults() *CreateFederatedRealmResponse { + this := CreateFederatedRealmResponse{} + return &this +} + +// GetResult returns the Result field value if set, zero value otherwise. +func (o *CreateFederatedRealmResponse) GetResult() FederatedRealm { + if o == nil || IsNil(o.Result) { + var ret FederatedRealm + return ret + } + return *o.Result +} + +// GetResultOk returns a tuple with the Result field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateFederatedRealmResponse) GetResultOk() (*FederatedRealm, bool) { + if o == nil || IsNil(o.Result) { + return nil, false + } + return o.Result, true +} + +// HasResult returns a boolean if a field has been set. +func (o *CreateFederatedRealmResponse) HasResult() bool { + if o != nil && !IsNil(o.Result) { + return true + } + + return false +} + +// SetResult gets a reference to the given FederatedRealm and assigns it to the Result field. +func (o *CreateFederatedRealmResponse) SetResult(v FederatedRealm) { + o.Result = &v +} + +func (o CreateFederatedRealmResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CreateFederatedRealmResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Result) { + toSerialize["result"] = o.Result + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *CreateFederatedRealmResponse) UnmarshalJSON(data []byte) (err error) { + varCreateFederatedRealmResponse := _CreateFederatedRealmResponse{} + + err = json.Unmarshal(data, &varCreateFederatedRealmResponse) + + if err != nil { + return err + } + + *o = CreateFederatedRealmResponse(varCreateFederatedRealmResponse) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "result") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableCreateFederatedRealmResponse struct { + value *CreateFederatedRealmResponse + isSet bool +} + +func (v NullableCreateFederatedRealmResponse) Get() *CreateFederatedRealmResponse { + return v.value +} + +func (v *NullableCreateFederatedRealmResponse) Set(val *CreateFederatedRealmResponse) { + v.value = val + v.isSet = true +} + +func (v NullableCreateFederatedRealmResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableCreateFederatedRealmResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCreateFederatedRealmResponse(val *CreateFederatedRealmResponse) *NullableCreateFederatedRealmResponse { + return &NullableCreateFederatedRealmResponse{value: val, isSet: true} +} + +func (v NullableCreateFederatedRealmResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCreateFederatedRealmResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/ipamfederation/model_create_next_available_federated_block_response.go b/ipamfederation/model_create_next_available_federated_block_response.go new file mode 100644 index 0000000..1f8ee99 --- /dev/null +++ b/ipamfederation/model_create_next_available_federated_block_response.go @@ -0,0 +1,153 @@ +/* +IPAM Federation API + +The DDI IPAM Federation application enables a SaaS administrator to manage multiple IPAM systems from one central control point CSP. + +API version: v1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package ipamfederation + +import ( + "encoding/json" +) + +// checks if the CreateNextAvailableFederatedBlockResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreateNextAvailableFederatedBlockResponse{} + +// CreateNextAvailableFederatedBlockResponse The response format to allocate next available __FederatedBlock__ objects. +type CreateNextAvailableFederatedBlockResponse struct { + Results []FederatedBlock `json:"results,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _CreateNextAvailableFederatedBlockResponse CreateNextAvailableFederatedBlockResponse + +// NewCreateNextAvailableFederatedBlockResponse instantiates a new CreateNextAvailableFederatedBlockResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewCreateNextAvailableFederatedBlockResponse() *CreateNextAvailableFederatedBlockResponse { + this := CreateNextAvailableFederatedBlockResponse{} + return &this +} + +// NewCreateNextAvailableFederatedBlockResponseWithDefaults instantiates a new CreateNextAvailableFederatedBlockResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewCreateNextAvailableFederatedBlockResponseWithDefaults() *CreateNextAvailableFederatedBlockResponse { + this := CreateNextAvailableFederatedBlockResponse{} + return &this +} + +// GetResults returns the Results field value if set, zero value otherwise. +func (o *CreateNextAvailableFederatedBlockResponse) GetResults() []FederatedBlock { + if o == nil || IsNil(o.Results) { + var ret []FederatedBlock + return ret + } + return o.Results +} + +// GetResultsOk returns a tuple with the Results field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateNextAvailableFederatedBlockResponse) GetResultsOk() ([]FederatedBlock, bool) { + if o == nil || IsNil(o.Results) { + return nil, false + } + return o.Results, true +} + +// HasResults returns a boolean if a field has been set. +func (o *CreateNextAvailableFederatedBlockResponse) HasResults() bool { + if o != nil && !IsNil(o.Results) { + return true + } + + return false +} + +// SetResults gets a reference to the given []FederatedBlock and assigns it to the Results field. +func (o *CreateNextAvailableFederatedBlockResponse) SetResults(v []FederatedBlock) { + o.Results = v +} + +func (o CreateNextAvailableFederatedBlockResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CreateNextAvailableFederatedBlockResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Results) { + toSerialize["results"] = o.Results + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *CreateNextAvailableFederatedBlockResponse) UnmarshalJSON(data []byte) (err error) { + varCreateNextAvailableFederatedBlockResponse := _CreateNextAvailableFederatedBlockResponse{} + + err = json.Unmarshal(data, &varCreateNextAvailableFederatedBlockResponse) + + if err != nil { + return err + } + + *o = CreateNextAvailableFederatedBlockResponse(varCreateNextAvailableFederatedBlockResponse) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "results") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableCreateNextAvailableFederatedBlockResponse struct { + value *CreateNextAvailableFederatedBlockResponse + isSet bool +} + +func (v NullableCreateNextAvailableFederatedBlockResponse) Get() *CreateNextAvailableFederatedBlockResponse { + return v.value +} + +func (v *NullableCreateNextAvailableFederatedBlockResponse) Set(val *CreateNextAvailableFederatedBlockResponse) { + v.value = val + v.isSet = true +} + +func (v NullableCreateNextAvailableFederatedBlockResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableCreateNextAvailableFederatedBlockResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCreateNextAvailableFederatedBlockResponse(val *CreateNextAvailableFederatedBlockResponse) *NullableCreateNextAvailableFederatedBlockResponse { + return &NullableCreateNextAvailableFederatedBlockResponse{value: val, isSet: true} +} + +func (v NullableCreateNextAvailableFederatedBlockResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCreateNextAvailableFederatedBlockResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/ipamfederation/model_create_next_available_overlapping_block_response.go b/ipamfederation/model_create_next_available_overlapping_block_response.go new file mode 100644 index 0000000..1c37687 --- /dev/null +++ b/ipamfederation/model_create_next_available_overlapping_block_response.go @@ -0,0 +1,153 @@ +/* +IPAM Federation API + +The DDI IPAM Federation application enables a SaaS administrator to manage multiple IPAM systems from one central control point CSP. + +API version: v1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package ipamfederation + +import ( + "encoding/json" +) + +// checks if the CreateNextAvailableOverlappingBlockResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreateNextAvailableOverlappingBlockResponse{} + +// CreateNextAvailableOverlappingBlockResponse The response format to allocate next available __OverlappingBlock__ objects. +type CreateNextAvailableOverlappingBlockResponse struct { + Results []OverlappingBlock `json:"results,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _CreateNextAvailableOverlappingBlockResponse CreateNextAvailableOverlappingBlockResponse + +// NewCreateNextAvailableOverlappingBlockResponse instantiates a new CreateNextAvailableOverlappingBlockResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewCreateNextAvailableOverlappingBlockResponse() *CreateNextAvailableOverlappingBlockResponse { + this := CreateNextAvailableOverlappingBlockResponse{} + return &this +} + +// NewCreateNextAvailableOverlappingBlockResponseWithDefaults instantiates a new CreateNextAvailableOverlappingBlockResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewCreateNextAvailableOverlappingBlockResponseWithDefaults() *CreateNextAvailableOverlappingBlockResponse { + this := CreateNextAvailableOverlappingBlockResponse{} + return &this +} + +// GetResults returns the Results field value if set, zero value otherwise. +func (o *CreateNextAvailableOverlappingBlockResponse) GetResults() []OverlappingBlock { + if o == nil || IsNil(o.Results) { + var ret []OverlappingBlock + return ret + } + return o.Results +} + +// GetResultsOk returns a tuple with the Results field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateNextAvailableOverlappingBlockResponse) GetResultsOk() ([]OverlappingBlock, bool) { + if o == nil || IsNil(o.Results) { + return nil, false + } + return o.Results, true +} + +// HasResults returns a boolean if a field has been set. +func (o *CreateNextAvailableOverlappingBlockResponse) HasResults() bool { + if o != nil && !IsNil(o.Results) { + return true + } + + return false +} + +// SetResults gets a reference to the given []OverlappingBlock and assigns it to the Results field. +func (o *CreateNextAvailableOverlappingBlockResponse) SetResults(v []OverlappingBlock) { + o.Results = v +} + +func (o CreateNextAvailableOverlappingBlockResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CreateNextAvailableOverlappingBlockResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Results) { + toSerialize["results"] = o.Results + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *CreateNextAvailableOverlappingBlockResponse) UnmarshalJSON(data []byte) (err error) { + varCreateNextAvailableOverlappingBlockResponse := _CreateNextAvailableOverlappingBlockResponse{} + + err = json.Unmarshal(data, &varCreateNextAvailableOverlappingBlockResponse) + + if err != nil { + return err + } + + *o = CreateNextAvailableOverlappingBlockResponse(varCreateNextAvailableOverlappingBlockResponse) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "results") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableCreateNextAvailableOverlappingBlockResponse struct { + value *CreateNextAvailableOverlappingBlockResponse + isSet bool +} + +func (v NullableCreateNextAvailableOverlappingBlockResponse) Get() *CreateNextAvailableOverlappingBlockResponse { + return v.value +} + +func (v *NullableCreateNextAvailableOverlappingBlockResponse) Set(val *CreateNextAvailableOverlappingBlockResponse) { + v.value = val + v.isSet = true +} + +func (v NullableCreateNextAvailableOverlappingBlockResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableCreateNextAvailableOverlappingBlockResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCreateNextAvailableOverlappingBlockResponse(val *CreateNextAvailableOverlappingBlockResponse) *NullableCreateNextAvailableOverlappingBlockResponse { + return &NullableCreateNextAvailableOverlappingBlockResponse{value: val, isSet: true} +} + +func (v NullableCreateNextAvailableOverlappingBlockResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCreateNextAvailableOverlappingBlockResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/ipamfederation/model_create_next_available_reserved_block_response.go b/ipamfederation/model_create_next_available_reserved_block_response.go new file mode 100644 index 0000000..4bb1412 --- /dev/null +++ b/ipamfederation/model_create_next_available_reserved_block_response.go @@ -0,0 +1,153 @@ +/* +IPAM Federation API + +The DDI IPAM Federation application enables a SaaS administrator to manage multiple IPAM systems from one central control point CSP. + +API version: v1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package ipamfederation + +import ( + "encoding/json" +) + +// checks if the CreateNextAvailableReservedBlockResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreateNextAvailableReservedBlockResponse{} + +// CreateNextAvailableReservedBlockResponse The response format to allocate next available __ReservedBlock__ objects. +type CreateNextAvailableReservedBlockResponse struct { + Results []ReservedBlock `json:"results,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _CreateNextAvailableReservedBlockResponse CreateNextAvailableReservedBlockResponse + +// NewCreateNextAvailableReservedBlockResponse instantiates a new CreateNextAvailableReservedBlockResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewCreateNextAvailableReservedBlockResponse() *CreateNextAvailableReservedBlockResponse { + this := CreateNextAvailableReservedBlockResponse{} + return &this +} + +// NewCreateNextAvailableReservedBlockResponseWithDefaults instantiates a new CreateNextAvailableReservedBlockResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewCreateNextAvailableReservedBlockResponseWithDefaults() *CreateNextAvailableReservedBlockResponse { + this := CreateNextAvailableReservedBlockResponse{} + return &this +} + +// GetResults returns the Results field value if set, zero value otherwise. +func (o *CreateNextAvailableReservedBlockResponse) GetResults() []ReservedBlock { + if o == nil || IsNil(o.Results) { + var ret []ReservedBlock + return ret + } + return o.Results +} + +// GetResultsOk returns a tuple with the Results field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateNextAvailableReservedBlockResponse) GetResultsOk() ([]ReservedBlock, bool) { + if o == nil || IsNil(o.Results) { + return nil, false + } + return o.Results, true +} + +// HasResults returns a boolean if a field has been set. +func (o *CreateNextAvailableReservedBlockResponse) HasResults() bool { + if o != nil && !IsNil(o.Results) { + return true + } + + return false +} + +// SetResults gets a reference to the given []ReservedBlock and assigns it to the Results field. +func (o *CreateNextAvailableReservedBlockResponse) SetResults(v []ReservedBlock) { + o.Results = v +} + +func (o CreateNextAvailableReservedBlockResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CreateNextAvailableReservedBlockResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Results) { + toSerialize["results"] = o.Results + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *CreateNextAvailableReservedBlockResponse) UnmarshalJSON(data []byte) (err error) { + varCreateNextAvailableReservedBlockResponse := _CreateNextAvailableReservedBlockResponse{} + + err = json.Unmarshal(data, &varCreateNextAvailableReservedBlockResponse) + + if err != nil { + return err + } + + *o = CreateNextAvailableReservedBlockResponse(varCreateNextAvailableReservedBlockResponse) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "results") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableCreateNextAvailableReservedBlockResponse struct { + value *CreateNextAvailableReservedBlockResponse + isSet bool +} + +func (v NullableCreateNextAvailableReservedBlockResponse) Get() *CreateNextAvailableReservedBlockResponse { + return v.value +} + +func (v *NullableCreateNextAvailableReservedBlockResponse) Set(val *CreateNextAvailableReservedBlockResponse) { + v.value = val + v.isSet = true +} + +func (v NullableCreateNextAvailableReservedBlockResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableCreateNextAvailableReservedBlockResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCreateNextAvailableReservedBlockResponse(val *CreateNextAvailableReservedBlockResponse) *NullableCreateNextAvailableReservedBlockResponse { + return &NullableCreateNextAvailableReservedBlockResponse{value: val, isSet: true} +} + +func (v NullableCreateNextAvailableReservedBlockResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCreateNextAvailableReservedBlockResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/ipamfederation/model_create_overlapping_block_response.go b/ipamfederation/model_create_overlapping_block_response.go new file mode 100644 index 0000000..d96201e --- /dev/null +++ b/ipamfederation/model_create_overlapping_block_response.go @@ -0,0 +1,154 @@ +/* +IPAM Federation API + +The DDI IPAM Federation application enables a SaaS administrator to manage multiple IPAM systems from one central control point CSP. + +API version: v1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package ipamfederation + +import ( + "encoding/json" +) + +// checks if the CreateOverlappingBlockResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreateOverlappingBlockResponse{} + +// CreateOverlappingBlockResponse The response format to create the __OverlappingBlock__ object. +type CreateOverlappingBlockResponse struct { + // The created OverlappingBlock object. + Result *OverlappingBlock `json:"result,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _CreateOverlappingBlockResponse CreateOverlappingBlockResponse + +// NewCreateOverlappingBlockResponse instantiates a new CreateOverlappingBlockResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewCreateOverlappingBlockResponse() *CreateOverlappingBlockResponse { + this := CreateOverlappingBlockResponse{} + return &this +} + +// NewCreateOverlappingBlockResponseWithDefaults instantiates a new CreateOverlappingBlockResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewCreateOverlappingBlockResponseWithDefaults() *CreateOverlappingBlockResponse { + this := CreateOverlappingBlockResponse{} + return &this +} + +// GetResult returns the Result field value if set, zero value otherwise. +func (o *CreateOverlappingBlockResponse) GetResult() OverlappingBlock { + if o == nil || IsNil(o.Result) { + var ret OverlappingBlock + return ret + } + return *o.Result +} + +// GetResultOk returns a tuple with the Result field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateOverlappingBlockResponse) GetResultOk() (*OverlappingBlock, bool) { + if o == nil || IsNil(o.Result) { + return nil, false + } + return o.Result, true +} + +// HasResult returns a boolean if a field has been set. +func (o *CreateOverlappingBlockResponse) HasResult() bool { + if o != nil && !IsNil(o.Result) { + return true + } + + return false +} + +// SetResult gets a reference to the given OverlappingBlock and assigns it to the Result field. +func (o *CreateOverlappingBlockResponse) SetResult(v OverlappingBlock) { + o.Result = &v +} + +func (o CreateOverlappingBlockResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CreateOverlappingBlockResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Result) { + toSerialize["result"] = o.Result + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *CreateOverlappingBlockResponse) UnmarshalJSON(data []byte) (err error) { + varCreateOverlappingBlockResponse := _CreateOverlappingBlockResponse{} + + err = json.Unmarshal(data, &varCreateOverlappingBlockResponse) + + if err != nil { + return err + } + + *o = CreateOverlappingBlockResponse(varCreateOverlappingBlockResponse) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "result") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableCreateOverlappingBlockResponse struct { + value *CreateOverlappingBlockResponse + isSet bool +} + +func (v NullableCreateOverlappingBlockResponse) Get() *CreateOverlappingBlockResponse { + return v.value +} + +func (v *NullableCreateOverlappingBlockResponse) Set(val *CreateOverlappingBlockResponse) { + v.value = val + v.isSet = true +} + +func (v NullableCreateOverlappingBlockResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableCreateOverlappingBlockResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCreateOverlappingBlockResponse(val *CreateOverlappingBlockResponse) *NullableCreateOverlappingBlockResponse { + return &NullableCreateOverlappingBlockResponse{value: val, isSet: true} +} + +func (v NullableCreateOverlappingBlockResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCreateOverlappingBlockResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/ipamfederation/model_create_reserved_block_response.go b/ipamfederation/model_create_reserved_block_response.go new file mode 100644 index 0000000..e465768 --- /dev/null +++ b/ipamfederation/model_create_reserved_block_response.go @@ -0,0 +1,154 @@ +/* +IPAM Federation API + +The DDI IPAM Federation application enables a SaaS administrator to manage multiple IPAM systems from one central control point CSP. + +API version: v1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package ipamfederation + +import ( + "encoding/json" +) + +// checks if the CreateReservedBlockResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreateReservedBlockResponse{} + +// CreateReservedBlockResponse The response format to create the __ReservedBlock__ object. +type CreateReservedBlockResponse struct { + // The created ReservedBlock object. + Result *ReservedBlock `json:"result,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _CreateReservedBlockResponse CreateReservedBlockResponse + +// NewCreateReservedBlockResponse instantiates a new CreateReservedBlockResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewCreateReservedBlockResponse() *CreateReservedBlockResponse { + this := CreateReservedBlockResponse{} + return &this +} + +// NewCreateReservedBlockResponseWithDefaults instantiates a new CreateReservedBlockResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewCreateReservedBlockResponseWithDefaults() *CreateReservedBlockResponse { + this := CreateReservedBlockResponse{} + return &this +} + +// GetResult returns the Result field value if set, zero value otherwise. +func (o *CreateReservedBlockResponse) GetResult() ReservedBlock { + if o == nil || IsNil(o.Result) { + var ret ReservedBlock + return ret + } + return *o.Result +} + +// GetResultOk returns a tuple with the Result field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateReservedBlockResponse) GetResultOk() (*ReservedBlock, bool) { + if o == nil || IsNil(o.Result) { + return nil, false + } + return o.Result, true +} + +// HasResult returns a boolean if a field has been set. +func (o *CreateReservedBlockResponse) HasResult() bool { + if o != nil && !IsNil(o.Result) { + return true + } + + return false +} + +// SetResult gets a reference to the given ReservedBlock and assigns it to the Result field. +func (o *CreateReservedBlockResponse) SetResult(v ReservedBlock) { + o.Result = &v +} + +func (o CreateReservedBlockResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CreateReservedBlockResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Result) { + toSerialize["result"] = o.Result + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *CreateReservedBlockResponse) UnmarshalJSON(data []byte) (err error) { + varCreateReservedBlockResponse := _CreateReservedBlockResponse{} + + err = json.Unmarshal(data, &varCreateReservedBlockResponse) + + if err != nil { + return err + } + + *o = CreateReservedBlockResponse(varCreateReservedBlockResponse) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "result") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableCreateReservedBlockResponse struct { + value *CreateReservedBlockResponse + isSet bool +} + +func (v NullableCreateReservedBlockResponse) Get() *CreateReservedBlockResponse { + return v.value +} + +func (v *NullableCreateReservedBlockResponse) Set(val *CreateReservedBlockResponse) { + v.value = val + v.isSet = true +} + +func (v NullableCreateReservedBlockResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableCreateReservedBlockResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCreateReservedBlockResponse(val *CreateReservedBlockResponse) *NullableCreateReservedBlockResponse { + return &NullableCreateReservedBlockResponse{value: val, isSet: true} +} + +func (v NullableCreateReservedBlockResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCreateReservedBlockResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/ipamfederation/model_federated_block.go b/ipamfederation/model_federated_block.go new file mode 100644 index 0000000..a1eab26 --- /dev/null +++ b/ipamfederation/model_federated_block.go @@ -0,0 +1,573 @@ +/* +IPAM Federation API + +The DDI IPAM Federation application enables a SaaS administrator to manage multiple IPAM systems from one central control point CSP. + +API version: v1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package ipamfederation + +import ( + "encoding/json" + "time" +) + +// checks if the FederatedBlock type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &FederatedBlock{} + +// FederatedBlock A __FederatedBlock__ object (_federation/federated_block_) is a set of contiguous IP addresses with no gap, expressed as a CIDR block. Federated blocks are hierarchical and may be parented to other federated blocks as long as the parent block fully contains the child and no sibling overlaps. Top level federated blocks are parented to a federated realm. +type FederatedBlock struct { + // The address field in form “a.b.c.d/n” where the “/n” may be omitted. In this case, the CIDR value must be defined in the _cidr_ field. When reading, the _address_ field is always in the form “a.b.c.d”. + Address *string `json:"address,omitempty"` + // The percentage of the Federated Block’s total address space that is consumed by Leaf Terminals. + AllocationV4 *Allocation `json:"allocation_v4,omitempty"` + // The CIDR of the federated block. This is required, if _address_ does not specify it in its input. + Cidr *int64 `json:"cidr,omitempty"` + // The description for the federated block. May contain 0 to 1024 characters. Can include UTF-8. + Comment *string `json:"comment,omitempty"` + // Time when the object has been created. + CreatedAt *time.Time `json:"created_at,omitempty"` + // The resource identifier. + FederatedRealm *string `json:"federated_realm,omitempty"` + // The resource identifier. + Id *string `json:"id,omitempty"` + // The name of the federated block. May contain 1 to 256 characters. Can include UTF-8. + Name *string `json:"name,omitempty"` + // The resource identifier. + Parent *string `json:"parent,omitempty"` + // The type of protocol of federated block (_ip4_ or _ip6_). + Protocol *string `json:"protocol,omitempty"` + // The tags for the federated block in JSON format. + Tags map[string]interface{} `json:"tags,omitempty"` + // Time when the object has been updated. Equals to _created_at_ if not updated after creation. + UpdatedAt *time.Time `json:"updated_at,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _FederatedBlock FederatedBlock + +// NewFederatedBlock instantiates a new FederatedBlock object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewFederatedBlock() *FederatedBlock { + this := FederatedBlock{} + return &this +} + +// NewFederatedBlockWithDefaults instantiates a new FederatedBlock object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewFederatedBlockWithDefaults() *FederatedBlock { + this := FederatedBlock{} + return &this +} + +// GetAddress returns the Address field value if set, zero value otherwise. +func (o *FederatedBlock) GetAddress() string { + if o == nil || IsNil(o.Address) { + var ret string + return ret + } + return *o.Address +} + +// GetAddressOk returns a tuple with the Address field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *FederatedBlock) GetAddressOk() (*string, bool) { + if o == nil || IsNil(o.Address) { + return nil, false + } + return o.Address, true +} + +// HasAddress returns a boolean if a field has been set. +func (o *FederatedBlock) HasAddress() bool { + if o != nil && !IsNil(o.Address) { + return true + } + + return false +} + +// SetAddress gets a reference to the given string and assigns it to the Address field. +func (o *FederatedBlock) SetAddress(v string) { + o.Address = &v +} + +// GetAllocationV4 returns the AllocationV4 field value if set, zero value otherwise. +func (o *FederatedBlock) GetAllocationV4() Allocation { + if o == nil || IsNil(o.AllocationV4) { + var ret Allocation + return ret + } + return *o.AllocationV4 +} + +// GetAllocationV4Ok returns a tuple with the AllocationV4 field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *FederatedBlock) GetAllocationV4Ok() (*Allocation, bool) { + if o == nil || IsNil(o.AllocationV4) { + return nil, false + } + return o.AllocationV4, true +} + +// HasAllocationV4 returns a boolean if a field has been set. +func (o *FederatedBlock) HasAllocationV4() bool { + if o != nil && !IsNil(o.AllocationV4) { + return true + } + + return false +} + +// SetAllocationV4 gets a reference to the given Allocation and assigns it to the AllocationV4 field. +func (o *FederatedBlock) SetAllocationV4(v Allocation) { + o.AllocationV4 = &v +} + +// GetCidr returns the Cidr field value if set, zero value otherwise. +func (o *FederatedBlock) GetCidr() int64 { + if o == nil || IsNil(o.Cidr) { + var ret int64 + return ret + } + return *o.Cidr +} + +// GetCidrOk returns a tuple with the Cidr field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *FederatedBlock) GetCidrOk() (*int64, bool) { + if o == nil || IsNil(o.Cidr) { + return nil, false + } + return o.Cidr, true +} + +// HasCidr returns a boolean if a field has been set. +func (o *FederatedBlock) HasCidr() bool { + if o != nil && !IsNil(o.Cidr) { + return true + } + + return false +} + +// SetCidr gets a reference to the given int64 and assigns it to the Cidr field. +func (o *FederatedBlock) SetCidr(v int64) { + o.Cidr = &v +} + +// GetComment returns the Comment field value if set, zero value otherwise. +func (o *FederatedBlock) GetComment() string { + if o == nil || IsNil(o.Comment) { + var ret string + return ret + } + return *o.Comment +} + +// GetCommentOk returns a tuple with the Comment field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *FederatedBlock) GetCommentOk() (*string, bool) { + if o == nil || IsNil(o.Comment) { + return nil, false + } + return o.Comment, true +} + +// HasComment returns a boolean if a field has been set. +func (o *FederatedBlock) HasComment() bool { + if o != nil && !IsNil(o.Comment) { + return true + } + + return false +} + +// SetComment gets a reference to the given string and assigns it to the Comment field. +func (o *FederatedBlock) SetComment(v string) { + o.Comment = &v +} + +// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. +func (o *FederatedBlock) GetCreatedAt() time.Time { + if o == nil || IsNil(o.CreatedAt) { + var ret time.Time + return ret + } + return *o.CreatedAt +} + +// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *FederatedBlock) GetCreatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.CreatedAt) { + return nil, false + } + return o.CreatedAt, true +} + +// HasCreatedAt returns a boolean if a field has been set. +func (o *FederatedBlock) HasCreatedAt() bool { + if o != nil && !IsNil(o.CreatedAt) { + return true + } + + return false +} + +// SetCreatedAt gets a reference to the given time.Time and assigns it to the CreatedAt field. +func (o *FederatedBlock) SetCreatedAt(v time.Time) { + o.CreatedAt = &v +} + +// GetFederatedRealm returns the FederatedRealm field value if set, zero value otherwise. +func (o *FederatedBlock) GetFederatedRealm() string { + if o == nil || IsNil(o.FederatedRealm) { + var ret string + return ret + } + return *o.FederatedRealm +} + +// GetFederatedRealmOk returns a tuple with the FederatedRealm field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *FederatedBlock) GetFederatedRealmOk() (*string, bool) { + if o == nil || IsNil(o.FederatedRealm) { + return nil, false + } + return o.FederatedRealm, true +} + +// HasFederatedRealm returns a boolean if a field has been set. +func (o *FederatedBlock) HasFederatedRealm() bool { + if o != nil && !IsNil(o.FederatedRealm) { + return true + } + + return false +} + +// SetFederatedRealm gets a reference to the given string and assigns it to the FederatedRealm field. +func (o *FederatedBlock) SetFederatedRealm(v string) { + o.FederatedRealm = &v +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *FederatedBlock) GetId() string { + if o == nil || IsNil(o.Id) { + var ret string + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *FederatedBlock) GetIdOk() (*string, bool) { + if o == nil || IsNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *FederatedBlock) HasId() bool { + if o != nil && !IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given string and assigns it to the Id field. +func (o *FederatedBlock) SetId(v string) { + o.Id = &v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *FederatedBlock) GetName() string { + if o == nil || IsNil(o.Name) { + var ret string + return ret + } + return *o.Name +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *FederatedBlock) GetNameOk() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *FederatedBlock) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *FederatedBlock) SetName(v string) { + o.Name = &v +} + +// GetParent returns the Parent field value if set, zero value otherwise. +func (o *FederatedBlock) GetParent() string { + if o == nil || IsNil(o.Parent) { + var ret string + return ret + } + return *o.Parent +} + +// GetParentOk returns a tuple with the Parent field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *FederatedBlock) GetParentOk() (*string, bool) { + if o == nil || IsNil(o.Parent) { + return nil, false + } + return o.Parent, true +} + +// HasParent returns a boolean if a field has been set. +func (o *FederatedBlock) HasParent() bool { + if o != nil && !IsNil(o.Parent) { + return true + } + + return false +} + +// SetParent gets a reference to the given string and assigns it to the Parent field. +func (o *FederatedBlock) SetParent(v string) { + o.Parent = &v +} + +// GetProtocol returns the Protocol field value if set, zero value otherwise. +func (o *FederatedBlock) GetProtocol() string { + if o == nil || IsNil(o.Protocol) { + var ret string + return ret + } + return *o.Protocol +} + +// GetProtocolOk returns a tuple with the Protocol field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *FederatedBlock) GetProtocolOk() (*string, bool) { + if o == nil || IsNil(o.Protocol) { + return nil, false + } + return o.Protocol, true +} + +// HasProtocol returns a boolean if a field has been set. +func (o *FederatedBlock) HasProtocol() bool { + if o != nil && !IsNil(o.Protocol) { + return true + } + + return false +} + +// SetProtocol gets a reference to the given string and assigns it to the Protocol field. +func (o *FederatedBlock) SetProtocol(v string) { + o.Protocol = &v +} + +// GetTags returns the Tags field value if set, zero value otherwise. +func (o *FederatedBlock) GetTags() map[string]interface{} { + if o == nil || IsNil(o.Tags) { + var ret map[string]interface{} + return ret + } + return o.Tags +} + +// GetTagsOk returns a tuple with the Tags field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *FederatedBlock) GetTagsOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.Tags) { + return map[string]interface{}{}, false + } + return o.Tags, true +} + +// HasTags returns a boolean if a field has been set. +func (o *FederatedBlock) HasTags() bool { + if o != nil && !IsNil(o.Tags) { + return true + } + + return false +} + +// SetTags gets a reference to the given map[string]interface{} and assigns it to the Tags field. +func (o *FederatedBlock) SetTags(v map[string]interface{}) { + o.Tags = v +} + +// GetUpdatedAt returns the UpdatedAt field value if set, zero value otherwise. +func (o *FederatedBlock) GetUpdatedAt() time.Time { + if o == nil || IsNil(o.UpdatedAt) { + var ret time.Time + return ret + } + return *o.UpdatedAt +} + +// GetUpdatedAtOk returns a tuple with the UpdatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *FederatedBlock) GetUpdatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.UpdatedAt) { + return nil, false + } + return o.UpdatedAt, true +} + +// HasUpdatedAt returns a boolean if a field has been set. +func (o *FederatedBlock) HasUpdatedAt() bool { + if o != nil && !IsNil(o.UpdatedAt) { + return true + } + + return false +} + +// SetUpdatedAt gets a reference to the given time.Time and assigns it to the UpdatedAt field. +func (o *FederatedBlock) SetUpdatedAt(v time.Time) { + o.UpdatedAt = &v +} + +func (o FederatedBlock) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o FederatedBlock) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Address) { + toSerialize["address"] = o.Address + } + if !IsNil(o.AllocationV4) { + toSerialize["allocation_v4"] = o.AllocationV4 + } + if !IsNil(o.Cidr) { + toSerialize["cidr"] = o.Cidr + } + if !IsNil(o.Comment) { + toSerialize["comment"] = o.Comment + } + if !IsNil(o.CreatedAt) { + toSerialize["created_at"] = o.CreatedAt + } + if !IsNil(o.FederatedRealm) { + toSerialize["federated_realm"] = o.FederatedRealm + } + if !IsNil(o.Id) { + toSerialize["id"] = o.Id + } + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.Parent) { + toSerialize["parent"] = o.Parent + } + if !IsNil(o.Protocol) { + toSerialize["protocol"] = o.Protocol + } + if !IsNil(o.Tags) { + toSerialize["tags"] = o.Tags + } + if !IsNil(o.UpdatedAt) { + toSerialize["updated_at"] = o.UpdatedAt + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *FederatedBlock) UnmarshalJSON(data []byte) (err error) { + varFederatedBlock := _FederatedBlock{} + + err = json.Unmarshal(data, &varFederatedBlock) + + if err != nil { + return err + } + + *o = FederatedBlock(varFederatedBlock) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "address") + delete(additionalProperties, "allocation_v4") + delete(additionalProperties, "cidr") + delete(additionalProperties, "comment") + delete(additionalProperties, "created_at") + delete(additionalProperties, "federated_realm") + delete(additionalProperties, "id") + delete(additionalProperties, "name") + delete(additionalProperties, "parent") + delete(additionalProperties, "protocol") + delete(additionalProperties, "tags") + delete(additionalProperties, "updated_at") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableFederatedBlock struct { + value *FederatedBlock + isSet bool +} + +func (v NullableFederatedBlock) Get() *FederatedBlock { + return v.value +} + +func (v *NullableFederatedBlock) Set(val *FederatedBlock) { + v.value = val + v.isSet = true +} + +func (v NullableFederatedBlock) IsSet() bool { + return v.isSet +} + +func (v *NullableFederatedBlock) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableFederatedBlock(val *FederatedBlock) *NullableFederatedBlock { + return &NullableFederatedBlock{value: val, isSet: true} +} + +func (v NullableFederatedBlock) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableFederatedBlock) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/ipamfederation/model_federated_realm.go b/ipamfederation/model_federated_realm.go new file mode 100644 index 0000000..d4e594e --- /dev/null +++ b/ipamfederation/model_federated_realm.go @@ -0,0 +1,396 @@ +/* +IPAM Federation API + +The DDI IPAM Federation application enables a SaaS administrator to manage multiple IPAM systems from one central control point CSP. + +API version: v1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package ipamfederation + +import ( + "encoding/json" + "fmt" + "time" +) + +// checks if the FederatedRealm type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &FederatedRealm{} + +// FederatedRealm A __FederatedRealm__ object is a unique set of federated blocks per realm. +type FederatedRealm struct { + // The aggregate of all Federated Blocks within the Realm. + AllocationV4 *Allocation `json:"allocation_v4,omitempty"` + // The description of the federated realm. May contain 0 to 1024 characters. Can include UTF-8. + Comment *string `json:"comment,omitempty"` + // Time when the object has been created. + CreatedAt *time.Time `json:"created_at,omitempty"` + // The resource identifier. + Id *string `json:"id,omitempty"` + // The name of the federated realm. May contain 1 to 256 characters; can include UTF-8. + Name string `json:"name"` + // The tags for the federated realm in JSON format. + Tags map[string]interface{} `json:"tags,omitempty"` + // Time when the object has been updated. Equals to _created_at_ if not updated after creation. + UpdatedAt *time.Time `json:"updated_at,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _FederatedRealm FederatedRealm + +// NewFederatedRealm instantiates a new FederatedRealm object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewFederatedRealm(name string) *FederatedRealm { + this := FederatedRealm{} + this.Name = name + return &this +} + +// NewFederatedRealmWithDefaults instantiates a new FederatedRealm object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewFederatedRealmWithDefaults() *FederatedRealm { + this := FederatedRealm{} + return &this +} + +// GetAllocationV4 returns the AllocationV4 field value if set, zero value otherwise. +func (o *FederatedRealm) GetAllocationV4() Allocation { + if o == nil || IsNil(o.AllocationV4) { + var ret Allocation + return ret + } + return *o.AllocationV4 +} + +// GetAllocationV4Ok returns a tuple with the AllocationV4 field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *FederatedRealm) GetAllocationV4Ok() (*Allocation, bool) { + if o == nil || IsNil(o.AllocationV4) { + return nil, false + } + return o.AllocationV4, true +} + +// HasAllocationV4 returns a boolean if a field has been set. +func (o *FederatedRealm) HasAllocationV4() bool { + if o != nil && !IsNil(o.AllocationV4) { + return true + } + + return false +} + +// SetAllocationV4 gets a reference to the given Allocation and assigns it to the AllocationV4 field. +func (o *FederatedRealm) SetAllocationV4(v Allocation) { + o.AllocationV4 = &v +} + +// GetComment returns the Comment field value if set, zero value otherwise. +func (o *FederatedRealm) GetComment() string { + if o == nil || IsNil(o.Comment) { + var ret string + return ret + } + return *o.Comment +} + +// GetCommentOk returns a tuple with the Comment field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *FederatedRealm) GetCommentOk() (*string, bool) { + if o == nil || IsNil(o.Comment) { + return nil, false + } + return o.Comment, true +} + +// HasComment returns a boolean if a field has been set. +func (o *FederatedRealm) HasComment() bool { + if o != nil && !IsNil(o.Comment) { + return true + } + + return false +} + +// SetComment gets a reference to the given string and assigns it to the Comment field. +func (o *FederatedRealm) SetComment(v string) { + o.Comment = &v +} + +// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. +func (o *FederatedRealm) GetCreatedAt() time.Time { + if o == nil || IsNil(o.CreatedAt) { + var ret time.Time + return ret + } + return *o.CreatedAt +} + +// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *FederatedRealm) GetCreatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.CreatedAt) { + return nil, false + } + return o.CreatedAt, true +} + +// HasCreatedAt returns a boolean if a field has been set. +func (o *FederatedRealm) HasCreatedAt() bool { + if o != nil && !IsNil(o.CreatedAt) { + return true + } + + return false +} + +// SetCreatedAt gets a reference to the given time.Time and assigns it to the CreatedAt field. +func (o *FederatedRealm) SetCreatedAt(v time.Time) { + o.CreatedAt = &v +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *FederatedRealm) GetId() string { + if o == nil || IsNil(o.Id) { + var ret string + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *FederatedRealm) GetIdOk() (*string, bool) { + if o == nil || IsNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *FederatedRealm) HasId() bool { + if o != nil && !IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given string and assigns it to the Id field. +func (o *FederatedRealm) SetId(v string) { + o.Id = &v +} + +// GetName returns the Name field value +func (o *FederatedRealm) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *FederatedRealm) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *FederatedRealm) SetName(v string) { + o.Name = v +} + +// GetTags returns the Tags field value if set, zero value otherwise. +func (o *FederatedRealm) GetTags() map[string]interface{} { + if o == nil || IsNil(o.Tags) { + var ret map[string]interface{} + return ret + } + return o.Tags +} + +// GetTagsOk returns a tuple with the Tags field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *FederatedRealm) GetTagsOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.Tags) { + return map[string]interface{}{}, false + } + return o.Tags, true +} + +// HasTags returns a boolean if a field has been set. +func (o *FederatedRealm) HasTags() bool { + if o != nil && !IsNil(o.Tags) { + return true + } + + return false +} + +// SetTags gets a reference to the given map[string]interface{} and assigns it to the Tags field. +func (o *FederatedRealm) SetTags(v map[string]interface{}) { + o.Tags = v +} + +// GetUpdatedAt returns the UpdatedAt field value if set, zero value otherwise. +func (o *FederatedRealm) GetUpdatedAt() time.Time { + if o == nil || IsNil(o.UpdatedAt) { + var ret time.Time + return ret + } + return *o.UpdatedAt +} + +// GetUpdatedAtOk returns a tuple with the UpdatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *FederatedRealm) GetUpdatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.UpdatedAt) { + return nil, false + } + return o.UpdatedAt, true +} + +// HasUpdatedAt returns a boolean if a field has been set. +func (o *FederatedRealm) HasUpdatedAt() bool { + if o != nil && !IsNil(o.UpdatedAt) { + return true + } + + return false +} + +// SetUpdatedAt gets a reference to the given time.Time and assigns it to the UpdatedAt field. +func (o *FederatedRealm) SetUpdatedAt(v time.Time) { + o.UpdatedAt = &v +} + +func (o FederatedRealm) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o FederatedRealm) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.AllocationV4) { + toSerialize["allocation_v4"] = o.AllocationV4 + } + if !IsNil(o.Comment) { + toSerialize["comment"] = o.Comment + } + if !IsNil(o.CreatedAt) { + toSerialize["created_at"] = o.CreatedAt + } + if !IsNil(o.Id) { + toSerialize["id"] = o.Id + } + toSerialize["name"] = o.Name + if !IsNil(o.Tags) { + toSerialize["tags"] = o.Tags + } + if !IsNil(o.UpdatedAt) { + toSerialize["updated_at"] = o.UpdatedAt + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *FederatedRealm) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "name", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varFederatedRealm := _FederatedRealm{} + + err = json.Unmarshal(data, &varFederatedRealm) + + if err != nil { + return err + } + + *o = FederatedRealm(varFederatedRealm) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "allocation_v4") + delete(additionalProperties, "comment") + delete(additionalProperties, "created_at") + delete(additionalProperties, "id") + delete(additionalProperties, "name") + delete(additionalProperties, "tags") + delete(additionalProperties, "updated_at") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableFederatedRealm struct { + value *FederatedRealm + isSet bool +} + +func (v NullableFederatedRealm) Get() *FederatedRealm { + return v.value +} + +func (v *NullableFederatedRealm) Set(val *FederatedRealm) { + v.value = val + v.isSet = true +} + +func (v NullableFederatedRealm) IsSet() bool { + return v.isSet +} + +func (v *NullableFederatedRealm) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableFederatedRealm(val *FederatedRealm) *NullableFederatedRealm { + return &NullableFederatedRealm{value: val, isSet: true} +} + +func (v NullableFederatedRealm) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableFederatedRealm) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/ipamfederation/model_list_federated_block_response.go b/ipamfederation/model_list_federated_block_response.go new file mode 100644 index 0000000..ab44c83 --- /dev/null +++ b/ipamfederation/model_list_federated_block_response.go @@ -0,0 +1,154 @@ +/* +IPAM Federation API + +The DDI IPAM Federation application enables a SaaS administrator to manage multiple IPAM systems from one central control point CSP. + +API version: v1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package ipamfederation + +import ( + "encoding/json" +) + +// checks if the ListFederatedBlockResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ListFederatedBlockResponse{} + +// ListFederatedBlockResponse The response format to retrieve __FederatedBlock__ objects. +type ListFederatedBlockResponse struct { + // A list of FederatedBlock objects. + Results []FederatedBlock `json:"results,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _ListFederatedBlockResponse ListFederatedBlockResponse + +// NewListFederatedBlockResponse instantiates a new ListFederatedBlockResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewListFederatedBlockResponse() *ListFederatedBlockResponse { + this := ListFederatedBlockResponse{} + return &this +} + +// NewListFederatedBlockResponseWithDefaults instantiates a new ListFederatedBlockResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewListFederatedBlockResponseWithDefaults() *ListFederatedBlockResponse { + this := ListFederatedBlockResponse{} + return &this +} + +// GetResults returns the Results field value if set, zero value otherwise. +func (o *ListFederatedBlockResponse) GetResults() []FederatedBlock { + if o == nil || IsNil(o.Results) { + var ret []FederatedBlock + return ret + } + return o.Results +} + +// GetResultsOk returns a tuple with the Results field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ListFederatedBlockResponse) GetResultsOk() ([]FederatedBlock, bool) { + if o == nil || IsNil(o.Results) { + return nil, false + } + return o.Results, true +} + +// HasResults returns a boolean if a field has been set. +func (o *ListFederatedBlockResponse) HasResults() bool { + if o != nil && !IsNil(o.Results) { + return true + } + + return false +} + +// SetResults gets a reference to the given []FederatedBlock and assigns it to the Results field. +func (o *ListFederatedBlockResponse) SetResults(v []FederatedBlock) { + o.Results = v +} + +func (o ListFederatedBlockResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ListFederatedBlockResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Results) { + toSerialize["results"] = o.Results + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *ListFederatedBlockResponse) UnmarshalJSON(data []byte) (err error) { + varListFederatedBlockResponse := _ListFederatedBlockResponse{} + + err = json.Unmarshal(data, &varListFederatedBlockResponse) + + if err != nil { + return err + } + + *o = ListFederatedBlockResponse(varListFederatedBlockResponse) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "results") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableListFederatedBlockResponse struct { + value *ListFederatedBlockResponse + isSet bool +} + +func (v NullableListFederatedBlockResponse) Get() *ListFederatedBlockResponse { + return v.value +} + +func (v *NullableListFederatedBlockResponse) Set(val *ListFederatedBlockResponse) { + v.value = val + v.isSet = true +} + +func (v NullableListFederatedBlockResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableListFederatedBlockResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableListFederatedBlockResponse(val *ListFederatedBlockResponse) *NullableListFederatedBlockResponse { + return &NullableListFederatedBlockResponse{value: val, isSet: true} +} + +func (v NullableListFederatedBlockResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableListFederatedBlockResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/ipamfederation/model_list_federated_realm_response.go b/ipamfederation/model_list_federated_realm_response.go new file mode 100644 index 0000000..b8c4b75 --- /dev/null +++ b/ipamfederation/model_list_federated_realm_response.go @@ -0,0 +1,154 @@ +/* +IPAM Federation API + +The DDI IPAM Federation application enables a SaaS administrator to manage multiple IPAM systems from one central control point CSP. + +API version: v1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package ipamfederation + +import ( + "encoding/json" +) + +// checks if the ListFederatedRealmResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ListFederatedRealmResponse{} + +// ListFederatedRealmResponse The response format to retrieve __FederatedRealm__ objects. +type ListFederatedRealmResponse struct { + // The list of FederatedRealm objects. + Results []FederatedRealm `json:"results,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _ListFederatedRealmResponse ListFederatedRealmResponse + +// NewListFederatedRealmResponse instantiates a new ListFederatedRealmResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewListFederatedRealmResponse() *ListFederatedRealmResponse { + this := ListFederatedRealmResponse{} + return &this +} + +// NewListFederatedRealmResponseWithDefaults instantiates a new ListFederatedRealmResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewListFederatedRealmResponseWithDefaults() *ListFederatedRealmResponse { + this := ListFederatedRealmResponse{} + return &this +} + +// GetResults returns the Results field value if set, zero value otherwise. +func (o *ListFederatedRealmResponse) GetResults() []FederatedRealm { + if o == nil || IsNil(o.Results) { + var ret []FederatedRealm + return ret + } + return o.Results +} + +// GetResultsOk returns a tuple with the Results field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ListFederatedRealmResponse) GetResultsOk() ([]FederatedRealm, bool) { + if o == nil || IsNil(o.Results) { + return nil, false + } + return o.Results, true +} + +// HasResults returns a boolean if a field has been set. +func (o *ListFederatedRealmResponse) HasResults() bool { + if o != nil && !IsNil(o.Results) { + return true + } + + return false +} + +// SetResults gets a reference to the given []FederatedRealm and assigns it to the Results field. +func (o *ListFederatedRealmResponse) SetResults(v []FederatedRealm) { + o.Results = v +} + +func (o ListFederatedRealmResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ListFederatedRealmResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Results) { + toSerialize["results"] = o.Results + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *ListFederatedRealmResponse) UnmarshalJSON(data []byte) (err error) { + varListFederatedRealmResponse := _ListFederatedRealmResponse{} + + err = json.Unmarshal(data, &varListFederatedRealmResponse) + + if err != nil { + return err + } + + *o = ListFederatedRealmResponse(varListFederatedRealmResponse) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "results") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableListFederatedRealmResponse struct { + value *ListFederatedRealmResponse + isSet bool +} + +func (v NullableListFederatedRealmResponse) Get() *ListFederatedRealmResponse { + return v.value +} + +func (v *NullableListFederatedRealmResponse) Set(val *ListFederatedRealmResponse) { + v.value = val + v.isSet = true +} + +func (v NullableListFederatedRealmResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableListFederatedRealmResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableListFederatedRealmResponse(val *ListFederatedRealmResponse) *NullableListFederatedRealmResponse { + return &NullableListFederatedRealmResponse{value: val, isSet: true} +} + +func (v NullableListFederatedRealmResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableListFederatedRealmResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/ipamfederation/model_list_next_available_federated_block_response.go b/ipamfederation/model_list_next_available_federated_block_response.go new file mode 100644 index 0000000..bd5a767 --- /dev/null +++ b/ipamfederation/model_list_next_available_federated_block_response.go @@ -0,0 +1,153 @@ +/* +IPAM Federation API + +The DDI IPAM Federation application enables a SaaS administrator to manage multiple IPAM systems from one central control point CSP. + +API version: v1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package ipamfederation + +import ( + "encoding/json" +) + +// checks if the ListNextAvailableFederatedBlockResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ListNextAvailableFederatedBlockResponse{} + +// ListNextAvailableFederatedBlockResponse The response format to list next available __FederatedBlock__ objects. +type ListNextAvailableFederatedBlockResponse struct { + Results []FederatedBlock `json:"results,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _ListNextAvailableFederatedBlockResponse ListNextAvailableFederatedBlockResponse + +// NewListNextAvailableFederatedBlockResponse instantiates a new ListNextAvailableFederatedBlockResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewListNextAvailableFederatedBlockResponse() *ListNextAvailableFederatedBlockResponse { + this := ListNextAvailableFederatedBlockResponse{} + return &this +} + +// NewListNextAvailableFederatedBlockResponseWithDefaults instantiates a new ListNextAvailableFederatedBlockResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewListNextAvailableFederatedBlockResponseWithDefaults() *ListNextAvailableFederatedBlockResponse { + this := ListNextAvailableFederatedBlockResponse{} + return &this +} + +// GetResults returns the Results field value if set, zero value otherwise. +func (o *ListNextAvailableFederatedBlockResponse) GetResults() []FederatedBlock { + if o == nil || IsNil(o.Results) { + var ret []FederatedBlock + return ret + } + return o.Results +} + +// GetResultsOk returns a tuple with the Results field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ListNextAvailableFederatedBlockResponse) GetResultsOk() ([]FederatedBlock, bool) { + if o == nil || IsNil(o.Results) { + return nil, false + } + return o.Results, true +} + +// HasResults returns a boolean if a field has been set. +func (o *ListNextAvailableFederatedBlockResponse) HasResults() bool { + if o != nil && !IsNil(o.Results) { + return true + } + + return false +} + +// SetResults gets a reference to the given []FederatedBlock and assigns it to the Results field. +func (o *ListNextAvailableFederatedBlockResponse) SetResults(v []FederatedBlock) { + o.Results = v +} + +func (o ListNextAvailableFederatedBlockResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ListNextAvailableFederatedBlockResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Results) { + toSerialize["results"] = o.Results + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *ListNextAvailableFederatedBlockResponse) UnmarshalJSON(data []byte) (err error) { + varListNextAvailableFederatedBlockResponse := _ListNextAvailableFederatedBlockResponse{} + + err = json.Unmarshal(data, &varListNextAvailableFederatedBlockResponse) + + if err != nil { + return err + } + + *o = ListNextAvailableFederatedBlockResponse(varListNextAvailableFederatedBlockResponse) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "results") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableListNextAvailableFederatedBlockResponse struct { + value *ListNextAvailableFederatedBlockResponse + isSet bool +} + +func (v NullableListNextAvailableFederatedBlockResponse) Get() *ListNextAvailableFederatedBlockResponse { + return v.value +} + +func (v *NullableListNextAvailableFederatedBlockResponse) Set(val *ListNextAvailableFederatedBlockResponse) { + v.value = val + v.isSet = true +} + +func (v NullableListNextAvailableFederatedBlockResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableListNextAvailableFederatedBlockResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableListNextAvailableFederatedBlockResponse(val *ListNextAvailableFederatedBlockResponse) *NullableListNextAvailableFederatedBlockResponse { + return &NullableListNextAvailableFederatedBlockResponse{value: val, isSet: true} +} + +func (v NullableListNextAvailableFederatedBlockResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableListNextAvailableFederatedBlockResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/ipamfederation/model_list_next_available_overlapping_block_response.go b/ipamfederation/model_list_next_available_overlapping_block_response.go new file mode 100644 index 0000000..3a782e6 --- /dev/null +++ b/ipamfederation/model_list_next_available_overlapping_block_response.go @@ -0,0 +1,153 @@ +/* +IPAM Federation API + +The DDI IPAM Federation application enables a SaaS administrator to manage multiple IPAM systems from one central control point CSP. + +API version: v1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package ipamfederation + +import ( + "encoding/json" +) + +// checks if the ListNextAvailableOverlappingBlockResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ListNextAvailableOverlappingBlockResponse{} + +// ListNextAvailableOverlappingBlockResponse The response format to list next available __OverlappingBlock__ objects. +type ListNextAvailableOverlappingBlockResponse struct { + Results []OverlappingBlock `json:"results,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _ListNextAvailableOverlappingBlockResponse ListNextAvailableOverlappingBlockResponse + +// NewListNextAvailableOverlappingBlockResponse instantiates a new ListNextAvailableOverlappingBlockResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewListNextAvailableOverlappingBlockResponse() *ListNextAvailableOverlappingBlockResponse { + this := ListNextAvailableOverlappingBlockResponse{} + return &this +} + +// NewListNextAvailableOverlappingBlockResponseWithDefaults instantiates a new ListNextAvailableOverlappingBlockResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewListNextAvailableOverlappingBlockResponseWithDefaults() *ListNextAvailableOverlappingBlockResponse { + this := ListNextAvailableOverlappingBlockResponse{} + return &this +} + +// GetResults returns the Results field value if set, zero value otherwise. +func (o *ListNextAvailableOverlappingBlockResponse) GetResults() []OverlappingBlock { + if o == nil || IsNil(o.Results) { + var ret []OverlappingBlock + return ret + } + return o.Results +} + +// GetResultsOk returns a tuple with the Results field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ListNextAvailableOverlappingBlockResponse) GetResultsOk() ([]OverlappingBlock, bool) { + if o == nil || IsNil(o.Results) { + return nil, false + } + return o.Results, true +} + +// HasResults returns a boolean if a field has been set. +func (o *ListNextAvailableOverlappingBlockResponse) HasResults() bool { + if o != nil && !IsNil(o.Results) { + return true + } + + return false +} + +// SetResults gets a reference to the given []OverlappingBlock and assigns it to the Results field. +func (o *ListNextAvailableOverlappingBlockResponse) SetResults(v []OverlappingBlock) { + o.Results = v +} + +func (o ListNextAvailableOverlappingBlockResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ListNextAvailableOverlappingBlockResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Results) { + toSerialize["results"] = o.Results + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *ListNextAvailableOverlappingBlockResponse) UnmarshalJSON(data []byte) (err error) { + varListNextAvailableOverlappingBlockResponse := _ListNextAvailableOverlappingBlockResponse{} + + err = json.Unmarshal(data, &varListNextAvailableOverlappingBlockResponse) + + if err != nil { + return err + } + + *o = ListNextAvailableOverlappingBlockResponse(varListNextAvailableOverlappingBlockResponse) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "results") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableListNextAvailableOverlappingBlockResponse struct { + value *ListNextAvailableOverlappingBlockResponse + isSet bool +} + +func (v NullableListNextAvailableOverlappingBlockResponse) Get() *ListNextAvailableOverlappingBlockResponse { + return v.value +} + +func (v *NullableListNextAvailableOverlappingBlockResponse) Set(val *ListNextAvailableOverlappingBlockResponse) { + v.value = val + v.isSet = true +} + +func (v NullableListNextAvailableOverlappingBlockResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableListNextAvailableOverlappingBlockResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableListNextAvailableOverlappingBlockResponse(val *ListNextAvailableOverlappingBlockResponse) *NullableListNextAvailableOverlappingBlockResponse { + return &NullableListNextAvailableOverlappingBlockResponse{value: val, isSet: true} +} + +func (v NullableListNextAvailableOverlappingBlockResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableListNextAvailableOverlappingBlockResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/ipamfederation/model_list_next_available_reserved_block_response.go b/ipamfederation/model_list_next_available_reserved_block_response.go new file mode 100644 index 0000000..5a124e6 --- /dev/null +++ b/ipamfederation/model_list_next_available_reserved_block_response.go @@ -0,0 +1,153 @@ +/* +IPAM Federation API + +The DDI IPAM Federation application enables a SaaS administrator to manage multiple IPAM systems from one central control point CSP. + +API version: v1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package ipamfederation + +import ( + "encoding/json" +) + +// checks if the ListNextAvailableReservedBlockResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ListNextAvailableReservedBlockResponse{} + +// ListNextAvailableReservedBlockResponse The response format to list next available __ReservedBlock__ objects. +type ListNextAvailableReservedBlockResponse struct { + Results []ReservedBlock `json:"results,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _ListNextAvailableReservedBlockResponse ListNextAvailableReservedBlockResponse + +// NewListNextAvailableReservedBlockResponse instantiates a new ListNextAvailableReservedBlockResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewListNextAvailableReservedBlockResponse() *ListNextAvailableReservedBlockResponse { + this := ListNextAvailableReservedBlockResponse{} + return &this +} + +// NewListNextAvailableReservedBlockResponseWithDefaults instantiates a new ListNextAvailableReservedBlockResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewListNextAvailableReservedBlockResponseWithDefaults() *ListNextAvailableReservedBlockResponse { + this := ListNextAvailableReservedBlockResponse{} + return &this +} + +// GetResults returns the Results field value if set, zero value otherwise. +func (o *ListNextAvailableReservedBlockResponse) GetResults() []ReservedBlock { + if o == nil || IsNil(o.Results) { + var ret []ReservedBlock + return ret + } + return o.Results +} + +// GetResultsOk returns a tuple with the Results field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ListNextAvailableReservedBlockResponse) GetResultsOk() ([]ReservedBlock, bool) { + if o == nil || IsNil(o.Results) { + return nil, false + } + return o.Results, true +} + +// HasResults returns a boolean if a field has been set. +func (o *ListNextAvailableReservedBlockResponse) HasResults() bool { + if o != nil && !IsNil(o.Results) { + return true + } + + return false +} + +// SetResults gets a reference to the given []ReservedBlock and assigns it to the Results field. +func (o *ListNextAvailableReservedBlockResponse) SetResults(v []ReservedBlock) { + o.Results = v +} + +func (o ListNextAvailableReservedBlockResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ListNextAvailableReservedBlockResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Results) { + toSerialize["results"] = o.Results + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *ListNextAvailableReservedBlockResponse) UnmarshalJSON(data []byte) (err error) { + varListNextAvailableReservedBlockResponse := _ListNextAvailableReservedBlockResponse{} + + err = json.Unmarshal(data, &varListNextAvailableReservedBlockResponse) + + if err != nil { + return err + } + + *o = ListNextAvailableReservedBlockResponse(varListNextAvailableReservedBlockResponse) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "results") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableListNextAvailableReservedBlockResponse struct { + value *ListNextAvailableReservedBlockResponse + isSet bool +} + +func (v NullableListNextAvailableReservedBlockResponse) Get() *ListNextAvailableReservedBlockResponse { + return v.value +} + +func (v *NullableListNextAvailableReservedBlockResponse) Set(val *ListNextAvailableReservedBlockResponse) { + v.value = val + v.isSet = true +} + +func (v NullableListNextAvailableReservedBlockResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableListNextAvailableReservedBlockResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableListNextAvailableReservedBlockResponse(val *ListNextAvailableReservedBlockResponse) *NullableListNextAvailableReservedBlockResponse { + return &NullableListNextAvailableReservedBlockResponse{value: val, isSet: true} +} + +func (v NullableListNextAvailableReservedBlockResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableListNextAvailableReservedBlockResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/ipamfederation/model_list_overlapping_block_response.go b/ipamfederation/model_list_overlapping_block_response.go new file mode 100644 index 0000000..e3ac483 --- /dev/null +++ b/ipamfederation/model_list_overlapping_block_response.go @@ -0,0 +1,154 @@ +/* +IPAM Federation API + +The DDI IPAM Federation application enables a SaaS administrator to manage multiple IPAM systems from one central control point CSP. + +API version: v1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package ipamfederation + +import ( + "encoding/json" +) + +// checks if the ListOverlappingBlockResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ListOverlappingBlockResponse{} + +// ListOverlappingBlockResponse The response format to retrieve __OverlappingBlock__ objects. +type ListOverlappingBlockResponse struct { + // A list of OverlappingBlock objects. + Results []OverlappingBlock `json:"results,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _ListOverlappingBlockResponse ListOverlappingBlockResponse + +// NewListOverlappingBlockResponse instantiates a new ListOverlappingBlockResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewListOverlappingBlockResponse() *ListOverlappingBlockResponse { + this := ListOverlappingBlockResponse{} + return &this +} + +// NewListOverlappingBlockResponseWithDefaults instantiates a new ListOverlappingBlockResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewListOverlappingBlockResponseWithDefaults() *ListOverlappingBlockResponse { + this := ListOverlappingBlockResponse{} + return &this +} + +// GetResults returns the Results field value if set, zero value otherwise. +func (o *ListOverlappingBlockResponse) GetResults() []OverlappingBlock { + if o == nil || IsNil(o.Results) { + var ret []OverlappingBlock + return ret + } + return o.Results +} + +// GetResultsOk returns a tuple with the Results field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ListOverlappingBlockResponse) GetResultsOk() ([]OverlappingBlock, bool) { + if o == nil || IsNil(o.Results) { + return nil, false + } + return o.Results, true +} + +// HasResults returns a boolean if a field has been set. +func (o *ListOverlappingBlockResponse) HasResults() bool { + if o != nil && !IsNil(o.Results) { + return true + } + + return false +} + +// SetResults gets a reference to the given []OverlappingBlock and assigns it to the Results field. +func (o *ListOverlappingBlockResponse) SetResults(v []OverlappingBlock) { + o.Results = v +} + +func (o ListOverlappingBlockResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ListOverlappingBlockResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Results) { + toSerialize["results"] = o.Results + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *ListOverlappingBlockResponse) UnmarshalJSON(data []byte) (err error) { + varListOverlappingBlockResponse := _ListOverlappingBlockResponse{} + + err = json.Unmarshal(data, &varListOverlappingBlockResponse) + + if err != nil { + return err + } + + *o = ListOverlappingBlockResponse(varListOverlappingBlockResponse) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "results") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableListOverlappingBlockResponse struct { + value *ListOverlappingBlockResponse + isSet bool +} + +func (v NullableListOverlappingBlockResponse) Get() *ListOverlappingBlockResponse { + return v.value +} + +func (v *NullableListOverlappingBlockResponse) Set(val *ListOverlappingBlockResponse) { + v.value = val + v.isSet = true +} + +func (v NullableListOverlappingBlockResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableListOverlappingBlockResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableListOverlappingBlockResponse(val *ListOverlappingBlockResponse) *NullableListOverlappingBlockResponse { + return &NullableListOverlappingBlockResponse{value: val, isSet: true} +} + +func (v NullableListOverlappingBlockResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableListOverlappingBlockResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/ipamfederation/model_list_reserved_block_response.go b/ipamfederation/model_list_reserved_block_response.go new file mode 100644 index 0000000..e9ca872 --- /dev/null +++ b/ipamfederation/model_list_reserved_block_response.go @@ -0,0 +1,154 @@ +/* +IPAM Federation API + +The DDI IPAM Federation application enables a SaaS administrator to manage multiple IPAM systems from one central control point CSP. + +API version: v1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package ipamfederation + +import ( + "encoding/json" +) + +// checks if the ListReservedBlockResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ListReservedBlockResponse{} + +// ListReservedBlockResponse The response format to retrieve __ReservedBlock__ objects. +type ListReservedBlockResponse struct { + // A list of ReservedBlock objects. + Results []ReservedBlock `json:"results,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _ListReservedBlockResponse ListReservedBlockResponse + +// NewListReservedBlockResponse instantiates a new ListReservedBlockResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewListReservedBlockResponse() *ListReservedBlockResponse { + this := ListReservedBlockResponse{} + return &this +} + +// NewListReservedBlockResponseWithDefaults instantiates a new ListReservedBlockResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewListReservedBlockResponseWithDefaults() *ListReservedBlockResponse { + this := ListReservedBlockResponse{} + return &this +} + +// GetResults returns the Results field value if set, zero value otherwise. +func (o *ListReservedBlockResponse) GetResults() []ReservedBlock { + if o == nil || IsNil(o.Results) { + var ret []ReservedBlock + return ret + } + return o.Results +} + +// GetResultsOk returns a tuple with the Results field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ListReservedBlockResponse) GetResultsOk() ([]ReservedBlock, bool) { + if o == nil || IsNil(o.Results) { + return nil, false + } + return o.Results, true +} + +// HasResults returns a boolean if a field has been set. +func (o *ListReservedBlockResponse) HasResults() bool { + if o != nil && !IsNil(o.Results) { + return true + } + + return false +} + +// SetResults gets a reference to the given []ReservedBlock and assigns it to the Results field. +func (o *ListReservedBlockResponse) SetResults(v []ReservedBlock) { + o.Results = v +} + +func (o ListReservedBlockResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ListReservedBlockResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Results) { + toSerialize["results"] = o.Results + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *ListReservedBlockResponse) UnmarshalJSON(data []byte) (err error) { + varListReservedBlockResponse := _ListReservedBlockResponse{} + + err = json.Unmarshal(data, &varListReservedBlockResponse) + + if err != nil { + return err + } + + *o = ListReservedBlockResponse(varListReservedBlockResponse) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "results") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableListReservedBlockResponse struct { + value *ListReservedBlockResponse + isSet bool +} + +func (v NullableListReservedBlockResponse) Get() *ListReservedBlockResponse { + return v.value +} + +func (v *NullableListReservedBlockResponse) Set(val *ListReservedBlockResponse) { + v.value = val + v.isSet = true +} + +func (v NullableListReservedBlockResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableListReservedBlockResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableListReservedBlockResponse(val *ListReservedBlockResponse) *NullableListReservedBlockResponse { + return &NullableListReservedBlockResponse{value: val, isSet: true} +} + +func (v NullableListReservedBlockResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableListReservedBlockResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/ipamfederation/model_next_available_block_request.go b/ipamfederation/model_next_available_block_request.go new file mode 100644 index 0000000..77e7564 --- /dev/null +++ b/ipamfederation/model_next_available_block_request.go @@ -0,0 +1,344 @@ +/* +IPAM Federation API + +The DDI IPAM Federation application enables a SaaS administrator to manage multiple IPAM systems from one central control point CSP. + +API version: v1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package ipamfederation + +import ( + "encoding/json" +) + +// checks if the NextAvailableBlockRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &NextAvailableBlockRequest{} + +// NextAvailableBlockRequest struct for NextAvailableBlockRequest +type NextAvailableBlockRequest struct { + // The CIDR of the federated block. This is required, if _address_ does not specify it in its input. + Cidr *int64 `json:"cidr,omitempty"` + // The description for the _federation/federated_block_. May contain 0 to 1024 characters. Can include UTF-8. + Comment *string `json:"comment,omitempty"` + // The count of __Block__ required. If not provided, it will default to 1. + Count *int64 `json:"count,omitempty"` + // The resource identifier. + Id *string `json:"id,omitempty"` + // The name to be provided. + Name *string `json:"name,omitempty"` + // The tags for the federated block in JSON format. + Tags map[string]interface{} `json:"tags,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _NextAvailableBlockRequest NextAvailableBlockRequest + +// NewNextAvailableBlockRequest instantiates a new NextAvailableBlockRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewNextAvailableBlockRequest() *NextAvailableBlockRequest { + this := NextAvailableBlockRequest{} + return &this +} + +// NewNextAvailableBlockRequestWithDefaults instantiates a new NextAvailableBlockRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewNextAvailableBlockRequestWithDefaults() *NextAvailableBlockRequest { + this := NextAvailableBlockRequest{} + return &this +} + +// GetCidr returns the Cidr field value if set, zero value otherwise. +func (o *NextAvailableBlockRequest) GetCidr() int64 { + if o == nil || IsNil(o.Cidr) { + var ret int64 + return ret + } + return *o.Cidr +} + +// GetCidrOk returns a tuple with the Cidr field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *NextAvailableBlockRequest) GetCidrOk() (*int64, bool) { + if o == nil || IsNil(o.Cidr) { + return nil, false + } + return o.Cidr, true +} + +// HasCidr returns a boolean if a field has been set. +func (o *NextAvailableBlockRequest) HasCidr() bool { + if o != nil && !IsNil(o.Cidr) { + return true + } + + return false +} + +// SetCidr gets a reference to the given int64 and assigns it to the Cidr field. +func (o *NextAvailableBlockRequest) SetCidr(v int64) { + o.Cidr = &v +} + +// GetComment returns the Comment field value if set, zero value otherwise. +func (o *NextAvailableBlockRequest) GetComment() string { + if o == nil || IsNil(o.Comment) { + var ret string + return ret + } + return *o.Comment +} + +// GetCommentOk returns a tuple with the Comment field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *NextAvailableBlockRequest) GetCommentOk() (*string, bool) { + if o == nil || IsNil(o.Comment) { + return nil, false + } + return o.Comment, true +} + +// HasComment returns a boolean if a field has been set. +func (o *NextAvailableBlockRequest) HasComment() bool { + if o != nil && !IsNil(o.Comment) { + return true + } + + return false +} + +// SetComment gets a reference to the given string and assigns it to the Comment field. +func (o *NextAvailableBlockRequest) SetComment(v string) { + o.Comment = &v +} + +// GetCount returns the Count field value if set, zero value otherwise. +func (o *NextAvailableBlockRequest) GetCount() int64 { + if o == nil || IsNil(o.Count) { + var ret int64 + return ret + } + return *o.Count +} + +// GetCountOk returns a tuple with the Count field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *NextAvailableBlockRequest) GetCountOk() (*int64, bool) { + if o == nil || IsNil(o.Count) { + return nil, false + } + return o.Count, true +} + +// HasCount returns a boolean if a field has been set. +func (o *NextAvailableBlockRequest) HasCount() bool { + if o != nil && !IsNil(o.Count) { + return true + } + + return false +} + +// SetCount gets a reference to the given int64 and assigns it to the Count field. +func (o *NextAvailableBlockRequest) SetCount(v int64) { + o.Count = &v +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *NextAvailableBlockRequest) GetId() string { + if o == nil || IsNil(o.Id) { + var ret string + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *NextAvailableBlockRequest) GetIdOk() (*string, bool) { + if o == nil || IsNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *NextAvailableBlockRequest) HasId() bool { + if o != nil && !IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given string and assigns it to the Id field. +func (o *NextAvailableBlockRequest) SetId(v string) { + o.Id = &v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *NextAvailableBlockRequest) GetName() string { + if o == nil || IsNil(o.Name) { + var ret string + return ret + } + return *o.Name +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *NextAvailableBlockRequest) GetNameOk() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *NextAvailableBlockRequest) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *NextAvailableBlockRequest) SetName(v string) { + o.Name = &v +} + +// GetTags returns the Tags field value if set, zero value otherwise. +func (o *NextAvailableBlockRequest) GetTags() map[string]interface{} { + if o == nil || IsNil(o.Tags) { + var ret map[string]interface{} + return ret + } + return o.Tags +} + +// GetTagsOk returns a tuple with the Tags field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *NextAvailableBlockRequest) GetTagsOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.Tags) { + return map[string]interface{}{}, false + } + return o.Tags, true +} + +// HasTags returns a boolean if a field has been set. +func (o *NextAvailableBlockRequest) HasTags() bool { + if o != nil && !IsNil(o.Tags) { + return true + } + + return false +} + +// SetTags gets a reference to the given map[string]interface{} and assigns it to the Tags field. +func (o *NextAvailableBlockRequest) SetTags(v map[string]interface{}) { + o.Tags = v +} + +func (o NextAvailableBlockRequest) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o NextAvailableBlockRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Cidr) { + toSerialize["cidr"] = o.Cidr + } + if !IsNil(o.Comment) { + toSerialize["comment"] = o.Comment + } + if !IsNil(o.Count) { + toSerialize["count"] = o.Count + } + if !IsNil(o.Id) { + toSerialize["id"] = o.Id + } + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.Tags) { + toSerialize["tags"] = o.Tags + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *NextAvailableBlockRequest) UnmarshalJSON(data []byte) (err error) { + varNextAvailableBlockRequest := _NextAvailableBlockRequest{} + + err = json.Unmarshal(data, &varNextAvailableBlockRequest) + + if err != nil { + return err + } + + *o = NextAvailableBlockRequest(varNextAvailableBlockRequest) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "cidr") + delete(additionalProperties, "comment") + delete(additionalProperties, "count") + delete(additionalProperties, "id") + delete(additionalProperties, "name") + delete(additionalProperties, "tags") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableNextAvailableBlockRequest struct { + value *NextAvailableBlockRequest + isSet bool +} + +func (v NullableNextAvailableBlockRequest) Get() *NextAvailableBlockRequest { + return v.value +} + +func (v *NullableNextAvailableBlockRequest) Set(val *NextAvailableBlockRequest) { + v.value = val + v.isSet = true +} + +func (v NullableNextAvailableBlockRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableNextAvailableBlockRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableNextAvailableBlockRequest(val *NextAvailableBlockRequest) *NullableNextAvailableBlockRequest { + return &NullableNextAvailableBlockRequest{value: val, isSet: true} +} + +func (v NullableNextAvailableBlockRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableNextAvailableBlockRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/ipamfederation/model_overlapping_block.go b/ipamfederation/model_overlapping_block.go new file mode 100644 index 0000000..785cf72 --- /dev/null +++ b/ipamfederation/model_overlapping_block.go @@ -0,0 +1,540 @@ +/* +IPAM Federation API + +The DDI IPAM Federation application enables a SaaS administrator to manage multiple IPAM systems from one central control point CSP. + +API version: v1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package ipamfederation + +import ( + "encoding/json" + "fmt" + "time" +) + +// checks if the OverlappingBlock type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &OverlappingBlock{} + +// OverlappingBlock An __OverlappingBlock__ object (_federation/overlapping_block_) is a set of contiguous IP addresses with no gap, expressed as a CIDR block. It is explicitly associated with a Federated Realm, and implicitly with a Federated Block Parent. An __OverlappingBlock__ in a given realm is said to be the child of the closest enclosing parent. An __OverlappingBlock__ indicates an address range that may be managed independently by all participating IPAM services. +type OverlappingBlock struct { + // The address field in form “a.b.c.d/n” where the “/n” may be omitted. In this case, the CIDR value must be defined in the _cidr_ field. When reading, the _address_ field is always in the form “a.b.c.d”. + Address string `json:"address"` + // The CIDR of the overlapping block. This is required, if _address_ does not specify it in its input. + Cidr *int64 `json:"cidr,omitempty"` + // The description for the overlapping block. May contain 0 to 1024 characters. Can include UTF-8. + Comment *string `json:"comment,omitempty"` + // Time when the object has been created. + CreatedAt *time.Time `json:"created_at,omitempty"` + // The resource identifier. + FederatedRealm string `json:"federated_realm"` + // The resource identifier. + Id *string `json:"id,omitempty"` + // The name of the overlapping block. May contain 1 to 256 characters. Can include UTF-8. + Name *string `json:"name,omitempty"` + // The resource identifier. + Parent *string `json:"parent,omitempty"` + // The type of protocol of overlapping block (_ip4_ or _ip6_). + Protocol *string `json:"protocol,omitempty"` + // The tags for the overlapping block in JSON format. + Tags map[string]interface{} `json:"tags,omitempty"` + // Time when the object has been updated. Equals to _created_at_ if not updated after creation. + UpdatedAt *time.Time `json:"updated_at,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _OverlappingBlock OverlappingBlock + +// NewOverlappingBlock instantiates a new OverlappingBlock object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewOverlappingBlock(address string, federatedRealm string) *OverlappingBlock { + this := OverlappingBlock{} + this.Address = address + this.FederatedRealm = federatedRealm + return &this +} + +// NewOverlappingBlockWithDefaults instantiates a new OverlappingBlock object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewOverlappingBlockWithDefaults() *OverlappingBlock { + this := OverlappingBlock{} + return &this +} + +// GetAddress returns the Address field value +func (o *OverlappingBlock) GetAddress() string { + if o == nil { + var ret string + return ret + } + + return o.Address +} + +// GetAddressOk returns a tuple with the Address field value +// and a boolean to check if the value has been set. +func (o *OverlappingBlock) GetAddressOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Address, true +} + +// SetAddress sets field value +func (o *OverlappingBlock) SetAddress(v string) { + o.Address = v +} + +// GetCidr returns the Cidr field value if set, zero value otherwise. +func (o *OverlappingBlock) GetCidr() int64 { + if o == nil || IsNil(o.Cidr) { + var ret int64 + return ret + } + return *o.Cidr +} + +// GetCidrOk returns a tuple with the Cidr field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *OverlappingBlock) GetCidrOk() (*int64, bool) { + if o == nil || IsNil(o.Cidr) { + return nil, false + } + return o.Cidr, true +} + +// HasCidr returns a boolean if a field has been set. +func (o *OverlappingBlock) HasCidr() bool { + if o != nil && !IsNil(o.Cidr) { + return true + } + + return false +} + +// SetCidr gets a reference to the given int64 and assigns it to the Cidr field. +func (o *OverlappingBlock) SetCidr(v int64) { + o.Cidr = &v +} + +// GetComment returns the Comment field value if set, zero value otherwise. +func (o *OverlappingBlock) GetComment() string { + if o == nil || IsNil(o.Comment) { + var ret string + return ret + } + return *o.Comment +} + +// GetCommentOk returns a tuple with the Comment field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *OverlappingBlock) GetCommentOk() (*string, bool) { + if o == nil || IsNil(o.Comment) { + return nil, false + } + return o.Comment, true +} + +// HasComment returns a boolean if a field has been set. +func (o *OverlappingBlock) HasComment() bool { + if o != nil && !IsNil(o.Comment) { + return true + } + + return false +} + +// SetComment gets a reference to the given string and assigns it to the Comment field. +func (o *OverlappingBlock) SetComment(v string) { + o.Comment = &v +} + +// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. +func (o *OverlappingBlock) GetCreatedAt() time.Time { + if o == nil || IsNil(o.CreatedAt) { + var ret time.Time + return ret + } + return *o.CreatedAt +} + +// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *OverlappingBlock) GetCreatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.CreatedAt) { + return nil, false + } + return o.CreatedAt, true +} + +// HasCreatedAt returns a boolean if a field has been set. +func (o *OverlappingBlock) HasCreatedAt() bool { + if o != nil && !IsNil(o.CreatedAt) { + return true + } + + return false +} + +// SetCreatedAt gets a reference to the given time.Time and assigns it to the CreatedAt field. +func (o *OverlappingBlock) SetCreatedAt(v time.Time) { + o.CreatedAt = &v +} + +// GetFederatedRealm returns the FederatedRealm field value +func (o *OverlappingBlock) GetFederatedRealm() string { + if o == nil { + var ret string + return ret + } + + return o.FederatedRealm +} + +// GetFederatedRealmOk returns a tuple with the FederatedRealm field value +// and a boolean to check if the value has been set. +func (o *OverlappingBlock) GetFederatedRealmOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.FederatedRealm, true +} + +// SetFederatedRealm sets field value +func (o *OverlappingBlock) SetFederatedRealm(v string) { + o.FederatedRealm = v +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *OverlappingBlock) GetId() string { + if o == nil || IsNil(o.Id) { + var ret string + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *OverlappingBlock) GetIdOk() (*string, bool) { + if o == nil || IsNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *OverlappingBlock) HasId() bool { + if o != nil && !IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given string and assigns it to the Id field. +func (o *OverlappingBlock) SetId(v string) { + o.Id = &v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *OverlappingBlock) GetName() string { + if o == nil || IsNil(o.Name) { + var ret string + return ret + } + return *o.Name +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *OverlappingBlock) GetNameOk() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *OverlappingBlock) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *OverlappingBlock) SetName(v string) { + o.Name = &v +} + +// GetParent returns the Parent field value if set, zero value otherwise. +func (o *OverlappingBlock) GetParent() string { + if o == nil || IsNil(o.Parent) { + var ret string + return ret + } + return *o.Parent +} + +// GetParentOk returns a tuple with the Parent field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *OverlappingBlock) GetParentOk() (*string, bool) { + if o == nil || IsNil(o.Parent) { + return nil, false + } + return o.Parent, true +} + +// HasParent returns a boolean if a field has been set. +func (o *OverlappingBlock) HasParent() bool { + if o != nil && !IsNil(o.Parent) { + return true + } + + return false +} + +// SetParent gets a reference to the given string and assigns it to the Parent field. +func (o *OverlappingBlock) SetParent(v string) { + o.Parent = &v +} + +// GetProtocol returns the Protocol field value if set, zero value otherwise. +func (o *OverlappingBlock) GetProtocol() string { + if o == nil || IsNil(o.Protocol) { + var ret string + return ret + } + return *o.Protocol +} + +// GetProtocolOk returns a tuple with the Protocol field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *OverlappingBlock) GetProtocolOk() (*string, bool) { + if o == nil || IsNil(o.Protocol) { + return nil, false + } + return o.Protocol, true +} + +// HasProtocol returns a boolean if a field has been set. +func (o *OverlappingBlock) HasProtocol() bool { + if o != nil && !IsNil(o.Protocol) { + return true + } + + return false +} + +// SetProtocol gets a reference to the given string and assigns it to the Protocol field. +func (o *OverlappingBlock) SetProtocol(v string) { + o.Protocol = &v +} + +// GetTags returns the Tags field value if set, zero value otherwise. +func (o *OverlappingBlock) GetTags() map[string]interface{} { + if o == nil || IsNil(o.Tags) { + var ret map[string]interface{} + return ret + } + return o.Tags +} + +// GetTagsOk returns a tuple with the Tags field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *OverlappingBlock) GetTagsOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.Tags) { + return map[string]interface{}{}, false + } + return o.Tags, true +} + +// HasTags returns a boolean if a field has been set. +func (o *OverlappingBlock) HasTags() bool { + if o != nil && !IsNil(o.Tags) { + return true + } + + return false +} + +// SetTags gets a reference to the given map[string]interface{} and assigns it to the Tags field. +func (o *OverlappingBlock) SetTags(v map[string]interface{}) { + o.Tags = v +} + +// GetUpdatedAt returns the UpdatedAt field value if set, zero value otherwise. +func (o *OverlappingBlock) GetUpdatedAt() time.Time { + if o == nil || IsNil(o.UpdatedAt) { + var ret time.Time + return ret + } + return *o.UpdatedAt +} + +// GetUpdatedAtOk returns a tuple with the UpdatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *OverlappingBlock) GetUpdatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.UpdatedAt) { + return nil, false + } + return o.UpdatedAt, true +} + +// HasUpdatedAt returns a boolean if a field has been set. +func (o *OverlappingBlock) HasUpdatedAt() bool { + if o != nil && !IsNil(o.UpdatedAt) { + return true + } + + return false +} + +// SetUpdatedAt gets a reference to the given time.Time and assigns it to the UpdatedAt field. +func (o *OverlappingBlock) SetUpdatedAt(v time.Time) { + o.UpdatedAt = &v +} + +func (o OverlappingBlock) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o OverlappingBlock) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["address"] = o.Address + if !IsNil(o.Cidr) { + toSerialize["cidr"] = o.Cidr + } + if !IsNil(o.Comment) { + toSerialize["comment"] = o.Comment + } + if !IsNil(o.CreatedAt) { + toSerialize["created_at"] = o.CreatedAt + } + toSerialize["federated_realm"] = o.FederatedRealm + if !IsNil(o.Id) { + toSerialize["id"] = o.Id + } + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.Parent) { + toSerialize["parent"] = o.Parent + } + if !IsNil(o.Protocol) { + toSerialize["protocol"] = o.Protocol + } + if !IsNil(o.Tags) { + toSerialize["tags"] = o.Tags + } + if !IsNil(o.UpdatedAt) { + toSerialize["updated_at"] = o.UpdatedAt + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *OverlappingBlock) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "address", + "federated_realm", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varOverlappingBlock := _OverlappingBlock{} + + err = json.Unmarshal(data, &varOverlappingBlock) + + if err != nil { + return err + } + + *o = OverlappingBlock(varOverlappingBlock) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "address") + delete(additionalProperties, "cidr") + delete(additionalProperties, "comment") + delete(additionalProperties, "created_at") + delete(additionalProperties, "federated_realm") + delete(additionalProperties, "id") + delete(additionalProperties, "name") + delete(additionalProperties, "parent") + delete(additionalProperties, "protocol") + delete(additionalProperties, "tags") + delete(additionalProperties, "updated_at") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableOverlappingBlock struct { + value *OverlappingBlock + isSet bool +} + +func (v NullableOverlappingBlock) Get() *OverlappingBlock { + return v.value +} + +func (v *NullableOverlappingBlock) Set(val *OverlappingBlock) { + v.value = val + v.isSet = true +} + +func (v NullableOverlappingBlock) IsSet() bool { + return v.isSet +} + +func (v *NullableOverlappingBlock) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableOverlappingBlock(val *OverlappingBlock) *NullableOverlappingBlock { + return &NullableOverlappingBlock{value: val, isSet: true} +} + +func (v NullableOverlappingBlock) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableOverlappingBlock) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/ipamfederation/model_read_federated_block_response.go b/ipamfederation/model_read_federated_block_response.go new file mode 100644 index 0000000..9791812 --- /dev/null +++ b/ipamfederation/model_read_federated_block_response.go @@ -0,0 +1,154 @@ +/* +IPAM Federation API + +The DDI IPAM Federation application enables a SaaS administrator to manage multiple IPAM systems from one central control point CSP. + +API version: v1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package ipamfederation + +import ( + "encoding/json" +) + +// checks if the ReadFederatedBlockResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ReadFederatedBlockResponse{} + +// ReadFederatedBlockResponse The response format to retrieve the __FederatedBlock__ object. +type ReadFederatedBlockResponse struct { + // The FederatedBlock object. + Result *FederatedBlock `json:"result,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _ReadFederatedBlockResponse ReadFederatedBlockResponse + +// NewReadFederatedBlockResponse instantiates a new ReadFederatedBlockResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewReadFederatedBlockResponse() *ReadFederatedBlockResponse { + this := ReadFederatedBlockResponse{} + return &this +} + +// NewReadFederatedBlockResponseWithDefaults instantiates a new ReadFederatedBlockResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewReadFederatedBlockResponseWithDefaults() *ReadFederatedBlockResponse { + this := ReadFederatedBlockResponse{} + return &this +} + +// GetResult returns the Result field value if set, zero value otherwise. +func (o *ReadFederatedBlockResponse) GetResult() FederatedBlock { + if o == nil || IsNil(o.Result) { + var ret FederatedBlock + return ret + } + return *o.Result +} + +// GetResultOk returns a tuple with the Result field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ReadFederatedBlockResponse) GetResultOk() (*FederatedBlock, bool) { + if o == nil || IsNil(o.Result) { + return nil, false + } + return o.Result, true +} + +// HasResult returns a boolean if a field has been set. +func (o *ReadFederatedBlockResponse) HasResult() bool { + if o != nil && !IsNil(o.Result) { + return true + } + + return false +} + +// SetResult gets a reference to the given FederatedBlock and assigns it to the Result field. +func (o *ReadFederatedBlockResponse) SetResult(v FederatedBlock) { + o.Result = &v +} + +func (o ReadFederatedBlockResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ReadFederatedBlockResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Result) { + toSerialize["result"] = o.Result + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *ReadFederatedBlockResponse) UnmarshalJSON(data []byte) (err error) { + varReadFederatedBlockResponse := _ReadFederatedBlockResponse{} + + err = json.Unmarshal(data, &varReadFederatedBlockResponse) + + if err != nil { + return err + } + + *o = ReadFederatedBlockResponse(varReadFederatedBlockResponse) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "result") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableReadFederatedBlockResponse struct { + value *ReadFederatedBlockResponse + isSet bool +} + +func (v NullableReadFederatedBlockResponse) Get() *ReadFederatedBlockResponse { + return v.value +} + +func (v *NullableReadFederatedBlockResponse) Set(val *ReadFederatedBlockResponse) { + v.value = val + v.isSet = true +} + +func (v NullableReadFederatedBlockResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableReadFederatedBlockResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableReadFederatedBlockResponse(val *ReadFederatedBlockResponse) *NullableReadFederatedBlockResponse { + return &NullableReadFederatedBlockResponse{value: val, isSet: true} +} + +func (v NullableReadFederatedBlockResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableReadFederatedBlockResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/ipamfederation/model_read_federated_realm_response.go b/ipamfederation/model_read_federated_realm_response.go new file mode 100644 index 0000000..7d3f181 --- /dev/null +++ b/ipamfederation/model_read_federated_realm_response.go @@ -0,0 +1,154 @@ +/* +IPAM Federation API + +The DDI IPAM Federation application enables a SaaS administrator to manage multiple IPAM systems from one central control point CSP. + +API version: v1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package ipamfederation + +import ( + "encoding/json" +) + +// checks if the ReadFederatedRealmResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ReadFederatedRealmResponse{} + +// ReadFederatedRealmResponse The response format to retrieve the __FederatedRealm__ object. +type ReadFederatedRealmResponse struct { + // The FederatedRealm object. + Result *FederatedRealm `json:"result,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _ReadFederatedRealmResponse ReadFederatedRealmResponse + +// NewReadFederatedRealmResponse instantiates a new ReadFederatedRealmResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewReadFederatedRealmResponse() *ReadFederatedRealmResponse { + this := ReadFederatedRealmResponse{} + return &this +} + +// NewReadFederatedRealmResponseWithDefaults instantiates a new ReadFederatedRealmResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewReadFederatedRealmResponseWithDefaults() *ReadFederatedRealmResponse { + this := ReadFederatedRealmResponse{} + return &this +} + +// GetResult returns the Result field value if set, zero value otherwise. +func (o *ReadFederatedRealmResponse) GetResult() FederatedRealm { + if o == nil || IsNil(o.Result) { + var ret FederatedRealm + return ret + } + return *o.Result +} + +// GetResultOk returns a tuple with the Result field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ReadFederatedRealmResponse) GetResultOk() (*FederatedRealm, bool) { + if o == nil || IsNil(o.Result) { + return nil, false + } + return o.Result, true +} + +// HasResult returns a boolean if a field has been set. +func (o *ReadFederatedRealmResponse) HasResult() bool { + if o != nil && !IsNil(o.Result) { + return true + } + + return false +} + +// SetResult gets a reference to the given FederatedRealm and assigns it to the Result field. +func (o *ReadFederatedRealmResponse) SetResult(v FederatedRealm) { + o.Result = &v +} + +func (o ReadFederatedRealmResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ReadFederatedRealmResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Result) { + toSerialize["result"] = o.Result + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *ReadFederatedRealmResponse) UnmarshalJSON(data []byte) (err error) { + varReadFederatedRealmResponse := _ReadFederatedRealmResponse{} + + err = json.Unmarshal(data, &varReadFederatedRealmResponse) + + if err != nil { + return err + } + + *o = ReadFederatedRealmResponse(varReadFederatedRealmResponse) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "result") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableReadFederatedRealmResponse struct { + value *ReadFederatedRealmResponse + isSet bool +} + +func (v NullableReadFederatedRealmResponse) Get() *ReadFederatedRealmResponse { + return v.value +} + +func (v *NullableReadFederatedRealmResponse) Set(val *ReadFederatedRealmResponse) { + v.value = val + v.isSet = true +} + +func (v NullableReadFederatedRealmResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableReadFederatedRealmResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableReadFederatedRealmResponse(val *ReadFederatedRealmResponse) *NullableReadFederatedRealmResponse { + return &NullableReadFederatedRealmResponse{value: val, isSet: true} +} + +func (v NullableReadFederatedRealmResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableReadFederatedRealmResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/ipamfederation/model_read_overlapping_block_response.go b/ipamfederation/model_read_overlapping_block_response.go new file mode 100644 index 0000000..f7af23e --- /dev/null +++ b/ipamfederation/model_read_overlapping_block_response.go @@ -0,0 +1,154 @@ +/* +IPAM Federation API + +The DDI IPAM Federation application enables a SaaS administrator to manage multiple IPAM systems from one central control point CSP. + +API version: v1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package ipamfederation + +import ( + "encoding/json" +) + +// checks if the ReadOverlappingBlockResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ReadOverlappingBlockResponse{} + +// ReadOverlappingBlockResponse The response format to retrieve the __OverlappingBlock__ object. +type ReadOverlappingBlockResponse struct { + // The OverlappingBlock object. + Result *OverlappingBlock `json:"result,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _ReadOverlappingBlockResponse ReadOverlappingBlockResponse + +// NewReadOverlappingBlockResponse instantiates a new ReadOverlappingBlockResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewReadOverlappingBlockResponse() *ReadOverlappingBlockResponse { + this := ReadOverlappingBlockResponse{} + return &this +} + +// NewReadOverlappingBlockResponseWithDefaults instantiates a new ReadOverlappingBlockResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewReadOverlappingBlockResponseWithDefaults() *ReadOverlappingBlockResponse { + this := ReadOverlappingBlockResponse{} + return &this +} + +// GetResult returns the Result field value if set, zero value otherwise. +func (o *ReadOverlappingBlockResponse) GetResult() OverlappingBlock { + if o == nil || IsNil(o.Result) { + var ret OverlappingBlock + return ret + } + return *o.Result +} + +// GetResultOk returns a tuple with the Result field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ReadOverlappingBlockResponse) GetResultOk() (*OverlappingBlock, bool) { + if o == nil || IsNil(o.Result) { + return nil, false + } + return o.Result, true +} + +// HasResult returns a boolean if a field has been set. +func (o *ReadOverlappingBlockResponse) HasResult() bool { + if o != nil && !IsNil(o.Result) { + return true + } + + return false +} + +// SetResult gets a reference to the given OverlappingBlock and assigns it to the Result field. +func (o *ReadOverlappingBlockResponse) SetResult(v OverlappingBlock) { + o.Result = &v +} + +func (o ReadOverlappingBlockResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ReadOverlappingBlockResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Result) { + toSerialize["result"] = o.Result + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *ReadOverlappingBlockResponse) UnmarshalJSON(data []byte) (err error) { + varReadOverlappingBlockResponse := _ReadOverlappingBlockResponse{} + + err = json.Unmarshal(data, &varReadOverlappingBlockResponse) + + if err != nil { + return err + } + + *o = ReadOverlappingBlockResponse(varReadOverlappingBlockResponse) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "result") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableReadOverlappingBlockResponse struct { + value *ReadOverlappingBlockResponse + isSet bool +} + +func (v NullableReadOverlappingBlockResponse) Get() *ReadOverlappingBlockResponse { + return v.value +} + +func (v *NullableReadOverlappingBlockResponse) Set(val *ReadOverlappingBlockResponse) { + v.value = val + v.isSet = true +} + +func (v NullableReadOverlappingBlockResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableReadOverlappingBlockResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableReadOverlappingBlockResponse(val *ReadOverlappingBlockResponse) *NullableReadOverlappingBlockResponse { + return &NullableReadOverlappingBlockResponse{value: val, isSet: true} +} + +func (v NullableReadOverlappingBlockResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableReadOverlappingBlockResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/ipamfederation/model_read_reserved_block_response.go b/ipamfederation/model_read_reserved_block_response.go new file mode 100644 index 0000000..f63dd37 --- /dev/null +++ b/ipamfederation/model_read_reserved_block_response.go @@ -0,0 +1,154 @@ +/* +IPAM Federation API + +The DDI IPAM Federation application enables a SaaS administrator to manage multiple IPAM systems from one central control point CSP. + +API version: v1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package ipamfederation + +import ( + "encoding/json" +) + +// checks if the ReadReservedBlockResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ReadReservedBlockResponse{} + +// ReadReservedBlockResponse The response format to retrieve the __ReservedBlock__ object. +type ReadReservedBlockResponse struct { + // The ReservedBlock object. + Result *ReservedBlock `json:"result,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _ReadReservedBlockResponse ReadReservedBlockResponse + +// NewReadReservedBlockResponse instantiates a new ReadReservedBlockResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewReadReservedBlockResponse() *ReadReservedBlockResponse { + this := ReadReservedBlockResponse{} + return &this +} + +// NewReadReservedBlockResponseWithDefaults instantiates a new ReadReservedBlockResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewReadReservedBlockResponseWithDefaults() *ReadReservedBlockResponse { + this := ReadReservedBlockResponse{} + return &this +} + +// GetResult returns the Result field value if set, zero value otherwise. +func (o *ReadReservedBlockResponse) GetResult() ReservedBlock { + if o == nil || IsNil(o.Result) { + var ret ReservedBlock + return ret + } + return *o.Result +} + +// GetResultOk returns a tuple with the Result field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ReadReservedBlockResponse) GetResultOk() (*ReservedBlock, bool) { + if o == nil || IsNil(o.Result) { + return nil, false + } + return o.Result, true +} + +// HasResult returns a boolean if a field has been set. +func (o *ReadReservedBlockResponse) HasResult() bool { + if o != nil && !IsNil(o.Result) { + return true + } + + return false +} + +// SetResult gets a reference to the given ReservedBlock and assigns it to the Result field. +func (o *ReadReservedBlockResponse) SetResult(v ReservedBlock) { + o.Result = &v +} + +func (o ReadReservedBlockResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ReadReservedBlockResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Result) { + toSerialize["result"] = o.Result + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *ReadReservedBlockResponse) UnmarshalJSON(data []byte) (err error) { + varReadReservedBlockResponse := _ReadReservedBlockResponse{} + + err = json.Unmarshal(data, &varReadReservedBlockResponse) + + if err != nil { + return err + } + + *o = ReadReservedBlockResponse(varReadReservedBlockResponse) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "result") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableReadReservedBlockResponse struct { + value *ReadReservedBlockResponse + isSet bool +} + +func (v NullableReadReservedBlockResponse) Get() *ReadReservedBlockResponse { + return v.value +} + +func (v *NullableReadReservedBlockResponse) Set(val *ReadReservedBlockResponse) { + v.value = val + v.isSet = true +} + +func (v NullableReadReservedBlockResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableReadReservedBlockResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableReadReservedBlockResponse(val *ReadReservedBlockResponse) *NullableReadReservedBlockResponse { + return &NullableReadReservedBlockResponse{value: val, isSet: true} +} + +func (v NullableReadReservedBlockResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableReadReservedBlockResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/ipamfederation/model_reserved_block.go b/ipamfederation/model_reserved_block.go new file mode 100644 index 0000000..4aba659 --- /dev/null +++ b/ipamfederation/model_reserved_block.go @@ -0,0 +1,540 @@ +/* +IPAM Federation API + +The DDI IPAM Federation application enables a SaaS administrator to manage multiple IPAM systems from one central control point CSP. + +API version: v1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package ipamfederation + +import ( + "encoding/json" + "fmt" + "time" +) + +// checks if the ReservedBlock type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ReservedBlock{} + +// ReservedBlock A __ReservedBlock__ object (_federation/reserved_block_) is a set of contiguous IP addresses with no gap, expressed as a CIDR block. It is explicitly associated with a Federated Realm. A __ReservedBlock__ indicates an address range for which authority is expressly forbidden. Cooperating IPAM services must not make allocations in this range. +type ReservedBlock struct { + // The address field in form “a.b.c.d/n” where the “/n” may be omitted. In this case, the CIDR value must be defined in the _cidr_ field. When reading, the _address_ field is always in the form “a.b.c.d”. + Address string `json:"address"` + // The CIDR of the reserved block. This is required field, if _address_ does not specify it in its input. + Cidr *int64 `json:"cidr,omitempty"` + // The description for the reserved block. May contain 0 to 1024 characters. Can include UTF-8. + Comment *string `json:"comment,omitempty"` + // Time when the object has been created. + CreatedAt *time.Time `json:"created_at,omitempty"` + // The resource identifier. + FederatedRealm string `json:"federated_realm"` + // The resource identifier. + Id *string `json:"id,omitempty"` + // The name of the reserved block. May contain 1 to 256 characters. Can include UTF-8. + Name *string `json:"name,omitempty"` + // The resource identifier. + Parent *string `json:"parent,omitempty"` + // The type of protocol of reserved block (_ip4_ or _ip6_). + Protocol *string `json:"protocol,omitempty"` + // The tags for the reserved block in JSON format. + Tags map[string]interface{} `json:"tags,omitempty"` + // Time when the object has been updated. Equals to _created_at_ if not updated after creation. + UpdatedAt *time.Time `json:"updated_at,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _ReservedBlock ReservedBlock + +// NewReservedBlock instantiates a new ReservedBlock object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewReservedBlock(address string, federatedRealm string) *ReservedBlock { + this := ReservedBlock{} + this.Address = address + this.FederatedRealm = federatedRealm + return &this +} + +// NewReservedBlockWithDefaults instantiates a new ReservedBlock object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewReservedBlockWithDefaults() *ReservedBlock { + this := ReservedBlock{} + return &this +} + +// GetAddress returns the Address field value +func (o *ReservedBlock) GetAddress() string { + if o == nil { + var ret string + return ret + } + + return o.Address +} + +// GetAddressOk returns a tuple with the Address field value +// and a boolean to check if the value has been set. +func (o *ReservedBlock) GetAddressOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Address, true +} + +// SetAddress sets field value +func (o *ReservedBlock) SetAddress(v string) { + o.Address = v +} + +// GetCidr returns the Cidr field value if set, zero value otherwise. +func (o *ReservedBlock) GetCidr() int64 { + if o == nil || IsNil(o.Cidr) { + var ret int64 + return ret + } + return *o.Cidr +} + +// GetCidrOk returns a tuple with the Cidr field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ReservedBlock) GetCidrOk() (*int64, bool) { + if o == nil || IsNil(o.Cidr) { + return nil, false + } + return o.Cidr, true +} + +// HasCidr returns a boolean if a field has been set. +func (o *ReservedBlock) HasCidr() bool { + if o != nil && !IsNil(o.Cidr) { + return true + } + + return false +} + +// SetCidr gets a reference to the given int64 and assigns it to the Cidr field. +func (o *ReservedBlock) SetCidr(v int64) { + o.Cidr = &v +} + +// GetComment returns the Comment field value if set, zero value otherwise. +func (o *ReservedBlock) GetComment() string { + if o == nil || IsNil(o.Comment) { + var ret string + return ret + } + return *o.Comment +} + +// GetCommentOk returns a tuple with the Comment field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ReservedBlock) GetCommentOk() (*string, bool) { + if o == nil || IsNil(o.Comment) { + return nil, false + } + return o.Comment, true +} + +// HasComment returns a boolean if a field has been set. +func (o *ReservedBlock) HasComment() bool { + if o != nil && !IsNil(o.Comment) { + return true + } + + return false +} + +// SetComment gets a reference to the given string and assigns it to the Comment field. +func (o *ReservedBlock) SetComment(v string) { + o.Comment = &v +} + +// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. +func (o *ReservedBlock) GetCreatedAt() time.Time { + if o == nil || IsNil(o.CreatedAt) { + var ret time.Time + return ret + } + return *o.CreatedAt +} + +// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ReservedBlock) GetCreatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.CreatedAt) { + return nil, false + } + return o.CreatedAt, true +} + +// HasCreatedAt returns a boolean if a field has been set. +func (o *ReservedBlock) HasCreatedAt() bool { + if o != nil && !IsNil(o.CreatedAt) { + return true + } + + return false +} + +// SetCreatedAt gets a reference to the given time.Time and assigns it to the CreatedAt field. +func (o *ReservedBlock) SetCreatedAt(v time.Time) { + o.CreatedAt = &v +} + +// GetFederatedRealm returns the FederatedRealm field value +func (o *ReservedBlock) GetFederatedRealm() string { + if o == nil { + var ret string + return ret + } + + return o.FederatedRealm +} + +// GetFederatedRealmOk returns a tuple with the FederatedRealm field value +// and a boolean to check if the value has been set. +func (o *ReservedBlock) GetFederatedRealmOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.FederatedRealm, true +} + +// SetFederatedRealm sets field value +func (o *ReservedBlock) SetFederatedRealm(v string) { + o.FederatedRealm = v +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *ReservedBlock) GetId() string { + if o == nil || IsNil(o.Id) { + var ret string + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ReservedBlock) GetIdOk() (*string, bool) { + if o == nil || IsNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *ReservedBlock) HasId() bool { + if o != nil && !IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given string and assigns it to the Id field. +func (o *ReservedBlock) SetId(v string) { + o.Id = &v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *ReservedBlock) GetName() string { + if o == nil || IsNil(o.Name) { + var ret string + return ret + } + return *o.Name +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ReservedBlock) GetNameOk() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *ReservedBlock) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *ReservedBlock) SetName(v string) { + o.Name = &v +} + +// GetParent returns the Parent field value if set, zero value otherwise. +func (o *ReservedBlock) GetParent() string { + if o == nil || IsNil(o.Parent) { + var ret string + return ret + } + return *o.Parent +} + +// GetParentOk returns a tuple with the Parent field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ReservedBlock) GetParentOk() (*string, bool) { + if o == nil || IsNil(o.Parent) { + return nil, false + } + return o.Parent, true +} + +// HasParent returns a boolean if a field has been set. +func (o *ReservedBlock) HasParent() bool { + if o != nil && !IsNil(o.Parent) { + return true + } + + return false +} + +// SetParent gets a reference to the given string and assigns it to the Parent field. +func (o *ReservedBlock) SetParent(v string) { + o.Parent = &v +} + +// GetProtocol returns the Protocol field value if set, zero value otherwise. +func (o *ReservedBlock) GetProtocol() string { + if o == nil || IsNil(o.Protocol) { + var ret string + return ret + } + return *o.Protocol +} + +// GetProtocolOk returns a tuple with the Protocol field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ReservedBlock) GetProtocolOk() (*string, bool) { + if o == nil || IsNil(o.Protocol) { + return nil, false + } + return o.Protocol, true +} + +// HasProtocol returns a boolean if a field has been set. +func (o *ReservedBlock) HasProtocol() bool { + if o != nil && !IsNil(o.Protocol) { + return true + } + + return false +} + +// SetProtocol gets a reference to the given string and assigns it to the Protocol field. +func (o *ReservedBlock) SetProtocol(v string) { + o.Protocol = &v +} + +// GetTags returns the Tags field value if set, zero value otherwise. +func (o *ReservedBlock) GetTags() map[string]interface{} { + if o == nil || IsNil(o.Tags) { + var ret map[string]interface{} + return ret + } + return o.Tags +} + +// GetTagsOk returns a tuple with the Tags field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ReservedBlock) GetTagsOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.Tags) { + return map[string]interface{}{}, false + } + return o.Tags, true +} + +// HasTags returns a boolean if a field has been set. +func (o *ReservedBlock) HasTags() bool { + if o != nil && !IsNil(o.Tags) { + return true + } + + return false +} + +// SetTags gets a reference to the given map[string]interface{} and assigns it to the Tags field. +func (o *ReservedBlock) SetTags(v map[string]interface{}) { + o.Tags = v +} + +// GetUpdatedAt returns the UpdatedAt field value if set, zero value otherwise. +func (o *ReservedBlock) GetUpdatedAt() time.Time { + if o == nil || IsNil(o.UpdatedAt) { + var ret time.Time + return ret + } + return *o.UpdatedAt +} + +// GetUpdatedAtOk returns a tuple with the UpdatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ReservedBlock) GetUpdatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.UpdatedAt) { + return nil, false + } + return o.UpdatedAt, true +} + +// HasUpdatedAt returns a boolean if a field has been set. +func (o *ReservedBlock) HasUpdatedAt() bool { + if o != nil && !IsNil(o.UpdatedAt) { + return true + } + + return false +} + +// SetUpdatedAt gets a reference to the given time.Time and assigns it to the UpdatedAt field. +func (o *ReservedBlock) SetUpdatedAt(v time.Time) { + o.UpdatedAt = &v +} + +func (o ReservedBlock) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ReservedBlock) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["address"] = o.Address + if !IsNil(o.Cidr) { + toSerialize["cidr"] = o.Cidr + } + if !IsNil(o.Comment) { + toSerialize["comment"] = o.Comment + } + if !IsNil(o.CreatedAt) { + toSerialize["created_at"] = o.CreatedAt + } + toSerialize["federated_realm"] = o.FederatedRealm + if !IsNil(o.Id) { + toSerialize["id"] = o.Id + } + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.Parent) { + toSerialize["parent"] = o.Parent + } + if !IsNil(o.Protocol) { + toSerialize["protocol"] = o.Protocol + } + if !IsNil(o.Tags) { + toSerialize["tags"] = o.Tags + } + if !IsNil(o.UpdatedAt) { + toSerialize["updated_at"] = o.UpdatedAt + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *ReservedBlock) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "address", + "federated_realm", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varReservedBlock := _ReservedBlock{} + + err = json.Unmarshal(data, &varReservedBlock) + + if err != nil { + return err + } + + *o = ReservedBlock(varReservedBlock) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "address") + delete(additionalProperties, "cidr") + delete(additionalProperties, "comment") + delete(additionalProperties, "created_at") + delete(additionalProperties, "federated_realm") + delete(additionalProperties, "id") + delete(additionalProperties, "name") + delete(additionalProperties, "parent") + delete(additionalProperties, "protocol") + delete(additionalProperties, "tags") + delete(additionalProperties, "updated_at") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableReservedBlock struct { + value *ReservedBlock + isSet bool +} + +func (v NullableReservedBlock) Get() *ReservedBlock { + return v.value +} + +func (v *NullableReservedBlock) Set(val *ReservedBlock) { + v.value = val + v.isSet = true +} + +func (v NullableReservedBlock) IsSet() bool { + return v.isSet +} + +func (v *NullableReservedBlock) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableReservedBlock(val *ReservedBlock) *NullableReservedBlock { + return &NullableReservedBlock{value: val, isSet: true} +} + +func (v NullableReservedBlock) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableReservedBlock) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/ipamfederation/model_update_federated_block_response.go b/ipamfederation/model_update_federated_block_response.go new file mode 100644 index 0000000..d7356dd --- /dev/null +++ b/ipamfederation/model_update_federated_block_response.go @@ -0,0 +1,154 @@ +/* +IPAM Federation API + +The DDI IPAM Federation application enables a SaaS administrator to manage multiple IPAM systems from one central control point CSP. + +API version: v1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package ipamfederation + +import ( + "encoding/json" +) + +// checks if the UpdateFederatedBlockResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &UpdateFederatedBlockResponse{} + +// UpdateFederatedBlockResponse The response format to update the __FederatedBlock__ object. +type UpdateFederatedBlockResponse struct { + // The FederatedBlock object. + Result *FederatedBlock `json:"result,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _UpdateFederatedBlockResponse UpdateFederatedBlockResponse + +// NewUpdateFederatedBlockResponse instantiates a new UpdateFederatedBlockResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewUpdateFederatedBlockResponse() *UpdateFederatedBlockResponse { + this := UpdateFederatedBlockResponse{} + return &this +} + +// NewUpdateFederatedBlockResponseWithDefaults instantiates a new UpdateFederatedBlockResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewUpdateFederatedBlockResponseWithDefaults() *UpdateFederatedBlockResponse { + this := UpdateFederatedBlockResponse{} + return &this +} + +// GetResult returns the Result field value if set, zero value otherwise. +func (o *UpdateFederatedBlockResponse) GetResult() FederatedBlock { + if o == nil || IsNil(o.Result) { + var ret FederatedBlock + return ret + } + return *o.Result +} + +// GetResultOk returns a tuple with the Result field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdateFederatedBlockResponse) GetResultOk() (*FederatedBlock, bool) { + if o == nil || IsNil(o.Result) { + return nil, false + } + return o.Result, true +} + +// HasResult returns a boolean if a field has been set. +func (o *UpdateFederatedBlockResponse) HasResult() bool { + if o != nil && !IsNil(o.Result) { + return true + } + + return false +} + +// SetResult gets a reference to the given FederatedBlock and assigns it to the Result field. +func (o *UpdateFederatedBlockResponse) SetResult(v FederatedBlock) { + o.Result = &v +} + +func (o UpdateFederatedBlockResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o UpdateFederatedBlockResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Result) { + toSerialize["result"] = o.Result + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *UpdateFederatedBlockResponse) UnmarshalJSON(data []byte) (err error) { + varUpdateFederatedBlockResponse := _UpdateFederatedBlockResponse{} + + err = json.Unmarshal(data, &varUpdateFederatedBlockResponse) + + if err != nil { + return err + } + + *o = UpdateFederatedBlockResponse(varUpdateFederatedBlockResponse) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "result") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableUpdateFederatedBlockResponse struct { + value *UpdateFederatedBlockResponse + isSet bool +} + +func (v NullableUpdateFederatedBlockResponse) Get() *UpdateFederatedBlockResponse { + return v.value +} + +func (v *NullableUpdateFederatedBlockResponse) Set(val *UpdateFederatedBlockResponse) { + v.value = val + v.isSet = true +} + +func (v NullableUpdateFederatedBlockResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableUpdateFederatedBlockResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableUpdateFederatedBlockResponse(val *UpdateFederatedBlockResponse) *NullableUpdateFederatedBlockResponse { + return &NullableUpdateFederatedBlockResponse{value: val, isSet: true} +} + +func (v NullableUpdateFederatedBlockResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableUpdateFederatedBlockResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/ipamfederation/model_update_federated_realm_response.go b/ipamfederation/model_update_federated_realm_response.go new file mode 100644 index 0000000..add01ca --- /dev/null +++ b/ipamfederation/model_update_federated_realm_response.go @@ -0,0 +1,154 @@ +/* +IPAM Federation API + +The DDI IPAM Federation application enables a SaaS administrator to manage multiple IPAM systems from one central control point CSP. + +API version: v1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package ipamfederation + +import ( + "encoding/json" +) + +// checks if the UpdateFederatedRealmResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &UpdateFederatedRealmResponse{} + +// UpdateFederatedRealmResponse The response format to update the __FederatedRealm__ object. +type UpdateFederatedRealmResponse struct { + // The FederatedRealm object. + Result *FederatedRealm `json:"result,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _UpdateFederatedRealmResponse UpdateFederatedRealmResponse + +// NewUpdateFederatedRealmResponse instantiates a new UpdateFederatedRealmResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewUpdateFederatedRealmResponse() *UpdateFederatedRealmResponse { + this := UpdateFederatedRealmResponse{} + return &this +} + +// NewUpdateFederatedRealmResponseWithDefaults instantiates a new UpdateFederatedRealmResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewUpdateFederatedRealmResponseWithDefaults() *UpdateFederatedRealmResponse { + this := UpdateFederatedRealmResponse{} + return &this +} + +// GetResult returns the Result field value if set, zero value otherwise. +func (o *UpdateFederatedRealmResponse) GetResult() FederatedRealm { + if o == nil || IsNil(o.Result) { + var ret FederatedRealm + return ret + } + return *o.Result +} + +// GetResultOk returns a tuple with the Result field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdateFederatedRealmResponse) GetResultOk() (*FederatedRealm, bool) { + if o == nil || IsNil(o.Result) { + return nil, false + } + return o.Result, true +} + +// HasResult returns a boolean if a field has been set. +func (o *UpdateFederatedRealmResponse) HasResult() bool { + if o != nil && !IsNil(o.Result) { + return true + } + + return false +} + +// SetResult gets a reference to the given FederatedRealm and assigns it to the Result field. +func (o *UpdateFederatedRealmResponse) SetResult(v FederatedRealm) { + o.Result = &v +} + +func (o UpdateFederatedRealmResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o UpdateFederatedRealmResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Result) { + toSerialize["result"] = o.Result + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *UpdateFederatedRealmResponse) UnmarshalJSON(data []byte) (err error) { + varUpdateFederatedRealmResponse := _UpdateFederatedRealmResponse{} + + err = json.Unmarshal(data, &varUpdateFederatedRealmResponse) + + if err != nil { + return err + } + + *o = UpdateFederatedRealmResponse(varUpdateFederatedRealmResponse) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "result") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableUpdateFederatedRealmResponse struct { + value *UpdateFederatedRealmResponse + isSet bool +} + +func (v NullableUpdateFederatedRealmResponse) Get() *UpdateFederatedRealmResponse { + return v.value +} + +func (v *NullableUpdateFederatedRealmResponse) Set(val *UpdateFederatedRealmResponse) { + v.value = val + v.isSet = true +} + +func (v NullableUpdateFederatedRealmResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableUpdateFederatedRealmResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableUpdateFederatedRealmResponse(val *UpdateFederatedRealmResponse) *NullableUpdateFederatedRealmResponse { + return &NullableUpdateFederatedRealmResponse{value: val, isSet: true} +} + +func (v NullableUpdateFederatedRealmResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableUpdateFederatedRealmResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/ipamfederation/model_update_overlapping_block_response.go b/ipamfederation/model_update_overlapping_block_response.go new file mode 100644 index 0000000..7fb1305 --- /dev/null +++ b/ipamfederation/model_update_overlapping_block_response.go @@ -0,0 +1,154 @@ +/* +IPAM Federation API + +The DDI IPAM Federation application enables a SaaS administrator to manage multiple IPAM systems from one central control point CSP. + +API version: v1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package ipamfederation + +import ( + "encoding/json" +) + +// checks if the UpdateOverlappingBlockResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &UpdateOverlappingBlockResponse{} + +// UpdateOverlappingBlockResponse The response format to update the __OverlappingBlock__ object. +type UpdateOverlappingBlockResponse struct { + // The OverlappingBlock object. + Result *OverlappingBlock `json:"result,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _UpdateOverlappingBlockResponse UpdateOverlappingBlockResponse + +// NewUpdateOverlappingBlockResponse instantiates a new UpdateOverlappingBlockResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewUpdateOverlappingBlockResponse() *UpdateOverlappingBlockResponse { + this := UpdateOverlappingBlockResponse{} + return &this +} + +// NewUpdateOverlappingBlockResponseWithDefaults instantiates a new UpdateOverlappingBlockResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewUpdateOverlappingBlockResponseWithDefaults() *UpdateOverlappingBlockResponse { + this := UpdateOverlappingBlockResponse{} + return &this +} + +// GetResult returns the Result field value if set, zero value otherwise. +func (o *UpdateOverlappingBlockResponse) GetResult() OverlappingBlock { + if o == nil || IsNil(o.Result) { + var ret OverlappingBlock + return ret + } + return *o.Result +} + +// GetResultOk returns a tuple with the Result field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdateOverlappingBlockResponse) GetResultOk() (*OverlappingBlock, bool) { + if o == nil || IsNil(o.Result) { + return nil, false + } + return o.Result, true +} + +// HasResult returns a boolean if a field has been set. +func (o *UpdateOverlappingBlockResponse) HasResult() bool { + if o != nil && !IsNil(o.Result) { + return true + } + + return false +} + +// SetResult gets a reference to the given OverlappingBlock and assigns it to the Result field. +func (o *UpdateOverlappingBlockResponse) SetResult(v OverlappingBlock) { + o.Result = &v +} + +func (o UpdateOverlappingBlockResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o UpdateOverlappingBlockResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Result) { + toSerialize["result"] = o.Result + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *UpdateOverlappingBlockResponse) UnmarshalJSON(data []byte) (err error) { + varUpdateOverlappingBlockResponse := _UpdateOverlappingBlockResponse{} + + err = json.Unmarshal(data, &varUpdateOverlappingBlockResponse) + + if err != nil { + return err + } + + *o = UpdateOverlappingBlockResponse(varUpdateOverlappingBlockResponse) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "result") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableUpdateOverlappingBlockResponse struct { + value *UpdateOverlappingBlockResponse + isSet bool +} + +func (v NullableUpdateOverlappingBlockResponse) Get() *UpdateOverlappingBlockResponse { + return v.value +} + +func (v *NullableUpdateOverlappingBlockResponse) Set(val *UpdateOverlappingBlockResponse) { + v.value = val + v.isSet = true +} + +func (v NullableUpdateOverlappingBlockResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableUpdateOverlappingBlockResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableUpdateOverlappingBlockResponse(val *UpdateOverlappingBlockResponse) *NullableUpdateOverlappingBlockResponse { + return &NullableUpdateOverlappingBlockResponse{value: val, isSet: true} +} + +func (v NullableUpdateOverlappingBlockResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableUpdateOverlappingBlockResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/ipamfederation/model_update_reserved_block_response.go b/ipamfederation/model_update_reserved_block_response.go new file mode 100644 index 0000000..119305b --- /dev/null +++ b/ipamfederation/model_update_reserved_block_response.go @@ -0,0 +1,154 @@ +/* +IPAM Federation API + +The DDI IPAM Federation application enables a SaaS administrator to manage multiple IPAM systems from one central control point CSP. + +API version: v1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package ipamfederation + +import ( + "encoding/json" +) + +// checks if the UpdateReservedBlockResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &UpdateReservedBlockResponse{} + +// UpdateReservedBlockResponse The response format to update the __ReservedBlock__ object. +type UpdateReservedBlockResponse struct { + // The ReservedBlock object. + Result *ReservedBlock `json:"result,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _UpdateReservedBlockResponse UpdateReservedBlockResponse + +// NewUpdateReservedBlockResponse instantiates a new UpdateReservedBlockResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewUpdateReservedBlockResponse() *UpdateReservedBlockResponse { + this := UpdateReservedBlockResponse{} + return &this +} + +// NewUpdateReservedBlockResponseWithDefaults instantiates a new UpdateReservedBlockResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewUpdateReservedBlockResponseWithDefaults() *UpdateReservedBlockResponse { + this := UpdateReservedBlockResponse{} + return &this +} + +// GetResult returns the Result field value if set, zero value otherwise. +func (o *UpdateReservedBlockResponse) GetResult() ReservedBlock { + if o == nil || IsNil(o.Result) { + var ret ReservedBlock + return ret + } + return *o.Result +} + +// GetResultOk returns a tuple with the Result field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdateReservedBlockResponse) GetResultOk() (*ReservedBlock, bool) { + if o == nil || IsNil(o.Result) { + return nil, false + } + return o.Result, true +} + +// HasResult returns a boolean if a field has been set. +func (o *UpdateReservedBlockResponse) HasResult() bool { + if o != nil && !IsNil(o.Result) { + return true + } + + return false +} + +// SetResult gets a reference to the given ReservedBlock and assigns it to the Result field. +func (o *UpdateReservedBlockResponse) SetResult(v ReservedBlock) { + o.Result = &v +} + +func (o UpdateReservedBlockResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o UpdateReservedBlockResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Result) { + toSerialize["result"] = o.Result + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *UpdateReservedBlockResponse) UnmarshalJSON(data []byte) (err error) { + varUpdateReservedBlockResponse := _UpdateReservedBlockResponse{} + + err = json.Unmarshal(data, &varUpdateReservedBlockResponse) + + if err != nil { + return err + } + + *o = UpdateReservedBlockResponse(varUpdateReservedBlockResponse) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "result") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableUpdateReservedBlockResponse struct { + value *UpdateReservedBlockResponse + isSet bool +} + +func (v NullableUpdateReservedBlockResponse) Get() *UpdateReservedBlockResponse { + return v.value +} + +func (v *NullableUpdateReservedBlockResponse) Set(val *UpdateReservedBlockResponse) { + v.value = val + v.isSet = true +} + +func (v NullableUpdateReservedBlockResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableUpdateReservedBlockResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableUpdateReservedBlockResponse(val *UpdateReservedBlockResponse) *NullableUpdateReservedBlockResponse { + return &NullableUpdateReservedBlockResponse{value: val, isSet: true} +} + +func (v NullableUpdateReservedBlockResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableUpdateReservedBlockResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/ipamfederation/test/api_federated_block_test.go b/ipamfederation/test/api_federated_block_test.go new file mode 100644 index 0000000..0f7714f --- /dev/null +++ b/ipamfederation/test/api_federated_block_test.go @@ -0,0 +1,91 @@ +/* +IPAM Federation API + +Testing FederatedBlockAPIService + +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); + +package ipamfederation + +import ( + "context" + "testing" + + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + + "github.com/infobloxopen/bloxone-go-client/ipamfederation" +) + +func TestFederatedBlockAPIService(t *testing.T) { + + apiClient := ipamfederation.NewAPIClient() + + t.Run("Test FederatedBlockAPIService Create", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.FederatedBlockAPI.Create(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test FederatedBlockAPIService Delete", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var id string + + httpRes, err := apiClient.FederatedBlockAPI.Delete(context.Background(), id).Execute() + + require.Nil(t, err) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test FederatedBlockAPIService List", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.FederatedBlockAPI.List(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test FederatedBlockAPIService Read", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var id string + + resp, httpRes, err := apiClient.FederatedBlockAPI.Read(context.Background(), id).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test FederatedBlockAPIService Update", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var id string + + resp, httpRes, err := apiClient.FederatedBlockAPI.Update(context.Background(), id).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + +} diff --git a/ipamfederation/test/api_federated_realm_test.go b/ipamfederation/test/api_federated_realm_test.go new file mode 100644 index 0000000..846a899 --- /dev/null +++ b/ipamfederation/test/api_federated_realm_test.go @@ -0,0 +1,91 @@ +/* +IPAM Federation API + +Testing FederatedRealmAPIService + +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); + +package ipamfederation + +import ( + "context" + "testing" + + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + + "github.com/infobloxopen/bloxone-go-client/ipamfederation" +) + +func TestFederatedRealmAPIService(t *testing.T) { + + apiClient := ipamfederation.NewAPIClient() + + t.Run("Test FederatedRealmAPIService Create", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.FederatedRealmAPI.Create(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test FederatedRealmAPIService Delete", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var id string + + httpRes, err := apiClient.FederatedRealmAPI.Delete(context.Background(), id).Execute() + + require.Nil(t, err) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test FederatedRealmAPIService List", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.FederatedRealmAPI.List(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test FederatedRealmAPIService Read", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var id string + + resp, httpRes, err := apiClient.FederatedRealmAPI.Read(context.Background(), id).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test FederatedRealmAPIService Update", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var id string + + resp, httpRes, err := apiClient.FederatedRealmAPI.Update(context.Background(), id).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + +} diff --git a/ipamfederation/test/api_next_available_federated_block_test.go b/ipamfederation/test/api_next_available_federated_block_test.go new file mode 100644 index 0000000..6bdd6be --- /dev/null +++ b/ipamfederation/test/api_next_available_federated_block_test.go @@ -0,0 +1,82 @@ +/* +IPAM Federation API + +Testing NextAvailableFederatedBlockAPIService + +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); + +package ipamfederation + +import ( + "context" + "testing" + + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + + "github.com/infobloxopen/bloxone-go-client/ipamfederation" +) + +func TestNextAvailableFederatedBlockAPIService(t *testing.T) { + + apiClient := ipamfederation.NewAPIClient() + + t.Run("Test NextAvailableFederatedBlockAPIService CreateNextAvailableFederatedBlocks", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var id string + + resp, httpRes, err := apiClient.NextAvailableFederatedBlockAPI.CreateNextAvailableFederatedBlocks(context.Background(), id).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test NextAvailableFederatedBlockAPIService CreateNextAvailableOverlappingBlocks", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var id string + + resp, httpRes, err := apiClient.NextAvailableFederatedBlockAPI.CreateNextAvailableOverlappingBlocks(context.Background(), id).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test NextAvailableFederatedBlockAPIService CreateNextAvailableReservedBlocks", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var id string + + resp, httpRes, err := apiClient.NextAvailableFederatedBlockAPI.CreateNextAvailableReservedBlocks(context.Background(), id).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test NextAvailableFederatedBlockAPIService ListNextAvailableFederatedBlocks", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var id string + + resp, httpRes, err := apiClient.NextAvailableFederatedBlockAPI.ListNextAvailableFederatedBlocks(context.Background(), id).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + +} diff --git a/ipamfederation/test/api_next_available_overlapping_block_test.go b/ipamfederation/test/api_next_available_overlapping_block_test.go new file mode 100644 index 0000000..b856b70 --- /dev/null +++ b/ipamfederation/test/api_next_available_overlapping_block_test.go @@ -0,0 +1,40 @@ +/* +IPAM Federation API + +Testing NextAvailableOverlappingBlockAPIService + +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); + +package ipamfederation + +import ( + "context" + "testing" + + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + + "github.com/infobloxopen/bloxone-go-client/ipamfederation" +) + +func TestNextAvailableOverlappingBlockAPIService(t *testing.T) { + + apiClient := ipamfederation.NewAPIClient() + + t.Run("Test NextAvailableOverlappingBlockAPIService ListNextAvailableOverlappingBlocks", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var id string + + resp, httpRes, err := apiClient.NextAvailableOverlappingBlockAPI.ListNextAvailableOverlappingBlocks(context.Background(), id).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + +} diff --git a/ipamfederation/test/api_next_available_reserved_block_test.go b/ipamfederation/test/api_next_available_reserved_block_test.go new file mode 100644 index 0000000..1c872df --- /dev/null +++ b/ipamfederation/test/api_next_available_reserved_block_test.go @@ -0,0 +1,40 @@ +/* +IPAM Federation API + +Testing NextAvailableReservedBlockAPIService + +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); + +package ipamfederation + +import ( + "context" + "testing" + + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + + "github.com/infobloxopen/bloxone-go-client/ipamfederation" +) + +func TestNextAvailableReservedBlockAPIService(t *testing.T) { + + apiClient := ipamfederation.NewAPIClient() + + t.Run("Test NextAvailableReservedBlockAPIService ListNextAvailableReservedBlocks", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var id string + + resp, httpRes, err := apiClient.NextAvailableReservedBlockAPI.ListNextAvailableReservedBlocks(context.Background(), id).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + +} diff --git a/ipamfederation/test/api_overlapping_block_test.go b/ipamfederation/test/api_overlapping_block_test.go new file mode 100644 index 0000000..72051f3 --- /dev/null +++ b/ipamfederation/test/api_overlapping_block_test.go @@ -0,0 +1,91 @@ +/* +IPAM Federation API + +Testing OverlappingBlockAPIService + +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); + +package ipamfederation + +import ( + "context" + "testing" + + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + + "github.com/infobloxopen/bloxone-go-client/ipamfederation" +) + +func TestOverlappingBlockAPIService(t *testing.T) { + + apiClient := ipamfederation.NewAPIClient() + + t.Run("Test OverlappingBlockAPIService Create", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.OverlappingBlockAPI.Create(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test OverlappingBlockAPIService Delete", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var id string + + httpRes, err := apiClient.OverlappingBlockAPI.Delete(context.Background(), id).Execute() + + require.Nil(t, err) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test OverlappingBlockAPIService List", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.OverlappingBlockAPI.List(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test OverlappingBlockAPIService Read", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var id string + + resp, httpRes, err := apiClient.OverlappingBlockAPI.Read(context.Background(), id).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test OverlappingBlockAPIService Update", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var id string + + resp, httpRes, err := apiClient.OverlappingBlockAPI.Update(context.Background(), id).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + +} diff --git a/ipamfederation/test/api_reserved_block_test.go b/ipamfederation/test/api_reserved_block_test.go new file mode 100644 index 0000000..555e2df --- /dev/null +++ b/ipamfederation/test/api_reserved_block_test.go @@ -0,0 +1,91 @@ +/* +IPAM Federation API + +Testing ReservedBlockAPIService + +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); + +package ipamfederation + +import ( + "context" + "testing" + + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + + "github.com/infobloxopen/bloxone-go-client/ipamfederation" +) + +func TestReservedBlockAPIService(t *testing.T) { + + apiClient := ipamfederation.NewAPIClient() + + t.Run("Test ReservedBlockAPIService Create", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.ReservedBlockAPI.Create(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test ReservedBlockAPIService Delete", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var id string + + httpRes, err := apiClient.ReservedBlockAPI.Delete(context.Background(), id).Execute() + + require.Nil(t, err) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test ReservedBlockAPIService List", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.ReservedBlockAPI.List(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test ReservedBlockAPIService Read", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var id string + + resp, httpRes, err := apiClient.ReservedBlockAPI.Read(context.Background(), id).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test ReservedBlockAPIService Update", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var id string + + resp, httpRes, err := apiClient.ReservedBlockAPI.Update(context.Background(), id).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + +} diff --git a/ipamfederation/utils.go b/ipamfederation/utils.go new file mode 100644 index 0000000..6118b63 --- /dev/null +++ b/ipamfederation/utils.go @@ -0,0 +1,347 @@ +/* +IPAM Federation API + +The DDI IPAM Federation application enables a SaaS administrator to manage multiple IPAM systems from one central control point CSP. + +API version: v1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package ipamfederation + +import ( + "encoding/json" + "reflect" + "time" +) + +// PtrBool is a helper routine that returns a pointer to given boolean value. +func PtrBool(v bool) *bool { return &v } + +// PtrInt is a helper routine that returns a pointer to given integer value. +func PtrInt(v int) *int { return &v } + +// PtrInt32 is a helper routine that returns a pointer to given integer value. +func PtrInt32(v int32) *int32 { return &v } + +// PtrInt64 is a helper routine that returns a pointer to given integer value. +func PtrInt64(v int64) *int64 { return &v } + +// PtrFloat32 is a helper routine that returns a pointer to given float value. +func PtrFloat32(v float32) *float32 { return &v } + +// PtrFloat64 is a helper routine that returns a pointer to given float value. +func PtrFloat64(v float64) *float64 { return &v } + +// PtrString is a helper routine that returns a pointer to given string value. +func PtrString(v string) *string { return &v } + +// PtrTime is helper routine that returns a pointer to given Time value. +func PtrTime(v time.Time) *time.Time { return &v } + +type NullableBool struct { + value *bool + isSet bool +} + +func (v NullableBool) Get() *bool { + return v.value +} + +func (v *NullableBool) Set(val *bool) { + v.value = val + v.isSet = true +} + +func (v NullableBool) IsSet() bool { + return v.isSet +} + +func (v *NullableBool) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableBool(val *bool) *NullableBool { + return &NullableBool{value: val, isSet: true} +} + +func (v NullableBool) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableBool) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + +type NullableInt struct { + value *int + isSet bool +} + +func (v NullableInt) Get() *int { + return v.value +} + +func (v *NullableInt) Set(val *int) { + v.value = val + v.isSet = true +} + +func (v NullableInt) IsSet() bool { + return v.isSet +} + +func (v *NullableInt) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableInt(val *int) *NullableInt { + return &NullableInt{value: val, isSet: true} +} + +func (v NullableInt) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableInt) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + +type NullableInt32 struct { + value *int32 + isSet bool +} + +func (v NullableInt32) Get() *int32 { + return v.value +} + +func (v *NullableInt32) Set(val *int32) { + v.value = val + v.isSet = true +} + +func (v NullableInt32) IsSet() bool { + return v.isSet +} + +func (v *NullableInt32) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableInt32(val *int32) *NullableInt32 { + return &NullableInt32{value: val, isSet: true} +} + +func (v NullableInt32) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableInt32) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + +type NullableInt64 struct { + value *int64 + isSet bool +} + +func (v NullableInt64) Get() *int64 { + return v.value +} + +func (v *NullableInt64) Set(val *int64) { + v.value = val + v.isSet = true +} + +func (v NullableInt64) IsSet() bool { + return v.isSet +} + +func (v *NullableInt64) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableInt64(val *int64) *NullableInt64 { + return &NullableInt64{value: val, isSet: true} +} + +func (v NullableInt64) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableInt64) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + +type NullableFloat32 struct { + value *float32 + isSet bool +} + +func (v NullableFloat32) Get() *float32 { + return v.value +} + +func (v *NullableFloat32) Set(val *float32) { + v.value = val + v.isSet = true +} + +func (v NullableFloat32) IsSet() bool { + return v.isSet +} + +func (v *NullableFloat32) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableFloat32(val *float32) *NullableFloat32 { + return &NullableFloat32{value: val, isSet: true} +} + +func (v NullableFloat32) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableFloat32) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + +type NullableFloat64 struct { + value *float64 + isSet bool +} + +func (v NullableFloat64) Get() *float64 { + return v.value +} + +func (v *NullableFloat64) Set(val *float64) { + v.value = val + v.isSet = true +} + +func (v NullableFloat64) IsSet() bool { + return v.isSet +} + +func (v *NullableFloat64) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableFloat64(val *float64) *NullableFloat64 { + return &NullableFloat64{value: val, isSet: true} +} + +func (v NullableFloat64) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableFloat64) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + +type NullableString struct { + value *string + isSet bool +} + +func (v NullableString) Get() *string { + return v.value +} + +func (v *NullableString) Set(val *string) { + v.value = val + v.isSet = true +} + +func (v NullableString) IsSet() bool { + return v.isSet +} + +func (v *NullableString) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableString(val *string) *NullableString { + return &NullableString{value: val, isSet: true} +} + +func (v NullableString) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableString) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + +type NullableTime struct { + value *time.Time + isSet bool +} + +func (v NullableTime) Get() *time.Time { + return v.value +} + +func (v *NullableTime) Set(val *time.Time) { + v.value = val + v.isSet = true +} + +func (v NullableTime) IsSet() bool { + return v.isSet +} + +func (v *NullableTime) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTime(val *time.Time) *NullableTime { + return &NullableTime{value: val, isSet: true} +} + +func (v NullableTime) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTime) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + +// IsNil checks if an input is nil +func IsNil(i interface{}) bool { + if i == nil { + return true + } + switch reflect.TypeOf(i).Kind() { + case reflect.Chan, reflect.Func, reflect.Map, reflect.Ptr, reflect.UnsafePointer, reflect.Interface, reflect.Slice: + return reflect.ValueOf(i).IsNil() + case reflect.Array: + return reflect.ValueOf(i).IsZero() + } + return false +} + +type MappedNullable interface { + ToMap() (map[string]interface{}, error) +} From 20352191d0d1be927412b53a9dd9c1c17028e162 Mon Sep 17 00:00:00 2001 From: Anil Gadiyar Date: Wed, 28 Aug 2024 17:58:43 +0530 Subject: [PATCH 2/3] Generated schemas for ipam-federation in go client --- client/client.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/client/client.go b/client/client.go index a68782d..18959f7 100644 --- a/client/client.go +++ b/client/client.go @@ -9,6 +9,7 @@ import ( "github.com/infobloxopen/bloxone-go-client/inframgmt" "github.com/infobloxopen/bloxone-go-client/infraprovision" "github.com/infobloxopen/bloxone-go-client/ipam" + "github.com/infobloxopen/bloxone-go-client/ipamfederation" "github.com/infobloxopen/bloxone-go-client/keys" "github.com/infobloxopen/bloxone-go-client/option" "github.com/infobloxopen/bloxone-go-client/redirect" @@ -18,6 +19,7 @@ import ( // APIClient is an aggregation of different BloxOne API clients. type APIClient struct { IPAddressManagementAPI *ipam.APIClient + IPAMFederation *ipamfederation.APIClient DNSConfigurationAPI *dnsconfig.APIClient DNSDataAPI *dnsdata.APIClient HostActivationAPI *infraprovision.APIClient @@ -34,6 +36,7 @@ type APIClient struct { // This is an aggregation of different BloxOne API clients. // The following clients are available: // - IPAddressManagementAPI +// - IPAMFederation // - DNSConfigurationAPI // - DNSDataAPI // - HostActivationAPI @@ -54,6 +57,7 @@ type APIClient struct { func NewAPIClient(options ...option.ClientOption) *APIClient { return &APIClient{ IPAddressManagementAPI: ipam.NewAPIClient(options...), + IPAMFederation: ipamfederation.NewAPIClient(options...), DNSConfigurationAPI: dnsconfig.NewAPIClient(options...), DNSDataAPI: dnsdata.NewAPIClient(options...), HostActivationAPI: infraprovision.NewAPIClient(options...), From cde03ae21e36b249ea9a9fecd7b18b98635458f3 Mon Sep 17 00:00:00 2001 From: Anil Gadiyar Date: Fri, 30 Aug 2024 22:07:37 +0530 Subject: [PATCH 3/3] fixed PR comment on go generated, added required feild in --- ipamfederation/.openapi-generator/FILES | 8 --- ipamfederation/README.md | 2 +- ipamfederation/api/openapi.yaml | 9 ++- ipamfederation/docs/FederatedBlock.md | 9 +-- ipamfederation/docs/FederatedBlockAPI.md | 6 +- ipamfederation/docs/FederatedRealmAPI.md | 2 +- .../docs/NextAvailableFederatedBlockAPI.md | 2 +- .../docs/NextAvailableOverlappingBlockAPI.md | 2 +- .../docs/NextAvailableReservedBlockAPI.md | 2 +- ipamfederation/docs/OverlappingBlockAPI.md | 2 +- ipamfederation/docs/ReservedBlockAPI.md | 2 +- ipamfederation/model_federated_block.go | 57 ++++++++++++------- 12 files changed, 55 insertions(+), 48 deletions(-) diff --git a/ipamfederation/.openapi-generator/FILES b/ipamfederation/.openapi-generator/FILES index 56f19c7..60574f7 100644 --- a/ipamfederation/.openapi-generator/FILES +++ b/ipamfederation/.openapi-generator/FILES @@ -1,4 +1,3 @@ -.openapi-generator-ignore README.md api/openapi.yaml api_federated_block.go @@ -72,11 +71,4 @@ model_update_federated_block_response.go model_update_federated_realm_response.go model_update_overlapping_block_response.go model_update_reserved_block_response.go -test/api_federated_block_test.go -test/api_federated_realm_test.go -test/api_next_available_federated_block_test.go -test/api_next_available_overlapping_block_test.go -test/api_next_available_reserved_block_test.go -test/api_overlapping_block_test.go -test/api_reserved_block_test.go utils.go diff --git a/ipamfederation/README.md b/ipamfederation/README.md index 20fea11..8f9eb14 100644 --- a/ipamfederation/README.md +++ b/ipamfederation/README.md @@ -83,7 +83,7 @@ This will add the tags `tag1=value1` and `tag2=value2` to all API requests that ## Documentation for API Endpoints -All URIs are relative to */api/ddi/v1* +All URIs are relative to *http://csp.infoblox.com/api/ddi/v1* Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- diff --git a/ipamfederation/api/openapi.yaml b/ipamfederation/api/openapi.yaml index 08894db..ded6af5 100644 --- a/ipamfederation/api/openapi.yaml +++ b/ipamfederation/api/openapi.yaml @@ -5,7 +5,8 @@ info: title: IPAM Federation API version: v1 servers: -- url: /api/ddi/v1 +- url: http://csp.infoblox.com/api/ddi/v1 +- url: https://csp.infoblox.com/api/ddi/v1 security: - ApiKeyAuth: [] paths: @@ -123,6 +124,8 @@ paths: summary: Create the federated block. tags: - federated_block + x-tf-resource: federated_block + x-tf-datasource: federated_blocks x-sdk-default-tags: true x-codegen-request-body-name: body /federation/federated_block/{id}: @@ -557,6 +560,8 @@ paths: summary: Create the federated realm. tags: - federated_realm + x-tf-resource: federated_realm + x-tf-datasource: federated_realms x-sdk-default-tags: true x-codegen-request-body-name: body /federation/federated_realm/{id}: @@ -1347,6 +1352,8 @@ components: format: date-time readOnly: true type: string + required: + - federated_realm title: FederatedBlock type: object federationFederatedRealm: diff --git a/ipamfederation/docs/FederatedBlock.md b/ipamfederation/docs/FederatedBlock.md index 097d7c4..bebbbbc 100644 --- a/ipamfederation/docs/FederatedBlock.md +++ b/ipamfederation/docs/FederatedBlock.md @@ -9,7 +9,7 @@ Name | Type | Description | Notes **Cidr** | Pointer to **int64** | The CIDR of the federated block. This is required, if _address_ does not specify it in its input. | [optional] **Comment** | Pointer to **string** | The description for the federated block. May contain 0 to 1024 characters. Can include UTF-8. | [optional] **CreatedAt** | Pointer to **time.Time** | Time when the object has been created. | [optional] [readonly] -**FederatedRealm** | Pointer to **string** | The resource identifier. | [optional] +**FederatedRealm** | **string** | The resource identifier. | **Id** | Pointer to **string** | The resource identifier. | [optional] [readonly] **Name** | Pointer to **string** | The name of the federated block. May contain 1 to 256 characters. Can include UTF-8. | [optional] **Parent** | Pointer to **string** | The resource identifier. | [optional] @@ -21,7 +21,7 @@ Name | Type | Description | Notes ### NewFederatedBlock -`func NewFederatedBlock() *FederatedBlock` +`func NewFederatedBlock(federatedRealm string, ) *FederatedBlock` NewFederatedBlock instantiates a new FederatedBlock object This constructor will assign default values to properties that have it defined, @@ -180,11 +180,6 @@ and a boolean to check if the value has been set. SetFederatedRealm sets FederatedRealm field to given value. -### HasFederatedRealm - -`func (o *FederatedBlock) HasFederatedRealm() bool` - -HasFederatedRealm returns a boolean if a field has been set. ### GetId diff --git a/ipamfederation/docs/FederatedBlockAPI.md b/ipamfederation/docs/FederatedBlockAPI.md index fdb8540..7de3f4c 100644 --- a/ipamfederation/docs/FederatedBlockAPI.md +++ b/ipamfederation/docs/FederatedBlockAPI.md @@ -1,6 +1,6 @@ # FederatedBlockAPI -All URIs are relative to */api/ddi/v1* +All URIs are relative to *http://csp.infoblox.com/api/ddi/v1* Method | HTTP request | Description ------------- | ------------- | ------------- @@ -34,7 +34,7 @@ import ( ) func main() { - body := *ipamfederation.NewFederatedBlock() // FederatedBlock | + body := *ipamfederation.NewFederatedBlock("FederatedRealm_example") // FederatedBlock | apiClient := ipamfederation.NewAPIClient() resp, r, err := apiClient.FederatedBlockAPI.Create(context.Background()).Body(body).Execute() @@ -310,7 +310,7 @@ import ( func main() { id := "a5183192-1e00-475f-b334-38e1f0bb1bc7" // string | An application specific resource identity of a resource - body := *ipamfederation.NewFederatedBlock() // FederatedBlock | + body := *ipamfederation.NewFederatedBlock("FederatedRealm_example") // FederatedBlock | apiClient := ipamfederation.NewAPIClient() resp, r, err := apiClient.FederatedBlockAPI.Update(context.Background(), id).Body(body).Execute() diff --git a/ipamfederation/docs/FederatedRealmAPI.md b/ipamfederation/docs/FederatedRealmAPI.md index 51db6f5..8e7cdcd 100644 --- a/ipamfederation/docs/FederatedRealmAPI.md +++ b/ipamfederation/docs/FederatedRealmAPI.md @@ -1,6 +1,6 @@ # FederatedRealmAPI -All URIs are relative to */api/ddi/v1* +All URIs are relative to *http://csp.infoblox.com/api/ddi/v1* Method | HTTP request | Description ------------- | ------------- | ------------- diff --git a/ipamfederation/docs/NextAvailableFederatedBlockAPI.md b/ipamfederation/docs/NextAvailableFederatedBlockAPI.md index e2fbe39..c8d4cc7 100644 --- a/ipamfederation/docs/NextAvailableFederatedBlockAPI.md +++ b/ipamfederation/docs/NextAvailableFederatedBlockAPI.md @@ -1,6 +1,6 @@ # NextAvailableFederatedBlockAPI -All URIs are relative to */api/ddi/v1* +All URIs are relative to *http://csp.infoblox.com/api/ddi/v1* Method | HTTP request | Description ------------- | ------------- | ------------- diff --git a/ipamfederation/docs/NextAvailableOverlappingBlockAPI.md b/ipamfederation/docs/NextAvailableOverlappingBlockAPI.md index 520e821..8ca9747 100644 --- a/ipamfederation/docs/NextAvailableOverlappingBlockAPI.md +++ b/ipamfederation/docs/NextAvailableOverlappingBlockAPI.md @@ -1,6 +1,6 @@ # NextAvailableOverlappingBlockAPI -All URIs are relative to */api/ddi/v1* +All URIs are relative to *http://csp.infoblox.com/api/ddi/v1* Method | HTTP request | Description ------------- | ------------- | ------------- diff --git a/ipamfederation/docs/NextAvailableReservedBlockAPI.md b/ipamfederation/docs/NextAvailableReservedBlockAPI.md index 0a57a41..43956d7 100644 --- a/ipamfederation/docs/NextAvailableReservedBlockAPI.md +++ b/ipamfederation/docs/NextAvailableReservedBlockAPI.md @@ -1,6 +1,6 @@ # NextAvailableReservedBlockAPI -All URIs are relative to */api/ddi/v1* +All URIs are relative to *http://csp.infoblox.com/api/ddi/v1* Method | HTTP request | Description ------------- | ------------- | ------------- diff --git a/ipamfederation/docs/OverlappingBlockAPI.md b/ipamfederation/docs/OverlappingBlockAPI.md index 6091404..363da8b 100644 --- a/ipamfederation/docs/OverlappingBlockAPI.md +++ b/ipamfederation/docs/OverlappingBlockAPI.md @@ -1,6 +1,6 @@ # OverlappingBlockAPI -All URIs are relative to */api/ddi/v1* +All URIs are relative to *http://csp.infoblox.com/api/ddi/v1* Method | HTTP request | Description ------------- | ------------- | ------------- diff --git a/ipamfederation/docs/ReservedBlockAPI.md b/ipamfederation/docs/ReservedBlockAPI.md index 0f46a42..3f36777 100644 --- a/ipamfederation/docs/ReservedBlockAPI.md +++ b/ipamfederation/docs/ReservedBlockAPI.md @@ -1,6 +1,6 @@ # ReservedBlockAPI -All URIs are relative to */api/ddi/v1* +All URIs are relative to *http://csp.infoblox.com/api/ddi/v1* Method | HTTP request | Description ------------- | ------------- | ------------- diff --git a/ipamfederation/model_federated_block.go b/ipamfederation/model_federated_block.go index a1eab26..a4e0042 100644 --- a/ipamfederation/model_federated_block.go +++ b/ipamfederation/model_federated_block.go @@ -12,6 +12,7 @@ package ipamfederation import ( "encoding/json" + "fmt" "time" ) @@ -31,7 +32,7 @@ type FederatedBlock struct { // Time when the object has been created. CreatedAt *time.Time `json:"created_at,omitempty"` // The resource identifier. - FederatedRealm *string `json:"federated_realm,omitempty"` + FederatedRealm string `json:"federated_realm"` // The resource identifier. Id *string `json:"id,omitempty"` // The name of the federated block. May contain 1 to 256 characters. Can include UTF-8. @@ -53,8 +54,9 @@ type _FederatedBlock FederatedBlock // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed -func NewFederatedBlock() *FederatedBlock { +func NewFederatedBlock(federatedRealm string) *FederatedBlock { this := FederatedBlock{} + this.FederatedRealm = federatedRealm return &this } @@ -226,36 +228,28 @@ func (o *FederatedBlock) SetCreatedAt(v time.Time) { o.CreatedAt = &v } -// GetFederatedRealm returns the FederatedRealm field value if set, zero value otherwise. +// GetFederatedRealm returns the FederatedRealm field value func (o *FederatedBlock) GetFederatedRealm() string { - if o == nil || IsNil(o.FederatedRealm) { + if o == nil { var ret string return ret } - return *o.FederatedRealm + + return o.FederatedRealm } -// GetFederatedRealmOk returns a tuple with the FederatedRealm field value if set, nil otherwise +// GetFederatedRealmOk returns a tuple with the FederatedRealm field value // and a boolean to check if the value has been set. func (o *FederatedBlock) GetFederatedRealmOk() (*string, bool) { - if o == nil || IsNil(o.FederatedRealm) { + if o == nil { return nil, false } - return o.FederatedRealm, true + return &o.FederatedRealm, true } -// HasFederatedRealm returns a boolean if a field has been set. -func (o *FederatedBlock) HasFederatedRealm() bool { - if o != nil && !IsNil(o.FederatedRealm) { - return true - } - - return false -} - -// SetFederatedRealm gets a reference to the given string and assigns it to the FederatedRealm field. +// SetFederatedRealm sets field value func (o *FederatedBlock) SetFederatedRealm(v string) { - o.FederatedRealm = &v + o.FederatedRealm = v } // GetId returns the Id field value if set, zero value otherwise. @@ -475,9 +469,7 @@ func (o FederatedBlock) ToMap() (map[string]interface{}, error) { if !IsNil(o.CreatedAt) { toSerialize["created_at"] = o.CreatedAt } - if !IsNil(o.FederatedRealm) { - toSerialize["federated_realm"] = o.FederatedRealm - } + toSerialize["federated_realm"] = o.FederatedRealm if !IsNil(o.Id) { toSerialize["id"] = o.Id } @@ -505,6 +497,27 @@ func (o FederatedBlock) ToMap() (map[string]interface{}, error) { } func (o *FederatedBlock) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "federated_realm", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + varFederatedBlock := _FederatedBlock{} err = json.Unmarshal(data, &varFederatedBlock)