diff --git a/client/client.go b/client/client.go index a68782d..8095ec8 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 + IpamFederationAPI *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 +// - IpamFederationAPI // - DNSConfigurationAPI // - DNSDataAPI // - HostActivationAPI @@ -54,6 +57,7 @@ type APIClient struct { func NewAPIClient(options ...option.ClientOption) *APIClient { return &APIClient{ IPAddressManagementAPI: ipam.NewAPIClient(options...), + IpamFederationAPI: ipamfederation.NewAPIClient(options...), DNSConfigurationAPI: dnsconfig.NewAPIClient(options...), DNSDataAPI: dnsdata.NewAPIClient(options...), HostActivationAPI: infraprovision.NewAPIClient(options...), 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..0f28eb4 --- /dev/null +++ b/ipamfederation/.openapi-generator/FILES @@ -0,0 +1,127 @@ +.openapi-generator-ignore +README.md +api/openapi.yaml +api_config_gen.go +api_delegation.go +api_federated_block.go +api_federated_realm.go +api_next_available_delegation.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/ConfigGenAPI.md +docs/ConfigObject.md +docs/CreateDelegationResponse.md +docs/CreateFederatedBlockResponse.md +docs/CreateFederatedRealmResponse.md +docs/CreateNextAvailableFederatedBlockResponse.md +docs/CreateNextAvailableOverlappingBlockResponse.md +docs/CreateNextAvailableReservedBlockResponse.md +docs/CreateOverlappingBlockResponse.md +docs/CreateReservedBlockResponse.md +docs/Delegation.md +docs/DelegationAPI.md +docs/DelegationBulkItem.md +docs/DelegationBulkRequest.md +docs/DelegationBulkResponse.md +docs/FederatedBlock.md +docs/FederatedBlockAPI.md +docs/FederatedRealm.md +docs/FederatedRealmAPI.md +docs/GenerateConfigBundleResponse.md +docs/GetNextAvailableDelegationRequest.md +docs/GetNextAvailableDelegationResponse.md +docs/HealthCheckConfigResponse.md +docs/HealthConfig.md +docs/HealthConfigStatusCode.md +docs/ListDelegationResponse.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/NextAvailableDelegationAPI.md +docs/NextAvailableDelegationArguments.md +docs/NextAvailableDelegationProperties.md +docs/NextAvailableFederatedBlockAPI.md +docs/NextAvailableOverlappingBlockAPI.md +docs/NextAvailableReservedBlockAPI.md +docs/OverlappingBlock.md +docs/OverlappingBlockAPI.md +docs/ProtobufFieldMask.md +docs/ReadDelegationResponse.md +docs/ReadFederatedBlockResponse.md +docs/ReadFederatedRealmResponse.md +docs/ReadOverlappingBlockResponse.md +docs/ReadReservedBlockResponse.md +docs/ReservedBlock.md +docs/ReservedBlockAPI.md +docs/UpdateDelegationResponse.md +docs/UpdateFederatedBlockResponse.md +docs/UpdateFederatedRealmResponse.md +docs/UpdateOverlappingBlockResponse.md +docs/UpdateReservedBlockResponse.md +model_allocation.go +model_config_object.go +model_create_delegation_response.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_delegation.go +model_delegation_bulk_item.go +model_delegation_bulk_request.go +model_delegation_bulk_response.go +model_federated_block.go +model_federated_realm.go +model_generate_config_bundle_response.go +model_get_next_available_delegation_request.go +model_get_next_available_delegation_response.go +model_health_check_config_response.go +model_health_config.go +model_health_config_status_code.go +model_list_delegation_response.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_next_available_delegation_arguments.go +model_next_available_delegation_properties.go +model_overlapping_block.go +model_protobuf_field_mask.go +model_read_delegation_response.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_delegation_response.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_config_gen_test.go +test/api_delegation_test.go +test/api_federated_block_test.go +test/api_federated_realm_test.go +test/api_next_available_delegation_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..d4bd9da --- /dev/null +++ b/ipamfederation/README.md @@ -0,0 +1,192 @@ +# 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 +------------ | ------------- | ------------- | ------------- +*ConfigGenAPI* | [**Fetch**](docs/ConfigGenAPI.md#fetch) | **Get** /federation/policy/config/{ophid}/latest | +*ConfigGenAPI* | [**UpdateConfigStatus**](docs/ConfigGenAPI.md#updateconfigstatus) | **Post** /federation/policy/config_status | +*DelegationAPI* | [**Bulk**](docs/DelegationAPI.md#bulk) | **Post** /federation/delegation_bulk | Execute multiple operations on delegation objects. +*DelegationAPI* | [**Create**](docs/DelegationAPI.md#create) | **Post** /federation/delegation | Create the delegation. +*DelegationAPI* | [**Delete**](docs/DelegationAPI.md#delete) | **Delete** /federation/delegation/{id} | Delete the delegation. +*DelegationAPI* | [**DeleteWithoutId**](docs/DelegationAPI.md#deletewithoutid) | **Delete** /federation/delegation | No-op DELETE Delegation operation. +*DelegationAPI* | [**List**](docs/DelegationAPI.md#list) | **Get** /federation/delegation | Retrieve the delegation. +*DelegationAPI* | [**Read**](docs/DelegationAPI.md#read) | **Get** /federation/delegation/{id} | Retrieve the delegation. +*DelegationAPI* | [**Update**](docs/DelegationAPI.md#update) | **Patch** /federation/delegation/{id} | Update the delegation. +*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. +*NextAvailableDelegationAPI* | [**GetNextAvailableDelegation**](docs/NextAvailableDelegationAPI.md#getnextavailabledelegation) | **Post** /federation/next_available_delegation | Retrieve the next available delegation. +*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) + - [ConfigObject](docs/ConfigObject.md) + - [CreateDelegationResponse](docs/CreateDelegationResponse.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) + - [Delegation](docs/Delegation.md) + - [DelegationBulkItem](docs/DelegationBulkItem.md) + - [DelegationBulkRequest](docs/DelegationBulkRequest.md) + - [DelegationBulkResponse](docs/DelegationBulkResponse.md) + - [FederatedBlock](docs/FederatedBlock.md) + - [FederatedRealm](docs/FederatedRealm.md) + - [GenerateConfigBundleResponse](docs/GenerateConfigBundleResponse.md) + - [GetNextAvailableDelegationRequest](docs/GetNextAvailableDelegationRequest.md) + - [GetNextAvailableDelegationResponse](docs/GetNextAvailableDelegationResponse.md) + - [HealthCheckConfigResponse](docs/HealthCheckConfigResponse.md) + - [HealthConfig](docs/HealthConfig.md) + - [HealthConfigStatusCode](docs/HealthConfigStatusCode.md) + - [ListDelegationResponse](docs/ListDelegationResponse.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) + - [NextAvailableDelegationArguments](docs/NextAvailableDelegationArguments.md) + - [NextAvailableDelegationProperties](docs/NextAvailableDelegationProperties.md) + - [OverlappingBlock](docs/OverlappingBlock.md) + - [ProtobufFieldMask](docs/ProtobufFieldMask.md) + - [ReadDelegationResponse](docs/ReadDelegationResponse.md) + - [ReadFederatedBlockResponse](docs/ReadFederatedBlockResponse.md) + - [ReadFederatedRealmResponse](docs/ReadFederatedRealmResponse.md) + - [ReadOverlappingBlockResponse](docs/ReadOverlappingBlockResponse.md) + - [ReadReservedBlockResponse](docs/ReadReservedBlockResponse.md) + - [ReservedBlock](docs/ReservedBlock.md) + - [UpdateDelegationResponse](docs/UpdateDelegationResponse.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..4909a5f --- /dev/null +++ b/ipamfederation/api/openapi.yaml @@ -0,0 +1,2949 @@ +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/delegation: + delete: + description: "This method has no-operation, but is provided for client IPAM\ + \ services performing a DELETE of zero Delegations that did not detect the\ + \ empty request." + operationId: delegationDeleteWithoutId + responses: + "200": + content: {} + description: OK + summary: No-op DELETE Delegation operation. + tags: + - delegation + get: + description: |- + Use this method to retrieve __Delegation__ objects. + The __Delegation__ explicitly marks authority for an address range assigned to another IPAM service. + operationId: delegationList + 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/federationListDelegationResponse' + description: GET operation response + summary: Retrieve the delegation. + tags: + - delegation + post: + description: |- + Use this method to create a __Delegation__ object. + The __Delegation__ explicitly marks authority for an address range assigned to another IPAM service. + operationId: delegationCreate + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/federationDelegation' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/federationCreateDelegationResponse' + description: POST operation response + summary: Create the delegation. + tags: + - delegation + x-tf-resource: federation_delegation + x-tf-datasource: federation_delegations + x-codegen-request-body-name: body + /federation/delegation/{id}: + delete: + description: |- + Use this method to delete a __Delegation__ object. + The __Delegation__ explicitly marks authority for an address range assigned to another IPAM service. + operationId: delegationDelete + 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 delegation. + tags: + - delegation + get: + description: |- + Use this method to retrieve a __Delegation__ object. + The __Delegation__ explicitly marks authority for an address range assigned to another IPAM service. + operationId: delegationRead + 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/federationReadDelegationResponse' + description: GET operation response + summary: Retrieve the delegation. + tags: + - delegation + patch: + description: |- + Use this method to update a __Delegation__ object. + The __Delegation__ explicitly marks authority for an address range assigned to another IPAM service. + operationId: delegationUpdate + 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/federationDelegation' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/federationUpdateDelegationResponse' + description: PATCH operation response + summary: Update the delegation. + tags: + - delegation + x-codegen-request-body-name: body + /federation/delegation_bulk: + post: + description: "Use this method to create, update, or delete multiple __Delegation__\ + \ objects." + operationId: delegationbulkDelegationBulk + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/federationDelegationBulkRequest' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/federationDelegationBulkResponse' + description: POST operation response + summary: Execute multiple operations on delegation objects. + tags: + - delegation + x-codegen-request-body-name: body + /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-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-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-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-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-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-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-codegen-request-body-name: body + /federation/next_available_delegation: + post: + description: |- + Use this method to generate the next "n" available __Delegation__ object with user specified predicates. + The response will be "n" __Delegation__ objects. + operationId: next_available_delegationGetNextAvailableDelegation + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/federationGetNextAvailableDelegationRequest' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/federationGetNextAvailableDelegationResponse' + description: POST operation response + summary: Retrieve the next available delegation. + tags: + - next_available_delegation + 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-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-codegen-request-body-name: body + /federation/policy/config/{ophid}/latest: + get: + operationId: config_genFetch + parameters: + - in: path + name: ophid + required: true + schema: + type: string + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/federationGenerateConfigBundleResponse' + description: GET operation response + tags: + - config_gen + /federation/policy/config_status: + post: + operationId: config_genUpdateConfigStatus + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/federationHealthConfig' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/federationHealthCheckConfigResponse' + description: POST operation response + tags: + - config_gen + 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-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-codegen-request-body-name: body +components: + schemas: + HealthConfigStatusCode: + default: StatusCode_SUCCESS + enum: + - StatusCode_SUCCESS + - StatusCode_GENERAL_FAILURE + - StatusCode_HASH_FAILURE + - StatusCode_VALIDATION_FAILURE + - StatusCode_COPY_FAILURE + - StatusCode_RELOAD_FAILIURE + type: string + 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 + federationConfigObject: + example: + ophid: ophid + configBody: configBody + version: version + properties: + configBody: + format: byte + pattern: "^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$" + title: on-prem keepalived service configurations in base64 encoded format + and vip configuration + type: string + ophid: + title: onprem host ID + type: string + version: + title: version of the configurations + type: string + type: object + federationCreateDelegationResponse: + description: The response format to create the __Delegation__ object. + example: + result: + protocol: protocol + address: address + updated_at: 2000-01-23T04:56:07.000+00:00 + federated_realms: + - federated_realms + - federated_realms + name: name + created_at: 2000-01-23T04:56:07.000+00:00 + cidr: 11 + comment: comment + delegated_to: delegated_to + id: id + parents: + - parents + - parents + tags: "{}" + properties: + result: + $ref: '#/components/schemas/federationDelegation' + title: CreateDelegationResponse + 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 + federationDelegation: + description: "A __Delegation__ object (_federation/delegation_) is a set of\ + \ contiguous IP addresses with no gap, expressed as a CIDR block. A Delegation\ + \ is explicitly associated with Federated Realms, and implicitly with Federated\ + \ Block Parents. A Delegation in a given realm is said to be the child of\ + \ the closest enclosing parent." + example: + protocol: protocol + address: address + updated_at: 2000-01-23T04:56:07.000+00:00 + federated_realms: + - federated_realms + - federated_realms + name: name + created_at: 2000-01-23T04:56:07.000+00:00 + cidr: 11 + comment: comment + delegated_to: delegated_to + id: id + parents: + - parents + - parents + 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 delegation. 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 delegation. 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 + delegated_to: + description: The specific IPAM service the delegation was delegated to. + type: string + federated_realms: + description: The resource identifier. + items: + type: string + type: array + id: + description: The resource identifier. + readOnly: true + type: string + name: + description: The name of the delegation. May contain 1 to 256 characters. + Can include UTF-8. + type: string + parents: + description: The resource identifier. + items: + type: string + type: array + protocol: + description: The type of protocol of delegation (_ip4_ or _ip6_). + readOnly: true + type: string + tags: + additionalProperties: false + description: The tags for the delegation 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_realms + title: Delegation + type: object + federationDelegationBulkItem: + description: DelegationBulkItem object. + properties: + action: + description: |- + Type of action to execute on Delegation object. + + Valid values are: + * _POST_ + * _PATCH_ + * _DELETE_ + type: string + delegation: + $ref: '#/components/schemas/federationDelegation' + title: DelegationBulkItem + type: object + federationDelegationBulkRequest: + description: DelegationBulk request object. + properties: + delegations: + description: list of action/delegation requests to execute. + items: + $ref: '#/components/schemas/federationDelegationBulkItem' + type: array + fields: + $ref: '#/components/schemas/protobufFieldMask' + title: DelegationBulkRequest + type: object + federationDelegationBulkResponse: + description: The DelegationBulk response object. + example: + results: + - protocol: protocol + address: address + updated_at: 2000-01-23T04:56:07.000+00:00 + federated_realms: + - federated_realms + - federated_realms + name: name + created_at: 2000-01-23T04:56:07.000+00:00 + cidr: 11 + comment: comment + delegated_to: delegated_to + id: id + parents: + - parents + - parents + tags: "{}" + - protocol: protocol + address: address + updated_at: 2000-01-23T04:56:07.000+00:00 + federated_realms: + - federated_realms + - federated_realms + name: name + created_at: 2000-01-23T04:56:07.000+00:00 + cidr: 11 + comment: comment + delegated_to: delegated_to + id: id + parents: + - parents + - parents + tags: "{}" + properties: + results: + description: A list of Delegation objects. + items: + $ref: '#/components/schemas/federationDelegation' + type: array + title: DelegationBulkResponse + 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 + required: + - address + - federated_realm + 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 + federationGenerateConfigBundleResponse: + description: The response format to retrieve __ConfigBundle__ objects. + example: + config: + ophid: ophid + configBody: configBody + version: version + properties: + config: + $ref: '#/components/schemas/federationConfigObject' + title: GenerateConfigBundleResponse + type: object + federationGetNextAvailableDelegationRequest: + properties: + arguments: + $ref: '#/components/schemas/federationNextAvailableDelegationArguments' + properties: + $ref: '#/components/schemas/federationNextAvailableDelegationProperties' + type: object + federationGetNextAvailableDelegationResponse: + description: The response format to get next available __Delegation__ objects. + example: + results: + - protocol: protocol + address: address + updated_at: 2000-01-23T04:56:07.000+00:00 + federated_realms: + - federated_realms + - federated_realms + name: name + created_at: 2000-01-23T04:56:07.000+00:00 + cidr: 11 + comment: comment + delegated_to: delegated_to + id: id + parents: + - parents + - parents + tags: "{}" + - protocol: protocol + address: address + updated_at: 2000-01-23T04:56:07.000+00:00 + federated_realms: + - federated_realms + - federated_realms + name: name + created_at: 2000-01-23T04:56:07.000+00:00 + cidr: 11 + comment: comment + delegated_to: delegated_to + id: id + parents: + - parents + - parents + tags: "{}" + properties: + results: + items: + $ref: '#/components/schemas/federationDelegation' + type: array + title: NextAvailableDelegationResponse + type: object + federationHealthCheckConfigResponse: + example: + message: message + properties: + message: + type: string + type: object + federationHealthConfig: + properties: + appName: + title: appName + type: string + message: + title: status update message for on-prem keepalived service configurations + type: string + ophid: + title: onprem host ID + type: string + statusCode: + $ref: '#/components/schemas/HealthConfigStatusCode' + version: + format: uint64 + title: version of the configuration + type: string + type: object + federationListDelegationResponse: + description: The response format to retrieve __Delegation__ objects. + example: + results: + - protocol: protocol + address: address + updated_at: 2000-01-23T04:56:07.000+00:00 + federated_realms: + - federated_realms + - federated_realms + name: name + created_at: 2000-01-23T04:56:07.000+00:00 + cidr: 11 + comment: comment + delegated_to: delegated_to + id: id + parents: + - parents + - parents + tags: "{}" + - protocol: protocol + address: address + updated_at: 2000-01-23T04:56:07.000+00:00 + federated_realms: + - federated_realms + - federated_realms + name: name + created_at: 2000-01-23T04:56:07.000+00:00 + cidr: 11 + comment: comment + delegated_to: delegated_to + id: id + parents: + - parents + - parents + tags: "{}" + properties: + results: + description: A list of Delegation objects. + items: + $ref: '#/components/schemas/federationDelegation' + type: array + title: ListDelegationResponse + 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 + federationNextAvailableDelegationArguments: + properties: + cidr: + description: "The CIDR of the delegation to be created. This is required,\ + \ if _address_ does not specify it in its input." + format: int64 + maximum: 128 + minimum: 1 + type: integer + count: + description: "The count of __Delegation__ required. If not provided, it\ + \ will default to 1." + format: int64 + type: integer + federated_realms: + description: The resource identifier. + items: + type: string + type: array + predicates: + additionalProperties: false + description: It contains the map of attributes and the associated value. + type: object + read_only: + description: The field which denotes if the __Delegation__ will be provisioned + or just calculated and returned. + format: boolean + type: boolean + type: object + federationNextAvailableDelegationProperties: + properties: + comment: + description: The description for the __Delegation__. May contain 0 to 1024 + characters. Can include UTF-8. + type: string + delegated_to: + description: The specific IPAM service the __Delegation__ was delegated + to. + type: string + name: + description: The name to be provided. + type: string + 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 + federationReadDelegationResponse: + description: The response format to retrieve the __Delegation__ object. + example: + result: + protocol: protocol + address: address + updated_at: 2000-01-23T04:56:07.000+00:00 + federated_realms: + - federated_realms + - federated_realms + name: name + created_at: 2000-01-23T04:56:07.000+00:00 + cidr: 11 + comment: comment + delegated_to: delegated_to + id: id + parents: + - parents + - parents + tags: "{}" + properties: + result: + $ref: '#/components/schemas/federationDelegation' + title: ReadDelegationResponse + 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 + federationUpdateDelegationResponse: + description: The response format to update the __Delegation__ object. + example: + result: + protocol: protocol + address: address + updated_at: 2000-01-23T04:56:07.000+00:00 + federated_realms: + - federated_realms + - federated_realms + name: name + created_at: 2000-01-23T04:56:07.000+00:00 + cidr: 11 + comment: comment + delegated_to: delegated_to + id: id + parents: + - parents + - parents + tags: "{}" + properties: + result: + $ref: '#/components/schemas/federationDelegation' + title: UpdateDelegationResponse + 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 + protobufFieldMask: + description: |- + paths: "f.a" + paths: "f.b.d" + + Here `f` represents a field in some root message, `a` and `b` + fields in the message found in `f`, and `d` a field found in the + message in `f.b`. + + Field masks are used to specify a subset of fields that should be + returned by a get operation or modified by an update operation. + Field masks also have a custom JSON encoding (see below). + + # Field Masks in Projections + + When used in the context of a projection, a response message or + sub-message is filtered by the API to only contain those fields as + specified in the mask. For example, if the mask in the previous + example is applied to a response message as follows: + + f { + a : 22 + b { + d : 1 + x : 2 + } + y : 13 + } + z: 8 + + The result will not contain specific values for fields x,y and z + (their value will be set to the default, and omitted in proto text + output): + + + f { + a : 22 + b { + d : 1 + } + } + + A repeated field is not allowed except at the last position of a + paths string. + + If a FieldMask object is not present in a get operation, the + operation applies to all fields (as if a FieldMask of all fields + had been specified). + + Note that a field mask does not necessarily apply to the + top-level response message. In case of a REST get operation, the + field mask applies directly to the response, but in case of a REST + list operation, the mask instead applies to each individual message + in the returned resource list. In case of a REST custom method, + other definitions may be used. Where the mask applies will be + clearly documented together with its declaration in the API. In + any case, the effect on the returned resource/resources is required + behavior for APIs. + + # Field Masks in Update Operations + + A field mask in update operations specifies which fields of the + targeted resource are going to be updated. The API is required + to only change the values of the fields as specified in the mask + and leave the others untouched. If a resource is passed in to + describe the updated values, the API ignores the values of all + fields not covered by the mask. + + If a repeated field is specified for an update operation, the existing + repeated values in the target resource will be overwritten by the new values. + Note that a repeated field is only allowed in the last position of a `paths` + string. + + If a sub-message is specified in the last position of the field mask for an + update operation, then the existing sub-message in the target resource is + overwritten. Given the target message: + + f { + b { + d : 1 + x : 2 + } + c : 1 + } + + And an update message: + + f { + b { + d : 10 + } + } + + then if the field mask is: + + paths: "f.b" + + then the result will be: + + f { + b { + d : 10 + } + c : 1 + } + + However, if the update mask was: + + paths: "f.b.d" + + then the result would be: + + f { + b { + d : 10 + x : 2 + } + c : 1 + } + + In order to reset a field's value to the default, the field must + be in the mask and set to the default value in the provided resource. + Hence, in order to reset all fields of a resource, provide a default + instance of the resource and set all fields in the mask, or do + not provide a mask as described below. + + If a field mask is not present on update, the operation applies to + all fields (as if a field mask of all fields has been specified). + Note that in the presence of schema evolution, this may mean that + fields the client does not know and has therefore not filled into + the request will be reset to their default. If this is unwanted + behavior, a specific service may require a client to always specify + a field mask, producing an error if not. + + As with get operations, the location of the resource which + describes the updated values in the request message depends on the + operation kind. In any case, the effect of the field mask is + required to be honored by the API. + + ## Considerations for HTTP REST + + The HTTP kind of an update operation which uses a field mask must + be set to PATCH instead of PUT in order to satisfy HTTP semantics + (PUT must only be used for full updates). + + # JSON Encoding of Field Masks + + In JSON, a field mask is encoded as a single string where paths are + separated by a comma. Fields name in each path are converted + to/from lower-camel naming conventions. + + As an example, consider the following message declarations: + + message Profile { + User user = 1; + Photo photo = 2; + } + message User { + string display_name = 1; + string address = 2; + } + + In proto a field mask for `Profile` may look as such: + + mask { + paths: "user.display_name" + paths: "photo" + } + + In JSON, the same mask is represented as below: + + { + mask: "user.displayName,photo" + } + + # Field Masks and Oneof Fields + + Field masks treat fields in oneofs just as regular fields. Consider the + following message: + + message SampleMessage { + oneof test_oneof { + string name = 4; + SubMessage sub_message = 9; + } + } + + The field mask can be: + + mask { + paths: "name" + } + + Or: + + mask { + paths: "sub_message" + } + + Note that oneof type names ("test_oneof" in this case) cannot be used in + paths. + + ## Field Mask Verification + + The implementation of the all the API methods, which have any FieldMask type + field in the request, should verify the included field paths, and return + `INVALID_ARGUMENT` error if any path is duplicated or unmappable. + properties: + paths: + description: The set of field mask paths. + items: + type: string + type: array + title: "`FieldMask` represents a set of symbolic field paths, for example:" + type: object + securitySchemes: + ApiKeyAuth: + in: header + name: Authorization + type: apiKey +x-original-swagger-version: "2.0" diff --git a/ipamfederation/api_config_gen.go b/ipamfederation/api_config_gen.go new file mode 100644 index 0000000..9655b27 --- /dev/null +++ b/ipamfederation/api_config_gen.go @@ -0,0 +1,248 @@ +/* +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 ConfigGenAPI interface { + /* + Fetch Method for Fetch + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ophid + @return ConfigGenAPIFetchRequest + */ + Fetch(ctx context.Context, ophid string) ConfigGenAPIFetchRequest + + // FetchExecute executes the request + // @return GenerateConfigBundleResponse + FetchExecute(r ConfigGenAPIFetchRequest) (*GenerateConfigBundleResponse, *http.Response, error) + /* + UpdateConfigStatus Method for UpdateConfigStatus + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ConfigGenAPIUpdateConfigStatusRequest + */ + UpdateConfigStatus(ctx context.Context) ConfigGenAPIUpdateConfigStatusRequest + + // UpdateConfigStatusExecute executes the request + // @return HealthCheckConfigResponse + UpdateConfigStatusExecute(r ConfigGenAPIUpdateConfigStatusRequest) (*HealthCheckConfigResponse, *http.Response, error) +} + +// ConfigGenAPIService ConfigGenAPI service +type ConfigGenAPIService internal.Service + +type ConfigGenAPIFetchRequest struct { + ctx context.Context + ApiService ConfigGenAPI + ophid string +} + +func (r ConfigGenAPIFetchRequest) Execute() (*GenerateConfigBundleResponse, *http.Response, error) { + return r.ApiService.FetchExecute(r) +} + +/* +Fetch Method for Fetch + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ophid + @return ConfigGenAPIFetchRequest +*/ +func (a *ConfigGenAPIService) Fetch(ctx context.Context, ophid string) ConfigGenAPIFetchRequest { + return ConfigGenAPIFetchRequest{ + ApiService: a, + ctx: ctx, + ophid: ophid, + } +} + +// Execute executes the request +// +// @return GenerateConfigBundleResponse +func (a *ConfigGenAPIService) FetchExecute(r ConfigGenAPIFetchRequest) (*GenerateConfigBundleResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *GenerateConfigBundleResponse + ) + + localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "ConfigGenAPIService.Fetch") + if err != nil { + return localVarReturnValue, nil, internal.NewGenericOpenAPIError(err.Error()) + } + + localVarPath := localBasePath + "/federation/policy/config/{ophid}/latest" + localVarPath = strings.Replace(localVarPath, "{"+"ophid"+"}", url.PathEscape(internal.ParameterValueToString(r.ophid, "ophid")), -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{"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 ConfigGenAPIUpdateConfigStatusRequest struct { + ctx context.Context + ApiService ConfigGenAPI + body *HealthConfig +} + +func (r ConfigGenAPIUpdateConfigStatusRequest) Body(body HealthConfig) ConfigGenAPIUpdateConfigStatusRequest { + r.body = &body + return r +} + +func (r ConfigGenAPIUpdateConfigStatusRequest) Execute() (*HealthCheckConfigResponse, *http.Response, error) { + return r.ApiService.UpdateConfigStatusExecute(r) +} + +/* +UpdateConfigStatus Method for UpdateConfigStatus + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ConfigGenAPIUpdateConfigStatusRequest +*/ +func (a *ConfigGenAPIService) UpdateConfigStatus(ctx context.Context) ConfigGenAPIUpdateConfigStatusRequest { + return ConfigGenAPIUpdateConfigStatusRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return HealthCheckConfigResponse +func (a *ConfigGenAPIService) UpdateConfigStatusExecute(r ConfigGenAPIUpdateConfigStatusRequest) (*HealthCheckConfigResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *HealthCheckConfigResponse + ) + + localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "ConfigGenAPIService.UpdateConfigStatus") + if err != nil { + return localVarReturnValue, nil, internal.NewGenericOpenAPIError(err.Error()) + } + + localVarPath := localBasePath + "/federation/policy/config_status" + + 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 + } + // 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_delegation.go b/ipamfederation/api_delegation.go new file mode 100644 index 0000000..c11aecd --- /dev/null +++ b/ipamfederation/api_delegation.go @@ -0,0 +1,900 @@ +/* +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 DelegationAPI interface { + /* + Bulk Execute multiple operations on delegation objects. + + Use this method to create, update, or delete multiple __Delegation__ objects. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return DelegationAPIBulkRequest + */ + Bulk(ctx context.Context) DelegationAPIBulkRequest + + // BulkExecute executes the request + // @return DelegationBulkResponse + BulkExecute(r DelegationAPIBulkRequest) (*DelegationBulkResponse, *http.Response, error) + /* + Create Create the delegation. + + Use this method to create a __Delegation__ object. + The __Delegation__ explicitly marks authority for an address range assigned to another IPAM service. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return DelegationAPICreateRequest + */ + Create(ctx context.Context) DelegationAPICreateRequest + + // CreateExecute executes the request + // @return CreateDelegationResponse + CreateExecute(r DelegationAPICreateRequest) (*CreateDelegationResponse, *http.Response, error) + /* + Delete Delete the delegation. + + Use this method to delete a __Delegation__ object. + The __Delegation__ explicitly marks authority for an address range assigned to another IPAM service. + + @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 DelegationAPIDeleteRequest + */ + Delete(ctx context.Context, id string) DelegationAPIDeleteRequest + + // DeleteExecute executes the request + DeleteExecute(r DelegationAPIDeleteRequest) (*http.Response, error) + /* + DeleteWithoutId No-op DELETE Delegation operation. + + This method has no-operation, but is provided for client IPAM services performing a DELETE of zero Delegations that did not detect the empty request. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return DelegationAPIDeleteWithoutIdRequest + */ + DeleteWithoutId(ctx context.Context) DelegationAPIDeleteWithoutIdRequest + + // DeleteWithoutIdExecute executes the request + DeleteWithoutIdExecute(r DelegationAPIDeleteWithoutIdRequest) (*http.Response, error) + /* + List Retrieve the delegation. + + Use this method to retrieve __Delegation__ objects. + The __Delegation__ explicitly marks authority for an address range assigned to another IPAM service. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return DelegationAPIListRequest + */ + List(ctx context.Context) DelegationAPIListRequest + + // ListExecute executes the request + // @return ListDelegationResponse + ListExecute(r DelegationAPIListRequest) (*ListDelegationResponse, *http.Response, error) + /* + Read Retrieve the delegation. + + Use this method to retrieve a __Delegation__ object. + The __Delegation__ explicitly marks authority for an address range assigned to another IPAM service. + + @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 DelegationAPIReadRequest + */ + Read(ctx context.Context, id string) DelegationAPIReadRequest + + // ReadExecute executes the request + // @return ReadDelegationResponse + ReadExecute(r DelegationAPIReadRequest) (*ReadDelegationResponse, *http.Response, error) + /* + Update Update the delegation. + + Use this method to update a __Delegation__ object. + The __Delegation__ explicitly marks authority for an address range assigned to another IPAM service. + + @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 DelegationAPIUpdateRequest + */ + Update(ctx context.Context, id string) DelegationAPIUpdateRequest + + // UpdateExecute executes the request + // @return UpdateDelegationResponse + UpdateExecute(r DelegationAPIUpdateRequest) (*UpdateDelegationResponse, *http.Response, error) +} + +// DelegationAPIService DelegationAPI service +type DelegationAPIService internal.Service + +type DelegationAPIBulkRequest struct { + ctx context.Context + ApiService DelegationAPI + body *DelegationBulkRequest +} + +func (r DelegationAPIBulkRequest) Body(body DelegationBulkRequest) DelegationAPIBulkRequest { + r.body = &body + return r +} + +func (r DelegationAPIBulkRequest) Execute() (*DelegationBulkResponse, *http.Response, error) { + return r.ApiService.BulkExecute(r) +} + +/* +Bulk Execute multiple operations on delegation objects. + +Use this method to create, update, or delete multiple __Delegation__ objects. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return DelegationAPIBulkRequest +*/ +func (a *DelegationAPIService) Bulk(ctx context.Context) DelegationAPIBulkRequest { + return DelegationAPIBulkRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return DelegationBulkResponse +func (a *DelegationAPIService) BulkExecute(r DelegationAPIBulkRequest) (*DelegationBulkResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *DelegationBulkResponse + ) + + localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "DelegationAPIService.Bulk") + if err != nil { + return localVarReturnValue, nil, internal.NewGenericOpenAPIError(err.Error()) + } + + localVarPath := localBasePath + "/federation/delegation_bulk" + + 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 + } + // 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 DelegationAPICreateRequest struct { + ctx context.Context + ApiService DelegationAPI + body *Delegation +} + +func (r DelegationAPICreateRequest) Body(body Delegation) DelegationAPICreateRequest { + r.body = &body + return r +} + +func (r DelegationAPICreateRequest) Execute() (*CreateDelegationResponse, *http.Response, error) { + return r.ApiService.CreateExecute(r) +} + +/* +Create Create the delegation. + +Use this method to create a __Delegation__ object. +The __Delegation__ explicitly marks authority for an address range assigned to another IPAM service. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return DelegationAPICreateRequest +*/ +func (a *DelegationAPIService) Create(ctx context.Context) DelegationAPICreateRequest { + return DelegationAPICreateRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return CreateDelegationResponse +func (a *DelegationAPIService) CreateExecute(r DelegationAPICreateRequest) (*CreateDelegationResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *CreateDelegationResponse + ) + + localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "DelegationAPIService.Create") + if err != nil { + return localVarReturnValue, nil, internal.NewGenericOpenAPIError(err.Error()) + } + + localVarPath := localBasePath + "/federation/delegation" + + 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 + } + // 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 DelegationAPIDeleteRequest struct { + ctx context.Context + ApiService DelegationAPI + id string +} + +func (r DelegationAPIDeleteRequest) Execute() (*http.Response, error) { + return r.ApiService.DeleteExecute(r) +} + +/* +Delete Delete the delegation. + +Use this method to delete a __Delegation__ object. +The __Delegation__ explicitly marks authority for an address range assigned to another IPAM service. + + @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 DelegationAPIDeleteRequest +*/ +func (a *DelegationAPIService) Delete(ctx context.Context, id string) DelegationAPIDeleteRequest { + return DelegationAPIDeleteRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +func (a *DelegationAPIService) DeleteExecute(r DelegationAPIDeleteRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []internal.FormFile + ) + + localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "DelegationAPIService.Delete") + if err != nil { + return nil, internal.NewGenericOpenAPIError(err.Error()) + } + + localVarPath := localBasePath + "/federation/delegation/{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 DelegationAPIDeleteWithoutIdRequest struct { + ctx context.Context + ApiService DelegationAPI +} + +func (r DelegationAPIDeleteWithoutIdRequest) Execute() (*http.Response, error) { + return r.ApiService.DeleteWithoutIdExecute(r) +} + +/* +DeleteWithoutId No-op DELETE Delegation operation. + +This method has no-operation, but is provided for client IPAM services performing a DELETE of zero Delegations that did not detect the empty request. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return DelegationAPIDeleteWithoutIdRequest +*/ +func (a *DelegationAPIService) DeleteWithoutId(ctx context.Context) DelegationAPIDeleteWithoutIdRequest { + return DelegationAPIDeleteWithoutIdRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +func (a *DelegationAPIService) DeleteWithoutIdExecute(r DelegationAPIDeleteWithoutIdRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []internal.FormFile + ) + + localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "DelegationAPIService.DeleteWithoutId") + if err != nil { + return nil, internal.NewGenericOpenAPIError(err.Error()) + } + + localVarPath := localBasePath + "/federation/delegation" + + 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 DelegationAPIListRequest struct { + ctx context.Context + ApiService DelegationAPI + 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 DelegationAPIListRequest) Fields(fields string) DelegationAPIListRequest { + 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 DelegationAPIListRequest) Filter(filter string) DelegationAPIListRequest { + 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 DelegationAPIListRequest) Offset(offset int32) DelegationAPIListRequest { + 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 DelegationAPIListRequest) Limit(limit int32) DelegationAPIListRequest { + 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 DelegationAPIListRequest) PageToken(pageToken string) DelegationAPIListRequest { + 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 DelegationAPIListRequest) OrderBy(orderBy string) DelegationAPIListRequest { + r.orderBy = &orderBy + return r +} + +// This parameter is used for sorting by tags. +func (r DelegationAPIListRequest) TorderBy(torderBy string) DelegationAPIListRequest { + r.torderBy = &torderBy + return r +} + +// This parameter is used for filtering by tags. +func (r DelegationAPIListRequest) Tfilter(tfilter string) DelegationAPIListRequest { + r.tfilter = &tfilter + return r +} + +func (r DelegationAPIListRequest) Execute() (*ListDelegationResponse, *http.Response, error) { + return r.ApiService.ListExecute(r) +} + +/* +List Retrieve the delegation. + +Use this method to retrieve __Delegation__ objects. +The __Delegation__ explicitly marks authority for an address range assigned to another IPAM service. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return DelegationAPIListRequest +*/ +func (a *DelegationAPIService) List(ctx context.Context) DelegationAPIListRequest { + return DelegationAPIListRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return ListDelegationResponse +func (a *DelegationAPIService) ListExecute(r DelegationAPIListRequest) (*ListDelegationResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *ListDelegationResponse + ) + + localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "DelegationAPIService.List") + if err != nil { + return localVarReturnValue, nil, internal.NewGenericOpenAPIError(err.Error()) + } + + localVarPath := localBasePath + "/federation/delegation" + + 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 DelegationAPIReadRequest struct { + ctx context.Context + ApiService DelegationAPI + 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 DelegationAPIReadRequest) Fields(fields string) DelegationAPIReadRequest { + r.fields = &fields + return r +} + +func (r DelegationAPIReadRequest) Execute() (*ReadDelegationResponse, *http.Response, error) { + return r.ApiService.ReadExecute(r) +} + +/* +Read Retrieve the delegation. + +Use this method to retrieve a __Delegation__ object. +The __Delegation__ explicitly marks authority for an address range assigned to another IPAM service. + + @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 DelegationAPIReadRequest +*/ +func (a *DelegationAPIService) Read(ctx context.Context, id string) DelegationAPIReadRequest { + return DelegationAPIReadRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// +// @return ReadDelegationResponse +func (a *DelegationAPIService) ReadExecute(r DelegationAPIReadRequest) (*ReadDelegationResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *ReadDelegationResponse + ) + + localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "DelegationAPIService.Read") + if err != nil { + return localVarReturnValue, nil, internal.NewGenericOpenAPIError(err.Error()) + } + + localVarPath := localBasePath + "/federation/delegation/{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 DelegationAPIUpdateRequest struct { + ctx context.Context + ApiService DelegationAPI + id string + body *Delegation +} + +func (r DelegationAPIUpdateRequest) Body(body Delegation) DelegationAPIUpdateRequest { + r.body = &body + return r +} + +func (r DelegationAPIUpdateRequest) Execute() (*UpdateDelegationResponse, *http.Response, error) { + return r.ApiService.UpdateExecute(r) +} + +/* +Update Update the delegation. + +Use this method to update a __Delegation__ object. +The __Delegation__ explicitly marks authority for an address range assigned to another IPAM service. + + @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 DelegationAPIUpdateRequest +*/ +func (a *DelegationAPIService) Update(ctx context.Context, id string) DelegationAPIUpdateRequest { + return DelegationAPIUpdateRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// +// @return UpdateDelegationResponse +func (a *DelegationAPIService) UpdateExecute(r DelegationAPIUpdateRequest) (*UpdateDelegationResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *UpdateDelegationResponse + ) + + localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "DelegationAPIService.Update") + if err != nil { + return localVarReturnValue, nil, internal.NewGenericOpenAPIError(err.Error()) + } + + localVarPath := localBasePath + "/federation/delegation/{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 + } + // 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_block.go b/ipamfederation/api_federated_block.go new file mode 100644 index 0000000..727a99d --- /dev/null +++ b/ipamfederation/api_federated_block.go @@ -0,0 +1,686 @@ +/* +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 + } + // 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 + } + // 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..88b3035 --- /dev/null +++ b/ipamfederation/api_federated_realm.go @@ -0,0 +1,684 @@ +/* +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 + } + // 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 + } + // 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_delegation.go b/ipamfederation/api_next_available_delegation.go new file mode 100644 index 0000000..028ea78 --- /dev/null +++ b/ipamfederation/api_next_available_delegation.go @@ -0,0 +1,146 @@ +/* +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" + + "github.com/infobloxopen/bloxone-go-client/internal" +) + +type NextAvailableDelegationAPI interface { + /* + GetNextAvailableDelegation Retrieve the next available delegation. + + Use this method to generate the next "n" available __Delegation__ object with user specified predicates. + The response will be "n" __Delegation__ objects. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return NextAvailableDelegationAPIGetNextAvailableDelegationRequest + */ + GetNextAvailableDelegation(ctx context.Context) NextAvailableDelegationAPIGetNextAvailableDelegationRequest + + // GetNextAvailableDelegationExecute executes the request + // @return GetNextAvailableDelegationResponse + GetNextAvailableDelegationExecute(r NextAvailableDelegationAPIGetNextAvailableDelegationRequest) (*GetNextAvailableDelegationResponse, *http.Response, error) +} + +// NextAvailableDelegationAPIService NextAvailableDelegationAPI service +type NextAvailableDelegationAPIService internal.Service + +type NextAvailableDelegationAPIGetNextAvailableDelegationRequest struct { + ctx context.Context + ApiService NextAvailableDelegationAPI + body *GetNextAvailableDelegationRequest +} + +func (r NextAvailableDelegationAPIGetNextAvailableDelegationRequest) Body(body GetNextAvailableDelegationRequest) NextAvailableDelegationAPIGetNextAvailableDelegationRequest { + r.body = &body + return r +} + +func (r NextAvailableDelegationAPIGetNextAvailableDelegationRequest) Execute() (*GetNextAvailableDelegationResponse, *http.Response, error) { + return r.ApiService.GetNextAvailableDelegationExecute(r) +} + +/* +GetNextAvailableDelegation Retrieve the next available delegation. + +Use this method to generate the next "n" available __Delegation__ object with user specified predicates. +The response will be "n" __Delegation__ objects. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return NextAvailableDelegationAPIGetNextAvailableDelegationRequest +*/ +func (a *NextAvailableDelegationAPIService) GetNextAvailableDelegation(ctx context.Context) NextAvailableDelegationAPIGetNextAvailableDelegationRequest { + return NextAvailableDelegationAPIGetNextAvailableDelegationRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return GetNextAvailableDelegationResponse +func (a *NextAvailableDelegationAPIService) GetNextAvailableDelegationExecute(r NextAvailableDelegationAPIGetNextAvailableDelegationRequest) (*GetNextAvailableDelegationResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *GetNextAvailableDelegationResponse + ) + + localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "NextAvailableDelegationAPIService.GetNextAvailableDelegation") + if err != nil { + return localVarReturnValue, nil, internal.NewGenericOpenAPIError(err.Error()) + } + + localVarPath := localBasePath + "/federation/next_available_delegation" + + 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 + } + // 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..bf6a70e --- /dev/null +++ b/ipamfederation/api_next_available_federated_block.go @@ -0,0 +1,553 @@ +/* +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 + } + // 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 + } + // 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 + } + // 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..6c8bb57 --- /dev/null +++ b/ipamfederation/api_overlapping_block.go @@ -0,0 +1,686 @@ +/* +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 + } + // 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 + } + // 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..ebb012a --- /dev/null +++ b/ipamfederation/api_reserved_block.go @@ -0,0 +1,686 @@ +/* +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 + } + // 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 + } + // 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..268aee4 --- /dev/null +++ b/ipamfederation/client.go @@ -0,0 +1,68 @@ +/* +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 + ConfigGenAPI ConfigGenAPI + DelegationAPI DelegationAPI + FederatedBlockAPI FederatedBlockAPI + FederatedRealmAPI FederatedRealmAPI + NextAvailableDelegationAPI NextAvailableDelegationAPI + 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.ConfigGenAPI = (*ConfigGenAPIService)(&c.Common) + c.DelegationAPI = (*DelegationAPIService)(&c.Common) + c.FederatedBlockAPI = (*FederatedBlockAPIService)(&c.Common) + c.FederatedRealmAPI = (*FederatedRealmAPIService)(&c.Common) + c.NextAvailableDelegationAPI = (*NextAvailableDelegationAPIService)(&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/ConfigGenAPI.md b/ipamfederation/docs/ConfigGenAPI.md new file mode 100644 index 0000000..5e9bafe --- /dev/null +++ b/ipamfederation/docs/ConfigGenAPI.md @@ -0,0 +1,141 @@ +# ConfigGenAPI + +All URIs are relative to */api/ddi/v1* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**Fetch**](ConfigGenAPI.md#Fetch) | **Get** /federation/policy/config/{ophid}/latest | +[**UpdateConfigStatus**](ConfigGenAPI.md#UpdateConfigStatus) | **Post** /federation/policy/config_status | + + + +## Fetch + +> GenerateConfigBundleResponse Fetch(ctx, ophid).Execute() + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + + "github.com/infobloxopen/bloxone-go-client/ipamfederation" +) + +func main() { + ophid := "ophid_example" // string | + + apiClient := ipamfederation.NewAPIClient() + resp, r, err := apiClient.ConfigGenAPI.Fetch(context.Background(), ophid).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ConfigGenAPI.Fetch``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `Fetch`: GenerateConfigBundleResponse + fmt.Fprintf(os.Stdout, "Response from `ConfigGenAPI.Fetch`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ophid** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a `ConfigGenAPIFetchRequest` struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + +### Return type + +[**GenerateConfigBundleResponse**](GenerateConfigBundleResponse.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) + + +## UpdateConfigStatus + +> HealthCheckConfigResponse UpdateConfigStatus(ctx).Body(body).Execute() + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + + "github.com/infobloxopen/bloxone-go-client/ipamfederation" +) + +func main() { + body := *ipamfederation.NewHealthConfig() // HealthConfig | + + apiClient := ipamfederation.NewAPIClient() + resp, r, err := apiClient.ConfigGenAPI.UpdateConfigStatus(context.Background()).Body(body).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ConfigGenAPI.UpdateConfigStatus``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `UpdateConfigStatus`: HealthCheckConfigResponse + fmt.Fprintf(os.Stdout, "Response from `ConfigGenAPI.UpdateConfigStatus`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a `ConfigGenAPIUpdateConfigStatusRequest` struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**body** | [**HealthConfig**](HealthConfig.md) | | + +### Return type + +[**HealthCheckConfigResponse**](HealthCheckConfigResponse.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/ConfigObject.md b/ipamfederation/docs/ConfigObject.md new file mode 100644 index 0000000..65073be --- /dev/null +++ b/ipamfederation/docs/ConfigObject.md @@ -0,0 +1,108 @@ +# ConfigObject + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ConfigBody** | Pointer to **string** | | [optional] +**Ophid** | Pointer to **string** | | [optional] +**Version** | Pointer to **string** | | [optional] + +## Methods + +### NewConfigObject + +`func NewConfigObject() *ConfigObject` + +NewConfigObject instantiates a new ConfigObject 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 + +### NewConfigObjectWithDefaults + +`func NewConfigObjectWithDefaults() *ConfigObject` + +NewConfigObjectWithDefaults instantiates a new ConfigObject 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 + +### GetConfigBody + +`func (o *ConfigObject) GetConfigBody() string` + +GetConfigBody returns the ConfigBody field if non-nil, zero value otherwise. + +### GetConfigBodyOk + +`func (o *ConfigObject) GetConfigBodyOk() (*string, bool)` + +GetConfigBodyOk returns a tuple with the ConfigBody field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetConfigBody + +`func (o *ConfigObject) SetConfigBody(v string)` + +SetConfigBody sets ConfigBody field to given value. + +### HasConfigBody + +`func (o *ConfigObject) HasConfigBody() bool` + +HasConfigBody returns a boolean if a field has been set. + +### GetOphid + +`func (o *ConfigObject) GetOphid() string` + +GetOphid returns the Ophid field if non-nil, zero value otherwise. + +### GetOphidOk + +`func (o *ConfigObject) GetOphidOk() (*string, bool)` + +GetOphidOk returns a tuple with the Ophid field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetOphid + +`func (o *ConfigObject) SetOphid(v string)` + +SetOphid sets Ophid field to given value. + +### HasOphid + +`func (o *ConfigObject) HasOphid() bool` + +HasOphid returns a boolean if a field has been set. + +### GetVersion + +`func (o *ConfigObject) GetVersion() string` + +GetVersion returns the Version field if non-nil, zero value otherwise. + +### GetVersionOk + +`func (o *ConfigObject) GetVersionOk() (*string, bool)` + +GetVersionOk returns a tuple with the Version field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetVersion + +`func (o *ConfigObject) SetVersion(v string)` + +SetVersion sets Version field to given value. + +### HasVersion + +`func (o *ConfigObject) HasVersion() bool` + +HasVersion 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/CreateDelegationResponse.md b/ipamfederation/docs/CreateDelegationResponse.md new file mode 100644 index 0000000..4ed7ec3 --- /dev/null +++ b/ipamfederation/docs/CreateDelegationResponse.md @@ -0,0 +1,56 @@ +# CreateDelegationResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Result** | Pointer to [**Delegation**](Delegation.md) | The created Delegation object. | [optional] + +## Methods + +### NewCreateDelegationResponse + +`func NewCreateDelegationResponse() *CreateDelegationResponse` + +NewCreateDelegationResponse instantiates a new CreateDelegationResponse 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 + +### NewCreateDelegationResponseWithDefaults + +`func NewCreateDelegationResponseWithDefaults() *CreateDelegationResponse` + +NewCreateDelegationResponseWithDefaults instantiates a new CreateDelegationResponse 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 *CreateDelegationResponse) GetResult() Delegation` + +GetResult returns the Result field if non-nil, zero value otherwise. + +### GetResultOk + +`func (o *CreateDelegationResponse) GetResultOk() (*Delegation, 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 *CreateDelegationResponse) SetResult(v Delegation)` + +SetResult sets Result field to given value. + +### HasResult + +`func (o *CreateDelegationResponse) 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/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/Delegation.md b/ipamfederation/docs/Delegation.md new file mode 100644 index 0000000..caa9f89 --- /dev/null +++ b/ipamfederation/docs/Delegation.md @@ -0,0 +1,332 @@ +# Delegation + +## 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 delegation. This is required, if _address_ does not specify it in its input. | [optional] +**Comment** | Pointer to **string** | The description for the delegation. 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] +**DelegatedTo** | Pointer to **string** | The specific IPAM service the delegation was delegated to. | [optional] +**FederatedRealms** | **[]string** | The resource identifier. | +**Id** | Pointer to **string** | The resource identifier. | [optional] [readonly] +**Name** | Pointer to **string** | The name of the delegation. May contain 1 to 256 characters. Can include UTF-8. | [optional] +**Parents** | Pointer to **[]string** | The resource identifier. | [optional] +**Protocol** | Pointer to **string** | The type of protocol of delegation (_ip4_ or _ip6_). | [optional] [readonly] +**Tags** | Pointer to **map[string]interface{}** | The tags for the delegation 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 + +### NewDelegation + +`func NewDelegation(address string, federatedRealms []string, ) *Delegation` + +NewDelegation instantiates a new Delegation 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 + +### NewDelegationWithDefaults + +`func NewDelegationWithDefaults() *Delegation` + +NewDelegationWithDefaults instantiates a new Delegation 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 *Delegation) GetAddress() string` + +GetAddress returns the Address field if non-nil, zero value otherwise. + +### GetAddressOk + +`func (o *Delegation) 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 *Delegation) SetAddress(v string)` + +SetAddress sets Address field to given value. + + +### GetCidr + +`func (o *Delegation) GetCidr() int64` + +GetCidr returns the Cidr field if non-nil, zero value otherwise. + +### GetCidrOk + +`func (o *Delegation) 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 *Delegation) SetCidr(v int64)` + +SetCidr sets Cidr field to given value. + +### HasCidr + +`func (o *Delegation) HasCidr() bool` + +HasCidr returns a boolean if a field has been set. + +### GetComment + +`func (o *Delegation) GetComment() string` + +GetComment returns the Comment field if non-nil, zero value otherwise. + +### GetCommentOk + +`func (o *Delegation) 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 *Delegation) SetComment(v string)` + +SetComment sets Comment field to given value. + +### HasComment + +`func (o *Delegation) HasComment() bool` + +HasComment returns a boolean if a field has been set. + +### GetCreatedAt + +`func (o *Delegation) GetCreatedAt() time.Time` + +GetCreatedAt returns the CreatedAt field if non-nil, zero value otherwise. + +### GetCreatedAtOk + +`func (o *Delegation) 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 *Delegation) SetCreatedAt(v time.Time)` + +SetCreatedAt sets CreatedAt field to given value. + +### HasCreatedAt + +`func (o *Delegation) HasCreatedAt() bool` + +HasCreatedAt returns a boolean if a field has been set. + +### GetDelegatedTo + +`func (o *Delegation) GetDelegatedTo() string` + +GetDelegatedTo returns the DelegatedTo field if non-nil, zero value otherwise. + +### GetDelegatedToOk + +`func (o *Delegation) GetDelegatedToOk() (*string, bool)` + +GetDelegatedToOk returns a tuple with the DelegatedTo field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDelegatedTo + +`func (o *Delegation) SetDelegatedTo(v string)` + +SetDelegatedTo sets DelegatedTo field to given value. + +### HasDelegatedTo + +`func (o *Delegation) HasDelegatedTo() bool` + +HasDelegatedTo returns a boolean if a field has been set. + +### GetFederatedRealms + +`func (o *Delegation) GetFederatedRealms() []string` + +GetFederatedRealms returns the FederatedRealms field if non-nil, zero value otherwise. + +### GetFederatedRealmsOk + +`func (o *Delegation) GetFederatedRealmsOk() (*[]string, bool)` + +GetFederatedRealmsOk returns a tuple with the FederatedRealms field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetFederatedRealms + +`func (o *Delegation) SetFederatedRealms(v []string)` + +SetFederatedRealms sets FederatedRealms field to given value. + + +### GetId + +`func (o *Delegation) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *Delegation) 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 *Delegation) SetId(v string)` + +SetId sets Id field to given value. + +### HasId + +`func (o *Delegation) HasId() bool` + +HasId returns a boolean if a field has been set. + +### GetName + +`func (o *Delegation) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *Delegation) 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 *Delegation) SetName(v string)` + +SetName sets Name field to given value. + +### HasName + +`func (o *Delegation) HasName() bool` + +HasName returns a boolean if a field has been set. + +### GetParents + +`func (o *Delegation) GetParents() []string` + +GetParents returns the Parents field if non-nil, zero value otherwise. + +### GetParentsOk + +`func (o *Delegation) GetParentsOk() (*[]string, bool)` + +GetParentsOk returns a tuple with the Parents field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetParents + +`func (o *Delegation) SetParents(v []string)` + +SetParents sets Parents field to given value. + +### HasParents + +`func (o *Delegation) HasParents() bool` + +HasParents returns a boolean if a field has been set. + +### GetProtocol + +`func (o *Delegation) GetProtocol() string` + +GetProtocol returns the Protocol field if non-nil, zero value otherwise. + +### GetProtocolOk + +`func (o *Delegation) 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 *Delegation) SetProtocol(v string)` + +SetProtocol sets Protocol field to given value. + +### HasProtocol + +`func (o *Delegation) HasProtocol() bool` + +HasProtocol returns a boolean if a field has been set. + +### GetTags + +`func (o *Delegation) GetTags() map[string]interface{}` + +GetTags returns the Tags field if non-nil, zero value otherwise. + +### GetTagsOk + +`func (o *Delegation) 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 *Delegation) SetTags(v map[string]interface{})` + +SetTags sets Tags field to given value. + +### HasTags + +`func (o *Delegation) HasTags() bool` + +HasTags returns a boolean if a field has been set. + +### GetUpdatedAt + +`func (o *Delegation) GetUpdatedAt() time.Time` + +GetUpdatedAt returns the UpdatedAt field if non-nil, zero value otherwise. + +### GetUpdatedAtOk + +`func (o *Delegation) 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 *Delegation) SetUpdatedAt(v time.Time)` + +SetUpdatedAt sets UpdatedAt field to given value. + +### HasUpdatedAt + +`func (o *Delegation) 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/DelegationAPI.md b/ipamfederation/docs/DelegationAPI.md new file mode 100644 index 0000000..0e9cdff --- /dev/null +++ b/ipamfederation/docs/DelegationAPI.md @@ -0,0 +1,486 @@ +# DelegationAPI + +All URIs are relative to */api/ddi/v1* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**Bulk**](DelegationAPI.md#Bulk) | **Post** /federation/delegation_bulk | Execute multiple operations on delegation objects. +[**Create**](DelegationAPI.md#Create) | **Post** /federation/delegation | Create the delegation. +[**Delete**](DelegationAPI.md#Delete) | **Delete** /federation/delegation/{id} | Delete the delegation. +[**DeleteWithoutId**](DelegationAPI.md#DeleteWithoutId) | **Delete** /federation/delegation | No-op DELETE Delegation operation. +[**List**](DelegationAPI.md#List) | **Get** /federation/delegation | Retrieve the delegation. +[**Read**](DelegationAPI.md#Read) | **Get** /federation/delegation/{id} | Retrieve the delegation. +[**Update**](DelegationAPI.md#Update) | **Patch** /federation/delegation/{id} | Update the delegation. + + + +## Bulk + +> DelegationBulkResponse Bulk(ctx).Body(body).Execute() + +Execute multiple operations on delegation objects. + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + + "github.com/infobloxopen/bloxone-go-client/ipamfederation" +) + +func main() { + body := *ipamfederation.NewDelegationBulkRequest() // DelegationBulkRequest | + + apiClient := ipamfederation.NewAPIClient() + resp, r, err := apiClient.DelegationAPI.Bulk(context.Background()).Body(body).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DelegationAPI.Bulk``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `Bulk`: DelegationBulkResponse + fmt.Fprintf(os.Stdout, "Response from `DelegationAPI.Bulk`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a `DelegationAPIBulkRequest` struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**body** | [**DelegationBulkRequest**](DelegationBulkRequest.md) | | + +### Return type + +[**DelegationBulkResponse**](DelegationBulkResponse.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) + + +## Create + +> CreateDelegationResponse Create(ctx).Body(body).Execute() + +Create the delegation. + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + + "github.com/infobloxopen/bloxone-go-client/ipamfederation" +) + +func main() { + body := *ipamfederation.NewDelegation("Address_example", []string{"FederatedRealms_example"}) // Delegation | + + apiClient := ipamfederation.NewAPIClient() + resp, r, err := apiClient.DelegationAPI.Create(context.Background()).Body(body).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DelegationAPI.Create``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `Create`: CreateDelegationResponse + fmt.Fprintf(os.Stdout, "Response from `DelegationAPI.Create`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a `DelegationAPICreateRequest` struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**body** | [**Delegation**](Delegation.md) | | + +### Return type + +[**CreateDelegationResponse**](CreateDelegationResponse.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 delegation. + + + +### 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.DelegationAPI.Delete(context.Background(), id).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DelegationAPI.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 `DelegationAPIDeleteRequest` 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) + + +## DeleteWithoutId + +> DeleteWithoutId(ctx).Execute() + +No-op DELETE Delegation operation. + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + + "github.com/infobloxopen/bloxone-go-client/ipamfederation" +) + +func main() { + + apiClient := ipamfederation.NewAPIClient() + r, err := apiClient.DelegationAPI.DeleteWithoutId(context.Background()).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DelegationAPI.DeleteWithoutId``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } +} +``` + +### Path Parameters + +This endpoint does not need any parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a `DelegationAPIDeleteWithoutIdRequest` struct via the builder pattern + + +### 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 + +> ListDelegationResponse List(ctx).Fields(fields).Filter(filter).Offset(offset).Limit(limit).PageToken(pageToken).OrderBy(orderBy).TorderBy(torderBy).Tfilter(tfilter).Execute() + +Retrieve the delegation. + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + + "github.com/infobloxopen/bloxone-go-client/ipamfederation" +) + +func main() { + + apiClient := ipamfederation.NewAPIClient() + resp, r, err := apiClient.DelegationAPI.List(context.Background()).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DelegationAPI.List``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `List`: ListDelegationResponse + fmt.Fprintf(os.Stdout, "Response from `DelegationAPI.List`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a `DelegationAPIListRequest` 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 + +[**ListDelegationResponse**](ListDelegationResponse.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 + +> ReadDelegationResponse Read(ctx, id).Fields(fields).Execute() + +Retrieve the delegation. + + + +### 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.DelegationAPI.Read(context.Background(), id).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DelegationAPI.Read``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `Read`: ReadDelegationResponse + fmt.Fprintf(os.Stdout, "Response from `DelegationAPI.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 `DelegationAPIReadRequest` 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 + +[**ReadDelegationResponse**](ReadDelegationResponse.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 + +> UpdateDelegationResponse Update(ctx, id).Body(body).Execute() + +Update the delegation. + + + +### 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.NewDelegation("Address_example", []string{"FederatedRealms_example"}) // Delegation | + + apiClient := ipamfederation.NewAPIClient() + resp, r, err := apiClient.DelegationAPI.Update(context.Background(), id).Body(body).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DelegationAPI.Update``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `Update`: UpdateDelegationResponse + fmt.Fprintf(os.Stdout, "Response from `DelegationAPI.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 `DelegationAPIUpdateRequest` struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**body** | [**Delegation**](Delegation.md) | | + +### Return type + +[**UpdateDelegationResponse**](UpdateDelegationResponse.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/DelegationBulkItem.md b/ipamfederation/docs/DelegationBulkItem.md new file mode 100644 index 0000000..253115a --- /dev/null +++ b/ipamfederation/docs/DelegationBulkItem.md @@ -0,0 +1,82 @@ +# DelegationBulkItem + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Action** | Pointer to **string** | Type of action to execute on Delegation object. Valid values are: * _POST_ * _PATCH_ * _DELETE_ | [optional] +**Delegation** | Pointer to [**Delegation**](Delegation.md) | The Delegation object to execute the action on. | [optional] + +## Methods + +### NewDelegationBulkItem + +`func NewDelegationBulkItem() *DelegationBulkItem` + +NewDelegationBulkItem instantiates a new DelegationBulkItem 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 + +### NewDelegationBulkItemWithDefaults + +`func NewDelegationBulkItemWithDefaults() *DelegationBulkItem` + +NewDelegationBulkItemWithDefaults instantiates a new DelegationBulkItem 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 + +### GetAction + +`func (o *DelegationBulkItem) GetAction() string` + +GetAction returns the Action field if non-nil, zero value otherwise. + +### GetActionOk + +`func (o *DelegationBulkItem) GetActionOk() (*string, bool)` + +GetActionOk returns a tuple with the Action field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAction + +`func (o *DelegationBulkItem) SetAction(v string)` + +SetAction sets Action field to given value. + +### HasAction + +`func (o *DelegationBulkItem) HasAction() bool` + +HasAction returns a boolean if a field has been set. + +### GetDelegation + +`func (o *DelegationBulkItem) GetDelegation() Delegation` + +GetDelegation returns the Delegation field if non-nil, zero value otherwise. + +### GetDelegationOk + +`func (o *DelegationBulkItem) GetDelegationOk() (*Delegation, bool)` + +GetDelegationOk returns a tuple with the Delegation field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDelegation + +`func (o *DelegationBulkItem) SetDelegation(v Delegation)` + +SetDelegation sets Delegation field to given value. + +### HasDelegation + +`func (o *DelegationBulkItem) HasDelegation() bool` + +HasDelegation 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/DelegationBulkRequest.md b/ipamfederation/docs/DelegationBulkRequest.md new file mode 100644 index 0000000..b15a072 --- /dev/null +++ b/ipamfederation/docs/DelegationBulkRequest.md @@ -0,0 +1,82 @@ +# DelegationBulkRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Delegations** | Pointer to [**[]DelegationBulkItem**](DelegationBulkItem.md) | list of action/delegation requests to execute. | [optional] +**Fields** | Pointer to [**ProtobufFieldMask**](ProtobufFieldMask.md) | | [optional] + +## Methods + +### NewDelegationBulkRequest + +`func NewDelegationBulkRequest() *DelegationBulkRequest` + +NewDelegationBulkRequest instantiates a new DelegationBulkRequest 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 + +### NewDelegationBulkRequestWithDefaults + +`func NewDelegationBulkRequestWithDefaults() *DelegationBulkRequest` + +NewDelegationBulkRequestWithDefaults instantiates a new DelegationBulkRequest 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 + +### GetDelegations + +`func (o *DelegationBulkRequest) GetDelegations() []DelegationBulkItem` + +GetDelegations returns the Delegations field if non-nil, zero value otherwise. + +### GetDelegationsOk + +`func (o *DelegationBulkRequest) GetDelegationsOk() (*[]DelegationBulkItem, bool)` + +GetDelegationsOk returns a tuple with the Delegations field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDelegations + +`func (o *DelegationBulkRequest) SetDelegations(v []DelegationBulkItem)` + +SetDelegations sets Delegations field to given value. + +### HasDelegations + +`func (o *DelegationBulkRequest) HasDelegations() bool` + +HasDelegations returns a boolean if a field has been set. + +### GetFields + +`func (o *DelegationBulkRequest) GetFields() ProtobufFieldMask` + +GetFields returns the Fields field if non-nil, zero value otherwise. + +### GetFieldsOk + +`func (o *DelegationBulkRequest) GetFieldsOk() (*ProtobufFieldMask, bool)` + +GetFieldsOk returns a tuple with the Fields field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetFields + +`func (o *DelegationBulkRequest) SetFields(v ProtobufFieldMask)` + +SetFields sets Fields field to given value. + +### HasFields + +`func (o *DelegationBulkRequest) HasFields() bool` + +HasFields 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/DelegationBulkResponse.md b/ipamfederation/docs/DelegationBulkResponse.md new file mode 100644 index 0000000..985f452 --- /dev/null +++ b/ipamfederation/docs/DelegationBulkResponse.md @@ -0,0 +1,56 @@ +# DelegationBulkResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Results** | Pointer to [**[]Delegation**](Delegation.md) | A list of Delegation objects. | [optional] + +## Methods + +### NewDelegationBulkResponse + +`func NewDelegationBulkResponse() *DelegationBulkResponse` + +NewDelegationBulkResponse instantiates a new DelegationBulkResponse 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 + +### NewDelegationBulkResponseWithDefaults + +`func NewDelegationBulkResponseWithDefaults() *DelegationBulkResponse` + +NewDelegationBulkResponseWithDefaults instantiates a new DelegationBulkResponse 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 *DelegationBulkResponse) GetResults() []Delegation` + +GetResults returns the Results field if non-nil, zero value otherwise. + +### GetResultsOk + +`func (o *DelegationBulkResponse) GetResultsOk() (*[]Delegation, 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 *DelegationBulkResponse) SetResults(v []Delegation)` + +SetResults sets Results field to given value. + +### HasResults + +`func (o *DelegationBulkResponse) 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/FederatedBlock.md b/ipamfederation/docs/FederatedBlock.md new file mode 100644 index 0000000..95d6683 --- /dev/null +++ b/ipamfederation/docs/FederatedBlock.md @@ -0,0 +1,332 @@ +# FederatedBlock + +## 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”. | +**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** | **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] +**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(address string, federatedRealm string, ) *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. + + +### 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. + + +### 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..719b865 --- /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("Address_example", "FederatedRealm_example") // 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("Address_example", "FederatedRealm_example") // 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/GenerateConfigBundleResponse.md b/ipamfederation/docs/GenerateConfigBundleResponse.md new file mode 100644 index 0000000..50f3539 --- /dev/null +++ b/ipamfederation/docs/GenerateConfigBundleResponse.md @@ -0,0 +1,56 @@ +# GenerateConfigBundleResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Config** | Pointer to [**ConfigObject**](ConfigObject.md) | | [optional] + +## Methods + +### NewGenerateConfigBundleResponse + +`func NewGenerateConfigBundleResponse() *GenerateConfigBundleResponse` + +NewGenerateConfigBundleResponse instantiates a new GenerateConfigBundleResponse 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 + +### NewGenerateConfigBundleResponseWithDefaults + +`func NewGenerateConfigBundleResponseWithDefaults() *GenerateConfigBundleResponse` + +NewGenerateConfigBundleResponseWithDefaults instantiates a new GenerateConfigBundleResponse 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 + +### GetConfig + +`func (o *GenerateConfigBundleResponse) GetConfig() ConfigObject` + +GetConfig returns the Config field if non-nil, zero value otherwise. + +### GetConfigOk + +`func (o *GenerateConfigBundleResponse) GetConfigOk() (*ConfigObject, bool)` + +GetConfigOk returns a tuple with the Config field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetConfig + +`func (o *GenerateConfigBundleResponse) SetConfig(v ConfigObject)` + +SetConfig sets Config field to given value. + +### HasConfig + +`func (o *GenerateConfigBundleResponse) HasConfig() bool` + +HasConfig 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/GetNextAvailableDelegationRequest.md b/ipamfederation/docs/GetNextAvailableDelegationRequest.md new file mode 100644 index 0000000..d2325c6 --- /dev/null +++ b/ipamfederation/docs/GetNextAvailableDelegationRequest.md @@ -0,0 +1,82 @@ +# GetNextAvailableDelegationRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Arguments** | Pointer to [**NextAvailableDelegationArguments**](NextAvailableDelegationArguments.md) | The arguments which will be used as parameters while creating __Delegation__ object. | [optional] +**Properties** | Pointer to [**NextAvailableDelegationProperties**](NextAvailableDelegationProperties.md) | The properties, which will be used to fill the created __Delegation__ object. | [optional] + +## Methods + +### NewGetNextAvailableDelegationRequest + +`func NewGetNextAvailableDelegationRequest() *GetNextAvailableDelegationRequest` + +NewGetNextAvailableDelegationRequest instantiates a new GetNextAvailableDelegationRequest 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 + +### NewGetNextAvailableDelegationRequestWithDefaults + +`func NewGetNextAvailableDelegationRequestWithDefaults() *GetNextAvailableDelegationRequest` + +NewGetNextAvailableDelegationRequestWithDefaults instantiates a new GetNextAvailableDelegationRequest 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 + +### GetArguments + +`func (o *GetNextAvailableDelegationRequest) GetArguments() NextAvailableDelegationArguments` + +GetArguments returns the Arguments field if non-nil, zero value otherwise. + +### GetArgumentsOk + +`func (o *GetNextAvailableDelegationRequest) GetArgumentsOk() (*NextAvailableDelegationArguments, bool)` + +GetArgumentsOk returns a tuple with the Arguments field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetArguments + +`func (o *GetNextAvailableDelegationRequest) SetArguments(v NextAvailableDelegationArguments)` + +SetArguments sets Arguments field to given value. + +### HasArguments + +`func (o *GetNextAvailableDelegationRequest) HasArguments() bool` + +HasArguments returns a boolean if a field has been set. + +### GetProperties + +`func (o *GetNextAvailableDelegationRequest) GetProperties() NextAvailableDelegationProperties` + +GetProperties returns the Properties field if non-nil, zero value otherwise. + +### GetPropertiesOk + +`func (o *GetNextAvailableDelegationRequest) GetPropertiesOk() (*NextAvailableDelegationProperties, bool)` + +GetPropertiesOk returns a tuple with the Properties field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetProperties + +`func (o *GetNextAvailableDelegationRequest) SetProperties(v NextAvailableDelegationProperties)` + +SetProperties sets Properties field to given value. + +### HasProperties + +`func (o *GetNextAvailableDelegationRequest) HasProperties() bool` + +HasProperties 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/GetNextAvailableDelegationResponse.md b/ipamfederation/docs/GetNextAvailableDelegationResponse.md new file mode 100644 index 0000000..44fef77 --- /dev/null +++ b/ipamfederation/docs/GetNextAvailableDelegationResponse.md @@ -0,0 +1,56 @@ +# GetNextAvailableDelegationResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Results** | Pointer to [**[]Delegation**](Delegation.md) | | [optional] + +## Methods + +### NewGetNextAvailableDelegationResponse + +`func NewGetNextAvailableDelegationResponse() *GetNextAvailableDelegationResponse` + +NewGetNextAvailableDelegationResponse instantiates a new GetNextAvailableDelegationResponse 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 + +### NewGetNextAvailableDelegationResponseWithDefaults + +`func NewGetNextAvailableDelegationResponseWithDefaults() *GetNextAvailableDelegationResponse` + +NewGetNextAvailableDelegationResponseWithDefaults instantiates a new GetNextAvailableDelegationResponse 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 *GetNextAvailableDelegationResponse) GetResults() []Delegation` + +GetResults returns the Results field if non-nil, zero value otherwise. + +### GetResultsOk + +`func (o *GetNextAvailableDelegationResponse) GetResultsOk() (*[]Delegation, 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 *GetNextAvailableDelegationResponse) SetResults(v []Delegation)` + +SetResults sets Results field to given value. + +### HasResults + +`func (o *GetNextAvailableDelegationResponse) 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/HealthCheckConfigResponse.md b/ipamfederation/docs/HealthCheckConfigResponse.md new file mode 100644 index 0000000..640e770 --- /dev/null +++ b/ipamfederation/docs/HealthCheckConfigResponse.md @@ -0,0 +1,56 @@ +# HealthCheckConfigResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Message** | Pointer to **string** | | [optional] + +## Methods + +### NewHealthCheckConfigResponse + +`func NewHealthCheckConfigResponse() *HealthCheckConfigResponse` + +NewHealthCheckConfigResponse instantiates a new HealthCheckConfigResponse 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 + +### NewHealthCheckConfigResponseWithDefaults + +`func NewHealthCheckConfigResponseWithDefaults() *HealthCheckConfigResponse` + +NewHealthCheckConfigResponseWithDefaults instantiates a new HealthCheckConfigResponse 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 + +### GetMessage + +`func (o *HealthCheckConfigResponse) GetMessage() string` + +GetMessage returns the Message field if non-nil, zero value otherwise. + +### GetMessageOk + +`func (o *HealthCheckConfigResponse) GetMessageOk() (*string, bool)` + +GetMessageOk returns a tuple with the Message field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMessage + +`func (o *HealthCheckConfigResponse) SetMessage(v string)` + +SetMessage sets Message field to given value. + +### HasMessage + +`func (o *HealthCheckConfigResponse) HasMessage() bool` + +HasMessage 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/HealthConfig.md b/ipamfederation/docs/HealthConfig.md new file mode 100644 index 0000000..50aa358 --- /dev/null +++ b/ipamfederation/docs/HealthConfig.md @@ -0,0 +1,160 @@ +# HealthConfig + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AppName** | Pointer to **string** | | [optional] +**Message** | Pointer to **string** | | [optional] +**Ophid** | Pointer to **string** | | [optional] +**StatusCode** | Pointer to [**HealthConfigStatusCode**](HealthConfigStatusCode.md) | | [optional] [default to HEALTHCONFIGSTATUSCODE_SUCCESS] +**Version** | Pointer to **string** | | [optional] + +## Methods + +### NewHealthConfig + +`func NewHealthConfig() *HealthConfig` + +NewHealthConfig instantiates a new HealthConfig 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 + +### NewHealthConfigWithDefaults + +`func NewHealthConfigWithDefaults() *HealthConfig` + +NewHealthConfigWithDefaults instantiates a new HealthConfig 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 + +### GetAppName + +`func (o *HealthConfig) GetAppName() string` + +GetAppName returns the AppName field if non-nil, zero value otherwise. + +### GetAppNameOk + +`func (o *HealthConfig) GetAppNameOk() (*string, bool)` + +GetAppNameOk returns a tuple with the AppName field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAppName + +`func (o *HealthConfig) SetAppName(v string)` + +SetAppName sets AppName field to given value. + +### HasAppName + +`func (o *HealthConfig) HasAppName() bool` + +HasAppName returns a boolean if a field has been set. + +### GetMessage + +`func (o *HealthConfig) GetMessage() string` + +GetMessage returns the Message field if non-nil, zero value otherwise. + +### GetMessageOk + +`func (o *HealthConfig) GetMessageOk() (*string, bool)` + +GetMessageOk returns a tuple with the Message field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMessage + +`func (o *HealthConfig) SetMessage(v string)` + +SetMessage sets Message field to given value. + +### HasMessage + +`func (o *HealthConfig) HasMessage() bool` + +HasMessage returns a boolean if a field has been set. + +### GetOphid + +`func (o *HealthConfig) GetOphid() string` + +GetOphid returns the Ophid field if non-nil, zero value otherwise. + +### GetOphidOk + +`func (o *HealthConfig) GetOphidOk() (*string, bool)` + +GetOphidOk returns a tuple with the Ophid field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetOphid + +`func (o *HealthConfig) SetOphid(v string)` + +SetOphid sets Ophid field to given value. + +### HasOphid + +`func (o *HealthConfig) HasOphid() bool` + +HasOphid returns a boolean if a field has been set. + +### GetStatusCode + +`func (o *HealthConfig) GetStatusCode() HealthConfigStatusCode` + +GetStatusCode returns the StatusCode field if non-nil, zero value otherwise. + +### GetStatusCodeOk + +`func (o *HealthConfig) GetStatusCodeOk() (*HealthConfigStatusCode, bool)` + +GetStatusCodeOk returns a tuple with the StatusCode field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetStatusCode + +`func (o *HealthConfig) SetStatusCode(v HealthConfigStatusCode)` + +SetStatusCode sets StatusCode field to given value. + +### HasStatusCode + +`func (o *HealthConfig) HasStatusCode() bool` + +HasStatusCode returns a boolean if a field has been set. + +### GetVersion + +`func (o *HealthConfig) GetVersion() string` + +GetVersion returns the Version field if non-nil, zero value otherwise. + +### GetVersionOk + +`func (o *HealthConfig) GetVersionOk() (*string, bool)` + +GetVersionOk returns a tuple with the Version field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetVersion + +`func (o *HealthConfig) SetVersion(v string)` + +SetVersion sets Version field to given value. + +### HasVersion + +`func (o *HealthConfig) HasVersion() bool` + +HasVersion 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/HealthConfigStatusCode.md b/ipamfederation/docs/HealthConfigStatusCode.md new file mode 100644 index 0000000..942a869 --- /dev/null +++ b/ipamfederation/docs/HealthConfigStatusCode.md @@ -0,0 +1,21 @@ +# HealthConfigStatusCode + +## Enum + + +* `SUCCESS` (value: `"StatusCode_SUCCESS"`) + +* `GENERAL_FAILURE` (value: `"StatusCode_GENERAL_FAILURE"`) + +* `HASH_FAILURE` (value: `"StatusCode_HASH_FAILURE"`) + +* `VALIDATION_FAILURE` (value: `"StatusCode_VALIDATION_FAILURE"`) + +* `COPY_FAILURE` (value: `"StatusCode_COPY_FAILURE"`) + +* `RELOAD_FAILIURE` (value: `"StatusCode_RELOAD_FAILIURE"`) + + +[[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/ListDelegationResponse.md b/ipamfederation/docs/ListDelegationResponse.md new file mode 100644 index 0000000..7e8a2bc --- /dev/null +++ b/ipamfederation/docs/ListDelegationResponse.md @@ -0,0 +1,56 @@ +# ListDelegationResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Results** | Pointer to [**[]Delegation**](Delegation.md) | A list of Delegation objects. | [optional] + +## Methods + +### NewListDelegationResponse + +`func NewListDelegationResponse() *ListDelegationResponse` + +NewListDelegationResponse instantiates a new ListDelegationResponse 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 + +### NewListDelegationResponseWithDefaults + +`func NewListDelegationResponseWithDefaults() *ListDelegationResponse` + +NewListDelegationResponseWithDefaults instantiates a new ListDelegationResponse 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 *ListDelegationResponse) GetResults() []Delegation` + +GetResults returns the Results field if non-nil, zero value otherwise. + +### GetResultsOk + +`func (o *ListDelegationResponse) GetResultsOk() (*[]Delegation, 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 *ListDelegationResponse) SetResults(v []Delegation)` + +SetResults sets Results field to given value. + +### HasResults + +`func (o *ListDelegationResponse) 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/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/NextAvailableDelegationAPI.md b/ipamfederation/docs/NextAvailableDelegationAPI.md new file mode 100644 index 0000000..410c774 --- /dev/null +++ b/ipamfederation/docs/NextAvailableDelegationAPI.md @@ -0,0 +1,75 @@ +# NextAvailableDelegationAPI + +All URIs are relative to */api/ddi/v1* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**GetNextAvailableDelegation**](NextAvailableDelegationAPI.md#GetNextAvailableDelegation) | **Post** /federation/next_available_delegation | Retrieve the next available delegation. + + + +## GetNextAvailableDelegation + +> GetNextAvailableDelegationResponse GetNextAvailableDelegation(ctx).Body(body).Execute() + +Retrieve the next available delegation. + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + + "github.com/infobloxopen/bloxone-go-client/ipamfederation" +) + +func main() { + body := *ipamfederation.NewGetNextAvailableDelegationRequest() // GetNextAvailableDelegationRequest | + + apiClient := ipamfederation.NewAPIClient() + resp, r, err := apiClient.NextAvailableDelegationAPI.GetNextAvailableDelegation(context.Background()).Body(body).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `NextAvailableDelegationAPI.GetNextAvailableDelegation``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetNextAvailableDelegation`: GetNextAvailableDelegationResponse + fmt.Fprintf(os.Stdout, "Response from `NextAvailableDelegationAPI.GetNextAvailableDelegation`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a `NextAvailableDelegationAPIGetNextAvailableDelegationRequest` struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**body** | [**GetNextAvailableDelegationRequest**](GetNextAvailableDelegationRequest.md) | | + +### Return type + +[**GetNextAvailableDelegationResponse**](GetNextAvailableDelegationResponse.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/NextAvailableDelegationArguments.md b/ipamfederation/docs/NextAvailableDelegationArguments.md new file mode 100644 index 0000000..ec738ea --- /dev/null +++ b/ipamfederation/docs/NextAvailableDelegationArguments.md @@ -0,0 +1,160 @@ +# NextAvailableDelegationArguments + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Cidr** | Pointer to **int64** | The CIDR of the delegation to be created. This is required, if _address_ does not specify it in its input. | [optional] +**Count** | Pointer to **int64** | The count of __Delegation__ required. If not provided, it will default to 1. | [optional] +**FederatedRealms** | Pointer to **[]string** | The resource identifier. | [optional] +**Predicates** | Pointer to **map[string]interface{}** | It contains the map of attributes and the associated value. | [optional] +**ReadOnly** | Pointer to **bool** | The field which denotes if the __Delegation__ will be provisioned or just calculated and returned. | [optional] + +## Methods + +### NewNextAvailableDelegationArguments + +`func NewNextAvailableDelegationArguments() *NextAvailableDelegationArguments` + +NewNextAvailableDelegationArguments instantiates a new NextAvailableDelegationArguments 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 + +### NewNextAvailableDelegationArgumentsWithDefaults + +`func NewNextAvailableDelegationArgumentsWithDefaults() *NextAvailableDelegationArguments` + +NewNextAvailableDelegationArgumentsWithDefaults instantiates a new NextAvailableDelegationArguments 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 *NextAvailableDelegationArguments) GetCidr() int64` + +GetCidr returns the Cidr field if non-nil, zero value otherwise. + +### GetCidrOk + +`func (o *NextAvailableDelegationArguments) 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 *NextAvailableDelegationArguments) SetCidr(v int64)` + +SetCidr sets Cidr field to given value. + +### HasCidr + +`func (o *NextAvailableDelegationArguments) HasCidr() bool` + +HasCidr returns a boolean if a field has been set. + +### GetCount + +`func (o *NextAvailableDelegationArguments) GetCount() int64` + +GetCount returns the Count field if non-nil, zero value otherwise. + +### GetCountOk + +`func (o *NextAvailableDelegationArguments) 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 *NextAvailableDelegationArguments) SetCount(v int64)` + +SetCount sets Count field to given value. + +### HasCount + +`func (o *NextAvailableDelegationArguments) HasCount() bool` + +HasCount returns a boolean if a field has been set. + +### GetFederatedRealms + +`func (o *NextAvailableDelegationArguments) GetFederatedRealms() []string` + +GetFederatedRealms returns the FederatedRealms field if non-nil, zero value otherwise. + +### GetFederatedRealmsOk + +`func (o *NextAvailableDelegationArguments) GetFederatedRealmsOk() (*[]string, bool)` + +GetFederatedRealmsOk returns a tuple with the FederatedRealms field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetFederatedRealms + +`func (o *NextAvailableDelegationArguments) SetFederatedRealms(v []string)` + +SetFederatedRealms sets FederatedRealms field to given value. + +### HasFederatedRealms + +`func (o *NextAvailableDelegationArguments) HasFederatedRealms() bool` + +HasFederatedRealms returns a boolean if a field has been set. + +### GetPredicates + +`func (o *NextAvailableDelegationArguments) GetPredicates() map[string]interface{}` + +GetPredicates returns the Predicates field if non-nil, zero value otherwise. + +### GetPredicatesOk + +`func (o *NextAvailableDelegationArguments) GetPredicatesOk() (*map[string]interface{}, bool)` + +GetPredicatesOk returns a tuple with the Predicates field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPredicates + +`func (o *NextAvailableDelegationArguments) SetPredicates(v map[string]interface{})` + +SetPredicates sets Predicates field to given value. + +### HasPredicates + +`func (o *NextAvailableDelegationArguments) HasPredicates() bool` + +HasPredicates returns a boolean if a field has been set. + +### GetReadOnly + +`func (o *NextAvailableDelegationArguments) GetReadOnly() bool` + +GetReadOnly returns the ReadOnly field if non-nil, zero value otherwise. + +### GetReadOnlyOk + +`func (o *NextAvailableDelegationArguments) GetReadOnlyOk() (*bool, bool)` + +GetReadOnlyOk returns a tuple with the ReadOnly field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetReadOnly + +`func (o *NextAvailableDelegationArguments) SetReadOnly(v bool)` + +SetReadOnly sets ReadOnly field to given value. + +### HasReadOnly + +`func (o *NextAvailableDelegationArguments) HasReadOnly() bool` + +HasReadOnly 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/NextAvailableDelegationProperties.md b/ipamfederation/docs/NextAvailableDelegationProperties.md new file mode 100644 index 0000000..3883cc4 --- /dev/null +++ b/ipamfederation/docs/NextAvailableDelegationProperties.md @@ -0,0 +1,108 @@ +# NextAvailableDelegationProperties + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Comment** | Pointer to **string** | The description for the __Delegation__. May contain 0 to 1024 characters. Can include UTF-8. | [optional] +**DelegatedTo** | Pointer to **string** | The specific IPAM service the __Delegation__ was delegated to. | [optional] +**Name** | Pointer to **string** | The name to be provided. | [optional] + +## Methods + +### NewNextAvailableDelegationProperties + +`func NewNextAvailableDelegationProperties() *NextAvailableDelegationProperties` + +NewNextAvailableDelegationProperties instantiates a new NextAvailableDelegationProperties 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 + +### NewNextAvailableDelegationPropertiesWithDefaults + +`func NewNextAvailableDelegationPropertiesWithDefaults() *NextAvailableDelegationProperties` + +NewNextAvailableDelegationPropertiesWithDefaults instantiates a new NextAvailableDelegationProperties 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 + +### GetComment + +`func (o *NextAvailableDelegationProperties) GetComment() string` + +GetComment returns the Comment field if non-nil, zero value otherwise. + +### GetCommentOk + +`func (o *NextAvailableDelegationProperties) 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 *NextAvailableDelegationProperties) SetComment(v string)` + +SetComment sets Comment field to given value. + +### HasComment + +`func (o *NextAvailableDelegationProperties) HasComment() bool` + +HasComment returns a boolean if a field has been set. + +### GetDelegatedTo + +`func (o *NextAvailableDelegationProperties) GetDelegatedTo() string` + +GetDelegatedTo returns the DelegatedTo field if non-nil, zero value otherwise. + +### GetDelegatedToOk + +`func (o *NextAvailableDelegationProperties) GetDelegatedToOk() (*string, bool)` + +GetDelegatedToOk returns a tuple with the DelegatedTo field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDelegatedTo + +`func (o *NextAvailableDelegationProperties) SetDelegatedTo(v string)` + +SetDelegatedTo sets DelegatedTo field to given value. + +### HasDelegatedTo + +`func (o *NextAvailableDelegationProperties) HasDelegatedTo() bool` + +HasDelegatedTo returns a boolean if a field has been set. + +### GetName + +`func (o *NextAvailableDelegationProperties) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *NextAvailableDelegationProperties) 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 *NextAvailableDelegationProperties) SetName(v string)` + +SetName sets Name field to given value. + +### HasName + +`func (o *NextAvailableDelegationProperties) HasName() bool` + +HasName 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/ProtobufFieldMask.md b/ipamfederation/docs/ProtobufFieldMask.md new file mode 100644 index 0000000..770b011 --- /dev/null +++ b/ipamfederation/docs/ProtobufFieldMask.md @@ -0,0 +1,56 @@ +# ProtobufFieldMask + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Paths** | Pointer to **[]string** | The set of field mask paths. | [optional] + +## Methods + +### NewProtobufFieldMask + +`func NewProtobufFieldMask() *ProtobufFieldMask` + +NewProtobufFieldMask instantiates a new ProtobufFieldMask 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 + +### NewProtobufFieldMaskWithDefaults + +`func NewProtobufFieldMaskWithDefaults() *ProtobufFieldMask` + +NewProtobufFieldMaskWithDefaults instantiates a new ProtobufFieldMask 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 + +### GetPaths + +`func (o *ProtobufFieldMask) GetPaths() []string` + +GetPaths returns the Paths field if non-nil, zero value otherwise. + +### GetPathsOk + +`func (o *ProtobufFieldMask) GetPathsOk() (*[]string, bool)` + +GetPathsOk returns a tuple with the Paths field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPaths + +`func (o *ProtobufFieldMask) SetPaths(v []string)` + +SetPaths sets Paths field to given value. + +### HasPaths + +`func (o *ProtobufFieldMask) HasPaths() bool` + +HasPaths 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/ReadDelegationResponse.md b/ipamfederation/docs/ReadDelegationResponse.md new file mode 100644 index 0000000..ea74f1e --- /dev/null +++ b/ipamfederation/docs/ReadDelegationResponse.md @@ -0,0 +1,56 @@ +# ReadDelegationResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Result** | Pointer to [**Delegation**](Delegation.md) | The Delegation object. | [optional] + +## Methods + +### NewReadDelegationResponse + +`func NewReadDelegationResponse() *ReadDelegationResponse` + +NewReadDelegationResponse instantiates a new ReadDelegationResponse 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 + +### NewReadDelegationResponseWithDefaults + +`func NewReadDelegationResponseWithDefaults() *ReadDelegationResponse` + +NewReadDelegationResponseWithDefaults instantiates a new ReadDelegationResponse 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 *ReadDelegationResponse) GetResult() Delegation` + +GetResult returns the Result field if non-nil, zero value otherwise. + +### GetResultOk + +`func (o *ReadDelegationResponse) GetResultOk() (*Delegation, 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 *ReadDelegationResponse) SetResult(v Delegation)` + +SetResult sets Result field to given value. + +### HasResult + +`func (o *ReadDelegationResponse) 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/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/UpdateDelegationResponse.md b/ipamfederation/docs/UpdateDelegationResponse.md new file mode 100644 index 0000000..b57d47b --- /dev/null +++ b/ipamfederation/docs/UpdateDelegationResponse.md @@ -0,0 +1,56 @@ +# UpdateDelegationResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Result** | Pointer to [**Delegation**](Delegation.md) | The Delegation object. | [optional] + +## Methods + +### NewUpdateDelegationResponse + +`func NewUpdateDelegationResponse() *UpdateDelegationResponse` + +NewUpdateDelegationResponse instantiates a new UpdateDelegationResponse 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 + +### NewUpdateDelegationResponseWithDefaults + +`func NewUpdateDelegationResponseWithDefaults() *UpdateDelegationResponse` + +NewUpdateDelegationResponseWithDefaults instantiates a new UpdateDelegationResponse 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 *UpdateDelegationResponse) GetResult() Delegation` + +GetResult returns the Result field if non-nil, zero value otherwise. + +### GetResultOk + +`func (o *UpdateDelegationResponse) GetResultOk() (*Delegation, 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 *UpdateDelegationResponse) SetResult(v Delegation)` + +SetResult sets Result field to given value. + +### HasResult + +`func (o *UpdateDelegationResponse) 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/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_config_object.go b/ipamfederation/model_config_object.go new file mode 100644 index 0000000..6985645 --- /dev/null +++ b/ipamfederation/model_config_object.go @@ -0,0 +1,227 @@ +/* +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 ConfigObject type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ConfigObject{} + +// ConfigObject struct for ConfigObject +type ConfigObject struct { + ConfigBody *string `json:"configBody,omitempty"` + Ophid *string `json:"ophid,omitempty"` + Version *string `json:"version,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _ConfigObject ConfigObject + +// NewConfigObject instantiates a new ConfigObject 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 NewConfigObject() *ConfigObject { + this := ConfigObject{} + return &this +} + +// NewConfigObjectWithDefaults instantiates a new ConfigObject 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 NewConfigObjectWithDefaults() *ConfigObject { + this := ConfigObject{} + return &this +} + +// GetConfigBody returns the ConfigBody field value if set, zero value otherwise. +func (o *ConfigObject) GetConfigBody() string { + if o == nil || IsNil(o.ConfigBody) { + var ret string + return ret + } + return *o.ConfigBody +} + +// GetConfigBodyOk returns a tuple with the ConfigBody field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ConfigObject) GetConfigBodyOk() (*string, bool) { + if o == nil || IsNil(o.ConfigBody) { + return nil, false + } + return o.ConfigBody, true +} + +// HasConfigBody returns a boolean if a field has been set. +func (o *ConfigObject) HasConfigBody() bool { + if o != nil && !IsNil(o.ConfigBody) { + return true + } + + return false +} + +// SetConfigBody gets a reference to the given string and assigns it to the ConfigBody field. +func (o *ConfigObject) SetConfigBody(v string) { + o.ConfigBody = &v +} + +// GetOphid returns the Ophid field value if set, zero value otherwise. +func (o *ConfigObject) GetOphid() string { + if o == nil || IsNil(o.Ophid) { + var ret string + return ret + } + return *o.Ophid +} + +// GetOphidOk returns a tuple with the Ophid field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ConfigObject) GetOphidOk() (*string, bool) { + if o == nil || IsNil(o.Ophid) { + return nil, false + } + return o.Ophid, true +} + +// HasOphid returns a boolean if a field has been set. +func (o *ConfigObject) HasOphid() bool { + if o != nil && !IsNil(o.Ophid) { + return true + } + + return false +} + +// SetOphid gets a reference to the given string and assigns it to the Ophid field. +func (o *ConfigObject) SetOphid(v string) { + o.Ophid = &v +} + +// GetVersion returns the Version field value if set, zero value otherwise. +func (o *ConfigObject) GetVersion() string { + if o == nil || IsNil(o.Version) { + var ret string + return ret + } + return *o.Version +} + +// GetVersionOk returns a tuple with the Version field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ConfigObject) GetVersionOk() (*string, bool) { + if o == nil || IsNil(o.Version) { + return nil, false + } + return o.Version, true +} + +// HasVersion returns a boolean if a field has been set. +func (o *ConfigObject) HasVersion() bool { + if o != nil && !IsNil(o.Version) { + return true + } + + return false +} + +// SetVersion gets a reference to the given string and assigns it to the Version field. +func (o *ConfigObject) SetVersion(v string) { + o.Version = &v +} + +func (o ConfigObject) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ConfigObject) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.ConfigBody) { + toSerialize["configBody"] = o.ConfigBody + } + if !IsNil(o.Ophid) { + toSerialize["ophid"] = o.Ophid + } + if !IsNil(o.Version) { + toSerialize["version"] = o.Version + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *ConfigObject) UnmarshalJSON(data []byte) (err error) { + varConfigObject := _ConfigObject{} + + err = json.Unmarshal(data, &varConfigObject) + + if err != nil { + return err + } + + *o = ConfigObject(varConfigObject) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "configBody") + delete(additionalProperties, "ophid") + delete(additionalProperties, "version") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableConfigObject struct { + value *ConfigObject + isSet bool +} + +func (v NullableConfigObject) Get() *ConfigObject { + return v.value +} + +func (v *NullableConfigObject) Set(val *ConfigObject) { + v.value = val + v.isSet = true +} + +func (v NullableConfigObject) IsSet() bool { + return v.isSet +} + +func (v *NullableConfigObject) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableConfigObject(val *ConfigObject) *NullableConfigObject { + return &NullableConfigObject{value: val, isSet: true} +} + +func (v NullableConfigObject) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableConfigObject) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/ipamfederation/model_create_delegation_response.go b/ipamfederation/model_create_delegation_response.go new file mode 100644 index 0000000..207f36a --- /dev/null +++ b/ipamfederation/model_create_delegation_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 CreateDelegationResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreateDelegationResponse{} + +// CreateDelegationResponse The response format to create the __Delegation__ object. +type CreateDelegationResponse struct { + // The created Delegation object. + Result *Delegation `json:"result,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _CreateDelegationResponse CreateDelegationResponse + +// NewCreateDelegationResponse instantiates a new CreateDelegationResponse 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 NewCreateDelegationResponse() *CreateDelegationResponse { + this := CreateDelegationResponse{} + return &this +} + +// NewCreateDelegationResponseWithDefaults instantiates a new CreateDelegationResponse 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 NewCreateDelegationResponseWithDefaults() *CreateDelegationResponse { + this := CreateDelegationResponse{} + return &this +} + +// GetResult returns the Result field value if set, zero value otherwise. +func (o *CreateDelegationResponse) GetResult() Delegation { + if o == nil || IsNil(o.Result) { + var ret Delegation + 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 *CreateDelegationResponse) GetResultOk() (*Delegation, 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 *CreateDelegationResponse) HasResult() bool { + if o != nil && !IsNil(o.Result) { + return true + } + + return false +} + +// SetResult gets a reference to the given Delegation and assigns it to the Result field. +func (o *CreateDelegationResponse) SetResult(v Delegation) { + o.Result = &v +} + +func (o CreateDelegationResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CreateDelegationResponse) 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 *CreateDelegationResponse) UnmarshalJSON(data []byte) (err error) { + varCreateDelegationResponse := _CreateDelegationResponse{} + + err = json.Unmarshal(data, &varCreateDelegationResponse) + + if err != nil { + return err + } + + *o = CreateDelegationResponse(varCreateDelegationResponse) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "result") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableCreateDelegationResponse struct { + value *CreateDelegationResponse + isSet bool +} + +func (v NullableCreateDelegationResponse) Get() *CreateDelegationResponse { + return v.value +} + +func (v *NullableCreateDelegationResponse) Set(val *CreateDelegationResponse) { + v.value = val + v.isSet = true +} + +func (v NullableCreateDelegationResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableCreateDelegationResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCreateDelegationResponse(val *CreateDelegationResponse) *NullableCreateDelegationResponse { + return &NullableCreateDelegationResponse{value: val, isSet: true} +} + +func (v NullableCreateDelegationResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCreateDelegationResponse) 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_delegation.go b/ipamfederation/model_delegation.go new file mode 100644 index 0000000..83fb14c --- /dev/null +++ b/ipamfederation/model_delegation.go @@ -0,0 +1,578 @@ +/* +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 Delegation type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Delegation{} + +// Delegation A __Delegation__ object (_federation/delegation_) is a set of contiguous IP addresses with no gap, expressed as a CIDR block. A Delegation is explicitly associated with Federated Realms, and implicitly with Federated Block Parents. A Delegation in a given realm is said to be the child of the closest enclosing parent. +type Delegation 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 delegation. This is required, if _address_ does not specify it in its input. + Cidr *int64 `json:"cidr,omitempty"` + // The description for the delegation. 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 specific IPAM service the delegation was delegated to. + DelegatedTo *string `json:"delegated_to,omitempty"` + // The resource identifier. + FederatedRealms []string `json:"federated_realms"` + // The resource identifier. + Id *string `json:"id,omitempty"` + // The name of the delegation. May contain 1 to 256 characters. Can include UTF-8. + Name *string `json:"name,omitempty"` + // The resource identifier. + Parents []string `json:"parents,omitempty"` + // The type of protocol of delegation (_ip4_ or _ip6_). + Protocol *string `json:"protocol,omitempty"` + // The tags for the delegation 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 _Delegation Delegation + +// NewDelegation instantiates a new Delegation 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 NewDelegation(address string, federatedRealms []string) *Delegation { + this := Delegation{} + this.Address = address + this.FederatedRealms = federatedRealms + return &this +} + +// NewDelegationWithDefaults instantiates a new Delegation 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 NewDelegationWithDefaults() *Delegation { + this := Delegation{} + return &this +} + +// GetAddress returns the Address field value +func (o *Delegation) 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 *Delegation) GetAddressOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Address, true +} + +// SetAddress sets field value +func (o *Delegation) SetAddress(v string) { + o.Address = v +} + +// GetCidr returns the Cidr field value if set, zero value otherwise. +func (o *Delegation) 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 *Delegation) 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 *Delegation) 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 *Delegation) SetCidr(v int64) { + o.Cidr = &v +} + +// GetComment returns the Comment field value if set, zero value otherwise. +func (o *Delegation) 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 *Delegation) 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 *Delegation) 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 *Delegation) SetComment(v string) { + o.Comment = &v +} + +// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. +func (o *Delegation) 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 *Delegation) 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 *Delegation) 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 *Delegation) SetCreatedAt(v time.Time) { + o.CreatedAt = &v +} + +// GetDelegatedTo returns the DelegatedTo field value if set, zero value otherwise. +func (o *Delegation) GetDelegatedTo() string { + if o == nil || IsNil(o.DelegatedTo) { + var ret string + return ret + } + return *o.DelegatedTo +} + +// GetDelegatedToOk returns a tuple with the DelegatedTo field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Delegation) GetDelegatedToOk() (*string, bool) { + if o == nil || IsNil(o.DelegatedTo) { + return nil, false + } + return o.DelegatedTo, true +} + +// HasDelegatedTo returns a boolean if a field has been set. +func (o *Delegation) HasDelegatedTo() bool { + if o != nil && !IsNil(o.DelegatedTo) { + return true + } + + return false +} + +// SetDelegatedTo gets a reference to the given string and assigns it to the DelegatedTo field. +func (o *Delegation) SetDelegatedTo(v string) { + o.DelegatedTo = &v +} + +// GetFederatedRealms returns the FederatedRealms field value +func (o *Delegation) GetFederatedRealms() []string { + if o == nil { + var ret []string + return ret + } + + return o.FederatedRealms +} + +// GetFederatedRealmsOk returns a tuple with the FederatedRealms field value +// and a boolean to check if the value has been set. +func (o *Delegation) GetFederatedRealmsOk() ([]string, bool) { + if o == nil { + return nil, false + } + return o.FederatedRealms, true +} + +// SetFederatedRealms sets field value +func (o *Delegation) SetFederatedRealms(v []string) { + o.FederatedRealms = v +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *Delegation) 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 *Delegation) 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 *Delegation) 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 *Delegation) SetId(v string) { + o.Id = &v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *Delegation) 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 *Delegation) 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 *Delegation) 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 *Delegation) SetName(v string) { + o.Name = &v +} + +// GetParents returns the Parents field value if set, zero value otherwise. +func (o *Delegation) GetParents() []string { + if o == nil || IsNil(o.Parents) { + var ret []string + return ret + } + return o.Parents +} + +// GetParentsOk returns a tuple with the Parents field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Delegation) GetParentsOk() ([]string, bool) { + if o == nil || IsNil(o.Parents) { + return nil, false + } + return o.Parents, true +} + +// HasParents returns a boolean if a field has been set. +func (o *Delegation) HasParents() bool { + if o != nil && !IsNil(o.Parents) { + return true + } + + return false +} + +// SetParents gets a reference to the given []string and assigns it to the Parents field. +func (o *Delegation) SetParents(v []string) { + o.Parents = v +} + +// GetProtocol returns the Protocol field value if set, zero value otherwise. +func (o *Delegation) 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 *Delegation) 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 *Delegation) 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 *Delegation) SetProtocol(v string) { + o.Protocol = &v +} + +// GetTags returns the Tags field value if set, zero value otherwise. +func (o *Delegation) 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 *Delegation) 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 *Delegation) 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 *Delegation) SetTags(v map[string]interface{}) { + o.Tags = v +} + +// GetUpdatedAt returns the UpdatedAt field value if set, zero value otherwise. +func (o *Delegation) 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 *Delegation) 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 *Delegation) 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 *Delegation) SetUpdatedAt(v time.Time) { + o.UpdatedAt = &v +} + +func (o Delegation) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o Delegation) 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 + } + if !IsNil(o.DelegatedTo) { + toSerialize["delegated_to"] = o.DelegatedTo + } + toSerialize["federated_realms"] = o.FederatedRealms + if !IsNil(o.Id) { + toSerialize["id"] = o.Id + } + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.Parents) { + toSerialize["parents"] = o.Parents + } + 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 *Delegation) 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_realms", + } + + 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) + } + } + + varDelegation := _Delegation{} + + err = json.Unmarshal(data, &varDelegation) + + if err != nil { + return err + } + + *o = Delegation(varDelegation) + + 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, "delegated_to") + delete(additionalProperties, "federated_realms") + delete(additionalProperties, "id") + delete(additionalProperties, "name") + delete(additionalProperties, "parents") + delete(additionalProperties, "protocol") + delete(additionalProperties, "tags") + delete(additionalProperties, "updated_at") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableDelegation struct { + value *Delegation + isSet bool +} + +func (v NullableDelegation) Get() *Delegation { + return v.value +} + +func (v *NullableDelegation) Set(val *Delegation) { + v.value = val + v.isSet = true +} + +func (v NullableDelegation) IsSet() bool { + return v.isSet +} + +func (v *NullableDelegation) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDelegation(val *Delegation) *NullableDelegation { + return &NullableDelegation{value: val, isSet: true} +} + +func (v NullableDelegation) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDelegation) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/ipamfederation/model_delegation_bulk_item.go b/ipamfederation/model_delegation_bulk_item.go new file mode 100644 index 0000000..675bfbf --- /dev/null +++ b/ipamfederation/model_delegation_bulk_item.go @@ -0,0 +1,192 @@ +/* +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 DelegationBulkItem type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &DelegationBulkItem{} + +// DelegationBulkItem DelegationBulkItem object. +type DelegationBulkItem struct { + // Type of action to execute on Delegation object. Valid values are: * _POST_ * _PATCH_ * _DELETE_ + Action *string `json:"action,omitempty"` + // The Delegation object to execute the action on. + Delegation *Delegation `json:"delegation,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _DelegationBulkItem DelegationBulkItem + +// NewDelegationBulkItem instantiates a new DelegationBulkItem 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 NewDelegationBulkItem() *DelegationBulkItem { + this := DelegationBulkItem{} + return &this +} + +// NewDelegationBulkItemWithDefaults instantiates a new DelegationBulkItem 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 NewDelegationBulkItemWithDefaults() *DelegationBulkItem { + this := DelegationBulkItem{} + return &this +} + +// GetAction returns the Action field value if set, zero value otherwise. +func (o *DelegationBulkItem) GetAction() string { + if o == nil || IsNil(o.Action) { + var ret string + return ret + } + return *o.Action +} + +// GetActionOk returns a tuple with the Action field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DelegationBulkItem) GetActionOk() (*string, bool) { + if o == nil || IsNil(o.Action) { + return nil, false + } + return o.Action, true +} + +// HasAction returns a boolean if a field has been set. +func (o *DelegationBulkItem) HasAction() bool { + if o != nil && !IsNil(o.Action) { + return true + } + + return false +} + +// SetAction gets a reference to the given string and assigns it to the Action field. +func (o *DelegationBulkItem) SetAction(v string) { + o.Action = &v +} + +// GetDelegation returns the Delegation field value if set, zero value otherwise. +func (o *DelegationBulkItem) GetDelegation() Delegation { + if o == nil || IsNil(o.Delegation) { + var ret Delegation + return ret + } + return *o.Delegation +} + +// GetDelegationOk returns a tuple with the Delegation field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DelegationBulkItem) GetDelegationOk() (*Delegation, bool) { + if o == nil || IsNil(o.Delegation) { + return nil, false + } + return o.Delegation, true +} + +// HasDelegation returns a boolean if a field has been set. +func (o *DelegationBulkItem) HasDelegation() bool { + if o != nil && !IsNil(o.Delegation) { + return true + } + + return false +} + +// SetDelegation gets a reference to the given Delegation and assigns it to the Delegation field. +func (o *DelegationBulkItem) SetDelegation(v Delegation) { + o.Delegation = &v +} + +func (o DelegationBulkItem) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o DelegationBulkItem) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Action) { + toSerialize["action"] = o.Action + } + if !IsNil(o.Delegation) { + toSerialize["delegation"] = o.Delegation + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *DelegationBulkItem) UnmarshalJSON(data []byte) (err error) { + varDelegationBulkItem := _DelegationBulkItem{} + + err = json.Unmarshal(data, &varDelegationBulkItem) + + if err != nil { + return err + } + + *o = DelegationBulkItem(varDelegationBulkItem) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "action") + delete(additionalProperties, "delegation") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableDelegationBulkItem struct { + value *DelegationBulkItem + isSet bool +} + +func (v NullableDelegationBulkItem) Get() *DelegationBulkItem { + return v.value +} + +func (v *NullableDelegationBulkItem) Set(val *DelegationBulkItem) { + v.value = val + v.isSet = true +} + +func (v NullableDelegationBulkItem) IsSet() bool { + return v.isSet +} + +func (v *NullableDelegationBulkItem) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDelegationBulkItem(val *DelegationBulkItem) *NullableDelegationBulkItem { + return &NullableDelegationBulkItem{value: val, isSet: true} +} + +func (v NullableDelegationBulkItem) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDelegationBulkItem) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/ipamfederation/model_delegation_bulk_request.go b/ipamfederation/model_delegation_bulk_request.go new file mode 100644 index 0000000..89c8b59 --- /dev/null +++ b/ipamfederation/model_delegation_bulk_request.go @@ -0,0 +1,191 @@ +/* +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 DelegationBulkRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &DelegationBulkRequest{} + +// DelegationBulkRequest DelegationBulk request object. +type DelegationBulkRequest struct { + // list of action/delegation requests to execute. + Delegations []DelegationBulkItem `json:"delegations,omitempty"` + Fields *ProtobufFieldMask `json:"fields,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _DelegationBulkRequest DelegationBulkRequest + +// NewDelegationBulkRequest instantiates a new DelegationBulkRequest 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 NewDelegationBulkRequest() *DelegationBulkRequest { + this := DelegationBulkRequest{} + return &this +} + +// NewDelegationBulkRequestWithDefaults instantiates a new DelegationBulkRequest 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 NewDelegationBulkRequestWithDefaults() *DelegationBulkRequest { + this := DelegationBulkRequest{} + return &this +} + +// GetDelegations returns the Delegations field value if set, zero value otherwise. +func (o *DelegationBulkRequest) GetDelegations() []DelegationBulkItem { + if o == nil || IsNil(o.Delegations) { + var ret []DelegationBulkItem + return ret + } + return o.Delegations +} + +// GetDelegationsOk returns a tuple with the Delegations field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DelegationBulkRequest) GetDelegationsOk() ([]DelegationBulkItem, bool) { + if o == nil || IsNil(o.Delegations) { + return nil, false + } + return o.Delegations, true +} + +// HasDelegations returns a boolean if a field has been set. +func (o *DelegationBulkRequest) HasDelegations() bool { + if o != nil && !IsNil(o.Delegations) { + return true + } + + return false +} + +// SetDelegations gets a reference to the given []DelegationBulkItem and assigns it to the Delegations field. +func (o *DelegationBulkRequest) SetDelegations(v []DelegationBulkItem) { + o.Delegations = v +} + +// GetFields returns the Fields field value if set, zero value otherwise. +func (o *DelegationBulkRequest) GetFields() ProtobufFieldMask { + if o == nil || IsNil(o.Fields) { + var ret ProtobufFieldMask + return ret + } + return *o.Fields +} + +// GetFieldsOk returns a tuple with the Fields field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DelegationBulkRequest) GetFieldsOk() (*ProtobufFieldMask, bool) { + if o == nil || IsNil(o.Fields) { + return nil, false + } + return o.Fields, true +} + +// HasFields returns a boolean if a field has been set. +func (o *DelegationBulkRequest) HasFields() bool { + if o != nil && !IsNil(o.Fields) { + return true + } + + return false +} + +// SetFields gets a reference to the given ProtobufFieldMask and assigns it to the Fields field. +func (o *DelegationBulkRequest) SetFields(v ProtobufFieldMask) { + o.Fields = &v +} + +func (o DelegationBulkRequest) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o DelegationBulkRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Delegations) { + toSerialize["delegations"] = o.Delegations + } + if !IsNil(o.Fields) { + toSerialize["fields"] = o.Fields + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *DelegationBulkRequest) UnmarshalJSON(data []byte) (err error) { + varDelegationBulkRequest := _DelegationBulkRequest{} + + err = json.Unmarshal(data, &varDelegationBulkRequest) + + if err != nil { + return err + } + + *o = DelegationBulkRequest(varDelegationBulkRequest) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "delegations") + delete(additionalProperties, "fields") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableDelegationBulkRequest struct { + value *DelegationBulkRequest + isSet bool +} + +func (v NullableDelegationBulkRequest) Get() *DelegationBulkRequest { + return v.value +} + +func (v *NullableDelegationBulkRequest) Set(val *DelegationBulkRequest) { + v.value = val + v.isSet = true +} + +func (v NullableDelegationBulkRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableDelegationBulkRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDelegationBulkRequest(val *DelegationBulkRequest) *NullableDelegationBulkRequest { + return &NullableDelegationBulkRequest{value: val, isSet: true} +} + +func (v NullableDelegationBulkRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDelegationBulkRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/ipamfederation/model_delegation_bulk_response.go b/ipamfederation/model_delegation_bulk_response.go new file mode 100644 index 0000000..adfb56f --- /dev/null +++ b/ipamfederation/model_delegation_bulk_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 DelegationBulkResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &DelegationBulkResponse{} + +// DelegationBulkResponse The DelegationBulk response object. +type DelegationBulkResponse struct { + // A list of Delegation objects. + Results []Delegation `json:"results,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _DelegationBulkResponse DelegationBulkResponse + +// NewDelegationBulkResponse instantiates a new DelegationBulkResponse 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 NewDelegationBulkResponse() *DelegationBulkResponse { + this := DelegationBulkResponse{} + return &this +} + +// NewDelegationBulkResponseWithDefaults instantiates a new DelegationBulkResponse 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 NewDelegationBulkResponseWithDefaults() *DelegationBulkResponse { + this := DelegationBulkResponse{} + return &this +} + +// GetResults returns the Results field value if set, zero value otherwise. +func (o *DelegationBulkResponse) GetResults() []Delegation { + if o == nil || IsNil(o.Results) { + var ret []Delegation + 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 *DelegationBulkResponse) GetResultsOk() ([]Delegation, 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 *DelegationBulkResponse) HasResults() bool { + if o != nil && !IsNil(o.Results) { + return true + } + + return false +} + +// SetResults gets a reference to the given []Delegation and assigns it to the Results field. +func (o *DelegationBulkResponse) SetResults(v []Delegation) { + o.Results = v +} + +func (o DelegationBulkResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o DelegationBulkResponse) 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 *DelegationBulkResponse) UnmarshalJSON(data []byte) (err error) { + varDelegationBulkResponse := _DelegationBulkResponse{} + + err = json.Unmarshal(data, &varDelegationBulkResponse) + + if err != nil { + return err + } + + *o = DelegationBulkResponse(varDelegationBulkResponse) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "results") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableDelegationBulkResponse struct { + value *DelegationBulkResponse + isSet bool +} + +func (v NullableDelegationBulkResponse) Get() *DelegationBulkResponse { + return v.value +} + +func (v *NullableDelegationBulkResponse) Set(val *DelegationBulkResponse) { + v.value = val + v.isSet = true +} + +func (v NullableDelegationBulkResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableDelegationBulkResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDelegationBulkResponse(val *DelegationBulkResponse) *NullableDelegationBulkResponse { + return &NullableDelegationBulkResponse{value: val, isSet: true} +} + +func (v NullableDelegationBulkResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDelegationBulkResponse) 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..c09ecb0 --- /dev/null +++ b/ipamfederation/model_federated_block.go @@ -0,0 +1,578 @@ +/* +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 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"` + // 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"` + // 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(address string, federatedRealm string) *FederatedBlock { + this := FederatedBlock{} + this.Address = address + this.FederatedRealm = federatedRealm + 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 +func (o *FederatedBlock) 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 *FederatedBlock) GetAddressOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Address, true +} + +// SetAddress sets field value +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 +func (o *FederatedBlock) 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 *FederatedBlock) GetFederatedRealmOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.FederatedRealm, true +} + +// SetFederatedRealm sets field value +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{}{} + 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 + } + 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) { + // 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) + } + } + + 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_generate_config_bundle_response.go b/ipamfederation/model_generate_config_bundle_response.go new file mode 100644 index 0000000..fa5aa90 --- /dev/null +++ b/ipamfederation/model_generate_config_bundle_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 GenerateConfigBundleResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &GenerateConfigBundleResponse{} + +// GenerateConfigBundleResponse The response format to retrieve __ConfigBundle__ objects. +type GenerateConfigBundleResponse struct { + Config *ConfigObject `json:"config,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _GenerateConfigBundleResponse GenerateConfigBundleResponse + +// NewGenerateConfigBundleResponse instantiates a new GenerateConfigBundleResponse 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 NewGenerateConfigBundleResponse() *GenerateConfigBundleResponse { + this := GenerateConfigBundleResponse{} + return &this +} + +// NewGenerateConfigBundleResponseWithDefaults instantiates a new GenerateConfigBundleResponse 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 NewGenerateConfigBundleResponseWithDefaults() *GenerateConfigBundleResponse { + this := GenerateConfigBundleResponse{} + return &this +} + +// GetConfig returns the Config field value if set, zero value otherwise. +func (o *GenerateConfigBundleResponse) GetConfig() ConfigObject { + if o == nil || IsNil(o.Config) { + var ret ConfigObject + return ret + } + return *o.Config +} + +// GetConfigOk returns a tuple with the Config field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GenerateConfigBundleResponse) GetConfigOk() (*ConfigObject, bool) { + if o == nil || IsNil(o.Config) { + return nil, false + } + return o.Config, true +} + +// HasConfig returns a boolean if a field has been set. +func (o *GenerateConfigBundleResponse) HasConfig() bool { + if o != nil && !IsNil(o.Config) { + return true + } + + return false +} + +// SetConfig gets a reference to the given ConfigObject and assigns it to the Config field. +func (o *GenerateConfigBundleResponse) SetConfig(v ConfigObject) { + o.Config = &v +} + +func (o GenerateConfigBundleResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o GenerateConfigBundleResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Config) { + toSerialize["config"] = o.Config + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *GenerateConfigBundleResponse) UnmarshalJSON(data []byte) (err error) { + varGenerateConfigBundleResponse := _GenerateConfigBundleResponse{} + + err = json.Unmarshal(data, &varGenerateConfigBundleResponse) + + if err != nil { + return err + } + + *o = GenerateConfigBundleResponse(varGenerateConfigBundleResponse) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "config") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableGenerateConfigBundleResponse struct { + value *GenerateConfigBundleResponse + isSet bool +} + +func (v NullableGenerateConfigBundleResponse) Get() *GenerateConfigBundleResponse { + return v.value +} + +func (v *NullableGenerateConfigBundleResponse) Set(val *GenerateConfigBundleResponse) { + v.value = val + v.isSet = true +} + +func (v NullableGenerateConfigBundleResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableGenerateConfigBundleResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableGenerateConfigBundleResponse(val *GenerateConfigBundleResponse) *NullableGenerateConfigBundleResponse { + return &NullableGenerateConfigBundleResponse{value: val, isSet: true} +} + +func (v NullableGenerateConfigBundleResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableGenerateConfigBundleResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/ipamfederation/model_get_next_available_delegation_request.go b/ipamfederation/model_get_next_available_delegation_request.go new file mode 100644 index 0000000..9f2836c --- /dev/null +++ b/ipamfederation/model_get_next_available_delegation_request.go @@ -0,0 +1,192 @@ +/* +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 GetNextAvailableDelegationRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &GetNextAvailableDelegationRequest{} + +// GetNextAvailableDelegationRequest struct for GetNextAvailableDelegationRequest +type GetNextAvailableDelegationRequest struct { + // The arguments which will be used as parameters while creating __Delegation__ object. + Arguments *NextAvailableDelegationArguments `json:"arguments,omitempty"` + // The properties, which will be used to fill the created __Delegation__ object. + Properties *NextAvailableDelegationProperties `json:"properties,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _GetNextAvailableDelegationRequest GetNextAvailableDelegationRequest + +// NewGetNextAvailableDelegationRequest instantiates a new GetNextAvailableDelegationRequest 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 NewGetNextAvailableDelegationRequest() *GetNextAvailableDelegationRequest { + this := GetNextAvailableDelegationRequest{} + return &this +} + +// NewGetNextAvailableDelegationRequestWithDefaults instantiates a new GetNextAvailableDelegationRequest 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 NewGetNextAvailableDelegationRequestWithDefaults() *GetNextAvailableDelegationRequest { + this := GetNextAvailableDelegationRequest{} + return &this +} + +// GetArguments returns the Arguments field value if set, zero value otherwise. +func (o *GetNextAvailableDelegationRequest) GetArguments() NextAvailableDelegationArguments { + if o == nil || IsNil(o.Arguments) { + var ret NextAvailableDelegationArguments + return ret + } + return *o.Arguments +} + +// GetArgumentsOk returns a tuple with the Arguments field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GetNextAvailableDelegationRequest) GetArgumentsOk() (*NextAvailableDelegationArguments, bool) { + if o == nil || IsNil(o.Arguments) { + return nil, false + } + return o.Arguments, true +} + +// HasArguments returns a boolean if a field has been set. +func (o *GetNextAvailableDelegationRequest) HasArguments() bool { + if o != nil && !IsNil(o.Arguments) { + return true + } + + return false +} + +// SetArguments gets a reference to the given NextAvailableDelegationArguments and assigns it to the Arguments field. +func (o *GetNextAvailableDelegationRequest) SetArguments(v NextAvailableDelegationArguments) { + o.Arguments = &v +} + +// GetProperties returns the Properties field value if set, zero value otherwise. +func (o *GetNextAvailableDelegationRequest) GetProperties() NextAvailableDelegationProperties { + if o == nil || IsNil(o.Properties) { + var ret NextAvailableDelegationProperties + return ret + } + return *o.Properties +} + +// GetPropertiesOk returns a tuple with the Properties field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GetNextAvailableDelegationRequest) GetPropertiesOk() (*NextAvailableDelegationProperties, bool) { + if o == nil || IsNil(o.Properties) { + return nil, false + } + return o.Properties, true +} + +// HasProperties returns a boolean if a field has been set. +func (o *GetNextAvailableDelegationRequest) HasProperties() bool { + if o != nil && !IsNil(o.Properties) { + return true + } + + return false +} + +// SetProperties gets a reference to the given NextAvailableDelegationProperties and assigns it to the Properties field. +func (o *GetNextAvailableDelegationRequest) SetProperties(v NextAvailableDelegationProperties) { + o.Properties = &v +} + +func (o GetNextAvailableDelegationRequest) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o GetNextAvailableDelegationRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Arguments) { + toSerialize["arguments"] = o.Arguments + } + if !IsNil(o.Properties) { + toSerialize["properties"] = o.Properties + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *GetNextAvailableDelegationRequest) UnmarshalJSON(data []byte) (err error) { + varGetNextAvailableDelegationRequest := _GetNextAvailableDelegationRequest{} + + err = json.Unmarshal(data, &varGetNextAvailableDelegationRequest) + + if err != nil { + return err + } + + *o = GetNextAvailableDelegationRequest(varGetNextAvailableDelegationRequest) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "arguments") + delete(additionalProperties, "properties") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableGetNextAvailableDelegationRequest struct { + value *GetNextAvailableDelegationRequest + isSet bool +} + +func (v NullableGetNextAvailableDelegationRequest) Get() *GetNextAvailableDelegationRequest { + return v.value +} + +func (v *NullableGetNextAvailableDelegationRequest) Set(val *GetNextAvailableDelegationRequest) { + v.value = val + v.isSet = true +} + +func (v NullableGetNextAvailableDelegationRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableGetNextAvailableDelegationRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableGetNextAvailableDelegationRequest(val *GetNextAvailableDelegationRequest) *NullableGetNextAvailableDelegationRequest { + return &NullableGetNextAvailableDelegationRequest{value: val, isSet: true} +} + +func (v NullableGetNextAvailableDelegationRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableGetNextAvailableDelegationRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/ipamfederation/model_get_next_available_delegation_response.go b/ipamfederation/model_get_next_available_delegation_response.go new file mode 100644 index 0000000..538d90e --- /dev/null +++ b/ipamfederation/model_get_next_available_delegation_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 GetNextAvailableDelegationResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &GetNextAvailableDelegationResponse{} + +// GetNextAvailableDelegationResponse The response format to get next available __Delegation__ objects. +type GetNextAvailableDelegationResponse struct { + Results []Delegation `json:"results,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _GetNextAvailableDelegationResponse GetNextAvailableDelegationResponse + +// NewGetNextAvailableDelegationResponse instantiates a new GetNextAvailableDelegationResponse 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 NewGetNextAvailableDelegationResponse() *GetNextAvailableDelegationResponse { + this := GetNextAvailableDelegationResponse{} + return &this +} + +// NewGetNextAvailableDelegationResponseWithDefaults instantiates a new GetNextAvailableDelegationResponse 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 NewGetNextAvailableDelegationResponseWithDefaults() *GetNextAvailableDelegationResponse { + this := GetNextAvailableDelegationResponse{} + return &this +} + +// GetResults returns the Results field value if set, zero value otherwise. +func (o *GetNextAvailableDelegationResponse) GetResults() []Delegation { + if o == nil || IsNil(o.Results) { + var ret []Delegation + 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 *GetNextAvailableDelegationResponse) GetResultsOk() ([]Delegation, 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 *GetNextAvailableDelegationResponse) HasResults() bool { + if o != nil && !IsNil(o.Results) { + return true + } + + return false +} + +// SetResults gets a reference to the given []Delegation and assigns it to the Results field. +func (o *GetNextAvailableDelegationResponse) SetResults(v []Delegation) { + o.Results = v +} + +func (o GetNextAvailableDelegationResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o GetNextAvailableDelegationResponse) 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 *GetNextAvailableDelegationResponse) UnmarshalJSON(data []byte) (err error) { + varGetNextAvailableDelegationResponse := _GetNextAvailableDelegationResponse{} + + err = json.Unmarshal(data, &varGetNextAvailableDelegationResponse) + + if err != nil { + return err + } + + *o = GetNextAvailableDelegationResponse(varGetNextAvailableDelegationResponse) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "results") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableGetNextAvailableDelegationResponse struct { + value *GetNextAvailableDelegationResponse + isSet bool +} + +func (v NullableGetNextAvailableDelegationResponse) Get() *GetNextAvailableDelegationResponse { + return v.value +} + +func (v *NullableGetNextAvailableDelegationResponse) Set(val *GetNextAvailableDelegationResponse) { + v.value = val + v.isSet = true +} + +func (v NullableGetNextAvailableDelegationResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableGetNextAvailableDelegationResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableGetNextAvailableDelegationResponse(val *GetNextAvailableDelegationResponse) *NullableGetNextAvailableDelegationResponse { + return &NullableGetNextAvailableDelegationResponse{value: val, isSet: true} +} + +func (v NullableGetNextAvailableDelegationResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableGetNextAvailableDelegationResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/ipamfederation/model_health_check_config_response.go b/ipamfederation/model_health_check_config_response.go new file mode 100644 index 0000000..83d6d98 --- /dev/null +++ b/ipamfederation/model_health_check_config_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 HealthCheckConfigResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &HealthCheckConfigResponse{} + +// HealthCheckConfigResponse struct for HealthCheckConfigResponse +type HealthCheckConfigResponse struct { + Message *string `json:"message,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _HealthCheckConfigResponse HealthCheckConfigResponse + +// NewHealthCheckConfigResponse instantiates a new HealthCheckConfigResponse 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 NewHealthCheckConfigResponse() *HealthCheckConfigResponse { + this := HealthCheckConfigResponse{} + return &this +} + +// NewHealthCheckConfigResponseWithDefaults instantiates a new HealthCheckConfigResponse 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 NewHealthCheckConfigResponseWithDefaults() *HealthCheckConfigResponse { + this := HealthCheckConfigResponse{} + return &this +} + +// GetMessage returns the Message field value if set, zero value otherwise. +func (o *HealthCheckConfigResponse) GetMessage() string { + if o == nil || IsNil(o.Message) { + var ret string + return ret + } + return *o.Message +} + +// GetMessageOk returns a tuple with the Message field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *HealthCheckConfigResponse) GetMessageOk() (*string, bool) { + if o == nil || IsNil(o.Message) { + return nil, false + } + return o.Message, true +} + +// HasMessage returns a boolean if a field has been set. +func (o *HealthCheckConfigResponse) HasMessage() bool { + if o != nil && !IsNil(o.Message) { + return true + } + + return false +} + +// SetMessage gets a reference to the given string and assigns it to the Message field. +func (o *HealthCheckConfigResponse) SetMessage(v string) { + o.Message = &v +} + +func (o HealthCheckConfigResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o HealthCheckConfigResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Message) { + toSerialize["message"] = o.Message + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *HealthCheckConfigResponse) UnmarshalJSON(data []byte) (err error) { + varHealthCheckConfigResponse := _HealthCheckConfigResponse{} + + err = json.Unmarshal(data, &varHealthCheckConfigResponse) + + if err != nil { + return err + } + + *o = HealthCheckConfigResponse(varHealthCheckConfigResponse) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "message") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableHealthCheckConfigResponse struct { + value *HealthCheckConfigResponse + isSet bool +} + +func (v NullableHealthCheckConfigResponse) Get() *HealthCheckConfigResponse { + return v.value +} + +func (v *NullableHealthCheckConfigResponse) Set(val *HealthCheckConfigResponse) { + v.value = val + v.isSet = true +} + +func (v NullableHealthCheckConfigResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableHealthCheckConfigResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableHealthCheckConfigResponse(val *HealthCheckConfigResponse) *NullableHealthCheckConfigResponse { + return &NullableHealthCheckConfigResponse{value: val, isSet: true} +} + +func (v NullableHealthCheckConfigResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableHealthCheckConfigResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/ipamfederation/model_health_config.go b/ipamfederation/model_health_config.go new file mode 100644 index 0000000..8b6eb88 --- /dev/null +++ b/ipamfederation/model_health_config.go @@ -0,0 +1,305 @@ +/* +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 HealthConfig type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &HealthConfig{} + +// HealthConfig struct for HealthConfig +type HealthConfig struct { + AppName *string `json:"appName,omitempty"` + Message *string `json:"message,omitempty"` + Ophid *string `json:"ophid,omitempty"` + StatusCode *HealthConfigStatusCode `json:"statusCode,omitempty"` + Version *string `json:"version,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _HealthConfig HealthConfig + +// NewHealthConfig instantiates a new HealthConfig 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 NewHealthConfig() *HealthConfig { + this := HealthConfig{} + var statusCode HealthConfigStatusCode = HEALTHCONFIGSTATUSCODE_SUCCESS + this.StatusCode = &statusCode + return &this +} + +// NewHealthConfigWithDefaults instantiates a new HealthConfig 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 NewHealthConfigWithDefaults() *HealthConfig { + this := HealthConfig{} + var statusCode HealthConfigStatusCode = HEALTHCONFIGSTATUSCODE_SUCCESS + this.StatusCode = &statusCode + return &this +} + +// GetAppName returns the AppName field value if set, zero value otherwise. +func (o *HealthConfig) GetAppName() string { + if o == nil || IsNil(o.AppName) { + var ret string + return ret + } + return *o.AppName +} + +// GetAppNameOk returns a tuple with the AppName field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *HealthConfig) GetAppNameOk() (*string, bool) { + if o == nil || IsNil(o.AppName) { + return nil, false + } + return o.AppName, true +} + +// HasAppName returns a boolean if a field has been set. +func (o *HealthConfig) HasAppName() bool { + if o != nil && !IsNil(o.AppName) { + return true + } + + return false +} + +// SetAppName gets a reference to the given string and assigns it to the AppName field. +func (o *HealthConfig) SetAppName(v string) { + o.AppName = &v +} + +// GetMessage returns the Message field value if set, zero value otherwise. +func (o *HealthConfig) GetMessage() string { + if o == nil || IsNil(o.Message) { + var ret string + return ret + } + return *o.Message +} + +// GetMessageOk returns a tuple with the Message field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *HealthConfig) GetMessageOk() (*string, bool) { + if o == nil || IsNil(o.Message) { + return nil, false + } + return o.Message, true +} + +// HasMessage returns a boolean if a field has been set. +func (o *HealthConfig) HasMessage() bool { + if o != nil && !IsNil(o.Message) { + return true + } + + return false +} + +// SetMessage gets a reference to the given string and assigns it to the Message field. +func (o *HealthConfig) SetMessage(v string) { + o.Message = &v +} + +// GetOphid returns the Ophid field value if set, zero value otherwise. +func (o *HealthConfig) GetOphid() string { + if o == nil || IsNil(o.Ophid) { + var ret string + return ret + } + return *o.Ophid +} + +// GetOphidOk returns a tuple with the Ophid field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *HealthConfig) GetOphidOk() (*string, bool) { + if o == nil || IsNil(o.Ophid) { + return nil, false + } + return o.Ophid, true +} + +// HasOphid returns a boolean if a field has been set. +func (o *HealthConfig) HasOphid() bool { + if o != nil && !IsNil(o.Ophid) { + return true + } + + return false +} + +// SetOphid gets a reference to the given string and assigns it to the Ophid field. +func (o *HealthConfig) SetOphid(v string) { + o.Ophid = &v +} + +// GetStatusCode returns the StatusCode field value if set, zero value otherwise. +func (o *HealthConfig) GetStatusCode() HealthConfigStatusCode { + if o == nil || IsNil(o.StatusCode) { + var ret HealthConfigStatusCode + return ret + } + return *o.StatusCode +} + +// GetStatusCodeOk returns a tuple with the StatusCode field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *HealthConfig) GetStatusCodeOk() (*HealthConfigStatusCode, bool) { + if o == nil || IsNil(o.StatusCode) { + return nil, false + } + return o.StatusCode, true +} + +// HasStatusCode returns a boolean if a field has been set. +func (o *HealthConfig) HasStatusCode() bool { + if o != nil && !IsNil(o.StatusCode) { + return true + } + + return false +} + +// SetStatusCode gets a reference to the given HealthConfigStatusCode and assigns it to the StatusCode field. +func (o *HealthConfig) SetStatusCode(v HealthConfigStatusCode) { + o.StatusCode = &v +} + +// GetVersion returns the Version field value if set, zero value otherwise. +func (o *HealthConfig) GetVersion() string { + if o == nil || IsNil(o.Version) { + var ret string + return ret + } + return *o.Version +} + +// GetVersionOk returns a tuple with the Version field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *HealthConfig) GetVersionOk() (*string, bool) { + if o == nil || IsNil(o.Version) { + return nil, false + } + return o.Version, true +} + +// HasVersion returns a boolean if a field has been set. +func (o *HealthConfig) HasVersion() bool { + if o != nil && !IsNil(o.Version) { + return true + } + + return false +} + +// SetVersion gets a reference to the given string and assigns it to the Version field. +func (o *HealthConfig) SetVersion(v string) { + o.Version = &v +} + +func (o HealthConfig) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o HealthConfig) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.AppName) { + toSerialize["appName"] = o.AppName + } + if !IsNil(o.Message) { + toSerialize["message"] = o.Message + } + if !IsNil(o.Ophid) { + toSerialize["ophid"] = o.Ophid + } + if !IsNil(o.StatusCode) { + toSerialize["statusCode"] = o.StatusCode + } + if !IsNil(o.Version) { + toSerialize["version"] = o.Version + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *HealthConfig) UnmarshalJSON(data []byte) (err error) { + varHealthConfig := _HealthConfig{} + + err = json.Unmarshal(data, &varHealthConfig) + + if err != nil { + return err + } + + *o = HealthConfig(varHealthConfig) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "appName") + delete(additionalProperties, "message") + delete(additionalProperties, "ophid") + delete(additionalProperties, "statusCode") + delete(additionalProperties, "version") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableHealthConfig struct { + value *HealthConfig + isSet bool +} + +func (v NullableHealthConfig) Get() *HealthConfig { + return v.value +} + +func (v *NullableHealthConfig) Set(val *HealthConfig) { + v.value = val + v.isSet = true +} + +func (v NullableHealthConfig) IsSet() bool { + return v.isSet +} + +func (v *NullableHealthConfig) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableHealthConfig(val *HealthConfig) *NullableHealthConfig { + return &NullableHealthConfig{value: val, isSet: true} +} + +func (v NullableHealthConfig) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableHealthConfig) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/ipamfederation/model_health_config_status_code.go b/ipamfederation/model_health_config_status_code.go new file mode 100644 index 0000000..09cbfea --- /dev/null +++ b/ipamfederation/model_health_config_status_code.go @@ -0,0 +1,118 @@ +/* +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" +) + +// HealthConfigStatusCode the model 'HealthConfigStatusCode' +type HealthConfigStatusCode string + +// List of HealthConfigStatusCode +const ( + HEALTHCONFIGSTATUSCODE_SUCCESS HealthConfigStatusCode = "StatusCode_SUCCESS" + HEALTHCONFIGSTATUSCODE_GENERAL_FAILURE HealthConfigStatusCode = "StatusCode_GENERAL_FAILURE" + HEALTHCONFIGSTATUSCODE_HASH_FAILURE HealthConfigStatusCode = "StatusCode_HASH_FAILURE" + HEALTHCONFIGSTATUSCODE_VALIDATION_FAILURE HealthConfigStatusCode = "StatusCode_VALIDATION_FAILURE" + HEALTHCONFIGSTATUSCODE_COPY_FAILURE HealthConfigStatusCode = "StatusCode_COPY_FAILURE" + HEALTHCONFIGSTATUSCODE_RELOAD_FAILIURE HealthConfigStatusCode = "StatusCode_RELOAD_FAILIURE" +) + +// All allowed values of HealthConfigStatusCode enum +var AllowedHealthConfigStatusCodeEnumValues = []HealthConfigStatusCode{ + "StatusCode_SUCCESS", + "StatusCode_GENERAL_FAILURE", + "StatusCode_HASH_FAILURE", + "StatusCode_VALIDATION_FAILURE", + "StatusCode_COPY_FAILURE", + "StatusCode_RELOAD_FAILIURE", +} + +func (v *HealthConfigStatusCode) UnmarshalJSON(src []byte) error { + var value string + err := json.Unmarshal(src, &value) + if err != nil { + return err + } + enumTypeValue := HealthConfigStatusCode(value) + for _, existing := range AllowedHealthConfigStatusCodeEnumValues { + if existing == enumTypeValue { + *v = enumTypeValue + return nil + } + } + + return fmt.Errorf("%+v is not a valid HealthConfigStatusCode", value) +} + +// NewHealthConfigStatusCodeFromValue returns a pointer to a valid HealthConfigStatusCode +// for the value passed as argument, or an error if the value passed is not allowed by the enum +func NewHealthConfigStatusCodeFromValue(v string) (*HealthConfigStatusCode, error) { + ev := HealthConfigStatusCode(v) + if ev.IsValid() { + return &ev, nil + } else { + return nil, fmt.Errorf("invalid value '%v' for HealthConfigStatusCode: valid values are %v", v, AllowedHealthConfigStatusCodeEnumValues) + } +} + +// IsValid return true if the value is valid for the enum, false otherwise +func (v HealthConfigStatusCode) IsValid() bool { + for _, existing := range AllowedHealthConfigStatusCodeEnumValues { + if existing == v { + return true + } + } + return false +} + +// Ptr returns reference to HealthConfigStatusCode value +func (v HealthConfigStatusCode) Ptr() *HealthConfigStatusCode { + return &v +} + +type NullableHealthConfigStatusCode struct { + value *HealthConfigStatusCode + isSet bool +} + +func (v NullableHealthConfigStatusCode) Get() *HealthConfigStatusCode { + return v.value +} + +func (v *NullableHealthConfigStatusCode) Set(val *HealthConfigStatusCode) { + v.value = val + v.isSet = true +} + +func (v NullableHealthConfigStatusCode) IsSet() bool { + return v.isSet +} + +func (v *NullableHealthConfigStatusCode) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableHealthConfigStatusCode(val *HealthConfigStatusCode) *NullableHealthConfigStatusCode { + return &NullableHealthConfigStatusCode{value: val, isSet: true} +} + +func (v NullableHealthConfigStatusCode) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableHealthConfigStatusCode) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/ipamfederation/model_list_delegation_response.go b/ipamfederation/model_list_delegation_response.go new file mode 100644 index 0000000..cf5b830 --- /dev/null +++ b/ipamfederation/model_list_delegation_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 ListDelegationResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ListDelegationResponse{} + +// ListDelegationResponse The response format to retrieve __Delegation__ objects. +type ListDelegationResponse struct { + // A list of Delegation objects. + Results []Delegation `json:"results,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _ListDelegationResponse ListDelegationResponse + +// NewListDelegationResponse instantiates a new ListDelegationResponse 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 NewListDelegationResponse() *ListDelegationResponse { + this := ListDelegationResponse{} + return &this +} + +// NewListDelegationResponseWithDefaults instantiates a new ListDelegationResponse 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 NewListDelegationResponseWithDefaults() *ListDelegationResponse { + this := ListDelegationResponse{} + return &this +} + +// GetResults returns the Results field value if set, zero value otherwise. +func (o *ListDelegationResponse) GetResults() []Delegation { + if o == nil || IsNil(o.Results) { + var ret []Delegation + 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 *ListDelegationResponse) GetResultsOk() ([]Delegation, 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 *ListDelegationResponse) HasResults() bool { + if o != nil && !IsNil(o.Results) { + return true + } + + return false +} + +// SetResults gets a reference to the given []Delegation and assigns it to the Results field. +func (o *ListDelegationResponse) SetResults(v []Delegation) { + o.Results = v +} + +func (o ListDelegationResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ListDelegationResponse) 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 *ListDelegationResponse) UnmarshalJSON(data []byte) (err error) { + varListDelegationResponse := _ListDelegationResponse{} + + err = json.Unmarshal(data, &varListDelegationResponse) + + if err != nil { + return err + } + + *o = ListDelegationResponse(varListDelegationResponse) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "results") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableListDelegationResponse struct { + value *ListDelegationResponse + isSet bool +} + +func (v NullableListDelegationResponse) Get() *ListDelegationResponse { + return v.value +} + +func (v *NullableListDelegationResponse) Set(val *ListDelegationResponse) { + v.value = val + v.isSet = true +} + +func (v NullableListDelegationResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableListDelegationResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableListDelegationResponse(val *ListDelegationResponse) *NullableListDelegationResponse { + return &NullableListDelegationResponse{value: val, isSet: true} +} + +func (v NullableListDelegationResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableListDelegationResponse) 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_next_available_delegation_arguments.go b/ipamfederation/model_next_available_delegation_arguments.go new file mode 100644 index 0000000..9f5eebc --- /dev/null +++ b/ipamfederation/model_next_available_delegation_arguments.go @@ -0,0 +1,306 @@ +/* +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 NextAvailableDelegationArguments type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &NextAvailableDelegationArguments{} + +// NextAvailableDelegationArguments struct for NextAvailableDelegationArguments +type NextAvailableDelegationArguments struct { + // The CIDR of the delegation to be created. This is required, if _address_ does not specify it in its input. + Cidr *int64 `json:"cidr,omitempty"` + // The count of __Delegation__ required. If not provided, it will default to 1. + Count *int64 `json:"count,omitempty"` + // The resource identifier. + FederatedRealms []string `json:"federated_realms,omitempty"` + // It contains the map of attributes and the associated value. + Predicates map[string]interface{} `json:"predicates,omitempty"` + // The field which denotes if the __Delegation__ will be provisioned or just calculated and returned. + ReadOnly *bool `json:"read_only,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _NextAvailableDelegationArguments NextAvailableDelegationArguments + +// NewNextAvailableDelegationArguments instantiates a new NextAvailableDelegationArguments 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 NewNextAvailableDelegationArguments() *NextAvailableDelegationArguments { + this := NextAvailableDelegationArguments{} + return &this +} + +// NewNextAvailableDelegationArgumentsWithDefaults instantiates a new NextAvailableDelegationArguments 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 NewNextAvailableDelegationArgumentsWithDefaults() *NextAvailableDelegationArguments { + this := NextAvailableDelegationArguments{} + return &this +} + +// GetCidr returns the Cidr field value if set, zero value otherwise. +func (o *NextAvailableDelegationArguments) 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 *NextAvailableDelegationArguments) 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 *NextAvailableDelegationArguments) 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 *NextAvailableDelegationArguments) SetCidr(v int64) { + o.Cidr = &v +} + +// GetCount returns the Count field value if set, zero value otherwise. +func (o *NextAvailableDelegationArguments) 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 *NextAvailableDelegationArguments) 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 *NextAvailableDelegationArguments) 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 *NextAvailableDelegationArguments) SetCount(v int64) { + o.Count = &v +} + +// GetFederatedRealms returns the FederatedRealms field value if set, zero value otherwise. +func (o *NextAvailableDelegationArguments) GetFederatedRealms() []string { + if o == nil || IsNil(o.FederatedRealms) { + var ret []string + return ret + } + return o.FederatedRealms +} + +// GetFederatedRealmsOk returns a tuple with the FederatedRealms field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *NextAvailableDelegationArguments) GetFederatedRealmsOk() ([]string, bool) { + if o == nil || IsNil(o.FederatedRealms) { + return nil, false + } + return o.FederatedRealms, true +} + +// HasFederatedRealms returns a boolean if a field has been set. +func (o *NextAvailableDelegationArguments) HasFederatedRealms() bool { + if o != nil && !IsNil(o.FederatedRealms) { + return true + } + + return false +} + +// SetFederatedRealms gets a reference to the given []string and assigns it to the FederatedRealms field. +func (o *NextAvailableDelegationArguments) SetFederatedRealms(v []string) { + o.FederatedRealms = v +} + +// GetPredicates returns the Predicates field value if set, zero value otherwise. +func (o *NextAvailableDelegationArguments) GetPredicates() map[string]interface{} { + if o == nil || IsNil(o.Predicates) { + var ret map[string]interface{} + return ret + } + return o.Predicates +} + +// GetPredicatesOk returns a tuple with the Predicates field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *NextAvailableDelegationArguments) GetPredicatesOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.Predicates) { + return map[string]interface{}{}, false + } + return o.Predicates, true +} + +// HasPredicates returns a boolean if a field has been set. +func (o *NextAvailableDelegationArguments) HasPredicates() bool { + if o != nil && !IsNil(o.Predicates) { + return true + } + + return false +} + +// SetPredicates gets a reference to the given map[string]interface{} and assigns it to the Predicates field. +func (o *NextAvailableDelegationArguments) SetPredicates(v map[string]interface{}) { + o.Predicates = v +} + +// GetReadOnly returns the ReadOnly field value if set, zero value otherwise. +func (o *NextAvailableDelegationArguments) GetReadOnly() bool { + if o == nil || IsNil(o.ReadOnly) { + var ret bool + return ret + } + return *o.ReadOnly +} + +// GetReadOnlyOk returns a tuple with the ReadOnly field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *NextAvailableDelegationArguments) GetReadOnlyOk() (*bool, bool) { + if o == nil || IsNil(o.ReadOnly) { + return nil, false + } + return o.ReadOnly, true +} + +// HasReadOnly returns a boolean if a field has been set. +func (o *NextAvailableDelegationArguments) HasReadOnly() bool { + if o != nil && !IsNil(o.ReadOnly) { + return true + } + + return false +} + +// SetReadOnly gets a reference to the given bool and assigns it to the ReadOnly field. +func (o *NextAvailableDelegationArguments) SetReadOnly(v bool) { + o.ReadOnly = &v +} + +func (o NextAvailableDelegationArguments) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o NextAvailableDelegationArguments) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Cidr) { + toSerialize["cidr"] = o.Cidr + } + if !IsNil(o.Count) { + toSerialize["count"] = o.Count + } + if !IsNil(o.FederatedRealms) { + toSerialize["federated_realms"] = o.FederatedRealms + } + if !IsNil(o.Predicates) { + toSerialize["predicates"] = o.Predicates + } + if !IsNil(o.ReadOnly) { + toSerialize["read_only"] = o.ReadOnly + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *NextAvailableDelegationArguments) UnmarshalJSON(data []byte) (err error) { + varNextAvailableDelegationArguments := _NextAvailableDelegationArguments{} + + err = json.Unmarshal(data, &varNextAvailableDelegationArguments) + + if err != nil { + return err + } + + *o = NextAvailableDelegationArguments(varNextAvailableDelegationArguments) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "cidr") + delete(additionalProperties, "count") + delete(additionalProperties, "federated_realms") + delete(additionalProperties, "predicates") + delete(additionalProperties, "read_only") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableNextAvailableDelegationArguments struct { + value *NextAvailableDelegationArguments + isSet bool +} + +func (v NullableNextAvailableDelegationArguments) Get() *NextAvailableDelegationArguments { + return v.value +} + +func (v *NullableNextAvailableDelegationArguments) Set(val *NextAvailableDelegationArguments) { + v.value = val + v.isSet = true +} + +func (v NullableNextAvailableDelegationArguments) IsSet() bool { + return v.isSet +} + +func (v *NullableNextAvailableDelegationArguments) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableNextAvailableDelegationArguments(val *NextAvailableDelegationArguments) *NullableNextAvailableDelegationArguments { + return &NullableNextAvailableDelegationArguments{value: val, isSet: true} +} + +func (v NullableNextAvailableDelegationArguments) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableNextAvailableDelegationArguments) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/ipamfederation/model_next_available_delegation_properties.go b/ipamfederation/model_next_available_delegation_properties.go new file mode 100644 index 0000000..3b4bf55 --- /dev/null +++ b/ipamfederation/model_next_available_delegation_properties.go @@ -0,0 +1,230 @@ +/* +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 NextAvailableDelegationProperties type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &NextAvailableDelegationProperties{} + +// NextAvailableDelegationProperties struct for NextAvailableDelegationProperties +type NextAvailableDelegationProperties struct { + // The description for the __Delegation__. May contain 0 to 1024 characters. Can include UTF-8. + Comment *string `json:"comment,omitempty"` + // The specific IPAM service the __Delegation__ was delegated to. + DelegatedTo *string `json:"delegated_to,omitempty"` + // The name to be provided. + Name *string `json:"name,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _NextAvailableDelegationProperties NextAvailableDelegationProperties + +// NewNextAvailableDelegationProperties instantiates a new NextAvailableDelegationProperties 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 NewNextAvailableDelegationProperties() *NextAvailableDelegationProperties { + this := NextAvailableDelegationProperties{} + return &this +} + +// NewNextAvailableDelegationPropertiesWithDefaults instantiates a new NextAvailableDelegationProperties 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 NewNextAvailableDelegationPropertiesWithDefaults() *NextAvailableDelegationProperties { + this := NextAvailableDelegationProperties{} + return &this +} + +// GetComment returns the Comment field value if set, zero value otherwise. +func (o *NextAvailableDelegationProperties) 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 *NextAvailableDelegationProperties) 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 *NextAvailableDelegationProperties) 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 *NextAvailableDelegationProperties) SetComment(v string) { + o.Comment = &v +} + +// GetDelegatedTo returns the DelegatedTo field value if set, zero value otherwise. +func (o *NextAvailableDelegationProperties) GetDelegatedTo() string { + if o == nil || IsNil(o.DelegatedTo) { + var ret string + return ret + } + return *o.DelegatedTo +} + +// GetDelegatedToOk returns a tuple with the DelegatedTo field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *NextAvailableDelegationProperties) GetDelegatedToOk() (*string, bool) { + if o == nil || IsNil(o.DelegatedTo) { + return nil, false + } + return o.DelegatedTo, true +} + +// HasDelegatedTo returns a boolean if a field has been set. +func (o *NextAvailableDelegationProperties) HasDelegatedTo() bool { + if o != nil && !IsNil(o.DelegatedTo) { + return true + } + + return false +} + +// SetDelegatedTo gets a reference to the given string and assigns it to the DelegatedTo field. +func (o *NextAvailableDelegationProperties) SetDelegatedTo(v string) { + o.DelegatedTo = &v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *NextAvailableDelegationProperties) 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 *NextAvailableDelegationProperties) 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 *NextAvailableDelegationProperties) 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 *NextAvailableDelegationProperties) SetName(v string) { + o.Name = &v +} + +func (o NextAvailableDelegationProperties) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o NextAvailableDelegationProperties) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Comment) { + toSerialize["comment"] = o.Comment + } + if !IsNil(o.DelegatedTo) { + toSerialize["delegated_to"] = o.DelegatedTo + } + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *NextAvailableDelegationProperties) UnmarshalJSON(data []byte) (err error) { + varNextAvailableDelegationProperties := _NextAvailableDelegationProperties{} + + err = json.Unmarshal(data, &varNextAvailableDelegationProperties) + + if err != nil { + return err + } + + *o = NextAvailableDelegationProperties(varNextAvailableDelegationProperties) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "comment") + delete(additionalProperties, "delegated_to") + delete(additionalProperties, "name") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableNextAvailableDelegationProperties struct { + value *NextAvailableDelegationProperties + isSet bool +} + +func (v NullableNextAvailableDelegationProperties) Get() *NextAvailableDelegationProperties { + return v.value +} + +func (v *NullableNextAvailableDelegationProperties) Set(val *NextAvailableDelegationProperties) { + v.value = val + v.isSet = true +} + +func (v NullableNextAvailableDelegationProperties) IsSet() bool { + return v.isSet +} + +func (v *NullableNextAvailableDelegationProperties) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableNextAvailableDelegationProperties(val *NextAvailableDelegationProperties) *NullableNextAvailableDelegationProperties { + return &NullableNextAvailableDelegationProperties{value: val, isSet: true} +} + +func (v NullableNextAvailableDelegationProperties) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableNextAvailableDelegationProperties) 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_protobuf_field_mask.go b/ipamfederation/model_protobuf_field_mask.go new file mode 100644 index 0000000..13c4b2d --- /dev/null +++ b/ipamfederation/model_protobuf_field_mask.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 ProtobufFieldMask type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ProtobufFieldMask{} + +// ProtobufFieldMask paths: \"f.a\" paths: \"f.b.d\" Here `f` represents a field in some root message, `a` and `b` fields in the message found in `f`, and `d` a field found in the message in `f.b`. Field masks are used to specify a subset of fields that should be returned by a get operation or modified by an update operation. Field masks also have a custom JSON encoding (see below). # Field Masks in Projections When used in the context of a projection, a response message or sub-message is filtered by the API to only contain those fields as specified in the mask. For example, if the mask in the previous example is applied to a response message as follows: f { a : 22 b { d : 1 x : 2 } y : 13 } z: 8 The result will not contain specific values for fields x,y and z (their value will be set to the default, and omitted in proto text output): f { a : 22 b { d : 1 } } A repeated field is not allowed except at the last position of a paths string. If a FieldMask object is not present in a get operation, the operation applies to all fields (as if a FieldMask of all fields had been specified). Note that a field mask does not necessarily apply to the top-level response message. In case of a REST get operation, the field mask applies directly to the response, but in case of a REST list operation, the mask instead applies to each individual message in the returned resource list. In case of a REST custom method, other definitions may be used. Where the mask applies will be clearly documented together with its declaration in the API. In any case, the effect on the returned resource/resources is required behavior for APIs. # Field Masks in Update Operations A field mask in update operations specifies which fields of the targeted resource are going to be updated. The API is required to only change the values of the fields as specified in the mask and leave the others untouched. If a resource is passed in to describe the updated values, the API ignores the values of all fields not covered by the mask. If a repeated field is specified for an update operation, the existing repeated values in the target resource will be overwritten by the new values. Note that a repeated field is only allowed in the last position of a `paths` string. If a sub-message is specified in the last position of the field mask for an update operation, then the existing sub-message in the target resource is overwritten. Given the target message: f { b { d : 1 x : 2 } c : 1 } And an update message: f { b { d : 10 } } then if the field mask is: paths: \"f.b\" then the result will be: f { b { d : 10 } c : 1 } However, if the update mask was: paths: \"f.b.d\" then the result would be: f { b { d : 10 x : 2 } c : 1 } In order to reset a field's value to the default, the field must be in the mask and set to the default value in the provided resource. Hence, in order to reset all fields of a resource, provide a default instance of the resource and set all fields in the mask, or do not provide a mask as described below. If a field mask is not present on update, the operation applies to all fields (as if a field mask of all fields has been specified). Note that in the presence of schema evolution, this may mean that fields the client does not know and has therefore not filled into the request will be reset to their default. If this is unwanted behavior, a specific service may require a client to always specify a field mask, producing an error if not. As with get operations, the location of the resource which describes the updated values in the request message depends on the operation kind. In any case, the effect of the field mask is required to be honored by the API. ## Considerations for HTTP REST The HTTP kind of an update operation which uses a field mask must be set to PATCH instead of PUT in order to satisfy HTTP semantics (PUT must only be used for full updates). # JSON Encoding of Field Masks In JSON, a field mask is encoded as a single string where paths are separated by a comma. Fields name in each path are converted to/from lower-camel naming conventions. As an example, consider the following message declarations: message Profile { User user = 1; Photo photo = 2; } message User { string display_name = 1; string address = 2; } In proto a field mask for `Profile` may look as such: mask { paths: \"user.display_name\" paths: \"photo\" } In JSON, the same mask is represented as below: { mask: \"user.displayName,photo\" } # Field Masks and Oneof Fields Field masks treat fields in oneofs just as regular fields. Consider the following message: message SampleMessage { oneof test_oneof { string name = 4; SubMessage sub_message = 9; } } The field mask can be: mask { paths: \"name\" } Or: mask { paths: \"sub_message\" } Note that oneof type names (\"test_oneof\" in this case) cannot be used in paths. ## Field Mask Verification The implementation of the all the API methods, which have any FieldMask type field in the request, should verify the included field paths, and return `INVALID_ARGUMENT` error if any path is duplicated or unmappable. +type ProtobufFieldMask struct { + // The set of field mask paths. + Paths []string `json:"paths,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _ProtobufFieldMask ProtobufFieldMask + +// NewProtobufFieldMask instantiates a new ProtobufFieldMask 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 NewProtobufFieldMask() *ProtobufFieldMask { + this := ProtobufFieldMask{} + return &this +} + +// NewProtobufFieldMaskWithDefaults instantiates a new ProtobufFieldMask 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 NewProtobufFieldMaskWithDefaults() *ProtobufFieldMask { + this := ProtobufFieldMask{} + return &this +} + +// GetPaths returns the Paths field value if set, zero value otherwise. +func (o *ProtobufFieldMask) GetPaths() []string { + if o == nil || IsNil(o.Paths) { + var ret []string + return ret + } + return o.Paths +} + +// GetPathsOk returns a tuple with the Paths field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ProtobufFieldMask) GetPathsOk() ([]string, bool) { + if o == nil || IsNil(o.Paths) { + return nil, false + } + return o.Paths, true +} + +// HasPaths returns a boolean if a field has been set. +func (o *ProtobufFieldMask) HasPaths() bool { + if o != nil && !IsNil(o.Paths) { + return true + } + + return false +} + +// SetPaths gets a reference to the given []string and assigns it to the Paths field. +func (o *ProtobufFieldMask) SetPaths(v []string) { + o.Paths = v +} + +func (o ProtobufFieldMask) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ProtobufFieldMask) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Paths) { + toSerialize["paths"] = o.Paths + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *ProtobufFieldMask) UnmarshalJSON(data []byte) (err error) { + varProtobufFieldMask := _ProtobufFieldMask{} + + err = json.Unmarshal(data, &varProtobufFieldMask) + + if err != nil { + return err + } + + *o = ProtobufFieldMask(varProtobufFieldMask) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "paths") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableProtobufFieldMask struct { + value *ProtobufFieldMask + isSet bool +} + +func (v NullableProtobufFieldMask) Get() *ProtobufFieldMask { + return v.value +} + +func (v *NullableProtobufFieldMask) Set(val *ProtobufFieldMask) { + v.value = val + v.isSet = true +} + +func (v NullableProtobufFieldMask) IsSet() bool { + return v.isSet +} + +func (v *NullableProtobufFieldMask) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableProtobufFieldMask(val *ProtobufFieldMask) *NullableProtobufFieldMask { + return &NullableProtobufFieldMask{value: val, isSet: true} +} + +func (v NullableProtobufFieldMask) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableProtobufFieldMask) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/ipamfederation/model_read_delegation_response.go b/ipamfederation/model_read_delegation_response.go new file mode 100644 index 0000000..da293b7 --- /dev/null +++ b/ipamfederation/model_read_delegation_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 ReadDelegationResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ReadDelegationResponse{} + +// ReadDelegationResponse The response format to retrieve the __Delegation__ object. +type ReadDelegationResponse struct { + // The Delegation object. + Result *Delegation `json:"result,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _ReadDelegationResponse ReadDelegationResponse + +// NewReadDelegationResponse instantiates a new ReadDelegationResponse 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 NewReadDelegationResponse() *ReadDelegationResponse { + this := ReadDelegationResponse{} + return &this +} + +// NewReadDelegationResponseWithDefaults instantiates a new ReadDelegationResponse 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 NewReadDelegationResponseWithDefaults() *ReadDelegationResponse { + this := ReadDelegationResponse{} + return &this +} + +// GetResult returns the Result field value if set, zero value otherwise. +func (o *ReadDelegationResponse) GetResult() Delegation { + if o == nil || IsNil(o.Result) { + var ret Delegation + 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 *ReadDelegationResponse) GetResultOk() (*Delegation, 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 *ReadDelegationResponse) HasResult() bool { + if o != nil && !IsNil(o.Result) { + return true + } + + return false +} + +// SetResult gets a reference to the given Delegation and assigns it to the Result field. +func (o *ReadDelegationResponse) SetResult(v Delegation) { + o.Result = &v +} + +func (o ReadDelegationResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ReadDelegationResponse) 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 *ReadDelegationResponse) UnmarshalJSON(data []byte) (err error) { + varReadDelegationResponse := _ReadDelegationResponse{} + + err = json.Unmarshal(data, &varReadDelegationResponse) + + if err != nil { + return err + } + + *o = ReadDelegationResponse(varReadDelegationResponse) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "result") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableReadDelegationResponse struct { + value *ReadDelegationResponse + isSet bool +} + +func (v NullableReadDelegationResponse) Get() *ReadDelegationResponse { + return v.value +} + +func (v *NullableReadDelegationResponse) Set(val *ReadDelegationResponse) { + v.value = val + v.isSet = true +} + +func (v NullableReadDelegationResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableReadDelegationResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableReadDelegationResponse(val *ReadDelegationResponse) *NullableReadDelegationResponse { + return &NullableReadDelegationResponse{value: val, isSet: true} +} + +func (v NullableReadDelegationResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableReadDelegationResponse) 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_delegation_response.go b/ipamfederation/model_update_delegation_response.go new file mode 100644 index 0000000..469e83c --- /dev/null +++ b/ipamfederation/model_update_delegation_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 UpdateDelegationResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &UpdateDelegationResponse{} + +// UpdateDelegationResponse The response format to update the __Delegation__ object. +type UpdateDelegationResponse struct { + // The Delegation object. + Result *Delegation `json:"result,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _UpdateDelegationResponse UpdateDelegationResponse + +// NewUpdateDelegationResponse instantiates a new UpdateDelegationResponse 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 NewUpdateDelegationResponse() *UpdateDelegationResponse { + this := UpdateDelegationResponse{} + return &this +} + +// NewUpdateDelegationResponseWithDefaults instantiates a new UpdateDelegationResponse 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 NewUpdateDelegationResponseWithDefaults() *UpdateDelegationResponse { + this := UpdateDelegationResponse{} + return &this +} + +// GetResult returns the Result field value if set, zero value otherwise. +func (o *UpdateDelegationResponse) GetResult() Delegation { + if o == nil || IsNil(o.Result) { + var ret Delegation + 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 *UpdateDelegationResponse) GetResultOk() (*Delegation, 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 *UpdateDelegationResponse) HasResult() bool { + if o != nil && !IsNil(o.Result) { + return true + } + + return false +} + +// SetResult gets a reference to the given Delegation and assigns it to the Result field. +func (o *UpdateDelegationResponse) SetResult(v Delegation) { + o.Result = &v +} + +func (o UpdateDelegationResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o UpdateDelegationResponse) 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 *UpdateDelegationResponse) UnmarshalJSON(data []byte) (err error) { + varUpdateDelegationResponse := _UpdateDelegationResponse{} + + err = json.Unmarshal(data, &varUpdateDelegationResponse) + + if err != nil { + return err + } + + *o = UpdateDelegationResponse(varUpdateDelegationResponse) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "result") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableUpdateDelegationResponse struct { + value *UpdateDelegationResponse + isSet bool +} + +func (v NullableUpdateDelegationResponse) Get() *UpdateDelegationResponse { + return v.value +} + +func (v *NullableUpdateDelegationResponse) Set(val *UpdateDelegationResponse) { + v.value = val + v.isSet = true +} + +func (v NullableUpdateDelegationResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableUpdateDelegationResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableUpdateDelegationResponse(val *UpdateDelegationResponse) *NullableUpdateDelegationResponse { + return &NullableUpdateDelegationResponse{value: val, isSet: true} +} + +func (v NullableUpdateDelegationResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableUpdateDelegationResponse) 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_config_gen_test.go b/ipamfederation/test/api_config_gen_test.go new file mode 100644 index 0000000..3225f3d --- /dev/null +++ b/ipamfederation/test/api_config_gen_test.go @@ -0,0 +1,52 @@ +/* +IPAM Federation API + +Testing ConfigGenAPIService + +*/ + +// 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 TestConfigGenAPIService(t *testing.T) { + + apiClient := ipamfederation.NewAPIClient() + + t.Run("Test ConfigGenAPIService Fetch", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var ophid string + + resp, httpRes, err := apiClient.ConfigGenAPI.Fetch(context.Background(), ophid).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test ConfigGenAPIService UpdateConfigStatus", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.ConfigGenAPI.UpdateConfigStatus(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + +} diff --git a/ipamfederation/test/api_delegation_test.go b/ipamfederation/test/api_delegation_test.go new file mode 100644 index 0000000..b80b239 --- /dev/null +++ b/ipamfederation/test/api_delegation_test.go @@ -0,0 +1,114 @@ +/* +IPAM Federation API + +Testing DelegationAPIService + +*/ + +// 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 TestDelegationAPIService(t *testing.T) { + + apiClient := ipamfederation.NewAPIClient() + + t.Run("Test DelegationAPIService Bulk", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.DelegationAPI.Bulk(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test DelegationAPIService Create", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.DelegationAPI.Create(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test DelegationAPIService Delete", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var id string + + httpRes, err := apiClient.DelegationAPI.Delete(context.Background(), id).Execute() + + require.Nil(t, err) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test DelegationAPIService DeleteWithoutId", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + httpRes, err := apiClient.DelegationAPI.DeleteWithoutId(context.Background()).Execute() + + require.Nil(t, err) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test DelegationAPIService List", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.DelegationAPI.List(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test DelegationAPIService Read", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var id string + + resp, httpRes, err := apiClient.DelegationAPI.Read(context.Background(), id).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test DelegationAPIService Update", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var id string + + resp, httpRes, err := apiClient.DelegationAPI.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_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_delegation_test.go b/ipamfederation/test/api_next_available_delegation_test.go new file mode 100644 index 0000000..47aec51 --- /dev/null +++ b/ipamfederation/test/api_next_available_delegation_test.go @@ -0,0 +1,38 @@ +/* +IPAM Federation API + +Testing NextAvailableDelegationAPIService + +*/ + +// 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 TestNextAvailableDelegationAPIService(t *testing.T) { + + apiClient := ipamfederation.NewAPIClient() + + t.Run("Test NextAvailableDelegationAPIService GetNextAvailableDelegation", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.NextAvailableDelegationAPI.GetNextAvailableDelegation(context.Background()).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) +}