From 429421189e3c9d65ca138a5d8636e5d856c13522 Mon Sep 17 00:00:00 2001 From: Ujjwal Nasra <125353741+unasra@users.noreply.github.com> Date: Thu, 9 May 2024 22:49:42 +0530 Subject: [PATCH] Go-sdk Changes for Bloxone Redirect (#44) * Go-sdk Changes for Bloxone Redirect * Resolved Formatting issues * Modified Readme --- README.md | 1 + client/client.go | 3 + redirect/.openapi-generator-ignore | 23 + redirect/.openapi-generator/FILES | 68 ++ redirect/.openapi-generator/VERSION | 1 + redirect/README.md | 145 +++ redirect/api/openapi.yaml | 968 ++++++++++++++++++ redirect/api_certificate.go | 153 +++ redirect/api_custom_redirects.go | 922 +++++++++++++++++ redirect/api_redirect_page.go | 315 ++++++ redirect/client.go | 54 + redirect/docs/CertificateAPI.md | 74 ++ ...tificateGetProxyCertificates500Response.md | 56 + ...ateGetProxyCertificates500ResponseError.md | 108 ++ redirect/docs/CustomRedirect.md | 212 ++++ redirect/docs/CustomRedirectCreateResponse.md | 56 + redirect/docs/CustomRedirectDeleteRequest.md | 56 + redirect/docs/CustomRedirectMultiResponse.md | 56 + redirect/docs/CustomRedirectReadResponse.md | 56 + redirect/docs/CustomRedirectUpdateResponse.md | 56 + redirect/docs/CustomRedirectsAPI.md | 419 ++++++++ ...edirectsCreateCustomRedirect400Response.md | 56 + ...ctsCreateCustomRedirect400ResponseError.md | 108 ++ ...edirectsCreateCustomRedirect409Response.md | 56 + ...ctsCreateCustomRedirect409ResponseError.md | 108 ++ ...edirectsDeleteCustomRedirect400Response.md | 56 + ...ctsDeleteCustomRedirect400ResponseError.md | 108 ++ ...tsDeleteSingleCustomRedirect400Response.md | 56 + ...eteSingleCustomRedirect400ResponseError.md | 108 ++ ...mRedirectsReadCustomRedirect404Response.md | 56 + ...rectsReadCustomRedirect404ResponseError.md | 108 ++ ...edirectsUpdateCustomRedirect409Response.md | 56 + ...ctsUpdateCustomRedirect409ResponseError.md | 108 ++ redirect/docs/ProxyCertResponse.md | 82 ++ redirect/docs/RedirectPage.md | 212 ++++ redirect/docs/RedirectPageAPI.md | 142 +++ redirect/docs/RedirectPageReadResponse.md | 56 + ...directPageUpdateRedirectPage400Response.md | 56 + ...tPageUpdateRedirectPage400ResponseError.md | 108 ++ redirect/docs/RedirectPageUpdateResponse.md | 56 + redirect/docs/UpdateRedirectPagePayload.md | 160 +++ ...ate_get_proxy_certificates_500_response.go | 153 +++ ...t_proxy_certificates_500_response_error.go | 227 ++++ redirect/model_custom_redirect.go | 383 +++++++ .../model_custom_redirect_create_response.go | 153 +++ .../model_custom_redirect_delete_request.go | 154 +++ .../model_custom_redirect_multi_response.go | 154 +++ .../model_custom_redirect_read_response.go | 153 +++ .../model_custom_redirect_update_response.go | 153 +++ ...cts_create_custom_redirect_400_response.go | 153 +++ ...eate_custom_redirect_400_response_error.go | 227 ++++ ...cts_create_custom_redirect_409_response.go | 153 +++ ...eate_custom_redirect_409_response_error.go | 227 ++++ ...cts_delete_custom_redirect_400_response.go | 153 +++ ...lete_custom_redirect_400_response_error.go | 227 ++++ ...ete_single_custom_redirect_400_response.go | 153 +++ ...ngle_custom_redirect_400_response_error.go | 227 ++++ ...rects_read_custom_redirect_404_response.go | 153 +++ ...read_custom_redirect_404_response_error.go | 227 ++++ ...cts_update_custom_redirect_409_response.go | 153 +++ ...date_custom_redirect_409_response_error.go | 227 ++++ redirect/model_proxy_cert_response.go | 192 ++++ redirect/model_redirect_page.go | 383 +++++++ redirect/model_redirect_page_read_response.go | 153 +++ ..._page_update_redirect_page_400_response.go | 153 +++ ...update_redirect_page_400_response_error.go | 227 ++++ .../model_redirect_page_update_response.go | 153 +++ .../model_update_redirect_page_payload.go | 306 ++++++ redirect/test/api_certificate_test.go | 38 + redirect/test/api_custom_redirects_test.go | 102 ++ redirect/test/api_redirect_page_test.go | 50 + redirect/utils.go | 347 +++++++ 72 files changed, 11572 insertions(+) create mode 100644 redirect/.openapi-generator-ignore create mode 100644 redirect/.openapi-generator/FILES create mode 100644 redirect/.openapi-generator/VERSION create mode 100644 redirect/README.md create mode 100644 redirect/api/openapi.yaml create mode 100644 redirect/api_certificate.go create mode 100644 redirect/api_custom_redirects.go create mode 100644 redirect/api_redirect_page.go create mode 100644 redirect/client.go create mode 100644 redirect/docs/CertificateAPI.md create mode 100644 redirect/docs/CertificateGetProxyCertificates500Response.md create mode 100644 redirect/docs/CertificateGetProxyCertificates500ResponseError.md create mode 100644 redirect/docs/CustomRedirect.md create mode 100644 redirect/docs/CustomRedirectCreateResponse.md create mode 100644 redirect/docs/CustomRedirectDeleteRequest.md create mode 100644 redirect/docs/CustomRedirectMultiResponse.md create mode 100644 redirect/docs/CustomRedirectReadResponse.md create mode 100644 redirect/docs/CustomRedirectUpdateResponse.md create mode 100644 redirect/docs/CustomRedirectsAPI.md create mode 100644 redirect/docs/CustomRedirectsCreateCustomRedirect400Response.md create mode 100644 redirect/docs/CustomRedirectsCreateCustomRedirect400ResponseError.md create mode 100644 redirect/docs/CustomRedirectsCreateCustomRedirect409Response.md create mode 100644 redirect/docs/CustomRedirectsCreateCustomRedirect409ResponseError.md create mode 100644 redirect/docs/CustomRedirectsDeleteCustomRedirect400Response.md create mode 100644 redirect/docs/CustomRedirectsDeleteCustomRedirect400ResponseError.md create mode 100644 redirect/docs/CustomRedirectsDeleteSingleCustomRedirect400Response.md create mode 100644 redirect/docs/CustomRedirectsDeleteSingleCustomRedirect400ResponseError.md create mode 100644 redirect/docs/CustomRedirectsReadCustomRedirect404Response.md create mode 100644 redirect/docs/CustomRedirectsReadCustomRedirect404ResponseError.md create mode 100644 redirect/docs/CustomRedirectsUpdateCustomRedirect409Response.md create mode 100644 redirect/docs/CustomRedirectsUpdateCustomRedirect409ResponseError.md create mode 100644 redirect/docs/ProxyCertResponse.md create mode 100644 redirect/docs/RedirectPage.md create mode 100644 redirect/docs/RedirectPageAPI.md create mode 100644 redirect/docs/RedirectPageReadResponse.md create mode 100644 redirect/docs/RedirectPageUpdateRedirectPage400Response.md create mode 100644 redirect/docs/RedirectPageUpdateRedirectPage400ResponseError.md create mode 100644 redirect/docs/RedirectPageUpdateResponse.md create mode 100644 redirect/docs/UpdateRedirectPagePayload.md create mode 100644 redirect/model_certificate_get_proxy_certificates_500_response.go create mode 100644 redirect/model_certificate_get_proxy_certificates_500_response_error.go create mode 100644 redirect/model_custom_redirect.go create mode 100644 redirect/model_custom_redirect_create_response.go create mode 100644 redirect/model_custom_redirect_delete_request.go create mode 100644 redirect/model_custom_redirect_multi_response.go create mode 100644 redirect/model_custom_redirect_read_response.go create mode 100644 redirect/model_custom_redirect_update_response.go create mode 100644 redirect/model_custom_redirects_create_custom_redirect_400_response.go create mode 100644 redirect/model_custom_redirects_create_custom_redirect_400_response_error.go create mode 100644 redirect/model_custom_redirects_create_custom_redirect_409_response.go create mode 100644 redirect/model_custom_redirects_create_custom_redirect_409_response_error.go create mode 100644 redirect/model_custom_redirects_delete_custom_redirect_400_response.go create mode 100644 redirect/model_custom_redirects_delete_custom_redirect_400_response_error.go create mode 100644 redirect/model_custom_redirects_delete_single_custom_redirect_400_response.go create mode 100644 redirect/model_custom_redirects_delete_single_custom_redirect_400_response_error.go create mode 100644 redirect/model_custom_redirects_read_custom_redirect_404_response.go create mode 100644 redirect/model_custom_redirects_read_custom_redirect_404_response_error.go create mode 100644 redirect/model_custom_redirects_update_custom_redirect_409_response.go create mode 100644 redirect/model_custom_redirects_update_custom_redirect_409_response_error.go create mode 100644 redirect/model_proxy_cert_response.go create mode 100644 redirect/model_redirect_page.go create mode 100644 redirect/model_redirect_page_read_response.go create mode 100644 redirect/model_redirect_page_update_redirect_page_400_response.go create mode 100644 redirect/model_redirect_page_update_redirect_page_400_response_error.go create mode 100644 redirect/model_redirect_page_update_response.go create mode 100644 redirect/model_update_redirect_page_payload.go create mode 100644 redirect/test/api_certificate_test.go create mode 100644 redirect/test/api_custom_redirects_test.go create mode 100644 redirect/test/api_redirect_page_test.go create mode 100644 redirect/utils.go diff --git a/README.md b/README.md index c8f32ea..46c15db 100644 --- a/README.md +++ b/README.md @@ -12,6 +12,7 @@ The following Bloxone APIs are supported: ## Bloxone Threat Defense - [Threat Defense Cloud (FW API)](fw/README.md) - [DNS Forwarding Proxy (DFP API)](dfp/README.md) +- [Redirect](redirect/README.md) ## Bloxone DDI - [IP Address Management](ipam/README.md) diff --git a/client/client.go b/client/client.go index 12e2ab9..aefebe5 100644 --- a/client/client.go +++ b/client/client.go @@ -11,6 +11,7 @@ import ( "github.com/infobloxopen/bloxone-go-client/ipam" "github.com/infobloxopen/bloxone-go-client/keys" "github.com/infobloxopen/bloxone-go-client/option" + "github.com/infobloxopen/bloxone-go-client/redirect" ) // APIClient is an aggregation of different BloxOne API clients. @@ -24,6 +25,7 @@ type APIClient struct { DNSForwardingProxyAPI *dfp.APIClient FWAPI *fw.APIClient AnycastAPI *anycast.APIClient + RedirectAPI *redirect.APIClient } // NewAPIClient creates a new BloxOne API Client. @@ -57,5 +59,6 @@ func NewAPIClient(options ...option.ClientOption) *APIClient { DNSForwardingProxyAPI: dfp.NewAPIClient(options...), FWAPI: fw.NewAPIClient(options...), AnycastAPI: anycast.NewAPIClient(options...), + RedirectAPI: redirect.NewAPIClient(options...), } } diff --git a/redirect/.openapi-generator-ignore b/redirect/.openapi-generator-ignore new file mode 100644 index 0000000..7484ee5 --- /dev/null +++ b/redirect/.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/redirect/.openapi-generator/FILES b/redirect/.openapi-generator/FILES new file mode 100644 index 0000000..ad4a162 --- /dev/null +++ b/redirect/.openapi-generator/FILES @@ -0,0 +1,68 @@ +.openapi-generator-ignore +README.md +api/openapi.yaml +api_certificate.go +api_custom_redirects.go +api_redirect_page.go +client.go +docs/CertificateAPI.md +docs/CertificateGetProxyCertificates500Response.md +docs/CertificateGetProxyCertificates500ResponseError.md +docs/CustomRedirect.md +docs/CustomRedirectCreateResponse.md +docs/CustomRedirectDeleteRequest.md +docs/CustomRedirectMultiResponse.md +docs/CustomRedirectReadResponse.md +docs/CustomRedirectUpdateResponse.md +docs/CustomRedirectsAPI.md +docs/CustomRedirectsCreateCustomRedirect400Response.md +docs/CustomRedirectsCreateCustomRedirect400ResponseError.md +docs/CustomRedirectsCreateCustomRedirect409Response.md +docs/CustomRedirectsCreateCustomRedirect409ResponseError.md +docs/CustomRedirectsDeleteCustomRedirect400Response.md +docs/CustomRedirectsDeleteCustomRedirect400ResponseError.md +docs/CustomRedirectsDeleteSingleCustomRedirect400Response.md +docs/CustomRedirectsDeleteSingleCustomRedirect400ResponseError.md +docs/CustomRedirectsReadCustomRedirect404Response.md +docs/CustomRedirectsReadCustomRedirect404ResponseError.md +docs/CustomRedirectsUpdateCustomRedirect409Response.md +docs/CustomRedirectsUpdateCustomRedirect409ResponseError.md +docs/ProxyCertResponse.md +docs/RedirectPage.md +docs/RedirectPageAPI.md +docs/RedirectPageReadResponse.md +docs/RedirectPageUpdateRedirectPage400Response.md +docs/RedirectPageUpdateRedirectPage400ResponseError.md +docs/RedirectPageUpdateResponse.md +docs/UpdateRedirectPagePayload.md +model_certificate_get_proxy_certificates_500_response.go +model_certificate_get_proxy_certificates_500_response_error.go +model_custom_redirect.go +model_custom_redirect_create_response.go +model_custom_redirect_delete_request.go +model_custom_redirect_multi_response.go +model_custom_redirect_read_response.go +model_custom_redirect_update_response.go +model_custom_redirects_create_custom_redirect_400_response.go +model_custom_redirects_create_custom_redirect_400_response_error.go +model_custom_redirects_create_custom_redirect_409_response.go +model_custom_redirects_create_custom_redirect_409_response_error.go +model_custom_redirects_delete_custom_redirect_400_response.go +model_custom_redirects_delete_custom_redirect_400_response_error.go +model_custom_redirects_delete_single_custom_redirect_400_response.go +model_custom_redirects_delete_single_custom_redirect_400_response_error.go +model_custom_redirects_read_custom_redirect_404_response.go +model_custom_redirects_read_custom_redirect_404_response_error.go +model_custom_redirects_update_custom_redirect_409_response.go +model_custom_redirects_update_custom_redirect_409_response_error.go +model_proxy_cert_response.go +model_redirect_page.go +model_redirect_page_read_response.go +model_redirect_page_update_redirect_page_400_response.go +model_redirect_page_update_redirect_page_400_response_error.go +model_redirect_page_update_response.go +model_update_redirect_page_payload.go +test/api_certificate_test.go +test/api_custom_redirects_test.go +test/api_redirect_page_test.go +utils.go diff --git a/redirect/.openapi-generator/VERSION b/redirect/.openapi-generator/VERSION new file mode 100644 index 0000000..18bb418 --- /dev/null +++ b/redirect/.openapi-generator/VERSION @@ -0,0 +1 @@ +7.5.0 diff --git a/redirect/README.md b/redirect/README.md new file mode 100644 index 0000000..01c02fe --- /dev/null +++ b/redirect/README.md @@ -0,0 +1,145 @@ +# Go API client for BloxOne Redirect API + +You can configure BloxOne Threat Defense Cloud to redirect traffic to the Infoblox server that displays the default or customized redirect page. You can redirect traffic to a custom destination using custom redirects. + + +## 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/redirect +``` + +Import the package into your code: +```go +import "github.com/infobloxopen/bloxone-go-client/redirect" +``` + +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 := redirect.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 := redirect.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 := redirect.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 BloxOne Redirect 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 BloxOne Redirect API, you can use the `option.WithAPIKey` option. For example: + +```go +client := redirect.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 := redirect.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 *https://csp.infoblox.com/api/atcfw/v1* + +Class | Method | HTTP request | Description +------------ | ------------- | ------------- | ------------- +*CertificateAPI* | [**GetProxyCertificates**](docs/CertificateAPI.md#getproxycertificates) | **Get** /cert_download_urls | Get Proxy Certificates +*CustomRedirectsAPI* | [**CreateCustomRedirect**](docs/CustomRedirectsAPI.md#createcustomredirect) | **Post** /custom_redirects | Create Custom Redirect. +*CustomRedirectsAPI* | [**DeleteCustomRedirect**](docs/CustomRedirectsAPI.md#deletecustomredirect) | **Delete** /custom_redirects | Delete Custom Redirect. +*CustomRedirectsAPI* | [**DeleteSingleCustomRedirect**](docs/CustomRedirectsAPI.md#deletesinglecustomredirect) | **Delete** /custom_redirects/{id} | Delete Custom Redirect By Id. +*CustomRedirectsAPI* | [**ListCustomRedirect**](docs/CustomRedirectsAPI.md#listcustomredirect) | **Get** /custom_redirects | List Custom Redirects. +*CustomRedirectsAPI* | [**ReadCustomRedirect**](docs/CustomRedirectsAPI.md#readcustomredirect) | **Get** /custom_redirects/{id} | Read Custom Redirect. +*CustomRedirectsAPI* | [**UpdateCustomRedirect**](docs/CustomRedirectsAPI.md#updatecustomredirect) | **Put** /custom_redirects/{id} | Update Custom Redirect. +*RedirectPageAPI* | [**ReadRedirectPage**](docs/RedirectPageAPI.md#readredirectpage) | **Get** /redirect_page | Read Redirect Page. +*RedirectPageAPI* | [**UpdateRedirectPage**](docs/RedirectPageAPI.md#updateredirectpage) | **Put** /redirect_page | Update Redirect Page. + + +## Documentation For Models + + - [CertificateGetProxyCertificates500Response](docs/CertificateGetProxyCertificates500Response.md) + - [CertificateGetProxyCertificates500ResponseError](docs/CertificateGetProxyCertificates500ResponseError.md) + - [CustomRedirect](docs/CustomRedirect.md) + - [CustomRedirectCreateResponse](docs/CustomRedirectCreateResponse.md) + - [CustomRedirectDeleteRequest](docs/CustomRedirectDeleteRequest.md) + - [CustomRedirectMultiResponse](docs/CustomRedirectMultiResponse.md) + - [CustomRedirectReadResponse](docs/CustomRedirectReadResponse.md) + - [CustomRedirectUpdateResponse](docs/CustomRedirectUpdateResponse.md) + - [CustomRedirectsCreateCustomRedirect400Response](docs/CustomRedirectsCreateCustomRedirect400Response.md) + - [CustomRedirectsCreateCustomRedirect400ResponseError](docs/CustomRedirectsCreateCustomRedirect400ResponseError.md) + - [CustomRedirectsCreateCustomRedirect409Response](docs/CustomRedirectsCreateCustomRedirect409Response.md) + - [CustomRedirectsCreateCustomRedirect409ResponseError](docs/CustomRedirectsCreateCustomRedirect409ResponseError.md) + - [CustomRedirectsDeleteCustomRedirect400Response](docs/CustomRedirectsDeleteCustomRedirect400Response.md) + - [CustomRedirectsDeleteCustomRedirect400ResponseError](docs/CustomRedirectsDeleteCustomRedirect400ResponseError.md) + - [CustomRedirectsDeleteSingleCustomRedirect400Response](docs/CustomRedirectsDeleteSingleCustomRedirect400Response.md) + - [CustomRedirectsDeleteSingleCustomRedirect400ResponseError](docs/CustomRedirectsDeleteSingleCustomRedirect400ResponseError.md) + - [CustomRedirectsReadCustomRedirect404Response](docs/CustomRedirectsReadCustomRedirect404Response.md) + - [CustomRedirectsReadCustomRedirect404ResponseError](docs/CustomRedirectsReadCustomRedirect404ResponseError.md) + - [CustomRedirectsUpdateCustomRedirect409Response](docs/CustomRedirectsUpdateCustomRedirect409Response.md) + - [CustomRedirectsUpdateCustomRedirect409ResponseError](docs/CustomRedirectsUpdateCustomRedirect409ResponseError.md) + - [ProxyCertResponse](docs/ProxyCertResponse.md) + - [RedirectPage](docs/RedirectPage.md) + - [RedirectPageReadResponse](docs/RedirectPageReadResponse.md) + - [RedirectPageUpdateRedirectPage400Response](docs/RedirectPageUpdateRedirectPage400Response.md) + - [RedirectPageUpdateRedirectPage400ResponseError](docs/RedirectPageUpdateRedirectPage400ResponseError.md) + - [RedirectPageUpdateResponse](docs/RedirectPageUpdateResponse.md) + - [UpdateRedirectPagePayload](docs/UpdateRedirectPagePayload.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/redirect/api/openapi.yaml b/redirect/api/openapi.yaml new file mode 100644 index 0000000..63c4e33 --- /dev/null +++ b/redirect/api/openapi.yaml @@ -0,0 +1,968 @@ +openapi: 3.0.1 +info: + description: | + You can configure BloxOne Threat Defense Cloud to redirect traffic to the Infoblox server that displays the default or customized redirect page. You can redirect traffic to a custom destination using custom redirects. + title: BloxOne Redirect API + version: v1 +servers: +- url: https://csp.infoblox.com/api/atcfw/v1/ +paths: + /cert_download_urls: + get: + description: | + Use this method to get certificates to use proxy server + operationId: certificateGetProxyCertificates + 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 + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/redirectProxyCertResponse' + description: GET operation response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/certificateGetProxyCertificates_500_response' + description: |2- + + - Internal server error occurred + summary: Get Proxy Certificates + tags: + - certificate + /custom_redirects: + delete: + description: | + Use this method to delete Custom Redirect objects. Deletion of multiple lists is an all-or-nothing operation (if any of the specified lists can not be deleted then none of the specified lists will be deleted). + + You can configure BloxOne Cloud to redirect traffic to the Infoblox redirect page or a custom redirect destination. BloxOne Cloud allows you to apply multiple redirect actions and integrate BloxOne Cloud with third-party proxies, secure web gateways, blackholes, honeypots and sinkhole solutions. + + Required: + - ids + operationId: custom_redirectsDeleteCustomRedirect + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/redirectCustomRedirectDeleteRequest' + required: true + responses: + "204": + content: {} + description: No Content + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/custom_redirectsDeleteCustomRedirect_400_response' + description: |2- + + - 'ids' value must be non-empty + - 'ids' value must contain unique elements + - 'ids' value must contain values that are greater than or equal to zero + - custom redirects assigned to a security policy cannot be deleted + - 'ids' value must contain existing custom redirect identifiers + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/certificateGetProxyCertificates_500_response' + description: |2- + + - Internal server error occurred + summary: Delete Custom Redirect. + tags: + - custom_redirects + x-codegen-request-body-name: body + get: + description: | + Use this method to retrieve information on all Custom Redirect objects for the account. + + You can configure BloxOne Cloud to redirect traffic to the Infoblox redirect page or a custom redirect destination. BloxOne Cloud allows you to apply multiple redirect actions and integrate BloxOne Cloud with third-party proxies, secure web gateways, blackholes, honeypots and sinkhole solutions. + operationId: custom_redirectsListCustomRedirect + 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 + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/redirectCustomRedirectMultiResponse' + description: GET operation response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/certificateGetProxyCertificates_500_response' + description: |2- + + - Internal server error occurred + summary: List Custom Redirects. + tags: + - custom_redirects + post: + description: | + Use this method to create a Custom Redirect object. + + You can configure BloxOne Cloud to redirect traffic to the Infoblox redirect page or a custom redirect destination. BloxOne Cloud allows you to apply multiple redirect actions and integrate BloxOne Cloud with third-party proxies, secure web gateways, blackholes, honeypots and sinkhole solutions. + + Required: + - name + - data + operationId: custom_redirectsCreateCustomRedirect + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/redirectCustomRedirect' + description: The Custom Redirect object. + required: true + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/redirectCustomRedirectCreateResponse' + description: POST operation response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/custom_redirectsCreateCustomRedirect_400_response' + description: |2- + + - 'name' length cannot exceed 256 characters limit + - 'description' length cannot exceed 256 characters limit + - 'data' must contain a valid IPv4 address or domain name + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/custom_redirectsCreateCustomRedirect_409_response' + description: |2- + + - 'name' value must be unique among named lists belonging to the same account + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/certificateGetProxyCertificates_500_response' + description: |2- + + - Internal server error occurred + summary: Create Custom Redirect. + tags: + - custom_redirects + x-codegen-request-body-name: body + /custom_redirects/{id}: + delete: + description: | + Use this method to delete Custom Redirect object. + + You can configure BloxOne Cloud to redirect traffic to the Infoblox redirect page or a custom redirect destination. BloxOne Cloud allows you to apply multiple redirect actions and integrate BloxOne Cloud with third-party proxies, secure web gateways, blackholes, honeypots and sinkhole solutions. + operationId: custom_redirectsDeleteSingleCustomRedirect + parameters: + - description: The Custom Redirect object identifier. + in: path + name: id + required: true + schema: + format: int32 + type: integer + responses: + "204": + content: {} + description: No Content + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/custom_redirectsDeleteSingleCustomRedirect_400_response' + description: |2- + + - 'id' value must contain values that are greater than or equal to zero + - 'ids' value must contain existing custom redirect identifiers + - custom redirects assigned to a security policy cannot be deleted + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/certificateGetProxyCertificates_500_response' + description: |2- + + - Internal server error occurred + summary: Delete Custom Redirect By Id. + tags: + - custom_redirects + get: + description: | + Use this method to retrieve information on the specified Custom Redirect object. + + You can configure BloxOne Cloud to redirect traffic to the Infoblox redirect page or a custom redirect destination. BloxOne Cloud allows you to apply multiple redirect actions and integrate BloxOne Cloud with third-party proxies, secure web gateways, blackholes, honeypots and sinkhole solutions. + operationId: custom_redirectsReadCustomRedirect + parameters: + - description: The Custom Redirect object identifier. + in: path + name: id + required: true + schema: + format: int32 + type: integer + - 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: The name of the custom redirect. May be used if id==0. + in: query + name: name + schema: + type: string + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/redirectCustomRedirectReadResponse' + description: GET operation response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/custom_redirectsReadCustomRedirect_404_response' + description: |2- + + - 'id' value must contain existing custom redirect identifier + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/certificateGetProxyCertificates_500_response' + description: |2- + + - Internal server error occurred + summary: Read Custom Redirect. + tags: + - custom_redirects + put: + description: | + Use this method to update a specified Custom Redirect object. + + You can configure BloxOne Cloud to redirect traffic to the Infoblox redirect page or a custom redirect destination. BloxOne Cloud allows you to apply multiple redirect actions and integrate BloxOne Cloud with third-party proxies, secure web gateways, blackholes, honeypots and sinkhole solutions. + + Required: + - name + - data + operationId: custom_redirectsUpdateCustomRedirect + parameters: + - description: The Custom Redirect object identifier. + in: path + name: id + required: true + schema: + format: int32 + type: integer + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/redirectCustomRedirect' + description: The Custom Redirect object. + required: true + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/redirectCustomRedirectUpdateResponse' + description: PUT operation response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/custom_redirectsCreateCustomRedirect_400_response' + description: |2- + + - 'name' length cannot exceed 256 characters limit + - 'description' length cannot exceed 256 characters limit + - 'data' must contain a valid IPv4 address or domain name + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/custom_redirectsReadCustomRedirect_404_response' + description: |2- + + - 'id' value must contain existing custom redirect identifier + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/custom_redirectsUpdateCustomRedirect_409_response' + description: |2- + + - 'name' value must be unique among named lists belonging to the same account + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/certificateGetProxyCertificates_500_response' + description: |2- + + - Internal server error occurred + summary: Update Custom Redirect. + tags: + - custom_redirects + x-codegen-request-body-name: body + /redirect_page: + get: + description: | + Use this method to retrieve the Redirect Page object. + + When blocking users from accessing certain domains, you can redirect them to a page that delivers a default message about the action. You can also set a redirect page of your own or customize the redirect message. + operationId: redirect_pageReadRedirectPage + 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 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/redirectRedirectPageReadResponse' + description: GET operation response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/certificateGetProxyCertificates_500_response' + description: |2- + + - Internal server error occurred + summary: Read Redirect Page. + tags: + - redirect_page + put: + description: | + Use this method to update the Redirect Page object. + + When blocking users from accessing certain domains, you can redirect them to a page that delivers a default message about the action. You can also set a redirect page of your own or customize the redirect message. + + Required: + - type + operationId: redirect_pageUpdateRedirectPage + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/redirectUpdateRedirectPagePayload' + description: The Redirect Page object. + required: true + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/redirectRedirectPageUpdateResponse' + description: PUT operation response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/redirect_pageUpdateRedirectPage_400_response' + description: |2- + + - 'type' value must contain valid redirect page type that is 'custom' or 'default' + - 'content' length cannot exceed 262144 characters limit + - 'redirect_ip_address' must contain valid IPv4 address + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/certificateGetProxyCertificates_500_response' + description: |2- + + - Internal server error occurred + summary: Update Redirect Page. + tags: + - redirect_page + x-codegen-request-body-name: body +components: + schemas: + redirectCustomRedirect: + description: |- + The Custom Redirect object. + + You can configure BloxOne Cloud to redirect traffic to the Infoblox redirect page or a custom redirect destination. BloxOne Cloud allows you to apply multiple redirect actions and integrate BloxOne Cloud with third-party proxies, secure web gateways, blackholes, honeypots and sinkhole solutions. + example: + created_time: 2000-01-23T04:56:07.000+00:00 + updated_time: 2000-01-23T04:56:07.000+00:00 + data: "193.56.2.11, 193.56.2.12, 2001:db8:ffff:ffff:ffff:ffff:ffff:fff1" + policy_names: + - security_policy_a + - security_policy_b + name: custom_redirect_a + id: 0 + policy_ids: + - 245613 + - 12476 + properties: + created_time: + description: The time when this Custom Redirect object was created. + format: date-time + readOnly: true + type: string + data: + description: The list of csv custom IPv4/IPv6 or a single domain redirect + address. + example: "193.56.2.11, 193.56.2.12, 2001:db8:ffff:ffff:ffff:ffff:ffff:fff1" + type: string + id: + description: The Custom Redirect object identifier. + format: int32 + readOnly: true + type: integer + name: + description: The name of the custom redirect. + example: custom_redirect_a + type: string + policy_ids: + description: The list of the security policy identifiers with which the + named list is associated. + example: + - 245613 + - 12476 + items: + format: int32 + type: integer + readOnly: true + type: array + policy_names: + description: The list of the security policy names with which the custom + redirect is associated. + example: + - security_policy_a + - security_policy_b + items: + type: string + readOnly: true + type: array + updated_time: + description: The time when this Custom Redirect object was last updated. + format: date-time + readOnly: true + type: string + type: object + redirectCustomRedirectCreateResponse: + description: The Custom Redirect create response. + example: + results: + created_time: 2000-01-23T04:56:07.000+00:00 + updated_time: 2000-01-23T04:56:07.000+00:00 + data: "193.56.2.11, 193.56.2.12, 2001:db8:ffff:ffff:ffff:ffff:ffff:fff1" + policy_names: + - security_policy_a + - security_policy_b + name: custom_redirect_a + id: 0 + policy_ids: + - 245613 + - 12476 + properties: + results: + $ref: '#/components/schemas/redirectCustomRedirect' + type: object + redirectCustomRedirectDeleteRequest: + description: The Custom Redirect delete request. + properties: + ids: + description: The list of Custom Redirect object identifiers. + example: + - 12345 + - 53215 + items: + format: int32 + type: integer + type: array + type: object + redirectCustomRedirectMultiResponse: + description: The Custom Redirect list response. + example: + results: + - created_time: 2000-01-23T04:56:07.000+00:00 + updated_time: 2000-01-23T04:56:07.000+00:00 + data: "193.56.2.11, 193.56.2.12, 2001:db8:ffff:ffff:ffff:ffff:ffff:fff1" + policy_names: + - security_policy_a + - security_policy_b + name: custom_redirect_a + id: 0 + policy_ids: + - 245613 + - 12476 + - created_time: 2000-01-23T04:56:07.000+00:00 + updated_time: 2000-01-23T04:56:07.000+00:00 + data: "193.56.2.11, 193.56.2.12, 2001:db8:ffff:ffff:ffff:ffff:ffff:fff1" + policy_names: + - security_policy_a + - security_policy_b + name: custom_redirect_a + id: 0 + policy_ids: + - 245613 + - 12476 + properties: + results: + description: The list of Custom Redirect objects. + items: + $ref: '#/components/schemas/redirectCustomRedirect' + type: array + type: object + redirectCustomRedirectReadResponse: + description: The Custom Redirect read response. + example: + results: + created_time: 2000-01-23T04:56:07.000+00:00 + updated_time: 2000-01-23T04:56:07.000+00:00 + data: "193.56.2.11, 193.56.2.12, 2001:db8:ffff:ffff:ffff:ffff:ffff:fff1" + policy_names: + - security_policy_a + - security_policy_b + name: custom_redirect_a + id: 0 + policy_ids: + - 245613 + - 12476 + properties: + results: + $ref: '#/components/schemas/redirectCustomRedirect' + type: object + redirectCustomRedirectUpdateResponse: + description: The Custom Redirect update response. + example: + results: + created_time: 2000-01-23T04:56:07.000+00:00 + updated_time: 2000-01-23T04:56:07.000+00:00 + data: "193.56.2.11, 193.56.2.12, 2001:db8:ffff:ffff:ffff:ffff:ffff:fff1" + policy_names: + - security_policy_a + - security_policy_b + name: custom_redirect_a + id: 0 + policy_ids: + - 245613 + - 12476 + properties: + results: + $ref: '#/components/schemas/redirectCustomRedirect' + type: object + redirectProxyCertResponse: + example: + certificate_url: certificate_url + anycast_dns_certificate_url: anycast_dns_certificate_url + properties: + anycast_dns_certificate_url: + description: Infoblox anycast dns client certificate URL. + type: string + certificate_url: + description: The certificate URL. + type: string + type: object + redirectRedirectPage: + description: |- + The Redirect Page object. + + When blocking users from accessing certain domains, you can redirect them to a page that delivers a default message about the action. You can also set a redirect page of your own or customize the redirect message. + example: + created_time: 2000-01-23T04:56:07.000+00:00 + updated_time: 2000-01-23T04:56:07.000+00:00 + type: custom + redirect_ip_address: 135.32.5.11 + content:

Redirect

+ smart: true + redirect_ipv6_address: 2001:db8:ffff:ffff:ffff:ffff:ffff:ffff + properties: + content: + description: The content of the redirect page for the "custom" redirect + type. + example:

Redirect

+ type: string + created_time: + description: The time when this Redirect Page object was created. + format: date-time + readOnly: true + type: string + redirect_ip_address: + description: The redirect IPv4 address. + example: 135.32.5.11 + type: string + redirect_ipv6_address: + description: The redirect IPv6 address. + example: 2001:db8:ffff:ffff:ffff:ffff:ffff:ffff + type: string + smart: + description: Whether the redirect type is smart + format: boolean + type: boolean + type: + description: The type of the redirect page that can be "default" or "custom". + enum: + - default + - custom + example: custom + type: string + updated_time: + description: The time when this Redirect Page object was last updated. + format: date-time + readOnly: true + type: string + type: object + redirectRedirectPageReadResponse: + description: The Redirect Page read response. + example: + results: + created_time: 2000-01-23T04:56:07.000+00:00 + updated_time: 2000-01-23T04:56:07.000+00:00 + type: custom + redirect_ip_address: 135.32.5.11 + content:

Redirect

+ smart: true + redirect_ipv6_address: 2001:db8:ffff:ffff:ffff:ffff:ffff:ffff + properties: + results: + $ref: '#/components/schemas/redirectRedirectPage' + type: object + redirectRedirectPageUpdateResponse: + description: The Redirect Page update response. + example: + results: + created_time: 2000-01-23T04:56:07.000+00:00 + updated_time: 2000-01-23T04:56:07.000+00:00 + type: custom + redirect_ip_address: 135.32.5.11 + content:

Redirect

+ smart: true + redirect_ipv6_address: 2001:db8:ffff:ffff:ffff:ffff:ffff:ffff + properties: + results: + $ref: '#/components/schemas/redirectRedirectPage' + type: object + redirectUpdateRedirectPagePayload: + properties: + content: + description: The content of the redirect page for the "custom" redirect + type. + example:

Redirect

+ type: string + redirect_ip_address: + description: The redirect IPv4 address. + example: 135.32.5.11 + type: string + redirect_ipv6_address: + description: The redirect IPv6 address. + example: 2001:db8:ffff:ffff:ffff:ffff:ffff:ffff + type: string + smart: + description: Change the redirect page from non-proxy (smart == false) to + proxy (smart) + format: boolean + type: boolean + type: + description: The type of the redirect page that can be "default" or "custom". + enum: + - default + - custom + example: custom + type: string + type: object + certificateGetProxyCertificates_500_response_error: + example: + code: INTERNAL + message: Internal Server Error + status: "500" + properties: + code: + example: INTERNAL + type: string + message: + example: Internal Server Error + type: string + status: + example: "500" + type: string + type: object + certificateGetProxyCertificates_500_response: + example: + error: + code: INTERNAL + message: Internal Server Error + status: "500" + properties: + error: + $ref: '#/components/schemas/certificateGetProxyCertificates_500_response_error' + type: object + custom_redirectsCreateCustomRedirect_400_response_error: + example: + code: INVALID_ARGUMENT + message: '''name'' must not be empty' + status: "400" + properties: + code: + example: INVALID_ARGUMENT + type: string + message: + example: '''name'' must not be empty' + type: string + status: + example: "400" + type: string + type: object + custom_redirectsCreateCustomRedirect_400_response: + example: + error: + code: INVALID_ARGUMENT + message: '''name'' must not be empty' + status: "400" + properties: + error: + $ref: '#/components/schemas/custom_redirectsCreateCustomRedirect_400_response_error' + type: object + custom_redirectsCreateCustomRedirect_409_response_error: + example: + code: ALREADY_EXISTS + message: Custom Redirect with name 'custom_redirect_ip_address_1' already + exists + status: "409" + properties: + code: + example: ALREADY_EXISTS + type: string + message: + example: Custom Redirect with name 'custom_redirect_ip_address_1' already + exists + type: string + status: + example: "409" + type: string + type: object + custom_redirectsCreateCustomRedirect_409_response: + example: + error: + code: ALREADY_EXISTS + message: Custom Redirect with name 'custom_redirect_ip_address_1' already + exists + status: "409" + properties: + error: + $ref: '#/components/schemas/custom_redirectsCreateCustomRedirect_409_response_error' + type: object + custom_redirectsDeleteCustomRedirect_400_response_error: + example: + code: INVALID_ARGUMENT + message: Custom Redirect 'ids' can't be empty + status: "400" + properties: + code: + example: INVALID_ARGUMENT + type: string + message: + example: Custom Redirect 'ids' can't be empty + type: string + status: + example: "400" + type: string + type: object + custom_redirectsDeleteCustomRedirect_400_response: + example: + error: + code: INVALID_ARGUMENT + message: Custom Redirect 'ids' can't be empty + status: "400" + properties: + error: + $ref: '#/components/schemas/custom_redirectsDeleteCustomRedirect_400_response_error' + type: object + custom_redirectsReadCustomRedirect_404_response_error: + example: + code: NOT_FOUND + message: Custom Redirect does not exist + status: "404" + properties: + code: + example: NOT_FOUND + type: string + message: + example: Custom Redirect does not exist + type: string + status: + example: "404" + type: string + type: object + custom_redirectsReadCustomRedirect_404_response: + example: + error: + code: NOT_FOUND + message: Custom Redirect does not exist + status: "404" + properties: + error: + $ref: '#/components/schemas/custom_redirectsReadCustomRedirect_404_response_error' + type: object + custom_redirectsUpdateCustomRedirect_409_response_error: + example: + code: ALREADY_EXISTS + message: Custom Redirect with name '' already exists + status: "409" + properties: + code: + example: ALREADY_EXISTS + type: string + message: + example: Custom Redirect with name '' already exists + type: string + status: + example: "409" + type: string + type: object + custom_redirectsUpdateCustomRedirect_409_response: + example: + error: + code: ALREADY_EXISTS + message: Custom Redirect with name '' already exists + status: "409" + properties: + error: + $ref: '#/components/schemas/custom_redirectsUpdateCustomRedirect_409_response_error' + type: object + custom_redirectsDeleteSingleCustomRedirect_400_response_error: + example: + code: INVALID_ARGUMENT + message: "invalid 'id': value must be greater than or equal to 0" + status: "400" + properties: + code: + example: INVALID_ARGUMENT + type: string + message: + example: "invalid 'id': value must be greater than or equal to 0" + type: string + status: + example: "400" + type: string + type: object + custom_redirectsDeleteSingleCustomRedirect_400_response: + example: + error: + code: INVALID_ARGUMENT + message: "invalid 'id': value must be greater than or equal to 0" + status: "400" + properties: + error: + $ref: '#/components/schemas/custom_redirectsDeleteSingleCustomRedirect_400_response_error' + type: object + redirect_pageUpdateRedirectPage_400_response_error: + example: + code: INVALID_ARGUMENT + message: '''type'' must not be empty' + status: "400" + properties: + code: + example: INVALID_ARGUMENT + type: string + message: + example: '''type'' must not be empty' + type: string + status: + example: "400" + type: string + type: object + redirect_pageUpdateRedirectPage_400_response: + example: + error: + code: INVALID_ARGUMENT + message: '''type'' must not be empty' + status: "400" + properties: + error: + $ref: '#/components/schemas/redirect_pageUpdateRedirectPage_400_response_error' + type: object +x-original-swagger-version: "2.0" diff --git a/redirect/api_certificate.go b/redirect/api_certificate.go new file mode 100644 index 0000000..d4f9b5d --- /dev/null +++ b/redirect/api_certificate.go @@ -0,0 +1,153 @@ +/* +BloxOne Redirect API + +You can configure BloxOne Threat Defense Cloud to redirect traffic to the Infoblox server that displays the default or customized redirect page. You can redirect traffic to a custom destination using custom redirects. + +API version: v1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package redirect + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + + "github.com/infobloxopen/bloxone-go-client/internal" +) + +type CertificateAPI interface { + /* + GetProxyCertificates Get Proxy Certificates + + Use this method to get certificates to use proxy server + + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return CertificateAPIGetProxyCertificatesRequest + */ + GetProxyCertificates(ctx context.Context) CertificateAPIGetProxyCertificatesRequest + + // GetProxyCertificatesExecute executes the request + // @return ProxyCertResponse + GetProxyCertificatesExecute(r CertificateAPIGetProxyCertificatesRequest) (*ProxyCertResponse, *http.Response, error) +} + +// CertificateAPIService CertificateAPI service +type CertificateAPIService internal.Service + +type CertificateAPIGetProxyCertificatesRequest struct { + ctx context.Context + ApiService CertificateAPI + 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 CertificateAPIGetProxyCertificatesRequest) Fields(fields string) CertificateAPIGetProxyCertificatesRequest { + r.fields = &fields + return r +} + +func (r CertificateAPIGetProxyCertificatesRequest) Execute() (*ProxyCertResponse, *http.Response, error) { + return r.ApiService.GetProxyCertificatesExecute(r) +} + +/* +GetProxyCertificates Get Proxy Certificates + +# Use this method to get certificates to use proxy server + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return CertificateAPIGetProxyCertificatesRequest +*/ +func (a *CertificateAPIService) GetProxyCertificates(ctx context.Context) CertificateAPIGetProxyCertificatesRequest { + return CertificateAPIGetProxyCertificatesRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return ProxyCertResponse +func (a *CertificateAPIService) GetProxyCertificatesExecute(r CertificateAPIGetProxyCertificatesRequest) (*ProxyCertResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *ProxyCertResponse + ) + + localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "CertificateAPIService.GetProxyCertificates") + if err != nil { + return localVarReturnValue, nil, internal.NewGenericOpenAPIError(err.Error()) + } + + localVarPath := localBasePath + "/cert_download_urls" + + 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) + if localVarHTTPResponse.StatusCode == 500 { + var v CertificateGetProxyCertificates500Response + err = a.Client.Decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr = internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr = internal.NewGenericOpenAPIErrorWithBodyAndModel(localVarHTTPResponse.Status, localVarBody, v) + } + 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/redirect/api_custom_redirects.go b/redirect/api_custom_redirects.go new file mode 100644 index 0000000..6f5fa22 --- /dev/null +++ b/redirect/api_custom_redirects.go @@ -0,0 +1,922 @@ +/* +BloxOne Redirect API + +You can configure BloxOne Threat Defense Cloud to redirect traffic to the Infoblox server that displays the default or customized redirect page. You can redirect traffic to a custom destination using custom redirects. + +API version: v1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package redirect + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" + + "github.com/infobloxopen/bloxone-go-client/internal" +) + +type CustomRedirectsAPI interface { + /* + CreateCustomRedirect Create Custom Redirect. + + Use this method to create a Custom Redirect object. + + You can configure BloxOne Cloud to redirect traffic to the Infoblox redirect page or a custom redirect destination. BloxOne Cloud allows you to apply multiple redirect actions and integrate BloxOne Cloud with third-party proxies, secure web gateways, blackholes, honeypots and sinkhole solutions. + + Required: + - name + - data + + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return CustomRedirectsAPICreateCustomRedirectRequest + */ + CreateCustomRedirect(ctx context.Context) CustomRedirectsAPICreateCustomRedirectRequest + + // CreateCustomRedirectExecute executes the request + // @return CustomRedirectCreateResponse + CreateCustomRedirectExecute(r CustomRedirectsAPICreateCustomRedirectRequest) (*CustomRedirectCreateResponse, *http.Response, error) + /* + DeleteCustomRedirect Delete Custom Redirect. + + Use this method to delete Custom Redirect objects. Deletion of multiple lists is an all-or-nothing operation (if any of the specified lists can not be deleted then none of the specified lists will be deleted). + + You can configure BloxOne Cloud to redirect traffic to the Infoblox redirect page or a custom redirect destination. BloxOne Cloud allows you to apply multiple redirect actions and integrate BloxOne Cloud with third-party proxies, secure web gateways, blackholes, honeypots and sinkhole solutions. + + Required: + - ids + + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return CustomRedirectsAPIDeleteCustomRedirectRequest + */ + DeleteCustomRedirect(ctx context.Context) CustomRedirectsAPIDeleteCustomRedirectRequest + + // DeleteCustomRedirectExecute executes the request + DeleteCustomRedirectExecute(r CustomRedirectsAPIDeleteCustomRedirectRequest) (*http.Response, error) + /* + DeleteSingleCustomRedirect Delete Custom Redirect By Id. + + Use this method to delete Custom Redirect object. + + You can configure BloxOne Cloud to redirect traffic to the Infoblox redirect page or a custom redirect destination. BloxOne Cloud allows you to apply multiple redirect actions and integrate BloxOne Cloud with third-party proxies, secure web gateways, blackholes, honeypots and sinkhole solutions. + + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id The Custom Redirect object identifier. + @return CustomRedirectsAPIDeleteSingleCustomRedirectRequest + */ + DeleteSingleCustomRedirect(ctx context.Context, id int32) CustomRedirectsAPIDeleteSingleCustomRedirectRequest + + // DeleteSingleCustomRedirectExecute executes the request + DeleteSingleCustomRedirectExecute(r CustomRedirectsAPIDeleteSingleCustomRedirectRequest) (*http.Response, error) + /* + ListCustomRedirect List Custom Redirects. + + Use this method to retrieve information on all Custom Redirect objects for the account. + + You can configure BloxOne Cloud to redirect traffic to the Infoblox redirect page or a custom redirect destination. BloxOne Cloud allows you to apply multiple redirect actions and integrate BloxOne Cloud with third-party proxies, secure web gateways, blackholes, honeypots and sinkhole solutions. + + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return CustomRedirectsAPIListCustomRedirectRequest + */ + ListCustomRedirect(ctx context.Context) CustomRedirectsAPIListCustomRedirectRequest + + // ListCustomRedirectExecute executes the request + // @return CustomRedirectMultiResponse + ListCustomRedirectExecute(r CustomRedirectsAPIListCustomRedirectRequest) (*CustomRedirectMultiResponse, *http.Response, error) + /* + ReadCustomRedirect Read Custom Redirect. + + Use this method to retrieve information on the specified Custom Redirect object. + + You can configure BloxOne Cloud to redirect traffic to the Infoblox redirect page or a custom redirect destination. BloxOne Cloud allows you to apply multiple redirect actions and integrate BloxOne Cloud with third-party proxies, secure web gateways, blackholes, honeypots and sinkhole solutions. + + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id The Custom Redirect object identifier. + @return CustomRedirectsAPIReadCustomRedirectRequest + */ + ReadCustomRedirect(ctx context.Context, id int32) CustomRedirectsAPIReadCustomRedirectRequest + + // ReadCustomRedirectExecute executes the request + // @return CustomRedirectReadResponse + ReadCustomRedirectExecute(r CustomRedirectsAPIReadCustomRedirectRequest) (*CustomRedirectReadResponse, *http.Response, error) + /* + UpdateCustomRedirect Update Custom Redirect. + + Use this method to update a specified Custom Redirect object. + + You can configure BloxOne Cloud to redirect traffic to the Infoblox redirect page or a custom redirect destination. BloxOne Cloud allows you to apply multiple redirect actions and integrate BloxOne Cloud with third-party proxies, secure web gateways, blackholes, honeypots and sinkhole solutions. + + Required: + - name + - data + + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id The Custom Redirect object identifier. + @return CustomRedirectsAPIUpdateCustomRedirectRequest + */ + UpdateCustomRedirect(ctx context.Context, id int32) CustomRedirectsAPIUpdateCustomRedirectRequest + + // UpdateCustomRedirectExecute executes the request + // @return CustomRedirectUpdateResponse + UpdateCustomRedirectExecute(r CustomRedirectsAPIUpdateCustomRedirectRequest) (*CustomRedirectUpdateResponse, *http.Response, error) +} + +// CustomRedirectsAPIService CustomRedirectsAPI service +type CustomRedirectsAPIService internal.Service + +type CustomRedirectsAPICreateCustomRedirectRequest struct { + ctx context.Context + ApiService CustomRedirectsAPI + body *CustomRedirect +} + +// The Custom Redirect object. +func (r CustomRedirectsAPICreateCustomRedirectRequest) Body(body CustomRedirect) CustomRedirectsAPICreateCustomRedirectRequest { + r.body = &body + return r +} + +func (r CustomRedirectsAPICreateCustomRedirectRequest) Execute() (*CustomRedirectCreateResponse, *http.Response, error) { + return r.ApiService.CreateCustomRedirectExecute(r) +} + +/* +CreateCustomRedirect Create Custom Redirect. + +Use this method to create a Custom Redirect object. + +You can configure BloxOne Cloud to redirect traffic to the Infoblox redirect page or a custom redirect destination. BloxOne Cloud allows you to apply multiple redirect actions and integrate BloxOne Cloud with third-party proxies, secure web gateways, blackholes, honeypots and sinkhole solutions. + +Required: +- name +- data + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return CustomRedirectsAPICreateCustomRedirectRequest +*/ +func (a *CustomRedirectsAPIService) CreateCustomRedirect(ctx context.Context) CustomRedirectsAPICreateCustomRedirectRequest { + return CustomRedirectsAPICreateCustomRedirectRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return CustomRedirectCreateResponse +func (a *CustomRedirectsAPIService) CreateCustomRedirectExecute(r CustomRedirectsAPICreateCustomRedirectRequest) (*CustomRedirectCreateResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *CustomRedirectCreateResponse + ) + + localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "CustomRedirectsAPIService.CreateCustomRedirect") + if err != nil { + return localVarReturnValue, nil, internal.NewGenericOpenAPIError(err.Error()) + } + + localVarPath := localBasePath + "/custom_redirects" + + 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) + if localVarHTTPResponse.StatusCode == 400 { + var v CustomRedirectsCreateCustomRedirect400Response + err = a.Client.Decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr = internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr = internal.NewGenericOpenAPIErrorWithBodyAndModel(localVarHTTPResponse.Status, localVarBody, v) + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 409 { + var v CustomRedirectsCreateCustomRedirect409Response + err = a.Client.Decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr = internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr = internal.NewGenericOpenAPIErrorWithBodyAndModel(localVarHTTPResponse.Status, localVarBody, v) + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v CertificateGetProxyCertificates500Response + err = a.Client.Decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr = internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr = internal.NewGenericOpenAPIErrorWithBodyAndModel(localVarHTTPResponse.Status, localVarBody, v) + } + 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 CustomRedirectsAPIDeleteCustomRedirectRequest struct { + ctx context.Context + ApiService CustomRedirectsAPI + body *CustomRedirectDeleteRequest +} + +func (r CustomRedirectsAPIDeleteCustomRedirectRequest) Body(body CustomRedirectDeleteRequest) CustomRedirectsAPIDeleteCustomRedirectRequest { + r.body = &body + return r +} + +func (r CustomRedirectsAPIDeleteCustomRedirectRequest) Execute() (*http.Response, error) { + return r.ApiService.DeleteCustomRedirectExecute(r) +} + +/* +DeleteCustomRedirect Delete Custom Redirect. + +Use this method to delete Custom Redirect objects. Deletion of multiple lists is an all-or-nothing operation (if any of the specified lists can not be deleted then none of the specified lists will be deleted). + +You can configure BloxOne Cloud to redirect traffic to the Infoblox redirect page or a custom redirect destination. BloxOne Cloud allows you to apply multiple redirect actions and integrate BloxOne Cloud with third-party proxies, secure web gateways, blackholes, honeypots and sinkhole solutions. + +Required: +- ids + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return CustomRedirectsAPIDeleteCustomRedirectRequest +*/ +func (a *CustomRedirectsAPIService) DeleteCustomRedirect(ctx context.Context) CustomRedirectsAPIDeleteCustomRedirectRequest { + return CustomRedirectsAPIDeleteCustomRedirectRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +func (a *CustomRedirectsAPIService) DeleteCustomRedirectExecute(r CustomRedirectsAPIDeleteCustomRedirectRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []internal.FormFile + ) + + localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "CustomRedirectsAPIService.DeleteCustomRedirect") + if err != nil { + return nil, internal.NewGenericOpenAPIError(err.Error()) + } + + localVarPath := localBasePath + "/custom_redirects" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.body == nil { + return 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 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) + if localVarHTTPResponse.StatusCode == 400 { + var v CustomRedirectsDeleteCustomRedirect400Response + err = a.Client.Decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr = internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) + return localVarHTTPResponse, newErr + } + newErr = internal.NewGenericOpenAPIErrorWithBodyAndModel(localVarHTTPResponse.Status, localVarBody, v) + return localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v CertificateGetProxyCertificates500Response + err = a.Client.Decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr = internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) + return localVarHTTPResponse, newErr + } + newErr = internal.NewGenericOpenAPIErrorWithBodyAndModel(localVarHTTPResponse.Status, localVarBody, v) + } + return localVarHTTPResponse, newErr + } + + return localVarHTTPResponse, nil +} + +type CustomRedirectsAPIDeleteSingleCustomRedirectRequest struct { + ctx context.Context + ApiService CustomRedirectsAPI + id int32 +} + +func (r CustomRedirectsAPIDeleteSingleCustomRedirectRequest) Execute() (*http.Response, error) { + return r.ApiService.DeleteSingleCustomRedirectExecute(r) +} + +/* +DeleteSingleCustomRedirect Delete Custom Redirect By Id. + +Use this method to delete Custom Redirect object. + +You can configure BloxOne Cloud to redirect traffic to the Infoblox redirect page or a custom redirect destination. BloxOne Cloud allows you to apply multiple redirect actions and integrate BloxOne Cloud with third-party proxies, secure web gateways, blackholes, honeypots and sinkhole solutions. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id The Custom Redirect object identifier. + @return CustomRedirectsAPIDeleteSingleCustomRedirectRequest +*/ +func (a *CustomRedirectsAPIService) DeleteSingleCustomRedirect(ctx context.Context, id int32) CustomRedirectsAPIDeleteSingleCustomRedirectRequest { + return CustomRedirectsAPIDeleteSingleCustomRedirectRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +func (a *CustomRedirectsAPIService) DeleteSingleCustomRedirectExecute(r CustomRedirectsAPIDeleteSingleCustomRedirectRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []internal.FormFile + ) + + localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "CustomRedirectsAPIService.DeleteSingleCustomRedirect") + if err != nil { + return nil, internal.NewGenericOpenAPIError(err.Error()) + } + + localVarPath := localBasePath + "/custom_redirects/{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{"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 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) + if localVarHTTPResponse.StatusCode == 400 { + var v CustomRedirectsDeleteSingleCustomRedirect400Response + err = a.Client.Decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr = internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) + return localVarHTTPResponse, newErr + } + newErr = internal.NewGenericOpenAPIErrorWithBodyAndModel(localVarHTTPResponse.Status, localVarBody, v) + return localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v CertificateGetProxyCertificates500Response + err = a.Client.Decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr = internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) + return localVarHTTPResponse, newErr + } + newErr = internal.NewGenericOpenAPIErrorWithBodyAndModel(localVarHTTPResponse.Status, localVarBody, v) + } + return localVarHTTPResponse, newErr + } + + return localVarHTTPResponse, nil +} + +type CustomRedirectsAPIListCustomRedirectRequest struct { + ctx context.Context + ApiService CustomRedirectsAPI + fields *string + filter *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 CustomRedirectsAPIListCustomRedirectRequest) Fields(fields string) CustomRedirectsAPIListCustomRedirectRequest { + 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 CustomRedirectsAPIListCustomRedirectRequest) Filter(filter string) CustomRedirectsAPIListCustomRedirectRequest { + r.filter = &filter + return r +} + +func (r CustomRedirectsAPIListCustomRedirectRequest) Execute() (*CustomRedirectMultiResponse, *http.Response, error) { + return r.ApiService.ListCustomRedirectExecute(r) +} + +/* +ListCustomRedirect List Custom Redirects. + +Use this method to retrieve information on all Custom Redirect objects for the account. + +You can configure BloxOne Cloud to redirect traffic to the Infoblox redirect page or a custom redirect destination. BloxOne Cloud allows you to apply multiple redirect actions and integrate BloxOne Cloud with third-party proxies, secure web gateways, blackholes, honeypots and sinkhole solutions. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return CustomRedirectsAPIListCustomRedirectRequest +*/ +func (a *CustomRedirectsAPIService) ListCustomRedirect(ctx context.Context) CustomRedirectsAPIListCustomRedirectRequest { + return CustomRedirectsAPIListCustomRedirectRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return CustomRedirectMultiResponse +func (a *CustomRedirectsAPIService) ListCustomRedirectExecute(r CustomRedirectsAPIListCustomRedirectRequest) (*CustomRedirectMultiResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *CustomRedirectMultiResponse + ) + + localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "CustomRedirectsAPIService.ListCustomRedirect") + if err != nil { + return localVarReturnValue, nil, internal.NewGenericOpenAPIError(err.Error()) + } + + localVarPath := localBasePath + "/custom_redirects" + + 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, "") + } + // 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) + if localVarHTTPResponse.StatusCode == 500 { + var v CertificateGetProxyCertificates500Response + err = a.Client.Decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr = internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr = internal.NewGenericOpenAPIErrorWithBodyAndModel(localVarHTTPResponse.Status, localVarBody, v) + } + 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 CustomRedirectsAPIReadCustomRedirectRequest struct { + ctx context.Context + ApiService CustomRedirectsAPI + id int32 + fields *string + name *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 CustomRedirectsAPIReadCustomRedirectRequest) Fields(fields string) CustomRedirectsAPIReadCustomRedirectRequest { + r.fields = &fields + return r +} + +// The name of the custom redirect. May be used if id==0. +func (r CustomRedirectsAPIReadCustomRedirectRequest) Name(name string) CustomRedirectsAPIReadCustomRedirectRequest { + r.name = &name + return r +} + +func (r CustomRedirectsAPIReadCustomRedirectRequest) Execute() (*CustomRedirectReadResponse, *http.Response, error) { + return r.ApiService.ReadCustomRedirectExecute(r) +} + +/* +ReadCustomRedirect Read Custom Redirect. + +Use this method to retrieve information on the specified Custom Redirect object. + +You can configure BloxOne Cloud to redirect traffic to the Infoblox redirect page or a custom redirect destination. BloxOne Cloud allows you to apply multiple redirect actions and integrate BloxOne Cloud with third-party proxies, secure web gateways, blackholes, honeypots and sinkhole solutions. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id The Custom Redirect object identifier. + @return CustomRedirectsAPIReadCustomRedirectRequest +*/ +func (a *CustomRedirectsAPIService) ReadCustomRedirect(ctx context.Context, id int32) CustomRedirectsAPIReadCustomRedirectRequest { + return CustomRedirectsAPIReadCustomRedirectRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// +// @return CustomRedirectReadResponse +func (a *CustomRedirectsAPIService) ReadCustomRedirectExecute(r CustomRedirectsAPIReadCustomRedirectRequest) (*CustomRedirectReadResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *CustomRedirectReadResponse + ) + + localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "CustomRedirectsAPIService.ReadCustomRedirect") + if err != nil { + return localVarReturnValue, nil, internal.NewGenericOpenAPIError(err.Error()) + } + + localVarPath := localBasePath + "/custom_redirects/{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, "") + } + if r.name != nil { + internal.ParameterAddToHeaderOrQuery(localVarQueryParams, "name", r.name, "") + } + // 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) + if localVarHTTPResponse.StatusCode == 404 { + var v CustomRedirectsReadCustomRedirect404Response + err = a.Client.Decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr = internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr = internal.NewGenericOpenAPIErrorWithBodyAndModel(localVarHTTPResponse.Status, localVarBody, v) + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v CertificateGetProxyCertificates500Response + err = a.Client.Decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr = internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr = internal.NewGenericOpenAPIErrorWithBodyAndModel(localVarHTTPResponse.Status, localVarBody, v) + } + 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 CustomRedirectsAPIUpdateCustomRedirectRequest struct { + ctx context.Context + ApiService CustomRedirectsAPI + id int32 + body *CustomRedirect +} + +// The Custom Redirect object. +func (r CustomRedirectsAPIUpdateCustomRedirectRequest) Body(body CustomRedirect) CustomRedirectsAPIUpdateCustomRedirectRequest { + r.body = &body + return r +} + +func (r CustomRedirectsAPIUpdateCustomRedirectRequest) Execute() (*CustomRedirectUpdateResponse, *http.Response, error) { + return r.ApiService.UpdateCustomRedirectExecute(r) +} + +/* +UpdateCustomRedirect Update Custom Redirect. + +Use this method to update a specified Custom Redirect object. + +You can configure BloxOne Cloud to redirect traffic to the Infoblox redirect page or a custom redirect destination. BloxOne Cloud allows you to apply multiple redirect actions and integrate BloxOne Cloud with third-party proxies, secure web gateways, blackholes, honeypots and sinkhole solutions. + +Required: +- name +- data + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id The Custom Redirect object identifier. + @return CustomRedirectsAPIUpdateCustomRedirectRequest +*/ +func (a *CustomRedirectsAPIService) UpdateCustomRedirect(ctx context.Context, id int32) CustomRedirectsAPIUpdateCustomRedirectRequest { + return CustomRedirectsAPIUpdateCustomRedirectRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// +// @return CustomRedirectUpdateResponse +func (a *CustomRedirectsAPIService) UpdateCustomRedirectExecute(r CustomRedirectsAPIUpdateCustomRedirectRequest) (*CustomRedirectUpdateResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *CustomRedirectUpdateResponse + ) + + localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "CustomRedirectsAPIService.UpdateCustomRedirect") + if err != nil { + return localVarReturnValue, nil, internal.NewGenericOpenAPIError(err.Error()) + } + + localVarPath := localBasePath + "/custom_redirects/{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) + if localVarHTTPResponse.StatusCode == 400 { + var v CustomRedirectsCreateCustomRedirect400Response + err = a.Client.Decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr = internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr = internal.NewGenericOpenAPIErrorWithBodyAndModel(localVarHTTPResponse.Status, localVarBody, v) + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v CustomRedirectsReadCustomRedirect404Response + err = a.Client.Decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr = internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr = internal.NewGenericOpenAPIErrorWithBodyAndModel(localVarHTTPResponse.Status, localVarBody, v) + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 409 { + var v CustomRedirectsUpdateCustomRedirect409Response + err = a.Client.Decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr = internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr = internal.NewGenericOpenAPIErrorWithBodyAndModel(localVarHTTPResponse.Status, localVarBody, v) + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v CertificateGetProxyCertificates500Response + err = a.Client.Decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr = internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr = internal.NewGenericOpenAPIErrorWithBodyAndModel(localVarHTTPResponse.Status, localVarBody, v) + } + 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/redirect/api_redirect_page.go b/redirect/api_redirect_page.go new file mode 100644 index 0000000..5b9e51a --- /dev/null +++ b/redirect/api_redirect_page.go @@ -0,0 +1,315 @@ +/* +BloxOne Redirect API + +You can configure BloxOne Threat Defense Cloud to redirect traffic to the Infoblox server that displays the default or customized redirect page. You can redirect traffic to a custom destination using custom redirects. + +API version: v1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package redirect + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + + "github.com/infobloxopen/bloxone-go-client/internal" +) + +type RedirectPageAPI interface { + /* + ReadRedirectPage Read Redirect Page. + + Use this method to retrieve the Redirect Page object. + + When blocking users from accessing certain domains, you can redirect them to a page that delivers a default message about the action. You can also set a redirect page of your own or customize the redirect message. + + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return RedirectPageAPIReadRedirectPageRequest + */ + ReadRedirectPage(ctx context.Context) RedirectPageAPIReadRedirectPageRequest + + // ReadRedirectPageExecute executes the request + // @return RedirectPageReadResponse + ReadRedirectPageExecute(r RedirectPageAPIReadRedirectPageRequest) (*RedirectPageReadResponse, *http.Response, error) + /* + UpdateRedirectPage Update Redirect Page. + + Use this method to update the Redirect Page object. + + When blocking users from accessing certain domains, you can redirect them to a page that delivers a default message about the action. You can also set a redirect page of your own or customize the redirect message. + + Required: + - type + + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return RedirectPageAPIUpdateRedirectPageRequest + */ + UpdateRedirectPage(ctx context.Context) RedirectPageAPIUpdateRedirectPageRequest + + // UpdateRedirectPageExecute executes the request + // @return RedirectPageUpdateResponse + UpdateRedirectPageExecute(r RedirectPageAPIUpdateRedirectPageRequest) (*RedirectPageUpdateResponse, *http.Response, error) +} + +// RedirectPageAPIService RedirectPageAPI service +type RedirectPageAPIService internal.Service + +type RedirectPageAPIReadRedirectPageRequest struct { + ctx context.Context + ApiService RedirectPageAPI + filter *string + fields *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 RedirectPageAPIReadRedirectPageRequest) Filter(filter string) RedirectPageAPIReadRedirectPageRequest { + r.filter = &filter + 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 RedirectPageAPIReadRedirectPageRequest) Fields(fields string) RedirectPageAPIReadRedirectPageRequest { + r.fields = &fields + return r +} + +func (r RedirectPageAPIReadRedirectPageRequest) Execute() (*RedirectPageReadResponse, *http.Response, error) { + return r.ApiService.ReadRedirectPageExecute(r) +} + +/* +ReadRedirectPage Read Redirect Page. + +Use this method to retrieve the Redirect Page object. + +When blocking users from accessing certain domains, you can redirect them to a page that delivers a default message about the action. You can also set a redirect page of your own or customize the redirect message. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return RedirectPageAPIReadRedirectPageRequest +*/ +func (a *RedirectPageAPIService) ReadRedirectPage(ctx context.Context) RedirectPageAPIReadRedirectPageRequest { + return RedirectPageAPIReadRedirectPageRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return RedirectPageReadResponse +func (a *RedirectPageAPIService) ReadRedirectPageExecute(r RedirectPageAPIReadRedirectPageRequest) (*RedirectPageReadResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *RedirectPageReadResponse + ) + + localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "RedirectPageAPIService.ReadRedirectPage") + if err != nil { + return localVarReturnValue, nil, internal.NewGenericOpenAPIError(err.Error()) + } + + localVarPath := localBasePath + "/redirect_page" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.filter != nil { + internal.ParameterAddToHeaderOrQuery(localVarQueryParams, "_filter", r.filter, "") + } + 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) + if localVarHTTPResponse.StatusCode == 500 { + var v CertificateGetProxyCertificates500Response + err = a.Client.Decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr = internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr = internal.NewGenericOpenAPIErrorWithBodyAndModel(localVarHTTPResponse.Status, localVarBody, v) + } + 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 RedirectPageAPIUpdateRedirectPageRequest struct { + ctx context.Context + ApiService RedirectPageAPI + body *UpdateRedirectPagePayload +} + +// The Redirect Page object. +func (r RedirectPageAPIUpdateRedirectPageRequest) Body(body UpdateRedirectPagePayload) RedirectPageAPIUpdateRedirectPageRequest { + r.body = &body + return r +} + +func (r RedirectPageAPIUpdateRedirectPageRequest) Execute() (*RedirectPageUpdateResponse, *http.Response, error) { + return r.ApiService.UpdateRedirectPageExecute(r) +} + +/* +UpdateRedirectPage Update Redirect Page. + +Use this method to update the Redirect Page object. + +When blocking users from accessing certain domains, you can redirect them to a page that delivers a default message about the action. You can also set a redirect page of your own or customize the redirect message. + +Required: +- type + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return RedirectPageAPIUpdateRedirectPageRequest +*/ +func (a *RedirectPageAPIService) UpdateRedirectPage(ctx context.Context) RedirectPageAPIUpdateRedirectPageRequest { + return RedirectPageAPIUpdateRedirectPageRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return RedirectPageUpdateResponse +func (a *RedirectPageAPIService) UpdateRedirectPageExecute(r RedirectPageAPIUpdateRedirectPageRequest) (*RedirectPageUpdateResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *RedirectPageUpdateResponse + ) + + localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "RedirectPageAPIService.UpdateRedirectPage") + if err != nil { + return localVarReturnValue, nil, internal.NewGenericOpenAPIError(err.Error()) + } + + localVarPath := localBasePath + "/redirect_page" + + 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) + if localVarHTTPResponse.StatusCode == 400 { + var v RedirectPageUpdateRedirectPage400Response + err = a.Client.Decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr = internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr = internal.NewGenericOpenAPIErrorWithBodyAndModel(localVarHTTPResponse.Status, localVarBody, v) + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v CertificateGetProxyCertificates500Response + err = a.Client.Decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr = internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr = internal.NewGenericOpenAPIErrorWithBodyAndModel(localVarHTTPResponse.Status, localVarBody, v) + } + 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/redirect/client.go b/redirect/client.go new file mode 100644 index 0000000..6e9c160 --- /dev/null +++ b/redirect/client.go @@ -0,0 +1,54 @@ +/* +BloxOne Redirect API + +You can configure BloxOne Threat Defense Cloud to redirect traffic to the Infoblox server that displays the default or customized redirect page. You can redirect traffic to a custom destination using custom redirects. + +API version: v1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package redirect + +import ( + "github.com/infobloxopen/bloxone-go-client/internal" + "github.com/infobloxopen/bloxone-go-client/option" +) + +const serviceBasePath = "/api/atcfw/v1" + +// APIClient manages communication with the BloxOne Redirect API v1 +// In most cases there should be only one, shared, APIClient. +type APIClient struct { + *internal.APIClient + + // API Services + CertificateAPI CertificateAPI + CustomRedirectsAPI CustomRedirectsAPI + RedirectPageAPI RedirectPageAPI +} + +// 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.CertificateAPI = (*CertificateAPIService)(&c.Common) + c.CustomRedirectsAPI = (*CustomRedirectsAPIService)(&c.Common) + c.RedirectPageAPI = (*RedirectPageAPIService)(&c.Common) + + return c +} diff --git a/redirect/docs/CertificateAPI.md b/redirect/docs/CertificateAPI.md new file mode 100644 index 0000000..fa951e8 --- /dev/null +++ b/redirect/docs/CertificateAPI.md @@ -0,0 +1,74 @@ +# CertificateAPI + +All URIs are relative to *https://csp.infoblox.com/api/atcfw/v1* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**GetProxyCertificates**](CertificateAPI.md#GetProxyCertificates) | **Get** /cert_download_urls | Get Proxy Certificates + + + +## GetProxyCertificates + +> ProxyCertResponse GetProxyCertificates(ctx).Fields(fields).Execute() + +Get Proxy Certificates + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + + "github.com/infobloxopen/bloxone-go-client/redirect" +) + +func main() { + + apiClient := redirect.NewAPIClient() + resp, r, err := apiClient.CertificateAPI.GetProxyCertificates(context.Background()).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `CertificateAPI.GetProxyCertificates``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetProxyCertificates`: ProxyCertResponse + fmt.Fprintf(os.Stdout, "Response from `CertificateAPI.GetProxyCertificates`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a `CertificateAPIGetProxyCertificatesRequest` 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 + +[**ProxyCertResponse**](ProxyCertResponse.md) + +### Authorization + +No authorization required + +### 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/redirect/docs/CertificateGetProxyCertificates500Response.md b/redirect/docs/CertificateGetProxyCertificates500Response.md new file mode 100644 index 0000000..1811fea --- /dev/null +++ b/redirect/docs/CertificateGetProxyCertificates500Response.md @@ -0,0 +1,56 @@ +# CertificateGetProxyCertificates500Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Error** | Pointer to [**CertificateGetProxyCertificates500ResponseError**](CertificateGetProxyCertificates500ResponseError.md) | | [optional] + +## Methods + +### NewCertificateGetProxyCertificates500Response + +`func NewCertificateGetProxyCertificates500Response() *CertificateGetProxyCertificates500Response` + +NewCertificateGetProxyCertificates500Response instantiates a new CertificateGetProxyCertificates500Response 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 + +### NewCertificateGetProxyCertificates500ResponseWithDefaults + +`func NewCertificateGetProxyCertificates500ResponseWithDefaults() *CertificateGetProxyCertificates500Response` + +NewCertificateGetProxyCertificates500ResponseWithDefaults instantiates a new CertificateGetProxyCertificates500Response 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 + +### GetError + +`func (o *CertificateGetProxyCertificates500Response) GetError() CertificateGetProxyCertificates500ResponseError` + +GetError returns the Error field if non-nil, zero value otherwise. + +### GetErrorOk + +`func (o *CertificateGetProxyCertificates500Response) GetErrorOk() (*CertificateGetProxyCertificates500ResponseError, bool)` + +GetErrorOk returns a tuple with the Error field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetError + +`func (o *CertificateGetProxyCertificates500Response) SetError(v CertificateGetProxyCertificates500ResponseError)` + +SetError sets Error field to given value. + +### HasError + +`func (o *CertificateGetProxyCertificates500Response) HasError() bool` + +HasError 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/redirect/docs/CertificateGetProxyCertificates500ResponseError.md b/redirect/docs/CertificateGetProxyCertificates500ResponseError.md new file mode 100644 index 0000000..afab865 --- /dev/null +++ b/redirect/docs/CertificateGetProxyCertificates500ResponseError.md @@ -0,0 +1,108 @@ +# CertificateGetProxyCertificates500ResponseError + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Code** | Pointer to **string** | | [optional] +**Message** | Pointer to **string** | | [optional] +**Status** | Pointer to **string** | | [optional] + +## Methods + +### NewCertificateGetProxyCertificates500ResponseError + +`func NewCertificateGetProxyCertificates500ResponseError() *CertificateGetProxyCertificates500ResponseError` + +NewCertificateGetProxyCertificates500ResponseError instantiates a new CertificateGetProxyCertificates500ResponseError 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 + +### NewCertificateGetProxyCertificates500ResponseErrorWithDefaults + +`func NewCertificateGetProxyCertificates500ResponseErrorWithDefaults() *CertificateGetProxyCertificates500ResponseError` + +NewCertificateGetProxyCertificates500ResponseErrorWithDefaults instantiates a new CertificateGetProxyCertificates500ResponseError 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 + +### GetCode + +`func (o *CertificateGetProxyCertificates500ResponseError) GetCode() string` + +GetCode returns the Code field if non-nil, zero value otherwise. + +### GetCodeOk + +`func (o *CertificateGetProxyCertificates500ResponseError) GetCodeOk() (*string, bool)` + +GetCodeOk returns a tuple with the Code field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCode + +`func (o *CertificateGetProxyCertificates500ResponseError) SetCode(v string)` + +SetCode sets Code field to given value. + +### HasCode + +`func (o *CertificateGetProxyCertificates500ResponseError) HasCode() bool` + +HasCode returns a boolean if a field has been set. + +### GetMessage + +`func (o *CertificateGetProxyCertificates500ResponseError) GetMessage() string` + +GetMessage returns the Message field if non-nil, zero value otherwise. + +### GetMessageOk + +`func (o *CertificateGetProxyCertificates500ResponseError) 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 *CertificateGetProxyCertificates500ResponseError) SetMessage(v string)` + +SetMessage sets Message field to given value. + +### HasMessage + +`func (o *CertificateGetProxyCertificates500ResponseError) HasMessage() bool` + +HasMessage returns a boolean if a field has been set. + +### GetStatus + +`func (o *CertificateGetProxyCertificates500ResponseError) GetStatus() string` + +GetStatus returns the Status field if non-nil, zero value otherwise. + +### GetStatusOk + +`func (o *CertificateGetProxyCertificates500ResponseError) GetStatusOk() (*string, bool)` + +GetStatusOk returns a tuple with the Status field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetStatus + +`func (o *CertificateGetProxyCertificates500ResponseError) SetStatus(v string)` + +SetStatus sets Status field to given value. + +### HasStatus + +`func (o *CertificateGetProxyCertificates500ResponseError) HasStatus() bool` + +HasStatus 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/redirect/docs/CustomRedirect.md b/redirect/docs/CustomRedirect.md new file mode 100644 index 0000000..86a2744 --- /dev/null +++ b/redirect/docs/CustomRedirect.md @@ -0,0 +1,212 @@ +# CustomRedirect + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**CreatedTime** | Pointer to **time.Time** | The time when this Custom Redirect object was created. | [optional] [readonly] +**Data** | Pointer to **string** | The list of csv custom IPv4/IPv6 or a single domain redirect address. | [optional] +**Id** | Pointer to **int32** | The Custom Redirect object identifier. | [optional] [readonly] +**Name** | Pointer to **string** | The name of the custom redirect. | [optional] +**PolicyIds** | Pointer to **[]int32** | The list of the security policy identifiers with which the named list is associated. | [optional] [readonly] +**PolicyNames** | Pointer to **[]string** | The list of the security policy names with which the custom redirect is associated. | [optional] [readonly] +**UpdatedTime** | Pointer to **time.Time** | The time when this Custom Redirect object was last updated. | [optional] [readonly] + +## Methods + +### NewCustomRedirect + +`func NewCustomRedirect() *CustomRedirect` + +NewCustomRedirect instantiates a new CustomRedirect 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 + +### NewCustomRedirectWithDefaults + +`func NewCustomRedirectWithDefaults() *CustomRedirect` + +NewCustomRedirectWithDefaults instantiates a new CustomRedirect 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 + +### GetCreatedTime + +`func (o *CustomRedirect) GetCreatedTime() time.Time` + +GetCreatedTime returns the CreatedTime field if non-nil, zero value otherwise. + +### GetCreatedTimeOk + +`func (o *CustomRedirect) GetCreatedTimeOk() (*time.Time, bool)` + +GetCreatedTimeOk returns a tuple with the CreatedTime field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreatedTime + +`func (o *CustomRedirect) SetCreatedTime(v time.Time)` + +SetCreatedTime sets CreatedTime field to given value. + +### HasCreatedTime + +`func (o *CustomRedirect) HasCreatedTime() bool` + +HasCreatedTime returns a boolean if a field has been set. + +### GetData + +`func (o *CustomRedirect) GetData() string` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *CustomRedirect) GetDataOk() (*string, bool)` + +GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetData + +`func (o *CustomRedirect) SetData(v string)` + +SetData sets Data field to given value. + +### HasData + +`func (o *CustomRedirect) HasData() bool` + +HasData returns a boolean if a field has been set. + +### GetId + +`func (o *CustomRedirect) GetId() int32` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *CustomRedirect) GetIdOk() (*int32, 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 *CustomRedirect) SetId(v int32)` + +SetId sets Id field to given value. + +### HasId + +`func (o *CustomRedirect) HasId() bool` + +HasId returns a boolean if a field has been set. + +### GetName + +`func (o *CustomRedirect) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *CustomRedirect) 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 *CustomRedirect) SetName(v string)` + +SetName sets Name field to given value. + +### HasName + +`func (o *CustomRedirect) HasName() bool` + +HasName returns a boolean if a field has been set. + +### GetPolicyIds + +`func (o *CustomRedirect) GetPolicyIds() []int32` + +GetPolicyIds returns the PolicyIds field if non-nil, zero value otherwise. + +### GetPolicyIdsOk + +`func (o *CustomRedirect) GetPolicyIdsOk() (*[]int32, bool)` + +GetPolicyIdsOk returns a tuple with the PolicyIds field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPolicyIds + +`func (o *CustomRedirect) SetPolicyIds(v []int32)` + +SetPolicyIds sets PolicyIds field to given value. + +### HasPolicyIds + +`func (o *CustomRedirect) HasPolicyIds() bool` + +HasPolicyIds returns a boolean if a field has been set. + +### GetPolicyNames + +`func (o *CustomRedirect) GetPolicyNames() []string` + +GetPolicyNames returns the PolicyNames field if non-nil, zero value otherwise. + +### GetPolicyNamesOk + +`func (o *CustomRedirect) GetPolicyNamesOk() (*[]string, bool)` + +GetPolicyNamesOk returns a tuple with the PolicyNames field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPolicyNames + +`func (o *CustomRedirect) SetPolicyNames(v []string)` + +SetPolicyNames sets PolicyNames field to given value. + +### HasPolicyNames + +`func (o *CustomRedirect) HasPolicyNames() bool` + +HasPolicyNames returns a boolean if a field has been set. + +### GetUpdatedTime + +`func (o *CustomRedirect) GetUpdatedTime() time.Time` + +GetUpdatedTime returns the UpdatedTime field if non-nil, zero value otherwise. + +### GetUpdatedTimeOk + +`func (o *CustomRedirect) GetUpdatedTimeOk() (*time.Time, bool)` + +GetUpdatedTimeOk returns a tuple with the UpdatedTime field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUpdatedTime + +`func (o *CustomRedirect) SetUpdatedTime(v time.Time)` + +SetUpdatedTime sets UpdatedTime field to given value. + +### HasUpdatedTime + +`func (o *CustomRedirect) HasUpdatedTime() bool` + +HasUpdatedTime 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/redirect/docs/CustomRedirectCreateResponse.md b/redirect/docs/CustomRedirectCreateResponse.md new file mode 100644 index 0000000..4dfc79a --- /dev/null +++ b/redirect/docs/CustomRedirectCreateResponse.md @@ -0,0 +1,56 @@ +# CustomRedirectCreateResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Results** | Pointer to [**CustomRedirect**](CustomRedirect.md) | | [optional] + +## Methods + +### NewCustomRedirectCreateResponse + +`func NewCustomRedirectCreateResponse() *CustomRedirectCreateResponse` + +NewCustomRedirectCreateResponse instantiates a new CustomRedirectCreateResponse 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 + +### NewCustomRedirectCreateResponseWithDefaults + +`func NewCustomRedirectCreateResponseWithDefaults() *CustomRedirectCreateResponse` + +NewCustomRedirectCreateResponseWithDefaults instantiates a new CustomRedirectCreateResponse 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 *CustomRedirectCreateResponse) GetResults() CustomRedirect` + +GetResults returns the Results field if non-nil, zero value otherwise. + +### GetResultsOk + +`func (o *CustomRedirectCreateResponse) GetResultsOk() (*CustomRedirect, 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 *CustomRedirectCreateResponse) SetResults(v CustomRedirect)` + +SetResults sets Results field to given value. + +### HasResults + +`func (o *CustomRedirectCreateResponse) 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/redirect/docs/CustomRedirectDeleteRequest.md b/redirect/docs/CustomRedirectDeleteRequest.md new file mode 100644 index 0000000..21f9816 --- /dev/null +++ b/redirect/docs/CustomRedirectDeleteRequest.md @@ -0,0 +1,56 @@ +# CustomRedirectDeleteRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Ids** | Pointer to **[]int32** | The list of Custom Redirect object identifiers. | [optional] + +## Methods + +### NewCustomRedirectDeleteRequest + +`func NewCustomRedirectDeleteRequest() *CustomRedirectDeleteRequest` + +NewCustomRedirectDeleteRequest instantiates a new CustomRedirectDeleteRequest 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 + +### NewCustomRedirectDeleteRequestWithDefaults + +`func NewCustomRedirectDeleteRequestWithDefaults() *CustomRedirectDeleteRequest` + +NewCustomRedirectDeleteRequestWithDefaults instantiates a new CustomRedirectDeleteRequest 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 + +### GetIds + +`func (o *CustomRedirectDeleteRequest) GetIds() []int32` + +GetIds returns the Ids field if non-nil, zero value otherwise. + +### GetIdsOk + +`func (o *CustomRedirectDeleteRequest) GetIdsOk() (*[]int32, bool)` + +GetIdsOk returns a tuple with the Ids field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIds + +`func (o *CustomRedirectDeleteRequest) SetIds(v []int32)` + +SetIds sets Ids field to given value. + +### HasIds + +`func (o *CustomRedirectDeleteRequest) HasIds() bool` + +HasIds 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/redirect/docs/CustomRedirectMultiResponse.md b/redirect/docs/CustomRedirectMultiResponse.md new file mode 100644 index 0000000..71e2874 --- /dev/null +++ b/redirect/docs/CustomRedirectMultiResponse.md @@ -0,0 +1,56 @@ +# CustomRedirectMultiResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Results** | Pointer to [**[]CustomRedirect**](CustomRedirect.md) | The list of Custom Redirect objects. | [optional] + +## Methods + +### NewCustomRedirectMultiResponse + +`func NewCustomRedirectMultiResponse() *CustomRedirectMultiResponse` + +NewCustomRedirectMultiResponse instantiates a new CustomRedirectMultiResponse 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 + +### NewCustomRedirectMultiResponseWithDefaults + +`func NewCustomRedirectMultiResponseWithDefaults() *CustomRedirectMultiResponse` + +NewCustomRedirectMultiResponseWithDefaults instantiates a new CustomRedirectMultiResponse 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 *CustomRedirectMultiResponse) GetResults() []CustomRedirect` + +GetResults returns the Results field if non-nil, zero value otherwise. + +### GetResultsOk + +`func (o *CustomRedirectMultiResponse) GetResultsOk() (*[]CustomRedirect, 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 *CustomRedirectMultiResponse) SetResults(v []CustomRedirect)` + +SetResults sets Results field to given value. + +### HasResults + +`func (o *CustomRedirectMultiResponse) 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/redirect/docs/CustomRedirectReadResponse.md b/redirect/docs/CustomRedirectReadResponse.md new file mode 100644 index 0000000..5c60f7d --- /dev/null +++ b/redirect/docs/CustomRedirectReadResponse.md @@ -0,0 +1,56 @@ +# CustomRedirectReadResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Results** | Pointer to [**CustomRedirect**](CustomRedirect.md) | | [optional] + +## Methods + +### NewCustomRedirectReadResponse + +`func NewCustomRedirectReadResponse() *CustomRedirectReadResponse` + +NewCustomRedirectReadResponse instantiates a new CustomRedirectReadResponse 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 + +### NewCustomRedirectReadResponseWithDefaults + +`func NewCustomRedirectReadResponseWithDefaults() *CustomRedirectReadResponse` + +NewCustomRedirectReadResponseWithDefaults instantiates a new CustomRedirectReadResponse 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 *CustomRedirectReadResponse) GetResults() CustomRedirect` + +GetResults returns the Results field if non-nil, zero value otherwise. + +### GetResultsOk + +`func (o *CustomRedirectReadResponse) GetResultsOk() (*CustomRedirect, 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 *CustomRedirectReadResponse) SetResults(v CustomRedirect)` + +SetResults sets Results field to given value. + +### HasResults + +`func (o *CustomRedirectReadResponse) 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/redirect/docs/CustomRedirectUpdateResponse.md b/redirect/docs/CustomRedirectUpdateResponse.md new file mode 100644 index 0000000..a8d5b8c --- /dev/null +++ b/redirect/docs/CustomRedirectUpdateResponse.md @@ -0,0 +1,56 @@ +# CustomRedirectUpdateResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Results** | Pointer to [**CustomRedirect**](CustomRedirect.md) | | [optional] + +## Methods + +### NewCustomRedirectUpdateResponse + +`func NewCustomRedirectUpdateResponse() *CustomRedirectUpdateResponse` + +NewCustomRedirectUpdateResponse instantiates a new CustomRedirectUpdateResponse 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 + +### NewCustomRedirectUpdateResponseWithDefaults + +`func NewCustomRedirectUpdateResponseWithDefaults() *CustomRedirectUpdateResponse` + +NewCustomRedirectUpdateResponseWithDefaults instantiates a new CustomRedirectUpdateResponse 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 *CustomRedirectUpdateResponse) GetResults() CustomRedirect` + +GetResults returns the Results field if non-nil, zero value otherwise. + +### GetResultsOk + +`func (o *CustomRedirectUpdateResponse) GetResultsOk() (*CustomRedirect, 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 *CustomRedirectUpdateResponse) SetResults(v CustomRedirect)` + +SetResults sets Results field to given value. + +### HasResults + +`func (o *CustomRedirectUpdateResponse) 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/redirect/docs/CustomRedirectsAPI.md b/redirect/docs/CustomRedirectsAPI.md new file mode 100644 index 0000000..05380cf --- /dev/null +++ b/redirect/docs/CustomRedirectsAPI.md @@ -0,0 +1,419 @@ +# CustomRedirectsAPI + +All URIs are relative to *https://csp.infoblox.com/api/atcfw/v1* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**CreateCustomRedirect**](CustomRedirectsAPI.md#CreateCustomRedirect) | **Post** /custom_redirects | Create Custom Redirect. +[**DeleteCustomRedirect**](CustomRedirectsAPI.md#DeleteCustomRedirect) | **Delete** /custom_redirects | Delete Custom Redirect. +[**DeleteSingleCustomRedirect**](CustomRedirectsAPI.md#DeleteSingleCustomRedirect) | **Delete** /custom_redirects/{id} | Delete Custom Redirect By Id. +[**ListCustomRedirect**](CustomRedirectsAPI.md#ListCustomRedirect) | **Get** /custom_redirects | List Custom Redirects. +[**ReadCustomRedirect**](CustomRedirectsAPI.md#ReadCustomRedirect) | **Get** /custom_redirects/{id} | Read Custom Redirect. +[**UpdateCustomRedirect**](CustomRedirectsAPI.md#UpdateCustomRedirect) | **Put** /custom_redirects/{id} | Update Custom Redirect. + + + +## CreateCustomRedirect + +> CustomRedirectCreateResponse CreateCustomRedirect(ctx).Body(body).Execute() + +Create Custom Redirect. + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + + "github.com/infobloxopen/bloxone-go-client/redirect" +) + +func main() { + body := *redirect.NewCustomRedirect() // CustomRedirect | The Custom Redirect object. + + apiClient := redirect.NewAPIClient() + resp, r, err := apiClient.CustomRedirectsAPI.CreateCustomRedirect(context.Background()).Body(body).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `CustomRedirectsAPI.CreateCustomRedirect``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `CreateCustomRedirect`: CustomRedirectCreateResponse + fmt.Fprintf(os.Stdout, "Response from `CustomRedirectsAPI.CreateCustomRedirect`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a `CustomRedirectsAPICreateCustomRedirectRequest` struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**body** | [**CustomRedirect**](CustomRedirect.md) | The Custom Redirect object. | + +### Return type + +[**CustomRedirectCreateResponse**](CustomRedirectCreateResponse.md) + +### Authorization + +No authorization required + +### 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) + + +## DeleteCustomRedirect + +> DeleteCustomRedirect(ctx).Body(body).Execute() + +Delete Custom Redirect. + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + + "github.com/infobloxopen/bloxone-go-client/redirect" +) + +func main() { + body := *redirect.NewCustomRedirectDeleteRequest() // CustomRedirectDeleteRequest | + + apiClient := redirect.NewAPIClient() + r, err := apiClient.CustomRedirectsAPI.DeleteCustomRedirect(context.Background()).Body(body).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `CustomRedirectsAPI.DeleteCustomRedirect``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a `CustomRedirectsAPIDeleteCustomRedirectRequest` struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**body** | [**CustomRedirectDeleteRequest**](CustomRedirectDeleteRequest.md) | | + +### Return type + + (empty response body) + +### Authorization + +No authorization required + +### 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) + + +## DeleteSingleCustomRedirect + +> DeleteSingleCustomRedirect(ctx, id).Execute() + +Delete Custom Redirect By Id. + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + + "github.com/infobloxopen/bloxone-go-client/redirect" +) + +func main() { + id := int32(56) // int32 | The Custom Redirect object identifier. + + apiClient := redirect.NewAPIClient() + r, err := apiClient.CustomRedirectsAPI.DeleteSingleCustomRedirect(context.Background(), id).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `CustomRedirectsAPI.DeleteSingleCustomRedirect``: %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** | **int32** | The Custom Redirect object identifier. | + +### Other Parameters + +Other parameters are passed through a pointer to a `CustomRedirectsAPIDeleteSingleCustomRedirectRequest` struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + +### Return type + + (empty response body) + +### Authorization + +No authorization required + +### 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) + + +## ListCustomRedirect + +> CustomRedirectMultiResponse ListCustomRedirect(ctx).Fields(fields).Filter(filter).Execute() + +List Custom Redirects. + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + + "github.com/infobloxopen/bloxone-go-client/redirect" +) + +func main() { + + apiClient := redirect.NewAPIClient() + resp, r, err := apiClient.CustomRedirectsAPI.ListCustomRedirect(context.Background()).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `CustomRedirectsAPI.ListCustomRedirect``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ListCustomRedirect`: CustomRedirectMultiResponse + fmt.Fprintf(os.Stdout, "Response from `CustomRedirectsAPI.ListCustomRedirect`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a `CustomRedirectsAPIListCustomRedirectRequest` 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 | | + +### Return type + +[**CustomRedirectMultiResponse**](CustomRedirectMultiResponse.md) + +### Authorization + +No authorization required + +### 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) + + +## ReadCustomRedirect + +> CustomRedirectReadResponse ReadCustomRedirect(ctx, id).Fields(fields).Name(name).Execute() + +Read Custom Redirect. + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + + "github.com/infobloxopen/bloxone-go-client/redirect" +) + +func main() { + id := int32(56) // int32 | The Custom Redirect object identifier. + + apiClient := redirect.NewAPIClient() + resp, r, err := apiClient.CustomRedirectsAPI.ReadCustomRedirect(context.Background(), id).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `CustomRedirectsAPI.ReadCustomRedirect``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ReadCustomRedirect`: CustomRedirectReadResponse + fmt.Fprintf(os.Stdout, "Response from `CustomRedirectsAPI.ReadCustomRedirect`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**id** | **int32** | The Custom Redirect object identifier. | + +### Other Parameters + +Other parameters are passed through a pointer to a `CustomRedirectsAPIReadCustomRedirectRequest` 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. | +**name** | **string** | The name of the custom redirect. May be used if id==0. | + +### Return type + +[**CustomRedirectReadResponse**](CustomRedirectReadResponse.md) + +### Authorization + +No authorization required + +### 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) + + +## UpdateCustomRedirect + +> CustomRedirectUpdateResponse UpdateCustomRedirect(ctx, id).Body(body).Execute() + +Update Custom Redirect. + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + + "github.com/infobloxopen/bloxone-go-client/redirect" +) + +func main() { + id := int32(56) // int32 | The Custom Redirect object identifier. + body := *redirect.NewCustomRedirect() // CustomRedirect | The Custom Redirect object. + + apiClient := redirect.NewAPIClient() + resp, r, err := apiClient.CustomRedirectsAPI.UpdateCustomRedirect(context.Background(), id).Body(body).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `CustomRedirectsAPI.UpdateCustomRedirect``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `UpdateCustomRedirect`: CustomRedirectUpdateResponse + fmt.Fprintf(os.Stdout, "Response from `CustomRedirectsAPI.UpdateCustomRedirect`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**id** | **int32** | The Custom Redirect object identifier. | + +### Other Parameters + +Other parameters are passed through a pointer to a `CustomRedirectsAPIUpdateCustomRedirectRequest` struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**body** | [**CustomRedirect**](CustomRedirect.md) | The Custom Redirect object. | + +### Return type + +[**CustomRedirectUpdateResponse**](CustomRedirectUpdateResponse.md) + +### Authorization + +No authorization required + +### 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/redirect/docs/CustomRedirectsCreateCustomRedirect400Response.md b/redirect/docs/CustomRedirectsCreateCustomRedirect400Response.md new file mode 100644 index 0000000..587a388 --- /dev/null +++ b/redirect/docs/CustomRedirectsCreateCustomRedirect400Response.md @@ -0,0 +1,56 @@ +# CustomRedirectsCreateCustomRedirect400Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Error** | Pointer to [**CustomRedirectsCreateCustomRedirect400ResponseError**](CustomRedirectsCreateCustomRedirect400ResponseError.md) | | [optional] + +## Methods + +### NewCustomRedirectsCreateCustomRedirect400Response + +`func NewCustomRedirectsCreateCustomRedirect400Response() *CustomRedirectsCreateCustomRedirect400Response` + +NewCustomRedirectsCreateCustomRedirect400Response instantiates a new CustomRedirectsCreateCustomRedirect400Response 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 + +### NewCustomRedirectsCreateCustomRedirect400ResponseWithDefaults + +`func NewCustomRedirectsCreateCustomRedirect400ResponseWithDefaults() *CustomRedirectsCreateCustomRedirect400Response` + +NewCustomRedirectsCreateCustomRedirect400ResponseWithDefaults instantiates a new CustomRedirectsCreateCustomRedirect400Response 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 + +### GetError + +`func (o *CustomRedirectsCreateCustomRedirect400Response) GetError() CustomRedirectsCreateCustomRedirect400ResponseError` + +GetError returns the Error field if non-nil, zero value otherwise. + +### GetErrorOk + +`func (o *CustomRedirectsCreateCustomRedirect400Response) GetErrorOk() (*CustomRedirectsCreateCustomRedirect400ResponseError, bool)` + +GetErrorOk returns a tuple with the Error field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetError + +`func (o *CustomRedirectsCreateCustomRedirect400Response) SetError(v CustomRedirectsCreateCustomRedirect400ResponseError)` + +SetError sets Error field to given value. + +### HasError + +`func (o *CustomRedirectsCreateCustomRedirect400Response) HasError() bool` + +HasError 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/redirect/docs/CustomRedirectsCreateCustomRedirect400ResponseError.md b/redirect/docs/CustomRedirectsCreateCustomRedirect400ResponseError.md new file mode 100644 index 0000000..d7641d2 --- /dev/null +++ b/redirect/docs/CustomRedirectsCreateCustomRedirect400ResponseError.md @@ -0,0 +1,108 @@ +# CustomRedirectsCreateCustomRedirect400ResponseError + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Code** | Pointer to **string** | | [optional] +**Message** | Pointer to **string** | | [optional] +**Status** | Pointer to **string** | | [optional] + +## Methods + +### NewCustomRedirectsCreateCustomRedirect400ResponseError + +`func NewCustomRedirectsCreateCustomRedirect400ResponseError() *CustomRedirectsCreateCustomRedirect400ResponseError` + +NewCustomRedirectsCreateCustomRedirect400ResponseError instantiates a new CustomRedirectsCreateCustomRedirect400ResponseError 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 + +### NewCustomRedirectsCreateCustomRedirect400ResponseErrorWithDefaults + +`func NewCustomRedirectsCreateCustomRedirect400ResponseErrorWithDefaults() *CustomRedirectsCreateCustomRedirect400ResponseError` + +NewCustomRedirectsCreateCustomRedirect400ResponseErrorWithDefaults instantiates a new CustomRedirectsCreateCustomRedirect400ResponseError 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 + +### GetCode + +`func (o *CustomRedirectsCreateCustomRedirect400ResponseError) GetCode() string` + +GetCode returns the Code field if non-nil, zero value otherwise. + +### GetCodeOk + +`func (o *CustomRedirectsCreateCustomRedirect400ResponseError) GetCodeOk() (*string, bool)` + +GetCodeOk returns a tuple with the Code field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCode + +`func (o *CustomRedirectsCreateCustomRedirect400ResponseError) SetCode(v string)` + +SetCode sets Code field to given value. + +### HasCode + +`func (o *CustomRedirectsCreateCustomRedirect400ResponseError) HasCode() bool` + +HasCode returns a boolean if a field has been set. + +### GetMessage + +`func (o *CustomRedirectsCreateCustomRedirect400ResponseError) GetMessage() string` + +GetMessage returns the Message field if non-nil, zero value otherwise. + +### GetMessageOk + +`func (o *CustomRedirectsCreateCustomRedirect400ResponseError) 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 *CustomRedirectsCreateCustomRedirect400ResponseError) SetMessage(v string)` + +SetMessage sets Message field to given value. + +### HasMessage + +`func (o *CustomRedirectsCreateCustomRedirect400ResponseError) HasMessage() bool` + +HasMessage returns a boolean if a field has been set. + +### GetStatus + +`func (o *CustomRedirectsCreateCustomRedirect400ResponseError) GetStatus() string` + +GetStatus returns the Status field if non-nil, zero value otherwise. + +### GetStatusOk + +`func (o *CustomRedirectsCreateCustomRedirect400ResponseError) GetStatusOk() (*string, bool)` + +GetStatusOk returns a tuple with the Status field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetStatus + +`func (o *CustomRedirectsCreateCustomRedirect400ResponseError) SetStatus(v string)` + +SetStatus sets Status field to given value. + +### HasStatus + +`func (o *CustomRedirectsCreateCustomRedirect400ResponseError) HasStatus() bool` + +HasStatus 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/redirect/docs/CustomRedirectsCreateCustomRedirect409Response.md b/redirect/docs/CustomRedirectsCreateCustomRedirect409Response.md new file mode 100644 index 0000000..8f1f487 --- /dev/null +++ b/redirect/docs/CustomRedirectsCreateCustomRedirect409Response.md @@ -0,0 +1,56 @@ +# CustomRedirectsCreateCustomRedirect409Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Error** | Pointer to [**CustomRedirectsCreateCustomRedirect409ResponseError**](CustomRedirectsCreateCustomRedirect409ResponseError.md) | | [optional] + +## Methods + +### NewCustomRedirectsCreateCustomRedirect409Response + +`func NewCustomRedirectsCreateCustomRedirect409Response() *CustomRedirectsCreateCustomRedirect409Response` + +NewCustomRedirectsCreateCustomRedirect409Response instantiates a new CustomRedirectsCreateCustomRedirect409Response 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 + +### NewCustomRedirectsCreateCustomRedirect409ResponseWithDefaults + +`func NewCustomRedirectsCreateCustomRedirect409ResponseWithDefaults() *CustomRedirectsCreateCustomRedirect409Response` + +NewCustomRedirectsCreateCustomRedirect409ResponseWithDefaults instantiates a new CustomRedirectsCreateCustomRedirect409Response 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 + +### GetError + +`func (o *CustomRedirectsCreateCustomRedirect409Response) GetError() CustomRedirectsCreateCustomRedirect409ResponseError` + +GetError returns the Error field if non-nil, zero value otherwise. + +### GetErrorOk + +`func (o *CustomRedirectsCreateCustomRedirect409Response) GetErrorOk() (*CustomRedirectsCreateCustomRedirect409ResponseError, bool)` + +GetErrorOk returns a tuple with the Error field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetError + +`func (o *CustomRedirectsCreateCustomRedirect409Response) SetError(v CustomRedirectsCreateCustomRedirect409ResponseError)` + +SetError sets Error field to given value. + +### HasError + +`func (o *CustomRedirectsCreateCustomRedirect409Response) HasError() bool` + +HasError 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/redirect/docs/CustomRedirectsCreateCustomRedirect409ResponseError.md b/redirect/docs/CustomRedirectsCreateCustomRedirect409ResponseError.md new file mode 100644 index 0000000..c4cb62c --- /dev/null +++ b/redirect/docs/CustomRedirectsCreateCustomRedirect409ResponseError.md @@ -0,0 +1,108 @@ +# CustomRedirectsCreateCustomRedirect409ResponseError + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Code** | Pointer to **string** | | [optional] +**Message** | Pointer to **string** | | [optional] +**Status** | Pointer to **string** | | [optional] + +## Methods + +### NewCustomRedirectsCreateCustomRedirect409ResponseError + +`func NewCustomRedirectsCreateCustomRedirect409ResponseError() *CustomRedirectsCreateCustomRedirect409ResponseError` + +NewCustomRedirectsCreateCustomRedirect409ResponseError instantiates a new CustomRedirectsCreateCustomRedirect409ResponseError 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 + +### NewCustomRedirectsCreateCustomRedirect409ResponseErrorWithDefaults + +`func NewCustomRedirectsCreateCustomRedirect409ResponseErrorWithDefaults() *CustomRedirectsCreateCustomRedirect409ResponseError` + +NewCustomRedirectsCreateCustomRedirect409ResponseErrorWithDefaults instantiates a new CustomRedirectsCreateCustomRedirect409ResponseError 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 + +### GetCode + +`func (o *CustomRedirectsCreateCustomRedirect409ResponseError) GetCode() string` + +GetCode returns the Code field if non-nil, zero value otherwise. + +### GetCodeOk + +`func (o *CustomRedirectsCreateCustomRedirect409ResponseError) GetCodeOk() (*string, bool)` + +GetCodeOk returns a tuple with the Code field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCode + +`func (o *CustomRedirectsCreateCustomRedirect409ResponseError) SetCode(v string)` + +SetCode sets Code field to given value. + +### HasCode + +`func (o *CustomRedirectsCreateCustomRedirect409ResponseError) HasCode() bool` + +HasCode returns a boolean if a field has been set. + +### GetMessage + +`func (o *CustomRedirectsCreateCustomRedirect409ResponseError) GetMessage() string` + +GetMessage returns the Message field if non-nil, zero value otherwise. + +### GetMessageOk + +`func (o *CustomRedirectsCreateCustomRedirect409ResponseError) 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 *CustomRedirectsCreateCustomRedirect409ResponseError) SetMessage(v string)` + +SetMessage sets Message field to given value. + +### HasMessage + +`func (o *CustomRedirectsCreateCustomRedirect409ResponseError) HasMessage() bool` + +HasMessage returns a boolean if a field has been set. + +### GetStatus + +`func (o *CustomRedirectsCreateCustomRedirect409ResponseError) GetStatus() string` + +GetStatus returns the Status field if non-nil, zero value otherwise. + +### GetStatusOk + +`func (o *CustomRedirectsCreateCustomRedirect409ResponseError) GetStatusOk() (*string, bool)` + +GetStatusOk returns a tuple with the Status field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetStatus + +`func (o *CustomRedirectsCreateCustomRedirect409ResponseError) SetStatus(v string)` + +SetStatus sets Status field to given value. + +### HasStatus + +`func (o *CustomRedirectsCreateCustomRedirect409ResponseError) HasStatus() bool` + +HasStatus 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/redirect/docs/CustomRedirectsDeleteCustomRedirect400Response.md b/redirect/docs/CustomRedirectsDeleteCustomRedirect400Response.md new file mode 100644 index 0000000..0fb9835 --- /dev/null +++ b/redirect/docs/CustomRedirectsDeleteCustomRedirect400Response.md @@ -0,0 +1,56 @@ +# CustomRedirectsDeleteCustomRedirect400Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Error** | Pointer to [**CustomRedirectsDeleteCustomRedirect400ResponseError**](CustomRedirectsDeleteCustomRedirect400ResponseError.md) | | [optional] + +## Methods + +### NewCustomRedirectsDeleteCustomRedirect400Response + +`func NewCustomRedirectsDeleteCustomRedirect400Response() *CustomRedirectsDeleteCustomRedirect400Response` + +NewCustomRedirectsDeleteCustomRedirect400Response instantiates a new CustomRedirectsDeleteCustomRedirect400Response 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 + +### NewCustomRedirectsDeleteCustomRedirect400ResponseWithDefaults + +`func NewCustomRedirectsDeleteCustomRedirect400ResponseWithDefaults() *CustomRedirectsDeleteCustomRedirect400Response` + +NewCustomRedirectsDeleteCustomRedirect400ResponseWithDefaults instantiates a new CustomRedirectsDeleteCustomRedirect400Response 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 + +### GetError + +`func (o *CustomRedirectsDeleteCustomRedirect400Response) GetError() CustomRedirectsDeleteCustomRedirect400ResponseError` + +GetError returns the Error field if non-nil, zero value otherwise. + +### GetErrorOk + +`func (o *CustomRedirectsDeleteCustomRedirect400Response) GetErrorOk() (*CustomRedirectsDeleteCustomRedirect400ResponseError, bool)` + +GetErrorOk returns a tuple with the Error field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetError + +`func (o *CustomRedirectsDeleteCustomRedirect400Response) SetError(v CustomRedirectsDeleteCustomRedirect400ResponseError)` + +SetError sets Error field to given value. + +### HasError + +`func (o *CustomRedirectsDeleteCustomRedirect400Response) HasError() bool` + +HasError 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/redirect/docs/CustomRedirectsDeleteCustomRedirect400ResponseError.md b/redirect/docs/CustomRedirectsDeleteCustomRedirect400ResponseError.md new file mode 100644 index 0000000..4cf3f17 --- /dev/null +++ b/redirect/docs/CustomRedirectsDeleteCustomRedirect400ResponseError.md @@ -0,0 +1,108 @@ +# CustomRedirectsDeleteCustomRedirect400ResponseError + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Code** | Pointer to **string** | | [optional] +**Message** | Pointer to **string** | | [optional] +**Status** | Pointer to **string** | | [optional] + +## Methods + +### NewCustomRedirectsDeleteCustomRedirect400ResponseError + +`func NewCustomRedirectsDeleteCustomRedirect400ResponseError() *CustomRedirectsDeleteCustomRedirect400ResponseError` + +NewCustomRedirectsDeleteCustomRedirect400ResponseError instantiates a new CustomRedirectsDeleteCustomRedirect400ResponseError 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 + +### NewCustomRedirectsDeleteCustomRedirect400ResponseErrorWithDefaults + +`func NewCustomRedirectsDeleteCustomRedirect400ResponseErrorWithDefaults() *CustomRedirectsDeleteCustomRedirect400ResponseError` + +NewCustomRedirectsDeleteCustomRedirect400ResponseErrorWithDefaults instantiates a new CustomRedirectsDeleteCustomRedirect400ResponseError 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 + +### GetCode + +`func (o *CustomRedirectsDeleteCustomRedirect400ResponseError) GetCode() string` + +GetCode returns the Code field if non-nil, zero value otherwise. + +### GetCodeOk + +`func (o *CustomRedirectsDeleteCustomRedirect400ResponseError) GetCodeOk() (*string, bool)` + +GetCodeOk returns a tuple with the Code field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCode + +`func (o *CustomRedirectsDeleteCustomRedirect400ResponseError) SetCode(v string)` + +SetCode sets Code field to given value. + +### HasCode + +`func (o *CustomRedirectsDeleteCustomRedirect400ResponseError) HasCode() bool` + +HasCode returns a boolean if a field has been set. + +### GetMessage + +`func (o *CustomRedirectsDeleteCustomRedirect400ResponseError) GetMessage() string` + +GetMessage returns the Message field if non-nil, zero value otherwise. + +### GetMessageOk + +`func (o *CustomRedirectsDeleteCustomRedirect400ResponseError) 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 *CustomRedirectsDeleteCustomRedirect400ResponseError) SetMessage(v string)` + +SetMessage sets Message field to given value. + +### HasMessage + +`func (o *CustomRedirectsDeleteCustomRedirect400ResponseError) HasMessage() bool` + +HasMessage returns a boolean if a field has been set. + +### GetStatus + +`func (o *CustomRedirectsDeleteCustomRedirect400ResponseError) GetStatus() string` + +GetStatus returns the Status field if non-nil, zero value otherwise. + +### GetStatusOk + +`func (o *CustomRedirectsDeleteCustomRedirect400ResponseError) GetStatusOk() (*string, bool)` + +GetStatusOk returns a tuple with the Status field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetStatus + +`func (o *CustomRedirectsDeleteCustomRedirect400ResponseError) SetStatus(v string)` + +SetStatus sets Status field to given value. + +### HasStatus + +`func (o *CustomRedirectsDeleteCustomRedirect400ResponseError) HasStatus() bool` + +HasStatus 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/redirect/docs/CustomRedirectsDeleteSingleCustomRedirect400Response.md b/redirect/docs/CustomRedirectsDeleteSingleCustomRedirect400Response.md new file mode 100644 index 0000000..8d9115e --- /dev/null +++ b/redirect/docs/CustomRedirectsDeleteSingleCustomRedirect400Response.md @@ -0,0 +1,56 @@ +# CustomRedirectsDeleteSingleCustomRedirect400Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Error** | Pointer to [**CustomRedirectsDeleteSingleCustomRedirect400ResponseError**](CustomRedirectsDeleteSingleCustomRedirect400ResponseError.md) | | [optional] + +## Methods + +### NewCustomRedirectsDeleteSingleCustomRedirect400Response + +`func NewCustomRedirectsDeleteSingleCustomRedirect400Response() *CustomRedirectsDeleteSingleCustomRedirect400Response` + +NewCustomRedirectsDeleteSingleCustomRedirect400Response instantiates a new CustomRedirectsDeleteSingleCustomRedirect400Response 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 + +### NewCustomRedirectsDeleteSingleCustomRedirect400ResponseWithDefaults + +`func NewCustomRedirectsDeleteSingleCustomRedirect400ResponseWithDefaults() *CustomRedirectsDeleteSingleCustomRedirect400Response` + +NewCustomRedirectsDeleteSingleCustomRedirect400ResponseWithDefaults instantiates a new CustomRedirectsDeleteSingleCustomRedirect400Response 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 + +### GetError + +`func (o *CustomRedirectsDeleteSingleCustomRedirect400Response) GetError() CustomRedirectsDeleteSingleCustomRedirect400ResponseError` + +GetError returns the Error field if non-nil, zero value otherwise. + +### GetErrorOk + +`func (o *CustomRedirectsDeleteSingleCustomRedirect400Response) GetErrorOk() (*CustomRedirectsDeleteSingleCustomRedirect400ResponseError, bool)` + +GetErrorOk returns a tuple with the Error field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetError + +`func (o *CustomRedirectsDeleteSingleCustomRedirect400Response) SetError(v CustomRedirectsDeleteSingleCustomRedirect400ResponseError)` + +SetError sets Error field to given value. + +### HasError + +`func (o *CustomRedirectsDeleteSingleCustomRedirect400Response) HasError() bool` + +HasError 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/redirect/docs/CustomRedirectsDeleteSingleCustomRedirect400ResponseError.md b/redirect/docs/CustomRedirectsDeleteSingleCustomRedirect400ResponseError.md new file mode 100644 index 0000000..ad9d781 --- /dev/null +++ b/redirect/docs/CustomRedirectsDeleteSingleCustomRedirect400ResponseError.md @@ -0,0 +1,108 @@ +# CustomRedirectsDeleteSingleCustomRedirect400ResponseError + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Code** | Pointer to **string** | | [optional] +**Message** | Pointer to **string** | | [optional] +**Status** | Pointer to **string** | | [optional] + +## Methods + +### NewCustomRedirectsDeleteSingleCustomRedirect400ResponseError + +`func NewCustomRedirectsDeleteSingleCustomRedirect400ResponseError() *CustomRedirectsDeleteSingleCustomRedirect400ResponseError` + +NewCustomRedirectsDeleteSingleCustomRedirect400ResponseError instantiates a new CustomRedirectsDeleteSingleCustomRedirect400ResponseError 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 + +### NewCustomRedirectsDeleteSingleCustomRedirect400ResponseErrorWithDefaults + +`func NewCustomRedirectsDeleteSingleCustomRedirect400ResponseErrorWithDefaults() *CustomRedirectsDeleteSingleCustomRedirect400ResponseError` + +NewCustomRedirectsDeleteSingleCustomRedirect400ResponseErrorWithDefaults instantiates a new CustomRedirectsDeleteSingleCustomRedirect400ResponseError 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 + +### GetCode + +`func (o *CustomRedirectsDeleteSingleCustomRedirect400ResponseError) GetCode() string` + +GetCode returns the Code field if non-nil, zero value otherwise. + +### GetCodeOk + +`func (o *CustomRedirectsDeleteSingleCustomRedirect400ResponseError) GetCodeOk() (*string, bool)` + +GetCodeOk returns a tuple with the Code field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCode + +`func (o *CustomRedirectsDeleteSingleCustomRedirect400ResponseError) SetCode(v string)` + +SetCode sets Code field to given value. + +### HasCode + +`func (o *CustomRedirectsDeleteSingleCustomRedirect400ResponseError) HasCode() bool` + +HasCode returns a boolean if a field has been set. + +### GetMessage + +`func (o *CustomRedirectsDeleteSingleCustomRedirect400ResponseError) GetMessage() string` + +GetMessage returns the Message field if non-nil, zero value otherwise. + +### GetMessageOk + +`func (o *CustomRedirectsDeleteSingleCustomRedirect400ResponseError) 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 *CustomRedirectsDeleteSingleCustomRedirect400ResponseError) SetMessage(v string)` + +SetMessage sets Message field to given value. + +### HasMessage + +`func (o *CustomRedirectsDeleteSingleCustomRedirect400ResponseError) HasMessage() bool` + +HasMessage returns a boolean if a field has been set. + +### GetStatus + +`func (o *CustomRedirectsDeleteSingleCustomRedirect400ResponseError) GetStatus() string` + +GetStatus returns the Status field if non-nil, zero value otherwise. + +### GetStatusOk + +`func (o *CustomRedirectsDeleteSingleCustomRedirect400ResponseError) GetStatusOk() (*string, bool)` + +GetStatusOk returns a tuple with the Status field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetStatus + +`func (o *CustomRedirectsDeleteSingleCustomRedirect400ResponseError) SetStatus(v string)` + +SetStatus sets Status field to given value. + +### HasStatus + +`func (o *CustomRedirectsDeleteSingleCustomRedirect400ResponseError) HasStatus() bool` + +HasStatus 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/redirect/docs/CustomRedirectsReadCustomRedirect404Response.md b/redirect/docs/CustomRedirectsReadCustomRedirect404Response.md new file mode 100644 index 0000000..28dbfff --- /dev/null +++ b/redirect/docs/CustomRedirectsReadCustomRedirect404Response.md @@ -0,0 +1,56 @@ +# CustomRedirectsReadCustomRedirect404Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Error** | Pointer to [**CustomRedirectsReadCustomRedirect404ResponseError**](CustomRedirectsReadCustomRedirect404ResponseError.md) | | [optional] + +## Methods + +### NewCustomRedirectsReadCustomRedirect404Response + +`func NewCustomRedirectsReadCustomRedirect404Response() *CustomRedirectsReadCustomRedirect404Response` + +NewCustomRedirectsReadCustomRedirect404Response instantiates a new CustomRedirectsReadCustomRedirect404Response 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 + +### NewCustomRedirectsReadCustomRedirect404ResponseWithDefaults + +`func NewCustomRedirectsReadCustomRedirect404ResponseWithDefaults() *CustomRedirectsReadCustomRedirect404Response` + +NewCustomRedirectsReadCustomRedirect404ResponseWithDefaults instantiates a new CustomRedirectsReadCustomRedirect404Response 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 + +### GetError + +`func (o *CustomRedirectsReadCustomRedirect404Response) GetError() CustomRedirectsReadCustomRedirect404ResponseError` + +GetError returns the Error field if non-nil, zero value otherwise. + +### GetErrorOk + +`func (o *CustomRedirectsReadCustomRedirect404Response) GetErrorOk() (*CustomRedirectsReadCustomRedirect404ResponseError, bool)` + +GetErrorOk returns a tuple with the Error field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetError + +`func (o *CustomRedirectsReadCustomRedirect404Response) SetError(v CustomRedirectsReadCustomRedirect404ResponseError)` + +SetError sets Error field to given value. + +### HasError + +`func (o *CustomRedirectsReadCustomRedirect404Response) HasError() bool` + +HasError 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/redirect/docs/CustomRedirectsReadCustomRedirect404ResponseError.md b/redirect/docs/CustomRedirectsReadCustomRedirect404ResponseError.md new file mode 100644 index 0000000..703e0a9 --- /dev/null +++ b/redirect/docs/CustomRedirectsReadCustomRedirect404ResponseError.md @@ -0,0 +1,108 @@ +# CustomRedirectsReadCustomRedirect404ResponseError + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Code** | Pointer to **string** | | [optional] +**Message** | Pointer to **string** | | [optional] +**Status** | Pointer to **string** | | [optional] + +## Methods + +### NewCustomRedirectsReadCustomRedirect404ResponseError + +`func NewCustomRedirectsReadCustomRedirect404ResponseError() *CustomRedirectsReadCustomRedirect404ResponseError` + +NewCustomRedirectsReadCustomRedirect404ResponseError instantiates a new CustomRedirectsReadCustomRedirect404ResponseError 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 + +### NewCustomRedirectsReadCustomRedirect404ResponseErrorWithDefaults + +`func NewCustomRedirectsReadCustomRedirect404ResponseErrorWithDefaults() *CustomRedirectsReadCustomRedirect404ResponseError` + +NewCustomRedirectsReadCustomRedirect404ResponseErrorWithDefaults instantiates a new CustomRedirectsReadCustomRedirect404ResponseError 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 + +### GetCode + +`func (o *CustomRedirectsReadCustomRedirect404ResponseError) GetCode() string` + +GetCode returns the Code field if non-nil, zero value otherwise. + +### GetCodeOk + +`func (o *CustomRedirectsReadCustomRedirect404ResponseError) GetCodeOk() (*string, bool)` + +GetCodeOk returns a tuple with the Code field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCode + +`func (o *CustomRedirectsReadCustomRedirect404ResponseError) SetCode(v string)` + +SetCode sets Code field to given value. + +### HasCode + +`func (o *CustomRedirectsReadCustomRedirect404ResponseError) HasCode() bool` + +HasCode returns a boolean if a field has been set. + +### GetMessage + +`func (o *CustomRedirectsReadCustomRedirect404ResponseError) GetMessage() string` + +GetMessage returns the Message field if non-nil, zero value otherwise. + +### GetMessageOk + +`func (o *CustomRedirectsReadCustomRedirect404ResponseError) 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 *CustomRedirectsReadCustomRedirect404ResponseError) SetMessage(v string)` + +SetMessage sets Message field to given value. + +### HasMessage + +`func (o *CustomRedirectsReadCustomRedirect404ResponseError) HasMessage() bool` + +HasMessage returns a boolean if a field has been set. + +### GetStatus + +`func (o *CustomRedirectsReadCustomRedirect404ResponseError) GetStatus() string` + +GetStatus returns the Status field if non-nil, zero value otherwise. + +### GetStatusOk + +`func (o *CustomRedirectsReadCustomRedirect404ResponseError) GetStatusOk() (*string, bool)` + +GetStatusOk returns a tuple with the Status field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetStatus + +`func (o *CustomRedirectsReadCustomRedirect404ResponseError) SetStatus(v string)` + +SetStatus sets Status field to given value. + +### HasStatus + +`func (o *CustomRedirectsReadCustomRedirect404ResponseError) HasStatus() bool` + +HasStatus 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/redirect/docs/CustomRedirectsUpdateCustomRedirect409Response.md b/redirect/docs/CustomRedirectsUpdateCustomRedirect409Response.md new file mode 100644 index 0000000..4518bbb --- /dev/null +++ b/redirect/docs/CustomRedirectsUpdateCustomRedirect409Response.md @@ -0,0 +1,56 @@ +# CustomRedirectsUpdateCustomRedirect409Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Error** | Pointer to [**CustomRedirectsUpdateCustomRedirect409ResponseError**](CustomRedirectsUpdateCustomRedirect409ResponseError.md) | | [optional] + +## Methods + +### NewCustomRedirectsUpdateCustomRedirect409Response + +`func NewCustomRedirectsUpdateCustomRedirect409Response() *CustomRedirectsUpdateCustomRedirect409Response` + +NewCustomRedirectsUpdateCustomRedirect409Response instantiates a new CustomRedirectsUpdateCustomRedirect409Response 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 + +### NewCustomRedirectsUpdateCustomRedirect409ResponseWithDefaults + +`func NewCustomRedirectsUpdateCustomRedirect409ResponseWithDefaults() *CustomRedirectsUpdateCustomRedirect409Response` + +NewCustomRedirectsUpdateCustomRedirect409ResponseWithDefaults instantiates a new CustomRedirectsUpdateCustomRedirect409Response 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 + +### GetError + +`func (o *CustomRedirectsUpdateCustomRedirect409Response) GetError() CustomRedirectsUpdateCustomRedirect409ResponseError` + +GetError returns the Error field if non-nil, zero value otherwise. + +### GetErrorOk + +`func (o *CustomRedirectsUpdateCustomRedirect409Response) GetErrorOk() (*CustomRedirectsUpdateCustomRedirect409ResponseError, bool)` + +GetErrorOk returns a tuple with the Error field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetError + +`func (o *CustomRedirectsUpdateCustomRedirect409Response) SetError(v CustomRedirectsUpdateCustomRedirect409ResponseError)` + +SetError sets Error field to given value. + +### HasError + +`func (o *CustomRedirectsUpdateCustomRedirect409Response) HasError() bool` + +HasError 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/redirect/docs/CustomRedirectsUpdateCustomRedirect409ResponseError.md b/redirect/docs/CustomRedirectsUpdateCustomRedirect409ResponseError.md new file mode 100644 index 0000000..9c01793 --- /dev/null +++ b/redirect/docs/CustomRedirectsUpdateCustomRedirect409ResponseError.md @@ -0,0 +1,108 @@ +# CustomRedirectsUpdateCustomRedirect409ResponseError + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Code** | Pointer to **string** | | [optional] +**Message** | Pointer to **string** | | [optional] +**Status** | Pointer to **string** | | [optional] + +## Methods + +### NewCustomRedirectsUpdateCustomRedirect409ResponseError + +`func NewCustomRedirectsUpdateCustomRedirect409ResponseError() *CustomRedirectsUpdateCustomRedirect409ResponseError` + +NewCustomRedirectsUpdateCustomRedirect409ResponseError instantiates a new CustomRedirectsUpdateCustomRedirect409ResponseError 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 + +### NewCustomRedirectsUpdateCustomRedirect409ResponseErrorWithDefaults + +`func NewCustomRedirectsUpdateCustomRedirect409ResponseErrorWithDefaults() *CustomRedirectsUpdateCustomRedirect409ResponseError` + +NewCustomRedirectsUpdateCustomRedirect409ResponseErrorWithDefaults instantiates a new CustomRedirectsUpdateCustomRedirect409ResponseError 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 + +### GetCode + +`func (o *CustomRedirectsUpdateCustomRedirect409ResponseError) GetCode() string` + +GetCode returns the Code field if non-nil, zero value otherwise. + +### GetCodeOk + +`func (o *CustomRedirectsUpdateCustomRedirect409ResponseError) GetCodeOk() (*string, bool)` + +GetCodeOk returns a tuple with the Code field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCode + +`func (o *CustomRedirectsUpdateCustomRedirect409ResponseError) SetCode(v string)` + +SetCode sets Code field to given value. + +### HasCode + +`func (o *CustomRedirectsUpdateCustomRedirect409ResponseError) HasCode() bool` + +HasCode returns a boolean if a field has been set. + +### GetMessage + +`func (o *CustomRedirectsUpdateCustomRedirect409ResponseError) GetMessage() string` + +GetMessage returns the Message field if non-nil, zero value otherwise. + +### GetMessageOk + +`func (o *CustomRedirectsUpdateCustomRedirect409ResponseError) 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 *CustomRedirectsUpdateCustomRedirect409ResponseError) SetMessage(v string)` + +SetMessage sets Message field to given value. + +### HasMessage + +`func (o *CustomRedirectsUpdateCustomRedirect409ResponseError) HasMessage() bool` + +HasMessage returns a boolean if a field has been set. + +### GetStatus + +`func (o *CustomRedirectsUpdateCustomRedirect409ResponseError) GetStatus() string` + +GetStatus returns the Status field if non-nil, zero value otherwise. + +### GetStatusOk + +`func (o *CustomRedirectsUpdateCustomRedirect409ResponseError) GetStatusOk() (*string, bool)` + +GetStatusOk returns a tuple with the Status field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetStatus + +`func (o *CustomRedirectsUpdateCustomRedirect409ResponseError) SetStatus(v string)` + +SetStatus sets Status field to given value. + +### HasStatus + +`func (o *CustomRedirectsUpdateCustomRedirect409ResponseError) HasStatus() bool` + +HasStatus 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/redirect/docs/ProxyCertResponse.md b/redirect/docs/ProxyCertResponse.md new file mode 100644 index 0000000..16828f3 --- /dev/null +++ b/redirect/docs/ProxyCertResponse.md @@ -0,0 +1,82 @@ +# ProxyCertResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AnycastDnsCertificateUrl** | Pointer to **string** | Infoblox anycast dns client certificate URL. | [optional] +**CertificateUrl** | Pointer to **string** | The certificate URL. | [optional] + +## Methods + +### NewProxyCertResponse + +`func NewProxyCertResponse() *ProxyCertResponse` + +NewProxyCertResponse instantiates a new ProxyCertResponse 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 + +### NewProxyCertResponseWithDefaults + +`func NewProxyCertResponseWithDefaults() *ProxyCertResponse` + +NewProxyCertResponseWithDefaults instantiates a new ProxyCertResponse 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 + +### GetAnycastDnsCertificateUrl + +`func (o *ProxyCertResponse) GetAnycastDnsCertificateUrl() string` + +GetAnycastDnsCertificateUrl returns the AnycastDnsCertificateUrl field if non-nil, zero value otherwise. + +### GetAnycastDnsCertificateUrlOk + +`func (o *ProxyCertResponse) GetAnycastDnsCertificateUrlOk() (*string, bool)` + +GetAnycastDnsCertificateUrlOk returns a tuple with the AnycastDnsCertificateUrl field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAnycastDnsCertificateUrl + +`func (o *ProxyCertResponse) SetAnycastDnsCertificateUrl(v string)` + +SetAnycastDnsCertificateUrl sets AnycastDnsCertificateUrl field to given value. + +### HasAnycastDnsCertificateUrl + +`func (o *ProxyCertResponse) HasAnycastDnsCertificateUrl() bool` + +HasAnycastDnsCertificateUrl returns a boolean if a field has been set. + +### GetCertificateUrl + +`func (o *ProxyCertResponse) GetCertificateUrl() string` + +GetCertificateUrl returns the CertificateUrl field if non-nil, zero value otherwise. + +### GetCertificateUrlOk + +`func (o *ProxyCertResponse) GetCertificateUrlOk() (*string, bool)` + +GetCertificateUrlOk returns a tuple with the CertificateUrl field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCertificateUrl + +`func (o *ProxyCertResponse) SetCertificateUrl(v string)` + +SetCertificateUrl sets CertificateUrl field to given value. + +### HasCertificateUrl + +`func (o *ProxyCertResponse) HasCertificateUrl() bool` + +HasCertificateUrl 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/redirect/docs/RedirectPage.md b/redirect/docs/RedirectPage.md new file mode 100644 index 0000000..6520300 --- /dev/null +++ b/redirect/docs/RedirectPage.md @@ -0,0 +1,212 @@ +# RedirectPage + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Content** | Pointer to **string** | The content of the redirect page for the \"custom\" redirect type. | [optional] +**CreatedTime** | Pointer to **time.Time** | The time when this Redirect Page object was created. | [optional] [readonly] +**RedirectIpAddress** | Pointer to **string** | The redirect IPv4 address. | [optional] +**RedirectIpv6Address** | Pointer to **string** | The redirect IPv6 address. | [optional] +**Smart** | Pointer to **bool** | Whether the redirect type is smart | [optional] +**Type** | Pointer to **string** | The type of the redirect page that can be \"default\" or \"custom\". | [optional] +**UpdatedTime** | Pointer to **time.Time** | The time when this Redirect Page object was last updated. | [optional] [readonly] + +## Methods + +### NewRedirectPage + +`func NewRedirectPage() *RedirectPage` + +NewRedirectPage instantiates a new RedirectPage 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 + +### NewRedirectPageWithDefaults + +`func NewRedirectPageWithDefaults() *RedirectPage` + +NewRedirectPageWithDefaults instantiates a new RedirectPage 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 + +### GetContent + +`func (o *RedirectPage) GetContent() string` + +GetContent returns the Content field if non-nil, zero value otherwise. + +### GetContentOk + +`func (o *RedirectPage) GetContentOk() (*string, bool)` + +GetContentOk returns a tuple with the Content field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetContent + +`func (o *RedirectPage) SetContent(v string)` + +SetContent sets Content field to given value. + +### HasContent + +`func (o *RedirectPage) HasContent() bool` + +HasContent returns a boolean if a field has been set. + +### GetCreatedTime + +`func (o *RedirectPage) GetCreatedTime() time.Time` + +GetCreatedTime returns the CreatedTime field if non-nil, zero value otherwise. + +### GetCreatedTimeOk + +`func (o *RedirectPage) GetCreatedTimeOk() (*time.Time, bool)` + +GetCreatedTimeOk returns a tuple with the CreatedTime field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreatedTime + +`func (o *RedirectPage) SetCreatedTime(v time.Time)` + +SetCreatedTime sets CreatedTime field to given value. + +### HasCreatedTime + +`func (o *RedirectPage) HasCreatedTime() bool` + +HasCreatedTime returns a boolean if a field has been set. + +### GetRedirectIpAddress + +`func (o *RedirectPage) GetRedirectIpAddress() string` + +GetRedirectIpAddress returns the RedirectIpAddress field if non-nil, zero value otherwise. + +### GetRedirectIpAddressOk + +`func (o *RedirectPage) GetRedirectIpAddressOk() (*string, bool)` + +GetRedirectIpAddressOk returns a tuple with the RedirectIpAddress field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRedirectIpAddress + +`func (o *RedirectPage) SetRedirectIpAddress(v string)` + +SetRedirectIpAddress sets RedirectIpAddress field to given value. + +### HasRedirectIpAddress + +`func (o *RedirectPage) HasRedirectIpAddress() bool` + +HasRedirectIpAddress returns a boolean if a field has been set. + +### GetRedirectIpv6Address + +`func (o *RedirectPage) GetRedirectIpv6Address() string` + +GetRedirectIpv6Address returns the RedirectIpv6Address field if non-nil, zero value otherwise. + +### GetRedirectIpv6AddressOk + +`func (o *RedirectPage) GetRedirectIpv6AddressOk() (*string, bool)` + +GetRedirectIpv6AddressOk returns a tuple with the RedirectIpv6Address field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRedirectIpv6Address + +`func (o *RedirectPage) SetRedirectIpv6Address(v string)` + +SetRedirectIpv6Address sets RedirectIpv6Address field to given value. + +### HasRedirectIpv6Address + +`func (o *RedirectPage) HasRedirectIpv6Address() bool` + +HasRedirectIpv6Address returns a boolean if a field has been set. + +### GetSmart + +`func (o *RedirectPage) GetSmart() bool` + +GetSmart returns the Smart field if non-nil, zero value otherwise. + +### GetSmartOk + +`func (o *RedirectPage) GetSmartOk() (*bool, bool)` + +GetSmartOk returns a tuple with the Smart field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSmart + +`func (o *RedirectPage) SetSmart(v bool)` + +SetSmart sets Smart field to given value. + +### HasSmart + +`func (o *RedirectPage) HasSmart() bool` + +HasSmart returns a boolean if a field has been set. + +### GetType + +`func (o *RedirectPage) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *RedirectPage) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *RedirectPage) SetType(v string)` + +SetType sets Type field to given value. + +### HasType + +`func (o *RedirectPage) HasType() bool` + +HasType returns a boolean if a field has been set. + +### GetUpdatedTime + +`func (o *RedirectPage) GetUpdatedTime() time.Time` + +GetUpdatedTime returns the UpdatedTime field if non-nil, zero value otherwise. + +### GetUpdatedTimeOk + +`func (o *RedirectPage) GetUpdatedTimeOk() (*time.Time, bool)` + +GetUpdatedTimeOk returns a tuple with the UpdatedTime field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUpdatedTime + +`func (o *RedirectPage) SetUpdatedTime(v time.Time)` + +SetUpdatedTime sets UpdatedTime field to given value. + +### HasUpdatedTime + +`func (o *RedirectPage) HasUpdatedTime() bool` + +HasUpdatedTime 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/redirect/docs/RedirectPageAPI.md b/redirect/docs/RedirectPageAPI.md new file mode 100644 index 0000000..714fb7b --- /dev/null +++ b/redirect/docs/RedirectPageAPI.md @@ -0,0 +1,142 @@ +# RedirectPageAPI + +All URIs are relative to *https://csp.infoblox.com/api/atcfw/v1* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ReadRedirectPage**](RedirectPageAPI.md#ReadRedirectPage) | **Get** /redirect_page | Read Redirect Page. +[**UpdateRedirectPage**](RedirectPageAPI.md#UpdateRedirectPage) | **Put** /redirect_page | Update Redirect Page. + + + +## ReadRedirectPage + +> RedirectPageReadResponse ReadRedirectPage(ctx).Filter(filter).Fields(fields).Execute() + +Read Redirect Page. + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + + "github.com/infobloxopen/bloxone-go-client/redirect" +) + +func main() { + + apiClient := redirect.NewAPIClient() + resp, r, err := apiClient.RedirectPageAPI.ReadRedirectPage(context.Background()).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `RedirectPageAPI.ReadRedirectPage``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ReadRedirectPage`: RedirectPageReadResponse + fmt.Fprintf(os.Stdout, "Response from `RedirectPageAPI.ReadRedirectPage`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a `RedirectPageAPIReadRedirectPageRequest` 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 | | +**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 + +[**RedirectPageReadResponse**](RedirectPageReadResponse.md) + +### Authorization + +No authorization required + +### 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) + + +## UpdateRedirectPage + +> RedirectPageUpdateResponse UpdateRedirectPage(ctx).Body(body).Execute() + +Update Redirect Page. + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + + "github.com/infobloxopen/bloxone-go-client/redirect" +) + +func main() { + body := *redirect.NewUpdateRedirectPagePayload() // UpdateRedirectPagePayload | The Redirect Page object. + + apiClient := redirect.NewAPIClient() + resp, r, err := apiClient.RedirectPageAPI.UpdateRedirectPage(context.Background()).Body(body).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `RedirectPageAPI.UpdateRedirectPage``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `UpdateRedirectPage`: RedirectPageUpdateResponse + fmt.Fprintf(os.Stdout, "Response from `RedirectPageAPI.UpdateRedirectPage`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a `RedirectPageAPIUpdateRedirectPageRequest` struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**body** | [**UpdateRedirectPagePayload**](UpdateRedirectPagePayload.md) | The Redirect Page object. | + +### Return type + +[**RedirectPageUpdateResponse**](RedirectPageUpdateResponse.md) + +### Authorization + +No authorization required + +### 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/redirect/docs/RedirectPageReadResponse.md b/redirect/docs/RedirectPageReadResponse.md new file mode 100644 index 0000000..c421a4e --- /dev/null +++ b/redirect/docs/RedirectPageReadResponse.md @@ -0,0 +1,56 @@ +# RedirectPageReadResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Results** | Pointer to [**RedirectPage**](RedirectPage.md) | | [optional] + +## Methods + +### NewRedirectPageReadResponse + +`func NewRedirectPageReadResponse() *RedirectPageReadResponse` + +NewRedirectPageReadResponse instantiates a new RedirectPageReadResponse 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 + +### NewRedirectPageReadResponseWithDefaults + +`func NewRedirectPageReadResponseWithDefaults() *RedirectPageReadResponse` + +NewRedirectPageReadResponseWithDefaults instantiates a new RedirectPageReadResponse 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 *RedirectPageReadResponse) GetResults() RedirectPage` + +GetResults returns the Results field if non-nil, zero value otherwise. + +### GetResultsOk + +`func (o *RedirectPageReadResponse) GetResultsOk() (*RedirectPage, 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 *RedirectPageReadResponse) SetResults(v RedirectPage)` + +SetResults sets Results field to given value. + +### HasResults + +`func (o *RedirectPageReadResponse) 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/redirect/docs/RedirectPageUpdateRedirectPage400Response.md b/redirect/docs/RedirectPageUpdateRedirectPage400Response.md new file mode 100644 index 0000000..cd4e10b --- /dev/null +++ b/redirect/docs/RedirectPageUpdateRedirectPage400Response.md @@ -0,0 +1,56 @@ +# RedirectPageUpdateRedirectPage400Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Error** | Pointer to [**RedirectPageUpdateRedirectPage400ResponseError**](RedirectPageUpdateRedirectPage400ResponseError.md) | | [optional] + +## Methods + +### NewRedirectPageUpdateRedirectPage400Response + +`func NewRedirectPageUpdateRedirectPage400Response() *RedirectPageUpdateRedirectPage400Response` + +NewRedirectPageUpdateRedirectPage400Response instantiates a new RedirectPageUpdateRedirectPage400Response 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 + +### NewRedirectPageUpdateRedirectPage400ResponseWithDefaults + +`func NewRedirectPageUpdateRedirectPage400ResponseWithDefaults() *RedirectPageUpdateRedirectPage400Response` + +NewRedirectPageUpdateRedirectPage400ResponseWithDefaults instantiates a new RedirectPageUpdateRedirectPage400Response 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 + +### GetError + +`func (o *RedirectPageUpdateRedirectPage400Response) GetError() RedirectPageUpdateRedirectPage400ResponseError` + +GetError returns the Error field if non-nil, zero value otherwise. + +### GetErrorOk + +`func (o *RedirectPageUpdateRedirectPage400Response) GetErrorOk() (*RedirectPageUpdateRedirectPage400ResponseError, bool)` + +GetErrorOk returns a tuple with the Error field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetError + +`func (o *RedirectPageUpdateRedirectPage400Response) SetError(v RedirectPageUpdateRedirectPage400ResponseError)` + +SetError sets Error field to given value. + +### HasError + +`func (o *RedirectPageUpdateRedirectPage400Response) HasError() bool` + +HasError 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/redirect/docs/RedirectPageUpdateRedirectPage400ResponseError.md b/redirect/docs/RedirectPageUpdateRedirectPage400ResponseError.md new file mode 100644 index 0000000..0395064 --- /dev/null +++ b/redirect/docs/RedirectPageUpdateRedirectPage400ResponseError.md @@ -0,0 +1,108 @@ +# RedirectPageUpdateRedirectPage400ResponseError + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Code** | Pointer to **string** | | [optional] +**Message** | Pointer to **string** | | [optional] +**Status** | Pointer to **string** | | [optional] + +## Methods + +### NewRedirectPageUpdateRedirectPage400ResponseError + +`func NewRedirectPageUpdateRedirectPage400ResponseError() *RedirectPageUpdateRedirectPage400ResponseError` + +NewRedirectPageUpdateRedirectPage400ResponseError instantiates a new RedirectPageUpdateRedirectPage400ResponseError 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 + +### NewRedirectPageUpdateRedirectPage400ResponseErrorWithDefaults + +`func NewRedirectPageUpdateRedirectPage400ResponseErrorWithDefaults() *RedirectPageUpdateRedirectPage400ResponseError` + +NewRedirectPageUpdateRedirectPage400ResponseErrorWithDefaults instantiates a new RedirectPageUpdateRedirectPage400ResponseError 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 + +### GetCode + +`func (o *RedirectPageUpdateRedirectPage400ResponseError) GetCode() string` + +GetCode returns the Code field if non-nil, zero value otherwise. + +### GetCodeOk + +`func (o *RedirectPageUpdateRedirectPage400ResponseError) GetCodeOk() (*string, bool)` + +GetCodeOk returns a tuple with the Code field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCode + +`func (o *RedirectPageUpdateRedirectPage400ResponseError) SetCode(v string)` + +SetCode sets Code field to given value. + +### HasCode + +`func (o *RedirectPageUpdateRedirectPage400ResponseError) HasCode() bool` + +HasCode returns a boolean if a field has been set. + +### GetMessage + +`func (o *RedirectPageUpdateRedirectPage400ResponseError) GetMessage() string` + +GetMessage returns the Message field if non-nil, zero value otherwise. + +### GetMessageOk + +`func (o *RedirectPageUpdateRedirectPage400ResponseError) 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 *RedirectPageUpdateRedirectPage400ResponseError) SetMessage(v string)` + +SetMessage sets Message field to given value. + +### HasMessage + +`func (o *RedirectPageUpdateRedirectPage400ResponseError) HasMessage() bool` + +HasMessage returns a boolean if a field has been set. + +### GetStatus + +`func (o *RedirectPageUpdateRedirectPage400ResponseError) GetStatus() string` + +GetStatus returns the Status field if non-nil, zero value otherwise. + +### GetStatusOk + +`func (o *RedirectPageUpdateRedirectPage400ResponseError) GetStatusOk() (*string, bool)` + +GetStatusOk returns a tuple with the Status field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetStatus + +`func (o *RedirectPageUpdateRedirectPage400ResponseError) SetStatus(v string)` + +SetStatus sets Status field to given value. + +### HasStatus + +`func (o *RedirectPageUpdateRedirectPage400ResponseError) HasStatus() bool` + +HasStatus 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/redirect/docs/RedirectPageUpdateResponse.md b/redirect/docs/RedirectPageUpdateResponse.md new file mode 100644 index 0000000..2d900a1 --- /dev/null +++ b/redirect/docs/RedirectPageUpdateResponse.md @@ -0,0 +1,56 @@ +# RedirectPageUpdateResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Results** | Pointer to [**RedirectPage**](RedirectPage.md) | | [optional] + +## Methods + +### NewRedirectPageUpdateResponse + +`func NewRedirectPageUpdateResponse() *RedirectPageUpdateResponse` + +NewRedirectPageUpdateResponse instantiates a new RedirectPageUpdateResponse 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 + +### NewRedirectPageUpdateResponseWithDefaults + +`func NewRedirectPageUpdateResponseWithDefaults() *RedirectPageUpdateResponse` + +NewRedirectPageUpdateResponseWithDefaults instantiates a new RedirectPageUpdateResponse 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 *RedirectPageUpdateResponse) GetResults() RedirectPage` + +GetResults returns the Results field if non-nil, zero value otherwise. + +### GetResultsOk + +`func (o *RedirectPageUpdateResponse) GetResultsOk() (*RedirectPage, 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 *RedirectPageUpdateResponse) SetResults(v RedirectPage)` + +SetResults sets Results field to given value. + +### HasResults + +`func (o *RedirectPageUpdateResponse) 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/redirect/docs/UpdateRedirectPagePayload.md b/redirect/docs/UpdateRedirectPagePayload.md new file mode 100644 index 0000000..bc4cb40 --- /dev/null +++ b/redirect/docs/UpdateRedirectPagePayload.md @@ -0,0 +1,160 @@ +# UpdateRedirectPagePayload + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Content** | Pointer to **string** | The content of the redirect page for the \"custom\" redirect type. | [optional] +**RedirectIpAddress** | Pointer to **string** | The redirect IPv4 address. | [optional] +**RedirectIpv6Address** | Pointer to **string** | The redirect IPv6 address. | [optional] +**Smart** | Pointer to **bool** | Change the redirect page from non-proxy (smart == false) to proxy (smart) | [optional] +**Type** | Pointer to **string** | The type of the redirect page that can be \"default\" or \"custom\". | [optional] + +## Methods + +### NewUpdateRedirectPagePayload + +`func NewUpdateRedirectPagePayload() *UpdateRedirectPagePayload` + +NewUpdateRedirectPagePayload instantiates a new UpdateRedirectPagePayload 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 + +### NewUpdateRedirectPagePayloadWithDefaults + +`func NewUpdateRedirectPagePayloadWithDefaults() *UpdateRedirectPagePayload` + +NewUpdateRedirectPagePayloadWithDefaults instantiates a new UpdateRedirectPagePayload 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 + +### GetContent + +`func (o *UpdateRedirectPagePayload) GetContent() string` + +GetContent returns the Content field if non-nil, zero value otherwise. + +### GetContentOk + +`func (o *UpdateRedirectPagePayload) GetContentOk() (*string, bool)` + +GetContentOk returns a tuple with the Content field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetContent + +`func (o *UpdateRedirectPagePayload) SetContent(v string)` + +SetContent sets Content field to given value. + +### HasContent + +`func (o *UpdateRedirectPagePayload) HasContent() bool` + +HasContent returns a boolean if a field has been set. + +### GetRedirectIpAddress + +`func (o *UpdateRedirectPagePayload) GetRedirectIpAddress() string` + +GetRedirectIpAddress returns the RedirectIpAddress field if non-nil, zero value otherwise. + +### GetRedirectIpAddressOk + +`func (o *UpdateRedirectPagePayload) GetRedirectIpAddressOk() (*string, bool)` + +GetRedirectIpAddressOk returns a tuple with the RedirectIpAddress field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRedirectIpAddress + +`func (o *UpdateRedirectPagePayload) SetRedirectIpAddress(v string)` + +SetRedirectIpAddress sets RedirectIpAddress field to given value. + +### HasRedirectIpAddress + +`func (o *UpdateRedirectPagePayload) HasRedirectIpAddress() bool` + +HasRedirectIpAddress returns a boolean if a field has been set. + +### GetRedirectIpv6Address + +`func (o *UpdateRedirectPagePayload) GetRedirectIpv6Address() string` + +GetRedirectIpv6Address returns the RedirectIpv6Address field if non-nil, zero value otherwise. + +### GetRedirectIpv6AddressOk + +`func (o *UpdateRedirectPagePayload) GetRedirectIpv6AddressOk() (*string, bool)` + +GetRedirectIpv6AddressOk returns a tuple with the RedirectIpv6Address field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRedirectIpv6Address + +`func (o *UpdateRedirectPagePayload) SetRedirectIpv6Address(v string)` + +SetRedirectIpv6Address sets RedirectIpv6Address field to given value. + +### HasRedirectIpv6Address + +`func (o *UpdateRedirectPagePayload) HasRedirectIpv6Address() bool` + +HasRedirectIpv6Address returns a boolean if a field has been set. + +### GetSmart + +`func (o *UpdateRedirectPagePayload) GetSmart() bool` + +GetSmart returns the Smart field if non-nil, zero value otherwise. + +### GetSmartOk + +`func (o *UpdateRedirectPagePayload) GetSmartOk() (*bool, bool)` + +GetSmartOk returns a tuple with the Smart field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSmart + +`func (o *UpdateRedirectPagePayload) SetSmart(v bool)` + +SetSmart sets Smart field to given value. + +### HasSmart + +`func (o *UpdateRedirectPagePayload) HasSmart() bool` + +HasSmart returns a boolean if a field has been set. + +### GetType + +`func (o *UpdateRedirectPagePayload) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *UpdateRedirectPagePayload) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *UpdateRedirectPagePayload) SetType(v string)` + +SetType sets Type field to given value. + +### HasType + +`func (o *UpdateRedirectPagePayload) HasType() bool` + +HasType 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/redirect/model_certificate_get_proxy_certificates_500_response.go b/redirect/model_certificate_get_proxy_certificates_500_response.go new file mode 100644 index 0000000..adf19f8 --- /dev/null +++ b/redirect/model_certificate_get_proxy_certificates_500_response.go @@ -0,0 +1,153 @@ +/* +BloxOne Redirect API + +You can configure BloxOne Threat Defense Cloud to redirect traffic to the Infoblox server that displays the default or customized redirect page. You can redirect traffic to a custom destination using custom redirects. + +API version: v1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package redirect + +import ( + "encoding/json" +) + +// checks if the CertificateGetProxyCertificates500Response type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CertificateGetProxyCertificates500Response{} + +// CertificateGetProxyCertificates500Response struct for CertificateGetProxyCertificates500Response +type CertificateGetProxyCertificates500Response struct { + Error *CertificateGetProxyCertificates500ResponseError `json:"error,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _CertificateGetProxyCertificates500Response CertificateGetProxyCertificates500Response + +// NewCertificateGetProxyCertificates500Response instantiates a new CertificateGetProxyCertificates500Response 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 NewCertificateGetProxyCertificates500Response() *CertificateGetProxyCertificates500Response { + this := CertificateGetProxyCertificates500Response{} + return &this +} + +// NewCertificateGetProxyCertificates500ResponseWithDefaults instantiates a new CertificateGetProxyCertificates500Response 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 NewCertificateGetProxyCertificates500ResponseWithDefaults() *CertificateGetProxyCertificates500Response { + this := CertificateGetProxyCertificates500Response{} + return &this +} + +// GetError returns the Error field value if set, zero value otherwise. +func (o *CertificateGetProxyCertificates500Response) GetError() CertificateGetProxyCertificates500ResponseError { + if o == nil || IsNil(o.Error) { + var ret CertificateGetProxyCertificates500ResponseError + return ret + } + return *o.Error +} + +// GetErrorOk returns a tuple with the Error field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CertificateGetProxyCertificates500Response) GetErrorOk() (*CertificateGetProxyCertificates500ResponseError, bool) { + if o == nil || IsNil(o.Error) { + return nil, false + } + return o.Error, true +} + +// HasError returns a boolean if a field has been set. +func (o *CertificateGetProxyCertificates500Response) HasError() bool { + if o != nil && !IsNil(o.Error) { + return true + } + + return false +} + +// SetError gets a reference to the given CertificateGetProxyCertificates500ResponseError and assigns it to the Error field. +func (o *CertificateGetProxyCertificates500Response) SetError(v CertificateGetProxyCertificates500ResponseError) { + o.Error = &v +} + +func (o CertificateGetProxyCertificates500Response) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CertificateGetProxyCertificates500Response) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Error) { + toSerialize["error"] = o.Error + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *CertificateGetProxyCertificates500Response) UnmarshalJSON(data []byte) (err error) { + varCertificateGetProxyCertificates500Response := _CertificateGetProxyCertificates500Response{} + + err = json.Unmarshal(data, &varCertificateGetProxyCertificates500Response) + + if err != nil { + return err + } + + *o = CertificateGetProxyCertificates500Response(varCertificateGetProxyCertificates500Response) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "error") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableCertificateGetProxyCertificates500Response struct { + value *CertificateGetProxyCertificates500Response + isSet bool +} + +func (v NullableCertificateGetProxyCertificates500Response) Get() *CertificateGetProxyCertificates500Response { + return v.value +} + +func (v *NullableCertificateGetProxyCertificates500Response) Set(val *CertificateGetProxyCertificates500Response) { + v.value = val + v.isSet = true +} + +func (v NullableCertificateGetProxyCertificates500Response) IsSet() bool { + return v.isSet +} + +func (v *NullableCertificateGetProxyCertificates500Response) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCertificateGetProxyCertificates500Response(val *CertificateGetProxyCertificates500Response) *NullableCertificateGetProxyCertificates500Response { + return &NullableCertificateGetProxyCertificates500Response{value: val, isSet: true} +} + +func (v NullableCertificateGetProxyCertificates500Response) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCertificateGetProxyCertificates500Response) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/redirect/model_certificate_get_proxy_certificates_500_response_error.go b/redirect/model_certificate_get_proxy_certificates_500_response_error.go new file mode 100644 index 0000000..7e52d6b --- /dev/null +++ b/redirect/model_certificate_get_proxy_certificates_500_response_error.go @@ -0,0 +1,227 @@ +/* +BloxOne Redirect API + +You can configure BloxOne Threat Defense Cloud to redirect traffic to the Infoblox server that displays the default or customized redirect page. You can redirect traffic to a custom destination using custom redirects. + +API version: v1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package redirect + +import ( + "encoding/json" +) + +// checks if the CertificateGetProxyCertificates500ResponseError type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CertificateGetProxyCertificates500ResponseError{} + +// CertificateGetProxyCertificates500ResponseError struct for CertificateGetProxyCertificates500ResponseError +type CertificateGetProxyCertificates500ResponseError struct { + Code *string `json:"code,omitempty"` + Message *string `json:"message,omitempty"` + Status *string `json:"status,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _CertificateGetProxyCertificates500ResponseError CertificateGetProxyCertificates500ResponseError + +// NewCertificateGetProxyCertificates500ResponseError instantiates a new CertificateGetProxyCertificates500ResponseError 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 NewCertificateGetProxyCertificates500ResponseError() *CertificateGetProxyCertificates500ResponseError { + this := CertificateGetProxyCertificates500ResponseError{} + return &this +} + +// NewCertificateGetProxyCertificates500ResponseErrorWithDefaults instantiates a new CertificateGetProxyCertificates500ResponseError 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 NewCertificateGetProxyCertificates500ResponseErrorWithDefaults() *CertificateGetProxyCertificates500ResponseError { + this := CertificateGetProxyCertificates500ResponseError{} + return &this +} + +// GetCode returns the Code field value if set, zero value otherwise. +func (o *CertificateGetProxyCertificates500ResponseError) GetCode() string { + if o == nil || IsNil(o.Code) { + var ret string + return ret + } + return *o.Code +} + +// GetCodeOk returns a tuple with the Code field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CertificateGetProxyCertificates500ResponseError) GetCodeOk() (*string, bool) { + if o == nil || IsNil(o.Code) { + return nil, false + } + return o.Code, true +} + +// HasCode returns a boolean if a field has been set. +func (o *CertificateGetProxyCertificates500ResponseError) HasCode() bool { + if o != nil && !IsNil(o.Code) { + return true + } + + return false +} + +// SetCode gets a reference to the given string and assigns it to the Code field. +func (o *CertificateGetProxyCertificates500ResponseError) SetCode(v string) { + o.Code = &v +} + +// GetMessage returns the Message field value if set, zero value otherwise. +func (o *CertificateGetProxyCertificates500ResponseError) 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 *CertificateGetProxyCertificates500ResponseError) 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 *CertificateGetProxyCertificates500ResponseError) 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 *CertificateGetProxyCertificates500ResponseError) SetMessage(v string) { + o.Message = &v +} + +// GetStatus returns the Status field value if set, zero value otherwise. +func (o *CertificateGetProxyCertificates500ResponseError) GetStatus() string { + if o == nil || IsNil(o.Status) { + var ret string + return ret + } + return *o.Status +} + +// GetStatusOk returns a tuple with the Status field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CertificateGetProxyCertificates500ResponseError) GetStatusOk() (*string, bool) { + if o == nil || IsNil(o.Status) { + return nil, false + } + return o.Status, true +} + +// HasStatus returns a boolean if a field has been set. +func (o *CertificateGetProxyCertificates500ResponseError) HasStatus() bool { + if o != nil && !IsNil(o.Status) { + return true + } + + return false +} + +// SetStatus gets a reference to the given string and assigns it to the Status field. +func (o *CertificateGetProxyCertificates500ResponseError) SetStatus(v string) { + o.Status = &v +} + +func (o CertificateGetProxyCertificates500ResponseError) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CertificateGetProxyCertificates500ResponseError) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Code) { + toSerialize["code"] = o.Code + } + if !IsNil(o.Message) { + toSerialize["message"] = o.Message + } + if !IsNil(o.Status) { + toSerialize["status"] = o.Status + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *CertificateGetProxyCertificates500ResponseError) UnmarshalJSON(data []byte) (err error) { + varCertificateGetProxyCertificates500ResponseError := _CertificateGetProxyCertificates500ResponseError{} + + err = json.Unmarshal(data, &varCertificateGetProxyCertificates500ResponseError) + + if err != nil { + return err + } + + *o = CertificateGetProxyCertificates500ResponseError(varCertificateGetProxyCertificates500ResponseError) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "code") + delete(additionalProperties, "message") + delete(additionalProperties, "status") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableCertificateGetProxyCertificates500ResponseError struct { + value *CertificateGetProxyCertificates500ResponseError + isSet bool +} + +func (v NullableCertificateGetProxyCertificates500ResponseError) Get() *CertificateGetProxyCertificates500ResponseError { + return v.value +} + +func (v *NullableCertificateGetProxyCertificates500ResponseError) Set(val *CertificateGetProxyCertificates500ResponseError) { + v.value = val + v.isSet = true +} + +func (v NullableCertificateGetProxyCertificates500ResponseError) IsSet() bool { + return v.isSet +} + +func (v *NullableCertificateGetProxyCertificates500ResponseError) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCertificateGetProxyCertificates500ResponseError(val *CertificateGetProxyCertificates500ResponseError) *NullableCertificateGetProxyCertificates500ResponseError { + return &NullableCertificateGetProxyCertificates500ResponseError{value: val, isSet: true} +} + +func (v NullableCertificateGetProxyCertificates500ResponseError) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCertificateGetProxyCertificates500ResponseError) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/redirect/model_custom_redirect.go b/redirect/model_custom_redirect.go new file mode 100644 index 0000000..5a66660 --- /dev/null +++ b/redirect/model_custom_redirect.go @@ -0,0 +1,383 @@ +/* +BloxOne Redirect API + +You can configure BloxOne Threat Defense Cloud to redirect traffic to the Infoblox server that displays the default or customized redirect page. You can redirect traffic to a custom destination using custom redirects. + +API version: v1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package redirect + +import ( + "encoding/json" + "time" +) + +// checks if the CustomRedirect type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CustomRedirect{} + +// CustomRedirect The Custom Redirect object. You can configure BloxOne Cloud to redirect traffic to the Infoblox redirect page or a custom redirect destination. BloxOne Cloud allows you to apply multiple redirect actions and integrate BloxOne Cloud with third-party proxies, secure web gateways, blackholes, honeypots and sinkhole solutions. +type CustomRedirect struct { + // The time when this Custom Redirect object was created. + CreatedTime *time.Time `json:"created_time,omitempty"` + // The list of csv custom IPv4/IPv6 or a single domain redirect address. + Data *string `json:"data,omitempty"` + // The Custom Redirect object identifier. + Id *int32 `json:"id,omitempty"` + // The name of the custom redirect. + Name *string `json:"name,omitempty"` + // The list of the security policy identifiers with which the named list is associated. + PolicyIds []int32 `json:"policy_ids,omitempty"` + // The list of the security policy names with which the custom redirect is associated. + PolicyNames []string `json:"policy_names,omitempty"` + // The time when this Custom Redirect object was last updated. + UpdatedTime *time.Time `json:"updated_time,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _CustomRedirect CustomRedirect + +// NewCustomRedirect instantiates a new CustomRedirect 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 NewCustomRedirect() *CustomRedirect { + this := CustomRedirect{} + return &this +} + +// NewCustomRedirectWithDefaults instantiates a new CustomRedirect 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 NewCustomRedirectWithDefaults() *CustomRedirect { + this := CustomRedirect{} + return &this +} + +// GetCreatedTime returns the CreatedTime field value if set, zero value otherwise. +func (o *CustomRedirect) GetCreatedTime() time.Time { + if o == nil || IsNil(o.CreatedTime) { + var ret time.Time + return ret + } + return *o.CreatedTime +} + +// GetCreatedTimeOk returns a tuple with the CreatedTime field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CustomRedirect) GetCreatedTimeOk() (*time.Time, bool) { + if o == nil || IsNil(o.CreatedTime) { + return nil, false + } + return o.CreatedTime, true +} + +// HasCreatedTime returns a boolean if a field has been set. +func (o *CustomRedirect) HasCreatedTime() bool { + if o != nil && !IsNil(o.CreatedTime) { + return true + } + + return false +} + +// SetCreatedTime gets a reference to the given time.Time and assigns it to the CreatedTime field. +func (o *CustomRedirect) SetCreatedTime(v time.Time) { + o.CreatedTime = &v +} + +// GetData returns the Data field value if set, zero value otherwise. +func (o *CustomRedirect) GetData() string { + if o == nil || IsNil(o.Data) { + var ret string + return ret + } + return *o.Data +} + +// GetDataOk returns a tuple with the Data field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CustomRedirect) GetDataOk() (*string, bool) { + if o == nil || IsNil(o.Data) { + return nil, false + } + return o.Data, true +} + +// HasData returns a boolean if a field has been set. +func (o *CustomRedirect) HasData() bool { + if o != nil && !IsNil(o.Data) { + return true + } + + return false +} + +// SetData gets a reference to the given string and assigns it to the Data field. +func (o *CustomRedirect) SetData(v string) { + o.Data = &v +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *CustomRedirect) GetId() int32 { + if o == nil || IsNil(o.Id) { + var ret int32 + 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 *CustomRedirect) GetIdOk() (*int32, 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 *CustomRedirect) HasId() bool { + if o != nil && !IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given int32 and assigns it to the Id field. +func (o *CustomRedirect) SetId(v int32) { + o.Id = &v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *CustomRedirect) 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 *CustomRedirect) 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 *CustomRedirect) 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 *CustomRedirect) SetName(v string) { + o.Name = &v +} + +// GetPolicyIds returns the PolicyIds field value if set, zero value otherwise. +func (o *CustomRedirect) GetPolicyIds() []int32 { + if o == nil || IsNil(o.PolicyIds) { + var ret []int32 + return ret + } + return o.PolicyIds +} + +// GetPolicyIdsOk returns a tuple with the PolicyIds field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CustomRedirect) GetPolicyIdsOk() ([]int32, bool) { + if o == nil || IsNil(o.PolicyIds) { + return nil, false + } + return o.PolicyIds, true +} + +// HasPolicyIds returns a boolean if a field has been set. +func (o *CustomRedirect) HasPolicyIds() bool { + if o != nil && !IsNil(o.PolicyIds) { + return true + } + + return false +} + +// SetPolicyIds gets a reference to the given []int32 and assigns it to the PolicyIds field. +func (o *CustomRedirect) SetPolicyIds(v []int32) { + o.PolicyIds = v +} + +// GetPolicyNames returns the PolicyNames field value if set, zero value otherwise. +func (o *CustomRedirect) GetPolicyNames() []string { + if o == nil || IsNil(o.PolicyNames) { + var ret []string + return ret + } + return o.PolicyNames +} + +// GetPolicyNamesOk returns a tuple with the PolicyNames field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CustomRedirect) GetPolicyNamesOk() ([]string, bool) { + if o == nil || IsNil(o.PolicyNames) { + return nil, false + } + return o.PolicyNames, true +} + +// HasPolicyNames returns a boolean if a field has been set. +func (o *CustomRedirect) HasPolicyNames() bool { + if o != nil && !IsNil(o.PolicyNames) { + return true + } + + return false +} + +// SetPolicyNames gets a reference to the given []string and assigns it to the PolicyNames field. +func (o *CustomRedirect) SetPolicyNames(v []string) { + o.PolicyNames = v +} + +// GetUpdatedTime returns the UpdatedTime field value if set, zero value otherwise. +func (o *CustomRedirect) GetUpdatedTime() time.Time { + if o == nil || IsNil(o.UpdatedTime) { + var ret time.Time + return ret + } + return *o.UpdatedTime +} + +// GetUpdatedTimeOk returns a tuple with the UpdatedTime field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CustomRedirect) GetUpdatedTimeOk() (*time.Time, bool) { + if o == nil || IsNil(o.UpdatedTime) { + return nil, false + } + return o.UpdatedTime, true +} + +// HasUpdatedTime returns a boolean if a field has been set. +func (o *CustomRedirect) HasUpdatedTime() bool { + if o != nil && !IsNil(o.UpdatedTime) { + return true + } + + return false +} + +// SetUpdatedTime gets a reference to the given time.Time and assigns it to the UpdatedTime field. +func (o *CustomRedirect) SetUpdatedTime(v time.Time) { + o.UpdatedTime = &v +} + +func (o CustomRedirect) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CustomRedirect) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.CreatedTime) { + toSerialize["created_time"] = o.CreatedTime + } + if !IsNil(o.Data) { + toSerialize["data"] = o.Data + } + if !IsNil(o.Id) { + toSerialize["id"] = o.Id + } + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.PolicyIds) { + toSerialize["policy_ids"] = o.PolicyIds + } + if !IsNil(o.PolicyNames) { + toSerialize["policy_names"] = o.PolicyNames + } + if !IsNil(o.UpdatedTime) { + toSerialize["updated_time"] = o.UpdatedTime + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *CustomRedirect) UnmarshalJSON(data []byte) (err error) { + varCustomRedirect := _CustomRedirect{} + + err = json.Unmarshal(data, &varCustomRedirect) + + if err != nil { + return err + } + + *o = CustomRedirect(varCustomRedirect) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "created_time") + delete(additionalProperties, "data") + delete(additionalProperties, "id") + delete(additionalProperties, "name") + delete(additionalProperties, "policy_ids") + delete(additionalProperties, "policy_names") + delete(additionalProperties, "updated_time") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableCustomRedirect struct { + value *CustomRedirect + isSet bool +} + +func (v NullableCustomRedirect) Get() *CustomRedirect { + return v.value +} + +func (v *NullableCustomRedirect) Set(val *CustomRedirect) { + v.value = val + v.isSet = true +} + +func (v NullableCustomRedirect) IsSet() bool { + return v.isSet +} + +func (v *NullableCustomRedirect) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCustomRedirect(val *CustomRedirect) *NullableCustomRedirect { + return &NullableCustomRedirect{value: val, isSet: true} +} + +func (v NullableCustomRedirect) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCustomRedirect) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/redirect/model_custom_redirect_create_response.go b/redirect/model_custom_redirect_create_response.go new file mode 100644 index 0000000..60061e1 --- /dev/null +++ b/redirect/model_custom_redirect_create_response.go @@ -0,0 +1,153 @@ +/* +BloxOne Redirect API + +You can configure BloxOne Threat Defense Cloud to redirect traffic to the Infoblox server that displays the default or customized redirect page. You can redirect traffic to a custom destination using custom redirects. + +API version: v1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package redirect + +import ( + "encoding/json" +) + +// checks if the CustomRedirectCreateResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CustomRedirectCreateResponse{} + +// CustomRedirectCreateResponse The Custom Redirect create response. +type CustomRedirectCreateResponse struct { + Results *CustomRedirect `json:"results,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _CustomRedirectCreateResponse CustomRedirectCreateResponse + +// NewCustomRedirectCreateResponse instantiates a new CustomRedirectCreateResponse 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 NewCustomRedirectCreateResponse() *CustomRedirectCreateResponse { + this := CustomRedirectCreateResponse{} + return &this +} + +// NewCustomRedirectCreateResponseWithDefaults instantiates a new CustomRedirectCreateResponse 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 NewCustomRedirectCreateResponseWithDefaults() *CustomRedirectCreateResponse { + this := CustomRedirectCreateResponse{} + return &this +} + +// GetResults returns the Results field value if set, zero value otherwise. +func (o *CustomRedirectCreateResponse) GetResults() CustomRedirect { + if o == nil || IsNil(o.Results) { + var ret CustomRedirect + 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 *CustomRedirectCreateResponse) GetResultsOk() (*CustomRedirect, 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 *CustomRedirectCreateResponse) HasResults() bool { + if o != nil && !IsNil(o.Results) { + return true + } + + return false +} + +// SetResults gets a reference to the given CustomRedirect and assigns it to the Results field. +func (o *CustomRedirectCreateResponse) SetResults(v CustomRedirect) { + o.Results = &v +} + +func (o CustomRedirectCreateResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CustomRedirectCreateResponse) 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 *CustomRedirectCreateResponse) UnmarshalJSON(data []byte) (err error) { + varCustomRedirectCreateResponse := _CustomRedirectCreateResponse{} + + err = json.Unmarshal(data, &varCustomRedirectCreateResponse) + + if err != nil { + return err + } + + *o = CustomRedirectCreateResponse(varCustomRedirectCreateResponse) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "results") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableCustomRedirectCreateResponse struct { + value *CustomRedirectCreateResponse + isSet bool +} + +func (v NullableCustomRedirectCreateResponse) Get() *CustomRedirectCreateResponse { + return v.value +} + +func (v *NullableCustomRedirectCreateResponse) Set(val *CustomRedirectCreateResponse) { + v.value = val + v.isSet = true +} + +func (v NullableCustomRedirectCreateResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableCustomRedirectCreateResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCustomRedirectCreateResponse(val *CustomRedirectCreateResponse) *NullableCustomRedirectCreateResponse { + return &NullableCustomRedirectCreateResponse{value: val, isSet: true} +} + +func (v NullableCustomRedirectCreateResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCustomRedirectCreateResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/redirect/model_custom_redirect_delete_request.go b/redirect/model_custom_redirect_delete_request.go new file mode 100644 index 0000000..5b4d088 --- /dev/null +++ b/redirect/model_custom_redirect_delete_request.go @@ -0,0 +1,154 @@ +/* +BloxOne Redirect API + +You can configure BloxOne Threat Defense Cloud to redirect traffic to the Infoblox server that displays the default or customized redirect page. You can redirect traffic to a custom destination using custom redirects. + +API version: v1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package redirect + +import ( + "encoding/json" +) + +// checks if the CustomRedirectDeleteRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CustomRedirectDeleteRequest{} + +// CustomRedirectDeleteRequest The Custom Redirect delete request. +type CustomRedirectDeleteRequest struct { + // The list of Custom Redirect object identifiers. + Ids []int32 `json:"ids,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _CustomRedirectDeleteRequest CustomRedirectDeleteRequest + +// NewCustomRedirectDeleteRequest instantiates a new CustomRedirectDeleteRequest 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 NewCustomRedirectDeleteRequest() *CustomRedirectDeleteRequest { + this := CustomRedirectDeleteRequest{} + return &this +} + +// NewCustomRedirectDeleteRequestWithDefaults instantiates a new CustomRedirectDeleteRequest 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 NewCustomRedirectDeleteRequestWithDefaults() *CustomRedirectDeleteRequest { + this := CustomRedirectDeleteRequest{} + return &this +} + +// GetIds returns the Ids field value if set, zero value otherwise. +func (o *CustomRedirectDeleteRequest) GetIds() []int32 { + if o == nil || IsNil(o.Ids) { + var ret []int32 + return ret + } + return o.Ids +} + +// GetIdsOk returns a tuple with the Ids field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CustomRedirectDeleteRequest) GetIdsOk() ([]int32, bool) { + if o == nil || IsNil(o.Ids) { + return nil, false + } + return o.Ids, true +} + +// HasIds returns a boolean if a field has been set. +func (o *CustomRedirectDeleteRequest) HasIds() bool { + if o != nil && !IsNil(o.Ids) { + return true + } + + return false +} + +// SetIds gets a reference to the given []int32 and assigns it to the Ids field. +func (o *CustomRedirectDeleteRequest) SetIds(v []int32) { + o.Ids = v +} + +func (o CustomRedirectDeleteRequest) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CustomRedirectDeleteRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Ids) { + toSerialize["ids"] = o.Ids + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *CustomRedirectDeleteRequest) UnmarshalJSON(data []byte) (err error) { + varCustomRedirectDeleteRequest := _CustomRedirectDeleteRequest{} + + err = json.Unmarshal(data, &varCustomRedirectDeleteRequest) + + if err != nil { + return err + } + + *o = CustomRedirectDeleteRequest(varCustomRedirectDeleteRequest) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "ids") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableCustomRedirectDeleteRequest struct { + value *CustomRedirectDeleteRequest + isSet bool +} + +func (v NullableCustomRedirectDeleteRequest) Get() *CustomRedirectDeleteRequest { + return v.value +} + +func (v *NullableCustomRedirectDeleteRequest) Set(val *CustomRedirectDeleteRequest) { + v.value = val + v.isSet = true +} + +func (v NullableCustomRedirectDeleteRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableCustomRedirectDeleteRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCustomRedirectDeleteRequest(val *CustomRedirectDeleteRequest) *NullableCustomRedirectDeleteRequest { + return &NullableCustomRedirectDeleteRequest{value: val, isSet: true} +} + +func (v NullableCustomRedirectDeleteRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCustomRedirectDeleteRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/redirect/model_custom_redirect_multi_response.go b/redirect/model_custom_redirect_multi_response.go new file mode 100644 index 0000000..dfe5281 --- /dev/null +++ b/redirect/model_custom_redirect_multi_response.go @@ -0,0 +1,154 @@ +/* +BloxOne Redirect API + +You can configure BloxOne Threat Defense Cloud to redirect traffic to the Infoblox server that displays the default or customized redirect page. You can redirect traffic to a custom destination using custom redirects. + +API version: v1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package redirect + +import ( + "encoding/json" +) + +// checks if the CustomRedirectMultiResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CustomRedirectMultiResponse{} + +// CustomRedirectMultiResponse The Custom Redirect list response. +type CustomRedirectMultiResponse struct { + // The list of Custom Redirect objects. + Results []CustomRedirect `json:"results,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _CustomRedirectMultiResponse CustomRedirectMultiResponse + +// NewCustomRedirectMultiResponse instantiates a new CustomRedirectMultiResponse 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 NewCustomRedirectMultiResponse() *CustomRedirectMultiResponse { + this := CustomRedirectMultiResponse{} + return &this +} + +// NewCustomRedirectMultiResponseWithDefaults instantiates a new CustomRedirectMultiResponse 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 NewCustomRedirectMultiResponseWithDefaults() *CustomRedirectMultiResponse { + this := CustomRedirectMultiResponse{} + return &this +} + +// GetResults returns the Results field value if set, zero value otherwise. +func (o *CustomRedirectMultiResponse) GetResults() []CustomRedirect { + if o == nil || IsNil(o.Results) { + var ret []CustomRedirect + 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 *CustomRedirectMultiResponse) GetResultsOk() ([]CustomRedirect, 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 *CustomRedirectMultiResponse) HasResults() bool { + if o != nil && !IsNil(o.Results) { + return true + } + + return false +} + +// SetResults gets a reference to the given []CustomRedirect and assigns it to the Results field. +func (o *CustomRedirectMultiResponse) SetResults(v []CustomRedirect) { + o.Results = v +} + +func (o CustomRedirectMultiResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CustomRedirectMultiResponse) 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 *CustomRedirectMultiResponse) UnmarshalJSON(data []byte) (err error) { + varCustomRedirectMultiResponse := _CustomRedirectMultiResponse{} + + err = json.Unmarshal(data, &varCustomRedirectMultiResponse) + + if err != nil { + return err + } + + *o = CustomRedirectMultiResponse(varCustomRedirectMultiResponse) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "results") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableCustomRedirectMultiResponse struct { + value *CustomRedirectMultiResponse + isSet bool +} + +func (v NullableCustomRedirectMultiResponse) Get() *CustomRedirectMultiResponse { + return v.value +} + +func (v *NullableCustomRedirectMultiResponse) Set(val *CustomRedirectMultiResponse) { + v.value = val + v.isSet = true +} + +func (v NullableCustomRedirectMultiResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableCustomRedirectMultiResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCustomRedirectMultiResponse(val *CustomRedirectMultiResponse) *NullableCustomRedirectMultiResponse { + return &NullableCustomRedirectMultiResponse{value: val, isSet: true} +} + +func (v NullableCustomRedirectMultiResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCustomRedirectMultiResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/redirect/model_custom_redirect_read_response.go b/redirect/model_custom_redirect_read_response.go new file mode 100644 index 0000000..135e946 --- /dev/null +++ b/redirect/model_custom_redirect_read_response.go @@ -0,0 +1,153 @@ +/* +BloxOne Redirect API + +You can configure BloxOne Threat Defense Cloud to redirect traffic to the Infoblox server that displays the default or customized redirect page. You can redirect traffic to a custom destination using custom redirects. + +API version: v1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package redirect + +import ( + "encoding/json" +) + +// checks if the CustomRedirectReadResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CustomRedirectReadResponse{} + +// CustomRedirectReadResponse The Custom Redirect read response. +type CustomRedirectReadResponse struct { + Results *CustomRedirect `json:"results,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _CustomRedirectReadResponse CustomRedirectReadResponse + +// NewCustomRedirectReadResponse instantiates a new CustomRedirectReadResponse 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 NewCustomRedirectReadResponse() *CustomRedirectReadResponse { + this := CustomRedirectReadResponse{} + return &this +} + +// NewCustomRedirectReadResponseWithDefaults instantiates a new CustomRedirectReadResponse 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 NewCustomRedirectReadResponseWithDefaults() *CustomRedirectReadResponse { + this := CustomRedirectReadResponse{} + return &this +} + +// GetResults returns the Results field value if set, zero value otherwise. +func (o *CustomRedirectReadResponse) GetResults() CustomRedirect { + if o == nil || IsNil(o.Results) { + var ret CustomRedirect + 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 *CustomRedirectReadResponse) GetResultsOk() (*CustomRedirect, 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 *CustomRedirectReadResponse) HasResults() bool { + if o != nil && !IsNil(o.Results) { + return true + } + + return false +} + +// SetResults gets a reference to the given CustomRedirect and assigns it to the Results field. +func (o *CustomRedirectReadResponse) SetResults(v CustomRedirect) { + o.Results = &v +} + +func (o CustomRedirectReadResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CustomRedirectReadResponse) 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 *CustomRedirectReadResponse) UnmarshalJSON(data []byte) (err error) { + varCustomRedirectReadResponse := _CustomRedirectReadResponse{} + + err = json.Unmarshal(data, &varCustomRedirectReadResponse) + + if err != nil { + return err + } + + *o = CustomRedirectReadResponse(varCustomRedirectReadResponse) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "results") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableCustomRedirectReadResponse struct { + value *CustomRedirectReadResponse + isSet bool +} + +func (v NullableCustomRedirectReadResponse) Get() *CustomRedirectReadResponse { + return v.value +} + +func (v *NullableCustomRedirectReadResponse) Set(val *CustomRedirectReadResponse) { + v.value = val + v.isSet = true +} + +func (v NullableCustomRedirectReadResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableCustomRedirectReadResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCustomRedirectReadResponse(val *CustomRedirectReadResponse) *NullableCustomRedirectReadResponse { + return &NullableCustomRedirectReadResponse{value: val, isSet: true} +} + +func (v NullableCustomRedirectReadResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCustomRedirectReadResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/redirect/model_custom_redirect_update_response.go b/redirect/model_custom_redirect_update_response.go new file mode 100644 index 0000000..eba6931 --- /dev/null +++ b/redirect/model_custom_redirect_update_response.go @@ -0,0 +1,153 @@ +/* +BloxOne Redirect API + +You can configure BloxOne Threat Defense Cloud to redirect traffic to the Infoblox server that displays the default or customized redirect page. You can redirect traffic to a custom destination using custom redirects. + +API version: v1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package redirect + +import ( + "encoding/json" +) + +// checks if the CustomRedirectUpdateResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CustomRedirectUpdateResponse{} + +// CustomRedirectUpdateResponse The Custom Redirect update response. +type CustomRedirectUpdateResponse struct { + Results *CustomRedirect `json:"results,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _CustomRedirectUpdateResponse CustomRedirectUpdateResponse + +// NewCustomRedirectUpdateResponse instantiates a new CustomRedirectUpdateResponse 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 NewCustomRedirectUpdateResponse() *CustomRedirectUpdateResponse { + this := CustomRedirectUpdateResponse{} + return &this +} + +// NewCustomRedirectUpdateResponseWithDefaults instantiates a new CustomRedirectUpdateResponse 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 NewCustomRedirectUpdateResponseWithDefaults() *CustomRedirectUpdateResponse { + this := CustomRedirectUpdateResponse{} + return &this +} + +// GetResults returns the Results field value if set, zero value otherwise. +func (o *CustomRedirectUpdateResponse) GetResults() CustomRedirect { + if o == nil || IsNil(o.Results) { + var ret CustomRedirect + 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 *CustomRedirectUpdateResponse) GetResultsOk() (*CustomRedirect, 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 *CustomRedirectUpdateResponse) HasResults() bool { + if o != nil && !IsNil(o.Results) { + return true + } + + return false +} + +// SetResults gets a reference to the given CustomRedirect and assigns it to the Results field. +func (o *CustomRedirectUpdateResponse) SetResults(v CustomRedirect) { + o.Results = &v +} + +func (o CustomRedirectUpdateResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CustomRedirectUpdateResponse) 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 *CustomRedirectUpdateResponse) UnmarshalJSON(data []byte) (err error) { + varCustomRedirectUpdateResponse := _CustomRedirectUpdateResponse{} + + err = json.Unmarshal(data, &varCustomRedirectUpdateResponse) + + if err != nil { + return err + } + + *o = CustomRedirectUpdateResponse(varCustomRedirectUpdateResponse) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "results") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableCustomRedirectUpdateResponse struct { + value *CustomRedirectUpdateResponse + isSet bool +} + +func (v NullableCustomRedirectUpdateResponse) Get() *CustomRedirectUpdateResponse { + return v.value +} + +func (v *NullableCustomRedirectUpdateResponse) Set(val *CustomRedirectUpdateResponse) { + v.value = val + v.isSet = true +} + +func (v NullableCustomRedirectUpdateResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableCustomRedirectUpdateResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCustomRedirectUpdateResponse(val *CustomRedirectUpdateResponse) *NullableCustomRedirectUpdateResponse { + return &NullableCustomRedirectUpdateResponse{value: val, isSet: true} +} + +func (v NullableCustomRedirectUpdateResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCustomRedirectUpdateResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/redirect/model_custom_redirects_create_custom_redirect_400_response.go b/redirect/model_custom_redirects_create_custom_redirect_400_response.go new file mode 100644 index 0000000..40dc005 --- /dev/null +++ b/redirect/model_custom_redirects_create_custom_redirect_400_response.go @@ -0,0 +1,153 @@ +/* +BloxOne Redirect API + +You can configure BloxOne Threat Defense Cloud to redirect traffic to the Infoblox server that displays the default or customized redirect page. You can redirect traffic to a custom destination using custom redirects. + +API version: v1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package redirect + +import ( + "encoding/json" +) + +// checks if the CustomRedirectsCreateCustomRedirect400Response type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CustomRedirectsCreateCustomRedirect400Response{} + +// CustomRedirectsCreateCustomRedirect400Response struct for CustomRedirectsCreateCustomRedirect400Response +type CustomRedirectsCreateCustomRedirect400Response struct { + Error *CustomRedirectsCreateCustomRedirect400ResponseError `json:"error,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _CustomRedirectsCreateCustomRedirect400Response CustomRedirectsCreateCustomRedirect400Response + +// NewCustomRedirectsCreateCustomRedirect400Response instantiates a new CustomRedirectsCreateCustomRedirect400Response 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 NewCustomRedirectsCreateCustomRedirect400Response() *CustomRedirectsCreateCustomRedirect400Response { + this := CustomRedirectsCreateCustomRedirect400Response{} + return &this +} + +// NewCustomRedirectsCreateCustomRedirect400ResponseWithDefaults instantiates a new CustomRedirectsCreateCustomRedirect400Response 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 NewCustomRedirectsCreateCustomRedirect400ResponseWithDefaults() *CustomRedirectsCreateCustomRedirect400Response { + this := CustomRedirectsCreateCustomRedirect400Response{} + return &this +} + +// GetError returns the Error field value if set, zero value otherwise. +func (o *CustomRedirectsCreateCustomRedirect400Response) GetError() CustomRedirectsCreateCustomRedirect400ResponseError { + if o == nil || IsNil(o.Error) { + var ret CustomRedirectsCreateCustomRedirect400ResponseError + return ret + } + return *o.Error +} + +// GetErrorOk returns a tuple with the Error field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CustomRedirectsCreateCustomRedirect400Response) GetErrorOk() (*CustomRedirectsCreateCustomRedirect400ResponseError, bool) { + if o == nil || IsNil(o.Error) { + return nil, false + } + return o.Error, true +} + +// HasError returns a boolean if a field has been set. +func (o *CustomRedirectsCreateCustomRedirect400Response) HasError() bool { + if o != nil && !IsNil(o.Error) { + return true + } + + return false +} + +// SetError gets a reference to the given CustomRedirectsCreateCustomRedirect400ResponseError and assigns it to the Error field. +func (o *CustomRedirectsCreateCustomRedirect400Response) SetError(v CustomRedirectsCreateCustomRedirect400ResponseError) { + o.Error = &v +} + +func (o CustomRedirectsCreateCustomRedirect400Response) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CustomRedirectsCreateCustomRedirect400Response) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Error) { + toSerialize["error"] = o.Error + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *CustomRedirectsCreateCustomRedirect400Response) UnmarshalJSON(data []byte) (err error) { + varCustomRedirectsCreateCustomRedirect400Response := _CustomRedirectsCreateCustomRedirect400Response{} + + err = json.Unmarshal(data, &varCustomRedirectsCreateCustomRedirect400Response) + + if err != nil { + return err + } + + *o = CustomRedirectsCreateCustomRedirect400Response(varCustomRedirectsCreateCustomRedirect400Response) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "error") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableCustomRedirectsCreateCustomRedirect400Response struct { + value *CustomRedirectsCreateCustomRedirect400Response + isSet bool +} + +func (v NullableCustomRedirectsCreateCustomRedirect400Response) Get() *CustomRedirectsCreateCustomRedirect400Response { + return v.value +} + +func (v *NullableCustomRedirectsCreateCustomRedirect400Response) Set(val *CustomRedirectsCreateCustomRedirect400Response) { + v.value = val + v.isSet = true +} + +func (v NullableCustomRedirectsCreateCustomRedirect400Response) IsSet() bool { + return v.isSet +} + +func (v *NullableCustomRedirectsCreateCustomRedirect400Response) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCustomRedirectsCreateCustomRedirect400Response(val *CustomRedirectsCreateCustomRedirect400Response) *NullableCustomRedirectsCreateCustomRedirect400Response { + return &NullableCustomRedirectsCreateCustomRedirect400Response{value: val, isSet: true} +} + +func (v NullableCustomRedirectsCreateCustomRedirect400Response) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCustomRedirectsCreateCustomRedirect400Response) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/redirect/model_custom_redirects_create_custom_redirect_400_response_error.go b/redirect/model_custom_redirects_create_custom_redirect_400_response_error.go new file mode 100644 index 0000000..6ec6dc6 --- /dev/null +++ b/redirect/model_custom_redirects_create_custom_redirect_400_response_error.go @@ -0,0 +1,227 @@ +/* +BloxOne Redirect API + +You can configure BloxOne Threat Defense Cloud to redirect traffic to the Infoblox server that displays the default or customized redirect page. You can redirect traffic to a custom destination using custom redirects. + +API version: v1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package redirect + +import ( + "encoding/json" +) + +// checks if the CustomRedirectsCreateCustomRedirect400ResponseError type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CustomRedirectsCreateCustomRedirect400ResponseError{} + +// CustomRedirectsCreateCustomRedirect400ResponseError struct for CustomRedirectsCreateCustomRedirect400ResponseError +type CustomRedirectsCreateCustomRedirect400ResponseError struct { + Code *string `json:"code,omitempty"` + Message *string `json:"message,omitempty"` + Status *string `json:"status,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _CustomRedirectsCreateCustomRedirect400ResponseError CustomRedirectsCreateCustomRedirect400ResponseError + +// NewCustomRedirectsCreateCustomRedirect400ResponseError instantiates a new CustomRedirectsCreateCustomRedirect400ResponseError 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 NewCustomRedirectsCreateCustomRedirect400ResponseError() *CustomRedirectsCreateCustomRedirect400ResponseError { + this := CustomRedirectsCreateCustomRedirect400ResponseError{} + return &this +} + +// NewCustomRedirectsCreateCustomRedirect400ResponseErrorWithDefaults instantiates a new CustomRedirectsCreateCustomRedirect400ResponseError 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 NewCustomRedirectsCreateCustomRedirect400ResponseErrorWithDefaults() *CustomRedirectsCreateCustomRedirect400ResponseError { + this := CustomRedirectsCreateCustomRedirect400ResponseError{} + return &this +} + +// GetCode returns the Code field value if set, zero value otherwise. +func (o *CustomRedirectsCreateCustomRedirect400ResponseError) GetCode() string { + if o == nil || IsNil(o.Code) { + var ret string + return ret + } + return *o.Code +} + +// GetCodeOk returns a tuple with the Code field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CustomRedirectsCreateCustomRedirect400ResponseError) GetCodeOk() (*string, bool) { + if o == nil || IsNil(o.Code) { + return nil, false + } + return o.Code, true +} + +// HasCode returns a boolean if a field has been set. +func (o *CustomRedirectsCreateCustomRedirect400ResponseError) HasCode() bool { + if o != nil && !IsNil(o.Code) { + return true + } + + return false +} + +// SetCode gets a reference to the given string and assigns it to the Code field. +func (o *CustomRedirectsCreateCustomRedirect400ResponseError) SetCode(v string) { + o.Code = &v +} + +// GetMessage returns the Message field value if set, zero value otherwise. +func (o *CustomRedirectsCreateCustomRedirect400ResponseError) 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 *CustomRedirectsCreateCustomRedirect400ResponseError) 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 *CustomRedirectsCreateCustomRedirect400ResponseError) 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 *CustomRedirectsCreateCustomRedirect400ResponseError) SetMessage(v string) { + o.Message = &v +} + +// GetStatus returns the Status field value if set, zero value otherwise. +func (o *CustomRedirectsCreateCustomRedirect400ResponseError) GetStatus() string { + if o == nil || IsNil(o.Status) { + var ret string + return ret + } + return *o.Status +} + +// GetStatusOk returns a tuple with the Status field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CustomRedirectsCreateCustomRedirect400ResponseError) GetStatusOk() (*string, bool) { + if o == nil || IsNil(o.Status) { + return nil, false + } + return o.Status, true +} + +// HasStatus returns a boolean if a field has been set. +func (o *CustomRedirectsCreateCustomRedirect400ResponseError) HasStatus() bool { + if o != nil && !IsNil(o.Status) { + return true + } + + return false +} + +// SetStatus gets a reference to the given string and assigns it to the Status field. +func (o *CustomRedirectsCreateCustomRedirect400ResponseError) SetStatus(v string) { + o.Status = &v +} + +func (o CustomRedirectsCreateCustomRedirect400ResponseError) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CustomRedirectsCreateCustomRedirect400ResponseError) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Code) { + toSerialize["code"] = o.Code + } + if !IsNil(o.Message) { + toSerialize["message"] = o.Message + } + if !IsNil(o.Status) { + toSerialize["status"] = o.Status + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *CustomRedirectsCreateCustomRedirect400ResponseError) UnmarshalJSON(data []byte) (err error) { + varCustomRedirectsCreateCustomRedirect400ResponseError := _CustomRedirectsCreateCustomRedirect400ResponseError{} + + err = json.Unmarshal(data, &varCustomRedirectsCreateCustomRedirect400ResponseError) + + if err != nil { + return err + } + + *o = CustomRedirectsCreateCustomRedirect400ResponseError(varCustomRedirectsCreateCustomRedirect400ResponseError) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "code") + delete(additionalProperties, "message") + delete(additionalProperties, "status") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableCustomRedirectsCreateCustomRedirect400ResponseError struct { + value *CustomRedirectsCreateCustomRedirect400ResponseError + isSet bool +} + +func (v NullableCustomRedirectsCreateCustomRedirect400ResponseError) Get() *CustomRedirectsCreateCustomRedirect400ResponseError { + return v.value +} + +func (v *NullableCustomRedirectsCreateCustomRedirect400ResponseError) Set(val *CustomRedirectsCreateCustomRedirect400ResponseError) { + v.value = val + v.isSet = true +} + +func (v NullableCustomRedirectsCreateCustomRedirect400ResponseError) IsSet() bool { + return v.isSet +} + +func (v *NullableCustomRedirectsCreateCustomRedirect400ResponseError) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCustomRedirectsCreateCustomRedirect400ResponseError(val *CustomRedirectsCreateCustomRedirect400ResponseError) *NullableCustomRedirectsCreateCustomRedirect400ResponseError { + return &NullableCustomRedirectsCreateCustomRedirect400ResponseError{value: val, isSet: true} +} + +func (v NullableCustomRedirectsCreateCustomRedirect400ResponseError) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCustomRedirectsCreateCustomRedirect400ResponseError) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/redirect/model_custom_redirects_create_custom_redirect_409_response.go b/redirect/model_custom_redirects_create_custom_redirect_409_response.go new file mode 100644 index 0000000..e96023b --- /dev/null +++ b/redirect/model_custom_redirects_create_custom_redirect_409_response.go @@ -0,0 +1,153 @@ +/* +BloxOne Redirect API + +You can configure BloxOne Threat Defense Cloud to redirect traffic to the Infoblox server that displays the default or customized redirect page. You can redirect traffic to a custom destination using custom redirects. + +API version: v1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package redirect + +import ( + "encoding/json" +) + +// checks if the CustomRedirectsCreateCustomRedirect409Response type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CustomRedirectsCreateCustomRedirect409Response{} + +// CustomRedirectsCreateCustomRedirect409Response struct for CustomRedirectsCreateCustomRedirect409Response +type CustomRedirectsCreateCustomRedirect409Response struct { + Error *CustomRedirectsCreateCustomRedirect409ResponseError `json:"error,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _CustomRedirectsCreateCustomRedirect409Response CustomRedirectsCreateCustomRedirect409Response + +// NewCustomRedirectsCreateCustomRedirect409Response instantiates a new CustomRedirectsCreateCustomRedirect409Response 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 NewCustomRedirectsCreateCustomRedirect409Response() *CustomRedirectsCreateCustomRedirect409Response { + this := CustomRedirectsCreateCustomRedirect409Response{} + return &this +} + +// NewCustomRedirectsCreateCustomRedirect409ResponseWithDefaults instantiates a new CustomRedirectsCreateCustomRedirect409Response 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 NewCustomRedirectsCreateCustomRedirect409ResponseWithDefaults() *CustomRedirectsCreateCustomRedirect409Response { + this := CustomRedirectsCreateCustomRedirect409Response{} + return &this +} + +// GetError returns the Error field value if set, zero value otherwise. +func (o *CustomRedirectsCreateCustomRedirect409Response) GetError() CustomRedirectsCreateCustomRedirect409ResponseError { + if o == nil || IsNil(o.Error) { + var ret CustomRedirectsCreateCustomRedirect409ResponseError + return ret + } + return *o.Error +} + +// GetErrorOk returns a tuple with the Error field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CustomRedirectsCreateCustomRedirect409Response) GetErrorOk() (*CustomRedirectsCreateCustomRedirect409ResponseError, bool) { + if o == nil || IsNil(o.Error) { + return nil, false + } + return o.Error, true +} + +// HasError returns a boolean if a field has been set. +func (o *CustomRedirectsCreateCustomRedirect409Response) HasError() bool { + if o != nil && !IsNil(o.Error) { + return true + } + + return false +} + +// SetError gets a reference to the given CustomRedirectsCreateCustomRedirect409ResponseError and assigns it to the Error field. +func (o *CustomRedirectsCreateCustomRedirect409Response) SetError(v CustomRedirectsCreateCustomRedirect409ResponseError) { + o.Error = &v +} + +func (o CustomRedirectsCreateCustomRedirect409Response) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CustomRedirectsCreateCustomRedirect409Response) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Error) { + toSerialize["error"] = o.Error + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *CustomRedirectsCreateCustomRedirect409Response) UnmarshalJSON(data []byte) (err error) { + varCustomRedirectsCreateCustomRedirect409Response := _CustomRedirectsCreateCustomRedirect409Response{} + + err = json.Unmarshal(data, &varCustomRedirectsCreateCustomRedirect409Response) + + if err != nil { + return err + } + + *o = CustomRedirectsCreateCustomRedirect409Response(varCustomRedirectsCreateCustomRedirect409Response) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "error") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableCustomRedirectsCreateCustomRedirect409Response struct { + value *CustomRedirectsCreateCustomRedirect409Response + isSet bool +} + +func (v NullableCustomRedirectsCreateCustomRedirect409Response) Get() *CustomRedirectsCreateCustomRedirect409Response { + return v.value +} + +func (v *NullableCustomRedirectsCreateCustomRedirect409Response) Set(val *CustomRedirectsCreateCustomRedirect409Response) { + v.value = val + v.isSet = true +} + +func (v NullableCustomRedirectsCreateCustomRedirect409Response) IsSet() bool { + return v.isSet +} + +func (v *NullableCustomRedirectsCreateCustomRedirect409Response) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCustomRedirectsCreateCustomRedirect409Response(val *CustomRedirectsCreateCustomRedirect409Response) *NullableCustomRedirectsCreateCustomRedirect409Response { + return &NullableCustomRedirectsCreateCustomRedirect409Response{value: val, isSet: true} +} + +func (v NullableCustomRedirectsCreateCustomRedirect409Response) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCustomRedirectsCreateCustomRedirect409Response) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/redirect/model_custom_redirects_create_custom_redirect_409_response_error.go b/redirect/model_custom_redirects_create_custom_redirect_409_response_error.go new file mode 100644 index 0000000..e611a7d --- /dev/null +++ b/redirect/model_custom_redirects_create_custom_redirect_409_response_error.go @@ -0,0 +1,227 @@ +/* +BloxOne Redirect API + +You can configure BloxOne Threat Defense Cloud to redirect traffic to the Infoblox server that displays the default or customized redirect page. You can redirect traffic to a custom destination using custom redirects. + +API version: v1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package redirect + +import ( + "encoding/json" +) + +// checks if the CustomRedirectsCreateCustomRedirect409ResponseError type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CustomRedirectsCreateCustomRedirect409ResponseError{} + +// CustomRedirectsCreateCustomRedirect409ResponseError struct for CustomRedirectsCreateCustomRedirect409ResponseError +type CustomRedirectsCreateCustomRedirect409ResponseError struct { + Code *string `json:"code,omitempty"` + Message *string `json:"message,omitempty"` + Status *string `json:"status,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _CustomRedirectsCreateCustomRedirect409ResponseError CustomRedirectsCreateCustomRedirect409ResponseError + +// NewCustomRedirectsCreateCustomRedirect409ResponseError instantiates a new CustomRedirectsCreateCustomRedirect409ResponseError 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 NewCustomRedirectsCreateCustomRedirect409ResponseError() *CustomRedirectsCreateCustomRedirect409ResponseError { + this := CustomRedirectsCreateCustomRedirect409ResponseError{} + return &this +} + +// NewCustomRedirectsCreateCustomRedirect409ResponseErrorWithDefaults instantiates a new CustomRedirectsCreateCustomRedirect409ResponseError 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 NewCustomRedirectsCreateCustomRedirect409ResponseErrorWithDefaults() *CustomRedirectsCreateCustomRedirect409ResponseError { + this := CustomRedirectsCreateCustomRedirect409ResponseError{} + return &this +} + +// GetCode returns the Code field value if set, zero value otherwise. +func (o *CustomRedirectsCreateCustomRedirect409ResponseError) GetCode() string { + if o == nil || IsNil(o.Code) { + var ret string + return ret + } + return *o.Code +} + +// GetCodeOk returns a tuple with the Code field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CustomRedirectsCreateCustomRedirect409ResponseError) GetCodeOk() (*string, bool) { + if o == nil || IsNil(o.Code) { + return nil, false + } + return o.Code, true +} + +// HasCode returns a boolean if a field has been set. +func (o *CustomRedirectsCreateCustomRedirect409ResponseError) HasCode() bool { + if o != nil && !IsNil(o.Code) { + return true + } + + return false +} + +// SetCode gets a reference to the given string and assigns it to the Code field. +func (o *CustomRedirectsCreateCustomRedirect409ResponseError) SetCode(v string) { + o.Code = &v +} + +// GetMessage returns the Message field value if set, zero value otherwise. +func (o *CustomRedirectsCreateCustomRedirect409ResponseError) 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 *CustomRedirectsCreateCustomRedirect409ResponseError) 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 *CustomRedirectsCreateCustomRedirect409ResponseError) 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 *CustomRedirectsCreateCustomRedirect409ResponseError) SetMessage(v string) { + o.Message = &v +} + +// GetStatus returns the Status field value if set, zero value otherwise. +func (o *CustomRedirectsCreateCustomRedirect409ResponseError) GetStatus() string { + if o == nil || IsNil(o.Status) { + var ret string + return ret + } + return *o.Status +} + +// GetStatusOk returns a tuple with the Status field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CustomRedirectsCreateCustomRedirect409ResponseError) GetStatusOk() (*string, bool) { + if o == nil || IsNil(o.Status) { + return nil, false + } + return o.Status, true +} + +// HasStatus returns a boolean if a field has been set. +func (o *CustomRedirectsCreateCustomRedirect409ResponseError) HasStatus() bool { + if o != nil && !IsNil(o.Status) { + return true + } + + return false +} + +// SetStatus gets a reference to the given string and assigns it to the Status field. +func (o *CustomRedirectsCreateCustomRedirect409ResponseError) SetStatus(v string) { + o.Status = &v +} + +func (o CustomRedirectsCreateCustomRedirect409ResponseError) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CustomRedirectsCreateCustomRedirect409ResponseError) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Code) { + toSerialize["code"] = o.Code + } + if !IsNil(o.Message) { + toSerialize["message"] = o.Message + } + if !IsNil(o.Status) { + toSerialize["status"] = o.Status + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *CustomRedirectsCreateCustomRedirect409ResponseError) UnmarshalJSON(data []byte) (err error) { + varCustomRedirectsCreateCustomRedirect409ResponseError := _CustomRedirectsCreateCustomRedirect409ResponseError{} + + err = json.Unmarshal(data, &varCustomRedirectsCreateCustomRedirect409ResponseError) + + if err != nil { + return err + } + + *o = CustomRedirectsCreateCustomRedirect409ResponseError(varCustomRedirectsCreateCustomRedirect409ResponseError) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "code") + delete(additionalProperties, "message") + delete(additionalProperties, "status") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableCustomRedirectsCreateCustomRedirect409ResponseError struct { + value *CustomRedirectsCreateCustomRedirect409ResponseError + isSet bool +} + +func (v NullableCustomRedirectsCreateCustomRedirect409ResponseError) Get() *CustomRedirectsCreateCustomRedirect409ResponseError { + return v.value +} + +func (v *NullableCustomRedirectsCreateCustomRedirect409ResponseError) Set(val *CustomRedirectsCreateCustomRedirect409ResponseError) { + v.value = val + v.isSet = true +} + +func (v NullableCustomRedirectsCreateCustomRedirect409ResponseError) IsSet() bool { + return v.isSet +} + +func (v *NullableCustomRedirectsCreateCustomRedirect409ResponseError) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCustomRedirectsCreateCustomRedirect409ResponseError(val *CustomRedirectsCreateCustomRedirect409ResponseError) *NullableCustomRedirectsCreateCustomRedirect409ResponseError { + return &NullableCustomRedirectsCreateCustomRedirect409ResponseError{value: val, isSet: true} +} + +func (v NullableCustomRedirectsCreateCustomRedirect409ResponseError) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCustomRedirectsCreateCustomRedirect409ResponseError) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/redirect/model_custom_redirects_delete_custom_redirect_400_response.go b/redirect/model_custom_redirects_delete_custom_redirect_400_response.go new file mode 100644 index 0000000..d1a7473 --- /dev/null +++ b/redirect/model_custom_redirects_delete_custom_redirect_400_response.go @@ -0,0 +1,153 @@ +/* +BloxOne Redirect API + +You can configure BloxOne Threat Defense Cloud to redirect traffic to the Infoblox server that displays the default or customized redirect page. You can redirect traffic to a custom destination using custom redirects. + +API version: v1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package redirect + +import ( + "encoding/json" +) + +// checks if the CustomRedirectsDeleteCustomRedirect400Response type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CustomRedirectsDeleteCustomRedirect400Response{} + +// CustomRedirectsDeleteCustomRedirect400Response struct for CustomRedirectsDeleteCustomRedirect400Response +type CustomRedirectsDeleteCustomRedirect400Response struct { + Error *CustomRedirectsDeleteCustomRedirect400ResponseError `json:"error,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _CustomRedirectsDeleteCustomRedirect400Response CustomRedirectsDeleteCustomRedirect400Response + +// NewCustomRedirectsDeleteCustomRedirect400Response instantiates a new CustomRedirectsDeleteCustomRedirect400Response 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 NewCustomRedirectsDeleteCustomRedirect400Response() *CustomRedirectsDeleteCustomRedirect400Response { + this := CustomRedirectsDeleteCustomRedirect400Response{} + return &this +} + +// NewCustomRedirectsDeleteCustomRedirect400ResponseWithDefaults instantiates a new CustomRedirectsDeleteCustomRedirect400Response 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 NewCustomRedirectsDeleteCustomRedirect400ResponseWithDefaults() *CustomRedirectsDeleteCustomRedirect400Response { + this := CustomRedirectsDeleteCustomRedirect400Response{} + return &this +} + +// GetError returns the Error field value if set, zero value otherwise. +func (o *CustomRedirectsDeleteCustomRedirect400Response) GetError() CustomRedirectsDeleteCustomRedirect400ResponseError { + if o == nil || IsNil(o.Error) { + var ret CustomRedirectsDeleteCustomRedirect400ResponseError + return ret + } + return *o.Error +} + +// GetErrorOk returns a tuple with the Error field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CustomRedirectsDeleteCustomRedirect400Response) GetErrorOk() (*CustomRedirectsDeleteCustomRedirect400ResponseError, bool) { + if o == nil || IsNil(o.Error) { + return nil, false + } + return o.Error, true +} + +// HasError returns a boolean if a field has been set. +func (o *CustomRedirectsDeleteCustomRedirect400Response) HasError() bool { + if o != nil && !IsNil(o.Error) { + return true + } + + return false +} + +// SetError gets a reference to the given CustomRedirectsDeleteCustomRedirect400ResponseError and assigns it to the Error field. +func (o *CustomRedirectsDeleteCustomRedirect400Response) SetError(v CustomRedirectsDeleteCustomRedirect400ResponseError) { + o.Error = &v +} + +func (o CustomRedirectsDeleteCustomRedirect400Response) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CustomRedirectsDeleteCustomRedirect400Response) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Error) { + toSerialize["error"] = o.Error + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *CustomRedirectsDeleteCustomRedirect400Response) UnmarshalJSON(data []byte) (err error) { + varCustomRedirectsDeleteCustomRedirect400Response := _CustomRedirectsDeleteCustomRedirect400Response{} + + err = json.Unmarshal(data, &varCustomRedirectsDeleteCustomRedirect400Response) + + if err != nil { + return err + } + + *o = CustomRedirectsDeleteCustomRedirect400Response(varCustomRedirectsDeleteCustomRedirect400Response) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "error") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableCustomRedirectsDeleteCustomRedirect400Response struct { + value *CustomRedirectsDeleteCustomRedirect400Response + isSet bool +} + +func (v NullableCustomRedirectsDeleteCustomRedirect400Response) Get() *CustomRedirectsDeleteCustomRedirect400Response { + return v.value +} + +func (v *NullableCustomRedirectsDeleteCustomRedirect400Response) Set(val *CustomRedirectsDeleteCustomRedirect400Response) { + v.value = val + v.isSet = true +} + +func (v NullableCustomRedirectsDeleteCustomRedirect400Response) IsSet() bool { + return v.isSet +} + +func (v *NullableCustomRedirectsDeleteCustomRedirect400Response) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCustomRedirectsDeleteCustomRedirect400Response(val *CustomRedirectsDeleteCustomRedirect400Response) *NullableCustomRedirectsDeleteCustomRedirect400Response { + return &NullableCustomRedirectsDeleteCustomRedirect400Response{value: val, isSet: true} +} + +func (v NullableCustomRedirectsDeleteCustomRedirect400Response) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCustomRedirectsDeleteCustomRedirect400Response) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/redirect/model_custom_redirects_delete_custom_redirect_400_response_error.go b/redirect/model_custom_redirects_delete_custom_redirect_400_response_error.go new file mode 100644 index 0000000..9112c1b --- /dev/null +++ b/redirect/model_custom_redirects_delete_custom_redirect_400_response_error.go @@ -0,0 +1,227 @@ +/* +BloxOne Redirect API + +You can configure BloxOne Threat Defense Cloud to redirect traffic to the Infoblox server that displays the default or customized redirect page. You can redirect traffic to a custom destination using custom redirects. + +API version: v1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package redirect + +import ( + "encoding/json" +) + +// checks if the CustomRedirectsDeleteCustomRedirect400ResponseError type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CustomRedirectsDeleteCustomRedirect400ResponseError{} + +// CustomRedirectsDeleteCustomRedirect400ResponseError struct for CustomRedirectsDeleteCustomRedirect400ResponseError +type CustomRedirectsDeleteCustomRedirect400ResponseError struct { + Code *string `json:"code,omitempty"` + Message *string `json:"message,omitempty"` + Status *string `json:"status,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _CustomRedirectsDeleteCustomRedirect400ResponseError CustomRedirectsDeleteCustomRedirect400ResponseError + +// NewCustomRedirectsDeleteCustomRedirect400ResponseError instantiates a new CustomRedirectsDeleteCustomRedirect400ResponseError 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 NewCustomRedirectsDeleteCustomRedirect400ResponseError() *CustomRedirectsDeleteCustomRedirect400ResponseError { + this := CustomRedirectsDeleteCustomRedirect400ResponseError{} + return &this +} + +// NewCustomRedirectsDeleteCustomRedirect400ResponseErrorWithDefaults instantiates a new CustomRedirectsDeleteCustomRedirect400ResponseError 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 NewCustomRedirectsDeleteCustomRedirect400ResponseErrorWithDefaults() *CustomRedirectsDeleteCustomRedirect400ResponseError { + this := CustomRedirectsDeleteCustomRedirect400ResponseError{} + return &this +} + +// GetCode returns the Code field value if set, zero value otherwise. +func (o *CustomRedirectsDeleteCustomRedirect400ResponseError) GetCode() string { + if o == nil || IsNil(o.Code) { + var ret string + return ret + } + return *o.Code +} + +// GetCodeOk returns a tuple with the Code field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CustomRedirectsDeleteCustomRedirect400ResponseError) GetCodeOk() (*string, bool) { + if o == nil || IsNil(o.Code) { + return nil, false + } + return o.Code, true +} + +// HasCode returns a boolean if a field has been set. +func (o *CustomRedirectsDeleteCustomRedirect400ResponseError) HasCode() bool { + if o != nil && !IsNil(o.Code) { + return true + } + + return false +} + +// SetCode gets a reference to the given string and assigns it to the Code field. +func (o *CustomRedirectsDeleteCustomRedirect400ResponseError) SetCode(v string) { + o.Code = &v +} + +// GetMessage returns the Message field value if set, zero value otherwise. +func (o *CustomRedirectsDeleteCustomRedirect400ResponseError) 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 *CustomRedirectsDeleteCustomRedirect400ResponseError) 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 *CustomRedirectsDeleteCustomRedirect400ResponseError) 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 *CustomRedirectsDeleteCustomRedirect400ResponseError) SetMessage(v string) { + o.Message = &v +} + +// GetStatus returns the Status field value if set, zero value otherwise. +func (o *CustomRedirectsDeleteCustomRedirect400ResponseError) GetStatus() string { + if o == nil || IsNil(o.Status) { + var ret string + return ret + } + return *o.Status +} + +// GetStatusOk returns a tuple with the Status field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CustomRedirectsDeleteCustomRedirect400ResponseError) GetStatusOk() (*string, bool) { + if o == nil || IsNil(o.Status) { + return nil, false + } + return o.Status, true +} + +// HasStatus returns a boolean if a field has been set. +func (o *CustomRedirectsDeleteCustomRedirect400ResponseError) HasStatus() bool { + if o != nil && !IsNil(o.Status) { + return true + } + + return false +} + +// SetStatus gets a reference to the given string and assigns it to the Status field. +func (o *CustomRedirectsDeleteCustomRedirect400ResponseError) SetStatus(v string) { + o.Status = &v +} + +func (o CustomRedirectsDeleteCustomRedirect400ResponseError) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CustomRedirectsDeleteCustomRedirect400ResponseError) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Code) { + toSerialize["code"] = o.Code + } + if !IsNil(o.Message) { + toSerialize["message"] = o.Message + } + if !IsNil(o.Status) { + toSerialize["status"] = o.Status + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *CustomRedirectsDeleteCustomRedirect400ResponseError) UnmarshalJSON(data []byte) (err error) { + varCustomRedirectsDeleteCustomRedirect400ResponseError := _CustomRedirectsDeleteCustomRedirect400ResponseError{} + + err = json.Unmarshal(data, &varCustomRedirectsDeleteCustomRedirect400ResponseError) + + if err != nil { + return err + } + + *o = CustomRedirectsDeleteCustomRedirect400ResponseError(varCustomRedirectsDeleteCustomRedirect400ResponseError) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "code") + delete(additionalProperties, "message") + delete(additionalProperties, "status") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableCustomRedirectsDeleteCustomRedirect400ResponseError struct { + value *CustomRedirectsDeleteCustomRedirect400ResponseError + isSet bool +} + +func (v NullableCustomRedirectsDeleteCustomRedirect400ResponseError) Get() *CustomRedirectsDeleteCustomRedirect400ResponseError { + return v.value +} + +func (v *NullableCustomRedirectsDeleteCustomRedirect400ResponseError) Set(val *CustomRedirectsDeleteCustomRedirect400ResponseError) { + v.value = val + v.isSet = true +} + +func (v NullableCustomRedirectsDeleteCustomRedirect400ResponseError) IsSet() bool { + return v.isSet +} + +func (v *NullableCustomRedirectsDeleteCustomRedirect400ResponseError) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCustomRedirectsDeleteCustomRedirect400ResponseError(val *CustomRedirectsDeleteCustomRedirect400ResponseError) *NullableCustomRedirectsDeleteCustomRedirect400ResponseError { + return &NullableCustomRedirectsDeleteCustomRedirect400ResponseError{value: val, isSet: true} +} + +func (v NullableCustomRedirectsDeleteCustomRedirect400ResponseError) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCustomRedirectsDeleteCustomRedirect400ResponseError) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/redirect/model_custom_redirects_delete_single_custom_redirect_400_response.go b/redirect/model_custom_redirects_delete_single_custom_redirect_400_response.go new file mode 100644 index 0000000..0d5656f --- /dev/null +++ b/redirect/model_custom_redirects_delete_single_custom_redirect_400_response.go @@ -0,0 +1,153 @@ +/* +BloxOne Redirect API + +You can configure BloxOne Threat Defense Cloud to redirect traffic to the Infoblox server that displays the default or customized redirect page. You can redirect traffic to a custom destination using custom redirects. + +API version: v1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package redirect + +import ( + "encoding/json" +) + +// checks if the CustomRedirectsDeleteSingleCustomRedirect400Response type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CustomRedirectsDeleteSingleCustomRedirect400Response{} + +// CustomRedirectsDeleteSingleCustomRedirect400Response struct for CustomRedirectsDeleteSingleCustomRedirect400Response +type CustomRedirectsDeleteSingleCustomRedirect400Response struct { + Error *CustomRedirectsDeleteSingleCustomRedirect400ResponseError `json:"error,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _CustomRedirectsDeleteSingleCustomRedirect400Response CustomRedirectsDeleteSingleCustomRedirect400Response + +// NewCustomRedirectsDeleteSingleCustomRedirect400Response instantiates a new CustomRedirectsDeleteSingleCustomRedirect400Response 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 NewCustomRedirectsDeleteSingleCustomRedirect400Response() *CustomRedirectsDeleteSingleCustomRedirect400Response { + this := CustomRedirectsDeleteSingleCustomRedirect400Response{} + return &this +} + +// NewCustomRedirectsDeleteSingleCustomRedirect400ResponseWithDefaults instantiates a new CustomRedirectsDeleteSingleCustomRedirect400Response 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 NewCustomRedirectsDeleteSingleCustomRedirect400ResponseWithDefaults() *CustomRedirectsDeleteSingleCustomRedirect400Response { + this := CustomRedirectsDeleteSingleCustomRedirect400Response{} + return &this +} + +// GetError returns the Error field value if set, zero value otherwise. +func (o *CustomRedirectsDeleteSingleCustomRedirect400Response) GetError() CustomRedirectsDeleteSingleCustomRedirect400ResponseError { + if o == nil || IsNil(o.Error) { + var ret CustomRedirectsDeleteSingleCustomRedirect400ResponseError + return ret + } + return *o.Error +} + +// GetErrorOk returns a tuple with the Error field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CustomRedirectsDeleteSingleCustomRedirect400Response) GetErrorOk() (*CustomRedirectsDeleteSingleCustomRedirect400ResponseError, bool) { + if o == nil || IsNil(o.Error) { + return nil, false + } + return o.Error, true +} + +// HasError returns a boolean if a field has been set. +func (o *CustomRedirectsDeleteSingleCustomRedirect400Response) HasError() bool { + if o != nil && !IsNil(o.Error) { + return true + } + + return false +} + +// SetError gets a reference to the given CustomRedirectsDeleteSingleCustomRedirect400ResponseError and assigns it to the Error field. +func (o *CustomRedirectsDeleteSingleCustomRedirect400Response) SetError(v CustomRedirectsDeleteSingleCustomRedirect400ResponseError) { + o.Error = &v +} + +func (o CustomRedirectsDeleteSingleCustomRedirect400Response) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CustomRedirectsDeleteSingleCustomRedirect400Response) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Error) { + toSerialize["error"] = o.Error + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *CustomRedirectsDeleteSingleCustomRedirect400Response) UnmarshalJSON(data []byte) (err error) { + varCustomRedirectsDeleteSingleCustomRedirect400Response := _CustomRedirectsDeleteSingleCustomRedirect400Response{} + + err = json.Unmarshal(data, &varCustomRedirectsDeleteSingleCustomRedirect400Response) + + if err != nil { + return err + } + + *o = CustomRedirectsDeleteSingleCustomRedirect400Response(varCustomRedirectsDeleteSingleCustomRedirect400Response) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "error") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableCustomRedirectsDeleteSingleCustomRedirect400Response struct { + value *CustomRedirectsDeleteSingleCustomRedirect400Response + isSet bool +} + +func (v NullableCustomRedirectsDeleteSingleCustomRedirect400Response) Get() *CustomRedirectsDeleteSingleCustomRedirect400Response { + return v.value +} + +func (v *NullableCustomRedirectsDeleteSingleCustomRedirect400Response) Set(val *CustomRedirectsDeleteSingleCustomRedirect400Response) { + v.value = val + v.isSet = true +} + +func (v NullableCustomRedirectsDeleteSingleCustomRedirect400Response) IsSet() bool { + return v.isSet +} + +func (v *NullableCustomRedirectsDeleteSingleCustomRedirect400Response) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCustomRedirectsDeleteSingleCustomRedirect400Response(val *CustomRedirectsDeleteSingleCustomRedirect400Response) *NullableCustomRedirectsDeleteSingleCustomRedirect400Response { + return &NullableCustomRedirectsDeleteSingleCustomRedirect400Response{value: val, isSet: true} +} + +func (v NullableCustomRedirectsDeleteSingleCustomRedirect400Response) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCustomRedirectsDeleteSingleCustomRedirect400Response) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/redirect/model_custom_redirects_delete_single_custom_redirect_400_response_error.go b/redirect/model_custom_redirects_delete_single_custom_redirect_400_response_error.go new file mode 100644 index 0000000..705ca93 --- /dev/null +++ b/redirect/model_custom_redirects_delete_single_custom_redirect_400_response_error.go @@ -0,0 +1,227 @@ +/* +BloxOne Redirect API + +You can configure BloxOne Threat Defense Cloud to redirect traffic to the Infoblox server that displays the default or customized redirect page. You can redirect traffic to a custom destination using custom redirects. + +API version: v1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package redirect + +import ( + "encoding/json" +) + +// checks if the CustomRedirectsDeleteSingleCustomRedirect400ResponseError type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CustomRedirectsDeleteSingleCustomRedirect400ResponseError{} + +// CustomRedirectsDeleteSingleCustomRedirect400ResponseError struct for CustomRedirectsDeleteSingleCustomRedirect400ResponseError +type CustomRedirectsDeleteSingleCustomRedirect400ResponseError struct { + Code *string `json:"code,omitempty"` + Message *string `json:"message,omitempty"` + Status *string `json:"status,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _CustomRedirectsDeleteSingleCustomRedirect400ResponseError CustomRedirectsDeleteSingleCustomRedirect400ResponseError + +// NewCustomRedirectsDeleteSingleCustomRedirect400ResponseError instantiates a new CustomRedirectsDeleteSingleCustomRedirect400ResponseError 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 NewCustomRedirectsDeleteSingleCustomRedirect400ResponseError() *CustomRedirectsDeleteSingleCustomRedirect400ResponseError { + this := CustomRedirectsDeleteSingleCustomRedirect400ResponseError{} + return &this +} + +// NewCustomRedirectsDeleteSingleCustomRedirect400ResponseErrorWithDefaults instantiates a new CustomRedirectsDeleteSingleCustomRedirect400ResponseError 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 NewCustomRedirectsDeleteSingleCustomRedirect400ResponseErrorWithDefaults() *CustomRedirectsDeleteSingleCustomRedirect400ResponseError { + this := CustomRedirectsDeleteSingleCustomRedirect400ResponseError{} + return &this +} + +// GetCode returns the Code field value if set, zero value otherwise. +func (o *CustomRedirectsDeleteSingleCustomRedirect400ResponseError) GetCode() string { + if o == nil || IsNil(o.Code) { + var ret string + return ret + } + return *o.Code +} + +// GetCodeOk returns a tuple with the Code field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CustomRedirectsDeleteSingleCustomRedirect400ResponseError) GetCodeOk() (*string, bool) { + if o == nil || IsNil(o.Code) { + return nil, false + } + return o.Code, true +} + +// HasCode returns a boolean if a field has been set. +func (o *CustomRedirectsDeleteSingleCustomRedirect400ResponseError) HasCode() bool { + if o != nil && !IsNil(o.Code) { + return true + } + + return false +} + +// SetCode gets a reference to the given string and assigns it to the Code field. +func (o *CustomRedirectsDeleteSingleCustomRedirect400ResponseError) SetCode(v string) { + o.Code = &v +} + +// GetMessage returns the Message field value if set, zero value otherwise. +func (o *CustomRedirectsDeleteSingleCustomRedirect400ResponseError) 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 *CustomRedirectsDeleteSingleCustomRedirect400ResponseError) 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 *CustomRedirectsDeleteSingleCustomRedirect400ResponseError) 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 *CustomRedirectsDeleteSingleCustomRedirect400ResponseError) SetMessage(v string) { + o.Message = &v +} + +// GetStatus returns the Status field value if set, zero value otherwise. +func (o *CustomRedirectsDeleteSingleCustomRedirect400ResponseError) GetStatus() string { + if o == nil || IsNil(o.Status) { + var ret string + return ret + } + return *o.Status +} + +// GetStatusOk returns a tuple with the Status field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CustomRedirectsDeleteSingleCustomRedirect400ResponseError) GetStatusOk() (*string, bool) { + if o == nil || IsNil(o.Status) { + return nil, false + } + return o.Status, true +} + +// HasStatus returns a boolean if a field has been set. +func (o *CustomRedirectsDeleteSingleCustomRedirect400ResponseError) HasStatus() bool { + if o != nil && !IsNil(o.Status) { + return true + } + + return false +} + +// SetStatus gets a reference to the given string and assigns it to the Status field. +func (o *CustomRedirectsDeleteSingleCustomRedirect400ResponseError) SetStatus(v string) { + o.Status = &v +} + +func (o CustomRedirectsDeleteSingleCustomRedirect400ResponseError) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CustomRedirectsDeleteSingleCustomRedirect400ResponseError) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Code) { + toSerialize["code"] = o.Code + } + if !IsNil(o.Message) { + toSerialize["message"] = o.Message + } + if !IsNil(o.Status) { + toSerialize["status"] = o.Status + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *CustomRedirectsDeleteSingleCustomRedirect400ResponseError) UnmarshalJSON(data []byte) (err error) { + varCustomRedirectsDeleteSingleCustomRedirect400ResponseError := _CustomRedirectsDeleteSingleCustomRedirect400ResponseError{} + + err = json.Unmarshal(data, &varCustomRedirectsDeleteSingleCustomRedirect400ResponseError) + + if err != nil { + return err + } + + *o = CustomRedirectsDeleteSingleCustomRedirect400ResponseError(varCustomRedirectsDeleteSingleCustomRedirect400ResponseError) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "code") + delete(additionalProperties, "message") + delete(additionalProperties, "status") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableCustomRedirectsDeleteSingleCustomRedirect400ResponseError struct { + value *CustomRedirectsDeleteSingleCustomRedirect400ResponseError + isSet bool +} + +func (v NullableCustomRedirectsDeleteSingleCustomRedirect400ResponseError) Get() *CustomRedirectsDeleteSingleCustomRedirect400ResponseError { + return v.value +} + +func (v *NullableCustomRedirectsDeleteSingleCustomRedirect400ResponseError) Set(val *CustomRedirectsDeleteSingleCustomRedirect400ResponseError) { + v.value = val + v.isSet = true +} + +func (v NullableCustomRedirectsDeleteSingleCustomRedirect400ResponseError) IsSet() bool { + return v.isSet +} + +func (v *NullableCustomRedirectsDeleteSingleCustomRedirect400ResponseError) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCustomRedirectsDeleteSingleCustomRedirect400ResponseError(val *CustomRedirectsDeleteSingleCustomRedirect400ResponseError) *NullableCustomRedirectsDeleteSingleCustomRedirect400ResponseError { + return &NullableCustomRedirectsDeleteSingleCustomRedirect400ResponseError{value: val, isSet: true} +} + +func (v NullableCustomRedirectsDeleteSingleCustomRedirect400ResponseError) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCustomRedirectsDeleteSingleCustomRedirect400ResponseError) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/redirect/model_custom_redirects_read_custom_redirect_404_response.go b/redirect/model_custom_redirects_read_custom_redirect_404_response.go new file mode 100644 index 0000000..8ee872c --- /dev/null +++ b/redirect/model_custom_redirects_read_custom_redirect_404_response.go @@ -0,0 +1,153 @@ +/* +BloxOne Redirect API + +You can configure BloxOne Threat Defense Cloud to redirect traffic to the Infoblox server that displays the default or customized redirect page. You can redirect traffic to a custom destination using custom redirects. + +API version: v1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package redirect + +import ( + "encoding/json" +) + +// checks if the CustomRedirectsReadCustomRedirect404Response type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CustomRedirectsReadCustomRedirect404Response{} + +// CustomRedirectsReadCustomRedirect404Response struct for CustomRedirectsReadCustomRedirect404Response +type CustomRedirectsReadCustomRedirect404Response struct { + Error *CustomRedirectsReadCustomRedirect404ResponseError `json:"error,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _CustomRedirectsReadCustomRedirect404Response CustomRedirectsReadCustomRedirect404Response + +// NewCustomRedirectsReadCustomRedirect404Response instantiates a new CustomRedirectsReadCustomRedirect404Response 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 NewCustomRedirectsReadCustomRedirect404Response() *CustomRedirectsReadCustomRedirect404Response { + this := CustomRedirectsReadCustomRedirect404Response{} + return &this +} + +// NewCustomRedirectsReadCustomRedirect404ResponseWithDefaults instantiates a new CustomRedirectsReadCustomRedirect404Response 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 NewCustomRedirectsReadCustomRedirect404ResponseWithDefaults() *CustomRedirectsReadCustomRedirect404Response { + this := CustomRedirectsReadCustomRedirect404Response{} + return &this +} + +// GetError returns the Error field value if set, zero value otherwise. +func (o *CustomRedirectsReadCustomRedirect404Response) GetError() CustomRedirectsReadCustomRedirect404ResponseError { + if o == nil || IsNil(o.Error) { + var ret CustomRedirectsReadCustomRedirect404ResponseError + return ret + } + return *o.Error +} + +// GetErrorOk returns a tuple with the Error field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CustomRedirectsReadCustomRedirect404Response) GetErrorOk() (*CustomRedirectsReadCustomRedirect404ResponseError, bool) { + if o == nil || IsNil(o.Error) { + return nil, false + } + return o.Error, true +} + +// HasError returns a boolean if a field has been set. +func (o *CustomRedirectsReadCustomRedirect404Response) HasError() bool { + if o != nil && !IsNil(o.Error) { + return true + } + + return false +} + +// SetError gets a reference to the given CustomRedirectsReadCustomRedirect404ResponseError and assigns it to the Error field. +func (o *CustomRedirectsReadCustomRedirect404Response) SetError(v CustomRedirectsReadCustomRedirect404ResponseError) { + o.Error = &v +} + +func (o CustomRedirectsReadCustomRedirect404Response) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CustomRedirectsReadCustomRedirect404Response) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Error) { + toSerialize["error"] = o.Error + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *CustomRedirectsReadCustomRedirect404Response) UnmarshalJSON(data []byte) (err error) { + varCustomRedirectsReadCustomRedirect404Response := _CustomRedirectsReadCustomRedirect404Response{} + + err = json.Unmarshal(data, &varCustomRedirectsReadCustomRedirect404Response) + + if err != nil { + return err + } + + *o = CustomRedirectsReadCustomRedirect404Response(varCustomRedirectsReadCustomRedirect404Response) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "error") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableCustomRedirectsReadCustomRedirect404Response struct { + value *CustomRedirectsReadCustomRedirect404Response + isSet bool +} + +func (v NullableCustomRedirectsReadCustomRedirect404Response) Get() *CustomRedirectsReadCustomRedirect404Response { + return v.value +} + +func (v *NullableCustomRedirectsReadCustomRedirect404Response) Set(val *CustomRedirectsReadCustomRedirect404Response) { + v.value = val + v.isSet = true +} + +func (v NullableCustomRedirectsReadCustomRedirect404Response) IsSet() bool { + return v.isSet +} + +func (v *NullableCustomRedirectsReadCustomRedirect404Response) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCustomRedirectsReadCustomRedirect404Response(val *CustomRedirectsReadCustomRedirect404Response) *NullableCustomRedirectsReadCustomRedirect404Response { + return &NullableCustomRedirectsReadCustomRedirect404Response{value: val, isSet: true} +} + +func (v NullableCustomRedirectsReadCustomRedirect404Response) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCustomRedirectsReadCustomRedirect404Response) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/redirect/model_custom_redirects_read_custom_redirect_404_response_error.go b/redirect/model_custom_redirects_read_custom_redirect_404_response_error.go new file mode 100644 index 0000000..e1a8ab2 --- /dev/null +++ b/redirect/model_custom_redirects_read_custom_redirect_404_response_error.go @@ -0,0 +1,227 @@ +/* +BloxOne Redirect API + +You can configure BloxOne Threat Defense Cloud to redirect traffic to the Infoblox server that displays the default or customized redirect page. You can redirect traffic to a custom destination using custom redirects. + +API version: v1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package redirect + +import ( + "encoding/json" +) + +// checks if the CustomRedirectsReadCustomRedirect404ResponseError type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CustomRedirectsReadCustomRedirect404ResponseError{} + +// CustomRedirectsReadCustomRedirect404ResponseError struct for CustomRedirectsReadCustomRedirect404ResponseError +type CustomRedirectsReadCustomRedirect404ResponseError struct { + Code *string `json:"code,omitempty"` + Message *string `json:"message,omitempty"` + Status *string `json:"status,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _CustomRedirectsReadCustomRedirect404ResponseError CustomRedirectsReadCustomRedirect404ResponseError + +// NewCustomRedirectsReadCustomRedirect404ResponseError instantiates a new CustomRedirectsReadCustomRedirect404ResponseError 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 NewCustomRedirectsReadCustomRedirect404ResponseError() *CustomRedirectsReadCustomRedirect404ResponseError { + this := CustomRedirectsReadCustomRedirect404ResponseError{} + return &this +} + +// NewCustomRedirectsReadCustomRedirect404ResponseErrorWithDefaults instantiates a new CustomRedirectsReadCustomRedirect404ResponseError 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 NewCustomRedirectsReadCustomRedirect404ResponseErrorWithDefaults() *CustomRedirectsReadCustomRedirect404ResponseError { + this := CustomRedirectsReadCustomRedirect404ResponseError{} + return &this +} + +// GetCode returns the Code field value if set, zero value otherwise. +func (o *CustomRedirectsReadCustomRedirect404ResponseError) GetCode() string { + if o == nil || IsNil(o.Code) { + var ret string + return ret + } + return *o.Code +} + +// GetCodeOk returns a tuple with the Code field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CustomRedirectsReadCustomRedirect404ResponseError) GetCodeOk() (*string, bool) { + if o == nil || IsNil(o.Code) { + return nil, false + } + return o.Code, true +} + +// HasCode returns a boolean if a field has been set. +func (o *CustomRedirectsReadCustomRedirect404ResponseError) HasCode() bool { + if o != nil && !IsNil(o.Code) { + return true + } + + return false +} + +// SetCode gets a reference to the given string and assigns it to the Code field. +func (o *CustomRedirectsReadCustomRedirect404ResponseError) SetCode(v string) { + o.Code = &v +} + +// GetMessage returns the Message field value if set, zero value otherwise. +func (o *CustomRedirectsReadCustomRedirect404ResponseError) 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 *CustomRedirectsReadCustomRedirect404ResponseError) 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 *CustomRedirectsReadCustomRedirect404ResponseError) 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 *CustomRedirectsReadCustomRedirect404ResponseError) SetMessage(v string) { + o.Message = &v +} + +// GetStatus returns the Status field value if set, zero value otherwise. +func (o *CustomRedirectsReadCustomRedirect404ResponseError) GetStatus() string { + if o == nil || IsNil(o.Status) { + var ret string + return ret + } + return *o.Status +} + +// GetStatusOk returns a tuple with the Status field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CustomRedirectsReadCustomRedirect404ResponseError) GetStatusOk() (*string, bool) { + if o == nil || IsNil(o.Status) { + return nil, false + } + return o.Status, true +} + +// HasStatus returns a boolean if a field has been set. +func (o *CustomRedirectsReadCustomRedirect404ResponseError) HasStatus() bool { + if o != nil && !IsNil(o.Status) { + return true + } + + return false +} + +// SetStatus gets a reference to the given string and assigns it to the Status field. +func (o *CustomRedirectsReadCustomRedirect404ResponseError) SetStatus(v string) { + o.Status = &v +} + +func (o CustomRedirectsReadCustomRedirect404ResponseError) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CustomRedirectsReadCustomRedirect404ResponseError) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Code) { + toSerialize["code"] = o.Code + } + if !IsNil(o.Message) { + toSerialize["message"] = o.Message + } + if !IsNil(o.Status) { + toSerialize["status"] = o.Status + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *CustomRedirectsReadCustomRedirect404ResponseError) UnmarshalJSON(data []byte) (err error) { + varCustomRedirectsReadCustomRedirect404ResponseError := _CustomRedirectsReadCustomRedirect404ResponseError{} + + err = json.Unmarshal(data, &varCustomRedirectsReadCustomRedirect404ResponseError) + + if err != nil { + return err + } + + *o = CustomRedirectsReadCustomRedirect404ResponseError(varCustomRedirectsReadCustomRedirect404ResponseError) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "code") + delete(additionalProperties, "message") + delete(additionalProperties, "status") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableCustomRedirectsReadCustomRedirect404ResponseError struct { + value *CustomRedirectsReadCustomRedirect404ResponseError + isSet bool +} + +func (v NullableCustomRedirectsReadCustomRedirect404ResponseError) Get() *CustomRedirectsReadCustomRedirect404ResponseError { + return v.value +} + +func (v *NullableCustomRedirectsReadCustomRedirect404ResponseError) Set(val *CustomRedirectsReadCustomRedirect404ResponseError) { + v.value = val + v.isSet = true +} + +func (v NullableCustomRedirectsReadCustomRedirect404ResponseError) IsSet() bool { + return v.isSet +} + +func (v *NullableCustomRedirectsReadCustomRedirect404ResponseError) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCustomRedirectsReadCustomRedirect404ResponseError(val *CustomRedirectsReadCustomRedirect404ResponseError) *NullableCustomRedirectsReadCustomRedirect404ResponseError { + return &NullableCustomRedirectsReadCustomRedirect404ResponseError{value: val, isSet: true} +} + +func (v NullableCustomRedirectsReadCustomRedirect404ResponseError) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCustomRedirectsReadCustomRedirect404ResponseError) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/redirect/model_custom_redirects_update_custom_redirect_409_response.go b/redirect/model_custom_redirects_update_custom_redirect_409_response.go new file mode 100644 index 0000000..43aeee5 --- /dev/null +++ b/redirect/model_custom_redirects_update_custom_redirect_409_response.go @@ -0,0 +1,153 @@ +/* +BloxOne Redirect API + +You can configure BloxOne Threat Defense Cloud to redirect traffic to the Infoblox server that displays the default or customized redirect page. You can redirect traffic to a custom destination using custom redirects. + +API version: v1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package redirect + +import ( + "encoding/json" +) + +// checks if the CustomRedirectsUpdateCustomRedirect409Response type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CustomRedirectsUpdateCustomRedirect409Response{} + +// CustomRedirectsUpdateCustomRedirect409Response struct for CustomRedirectsUpdateCustomRedirect409Response +type CustomRedirectsUpdateCustomRedirect409Response struct { + Error *CustomRedirectsUpdateCustomRedirect409ResponseError `json:"error,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _CustomRedirectsUpdateCustomRedirect409Response CustomRedirectsUpdateCustomRedirect409Response + +// NewCustomRedirectsUpdateCustomRedirect409Response instantiates a new CustomRedirectsUpdateCustomRedirect409Response 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 NewCustomRedirectsUpdateCustomRedirect409Response() *CustomRedirectsUpdateCustomRedirect409Response { + this := CustomRedirectsUpdateCustomRedirect409Response{} + return &this +} + +// NewCustomRedirectsUpdateCustomRedirect409ResponseWithDefaults instantiates a new CustomRedirectsUpdateCustomRedirect409Response 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 NewCustomRedirectsUpdateCustomRedirect409ResponseWithDefaults() *CustomRedirectsUpdateCustomRedirect409Response { + this := CustomRedirectsUpdateCustomRedirect409Response{} + return &this +} + +// GetError returns the Error field value if set, zero value otherwise. +func (o *CustomRedirectsUpdateCustomRedirect409Response) GetError() CustomRedirectsUpdateCustomRedirect409ResponseError { + if o == nil || IsNil(o.Error) { + var ret CustomRedirectsUpdateCustomRedirect409ResponseError + return ret + } + return *o.Error +} + +// GetErrorOk returns a tuple with the Error field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CustomRedirectsUpdateCustomRedirect409Response) GetErrorOk() (*CustomRedirectsUpdateCustomRedirect409ResponseError, bool) { + if o == nil || IsNil(o.Error) { + return nil, false + } + return o.Error, true +} + +// HasError returns a boolean if a field has been set. +func (o *CustomRedirectsUpdateCustomRedirect409Response) HasError() bool { + if o != nil && !IsNil(o.Error) { + return true + } + + return false +} + +// SetError gets a reference to the given CustomRedirectsUpdateCustomRedirect409ResponseError and assigns it to the Error field. +func (o *CustomRedirectsUpdateCustomRedirect409Response) SetError(v CustomRedirectsUpdateCustomRedirect409ResponseError) { + o.Error = &v +} + +func (o CustomRedirectsUpdateCustomRedirect409Response) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CustomRedirectsUpdateCustomRedirect409Response) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Error) { + toSerialize["error"] = o.Error + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *CustomRedirectsUpdateCustomRedirect409Response) UnmarshalJSON(data []byte) (err error) { + varCustomRedirectsUpdateCustomRedirect409Response := _CustomRedirectsUpdateCustomRedirect409Response{} + + err = json.Unmarshal(data, &varCustomRedirectsUpdateCustomRedirect409Response) + + if err != nil { + return err + } + + *o = CustomRedirectsUpdateCustomRedirect409Response(varCustomRedirectsUpdateCustomRedirect409Response) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "error") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableCustomRedirectsUpdateCustomRedirect409Response struct { + value *CustomRedirectsUpdateCustomRedirect409Response + isSet bool +} + +func (v NullableCustomRedirectsUpdateCustomRedirect409Response) Get() *CustomRedirectsUpdateCustomRedirect409Response { + return v.value +} + +func (v *NullableCustomRedirectsUpdateCustomRedirect409Response) Set(val *CustomRedirectsUpdateCustomRedirect409Response) { + v.value = val + v.isSet = true +} + +func (v NullableCustomRedirectsUpdateCustomRedirect409Response) IsSet() bool { + return v.isSet +} + +func (v *NullableCustomRedirectsUpdateCustomRedirect409Response) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCustomRedirectsUpdateCustomRedirect409Response(val *CustomRedirectsUpdateCustomRedirect409Response) *NullableCustomRedirectsUpdateCustomRedirect409Response { + return &NullableCustomRedirectsUpdateCustomRedirect409Response{value: val, isSet: true} +} + +func (v NullableCustomRedirectsUpdateCustomRedirect409Response) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCustomRedirectsUpdateCustomRedirect409Response) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/redirect/model_custom_redirects_update_custom_redirect_409_response_error.go b/redirect/model_custom_redirects_update_custom_redirect_409_response_error.go new file mode 100644 index 0000000..ce65058 --- /dev/null +++ b/redirect/model_custom_redirects_update_custom_redirect_409_response_error.go @@ -0,0 +1,227 @@ +/* +BloxOne Redirect API + +You can configure BloxOne Threat Defense Cloud to redirect traffic to the Infoblox server that displays the default or customized redirect page. You can redirect traffic to a custom destination using custom redirects. + +API version: v1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package redirect + +import ( + "encoding/json" +) + +// checks if the CustomRedirectsUpdateCustomRedirect409ResponseError type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CustomRedirectsUpdateCustomRedirect409ResponseError{} + +// CustomRedirectsUpdateCustomRedirect409ResponseError struct for CustomRedirectsUpdateCustomRedirect409ResponseError +type CustomRedirectsUpdateCustomRedirect409ResponseError struct { + Code *string `json:"code,omitempty"` + Message *string `json:"message,omitempty"` + Status *string `json:"status,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _CustomRedirectsUpdateCustomRedirect409ResponseError CustomRedirectsUpdateCustomRedirect409ResponseError + +// NewCustomRedirectsUpdateCustomRedirect409ResponseError instantiates a new CustomRedirectsUpdateCustomRedirect409ResponseError 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 NewCustomRedirectsUpdateCustomRedirect409ResponseError() *CustomRedirectsUpdateCustomRedirect409ResponseError { + this := CustomRedirectsUpdateCustomRedirect409ResponseError{} + return &this +} + +// NewCustomRedirectsUpdateCustomRedirect409ResponseErrorWithDefaults instantiates a new CustomRedirectsUpdateCustomRedirect409ResponseError 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 NewCustomRedirectsUpdateCustomRedirect409ResponseErrorWithDefaults() *CustomRedirectsUpdateCustomRedirect409ResponseError { + this := CustomRedirectsUpdateCustomRedirect409ResponseError{} + return &this +} + +// GetCode returns the Code field value if set, zero value otherwise. +func (o *CustomRedirectsUpdateCustomRedirect409ResponseError) GetCode() string { + if o == nil || IsNil(o.Code) { + var ret string + return ret + } + return *o.Code +} + +// GetCodeOk returns a tuple with the Code field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CustomRedirectsUpdateCustomRedirect409ResponseError) GetCodeOk() (*string, bool) { + if o == nil || IsNil(o.Code) { + return nil, false + } + return o.Code, true +} + +// HasCode returns a boolean if a field has been set. +func (o *CustomRedirectsUpdateCustomRedirect409ResponseError) HasCode() bool { + if o != nil && !IsNil(o.Code) { + return true + } + + return false +} + +// SetCode gets a reference to the given string and assigns it to the Code field. +func (o *CustomRedirectsUpdateCustomRedirect409ResponseError) SetCode(v string) { + o.Code = &v +} + +// GetMessage returns the Message field value if set, zero value otherwise. +func (o *CustomRedirectsUpdateCustomRedirect409ResponseError) 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 *CustomRedirectsUpdateCustomRedirect409ResponseError) 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 *CustomRedirectsUpdateCustomRedirect409ResponseError) 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 *CustomRedirectsUpdateCustomRedirect409ResponseError) SetMessage(v string) { + o.Message = &v +} + +// GetStatus returns the Status field value if set, zero value otherwise. +func (o *CustomRedirectsUpdateCustomRedirect409ResponseError) GetStatus() string { + if o == nil || IsNil(o.Status) { + var ret string + return ret + } + return *o.Status +} + +// GetStatusOk returns a tuple with the Status field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CustomRedirectsUpdateCustomRedirect409ResponseError) GetStatusOk() (*string, bool) { + if o == nil || IsNil(o.Status) { + return nil, false + } + return o.Status, true +} + +// HasStatus returns a boolean if a field has been set. +func (o *CustomRedirectsUpdateCustomRedirect409ResponseError) HasStatus() bool { + if o != nil && !IsNil(o.Status) { + return true + } + + return false +} + +// SetStatus gets a reference to the given string and assigns it to the Status field. +func (o *CustomRedirectsUpdateCustomRedirect409ResponseError) SetStatus(v string) { + o.Status = &v +} + +func (o CustomRedirectsUpdateCustomRedirect409ResponseError) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CustomRedirectsUpdateCustomRedirect409ResponseError) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Code) { + toSerialize["code"] = o.Code + } + if !IsNil(o.Message) { + toSerialize["message"] = o.Message + } + if !IsNil(o.Status) { + toSerialize["status"] = o.Status + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *CustomRedirectsUpdateCustomRedirect409ResponseError) UnmarshalJSON(data []byte) (err error) { + varCustomRedirectsUpdateCustomRedirect409ResponseError := _CustomRedirectsUpdateCustomRedirect409ResponseError{} + + err = json.Unmarshal(data, &varCustomRedirectsUpdateCustomRedirect409ResponseError) + + if err != nil { + return err + } + + *o = CustomRedirectsUpdateCustomRedirect409ResponseError(varCustomRedirectsUpdateCustomRedirect409ResponseError) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "code") + delete(additionalProperties, "message") + delete(additionalProperties, "status") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableCustomRedirectsUpdateCustomRedirect409ResponseError struct { + value *CustomRedirectsUpdateCustomRedirect409ResponseError + isSet bool +} + +func (v NullableCustomRedirectsUpdateCustomRedirect409ResponseError) Get() *CustomRedirectsUpdateCustomRedirect409ResponseError { + return v.value +} + +func (v *NullableCustomRedirectsUpdateCustomRedirect409ResponseError) Set(val *CustomRedirectsUpdateCustomRedirect409ResponseError) { + v.value = val + v.isSet = true +} + +func (v NullableCustomRedirectsUpdateCustomRedirect409ResponseError) IsSet() bool { + return v.isSet +} + +func (v *NullableCustomRedirectsUpdateCustomRedirect409ResponseError) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCustomRedirectsUpdateCustomRedirect409ResponseError(val *CustomRedirectsUpdateCustomRedirect409ResponseError) *NullableCustomRedirectsUpdateCustomRedirect409ResponseError { + return &NullableCustomRedirectsUpdateCustomRedirect409ResponseError{value: val, isSet: true} +} + +func (v NullableCustomRedirectsUpdateCustomRedirect409ResponseError) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCustomRedirectsUpdateCustomRedirect409ResponseError) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/redirect/model_proxy_cert_response.go b/redirect/model_proxy_cert_response.go new file mode 100644 index 0000000..f6ff859 --- /dev/null +++ b/redirect/model_proxy_cert_response.go @@ -0,0 +1,192 @@ +/* +BloxOne Redirect API + +You can configure BloxOne Threat Defense Cloud to redirect traffic to the Infoblox server that displays the default or customized redirect page. You can redirect traffic to a custom destination using custom redirects. + +API version: v1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package redirect + +import ( + "encoding/json" +) + +// checks if the ProxyCertResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ProxyCertResponse{} + +// ProxyCertResponse struct for ProxyCertResponse +type ProxyCertResponse struct { + // Infoblox anycast dns client certificate URL. + AnycastDnsCertificateUrl *string `json:"anycast_dns_certificate_url,omitempty"` + // The certificate URL. + CertificateUrl *string `json:"certificate_url,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _ProxyCertResponse ProxyCertResponse + +// NewProxyCertResponse instantiates a new ProxyCertResponse 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 NewProxyCertResponse() *ProxyCertResponse { + this := ProxyCertResponse{} + return &this +} + +// NewProxyCertResponseWithDefaults instantiates a new ProxyCertResponse 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 NewProxyCertResponseWithDefaults() *ProxyCertResponse { + this := ProxyCertResponse{} + return &this +} + +// GetAnycastDnsCertificateUrl returns the AnycastDnsCertificateUrl field value if set, zero value otherwise. +func (o *ProxyCertResponse) GetAnycastDnsCertificateUrl() string { + if o == nil || IsNil(o.AnycastDnsCertificateUrl) { + var ret string + return ret + } + return *o.AnycastDnsCertificateUrl +} + +// GetAnycastDnsCertificateUrlOk returns a tuple with the AnycastDnsCertificateUrl field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ProxyCertResponse) GetAnycastDnsCertificateUrlOk() (*string, bool) { + if o == nil || IsNil(o.AnycastDnsCertificateUrl) { + return nil, false + } + return o.AnycastDnsCertificateUrl, true +} + +// HasAnycastDnsCertificateUrl returns a boolean if a field has been set. +func (o *ProxyCertResponse) HasAnycastDnsCertificateUrl() bool { + if o != nil && !IsNil(o.AnycastDnsCertificateUrl) { + return true + } + + return false +} + +// SetAnycastDnsCertificateUrl gets a reference to the given string and assigns it to the AnycastDnsCertificateUrl field. +func (o *ProxyCertResponse) SetAnycastDnsCertificateUrl(v string) { + o.AnycastDnsCertificateUrl = &v +} + +// GetCertificateUrl returns the CertificateUrl field value if set, zero value otherwise. +func (o *ProxyCertResponse) GetCertificateUrl() string { + if o == nil || IsNil(o.CertificateUrl) { + var ret string + return ret + } + return *o.CertificateUrl +} + +// GetCertificateUrlOk returns a tuple with the CertificateUrl field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ProxyCertResponse) GetCertificateUrlOk() (*string, bool) { + if o == nil || IsNil(o.CertificateUrl) { + return nil, false + } + return o.CertificateUrl, true +} + +// HasCertificateUrl returns a boolean if a field has been set. +func (o *ProxyCertResponse) HasCertificateUrl() bool { + if o != nil && !IsNil(o.CertificateUrl) { + return true + } + + return false +} + +// SetCertificateUrl gets a reference to the given string and assigns it to the CertificateUrl field. +func (o *ProxyCertResponse) SetCertificateUrl(v string) { + o.CertificateUrl = &v +} + +func (o ProxyCertResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ProxyCertResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.AnycastDnsCertificateUrl) { + toSerialize["anycast_dns_certificate_url"] = o.AnycastDnsCertificateUrl + } + if !IsNil(o.CertificateUrl) { + toSerialize["certificate_url"] = o.CertificateUrl + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *ProxyCertResponse) UnmarshalJSON(data []byte) (err error) { + varProxyCertResponse := _ProxyCertResponse{} + + err = json.Unmarshal(data, &varProxyCertResponse) + + if err != nil { + return err + } + + *o = ProxyCertResponse(varProxyCertResponse) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "anycast_dns_certificate_url") + delete(additionalProperties, "certificate_url") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableProxyCertResponse struct { + value *ProxyCertResponse + isSet bool +} + +func (v NullableProxyCertResponse) Get() *ProxyCertResponse { + return v.value +} + +func (v *NullableProxyCertResponse) Set(val *ProxyCertResponse) { + v.value = val + v.isSet = true +} + +func (v NullableProxyCertResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableProxyCertResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableProxyCertResponse(val *ProxyCertResponse) *NullableProxyCertResponse { + return &NullableProxyCertResponse{value: val, isSet: true} +} + +func (v NullableProxyCertResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableProxyCertResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/redirect/model_redirect_page.go b/redirect/model_redirect_page.go new file mode 100644 index 0000000..841abdc --- /dev/null +++ b/redirect/model_redirect_page.go @@ -0,0 +1,383 @@ +/* +BloxOne Redirect API + +You can configure BloxOne Threat Defense Cloud to redirect traffic to the Infoblox server that displays the default or customized redirect page. You can redirect traffic to a custom destination using custom redirects. + +API version: v1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package redirect + +import ( + "encoding/json" + "time" +) + +// checks if the RedirectPage type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &RedirectPage{} + +// RedirectPage The Redirect Page object. When blocking users from accessing certain domains, you can redirect them to a page that delivers a default message about the action. You can also set a redirect page of your own or customize the redirect message. +type RedirectPage struct { + // The content of the redirect page for the \"custom\" redirect type. + Content *string `json:"content,omitempty"` + // The time when this Redirect Page object was created. + CreatedTime *time.Time `json:"created_time,omitempty"` + // The redirect IPv4 address. + RedirectIpAddress *string `json:"redirect_ip_address,omitempty"` + // The redirect IPv6 address. + RedirectIpv6Address *string `json:"redirect_ipv6_address,omitempty"` + // Whether the redirect type is smart + Smart *bool `json:"smart,omitempty"` + // The type of the redirect page that can be \"default\" or \"custom\". + Type *string `json:"type,omitempty"` + // The time when this Redirect Page object was last updated. + UpdatedTime *time.Time `json:"updated_time,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _RedirectPage RedirectPage + +// NewRedirectPage instantiates a new RedirectPage 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 NewRedirectPage() *RedirectPage { + this := RedirectPage{} + return &this +} + +// NewRedirectPageWithDefaults instantiates a new RedirectPage 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 NewRedirectPageWithDefaults() *RedirectPage { + this := RedirectPage{} + return &this +} + +// GetContent returns the Content field value if set, zero value otherwise. +func (o *RedirectPage) GetContent() string { + if o == nil || IsNil(o.Content) { + var ret string + return ret + } + return *o.Content +} + +// GetContentOk returns a tuple with the Content field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RedirectPage) GetContentOk() (*string, bool) { + if o == nil || IsNil(o.Content) { + return nil, false + } + return o.Content, true +} + +// HasContent returns a boolean if a field has been set. +func (o *RedirectPage) HasContent() bool { + if o != nil && !IsNil(o.Content) { + return true + } + + return false +} + +// SetContent gets a reference to the given string and assigns it to the Content field. +func (o *RedirectPage) SetContent(v string) { + o.Content = &v +} + +// GetCreatedTime returns the CreatedTime field value if set, zero value otherwise. +func (o *RedirectPage) GetCreatedTime() time.Time { + if o == nil || IsNil(o.CreatedTime) { + var ret time.Time + return ret + } + return *o.CreatedTime +} + +// GetCreatedTimeOk returns a tuple with the CreatedTime field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RedirectPage) GetCreatedTimeOk() (*time.Time, bool) { + if o == nil || IsNil(o.CreatedTime) { + return nil, false + } + return o.CreatedTime, true +} + +// HasCreatedTime returns a boolean if a field has been set. +func (o *RedirectPage) HasCreatedTime() bool { + if o != nil && !IsNil(o.CreatedTime) { + return true + } + + return false +} + +// SetCreatedTime gets a reference to the given time.Time and assigns it to the CreatedTime field. +func (o *RedirectPage) SetCreatedTime(v time.Time) { + o.CreatedTime = &v +} + +// GetRedirectIpAddress returns the RedirectIpAddress field value if set, zero value otherwise. +func (o *RedirectPage) GetRedirectIpAddress() string { + if o == nil || IsNil(o.RedirectIpAddress) { + var ret string + return ret + } + return *o.RedirectIpAddress +} + +// GetRedirectIpAddressOk returns a tuple with the RedirectIpAddress field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RedirectPage) GetRedirectIpAddressOk() (*string, bool) { + if o == nil || IsNil(o.RedirectIpAddress) { + return nil, false + } + return o.RedirectIpAddress, true +} + +// HasRedirectIpAddress returns a boolean if a field has been set. +func (o *RedirectPage) HasRedirectIpAddress() bool { + if o != nil && !IsNil(o.RedirectIpAddress) { + return true + } + + return false +} + +// SetRedirectIpAddress gets a reference to the given string and assigns it to the RedirectIpAddress field. +func (o *RedirectPage) SetRedirectIpAddress(v string) { + o.RedirectIpAddress = &v +} + +// GetRedirectIpv6Address returns the RedirectIpv6Address field value if set, zero value otherwise. +func (o *RedirectPage) GetRedirectIpv6Address() string { + if o == nil || IsNil(o.RedirectIpv6Address) { + var ret string + return ret + } + return *o.RedirectIpv6Address +} + +// GetRedirectIpv6AddressOk returns a tuple with the RedirectIpv6Address field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RedirectPage) GetRedirectIpv6AddressOk() (*string, bool) { + if o == nil || IsNil(o.RedirectIpv6Address) { + return nil, false + } + return o.RedirectIpv6Address, true +} + +// HasRedirectIpv6Address returns a boolean if a field has been set. +func (o *RedirectPage) HasRedirectIpv6Address() bool { + if o != nil && !IsNil(o.RedirectIpv6Address) { + return true + } + + return false +} + +// SetRedirectIpv6Address gets a reference to the given string and assigns it to the RedirectIpv6Address field. +func (o *RedirectPage) SetRedirectIpv6Address(v string) { + o.RedirectIpv6Address = &v +} + +// GetSmart returns the Smart field value if set, zero value otherwise. +func (o *RedirectPage) GetSmart() bool { + if o == nil || IsNil(o.Smart) { + var ret bool + return ret + } + return *o.Smart +} + +// GetSmartOk returns a tuple with the Smart field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RedirectPage) GetSmartOk() (*bool, bool) { + if o == nil || IsNil(o.Smart) { + return nil, false + } + return o.Smart, true +} + +// HasSmart returns a boolean if a field has been set. +func (o *RedirectPage) HasSmart() bool { + if o != nil && !IsNil(o.Smart) { + return true + } + + return false +} + +// SetSmart gets a reference to the given bool and assigns it to the Smart field. +func (o *RedirectPage) SetSmart(v bool) { + o.Smart = &v +} + +// GetType returns the Type field value if set, zero value otherwise. +func (o *RedirectPage) GetType() string { + if o == nil || IsNil(o.Type) { + var ret string + return ret + } + return *o.Type +} + +// GetTypeOk returns a tuple with the Type field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RedirectPage) GetTypeOk() (*string, bool) { + if o == nil || IsNil(o.Type) { + return nil, false + } + return o.Type, true +} + +// HasType returns a boolean if a field has been set. +func (o *RedirectPage) HasType() bool { + if o != nil && !IsNil(o.Type) { + return true + } + + return false +} + +// SetType gets a reference to the given string and assigns it to the Type field. +func (o *RedirectPage) SetType(v string) { + o.Type = &v +} + +// GetUpdatedTime returns the UpdatedTime field value if set, zero value otherwise. +func (o *RedirectPage) GetUpdatedTime() time.Time { + if o == nil || IsNil(o.UpdatedTime) { + var ret time.Time + return ret + } + return *o.UpdatedTime +} + +// GetUpdatedTimeOk returns a tuple with the UpdatedTime field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RedirectPage) GetUpdatedTimeOk() (*time.Time, bool) { + if o == nil || IsNil(o.UpdatedTime) { + return nil, false + } + return o.UpdatedTime, true +} + +// HasUpdatedTime returns a boolean if a field has been set. +func (o *RedirectPage) HasUpdatedTime() bool { + if o != nil && !IsNil(o.UpdatedTime) { + return true + } + + return false +} + +// SetUpdatedTime gets a reference to the given time.Time and assigns it to the UpdatedTime field. +func (o *RedirectPage) SetUpdatedTime(v time.Time) { + o.UpdatedTime = &v +} + +func (o RedirectPage) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o RedirectPage) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Content) { + toSerialize["content"] = o.Content + } + if !IsNil(o.CreatedTime) { + toSerialize["created_time"] = o.CreatedTime + } + if !IsNil(o.RedirectIpAddress) { + toSerialize["redirect_ip_address"] = o.RedirectIpAddress + } + if !IsNil(o.RedirectIpv6Address) { + toSerialize["redirect_ipv6_address"] = o.RedirectIpv6Address + } + if !IsNil(o.Smart) { + toSerialize["smart"] = o.Smart + } + if !IsNil(o.Type) { + toSerialize["type"] = o.Type + } + if !IsNil(o.UpdatedTime) { + toSerialize["updated_time"] = o.UpdatedTime + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *RedirectPage) UnmarshalJSON(data []byte) (err error) { + varRedirectPage := _RedirectPage{} + + err = json.Unmarshal(data, &varRedirectPage) + + if err != nil { + return err + } + + *o = RedirectPage(varRedirectPage) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "content") + delete(additionalProperties, "created_time") + delete(additionalProperties, "redirect_ip_address") + delete(additionalProperties, "redirect_ipv6_address") + delete(additionalProperties, "smart") + delete(additionalProperties, "type") + delete(additionalProperties, "updated_time") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableRedirectPage struct { + value *RedirectPage + isSet bool +} + +func (v NullableRedirectPage) Get() *RedirectPage { + return v.value +} + +func (v *NullableRedirectPage) Set(val *RedirectPage) { + v.value = val + v.isSet = true +} + +func (v NullableRedirectPage) IsSet() bool { + return v.isSet +} + +func (v *NullableRedirectPage) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableRedirectPage(val *RedirectPage) *NullableRedirectPage { + return &NullableRedirectPage{value: val, isSet: true} +} + +func (v NullableRedirectPage) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableRedirectPage) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/redirect/model_redirect_page_read_response.go b/redirect/model_redirect_page_read_response.go new file mode 100644 index 0000000..35b5322 --- /dev/null +++ b/redirect/model_redirect_page_read_response.go @@ -0,0 +1,153 @@ +/* +BloxOne Redirect API + +You can configure BloxOne Threat Defense Cloud to redirect traffic to the Infoblox server that displays the default or customized redirect page. You can redirect traffic to a custom destination using custom redirects. + +API version: v1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package redirect + +import ( + "encoding/json" +) + +// checks if the RedirectPageReadResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &RedirectPageReadResponse{} + +// RedirectPageReadResponse The Redirect Page read response. +type RedirectPageReadResponse struct { + Results *RedirectPage `json:"results,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _RedirectPageReadResponse RedirectPageReadResponse + +// NewRedirectPageReadResponse instantiates a new RedirectPageReadResponse 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 NewRedirectPageReadResponse() *RedirectPageReadResponse { + this := RedirectPageReadResponse{} + return &this +} + +// NewRedirectPageReadResponseWithDefaults instantiates a new RedirectPageReadResponse 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 NewRedirectPageReadResponseWithDefaults() *RedirectPageReadResponse { + this := RedirectPageReadResponse{} + return &this +} + +// GetResults returns the Results field value if set, zero value otherwise. +func (o *RedirectPageReadResponse) GetResults() RedirectPage { + if o == nil || IsNil(o.Results) { + var ret RedirectPage + 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 *RedirectPageReadResponse) GetResultsOk() (*RedirectPage, 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 *RedirectPageReadResponse) HasResults() bool { + if o != nil && !IsNil(o.Results) { + return true + } + + return false +} + +// SetResults gets a reference to the given RedirectPage and assigns it to the Results field. +func (o *RedirectPageReadResponse) SetResults(v RedirectPage) { + o.Results = &v +} + +func (o RedirectPageReadResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o RedirectPageReadResponse) 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 *RedirectPageReadResponse) UnmarshalJSON(data []byte) (err error) { + varRedirectPageReadResponse := _RedirectPageReadResponse{} + + err = json.Unmarshal(data, &varRedirectPageReadResponse) + + if err != nil { + return err + } + + *o = RedirectPageReadResponse(varRedirectPageReadResponse) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "results") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableRedirectPageReadResponse struct { + value *RedirectPageReadResponse + isSet bool +} + +func (v NullableRedirectPageReadResponse) Get() *RedirectPageReadResponse { + return v.value +} + +func (v *NullableRedirectPageReadResponse) Set(val *RedirectPageReadResponse) { + v.value = val + v.isSet = true +} + +func (v NullableRedirectPageReadResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableRedirectPageReadResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableRedirectPageReadResponse(val *RedirectPageReadResponse) *NullableRedirectPageReadResponse { + return &NullableRedirectPageReadResponse{value: val, isSet: true} +} + +func (v NullableRedirectPageReadResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableRedirectPageReadResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/redirect/model_redirect_page_update_redirect_page_400_response.go b/redirect/model_redirect_page_update_redirect_page_400_response.go new file mode 100644 index 0000000..12a2e61 --- /dev/null +++ b/redirect/model_redirect_page_update_redirect_page_400_response.go @@ -0,0 +1,153 @@ +/* +BloxOne Redirect API + +You can configure BloxOne Threat Defense Cloud to redirect traffic to the Infoblox server that displays the default or customized redirect page. You can redirect traffic to a custom destination using custom redirects. + +API version: v1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package redirect + +import ( + "encoding/json" +) + +// checks if the RedirectPageUpdateRedirectPage400Response type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &RedirectPageUpdateRedirectPage400Response{} + +// RedirectPageUpdateRedirectPage400Response struct for RedirectPageUpdateRedirectPage400Response +type RedirectPageUpdateRedirectPage400Response struct { + Error *RedirectPageUpdateRedirectPage400ResponseError `json:"error,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _RedirectPageUpdateRedirectPage400Response RedirectPageUpdateRedirectPage400Response + +// NewRedirectPageUpdateRedirectPage400Response instantiates a new RedirectPageUpdateRedirectPage400Response 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 NewRedirectPageUpdateRedirectPage400Response() *RedirectPageUpdateRedirectPage400Response { + this := RedirectPageUpdateRedirectPage400Response{} + return &this +} + +// NewRedirectPageUpdateRedirectPage400ResponseWithDefaults instantiates a new RedirectPageUpdateRedirectPage400Response 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 NewRedirectPageUpdateRedirectPage400ResponseWithDefaults() *RedirectPageUpdateRedirectPage400Response { + this := RedirectPageUpdateRedirectPage400Response{} + return &this +} + +// GetError returns the Error field value if set, zero value otherwise. +func (o *RedirectPageUpdateRedirectPage400Response) GetError() RedirectPageUpdateRedirectPage400ResponseError { + if o == nil || IsNil(o.Error) { + var ret RedirectPageUpdateRedirectPage400ResponseError + return ret + } + return *o.Error +} + +// GetErrorOk returns a tuple with the Error field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RedirectPageUpdateRedirectPage400Response) GetErrorOk() (*RedirectPageUpdateRedirectPage400ResponseError, bool) { + if o == nil || IsNil(o.Error) { + return nil, false + } + return o.Error, true +} + +// HasError returns a boolean if a field has been set. +func (o *RedirectPageUpdateRedirectPage400Response) HasError() bool { + if o != nil && !IsNil(o.Error) { + return true + } + + return false +} + +// SetError gets a reference to the given RedirectPageUpdateRedirectPage400ResponseError and assigns it to the Error field. +func (o *RedirectPageUpdateRedirectPage400Response) SetError(v RedirectPageUpdateRedirectPage400ResponseError) { + o.Error = &v +} + +func (o RedirectPageUpdateRedirectPage400Response) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o RedirectPageUpdateRedirectPage400Response) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Error) { + toSerialize["error"] = o.Error + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *RedirectPageUpdateRedirectPage400Response) UnmarshalJSON(data []byte) (err error) { + varRedirectPageUpdateRedirectPage400Response := _RedirectPageUpdateRedirectPage400Response{} + + err = json.Unmarshal(data, &varRedirectPageUpdateRedirectPage400Response) + + if err != nil { + return err + } + + *o = RedirectPageUpdateRedirectPage400Response(varRedirectPageUpdateRedirectPage400Response) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "error") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableRedirectPageUpdateRedirectPage400Response struct { + value *RedirectPageUpdateRedirectPage400Response + isSet bool +} + +func (v NullableRedirectPageUpdateRedirectPage400Response) Get() *RedirectPageUpdateRedirectPage400Response { + return v.value +} + +func (v *NullableRedirectPageUpdateRedirectPage400Response) Set(val *RedirectPageUpdateRedirectPage400Response) { + v.value = val + v.isSet = true +} + +func (v NullableRedirectPageUpdateRedirectPage400Response) IsSet() bool { + return v.isSet +} + +func (v *NullableRedirectPageUpdateRedirectPage400Response) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableRedirectPageUpdateRedirectPage400Response(val *RedirectPageUpdateRedirectPage400Response) *NullableRedirectPageUpdateRedirectPage400Response { + return &NullableRedirectPageUpdateRedirectPage400Response{value: val, isSet: true} +} + +func (v NullableRedirectPageUpdateRedirectPage400Response) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableRedirectPageUpdateRedirectPage400Response) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/redirect/model_redirect_page_update_redirect_page_400_response_error.go b/redirect/model_redirect_page_update_redirect_page_400_response_error.go new file mode 100644 index 0000000..b8eaece --- /dev/null +++ b/redirect/model_redirect_page_update_redirect_page_400_response_error.go @@ -0,0 +1,227 @@ +/* +BloxOne Redirect API + +You can configure BloxOne Threat Defense Cloud to redirect traffic to the Infoblox server that displays the default or customized redirect page. You can redirect traffic to a custom destination using custom redirects. + +API version: v1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package redirect + +import ( + "encoding/json" +) + +// checks if the RedirectPageUpdateRedirectPage400ResponseError type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &RedirectPageUpdateRedirectPage400ResponseError{} + +// RedirectPageUpdateRedirectPage400ResponseError struct for RedirectPageUpdateRedirectPage400ResponseError +type RedirectPageUpdateRedirectPage400ResponseError struct { + Code *string `json:"code,omitempty"` + Message *string `json:"message,omitempty"` + Status *string `json:"status,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _RedirectPageUpdateRedirectPage400ResponseError RedirectPageUpdateRedirectPage400ResponseError + +// NewRedirectPageUpdateRedirectPage400ResponseError instantiates a new RedirectPageUpdateRedirectPage400ResponseError 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 NewRedirectPageUpdateRedirectPage400ResponseError() *RedirectPageUpdateRedirectPage400ResponseError { + this := RedirectPageUpdateRedirectPage400ResponseError{} + return &this +} + +// NewRedirectPageUpdateRedirectPage400ResponseErrorWithDefaults instantiates a new RedirectPageUpdateRedirectPage400ResponseError 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 NewRedirectPageUpdateRedirectPage400ResponseErrorWithDefaults() *RedirectPageUpdateRedirectPage400ResponseError { + this := RedirectPageUpdateRedirectPage400ResponseError{} + return &this +} + +// GetCode returns the Code field value if set, zero value otherwise. +func (o *RedirectPageUpdateRedirectPage400ResponseError) GetCode() string { + if o == nil || IsNil(o.Code) { + var ret string + return ret + } + return *o.Code +} + +// GetCodeOk returns a tuple with the Code field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RedirectPageUpdateRedirectPage400ResponseError) GetCodeOk() (*string, bool) { + if o == nil || IsNil(o.Code) { + return nil, false + } + return o.Code, true +} + +// HasCode returns a boolean if a field has been set. +func (o *RedirectPageUpdateRedirectPage400ResponseError) HasCode() bool { + if o != nil && !IsNil(o.Code) { + return true + } + + return false +} + +// SetCode gets a reference to the given string and assigns it to the Code field. +func (o *RedirectPageUpdateRedirectPage400ResponseError) SetCode(v string) { + o.Code = &v +} + +// GetMessage returns the Message field value if set, zero value otherwise. +func (o *RedirectPageUpdateRedirectPage400ResponseError) 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 *RedirectPageUpdateRedirectPage400ResponseError) 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 *RedirectPageUpdateRedirectPage400ResponseError) 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 *RedirectPageUpdateRedirectPage400ResponseError) SetMessage(v string) { + o.Message = &v +} + +// GetStatus returns the Status field value if set, zero value otherwise. +func (o *RedirectPageUpdateRedirectPage400ResponseError) GetStatus() string { + if o == nil || IsNil(o.Status) { + var ret string + return ret + } + return *o.Status +} + +// GetStatusOk returns a tuple with the Status field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RedirectPageUpdateRedirectPage400ResponseError) GetStatusOk() (*string, bool) { + if o == nil || IsNil(o.Status) { + return nil, false + } + return o.Status, true +} + +// HasStatus returns a boolean if a field has been set. +func (o *RedirectPageUpdateRedirectPage400ResponseError) HasStatus() bool { + if o != nil && !IsNil(o.Status) { + return true + } + + return false +} + +// SetStatus gets a reference to the given string and assigns it to the Status field. +func (o *RedirectPageUpdateRedirectPage400ResponseError) SetStatus(v string) { + o.Status = &v +} + +func (o RedirectPageUpdateRedirectPage400ResponseError) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o RedirectPageUpdateRedirectPage400ResponseError) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Code) { + toSerialize["code"] = o.Code + } + if !IsNil(o.Message) { + toSerialize["message"] = o.Message + } + if !IsNil(o.Status) { + toSerialize["status"] = o.Status + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *RedirectPageUpdateRedirectPage400ResponseError) UnmarshalJSON(data []byte) (err error) { + varRedirectPageUpdateRedirectPage400ResponseError := _RedirectPageUpdateRedirectPage400ResponseError{} + + err = json.Unmarshal(data, &varRedirectPageUpdateRedirectPage400ResponseError) + + if err != nil { + return err + } + + *o = RedirectPageUpdateRedirectPage400ResponseError(varRedirectPageUpdateRedirectPage400ResponseError) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "code") + delete(additionalProperties, "message") + delete(additionalProperties, "status") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableRedirectPageUpdateRedirectPage400ResponseError struct { + value *RedirectPageUpdateRedirectPage400ResponseError + isSet bool +} + +func (v NullableRedirectPageUpdateRedirectPage400ResponseError) Get() *RedirectPageUpdateRedirectPage400ResponseError { + return v.value +} + +func (v *NullableRedirectPageUpdateRedirectPage400ResponseError) Set(val *RedirectPageUpdateRedirectPage400ResponseError) { + v.value = val + v.isSet = true +} + +func (v NullableRedirectPageUpdateRedirectPage400ResponseError) IsSet() bool { + return v.isSet +} + +func (v *NullableRedirectPageUpdateRedirectPage400ResponseError) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableRedirectPageUpdateRedirectPage400ResponseError(val *RedirectPageUpdateRedirectPage400ResponseError) *NullableRedirectPageUpdateRedirectPage400ResponseError { + return &NullableRedirectPageUpdateRedirectPage400ResponseError{value: val, isSet: true} +} + +func (v NullableRedirectPageUpdateRedirectPage400ResponseError) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableRedirectPageUpdateRedirectPage400ResponseError) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/redirect/model_redirect_page_update_response.go b/redirect/model_redirect_page_update_response.go new file mode 100644 index 0000000..003ef40 --- /dev/null +++ b/redirect/model_redirect_page_update_response.go @@ -0,0 +1,153 @@ +/* +BloxOne Redirect API + +You can configure BloxOne Threat Defense Cloud to redirect traffic to the Infoblox server that displays the default or customized redirect page. You can redirect traffic to a custom destination using custom redirects. + +API version: v1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package redirect + +import ( + "encoding/json" +) + +// checks if the RedirectPageUpdateResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &RedirectPageUpdateResponse{} + +// RedirectPageUpdateResponse The Redirect Page update response. +type RedirectPageUpdateResponse struct { + Results *RedirectPage `json:"results,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _RedirectPageUpdateResponse RedirectPageUpdateResponse + +// NewRedirectPageUpdateResponse instantiates a new RedirectPageUpdateResponse 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 NewRedirectPageUpdateResponse() *RedirectPageUpdateResponse { + this := RedirectPageUpdateResponse{} + return &this +} + +// NewRedirectPageUpdateResponseWithDefaults instantiates a new RedirectPageUpdateResponse 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 NewRedirectPageUpdateResponseWithDefaults() *RedirectPageUpdateResponse { + this := RedirectPageUpdateResponse{} + return &this +} + +// GetResults returns the Results field value if set, zero value otherwise. +func (o *RedirectPageUpdateResponse) GetResults() RedirectPage { + if o == nil || IsNil(o.Results) { + var ret RedirectPage + 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 *RedirectPageUpdateResponse) GetResultsOk() (*RedirectPage, 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 *RedirectPageUpdateResponse) HasResults() bool { + if o != nil && !IsNil(o.Results) { + return true + } + + return false +} + +// SetResults gets a reference to the given RedirectPage and assigns it to the Results field. +func (o *RedirectPageUpdateResponse) SetResults(v RedirectPage) { + o.Results = &v +} + +func (o RedirectPageUpdateResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o RedirectPageUpdateResponse) 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 *RedirectPageUpdateResponse) UnmarshalJSON(data []byte) (err error) { + varRedirectPageUpdateResponse := _RedirectPageUpdateResponse{} + + err = json.Unmarshal(data, &varRedirectPageUpdateResponse) + + if err != nil { + return err + } + + *o = RedirectPageUpdateResponse(varRedirectPageUpdateResponse) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "results") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableRedirectPageUpdateResponse struct { + value *RedirectPageUpdateResponse + isSet bool +} + +func (v NullableRedirectPageUpdateResponse) Get() *RedirectPageUpdateResponse { + return v.value +} + +func (v *NullableRedirectPageUpdateResponse) Set(val *RedirectPageUpdateResponse) { + v.value = val + v.isSet = true +} + +func (v NullableRedirectPageUpdateResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableRedirectPageUpdateResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableRedirectPageUpdateResponse(val *RedirectPageUpdateResponse) *NullableRedirectPageUpdateResponse { + return &NullableRedirectPageUpdateResponse{value: val, isSet: true} +} + +func (v NullableRedirectPageUpdateResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableRedirectPageUpdateResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/redirect/model_update_redirect_page_payload.go b/redirect/model_update_redirect_page_payload.go new file mode 100644 index 0000000..535963e --- /dev/null +++ b/redirect/model_update_redirect_page_payload.go @@ -0,0 +1,306 @@ +/* +BloxOne Redirect API + +You can configure BloxOne Threat Defense Cloud to redirect traffic to the Infoblox server that displays the default or customized redirect page. You can redirect traffic to a custom destination using custom redirects. + +API version: v1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package redirect + +import ( + "encoding/json" +) + +// checks if the UpdateRedirectPagePayload type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &UpdateRedirectPagePayload{} + +// UpdateRedirectPagePayload struct for UpdateRedirectPagePayload +type UpdateRedirectPagePayload struct { + // The content of the redirect page for the \"custom\" redirect type. + Content *string `json:"content,omitempty"` + // The redirect IPv4 address. + RedirectIpAddress *string `json:"redirect_ip_address,omitempty"` + // The redirect IPv6 address. + RedirectIpv6Address *string `json:"redirect_ipv6_address,omitempty"` + // Change the redirect page from non-proxy (smart == false) to proxy (smart) + Smart *bool `json:"smart,omitempty"` + // The type of the redirect page that can be \"default\" or \"custom\". + Type *string `json:"type,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _UpdateRedirectPagePayload UpdateRedirectPagePayload + +// NewUpdateRedirectPagePayload instantiates a new UpdateRedirectPagePayload 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 NewUpdateRedirectPagePayload() *UpdateRedirectPagePayload { + this := UpdateRedirectPagePayload{} + return &this +} + +// NewUpdateRedirectPagePayloadWithDefaults instantiates a new UpdateRedirectPagePayload 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 NewUpdateRedirectPagePayloadWithDefaults() *UpdateRedirectPagePayload { + this := UpdateRedirectPagePayload{} + return &this +} + +// GetContent returns the Content field value if set, zero value otherwise. +func (o *UpdateRedirectPagePayload) GetContent() string { + if o == nil || IsNil(o.Content) { + var ret string + return ret + } + return *o.Content +} + +// GetContentOk returns a tuple with the Content field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdateRedirectPagePayload) GetContentOk() (*string, bool) { + if o == nil || IsNil(o.Content) { + return nil, false + } + return o.Content, true +} + +// HasContent returns a boolean if a field has been set. +func (o *UpdateRedirectPagePayload) HasContent() bool { + if o != nil && !IsNil(o.Content) { + return true + } + + return false +} + +// SetContent gets a reference to the given string and assigns it to the Content field. +func (o *UpdateRedirectPagePayload) SetContent(v string) { + o.Content = &v +} + +// GetRedirectIpAddress returns the RedirectIpAddress field value if set, zero value otherwise. +func (o *UpdateRedirectPagePayload) GetRedirectIpAddress() string { + if o == nil || IsNil(o.RedirectIpAddress) { + var ret string + return ret + } + return *o.RedirectIpAddress +} + +// GetRedirectIpAddressOk returns a tuple with the RedirectIpAddress field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdateRedirectPagePayload) GetRedirectIpAddressOk() (*string, bool) { + if o == nil || IsNil(o.RedirectIpAddress) { + return nil, false + } + return o.RedirectIpAddress, true +} + +// HasRedirectIpAddress returns a boolean if a field has been set. +func (o *UpdateRedirectPagePayload) HasRedirectIpAddress() bool { + if o != nil && !IsNil(o.RedirectIpAddress) { + return true + } + + return false +} + +// SetRedirectIpAddress gets a reference to the given string and assigns it to the RedirectIpAddress field. +func (o *UpdateRedirectPagePayload) SetRedirectIpAddress(v string) { + o.RedirectIpAddress = &v +} + +// GetRedirectIpv6Address returns the RedirectIpv6Address field value if set, zero value otherwise. +func (o *UpdateRedirectPagePayload) GetRedirectIpv6Address() string { + if o == nil || IsNil(o.RedirectIpv6Address) { + var ret string + return ret + } + return *o.RedirectIpv6Address +} + +// GetRedirectIpv6AddressOk returns a tuple with the RedirectIpv6Address field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdateRedirectPagePayload) GetRedirectIpv6AddressOk() (*string, bool) { + if o == nil || IsNil(o.RedirectIpv6Address) { + return nil, false + } + return o.RedirectIpv6Address, true +} + +// HasRedirectIpv6Address returns a boolean if a field has been set. +func (o *UpdateRedirectPagePayload) HasRedirectIpv6Address() bool { + if o != nil && !IsNil(o.RedirectIpv6Address) { + return true + } + + return false +} + +// SetRedirectIpv6Address gets a reference to the given string and assigns it to the RedirectIpv6Address field. +func (o *UpdateRedirectPagePayload) SetRedirectIpv6Address(v string) { + o.RedirectIpv6Address = &v +} + +// GetSmart returns the Smart field value if set, zero value otherwise. +func (o *UpdateRedirectPagePayload) GetSmart() bool { + if o == nil || IsNil(o.Smart) { + var ret bool + return ret + } + return *o.Smart +} + +// GetSmartOk returns a tuple with the Smart field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdateRedirectPagePayload) GetSmartOk() (*bool, bool) { + if o == nil || IsNil(o.Smart) { + return nil, false + } + return o.Smart, true +} + +// HasSmart returns a boolean if a field has been set. +func (o *UpdateRedirectPagePayload) HasSmart() bool { + if o != nil && !IsNil(o.Smart) { + return true + } + + return false +} + +// SetSmart gets a reference to the given bool and assigns it to the Smart field. +func (o *UpdateRedirectPagePayload) SetSmart(v bool) { + o.Smart = &v +} + +// GetType returns the Type field value if set, zero value otherwise. +func (o *UpdateRedirectPagePayload) GetType() string { + if o == nil || IsNil(o.Type) { + var ret string + return ret + } + return *o.Type +} + +// GetTypeOk returns a tuple with the Type field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdateRedirectPagePayload) GetTypeOk() (*string, bool) { + if o == nil || IsNil(o.Type) { + return nil, false + } + return o.Type, true +} + +// HasType returns a boolean if a field has been set. +func (o *UpdateRedirectPagePayload) HasType() bool { + if o != nil && !IsNil(o.Type) { + return true + } + + return false +} + +// SetType gets a reference to the given string and assigns it to the Type field. +func (o *UpdateRedirectPagePayload) SetType(v string) { + o.Type = &v +} + +func (o UpdateRedirectPagePayload) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o UpdateRedirectPagePayload) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Content) { + toSerialize["content"] = o.Content + } + if !IsNil(o.RedirectIpAddress) { + toSerialize["redirect_ip_address"] = o.RedirectIpAddress + } + if !IsNil(o.RedirectIpv6Address) { + toSerialize["redirect_ipv6_address"] = o.RedirectIpv6Address + } + if !IsNil(o.Smart) { + toSerialize["smart"] = o.Smart + } + if !IsNil(o.Type) { + toSerialize["type"] = o.Type + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *UpdateRedirectPagePayload) UnmarshalJSON(data []byte) (err error) { + varUpdateRedirectPagePayload := _UpdateRedirectPagePayload{} + + err = json.Unmarshal(data, &varUpdateRedirectPagePayload) + + if err != nil { + return err + } + + *o = UpdateRedirectPagePayload(varUpdateRedirectPagePayload) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "content") + delete(additionalProperties, "redirect_ip_address") + delete(additionalProperties, "redirect_ipv6_address") + delete(additionalProperties, "smart") + delete(additionalProperties, "type") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableUpdateRedirectPagePayload struct { + value *UpdateRedirectPagePayload + isSet bool +} + +func (v NullableUpdateRedirectPagePayload) Get() *UpdateRedirectPagePayload { + return v.value +} + +func (v *NullableUpdateRedirectPagePayload) Set(val *UpdateRedirectPagePayload) { + v.value = val + v.isSet = true +} + +func (v NullableUpdateRedirectPagePayload) IsSet() bool { + return v.isSet +} + +func (v *NullableUpdateRedirectPagePayload) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableUpdateRedirectPagePayload(val *UpdateRedirectPagePayload) *NullableUpdateRedirectPagePayload { + return &NullableUpdateRedirectPagePayload{value: val, isSet: true} +} + +func (v NullableUpdateRedirectPagePayload) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableUpdateRedirectPagePayload) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/redirect/test/api_certificate_test.go b/redirect/test/api_certificate_test.go new file mode 100644 index 0000000..b03dd2e --- /dev/null +++ b/redirect/test/api_certificate_test.go @@ -0,0 +1,38 @@ +/* +BloxOne Redirect API + +Testing CertificateAPIService + +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); + +package redirect + +import ( + "context" + "testing" + + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + + "github.com/infobloxopen/bloxone-go-client/redirect" +) + +func TestCertificateAPIService(t *testing.T) { + + apiClient := redirect.NewAPIClient() + + t.Run("Test CertificateAPIService GetProxyCertificates", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.CertificateAPI.GetProxyCertificates(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + +} diff --git a/redirect/test/api_custom_redirects_test.go b/redirect/test/api_custom_redirects_test.go new file mode 100644 index 0000000..f737e7e --- /dev/null +++ b/redirect/test/api_custom_redirects_test.go @@ -0,0 +1,102 @@ +/* +BloxOne Redirect API + +Testing CustomRedirectsAPIService + +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); + +package redirect + +import ( + "context" + "testing" + + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + + "github.com/infobloxopen/bloxone-go-client/redirect" +) + +func TestCustomRedirectsAPIService(t *testing.T) { + + apiClient := redirect.NewAPIClient() + + t.Run("Test CustomRedirectsAPIService CreateCustomRedirect", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.CustomRedirectsAPI.CreateCustomRedirect(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test CustomRedirectsAPIService DeleteCustomRedirect", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + httpRes, err := apiClient.CustomRedirectsAPI.DeleteCustomRedirect(context.Background()).Execute() + + require.Nil(t, err) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test CustomRedirectsAPIService DeleteSingleCustomRedirect", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var id int32 + + httpRes, err := apiClient.CustomRedirectsAPI.DeleteSingleCustomRedirect(context.Background(), id).Execute() + + require.Nil(t, err) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test CustomRedirectsAPIService ListCustomRedirect", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.CustomRedirectsAPI.ListCustomRedirect(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test CustomRedirectsAPIService ReadCustomRedirect", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var id int32 + + resp, httpRes, err := apiClient.CustomRedirectsAPI.ReadCustomRedirect(context.Background(), id).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test CustomRedirectsAPIService UpdateCustomRedirect", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var id int32 + + resp, httpRes, err := apiClient.CustomRedirectsAPI.UpdateCustomRedirect(context.Background(), id).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + +} diff --git a/redirect/test/api_redirect_page_test.go b/redirect/test/api_redirect_page_test.go new file mode 100644 index 0000000..7d3bbb2 --- /dev/null +++ b/redirect/test/api_redirect_page_test.go @@ -0,0 +1,50 @@ +/* +BloxOne Redirect API + +Testing RedirectPageAPIService + +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); + +package redirect + +import ( + "context" + "testing" + + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + + "github.com/infobloxopen/bloxone-go-client/redirect" +) + +func TestRedirectPageAPIService(t *testing.T) { + + apiClient := redirect.NewAPIClient() + + t.Run("Test RedirectPageAPIService ReadRedirectPage", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.RedirectPageAPI.ReadRedirectPage(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test RedirectPageAPIService UpdateRedirectPage", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.RedirectPageAPI.UpdateRedirectPage(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + +} diff --git a/redirect/utils.go b/redirect/utils.go new file mode 100644 index 0000000..3ec5d98 --- /dev/null +++ b/redirect/utils.go @@ -0,0 +1,347 @@ +/* +BloxOne Redirect API + +You can configure BloxOne Threat Defense Cloud to redirect traffic to the Infoblox server that displays the default or customized redirect page. You can redirect traffic to a custom destination using custom redirects. + +API version: v1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package redirect + +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) +}