Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generated schemas for ipam-federation in go client #51

Merged
merged 3 commits into from
Aug 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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...),
Expand Down
23 changes: 23 additions & 0 deletions ipamfederation/.openapi-generator-ignore
Original file line number Diff line number Diff line change
@@ -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
74 changes: 74 additions & 0 deletions ipamfederation/.openapi-generator/FILES
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
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
utils.go
1 change: 1 addition & 0 deletions ipamfederation/.openapi-generator/VERSION
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
7.5.0
164 changes: 164 additions & 0 deletions ipamfederation/README.md
Original file line number Diff line number Diff line change
@@ -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 *http://csp.infoblox.com/api/ddi/v1*
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should have been https://, maybe you can remove the http scheme from the schema and regenerate.


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`
Loading
Loading