diff --git a/README.md b/README.md index 46c15db..d4b335e 100644 --- a/README.md +++ b/README.md @@ -8,6 +8,7 @@ The following Bloxone APIs are supported: - [Infrastructure Management](infra_mgmt/README.md) - [Infrastructure Provision (HostActivation API)](infra_provision/README.md) - [Anycast Configuration Manager](anycast/README.md) +- [Upgrade Policy](upgradePolicy/README.md) ## Bloxone Threat Defense - [Threat Defense Cloud (FW API)](fw/README.md) diff --git a/client/client.go b/client/client.go index aefebe5..a68782d 100644 --- a/client/client.go +++ b/client/client.go @@ -12,6 +12,7 @@ import ( "github.com/infobloxopen/bloxone-go-client/keys" "github.com/infobloxopen/bloxone-go-client/option" "github.com/infobloxopen/bloxone-go-client/redirect" + "github.com/infobloxopen/bloxone-go-client/upgradepolicy" ) // APIClient is an aggregation of different BloxOne API clients. @@ -26,6 +27,7 @@ type APIClient struct { FWAPI *fw.APIClient AnycastAPI *anycast.APIClient RedirectAPI *redirect.APIClient + UpgradePolicyClientAPI *upgradepolicy.APIClient } // NewAPIClient creates a new BloxOne API Client. @@ -40,6 +42,7 @@ type APIClient struct { // - DNSForwardingProxyAPI // - FWAPI // - AnycastAPI +// - UpgradePolicyClientAPI // // 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. @@ -60,5 +63,6 @@ func NewAPIClient(options ...option.ClientOption) *APIClient { FWAPI: fw.NewAPIClient(options...), AnycastAPI: anycast.NewAPIClient(options...), RedirectAPI: redirect.NewAPIClient(options...), + UpgradePolicyClientAPI: upgradepolicy.NewAPIClient(options...), } } diff --git a/upgradepolicy/.openapi-generator-ignore b/upgradepolicy/.openapi-generator-ignore new file mode 100644 index 0000000..7484ee5 --- /dev/null +++ b/upgradepolicy/.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/upgradepolicy/.openapi-generator/FILES b/upgradepolicy/.openapi-generator/FILES new file mode 100644 index 0000000..94b37cf --- /dev/null +++ b/upgradepolicy/.openapi-generator/FILES @@ -0,0 +1,52 @@ +.openapi-generator-ignore +README.md +api/openapi.yaml +api_upgrade_policy_v2.go +client.go +docs/ApplyConfigNowRequest.md +docs/ApplyConfigNowResponse.md +docs/ApplyConfigNowStatus.md +docs/BatchMaintenanceWindow.md +docs/BatchMaintenanceWindowRequest.md +docs/BatchMaintenanceWindowResponse.md +docs/BatchMaintenanceWindowResult.md +docs/CreateMaintenanceWindow.md +docs/CreateMaintenanceWindowRequest.md +docs/CreateMaintenanceWindowResponse.md +docs/DeferredWindow.md +docs/DeleteMaintenanceWindowResponse.md +docs/GetMaintenanceWindowResponse.md +docs/ListMaintenanceWindowResponse.md +docs/MaintenanceWindow.md +docs/OnpremDetails.md +docs/ScheduledWindow.md +docs/StatusCode.md +docs/UpdateBatchMaintenanceWindow.md +docs/UpdateMaintenanceWindow.md +docs/UpdateMaintenanceWindowRequest.md +docs/UpdateMaintenanceWindowResponse.md +docs/UpgradePolicyV2API.md +model_apply_config_now_request.go +model_apply_config_now_response.go +model_apply_config_now_status.go +model_batch_maintenance_window.go +model_batch_maintenance_window_request.go +model_batch_maintenance_window_response.go +model_batch_maintenance_window_result.go +model_create_maintenance_window.go +model_create_maintenance_window_request.go +model_create_maintenance_window_response.go +model_deferred_window.go +model_delete_maintenance_window_response.go +model_get_maintenance_window_response.go +model_list_maintenance_window_response.go +model_maintenance_window.go +model_onprem_details.go +model_scheduled_window.go +model_status_code.go +model_update_batch_maintenance_window.go +model_update_maintenance_window.go +model_update_maintenance_window_request.go +model_update_maintenance_window_response.go +test/api_upgrade_policy_v2_test.go +utils.go diff --git a/upgradepolicy/.openapi-generator/VERSION b/upgradepolicy/.openapi-generator/VERSION new file mode 100644 index 0000000..18bb418 --- /dev/null +++ b/upgradepolicy/.openapi-generator/VERSION @@ -0,0 +1 @@ +7.5.0 diff --git a/upgradepolicy/README.md b/upgradepolicy/README.md new file mode 100644 index 0000000..27702d8 --- /dev/null +++ b/upgradepolicy/README.md @@ -0,0 +1,137 @@ +# Go API client for Schedule Software/Config Updates + +Infoblox by default does automatic software updates when they become available. Updates are applied to all on-prem hosts, physical or virtual. However, you can override and schedule the software updates. You can also defer the updates to a later date and time. You can configure up to a total of 50 deferrals (scheduled and deferred software updates), which means you have the flexibility to create up to 50 update groups across different on-prem hosts by mapping with appropriate tags. Tags are be used to associate deferrals (scheduled or deferred) with a specific or group of onprem-hosts. Apart from software update deferrals, config update deferrals also can be configured using these overrides. + +## 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: v2 +- 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/upgradepolicy +``` + +Import the package into your code: +```go +import "github.com/infobloxopen/bloxone-go-client/upgradepolicy" +``` + +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 := upgradepolicy.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 := upgradepolicy.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 := upgradepolicy.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 Schedule Software/Config Updates. 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 Schedule Software/Config Updates, you can use the `option.WithAPIKey` option. For example: + +```go +client := upgradepolicy.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 := upgradepolicy.NewAPIClient(option.WithDefaultTags(map[string]string{"tag1": "value1", "tag2": "value2"})) +``` +This will add the tags `tag1=value1` and `tag2=value2` to all API requests that support tags in the request body. + +## Documentation for API Endpoints + +All URIs are relative to *http://csp.infoblox.com/api/upgrade_policy* + +Class | Method | HTTP request | Description +------------ | ------------- | ------------- | ------------- +*UpgradePolicyV2API* | [**ApplyConfigNow**](docs/UpgradePolicyV2API.md#applyconfignow) | **Post** /v2/config/apply_now | Immediately apply the config updates object to the list of hosts +*UpgradePolicyV2API* | [**Batch**](docs/UpgradePolicyV2API.md#batch) | **Post** /v2/maintenance_windows/batch | Create, update and/or delete multiple maintenance windows in a single request +*UpgradePolicyV2API* | [**Create**](docs/UpgradePolicyV2API.md#create) | **Post** /v2/maintenance_windows | Create a maintenance window +*UpgradePolicyV2API* | [**Delete**](docs/UpgradePolicyV2API.md#delete) | **Delete** /v2/maintenance_windows/{id} | Delete maintenance window +*UpgradePolicyV2API* | [**Get**](docs/UpgradePolicyV2API.md#get) | **Get** /v2/maintenance_windows/{id} | Read a maintenance window +*UpgradePolicyV2API* | [**List**](docs/UpgradePolicyV2API.md#list) | **Get** /v2/maintenance_windows | List all the maintenance windows +*UpgradePolicyV2API* | [**Update**](docs/UpgradePolicyV2API.md#update) | **Patch** /v2/maintenance_windows/{id} | Update an existing maintenance window + + +## Documentation For Models + + - [ApplyConfigNowRequest](docs/ApplyConfigNowRequest.md) + - [ApplyConfigNowResponse](docs/ApplyConfigNowResponse.md) + - [ApplyConfigNowStatus](docs/ApplyConfigNowStatus.md) + - [BatchMaintenanceWindow](docs/BatchMaintenanceWindow.md) + - [BatchMaintenanceWindowRequest](docs/BatchMaintenanceWindowRequest.md) + - [BatchMaintenanceWindowResponse](docs/BatchMaintenanceWindowResponse.md) + - [BatchMaintenanceWindowResult](docs/BatchMaintenanceWindowResult.md) + - [CreateMaintenanceWindow](docs/CreateMaintenanceWindow.md) + - [CreateMaintenanceWindowRequest](docs/CreateMaintenanceWindowRequest.md) + - [CreateMaintenanceWindowResponse](docs/CreateMaintenanceWindowResponse.md) + - [DeferredWindow](docs/DeferredWindow.md) + - [DeleteMaintenanceWindowResponse](docs/DeleteMaintenanceWindowResponse.md) + - [GetMaintenanceWindowResponse](docs/GetMaintenanceWindowResponse.md) + - [ListMaintenanceWindowResponse](docs/ListMaintenanceWindowResponse.md) + - [MaintenanceWindow](docs/MaintenanceWindow.md) + - [OnpremDetails](docs/OnpremDetails.md) + - [ScheduledWindow](docs/ScheduledWindow.md) + - [StatusCode](docs/StatusCode.md) + - [UpdateBatchMaintenanceWindow](docs/UpdateBatchMaintenanceWindow.md) + - [UpdateMaintenanceWindow](docs/UpdateMaintenanceWindow.md) + - [UpdateMaintenanceWindowRequest](docs/UpdateMaintenanceWindowRequest.md) + - [UpdateMaintenanceWindowResponse](docs/UpdateMaintenanceWindowResponse.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/upgradepolicy/api/openapi.yaml b/upgradepolicy/api/openapi.yaml new file mode 100644 index 0000000..3b0420f --- /dev/null +++ b/upgradepolicy/api/openapi.yaml @@ -0,0 +1,616 @@ +openapi: 3.0.1 +info: + description: "Infoblox by default does automatic software updates when they become\ + \ available. Updates are applied to all on-prem hosts, physical or virtual. However,\ + \ you can override and schedule the software updates. You can also defer the updates\ + \ to a later date and time. You can configure up to a total of 50 deferrals (scheduled\ + \ and deferred software updates), which means you have the flexibility to create\ + \ up to 50 update groups across different on-prem hosts by mapping with appropriate\ + \ tags. Tags are be used to associate deferrals (scheduled or deferred) with a\ + \ specific or group of onprem-hosts. Apart from software update deferrals, config\ + \ update deferrals also can be configured using these overrides." + title: Schedule Software/Config Updates + version: v2 +servers: +- url: http://csp.infoblox.com/api/upgrade_policy/ +- url: https://csp.infoblox.com/api/upgrade_policy/ +security: +- ApiKeyAuth: [] +paths: + /v2/config/apply_now: + post: + operationId: Upgrade Policy V2ApplyConfigNow + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/service_v2ApplyConfigNowRequest' + required: true + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/service_v2ApplyConfigNowResponse' + description: POST operation response + summary: Immediately apply the config updates object to the list of hosts + tags: + - Upgrade Policy V2 + x-codegen-request-body-name: body + /v2/maintenance_windows: + get: + operationId: Upgrade Policy V2List + parameters: + - description: window type (software or config). + in: query + name: window_type + schema: + type: string + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/service_v2ListMaintenanceWindowResponse' + description: GET operation response + summary: List all the maintenance windows + tags: + - Upgrade Policy V2 + post: + operationId: Upgrade Policy V2Create + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/service_v2CreateMaintenanceWindowRequest' + required: true + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/service_v2CreateMaintenanceWindowResponse' + description: POST operation response + summary: Create a maintenance window + tags: + - Upgrade Policy V2 + x-codegen-request-body-name: body + /v2/maintenance_windows/batch: + post: + operationId: Upgrade Policy V2Batch + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/service_v2BatchMaintenanceWindowRequest' + required: true + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/service_v2BatchMaintenanceWindowResponse' + description: POST operation response + summary: "Create, update and/or delete multiple maintenance windows in a single\ + \ request" + tags: + - Upgrade Policy V2 + x-codegen-request-body-name: body + /v2/maintenance_windows/{id}: + delete: + operationId: Upgrade Policy V2Delete + parameters: + - description: uuid of a maintenance window record + in: path + name: id + required: true + schema: + type: string + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/service_v2DeleteMaintenanceWindowResponse' + description: DELETE operation response + summary: Delete maintenance window + tags: + - Upgrade Policy V2 + get: + operationId: Upgrade Policy V2Get + parameters: + - description: uuid of a maintenance window record + in: path + name: id + required: true + schema: + type: string + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/service_v2GetMaintenanceWindowResponse' + description: GET operation response + summary: Read a maintenance window + tags: + - Upgrade Policy V2 + patch: + operationId: Upgrade Policy V2Update + parameters: + - description: uuid of a maintenance window record + in: path + name: id + required: true + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/service_v2UpdateMaintenanceWindowRequest' + required: true + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/service_v2UpdateMaintenanceWindowResponse' + description: PATCH operation response + summary: Update an existing maintenance window + tags: + - Upgrade Policy V2 + x-codegen-request-body-name: body +components: + schemas: + service_v2ApplyConfigNowRequest: + properties: + payload: + items: + $ref: '#/components/schemas/service_v2OnpremDetails' + type: array + type: object + service_v2ApplyConfigNowResponse: + example: + result: + - ophid: ophid + hostid: hostid + statusCode: null + - ophid: ophid + hostid: hostid + statusCode: null + properties: + result: + items: + $ref: '#/components/schemas/service_v2ApplyConfigNowStatus' + type: array + type: object + service_v2ApplyConfigNowStatus: + example: + ophid: ophid + hostid: hostid + statusCode: null + properties: + hostid: + type: string + ophid: + type: string + statusCode: + $ref: '#/components/schemas/service_v2StatusCode' + type: object + service_v2BatchMaintenanceWindow: + properties: + create_mws: + items: + $ref: '#/components/schemas/service_v2CreateMaintenanceWindow' + type: array + delete_mws: + items: + type: string + type: array + update_mws: + items: + $ref: '#/components/schemas/service_v2UpdateBatchMaintenanceWindow' + type: array + type: object + service_v2BatchMaintenanceWindowRequest: + properties: + payload: + $ref: '#/components/schemas/service_v2BatchMaintenanceWindow' + type: object + service_v2BatchMaintenanceWindowResponse: + example: + result: + created_ids: + - created_ids + - created_ids + updated_mws: + - scheduled_window: + duration: 0 + start_time: 6 + updated_at: 2000-01-23T04:56:07.000+00:00 + weekday: 1 + created_at: 2000-01-23T04:56:07.000+00:00 + enabled: true + window_type: window_type + id: id + deferred_window: + start_time: 2000-01-23T04:56:07.000+00:00 + updated_at: 2000-01-23T04:56:07.000+00:00 + end_time: 2000-01-23T04:56:07.000+00:00 + created_at: 2000-01-23T04:56:07.000+00:00 + enabled: true + tags: + key: "{}" + - scheduled_window: + duration: 0 + start_time: 6 + updated_at: 2000-01-23T04:56:07.000+00:00 + weekday: 1 + created_at: 2000-01-23T04:56:07.000+00:00 + enabled: true + window_type: window_type + id: id + deferred_window: + start_time: 2000-01-23T04:56:07.000+00:00 + updated_at: 2000-01-23T04:56:07.000+00:00 + end_time: 2000-01-23T04:56:07.000+00:00 + created_at: 2000-01-23T04:56:07.000+00:00 + enabled: true + tags: + key: "{}" + properties: + result: + $ref: '#/components/schemas/service_v2BatchMaintenanceWindowResult' + type: object + service_v2BatchMaintenanceWindowResult: + example: + created_ids: + - created_ids + - created_ids + updated_mws: + - scheduled_window: + duration: 0 + start_time: 6 + updated_at: 2000-01-23T04:56:07.000+00:00 + weekday: 1 + created_at: 2000-01-23T04:56:07.000+00:00 + enabled: true + window_type: window_type + id: id + deferred_window: + start_time: 2000-01-23T04:56:07.000+00:00 + updated_at: 2000-01-23T04:56:07.000+00:00 + end_time: 2000-01-23T04:56:07.000+00:00 + created_at: 2000-01-23T04:56:07.000+00:00 + enabled: true + tags: + key: "{}" + - scheduled_window: + duration: 0 + start_time: 6 + updated_at: 2000-01-23T04:56:07.000+00:00 + weekday: 1 + created_at: 2000-01-23T04:56:07.000+00:00 + enabled: true + window_type: window_type + id: id + deferred_window: + start_time: 2000-01-23T04:56:07.000+00:00 + updated_at: 2000-01-23T04:56:07.000+00:00 + end_time: 2000-01-23T04:56:07.000+00:00 + created_at: 2000-01-23T04:56:07.000+00:00 + enabled: true + tags: + key: "{}" + properties: + created_ids: + items: + type: string + type: array + updated_mws: + items: + $ref: '#/components/schemas/service_v2MaintenanceWindow' + type: array + type: object + service_v2CreateMaintenanceWindow: + properties: + deferred_window: + $ref: '#/components/schemas/service_v2DeferredWindow' + id: + readOnly: true + type: string + scheduled_window: + $ref: '#/components/schemas/service_v2ScheduledWindow' + tags: + additionalProperties: + type: object + type: object + window_type: + type: string + title: "Create maintenance window structure which includes schedule window,\ + \ defer window and tags" + type: object + service_v2CreateMaintenanceWindowRequest: + properties: + payload: + $ref: '#/components/schemas/service_v2CreateMaintenanceWindow' + type: object + service_v2CreateMaintenanceWindowResponse: + example: + id: id + properties: + id: + readOnly: true + type: string + type: object + service_v2DeferredWindow: + example: + start_time: 2000-01-23T04:56:07.000+00:00 + updated_at: 2000-01-23T04:56:07.000+00:00 + end_time: 2000-01-23T04:56:07.000+00:00 + created_at: 2000-01-23T04:56:07.000+00:00 + enabled: true + properties: + created_at: + format: date-time + readOnly: true + title: create date timestamp of the defer window + type: string + enabled: + format: boolean + title: enable defer window + type: boolean + end_time: + format: date-time + title: date and time at which defer window will end + type: string + start_time: + format: date-time + title: date and time at which defer window will start + type: string + updated_at: + format: date-time + readOnly: true + title: last update date timestamp of the defer window + type: string + title: Deferred window structure + type: object + service_v2DeleteMaintenanceWindowResponse: + example: + window_type: window_type + properties: + window_type: + type: string + type: object + service_v2GetMaintenanceWindowResponse: + example: + result: + scheduled_window: + duration: 0 + start_time: 6 + updated_at: 2000-01-23T04:56:07.000+00:00 + weekday: 1 + created_at: 2000-01-23T04:56:07.000+00:00 + enabled: true + window_type: window_type + id: id + deferred_window: + start_time: 2000-01-23T04:56:07.000+00:00 + updated_at: 2000-01-23T04:56:07.000+00:00 + end_time: 2000-01-23T04:56:07.000+00:00 + created_at: 2000-01-23T04:56:07.000+00:00 + enabled: true + tags: + key: "{}" + properties: + result: + $ref: '#/components/schemas/service_v2MaintenanceWindow' + type: object + service_v2ListMaintenanceWindowResponse: + example: + result: + - scheduled_window: + duration: 0 + start_time: 6 + updated_at: 2000-01-23T04:56:07.000+00:00 + weekday: 1 + created_at: 2000-01-23T04:56:07.000+00:00 + enabled: true + window_type: window_type + id: id + deferred_window: + start_time: 2000-01-23T04:56:07.000+00:00 + updated_at: 2000-01-23T04:56:07.000+00:00 + end_time: 2000-01-23T04:56:07.000+00:00 + created_at: 2000-01-23T04:56:07.000+00:00 + enabled: true + tags: + key: "{}" + - scheduled_window: + duration: 0 + start_time: 6 + updated_at: 2000-01-23T04:56:07.000+00:00 + weekday: 1 + created_at: 2000-01-23T04:56:07.000+00:00 + enabled: true + window_type: window_type + id: id + deferred_window: + start_time: 2000-01-23T04:56:07.000+00:00 + updated_at: 2000-01-23T04:56:07.000+00:00 + end_time: 2000-01-23T04:56:07.000+00:00 + created_at: 2000-01-23T04:56:07.000+00:00 + enabled: true + tags: + key: "{}" + properties: + result: + items: + $ref: '#/components/schemas/service_v2MaintenanceWindow' + type: array + type: object + service_v2MaintenanceWindow: + example: + scheduled_window: + duration: 0 + start_time: 6 + updated_at: 2000-01-23T04:56:07.000+00:00 + weekday: 1 + created_at: 2000-01-23T04:56:07.000+00:00 + enabled: true + window_type: window_type + id: id + deferred_window: + start_time: 2000-01-23T04:56:07.000+00:00 + updated_at: 2000-01-23T04:56:07.000+00:00 + end_time: 2000-01-23T04:56:07.000+00:00 + created_at: 2000-01-23T04:56:07.000+00:00 + enabled: true + tags: + key: "{}" + properties: + deferred_window: + $ref: '#/components/schemas/service_v2DeferredWindow' + id: + readOnly: true + type: string + scheduled_window: + $ref: '#/components/schemas/service_v2ScheduledWindow' + tags: + additionalProperties: + type: object + type: object + window_type: + readOnly: true + type: string + title: "Maintenance window structure which includes schedule window, defer window\ + \ and tags" + type: object + service_v2OnpremDetails: + properties: + hostid: + title: host id of onprem host + type: string + ophid: + title: ophid of onprem host + type: string + type: object + service_v2ScheduledWindow: + example: + duration: 0 + start_time: 6 + updated_at: 2000-01-23T04:56:07.000+00:00 + weekday: 1 + created_at: 2000-01-23T04:56:07.000+00:00 + enabled: true + properties: + created_at: + format: date-time + readOnly: true + title: created date timestamp of the schedule window + type: string + duration: + format: int32 + title: total duration of the schedule window in minutes + type: integer + enabled: + format: boolean + title: "enable schedule window (true for schedule update, false for automatic\ + \ update)" + type: boolean + start_time: + format: int32 + title: time of the day in minutes at which schedule window will be active + type: integer + updated_at: + format: date-time + readOnly: true + title: last updated date timestamp of the schedule window + type: string + weekday: + format: int32 + title: "day on which schedule window will be active (Sunday (0), Monday(1)...\ + \ Saturday (6)" + type: integer + title: Schedule window structure + type: object + service_v2StatusCode: + default: SUCCESS + enum: + - SUCCESS + - GENERAL_FAILURE + - HASH_FAILURE + - VALIDATION_FAILURE + - COPY_FAILURE + - RELOAD_FAILIURE + title: Config apply status codes + type: string + service_v2UpdateBatchMaintenanceWindow: + properties: + deferred_window: + $ref: '#/components/schemas/service_v2DeferredWindow' + mw_id: + type: string + scheduled_window: + $ref: '#/components/schemas/service_v2ScheduledWindow' + tags: + additionalProperties: + type: object + type: object + type: object + service_v2UpdateMaintenanceWindow: + properties: + deferred_window: + $ref: '#/components/schemas/service_v2DeferredWindow' + id: + readOnly: true + type: string + scheduled_window: + $ref: '#/components/schemas/service_v2ScheduledWindow' + tags: + additionalProperties: + type: object + type: object + title: "Update maintenance window structure which includes schedule window,\ + \ defer window and tags" + type: object + service_v2UpdateMaintenanceWindowRequest: + properties: + id: + readOnly: true + title: uuid of a maintenance window record + type: string + payload: + $ref: '#/components/schemas/service_v2UpdateMaintenanceWindow' + type: object + service_v2UpdateMaintenanceWindowResponse: + example: + result: + scheduled_window: + duration: 0 + start_time: 6 + updated_at: 2000-01-23T04:56:07.000+00:00 + weekday: 1 + created_at: 2000-01-23T04:56:07.000+00:00 + enabled: true + window_type: window_type + id: id + deferred_window: + start_time: 2000-01-23T04:56:07.000+00:00 + updated_at: 2000-01-23T04:56:07.000+00:00 + end_time: 2000-01-23T04:56:07.000+00:00 + created_at: 2000-01-23T04:56:07.000+00:00 + enabled: true + tags: + key: "{}" + properties: + result: + $ref: '#/components/schemas/service_v2MaintenanceWindow' + type: object + securitySchemes: + ApiKeyAuth: + in: header + name: Authorization + type: apiKey +x-original-swagger-version: "2.0" diff --git a/upgradepolicy/api_upgrade_policy_v2.go b/upgradepolicy/api_upgrade_policy_v2.go new file mode 100644 index 0000000..b1fc457 --- /dev/null +++ b/upgradepolicy/api_upgrade_policy_v2.go @@ -0,0 +1,811 @@ +/* +Schedule Software/Config Updates + +Infoblox by default does automatic software updates when they become available. Updates are applied to all on-prem hosts, physical or virtual. However, you can override and schedule the software updates. You can also defer the updates to a later date and time. You can configure up to a total of 50 deferrals (scheduled and deferred software updates), which means you have the flexibility to create up to 50 update groups across different on-prem hosts by mapping with appropriate tags. Tags are be used to associate deferrals (scheduled or deferred) with a specific or group of onprem-hosts. Apart from software update deferrals, config update deferrals also can be configured using these overrides. + +API version: v2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package upgradepolicy + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" + + "github.com/infobloxopen/bloxone-go-client/internal" +) + +type UpgradePolicyV2API interface { + /* + ApplyConfigNow Immediately apply the config updates object to the list of hosts + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return UpgradePolicyV2APIApplyConfigNowRequest + */ + ApplyConfigNow(ctx context.Context) UpgradePolicyV2APIApplyConfigNowRequest + + // ApplyConfigNowExecute executes the request + // @return ApplyConfigNowResponse + ApplyConfigNowExecute(r UpgradePolicyV2APIApplyConfigNowRequest) (*ApplyConfigNowResponse, *http.Response, error) + /* + Batch Create, update and/or delete multiple maintenance windows in a single request + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return UpgradePolicyV2APIBatchRequest + */ + Batch(ctx context.Context) UpgradePolicyV2APIBatchRequest + + // BatchExecute executes the request + // @return BatchMaintenanceWindowResponse + BatchExecute(r UpgradePolicyV2APIBatchRequest) (*BatchMaintenanceWindowResponse, *http.Response, error) + /* + Create Create a maintenance window + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return UpgradePolicyV2APICreateRequest + */ + Create(ctx context.Context) UpgradePolicyV2APICreateRequest + + // CreateExecute executes the request + // @return CreateMaintenanceWindowResponse + CreateExecute(r UpgradePolicyV2APICreateRequest) (*CreateMaintenanceWindowResponse, *http.Response, error) + /* + Delete Delete maintenance window + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id uuid of a maintenance window record + @return UpgradePolicyV2APIDeleteRequest + */ + Delete(ctx context.Context, id string) UpgradePolicyV2APIDeleteRequest + + // DeleteExecute executes the request + // @return DeleteMaintenanceWindowResponse + DeleteExecute(r UpgradePolicyV2APIDeleteRequest) (*DeleteMaintenanceWindowResponse, *http.Response, error) + /* + Get Read a maintenance window + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id uuid of a maintenance window record + @return UpgradePolicyV2APIGetRequest + */ + Get(ctx context.Context, id string) UpgradePolicyV2APIGetRequest + + // GetExecute executes the request + // @return GetMaintenanceWindowResponse + GetExecute(r UpgradePolicyV2APIGetRequest) (*GetMaintenanceWindowResponse, *http.Response, error) + /* + List List all the maintenance windows + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return UpgradePolicyV2APIListRequest + */ + List(ctx context.Context) UpgradePolicyV2APIListRequest + + // ListExecute executes the request + // @return ListMaintenanceWindowResponse + ListExecute(r UpgradePolicyV2APIListRequest) (*ListMaintenanceWindowResponse, *http.Response, error) + /* + Update Update an existing maintenance window + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id uuid of a maintenance window record + @return UpgradePolicyV2APIUpdateRequest + */ + Update(ctx context.Context, id string) UpgradePolicyV2APIUpdateRequest + + // UpdateExecute executes the request + // @return UpdateMaintenanceWindowResponse + UpdateExecute(r UpgradePolicyV2APIUpdateRequest) (*UpdateMaintenanceWindowResponse, *http.Response, error) +} + +// UpgradePolicyV2APIService UpgradePolicyV2API service +type UpgradePolicyV2APIService internal.Service + +type UpgradePolicyV2APIApplyConfigNowRequest struct { + ctx context.Context + ApiService UpgradePolicyV2API + body *ApplyConfigNowRequest +} + +func (r UpgradePolicyV2APIApplyConfigNowRequest) Body(body ApplyConfigNowRequest) UpgradePolicyV2APIApplyConfigNowRequest { + r.body = &body + return r +} + +func (r UpgradePolicyV2APIApplyConfigNowRequest) Execute() (*ApplyConfigNowResponse, *http.Response, error) { + return r.ApiService.ApplyConfigNowExecute(r) +} + +/* +ApplyConfigNow Immediately apply the config updates object to the list of hosts + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return UpgradePolicyV2APIApplyConfigNowRequest +*/ +func (a *UpgradePolicyV2APIService) ApplyConfigNow(ctx context.Context) UpgradePolicyV2APIApplyConfigNowRequest { + return UpgradePolicyV2APIApplyConfigNowRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return ApplyConfigNowResponse +func (a *UpgradePolicyV2APIService) ApplyConfigNowExecute(r UpgradePolicyV2APIApplyConfigNowRequest) (*ApplyConfigNowResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *ApplyConfigNowResponse + ) + + localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "UpgradePolicyV2APIService.ApplyConfigNow") + if err != nil { + return localVarReturnValue, nil, internal.NewGenericOpenAPIError(err.Error()) + } + + localVarPath := localBasePath + "/v2/config/apply_now" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.body == nil { + return localVarReturnValue, nil, internal.ReportError("body is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := internal.SelectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := internal.SelectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.body + req, err := a.Client.PrepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.Client.CallAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := internal.NewGenericOpenAPIErrorWithBody(localVarHTTPResponse.Status, localVarBody) + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.Client.Decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) + return localVarReturnValue, localVarHTTPResponse, newErr + } + return localVarReturnValue, localVarHTTPResponse, nil +} + +type UpgradePolicyV2APIBatchRequest struct { + ctx context.Context + ApiService UpgradePolicyV2API + body *BatchMaintenanceWindowRequest +} + +func (r UpgradePolicyV2APIBatchRequest) Body(body BatchMaintenanceWindowRequest) UpgradePolicyV2APIBatchRequest { + r.body = &body + return r +} + +func (r UpgradePolicyV2APIBatchRequest) Execute() (*BatchMaintenanceWindowResponse, *http.Response, error) { + return r.ApiService.BatchExecute(r) +} + +/* +Batch Create, update and/or delete multiple maintenance windows in a single request + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return UpgradePolicyV2APIBatchRequest +*/ +func (a *UpgradePolicyV2APIService) Batch(ctx context.Context) UpgradePolicyV2APIBatchRequest { + return UpgradePolicyV2APIBatchRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return BatchMaintenanceWindowResponse +func (a *UpgradePolicyV2APIService) BatchExecute(r UpgradePolicyV2APIBatchRequest) (*BatchMaintenanceWindowResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *BatchMaintenanceWindowResponse + ) + + localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "UpgradePolicyV2APIService.Batch") + if err != nil { + return localVarReturnValue, nil, internal.NewGenericOpenAPIError(err.Error()) + } + + localVarPath := localBasePath + "/v2/maintenance_windows/batch" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.body == nil { + return localVarReturnValue, nil, internal.ReportError("body is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := internal.SelectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := internal.SelectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.body + req, err := a.Client.PrepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.Client.CallAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := internal.NewGenericOpenAPIErrorWithBody(localVarHTTPResponse.Status, localVarBody) + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.Client.Decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) + return localVarReturnValue, localVarHTTPResponse, newErr + } + return localVarReturnValue, localVarHTTPResponse, nil +} + +type UpgradePolicyV2APICreateRequest struct { + ctx context.Context + ApiService UpgradePolicyV2API + body *CreateMaintenanceWindowRequest +} + +func (r UpgradePolicyV2APICreateRequest) Body(body CreateMaintenanceWindowRequest) UpgradePolicyV2APICreateRequest { + r.body = &body + return r +} + +func (r UpgradePolicyV2APICreateRequest) Execute() (*CreateMaintenanceWindowResponse, *http.Response, error) { + return r.ApiService.CreateExecute(r) +} + +/* +Create Create a maintenance window + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return UpgradePolicyV2APICreateRequest +*/ +func (a *UpgradePolicyV2APIService) Create(ctx context.Context) UpgradePolicyV2APICreateRequest { + return UpgradePolicyV2APICreateRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return CreateMaintenanceWindowResponse +func (a *UpgradePolicyV2APIService) CreateExecute(r UpgradePolicyV2APICreateRequest) (*CreateMaintenanceWindowResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *CreateMaintenanceWindowResponse + ) + + localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "UpgradePolicyV2APIService.Create") + if err != nil { + return localVarReturnValue, nil, internal.NewGenericOpenAPIError(err.Error()) + } + + localVarPath := localBasePath + "/v2/maintenance_windows" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.body == nil { + return localVarReturnValue, nil, internal.ReportError("body is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := internal.SelectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := internal.SelectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.body + req, err := a.Client.PrepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.Client.CallAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := internal.NewGenericOpenAPIErrorWithBody(localVarHTTPResponse.Status, localVarBody) + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.Client.Decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) + return localVarReturnValue, localVarHTTPResponse, newErr + } + return localVarReturnValue, localVarHTTPResponse, nil +} + +type UpgradePolicyV2APIDeleteRequest struct { + ctx context.Context + ApiService UpgradePolicyV2API + id string +} + +func (r UpgradePolicyV2APIDeleteRequest) Execute() (*DeleteMaintenanceWindowResponse, *http.Response, error) { + return r.ApiService.DeleteExecute(r) +} + +/* +Delete Delete maintenance window + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id uuid of a maintenance window record + @return UpgradePolicyV2APIDeleteRequest +*/ +func (a *UpgradePolicyV2APIService) Delete(ctx context.Context, id string) UpgradePolicyV2APIDeleteRequest { + return UpgradePolicyV2APIDeleteRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// +// @return DeleteMaintenanceWindowResponse +func (a *UpgradePolicyV2APIService) DeleteExecute(r UpgradePolicyV2APIDeleteRequest) (*DeleteMaintenanceWindowResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *DeleteMaintenanceWindowResponse + ) + + localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "UpgradePolicyV2APIService.Delete") + if err != nil { + return localVarReturnValue, nil, internal.NewGenericOpenAPIError(err.Error()) + } + + localVarPath := localBasePath + "/v2/maintenance_windows/{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 localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.Client.CallAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := internal.NewGenericOpenAPIErrorWithBody(localVarHTTPResponse.Status, localVarBody) + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.Client.Decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) + return localVarReturnValue, localVarHTTPResponse, newErr + } + return localVarReturnValue, localVarHTTPResponse, nil +} + +type UpgradePolicyV2APIGetRequest struct { + ctx context.Context + ApiService UpgradePolicyV2API + id string +} + +func (r UpgradePolicyV2APIGetRequest) Execute() (*GetMaintenanceWindowResponse, *http.Response, error) { + return r.ApiService.GetExecute(r) +} + +/* +Get Read a maintenance window + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id uuid of a maintenance window record + @return UpgradePolicyV2APIGetRequest +*/ +func (a *UpgradePolicyV2APIService) Get(ctx context.Context, id string) UpgradePolicyV2APIGetRequest { + return UpgradePolicyV2APIGetRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// +// @return GetMaintenanceWindowResponse +func (a *UpgradePolicyV2APIService) GetExecute(r UpgradePolicyV2APIGetRequest) (*GetMaintenanceWindowResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *GetMaintenanceWindowResponse + ) + + localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "UpgradePolicyV2APIService.Get") + if err != nil { + return localVarReturnValue, nil, internal.NewGenericOpenAPIError(err.Error()) + } + + localVarPath := localBasePath + "/v2/maintenance_windows/{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 localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.Client.CallAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := internal.NewGenericOpenAPIErrorWithBody(localVarHTTPResponse.Status, localVarBody) + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.Client.Decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) + return localVarReturnValue, localVarHTTPResponse, newErr + } + return localVarReturnValue, localVarHTTPResponse, nil +} + +type UpgradePolicyV2APIListRequest struct { + ctx context.Context + ApiService UpgradePolicyV2API + windowType *string +} + +// window type (software or config). +func (r UpgradePolicyV2APIListRequest) WindowType(windowType string) UpgradePolicyV2APIListRequest { + r.windowType = &windowType + return r +} + +func (r UpgradePolicyV2APIListRequest) Execute() (*ListMaintenanceWindowResponse, *http.Response, error) { + return r.ApiService.ListExecute(r) +} + +/* +List List all the maintenance windows + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return UpgradePolicyV2APIListRequest +*/ +func (a *UpgradePolicyV2APIService) List(ctx context.Context) UpgradePolicyV2APIListRequest { + return UpgradePolicyV2APIListRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return ListMaintenanceWindowResponse +func (a *UpgradePolicyV2APIService) ListExecute(r UpgradePolicyV2APIListRequest) (*ListMaintenanceWindowResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *ListMaintenanceWindowResponse + ) + + localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "UpgradePolicyV2APIService.List") + if err != nil { + return localVarReturnValue, nil, internal.NewGenericOpenAPIError(err.Error()) + } + + localVarPath := localBasePath + "/v2/maintenance_windows" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.windowType != nil { + internal.ParameterAddToHeaderOrQuery(localVarQueryParams, "window_type", r.windowType, "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := internal.SelectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := internal.SelectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.Client.PrepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.Client.CallAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := internal.NewGenericOpenAPIErrorWithBody(localVarHTTPResponse.Status, localVarBody) + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.Client.Decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) + return localVarReturnValue, localVarHTTPResponse, newErr + } + return localVarReturnValue, localVarHTTPResponse, nil +} + +type UpgradePolicyV2APIUpdateRequest struct { + ctx context.Context + ApiService UpgradePolicyV2API + id string + body *UpdateMaintenanceWindowRequest +} + +func (r UpgradePolicyV2APIUpdateRequest) Body(body UpdateMaintenanceWindowRequest) UpgradePolicyV2APIUpdateRequest { + r.body = &body + return r +} + +func (r UpgradePolicyV2APIUpdateRequest) Execute() (*UpdateMaintenanceWindowResponse, *http.Response, error) { + return r.ApiService.UpdateExecute(r) +} + +/* +Update Update an existing maintenance window + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id uuid of a maintenance window record + @return UpgradePolicyV2APIUpdateRequest +*/ +func (a *UpgradePolicyV2APIService) Update(ctx context.Context, id string) UpgradePolicyV2APIUpdateRequest { + return UpgradePolicyV2APIUpdateRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// +// @return UpdateMaintenanceWindowResponse +func (a *UpgradePolicyV2APIService) UpdateExecute(r UpgradePolicyV2APIUpdateRequest) (*UpdateMaintenanceWindowResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *UpdateMaintenanceWindowResponse + ) + + localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "UpgradePolicyV2APIService.Update") + if err != nil { + return localVarReturnValue, nil, internal.NewGenericOpenAPIError(err.Error()) + } + + localVarPath := localBasePath + "/v2/maintenance_windows/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(internal.ParameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.body == nil { + return localVarReturnValue, nil, internal.ReportError("body is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := internal.SelectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := internal.SelectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.body + req, err := a.Client.PrepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.Client.CallAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := internal.NewGenericOpenAPIErrorWithBody(localVarHTTPResponse.Status, localVarBody) + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.Client.Decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) + return localVarReturnValue, localVarHTTPResponse, newErr + } + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/upgradepolicy/client.go b/upgradepolicy/client.go new file mode 100644 index 0000000..04e1300 --- /dev/null +++ b/upgradepolicy/client.go @@ -0,0 +1,50 @@ +/* +Schedule Software/Config Updates + +Infoblox by default does automatic software updates when they become available. Updates are applied to all on-prem hosts, physical or virtual. However, you can override and schedule the software updates. You can also defer the updates to a later date and time. You can configure up to a total of 50 deferrals (scheduled and deferred software updates), which means you have the flexibility to create up to 50 update groups across different on-prem hosts by mapping with appropriate tags. Tags are be used to associate deferrals (scheduled or deferred) with a specific or group of onprem-hosts. Apart from software update deferrals, config update deferrals also can be configured using these overrides. + +API version: v2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package upgradepolicy + +import ( + "github.com/infobloxopen/bloxone-go-client/internal" + "github.com/infobloxopen/bloxone-go-client/option" +) + +const serviceBasePath = "/api/upgrade_policy" + +// APIClient manages communication with the Schedule Software/Config Updates v2 +// In most cases there should be only one, shared, APIClient. +type APIClient struct { + *internal.APIClient + + // API Services + UpgradePolicyV2API UpgradePolicyV2API +} + +// 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.UpgradePolicyV2API = (*UpgradePolicyV2APIService)(&c.Common) + + return c +} diff --git a/upgradepolicy/docs/ApplyConfigNowRequest.md b/upgradepolicy/docs/ApplyConfigNowRequest.md new file mode 100644 index 0000000..1fcc968 --- /dev/null +++ b/upgradepolicy/docs/ApplyConfigNowRequest.md @@ -0,0 +1,56 @@ +# ApplyConfigNowRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Payload** | Pointer to [**[]OnpremDetails**](OnpremDetails.md) | | [optional] + +## Methods + +### NewApplyConfigNowRequest + +`func NewApplyConfigNowRequest() *ApplyConfigNowRequest` + +NewApplyConfigNowRequest instantiates a new ApplyConfigNowRequest 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 + +### NewApplyConfigNowRequestWithDefaults + +`func NewApplyConfigNowRequestWithDefaults() *ApplyConfigNowRequest` + +NewApplyConfigNowRequestWithDefaults instantiates a new ApplyConfigNowRequest 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 + +### GetPayload + +`func (o *ApplyConfigNowRequest) GetPayload() []OnpremDetails` + +GetPayload returns the Payload field if non-nil, zero value otherwise. + +### GetPayloadOk + +`func (o *ApplyConfigNowRequest) GetPayloadOk() (*[]OnpremDetails, bool)` + +GetPayloadOk returns a tuple with the Payload field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPayload + +`func (o *ApplyConfigNowRequest) SetPayload(v []OnpremDetails)` + +SetPayload sets Payload field to given value. + +### HasPayload + +`func (o *ApplyConfigNowRequest) HasPayload() bool` + +HasPayload 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/upgradepolicy/docs/ApplyConfigNowResponse.md b/upgradepolicy/docs/ApplyConfigNowResponse.md new file mode 100644 index 0000000..16e0612 --- /dev/null +++ b/upgradepolicy/docs/ApplyConfigNowResponse.md @@ -0,0 +1,56 @@ +# ApplyConfigNowResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Result** | Pointer to [**[]ApplyConfigNowStatus**](ApplyConfigNowStatus.md) | | [optional] + +## Methods + +### NewApplyConfigNowResponse + +`func NewApplyConfigNowResponse() *ApplyConfigNowResponse` + +NewApplyConfigNowResponse instantiates a new ApplyConfigNowResponse 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 + +### NewApplyConfigNowResponseWithDefaults + +`func NewApplyConfigNowResponseWithDefaults() *ApplyConfigNowResponse` + +NewApplyConfigNowResponseWithDefaults instantiates a new ApplyConfigNowResponse object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetResult + +`func (o *ApplyConfigNowResponse) GetResult() []ApplyConfigNowStatus` + +GetResult returns the Result field if non-nil, zero value otherwise. + +### GetResultOk + +`func (o *ApplyConfigNowResponse) GetResultOk() (*[]ApplyConfigNowStatus, bool)` + +GetResultOk returns a tuple with the Result field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetResult + +`func (o *ApplyConfigNowResponse) SetResult(v []ApplyConfigNowStatus)` + +SetResult sets Result field to given value. + +### HasResult + +`func (o *ApplyConfigNowResponse) HasResult() bool` + +HasResult returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/upgradepolicy/docs/ApplyConfigNowStatus.md b/upgradepolicy/docs/ApplyConfigNowStatus.md new file mode 100644 index 0000000..1d32b08 --- /dev/null +++ b/upgradepolicy/docs/ApplyConfigNowStatus.md @@ -0,0 +1,108 @@ +# ApplyConfigNowStatus + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Hostid** | Pointer to **string** | | [optional] +**Ophid** | Pointer to **string** | | [optional] +**StatusCode** | Pointer to [**StatusCode**](StatusCode.md) | | [optional] [default to STATUSCODE_SUCCESS] + +## Methods + +### NewApplyConfigNowStatus + +`func NewApplyConfigNowStatus() *ApplyConfigNowStatus` + +NewApplyConfigNowStatus instantiates a new ApplyConfigNowStatus 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 + +### NewApplyConfigNowStatusWithDefaults + +`func NewApplyConfigNowStatusWithDefaults() *ApplyConfigNowStatus` + +NewApplyConfigNowStatusWithDefaults instantiates a new ApplyConfigNowStatus 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 + +### GetHostid + +`func (o *ApplyConfigNowStatus) GetHostid() string` + +GetHostid returns the Hostid field if non-nil, zero value otherwise. + +### GetHostidOk + +`func (o *ApplyConfigNowStatus) GetHostidOk() (*string, bool)` + +GetHostidOk returns a tuple with the Hostid field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetHostid + +`func (o *ApplyConfigNowStatus) SetHostid(v string)` + +SetHostid sets Hostid field to given value. + +### HasHostid + +`func (o *ApplyConfigNowStatus) HasHostid() bool` + +HasHostid returns a boolean if a field has been set. + +### GetOphid + +`func (o *ApplyConfigNowStatus) GetOphid() string` + +GetOphid returns the Ophid field if non-nil, zero value otherwise. + +### GetOphidOk + +`func (o *ApplyConfigNowStatus) GetOphidOk() (*string, bool)` + +GetOphidOk returns a tuple with the Ophid field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetOphid + +`func (o *ApplyConfigNowStatus) SetOphid(v string)` + +SetOphid sets Ophid field to given value. + +### HasOphid + +`func (o *ApplyConfigNowStatus) HasOphid() bool` + +HasOphid returns a boolean if a field has been set. + +### GetStatusCode + +`func (o *ApplyConfigNowStatus) GetStatusCode() StatusCode` + +GetStatusCode returns the StatusCode field if non-nil, zero value otherwise. + +### GetStatusCodeOk + +`func (o *ApplyConfigNowStatus) GetStatusCodeOk() (*StatusCode, bool)` + +GetStatusCodeOk returns a tuple with the StatusCode field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetStatusCode + +`func (o *ApplyConfigNowStatus) SetStatusCode(v StatusCode)` + +SetStatusCode sets StatusCode field to given value. + +### HasStatusCode + +`func (o *ApplyConfigNowStatus) HasStatusCode() bool` + +HasStatusCode 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/upgradepolicy/docs/BatchMaintenanceWindow.md b/upgradepolicy/docs/BatchMaintenanceWindow.md new file mode 100644 index 0000000..1a0d0d2 --- /dev/null +++ b/upgradepolicy/docs/BatchMaintenanceWindow.md @@ -0,0 +1,108 @@ +# BatchMaintenanceWindow + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**CreateMws** | Pointer to [**[]CreateMaintenanceWindow**](CreateMaintenanceWindow.md) | | [optional] +**DeleteMws** | Pointer to **[]string** | | [optional] +**UpdateMws** | Pointer to [**[]UpdateBatchMaintenanceWindow**](UpdateBatchMaintenanceWindow.md) | | [optional] + +## Methods + +### NewBatchMaintenanceWindow + +`func NewBatchMaintenanceWindow() *BatchMaintenanceWindow` + +NewBatchMaintenanceWindow instantiates a new BatchMaintenanceWindow 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 + +### NewBatchMaintenanceWindowWithDefaults + +`func NewBatchMaintenanceWindowWithDefaults() *BatchMaintenanceWindow` + +NewBatchMaintenanceWindowWithDefaults instantiates a new BatchMaintenanceWindow 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 + +### GetCreateMws + +`func (o *BatchMaintenanceWindow) GetCreateMws() []CreateMaintenanceWindow` + +GetCreateMws returns the CreateMws field if non-nil, zero value otherwise. + +### GetCreateMwsOk + +`func (o *BatchMaintenanceWindow) GetCreateMwsOk() (*[]CreateMaintenanceWindow, bool)` + +GetCreateMwsOk returns a tuple with the CreateMws field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreateMws + +`func (o *BatchMaintenanceWindow) SetCreateMws(v []CreateMaintenanceWindow)` + +SetCreateMws sets CreateMws field to given value. + +### HasCreateMws + +`func (o *BatchMaintenanceWindow) HasCreateMws() bool` + +HasCreateMws returns a boolean if a field has been set. + +### GetDeleteMws + +`func (o *BatchMaintenanceWindow) GetDeleteMws() []string` + +GetDeleteMws returns the DeleteMws field if non-nil, zero value otherwise. + +### GetDeleteMwsOk + +`func (o *BatchMaintenanceWindow) GetDeleteMwsOk() (*[]string, bool)` + +GetDeleteMwsOk returns a tuple with the DeleteMws field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDeleteMws + +`func (o *BatchMaintenanceWindow) SetDeleteMws(v []string)` + +SetDeleteMws sets DeleteMws field to given value. + +### HasDeleteMws + +`func (o *BatchMaintenanceWindow) HasDeleteMws() bool` + +HasDeleteMws returns a boolean if a field has been set. + +### GetUpdateMws + +`func (o *BatchMaintenanceWindow) GetUpdateMws() []UpdateBatchMaintenanceWindow` + +GetUpdateMws returns the UpdateMws field if non-nil, zero value otherwise. + +### GetUpdateMwsOk + +`func (o *BatchMaintenanceWindow) GetUpdateMwsOk() (*[]UpdateBatchMaintenanceWindow, bool)` + +GetUpdateMwsOk returns a tuple with the UpdateMws field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUpdateMws + +`func (o *BatchMaintenanceWindow) SetUpdateMws(v []UpdateBatchMaintenanceWindow)` + +SetUpdateMws sets UpdateMws field to given value. + +### HasUpdateMws + +`func (o *BatchMaintenanceWindow) HasUpdateMws() bool` + +HasUpdateMws 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/upgradepolicy/docs/BatchMaintenanceWindowRequest.md b/upgradepolicy/docs/BatchMaintenanceWindowRequest.md new file mode 100644 index 0000000..1a0155d --- /dev/null +++ b/upgradepolicy/docs/BatchMaintenanceWindowRequest.md @@ -0,0 +1,56 @@ +# BatchMaintenanceWindowRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Payload** | Pointer to [**BatchMaintenanceWindow**](BatchMaintenanceWindow.md) | | [optional] + +## Methods + +### NewBatchMaintenanceWindowRequest + +`func NewBatchMaintenanceWindowRequest() *BatchMaintenanceWindowRequest` + +NewBatchMaintenanceWindowRequest instantiates a new BatchMaintenanceWindowRequest 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 + +### NewBatchMaintenanceWindowRequestWithDefaults + +`func NewBatchMaintenanceWindowRequestWithDefaults() *BatchMaintenanceWindowRequest` + +NewBatchMaintenanceWindowRequestWithDefaults instantiates a new BatchMaintenanceWindowRequest 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 + +### GetPayload + +`func (o *BatchMaintenanceWindowRequest) GetPayload() BatchMaintenanceWindow` + +GetPayload returns the Payload field if non-nil, zero value otherwise. + +### GetPayloadOk + +`func (o *BatchMaintenanceWindowRequest) GetPayloadOk() (*BatchMaintenanceWindow, bool)` + +GetPayloadOk returns a tuple with the Payload field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPayload + +`func (o *BatchMaintenanceWindowRequest) SetPayload(v BatchMaintenanceWindow)` + +SetPayload sets Payload field to given value. + +### HasPayload + +`func (o *BatchMaintenanceWindowRequest) HasPayload() bool` + +HasPayload 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/upgradepolicy/docs/BatchMaintenanceWindowResponse.md b/upgradepolicy/docs/BatchMaintenanceWindowResponse.md new file mode 100644 index 0000000..373db8b --- /dev/null +++ b/upgradepolicy/docs/BatchMaintenanceWindowResponse.md @@ -0,0 +1,56 @@ +# BatchMaintenanceWindowResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Result** | Pointer to [**BatchMaintenanceWindowResult**](BatchMaintenanceWindowResult.md) | | [optional] + +## Methods + +### NewBatchMaintenanceWindowResponse + +`func NewBatchMaintenanceWindowResponse() *BatchMaintenanceWindowResponse` + +NewBatchMaintenanceWindowResponse instantiates a new BatchMaintenanceWindowResponse 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 + +### NewBatchMaintenanceWindowResponseWithDefaults + +`func NewBatchMaintenanceWindowResponseWithDefaults() *BatchMaintenanceWindowResponse` + +NewBatchMaintenanceWindowResponseWithDefaults instantiates a new BatchMaintenanceWindowResponse object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetResult + +`func (o *BatchMaintenanceWindowResponse) GetResult() BatchMaintenanceWindowResult` + +GetResult returns the Result field if non-nil, zero value otherwise. + +### GetResultOk + +`func (o *BatchMaintenanceWindowResponse) GetResultOk() (*BatchMaintenanceWindowResult, bool)` + +GetResultOk returns a tuple with the Result field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetResult + +`func (o *BatchMaintenanceWindowResponse) SetResult(v BatchMaintenanceWindowResult)` + +SetResult sets Result field to given value. + +### HasResult + +`func (o *BatchMaintenanceWindowResponse) HasResult() bool` + +HasResult returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/upgradepolicy/docs/BatchMaintenanceWindowResult.md b/upgradepolicy/docs/BatchMaintenanceWindowResult.md new file mode 100644 index 0000000..1b23b63 --- /dev/null +++ b/upgradepolicy/docs/BatchMaintenanceWindowResult.md @@ -0,0 +1,82 @@ +# BatchMaintenanceWindowResult + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**CreatedIds** | Pointer to **[]string** | | [optional] +**UpdatedMws** | Pointer to [**[]MaintenanceWindow**](MaintenanceWindow.md) | | [optional] + +## Methods + +### NewBatchMaintenanceWindowResult + +`func NewBatchMaintenanceWindowResult() *BatchMaintenanceWindowResult` + +NewBatchMaintenanceWindowResult instantiates a new BatchMaintenanceWindowResult 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 + +### NewBatchMaintenanceWindowResultWithDefaults + +`func NewBatchMaintenanceWindowResultWithDefaults() *BatchMaintenanceWindowResult` + +NewBatchMaintenanceWindowResultWithDefaults instantiates a new BatchMaintenanceWindowResult 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 + +### GetCreatedIds + +`func (o *BatchMaintenanceWindowResult) GetCreatedIds() []string` + +GetCreatedIds returns the CreatedIds field if non-nil, zero value otherwise. + +### GetCreatedIdsOk + +`func (o *BatchMaintenanceWindowResult) GetCreatedIdsOk() (*[]string, bool)` + +GetCreatedIdsOk returns a tuple with the CreatedIds field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreatedIds + +`func (o *BatchMaintenanceWindowResult) SetCreatedIds(v []string)` + +SetCreatedIds sets CreatedIds field to given value. + +### HasCreatedIds + +`func (o *BatchMaintenanceWindowResult) HasCreatedIds() bool` + +HasCreatedIds returns a boolean if a field has been set. + +### GetUpdatedMws + +`func (o *BatchMaintenanceWindowResult) GetUpdatedMws() []MaintenanceWindow` + +GetUpdatedMws returns the UpdatedMws field if non-nil, zero value otherwise. + +### GetUpdatedMwsOk + +`func (o *BatchMaintenanceWindowResult) GetUpdatedMwsOk() (*[]MaintenanceWindow, bool)` + +GetUpdatedMwsOk returns a tuple with the UpdatedMws field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUpdatedMws + +`func (o *BatchMaintenanceWindowResult) SetUpdatedMws(v []MaintenanceWindow)` + +SetUpdatedMws sets UpdatedMws field to given value. + +### HasUpdatedMws + +`func (o *BatchMaintenanceWindowResult) HasUpdatedMws() bool` + +HasUpdatedMws 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/upgradepolicy/docs/CreateMaintenanceWindow.md b/upgradepolicy/docs/CreateMaintenanceWindow.md new file mode 100644 index 0000000..3444f64 --- /dev/null +++ b/upgradepolicy/docs/CreateMaintenanceWindow.md @@ -0,0 +1,160 @@ +# CreateMaintenanceWindow + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**DeferredWindow** | Pointer to [**DeferredWindow**](DeferredWindow.md) | | [optional] +**Id** | Pointer to **string** | | [optional] [readonly] +**ScheduledWindow** | Pointer to [**ScheduledWindow**](ScheduledWindow.md) | | [optional] +**Tags** | Pointer to **map[string]map[string]interface{}** | | [optional] +**WindowType** | Pointer to **string** | | [optional] + +## Methods + +### NewCreateMaintenanceWindow + +`func NewCreateMaintenanceWindow() *CreateMaintenanceWindow` + +NewCreateMaintenanceWindow instantiates a new CreateMaintenanceWindow 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 + +### NewCreateMaintenanceWindowWithDefaults + +`func NewCreateMaintenanceWindowWithDefaults() *CreateMaintenanceWindow` + +NewCreateMaintenanceWindowWithDefaults instantiates a new CreateMaintenanceWindow 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 + +### GetDeferredWindow + +`func (o *CreateMaintenanceWindow) GetDeferredWindow() DeferredWindow` + +GetDeferredWindow returns the DeferredWindow field if non-nil, zero value otherwise. + +### GetDeferredWindowOk + +`func (o *CreateMaintenanceWindow) GetDeferredWindowOk() (*DeferredWindow, bool)` + +GetDeferredWindowOk returns a tuple with the DeferredWindow field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDeferredWindow + +`func (o *CreateMaintenanceWindow) SetDeferredWindow(v DeferredWindow)` + +SetDeferredWindow sets DeferredWindow field to given value. + +### HasDeferredWindow + +`func (o *CreateMaintenanceWindow) HasDeferredWindow() bool` + +HasDeferredWindow returns a boolean if a field has been set. + +### GetId + +`func (o *CreateMaintenanceWindow) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *CreateMaintenanceWindow) GetIdOk() (*string, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *CreateMaintenanceWindow) SetId(v string)` + +SetId sets Id field to given value. + +### HasId + +`func (o *CreateMaintenanceWindow) HasId() bool` + +HasId returns a boolean if a field has been set. + +### GetScheduledWindow + +`func (o *CreateMaintenanceWindow) GetScheduledWindow() ScheduledWindow` + +GetScheduledWindow returns the ScheduledWindow field if non-nil, zero value otherwise. + +### GetScheduledWindowOk + +`func (o *CreateMaintenanceWindow) GetScheduledWindowOk() (*ScheduledWindow, bool)` + +GetScheduledWindowOk returns a tuple with the ScheduledWindow field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetScheduledWindow + +`func (o *CreateMaintenanceWindow) SetScheduledWindow(v ScheduledWindow)` + +SetScheduledWindow sets ScheduledWindow field to given value. + +### HasScheduledWindow + +`func (o *CreateMaintenanceWindow) HasScheduledWindow() bool` + +HasScheduledWindow returns a boolean if a field has been set. + +### GetTags + +`func (o *CreateMaintenanceWindow) GetTags() map[string]map[string]interface{}` + +GetTags returns the Tags field if non-nil, zero value otherwise. + +### GetTagsOk + +`func (o *CreateMaintenanceWindow) GetTagsOk() (*map[string]map[string]interface{}, bool)` + +GetTagsOk returns a tuple with the Tags field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTags + +`func (o *CreateMaintenanceWindow) SetTags(v map[string]map[string]interface{})` + +SetTags sets Tags field to given value. + +### HasTags + +`func (o *CreateMaintenanceWindow) HasTags() bool` + +HasTags returns a boolean if a field has been set. + +### GetWindowType + +`func (o *CreateMaintenanceWindow) GetWindowType() string` + +GetWindowType returns the WindowType field if non-nil, zero value otherwise. + +### GetWindowTypeOk + +`func (o *CreateMaintenanceWindow) GetWindowTypeOk() (*string, bool)` + +GetWindowTypeOk returns a tuple with the WindowType field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetWindowType + +`func (o *CreateMaintenanceWindow) SetWindowType(v string)` + +SetWindowType sets WindowType field to given value. + +### HasWindowType + +`func (o *CreateMaintenanceWindow) HasWindowType() bool` + +HasWindowType 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/upgradepolicy/docs/CreateMaintenanceWindowRequest.md b/upgradepolicy/docs/CreateMaintenanceWindowRequest.md new file mode 100644 index 0000000..f2ab227 --- /dev/null +++ b/upgradepolicy/docs/CreateMaintenanceWindowRequest.md @@ -0,0 +1,56 @@ +# CreateMaintenanceWindowRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Payload** | Pointer to [**CreateMaintenanceWindow**](CreateMaintenanceWindow.md) | | [optional] + +## Methods + +### NewCreateMaintenanceWindowRequest + +`func NewCreateMaintenanceWindowRequest() *CreateMaintenanceWindowRequest` + +NewCreateMaintenanceWindowRequest instantiates a new CreateMaintenanceWindowRequest 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 + +### NewCreateMaintenanceWindowRequestWithDefaults + +`func NewCreateMaintenanceWindowRequestWithDefaults() *CreateMaintenanceWindowRequest` + +NewCreateMaintenanceWindowRequestWithDefaults instantiates a new CreateMaintenanceWindowRequest 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 + +### GetPayload + +`func (o *CreateMaintenanceWindowRequest) GetPayload() CreateMaintenanceWindow` + +GetPayload returns the Payload field if non-nil, zero value otherwise. + +### GetPayloadOk + +`func (o *CreateMaintenanceWindowRequest) GetPayloadOk() (*CreateMaintenanceWindow, bool)` + +GetPayloadOk returns a tuple with the Payload field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPayload + +`func (o *CreateMaintenanceWindowRequest) SetPayload(v CreateMaintenanceWindow)` + +SetPayload sets Payload field to given value. + +### HasPayload + +`func (o *CreateMaintenanceWindowRequest) HasPayload() bool` + +HasPayload 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/upgradepolicy/docs/CreateMaintenanceWindowResponse.md b/upgradepolicy/docs/CreateMaintenanceWindowResponse.md new file mode 100644 index 0000000..a3bc1f1 --- /dev/null +++ b/upgradepolicy/docs/CreateMaintenanceWindowResponse.md @@ -0,0 +1,56 @@ +# CreateMaintenanceWindowResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | Pointer to **string** | | [optional] [readonly] + +## Methods + +### NewCreateMaintenanceWindowResponse + +`func NewCreateMaintenanceWindowResponse() *CreateMaintenanceWindowResponse` + +NewCreateMaintenanceWindowResponse instantiates a new CreateMaintenanceWindowResponse 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 + +### NewCreateMaintenanceWindowResponseWithDefaults + +`func NewCreateMaintenanceWindowResponseWithDefaults() *CreateMaintenanceWindowResponse` + +NewCreateMaintenanceWindowResponseWithDefaults instantiates a new CreateMaintenanceWindowResponse 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 + +### GetId + +`func (o *CreateMaintenanceWindowResponse) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *CreateMaintenanceWindowResponse) GetIdOk() (*string, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *CreateMaintenanceWindowResponse) SetId(v string)` + +SetId sets Id field to given value. + +### HasId + +`func (o *CreateMaintenanceWindowResponse) HasId() bool` + +HasId 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/upgradepolicy/docs/DeferredWindow.md b/upgradepolicy/docs/DeferredWindow.md new file mode 100644 index 0000000..5898911 --- /dev/null +++ b/upgradepolicy/docs/DeferredWindow.md @@ -0,0 +1,160 @@ +# DeferredWindow + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**CreatedAt** | Pointer to **time.Time** | | [optional] [readonly] +**Enabled** | Pointer to **bool** | | [optional] +**EndTime** | Pointer to **time.Time** | | [optional] +**StartTime** | Pointer to **time.Time** | | [optional] +**UpdatedAt** | Pointer to **time.Time** | | [optional] [readonly] + +## Methods + +### NewDeferredWindow + +`func NewDeferredWindow() *DeferredWindow` + +NewDeferredWindow instantiates a new DeferredWindow 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 + +### NewDeferredWindowWithDefaults + +`func NewDeferredWindowWithDefaults() *DeferredWindow` + +NewDeferredWindowWithDefaults instantiates a new DeferredWindow 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 + +### GetCreatedAt + +`func (o *DeferredWindow) GetCreatedAt() time.Time` + +GetCreatedAt returns the CreatedAt field if non-nil, zero value otherwise. + +### GetCreatedAtOk + +`func (o *DeferredWindow) GetCreatedAtOk() (*time.Time, bool)` + +GetCreatedAtOk returns a tuple with the CreatedAt field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreatedAt + +`func (o *DeferredWindow) SetCreatedAt(v time.Time)` + +SetCreatedAt sets CreatedAt field to given value. + +### HasCreatedAt + +`func (o *DeferredWindow) HasCreatedAt() bool` + +HasCreatedAt returns a boolean if a field has been set. + +### GetEnabled + +`func (o *DeferredWindow) GetEnabled() bool` + +GetEnabled returns the Enabled field if non-nil, zero value otherwise. + +### GetEnabledOk + +`func (o *DeferredWindow) GetEnabledOk() (*bool, bool)` + +GetEnabledOk returns a tuple with the Enabled field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetEnabled + +`func (o *DeferredWindow) SetEnabled(v bool)` + +SetEnabled sets Enabled field to given value. + +### HasEnabled + +`func (o *DeferredWindow) HasEnabled() bool` + +HasEnabled returns a boolean if a field has been set. + +### GetEndTime + +`func (o *DeferredWindow) GetEndTime() time.Time` + +GetEndTime returns the EndTime field if non-nil, zero value otherwise. + +### GetEndTimeOk + +`func (o *DeferredWindow) GetEndTimeOk() (*time.Time, bool)` + +GetEndTimeOk returns a tuple with the EndTime field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetEndTime + +`func (o *DeferredWindow) SetEndTime(v time.Time)` + +SetEndTime sets EndTime field to given value. + +### HasEndTime + +`func (o *DeferredWindow) HasEndTime() bool` + +HasEndTime returns a boolean if a field has been set. + +### GetStartTime + +`func (o *DeferredWindow) GetStartTime() time.Time` + +GetStartTime returns the StartTime field if non-nil, zero value otherwise. + +### GetStartTimeOk + +`func (o *DeferredWindow) GetStartTimeOk() (*time.Time, bool)` + +GetStartTimeOk returns a tuple with the StartTime field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetStartTime + +`func (o *DeferredWindow) SetStartTime(v time.Time)` + +SetStartTime sets StartTime field to given value. + +### HasStartTime + +`func (o *DeferredWindow) HasStartTime() bool` + +HasStartTime returns a boolean if a field has been set. + +### GetUpdatedAt + +`func (o *DeferredWindow) GetUpdatedAt() time.Time` + +GetUpdatedAt returns the UpdatedAt field if non-nil, zero value otherwise. + +### GetUpdatedAtOk + +`func (o *DeferredWindow) GetUpdatedAtOk() (*time.Time, bool)` + +GetUpdatedAtOk returns a tuple with the UpdatedAt field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUpdatedAt + +`func (o *DeferredWindow) SetUpdatedAt(v time.Time)` + +SetUpdatedAt sets UpdatedAt field to given value. + +### HasUpdatedAt + +`func (o *DeferredWindow) HasUpdatedAt() bool` + +HasUpdatedAt returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/upgradepolicy/docs/DeleteMaintenanceWindowResponse.md b/upgradepolicy/docs/DeleteMaintenanceWindowResponse.md new file mode 100644 index 0000000..3340c92 --- /dev/null +++ b/upgradepolicy/docs/DeleteMaintenanceWindowResponse.md @@ -0,0 +1,56 @@ +# DeleteMaintenanceWindowResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**WindowType** | Pointer to **string** | | [optional] + +## Methods + +### NewDeleteMaintenanceWindowResponse + +`func NewDeleteMaintenanceWindowResponse() *DeleteMaintenanceWindowResponse` + +NewDeleteMaintenanceWindowResponse instantiates a new DeleteMaintenanceWindowResponse 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 + +### NewDeleteMaintenanceWindowResponseWithDefaults + +`func NewDeleteMaintenanceWindowResponseWithDefaults() *DeleteMaintenanceWindowResponse` + +NewDeleteMaintenanceWindowResponseWithDefaults instantiates a new DeleteMaintenanceWindowResponse 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 + +### GetWindowType + +`func (o *DeleteMaintenanceWindowResponse) GetWindowType() string` + +GetWindowType returns the WindowType field if non-nil, zero value otherwise. + +### GetWindowTypeOk + +`func (o *DeleteMaintenanceWindowResponse) GetWindowTypeOk() (*string, bool)` + +GetWindowTypeOk returns a tuple with the WindowType field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetWindowType + +`func (o *DeleteMaintenanceWindowResponse) SetWindowType(v string)` + +SetWindowType sets WindowType field to given value. + +### HasWindowType + +`func (o *DeleteMaintenanceWindowResponse) HasWindowType() bool` + +HasWindowType 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/upgradepolicy/docs/GetMaintenanceWindowResponse.md b/upgradepolicy/docs/GetMaintenanceWindowResponse.md new file mode 100644 index 0000000..3788024 --- /dev/null +++ b/upgradepolicy/docs/GetMaintenanceWindowResponse.md @@ -0,0 +1,56 @@ +# GetMaintenanceWindowResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Result** | Pointer to [**MaintenanceWindow**](MaintenanceWindow.md) | | [optional] + +## Methods + +### NewGetMaintenanceWindowResponse + +`func NewGetMaintenanceWindowResponse() *GetMaintenanceWindowResponse` + +NewGetMaintenanceWindowResponse instantiates a new GetMaintenanceWindowResponse 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 + +### NewGetMaintenanceWindowResponseWithDefaults + +`func NewGetMaintenanceWindowResponseWithDefaults() *GetMaintenanceWindowResponse` + +NewGetMaintenanceWindowResponseWithDefaults instantiates a new GetMaintenanceWindowResponse object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetResult + +`func (o *GetMaintenanceWindowResponse) GetResult() MaintenanceWindow` + +GetResult returns the Result field if non-nil, zero value otherwise. + +### GetResultOk + +`func (o *GetMaintenanceWindowResponse) GetResultOk() (*MaintenanceWindow, bool)` + +GetResultOk returns a tuple with the Result field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetResult + +`func (o *GetMaintenanceWindowResponse) SetResult(v MaintenanceWindow)` + +SetResult sets Result field to given value. + +### HasResult + +`func (o *GetMaintenanceWindowResponse) HasResult() bool` + +HasResult returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/upgradepolicy/docs/ListMaintenanceWindowResponse.md b/upgradepolicy/docs/ListMaintenanceWindowResponse.md new file mode 100644 index 0000000..41709f4 --- /dev/null +++ b/upgradepolicy/docs/ListMaintenanceWindowResponse.md @@ -0,0 +1,56 @@ +# ListMaintenanceWindowResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Result** | Pointer to [**[]MaintenanceWindow**](MaintenanceWindow.md) | | [optional] + +## Methods + +### NewListMaintenanceWindowResponse + +`func NewListMaintenanceWindowResponse() *ListMaintenanceWindowResponse` + +NewListMaintenanceWindowResponse instantiates a new ListMaintenanceWindowResponse 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 + +### NewListMaintenanceWindowResponseWithDefaults + +`func NewListMaintenanceWindowResponseWithDefaults() *ListMaintenanceWindowResponse` + +NewListMaintenanceWindowResponseWithDefaults instantiates a new ListMaintenanceWindowResponse object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetResult + +`func (o *ListMaintenanceWindowResponse) GetResult() []MaintenanceWindow` + +GetResult returns the Result field if non-nil, zero value otherwise. + +### GetResultOk + +`func (o *ListMaintenanceWindowResponse) GetResultOk() (*[]MaintenanceWindow, bool)` + +GetResultOk returns a tuple with the Result field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetResult + +`func (o *ListMaintenanceWindowResponse) SetResult(v []MaintenanceWindow)` + +SetResult sets Result field to given value. + +### HasResult + +`func (o *ListMaintenanceWindowResponse) HasResult() bool` + +HasResult returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/upgradepolicy/docs/MaintenanceWindow.md b/upgradepolicy/docs/MaintenanceWindow.md new file mode 100644 index 0000000..a83a0ab --- /dev/null +++ b/upgradepolicy/docs/MaintenanceWindow.md @@ -0,0 +1,160 @@ +# MaintenanceWindow + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**DeferredWindow** | Pointer to [**DeferredWindow**](DeferredWindow.md) | | [optional] +**Id** | Pointer to **string** | | [optional] [readonly] +**ScheduledWindow** | Pointer to [**ScheduledWindow**](ScheduledWindow.md) | | [optional] +**Tags** | Pointer to **map[string]map[string]interface{}** | | [optional] +**WindowType** | Pointer to **string** | | [optional] [readonly] + +## Methods + +### NewMaintenanceWindow + +`func NewMaintenanceWindow() *MaintenanceWindow` + +NewMaintenanceWindow instantiates a new MaintenanceWindow 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 + +### NewMaintenanceWindowWithDefaults + +`func NewMaintenanceWindowWithDefaults() *MaintenanceWindow` + +NewMaintenanceWindowWithDefaults instantiates a new MaintenanceWindow 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 + +### GetDeferredWindow + +`func (o *MaintenanceWindow) GetDeferredWindow() DeferredWindow` + +GetDeferredWindow returns the DeferredWindow field if non-nil, zero value otherwise. + +### GetDeferredWindowOk + +`func (o *MaintenanceWindow) GetDeferredWindowOk() (*DeferredWindow, bool)` + +GetDeferredWindowOk returns a tuple with the DeferredWindow field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDeferredWindow + +`func (o *MaintenanceWindow) SetDeferredWindow(v DeferredWindow)` + +SetDeferredWindow sets DeferredWindow field to given value. + +### HasDeferredWindow + +`func (o *MaintenanceWindow) HasDeferredWindow() bool` + +HasDeferredWindow returns a boolean if a field has been set. + +### GetId + +`func (o *MaintenanceWindow) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *MaintenanceWindow) GetIdOk() (*string, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *MaintenanceWindow) SetId(v string)` + +SetId sets Id field to given value. + +### HasId + +`func (o *MaintenanceWindow) HasId() bool` + +HasId returns a boolean if a field has been set. + +### GetScheduledWindow + +`func (o *MaintenanceWindow) GetScheduledWindow() ScheduledWindow` + +GetScheduledWindow returns the ScheduledWindow field if non-nil, zero value otherwise. + +### GetScheduledWindowOk + +`func (o *MaintenanceWindow) GetScheduledWindowOk() (*ScheduledWindow, bool)` + +GetScheduledWindowOk returns a tuple with the ScheduledWindow field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetScheduledWindow + +`func (o *MaintenanceWindow) SetScheduledWindow(v ScheduledWindow)` + +SetScheduledWindow sets ScheduledWindow field to given value. + +### HasScheduledWindow + +`func (o *MaintenanceWindow) HasScheduledWindow() bool` + +HasScheduledWindow returns a boolean if a field has been set. + +### GetTags + +`func (o *MaintenanceWindow) GetTags() map[string]map[string]interface{}` + +GetTags returns the Tags field if non-nil, zero value otherwise. + +### GetTagsOk + +`func (o *MaintenanceWindow) GetTagsOk() (*map[string]map[string]interface{}, bool)` + +GetTagsOk returns a tuple with the Tags field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTags + +`func (o *MaintenanceWindow) SetTags(v map[string]map[string]interface{})` + +SetTags sets Tags field to given value. + +### HasTags + +`func (o *MaintenanceWindow) HasTags() bool` + +HasTags returns a boolean if a field has been set. + +### GetWindowType + +`func (o *MaintenanceWindow) GetWindowType() string` + +GetWindowType returns the WindowType field if non-nil, zero value otherwise. + +### GetWindowTypeOk + +`func (o *MaintenanceWindow) GetWindowTypeOk() (*string, bool)` + +GetWindowTypeOk returns a tuple with the WindowType field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetWindowType + +`func (o *MaintenanceWindow) SetWindowType(v string)` + +SetWindowType sets WindowType field to given value. + +### HasWindowType + +`func (o *MaintenanceWindow) HasWindowType() bool` + +HasWindowType 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/upgradepolicy/docs/OnpremDetails.md b/upgradepolicy/docs/OnpremDetails.md new file mode 100644 index 0000000..739c1f3 --- /dev/null +++ b/upgradepolicy/docs/OnpremDetails.md @@ -0,0 +1,82 @@ +# OnpremDetails + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Hostid** | Pointer to **string** | | [optional] +**Ophid** | Pointer to **string** | | [optional] + +## Methods + +### NewOnpremDetails + +`func NewOnpremDetails() *OnpremDetails` + +NewOnpremDetails instantiates a new OnpremDetails 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 + +### NewOnpremDetailsWithDefaults + +`func NewOnpremDetailsWithDefaults() *OnpremDetails` + +NewOnpremDetailsWithDefaults instantiates a new OnpremDetails 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 + +### GetHostid + +`func (o *OnpremDetails) GetHostid() string` + +GetHostid returns the Hostid field if non-nil, zero value otherwise. + +### GetHostidOk + +`func (o *OnpremDetails) GetHostidOk() (*string, bool)` + +GetHostidOk returns a tuple with the Hostid field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetHostid + +`func (o *OnpremDetails) SetHostid(v string)` + +SetHostid sets Hostid field to given value. + +### HasHostid + +`func (o *OnpremDetails) HasHostid() bool` + +HasHostid returns a boolean if a field has been set. + +### GetOphid + +`func (o *OnpremDetails) GetOphid() string` + +GetOphid returns the Ophid field if non-nil, zero value otherwise. + +### GetOphidOk + +`func (o *OnpremDetails) GetOphidOk() (*string, bool)` + +GetOphidOk returns a tuple with the Ophid field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetOphid + +`func (o *OnpremDetails) SetOphid(v string)` + +SetOphid sets Ophid field to given value. + +### HasOphid + +`func (o *OnpremDetails) HasOphid() bool` + +HasOphid 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/upgradepolicy/docs/ScheduledWindow.md b/upgradepolicy/docs/ScheduledWindow.md new file mode 100644 index 0000000..9c37264 --- /dev/null +++ b/upgradepolicy/docs/ScheduledWindow.md @@ -0,0 +1,186 @@ +# ScheduledWindow + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**CreatedAt** | Pointer to **time.Time** | | [optional] [readonly] +**Duration** | Pointer to **int32** | | [optional] +**Enabled** | Pointer to **bool** | | [optional] +**StartTime** | Pointer to **int32** | | [optional] +**UpdatedAt** | Pointer to **time.Time** | | [optional] [readonly] +**Weekday** | Pointer to **int32** | | [optional] + +## Methods + +### NewScheduledWindow + +`func NewScheduledWindow() *ScheduledWindow` + +NewScheduledWindow instantiates a new ScheduledWindow 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 + +### NewScheduledWindowWithDefaults + +`func NewScheduledWindowWithDefaults() *ScheduledWindow` + +NewScheduledWindowWithDefaults instantiates a new ScheduledWindow 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 + +### GetCreatedAt + +`func (o *ScheduledWindow) GetCreatedAt() time.Time` + +GetCreatedAt returns the CreatedAt field if non-nil, zero value otherwise. + +### GetCreatedAtOk + +`func (o *ScheduledWindow) GetCreatedAtOk() (*time.Time, bool)` + +GetCreatedAtOk returns a tuple with the CreatedAt field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreatedAt + +`func (o *ScheduledWindow) SetCreatedAt(v time.Time)` + +SetCreatedAt sets CreatedAt field to given value. + +### HasCreatedAt + +`func (o *ScheduledWindow) HasCreatedAt() bool` + +HasCreatedAt returns a boolean if a field has been set. + +### GetDuration + +`func (o *ScheduledWindow) GetDuration() int32` + +GetDuration returns the Duration field if non-nil, zero value otherwise. + +### GetDurationOk + +`func (o *ScheduledWindow) GetDurationOk() (*int32, bool)` + +GetDurationOk returns a tuple with the Duration field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDuration + +`func (o *ScheduledWindow) SetDuration(v int32)` + +SetDuration sets Duration field to given value. + +### HasDuration + +`func (o *ScheduledWindow) HasDuration() bool` + +HasDuration returns a boolean if a field has been set. + +### GetEnabled + +`func (o *ScheduledWindow) GetEnabled() bool` + +GetEnabled returns the Enabled field if non-nil, zero value otherwise. + +### GetEnabledOk + +`func (o *ScheduledWindow) GetEnabledOk() (*bool, bool)` + +GetEnabledOk returns a tuple with the Enabled field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetEnabled + +`func (o *ScheduledWindow) SetEnabled(v bool)` + +SetEnabled sets Enabled field to given value. + +### HasEnabled + +`func (o *ScheduledWindow) HasEnabled() bool` + +HasEnabled returns a boolean if a field has been set. + +### GetStartTime + +`func (o *ScheduledWindow) GetStartTime() int32` + +GetStartTime returns the StartTime field if non-nil, zero value otherwise. + +### GetStartTimeOk + +`func (o *ScheduledWindow) GetStartTimeOk() (*int32, bool)` + +GetStartTimeOk returns a tuple with the StartTime field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetStartTime + +`func (o *ScheduledWindow) SetStartTime(v int32)` + +SetStartTime sets StartTime field to given value. + +### HasStartTime + +`func (o *ScheduledWindow) HasStartTime() bool` + +HasStartTime returns a boolean if a field has been set. + +### GetUpdatedAt + +`func (o *ScheduledWindow) GetUpdatedAt() time.Time` + +GetUpdatedAt returns the UpdatedAt field if non-nil, zero value otherwise. + +### GetUpdatedAtOk + +`func (o *ScheduledWindow) GetUpdatedAtOk() (*time.Time, bool)` + +GetUpdatedAtOk returns a tuple with the UpdatedAt field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUpdatedAt + +`func (o *ScheduledWindow) SetUpdatedAt(v time.Time)` + +SetUpdatedAt sets UpdatedAt field to given value. + +### HasUpdatedAt + +`func (o *ScheduledWindow) HasUpdatedAt() bool` + +HasUpdatedAt returns a boolean if a field has been set. + +### GetWeekday + +`func (o *ScheduledWindow) GetWeekday() int32` + +GetWeekday returns the Weekday field if non-nil, zero value otherwise. + +### GetWeekdayOk + +`func (o *ScheduledWindow) GetWeekdayOk() (*int32, bool)` + +GetWeekdayOk returns a tuple with the Weekday field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetWeekday + +`func (o *ScheduledWindow) SetWeekday(v int32)` + +SetWeekday sets Weekday field to given value. + +### HasWeekday + +`func (o *ScheduledWindow) HasWeekday() bool` + +HasWeekday 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/upgradepolicy/docs/StatusCode.md b/upgradepolicy/docs/StatusCode.md new file mode 100644 index 0000000..0bf765d --- /dev/null +++ b/upgradepolicy/docs/StatusCode.md @@ -0,0 +1,21 @@ +# StatusCode + +## Enum + + +* `SUCCESS` (value: `"SUCCESS"`) + +* `GENERAL_FAILURE` (value: `"GENERAL_FAILURE"`) + +* `HASH_FAILURE` (value: `"HASH_FAILURE"`) + +* `VALIDATION_FAILURE` (value: `"VALIDATION_FAILURE"`) + +* `COPY_FAILURE` (value: `"COPY_FAILURE"`) + +* `RELOAD_FAILIURE` (value: `"RELOAD_FAILIURE"`) + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/upgradepolicy/docs/UpdateBatchMaintenanceWindow.md b/upgradepolicy/docs/UpdateBatchMaintenanceWindow.md new file mode 100644 index 0000000..ebbe8c4 --- /dev/null +++ b/upgradepolicy/docs/UpdateBatchMaintenanceWindow.md @@ -0,0 +1,134 @@ +# UpdateBatchMaintenanceWindow + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**DeferredWindow** | Pointer to [**DeferredWindow**](DeferredWindow.md) | | [optional] +**MwId** | Pointer to **string** | | [optional] +**ScheduledWindow** | Pointer to [**ScheduledWindow**](ScheduledWindow.md) | | [optional] +**Tags** | Pointer to **map[string]map[string]interface{}** | | [optional] + +## Methods + +### NewUpdateBatchMaintenanceWindow + +`func NewUpdateBatchMaintenanceWindow() *UpdateBatchMaintenanceWindow` + +NewUpdateBatchMaintenanceWindow instantiates a new UpdateBatchMaintenanceWindow 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 + +### NewUpdateBatchMaintenanceWindowWithDefaults + +`func NewUpdateBatchMaintenanceWindowWithDefaults() *UpdateBatchMaintenanceWindow` + +NewUpdateBatchMaintenanceWindowWithDefaults instantiates a new UpdateBatchMaintenanceWindow 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 + +### GetDeferredWindow + +`func (o *UpdateBatchMaintenanceWindow) GetDeferredWindow() DeferredWindow` + +GetDeferredWindow returns the DeferredWindow field if non-nil, zero value otherwise. + +### GetDeferredWindowOk + +`func (o *UpdateBatchMaintenanceWindow) GetDeferredWindowOk() (*DeferredWindow, bool)` + +GetDeferredWindowOk returns a tuple with the DeferredWindow field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDeferredWindow + +`func (o *UpdateBatchMaintenanceWindow) SetDeferredWindow(v DeferredWindow)` + +SetDeferredWindow sets DeferredWindow field to given value. + +### HasDeferredWindow + +`func (o *UpdateBatchMaintenanceWindow) HasDeferredWindow() bool` + +HasDeferredWindow returns a boolean if a field has been set. + +### GetMwId + +`func (o *UpdateBatchMaintenanceWindow) GetMwId() string` + +GetMwId returns the MwId field if non-nil, zero value otherwise. + +### GetMwIdOk + +`func (o *UpdateBatchMaintenanceWindow) GetMwIdOk() (*string, bool)` + +GetMwIdOk returns a tuple with the MwId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMwId + +`func (o *UpdateBatchMaintenanceWindow) SetMwId(v string)` + +SetMwId sets MwId field to given value. + +### HasMwId + +`func (o *UpdateBatchMaintenanceWindow) HasMwId() bool` + +HasMwId returns a boolean if a field has been set. + +### GetScheduledWindow + +`func (o *UpdateBatchMaintenanceWindow) GetScheduledWindow() ScheduledWindow` + +GetScheduledWindow returns the ScheduledWindow field if non-nil, zero value otherwise. + +### GetScheduledWindowOk + +`func (o *UpdateBatchMaintenanceWindow) GetScheduledWindowOk() (*ScheduledWindow, bool)` + +GetScheduledWindowOk returns a tuple with the ScheduledWindow field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetScheduledWindow + +`func (o *UpdateBatchMaintenanceWindow) SetScheduledWindow(v ScheduledWindow)` + +SetScheduledWindow sets ScheduledWindow field to given value. + +### HasScheduledWindow + +`func (o *UpdateBatchMaintenanceWindow) HasScheduledWindow() bool` + +HasScheduledWindow returns a boolean if a field has been set. + +### GetTags + +`func (o *UpdateBatchMaintenanceWindow) GetTags() map[string]map[string]interface{}` + +GetTags returns the Tags field if non-nil, zero value otherwise. + +### GetTagsOk + +`func (o *UpdateBatchMaintenanceWindow) GetTagsOk() (*map[string]map[string]interface{}, bool)` + +GetTagsOk returns a tuple with the Tags field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTags + +`func (o *UpdateBatchMaintenanceWindow) SetTags(v map[string]map[string]interface{})` + +SetTags sets Tags field to given value. + +### HasTags + +`func (o *UpdateBatchMaintenanceWindow) HasTags() bool` + +HasTags returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/upgradepolicy/docs/UpdateMaintenanceWindow.md b/upgradepolicy/docs/UpdateMaintenanceWindow.md new file mode 100644 index 0000000..ce25eaa --- /dev/null +++ b/upgradepolicy/docs/UpdateMaintenanceWindow.md @@ -0,0 +1,134 @@ +# UpdateMaintenanceWindow + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**DeferredWindow** | Pointer to [**DeferredWindow**](DeferredWindow.md) | | [optional] +**Id** | Pointer to **string** | | [optional] [readonly] +**ScheduledWindow** | Pointer to [**ScheduledWindow**](ScheduledWindow.md) | | [optional] +**Tags** | Pointer to **map[string]map[string]interface{}** | | [optional] + +## Methods + +### NewUpdateMaintenanceWindow + +`func NewUpdateMaintenanceWindow() *UpdateMaintenanceWindow` + +NewUpdateMaintenanceWindow instantiates a new UpdateMaintenanceWindow 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 + +### NewUpdateMaintenanceWindowWithDefaults + +`func NewUpdateMaintenanceWindowWithDefaults() *UpdateMaintenanceWindow` + +NewUpdateMaintenanceWindowWithDefaults instantiates a new UpdateMaintenanceWindow 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 + +### GetDeferredWindow + +`func (o *UpdateMaintenanceWindow) GetDeferredWindow() DeferredWindow` + +GetDeferredWindow returns the DeferredWindow field if non-nil, zero value otherwise. + +### GetDeferredWindowOk + +`func (o *UpdateMaintenanceWindow) GetDeferredWindowOk() (*DeferredWindow, bool)` + +GetDeferredWindowOk returns a tuple with the DeferredWindow field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDeferredWindow + +`func (o *UpdateMaintenanceWindow) SetDeferredWindow(v DeferredWindow)` + +SetDeferredWindow sets DeferredWindow field to given value. + +### HasDeferredWindow + +`func (o *UpdateMaintenanceWindow) HasDeferredWindow() bool` + +HasDeferredWindow returns a boolean if a field has been set. + +### GetId + +`func (o *UpdateMaintenanceWindow) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *UpdateMaintenanceWindow) GetIdOk() (*string, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *UpdateMaintenanceWindow) SetId(v string)` + +SetId sets Id field to given value. + +### HasId + +`func (o *UpdateMaintenanceWindow) HasId() bool` + +HasId returns a boolean if a field has been set. + +### GetScheduledWindow + +`func (o *UpdateMaintenanceWindow) GetScheduledWindow() ScheduledWindow` + +GetScheduledWindow returns the ScheduledWindow field if non-nil, zero value otherwise. + +### GetScheduledWindowOk + +`func (o *UpdateMaintenanceWindow) GetScheduledWindowOk() (*ScheduledWindow, bool)` + +GetScheduledWindowOk returns a tuple with the ScheduledWindow field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetScheduledWindow + +`func (o *UpdateMaintenanceWindow) SetScheduledWindow(v ScheduledWindow)` + +SetScheduledWindow sets ScheduledWindow field to given value. + +### HasScheduledWindow + +`func (o *UpdateMaintenanceWindow) HasScheduledWindow() bool` + +HasScheduledWindow returns a boolean if a field has been set. + +### GetTags + +`func (o *UpdateMaintenanceWindow) GetTags() map[string]map[string]interface{}` + +GetTags returns the Tags field if non-nil, zero value otherwise. + +### GetTagsOk + +`func (o *UpdateMaintenanceWindow) GetTagsOk() (*map[string]map[string]interface{}, bool)` + +GetTagsOk returns a tuple with the Tags field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTags + +`func (o *UpdateMaintenanceWindow) SetTags(v map[string]map[string]interface{})` + +SetTags sets Tags field to given value. + +### HasTags + +`func (o *UpdateMaintenanceWindow) HasTags() bool` + +HasTags returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/upgradepolicy/docs/UpdateMaintenanceWindowRequest.md b/upgradepolicy/docs/UpdateMaintenanceWindowRequest.md new file mode 100644 index 0000000..95228e0 --- /dev/null +++ b/upgradepolicy/docs/UpdateMaintenanceWindowRequest.md @@ -0,0 +1,82 @@ +# UpdateMaintenanceWindowRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | Pointer to **string** | | [optional] [readonly] +**Payload** | Pointer to [**UpdateMaintenanceWindow**](UpdateMaintenanceWindow.md) | | [optional] + +## Methods + +### NewUpdateMaintenanceWindowRequest + +`func NewUpdateMaintenanceWindowRequest() *UpdateMaintenanceWindowRequest` + +NewUpdateMaintenanceWindowRequest instantiates a new UpdateMaintenanceWindowRequest 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 + +### NewUpdateMaintenanceWindowRequestWithDefaults + +`func NewUpdateMaintenanceWindowRequestWithDefaults() *UpdateMaintenanceWindowRequest` + +NewUpdateMaintenanceWindowRequestWithDefaults instantiates a new UpdateMaintenanceWindowRequest 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 + +### GetId + +`func (o *UpdateMaintenanceWindowRequest) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *UpdateMaintenanceWindowRequest) GetIdOk() (*string, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *UpdateMaintenanceWindowRequest) SetId(v string)` + +SetId sets Id field to given value. + +### HasId + +`func (o *UpdateMaintenanceWindowRequest) HasId() bool` + +HasId returns a boolean if a field has been set. + +### GetPayload + +`func (o *UpdateMaintenanceWindowRequest) GetPayload() UpdateMaintenanceWindow` + +GetPayload returns the Payload field if non-nil, zero value otherwise. + +### GetPayloadOk + +`func (o *UpdateMaintenanceWindowRequest) GetPayloadOk() (*UpdateMaintenanceWindow, bool)` + +GetPayloadOk returns a tuple with the Payload field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPayload + +`func (o *UpdateMaintenanceWindowRequest) SetPayload(v UpdateMaintenanceWindow)` + +SetPayload sets Payload field to given value. + +### HasPayload + +`func (o *UpdateMaintenanceWindowRequest) HasPayload() bool` + +HasPayload 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/upgradepolicy/docs/UpdateMaintenanceWindowResponse.md b/upgradepolicy/docs/UpdateMaintenanceWindowResponse.md new file mode 100644 index 0000000..c37740c --- /dev/null +++ b/upgradepolicy/docs/UpdateMaintenanceWindowResponse.md @@ -0,0 +1,56 @@ +# UpdateMaintenanceWindowResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Result** | Pointer to [**MaintenanceWindow**](MaintenanceWindow.md) | | [optional] + +## Methods + +### NewUpdateMaintenanceWindowResponse + +`func NewUpdateMaintenanceWindowResponse() *UpdateMaintenanceWindowResponse` + +NewUpdateMaintenanceWindowResponse instantiates a new UpdateMaintenanceWindowResponse 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 + +### NewUpdateMaintenanceWindowResponseWithDefaults + +`func NewUpdateMaintenanceWindowResponseWithDefaults() *UpdateMaintenanceWindowResponse` + +NewUpdateMaintenanceWindowResponseWithDefaults instantiates a new UpdateMaintenanceWindowResponse object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetResult + +`func (o *UpdateMaintenanceWindowResponse) GetResult() MaintenanceWindow` + +GetResult returns the Result field if non-nil, zero value otherwise. + +### GetResultOk + +`func (o *UpdateMaintenanceWindowResponse) GetResultOk() (*MaintenanceWindow, bool)` + +GetResultOk returns a tuple with the Result field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetResult + +`func (o *UpdateMaintenanceWindowResponse) SetResult(v MaintenanceWindow)` + +SetResult sets Result field to given value. + +### HasResult + +`func (o *UpdateMaintenanceWindowResponse) HasResult() bool` + +HasResult returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/upgradepolicy/docs/UpgradePolicyV2API.md b/upgradepolicy/docs/UpgradePolicyV2API.md new file mode 100644 index 0000000..f2a30a3 --- /dev/null +++ b/upgradepolicy/docs/UpgradePolicyV2API.md @@ -0,0 +1,473 @@ +# UpgradePolicyV2API + +All URIs are relative to *http://csp.infoblox.com/api/upgrade_policy* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ApplyConfigNow**](UpgradePolicyV2API.md#ApplyConfigNow) | **Post** /v2/config/apply_now | Immediately apply the config updates object to the list of hosts +[**Batch**](UpgradePolicyV2API.md#Batch) | **Post** /v2/maintenance_windows/batch | Create, update and/or delete multiple maintenance windows in a single request +[**Create**](UpgradePolicyV2API.md#Create) | **Post** /v2/maintenance_windows | Create a maintenance window +[**Delete**](UpgradePolicyV2API.md#Delete) | **Delete** /v2/maintenance_windows/{id} | Delete maintenance window +[**Get**](UpgradePolicyV2API.md#Get) | **Get** /v2/maintenance_windows/{id} | Read a maintenance window +[**List**](UpgradePolicyV2API.md#List) | **Get** /v2/maintenance_windows | List all the maintenance windows +[**Update**](UpgradePolicyV2API.md#Update) | **Patch** /v2/maintenance_windows/{id} | Update an existing maintenance window + + + +## ApplyConfigNow + +> ApplyConfigNowResponse ApplyConfigNow(ctx).Body(body).Execute() + +Immediately apply the config updates object to the list of hosts + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + + "github.com/infobloxopen/bloxone-go-client/upgradepolicy" +) + +func main() { + body := *upgradepolicy.NewApplyConfigNowRequest() // ApplyConfigNowRequest | + + apiClient := upgradepolicy.NewAPIClient() + resp, r, err := apiClient.UpgradePolicyV2API.ApplyConfigNow(context.Background()).Body(body).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `UpgradePolicyV2API.ApplyConfigNow``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ApplyConfigNow`: ApplyConfigNowResponse + fmt.Fprintf(os.Stdout, "Response from `UpgradePolicyV2API.ApplyConfigNow`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a `UpgradePolicyV2APIApplyConfigNowRequest` struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**body** | [**ApplyConfigNowRequest**](ApplyConfigNowRequest.md) | | + +### Return type + +[**ApplyConfigNowResponse**](ApplyConfigNowResponse.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## Batch + +> BatchMaintenanceWindowResponse Batch(ctx).Body(body).Execute() + +Create, update and/or delete multiple maintenance windows in a single request + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + + "github.com/infobloxopen/bloxone-go-client/upgradepolicy" +) + +func main() { + body := *upgradepolicy.NewBatchMaintenanceWindowRequest() // BatchMaintenanceWindowRequest | + + apiClient := upgradepolicy.NewAPIClient() + resp, r, err := apiClient.UpgradePolicyV2API.Batch(context.Background()).Body(body).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `UpgradePolicyV2API.Batch``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `Batch`: BatchMaintenanceWindowResponse + fmt.Fprintf(os.Stdout, "Response from `UpgradePolicyV2API.Batch`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a `UpgradePolicyV2APIBatchRequest` struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**body** | [**BatchMaintenanceWindowRequest**](BatchMaintenanceWindowRequest.md) | | + +### Return type + +[**BatchMaintenanceWindowResponse**](BatchMaintenanceWindowResponse.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## Create + +> CreateMaintenanceWindowResponse Create(ctx).Body(body).Execute() + +Create a maintenance window + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + + "github.com/infobloxopen/bloxone-go-client/upgradepolicy" +) + +func main() { + body := *upgradepolicy.NewCreateMaintenanceWindowRequest() // CreateMaintenanceWindowRequest | + + apiClient := upgradepolicy.NewAPIClient() + resp, r, err := apiClient.UpgradePolicyV2API.Create(context.Background()).Body(body).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `UpgradePolicyV2API.Create``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `Create`: CreateMaintenanceWindowResponse + fmt.Fprintf(os.Stdout, "Response from `UpgradePolicyV2API.Create`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a `UpgradePolicyV2APICreateRequest` struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**body** | [**CreateMaintenanceWindowRequest**](CreateMaintenanceWindowRequest.md) | | + +### Return type + +[**CreateMaintenanceWindowResponse**](CreateMaintenanceWindowResponse.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## Delete + +> DeleteMaintenanceWindowResponse Delete(ctx, id).Execute() + +Delete maintenance window + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + + "github.com/infobloxopen/bloxone-go-client/upgradepolicy" +) + +func main() { + id := "a5183192-1e00-475f-b334-38e1f0bb1bc7" // string | uuid of a maintenance window record + + apiClient := upgradepolicy.NewAPIClient() + resp, r, err := apiClient.UpgradePolicyV2API.Delete(context.Background(), id).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `UpgradePolicyV2API.Delete``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `Delete`: DeleteMaintenanceWindowResponse + fmt.Fprintf(os.Stdout, "Response from `UpgradePolicyV2API.Delete`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**id** | **string** | uuid of a maintenance window record | + +### Other Parameters + +Other parameters are passed through a pointer to a `UpgradePolicyV2APIDeleteRequest` struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + +### Return type + +[**DeleteMaintenanceWindowResponse**](DeleteMaintenanceWindowResponse.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## Get + +> GetMaintenanceWindowResponse Get(ctx, id).Execute() + +Read a maintenance window + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + + "github.com/infobloxopen/bloxone-go-client/upgradepolicy" +) + +func main() { + id := "a5183192-1e00-475f-b334-38e1f0bb1bc7" // string | uuid of a maintenance window record + + apiClient := upgradepolicy.NewAPIClient() + resp, r, err := apiClient.UpgradePolicyV2API.Get(context.Background(), id).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `UpgradePolicyV2API.Get``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `Get`: GetMaintenanceWindowResponse + fmt.Fprintf(os.Stdout, "Response from `UpgradePolicyV2API.Get`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**id** | **string** | uuid of a maintenance window record | + +### Other Parameters + +Other parameters are passed through a pointer to a `UpgradePolicyV2APIGetRequest` struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + +### Return type + +[**GetMaintenanceWindowResponse**](GetMaintenanceWindowResponse.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## List + +> ListMaintenanceWindowResponse List(ctx).WindowType(windowType).Execute() + +List all the maintenance windows + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + + "github.com/infobloxopen/bloxone-go-client/upgradepolicy" +) + +func main() { + + apiClient := upgradepolicy.NewAPIClient() + resp, r, err := apiClient.UpgradePolicyV2API.List(context.Background()).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `UpgradePolicyV2API.List``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `List`: ListMaintenanceWindowResponse + fmt.Fprintf(os.Stdout, "Response from `UpgradePolicyV2API.List`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a `UpgradePolicyV2APIListRequest` struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**windowType** | **string** | window type (software or config). | + +### Return type + +[**ListMaintenanceWindowResponse**](ListMaintenanceWindowResponse.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## Update + +> UpdateMaintenanceWindowResponse Update(ctx, id).Body(body).Execute() + +Update an existing maintenance window + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + + "github.com/infobloxopen/bloxone-go-client/upgradepolicy" +) + +func main() { + id := "a5183192-1e00-475f-b334-38e1f0bb1bc7" // string | uuid of a maintenance window record + body := *upgradepolicy.NewUpdateMaintenanceWindowRequest() // UpdateMaintenanceWindowRequest | + + apiClient := upgradepolicy.NewAPIClient() + resp, r, err := apiClient.UpgradePolicyV2API.Update(context.Background(), id).Body(body).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `UpgradePolicyV2API.Update``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `Update`: UpdateMaintenanceWindowResponse + fmt.Fprintf(os.Stdout, "Response from `UpgradePolicyV2API.Update`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**id** | **string** | uuid of a maintenance window record | + +### Other Parameters + +Other parameters are passed through a pointer to a `UpgradePolicyV2APIUpdateRequest` struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**body** | [**UpdateMaintenanceWindowRequest**](UpdateMaintenanceWindowRequest.md) | | + +### Return type + +[**UpdateMaintenanceWindowResponse**](UpdateMaintenanceWindowResponse.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/upgradepolicy/model_apply_config_now_request.go b/upgradepolicy/model_apply_config_now_request.go new file mode 100644 index 0000000..e53fd5c --- /dev/null +++ b/upgradepolicy/model_apply_config_now_request.go @@ -0,0 +1,153 @@ +/* +Schedule Software/Config Updates + +Infoblox by default does automatic software updates when they become available. Updates are applied to all on-prem hosts, physical or virtual. However, you can override and schedule the software updates. You can also defer the updates to a later date and time. You can configure up to a total of 50 deferrals (scheduled and deferred software updates), which means you have the flexibility to create up to 50 update groups across different on-prem hosts by mapping with appropriate tags. Tags are be used to associate deferrals (scheduled or deferred) with a specific or group of onprem-hosts. Apart from software update deferrals, config update deferrals also can be configured using these overrides. + +API version: v2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package upgradepolicy + +import ( + "encoding/json" +) + +// checks if the ApplyConfigNowRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ApplyConfigNowRequest{} + +// ApplyConfigNowRequest struct for ApplyConfigNowRequest +type ApplyConfigNowRequest struct { + Payload []OnpremDetails `json:"payload,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _ApplyConfigNowRequest ApplyConfigNowRequest + +// NewApplyConfigNowRequest instantiates a new ApplyConfigNowRequest 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 NewApplyConfigNowRequest() *ApplyConfigNowRequest { + this := ApplyConfigNowRequest{} + return &this +} + +// NewApplyConfigNowRequestWithDefaults instantiates a new ApplyConfigNowRequest 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 NewApplyConfigNowRequestWithDefaults() *ApplyConfigNowRequest { + this := ApplyConfigNowRequest{} + return &this +} + +// GetPayload returns the Payload field value if set, zero value otherwise. +func (o *ApplyConfigNowRequest) GetPayload() []OnpremDetails { + if o == nil || IsNil(o.Payload) { + var ret []OnpremDetails + return ret + } + return o.Payload +} + +// GetPayloadOk returns a tuple with the Payload field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ApplyConfigNowRequest) GetPayloadOk() ([]OnpremDetails, bool) { + if o == nil || IsNil(o.Payload) { + return nil, false + } + return o.Payload, true +} + +// HasPayload returns a boolean if a field has been set. +func (o *ApplyConfigNowRequest) HasPayload() bool { + if o != nil && !IsNil(o.Payload) { + return true + } + + return false +} + +// SetPayload gets a reference to the given []OnpremDetails and assigns it to the Payload field. +func (o *ApplyConfigNowRequest) SetPayload(v []OnpremDetails) { + o.Payload = v +} + +func (o ApplyConfigNowRequest) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ApplyConfigNowRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Payload) { + toSerialize["payload"] = o.Payload + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *ApplyConfigNowRequest) UnmarshalJSON(data []byte) (err error) { + varApplyConfigNowRequest := _ApplyConfigNowRequest{} + + err = json.Unmarshal(data, &varApplyConfigNowRequest) + + if err != nil { + return err + } + + *o = ApplyConfigNowRequest(varApplyConfigNowRequest) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "payload") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableApplyConfigNowRequest struct { + value *ApplyConfigNowRequest + isSet bool +} + +func (v NullableApplyConfigNowRequest) Get() *ApplyConfigNowRequest { + return v.value +} + +func (v *NullableApplyConfigNowRequest) Set(val *ApplyConfigNowRequest) { + v.value = val + v.isSet = true +} + +func (v NullableApplyConfigNowRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableApplyConfigNowRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableApplyConfigNowRequest(val *ApplyConfigNowRequest) *NullableApplyConfigNowRequest { + return &NullableApplyConfigNowRequest{value: val, isSet: true} +} + +func (v NullableApplyConfigNowRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableApplyConfigNowRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/upgradepolicy/model_apply_config_now_response.go b/upgradepolicy/model_apply_config_now_response.go new file mode 100644 index 0000000..b4bb088 --- /dev/null +++ b/upgradepolicy/model_apply_config_now_response.go @@ -0,0 +1,153 @@ +/* +Schedule Software/Config Updates + +Infoblox by default does automatic software updates when they become available. Updates are applied to all on-prem hosts, physical or virtual. However, you can override and schedule the software updates. You can also defer the updates to a later date and time. You can configure up to a total of 50 deferrals (scheduled and deferred software updates), which means you have the flexibility to create up to 50 update groups across different on-prem hosts by mapping with appropriate tags. Tags are be used to associate deferrals (scheduled or deferred) with a specific or group of onprem-hosts. Apart from software update deferrals, config update deferrals also can be configured using these overrides. + +API version: v2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package upgradepolicy + +import ( + "encoding/json" +) + +// checks if the ApplyConfigNowResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ApplyConfigNowResponse{} + +// ApplyConfigNowResponse struct for ApplyConfigNowResponse +type ApplyConfigNowResponse struct { + Result []ApplyConfigNowStatus `json:"result,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _ApplyConfigNowResponse ApplyConfigNowResponse + +// NewApplyConfigNowResponse instantiates a new ApplyConfigNowResponse 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 NewApplyConfigNowResponse() *ApplyConfigNowResponse { + this := ApplyConfigNowResponse{} + return &this +} + +// NewApplyConfigNowResponseWithDefaults instantiates a new ApplyConfigNowResponse 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 NewApplyConfigNowResponseWithDefaults() *ApplyConfigNowResponse { + this := ApplyConfigNowResponse{} + return &this +} + +// GetResult returns the Result field value if set, zero value otherwise. +func (o *ApplyConfigNowResponse) GetResult() []ApplyConfigNowStatus { + if o == nil || IsNil(o.Result) { + var ret []ApplyConfigNowStatus + return ret + } + return o.Result +} + +// GetResultOk returns a tuple with the Result field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ApplyConfigNowResponse) GetResultOk() ([]ApplyConfigNowStatus, bool) { + if o == nil || IsNil(o.Result) { + return nil, false + } + return o.Result, true +} + +// HasResult returns a boolean if a field has been set. +func (o *ApplyConfigNowResponse) HasResult() bool { + if o != nil && !IsNil(o.Result) { + return true + } + + return false +} + +// SetResult gets a reference to the given []ApplyConfigNowStatus and assigns it to the Result field. +func (o *ApplyConfigNowResponse) SetResult(v []ApplyConfigNowStatus) { + o.Result = v +} + +func (o ApplyConfigNowResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ApplyConfigNowResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Result) { + toSerialize["result"] = o.Result + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *ApplyConfigNowResponse) UnmarshalJSON(data []byte) (err error) { + varApplyConfigNowResponse := _ApplyConfigNowResponse{} + + err = json.Unmarshal(data, &varApplyConfigNowResponse) + + if err != nil { + return err + } + + *o = ApplyConfigNowResponse(varApplyConfigNowResponse) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "result") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableApplyConfigNowResponse struct { + value *ApplyConfigNowResponse + isSet bool +} + +func (v NullableApplyConfigNowResponse) Get() *ApplyConfigNowResponse { + return v.value +} + +func (v *NullableApplyConfigNowResponse) Set(val *ApplyConfigNowResponse) { + v.value = val + v.isSet = true +} + +func (v NullableApplyConfigNowResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableApplyConfigNowResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableApplyConfigNowResponse(val *ApplyConfigNowResponse) *NullableApplyConfigNowResponse { + return &NullableApplyConfigNowResponse{value: val, isSet: true} +} + +func (v NullableApplyConfigNowResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableApplyConfigNowResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/upgradepolicy/model_apply_config_now_status.go b/upgradepolicy/model_apply_config_now_status.go new file mode 100644 index 0000000..61fd4b5 --- /dev/null +++ b/upgradepolicy/model_apply_config_now_status.go @@ -0,0 +1,231 @@ +/* +Schedule Software/Config Updates + +Infoblox by default does automatic software updates when they become available. Updates are applied to all on-prem hosts, physical or virtual. However, you can override and schedule the software updates. You can also defer the updates to a later date and time. You can configure up to a total of 50 deferrals (scheduled and deferred software updates), which means you have the flexibility to create up to 50 update groups across different on-prem hosts by mapping with appropriate tags. Tags are be used to associate deferrals (scheduled or deferred) with a specific or group of onprem-hosts. Apart from software update deferrals, config update deferrals also can be configured using these overrides. + +API version: v2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package upgradepolicy + +import ( + "encoding/json" +) + +// checks if the ApplyConfigNowStatus type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ApplyConfigNowStatus{} + +// ApplyConfigNowStatus struct for ApplyConfigNowStatus +type ApplyConfigNowStatus struct { + Hostid *string `json:"hostid,omitempty"` + Ophid *string `json:"ophid,omitempty"` + StatusCode *StatusCode `json:"statusCode,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _ApplyConfigNowStatus ApplyConfigNowStatus + +// NewApplyConfigNowStatus instantiates a new ApplyConfigNowStatus 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 NewApplyConfigNowStatus() *ApplyConfigNowStatus { + this := ApplyConfigNowStatus{} + var statusCode StatusCode = STATUSCODE_SUCCESS + this.StatusCode = &statusCode + return &this +} + +// NewApplyConfigNowStatusWithDefaults instantiates a new ApplyConfigNowStatus 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 NewApplyConfigNowStatusWithDefaults() *ApplyConfigNowStatus { + this := ApplyConfigNowStatus{} + var statusCode StatusCode = STATUSCODE_SUCCESS + this.StatusCode = &statusCode + return &this +} + +// GetHostid returns the Hostid field value if set, zero value otherwise. +func (o *ApplyConfigNowStatus) GetHostid() string { + if o == nil || IsNil(o.Hostid) { + var ret string + return ret + } + return *o.Hostid +} + +// GetHostidOk returns a tuple with the Hostid field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ApplyConfigNowStatus) GetHostidOk() (*string, bool) { + if o == nil || IsNil(o.Hostid) { + return nil, false + } + return o.Hostid, true +} + +// HasHostid returns a boolean if a field has been set. +func (o *ApplyConfigNowStatus) HasHostid() bool { + if o != nil && !IsNil(o.Hostid) { + return true + } + + return false +} + +// SetHostid gets a reference to the given string and assigns it to the Hostid field. +func (o *ApplyConfigNowStatus) SetHostid(v string) { + o.Hostid = &v +} + +// GetOphid returns the Ophid field value if set, zero value otherwise. +func (o *ApplyConfigNowStatus) GetOphid() string { + if o == nil || IsNil(o.Ophid) { + var ret string + return ret + } + return *o.Ophid +} + +// GetOphidOk returns a tuple with the Ophid field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ApplyConfigNowStatus) GetOphidOk() (*string, bool) { + if o == nil || IsNil(o.Ophid) { + return nil, false + } + return o.Ophid, true +} + +// HasOphid returns a boolean if a field has been set. +func (o *ApplyConfigNowStatus) HasOphid() bool { + if o != nil && !IsNil(o.Ophid) { + return true + } + + return false +} + +// SetOphid gets a reference to the given string and assigns it to the Ophid field. +func (o *ApplyConfigNowStatus) SetOphid(v string) { + o.Ophid = &v +} + +// GetStatusCode returns the StatusCode field value if set, zero value otherwise. +func (o *ApplyConfigNowStatus) GetStatusCode() StatusCode { + if o == nil || IsNil(o.StatusCode) { + var ret StatusCode + return ret + } + return *o.StatusCode +} + +// GetStatusCodeOk returns a tuple with the StatusCode field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ApplyConfigNowStatus) GetStatusCodeOk() (*StatusCode, bool) { + if o == nil || IsNil(o.StatusCode) { + return nil, false + } + return o.StatusCode, true +} + +// HasStatusCode returns a boolean if a field has been set. +func (o *ApplyConfigNowStatus) HasStatusCode() bool { + if o != nil && !IsNil(o.StatusCode) { + return true + } + + return false +} + +// SetStatusCode gets a reference to the given StatusCode and assigns it to the StatusCode field. +func (o *ApplyConfigNowStatus) SetStatusCode(v StatusCode) { + o.StatusCode = &v +} + +func (o ApplyConfigNowStatus) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ApplyConfigNowStatus) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Hostid) { + toSerialize["hostid"] = o.Hostid + } + if !IsNil(o.Ophid) { + toSerialize["ophid"] = o.Ophid + } + if !IsNil(o.StatusCode) { + toSerialize["statusCode"] = o.StatusCode + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *ApplyConfigNowStatus) UnmarshalJSON(data []byte) (err error) { + varApplyConfigNowStatus := _ApplyConfigNowStatus{} + + err = json.Unmarshal(data, &varApplyConfigNowStatus) + + if err != nil { + return err + } + + *o = ApplyConfigNowStatus(varApplyConfigNowStatus) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "hostid") + delete(additionalProperties, "ophid") + delete(additionalProperties, "statusCode") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableApplyConfigNowStatus struct { + value *ApplyConfigNowStatus + isSet bool +} + +func (v NullableApplyConfigNowStatus) Get() *ApplyConfigNowStatus { + return v.value +} + +func (v *NullableApplyConfigNowStatus) Set(val *ApplyConfigNowStatus) { + v.value = val + v.isSet = true +} + +func (v NullableApplyConfigNowStatus) IsSet() bool { + return v.isSet +} + +func (v *NullableApplyConfigNowStatus) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableApplyConfigNowStatus(val *ApplyConfigNowStatus) *NullableApplyConfigNowStatus { + return &NullableApplyConfigNowStatus{value: val, isSet: true} +} + +func (v NullableApplyConfigNowStatus) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableApplyConfigNowStatus) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/upgradepolicy/model_batch_maintenance_window.go b/upgradepolicy/model_batch_maintenance_window.go new file mode 100644 index 0000000..4a462d8 --- /dev/null +++ b/upgradepolicy/model_batch_maintenance_window.go @@ -0,0 +1,227 @@ +/* +Schedule Software/Config Updates + +Infoblox by default does automatic software updates when they become available. Updates are applied to all on-prem hosts, physical or virtual. However, you can override and schedule the software updates. You can also defer the updates to a later date and time. You can configure up to a total of 50 deferrals (scheduled and deferred software updates), which means you have the flexibility to create up to 50 update groups across different on-prem hosts by mapping with appropriate tags. Tags are be used to associate deferrals (scheduled or deferred) with a specific or group of onprem-hosts. Apart from software update deferrals, config update deferrals also can be configured using these overrides. + +API version: v2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package upgradepolicy + +import ( + "encoding/json" +) + +// checks if the BatchMaintenanceWindow type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &BatchMaintenanceWindow{} + +// BatchMaintenanceWindow struct for BatchMaintenanceWindow +type BatchMaintenanceWindow struct { + CreateMws []CreateMaintenanceWindow `json:"create_mws,omitempty"` + DeleteMws []string `json:"delete_mws,omitempty"` + UpdateMws []UpdateBatchMaintenanceWindow `json:"update_mws,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _BatchMaintenanceWindow BatchMaintenanceWindow + +// NewBatchMaintenanceWindow instantiates a new BatchMaintenanceWindow 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 NewBatchMaintenanceWindow() *BatchMaintenanceWindow { + this := BatchMaintenanceWindow{} + return &this +} + +// NewBatchMaintenanceWindowWithDefaults instantiates a new BatchMaintenanceWindow 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 NewBatchMaintenanceWindowWithDefaults() *BatchMaintenanceWindow { + this := BatchMaintenanceWindow{} + return &this +} + +// GetCreateMws returns the CreateMws field value if set, zero value otherwise. +func (o *BatchMaintenanceWindow) GetCreateMws() []CreateMaintenanceWindow { + if o == nil || IsNil(o.CreateMws) { + var ret []CreateMaintenanceWindow + return ret + } + return o.CreateMws +} + +// GetCreateMwsOk returns a tuple with the CreateMws field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *BatchMaintenanceWindow) GetCreateMwsOk() ([]CreateMaintenanceWindow, bool) { + if o == nil || IsNil(o.CreateMws) { + return nil, false + } + return o.CreateMws, true +} + +// HasCreateMws returns a boolean if a field has been set. +func (o *BatchMaintenanceWindow) HasCreateMws() bool { + if o != nil && !IsNil(o.CreateMws) { + return true + } + + return false +} + +// SetCreateMws gets a reference to the given []CreateMaintenanceWindow and assigns it to the CreateMws field. +func (o *BatchMaintenanceWindow) SetCreateMws(v []CreateMaintenanceWindow) { + o.CreateMws = v +} + +// GetDeleteMws returns the DeleteMws field value if set, zero value otherwise. +func (o *BatchMaintenanceWindow) GetDeleteMws() []string { + if o == nil || IsNil(o.DeleteMws) { + var ret []string + return ret + } + return o.DeleteMws +} + +// GetDeleteMwsOk returns a tuple with the DeleteMws field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *BatchMaintenanceWindow) GetDeleteMwsOk() ([]string, bool) { + if o == nil || IsNil(o.DeleteMws) { + return nil, false + } + return o.DeleteMws, true +} + +// HasDeleteMws returns a boolean if a field has been set. +func (o *BatchMaintenanceWindow) HasDeleteMws() bool { + if o != nil && !IsNil(o.DeleteMws) { + return true + } + + return false +} + +// SetDeleteMws gets a reference to the given []string and assigns it to the DeleteMws field. +func (o *BatchMaintenanceWindow) SetDeleteMws(v []string) { + o.DeleteMws = v +} + +// GetUpdateMws returns the UpdateMws field value if set, zero value otherwise. +func (o *BatchMaintenanceWindow) GetUpdateMws() []UpdateBatchMaintenanceWindow { + if o == nil || IsNil(o.UpdateMws) { + var ret []UpdateBatchMaintenanceWindow + return ret + } + return o.UpdateMws +} + +// GetUpdateMwsOk returns a tuple with the UpdateMws field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *BatchMaintenanceWindow) GetUpdateMwsOk() ([]UpdateBatchMaintenanceWindow, bool) { + if o == nil || IsNil(o.UpdateMws) { + return nil, false + } + return o.UpdateMws, true +} + +// HasUpdateMws returns a boolean if a field has been set. +func (o *BatchMaintenanceWindow) HasUpdateMws() bool { + if o != nil && !IsNil(o.UpdateMws) { + return true + } + + return false +} + +// SetUpdateMws gets a reference to the given []UpdateBatchMaintenanceWindow and assigns it to the UpdateMws field. +func (o *BatchMaintenanceWindow) SetUpdateMws(v []UpdateBatchMaintenanceWindow) { + o.UpdateMws = v +} + +func (o BatchMaintenanceWindow) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o BatchMaintenanceWindow) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.CreateMws) { + toSerialize["create_mws"] = o.CreateMws + } + if !IsNil(o.DeleteMws) { + toSerialize["delete_mws"] = o.DeleteMws + } + if !IsNil(o.UpdateMws) { + toSerialize["update_mws"] = o.UpdateMws + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *BatchMaintenanceWindow) UnmarshalJSON(data []byte) (err error) { + varBatchMaintenanceWindow := _BatchMaintenanceWindow{} + + err = json.Unmarshal(data, &varBatchMaintenanceWindow) + + if err != nil { + return err + } + + *o = BatchMaintenanceWindow(varBatchMaintenanceWindow) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "create_mws") + delete(additionalProperties, "delete_mws") + delete(additionalProperties, "update_mws") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableBatchMaintenanceWindow struct { + value *BatchMaintenanceWindow + isSet bool +} + +func (v NullableBatchMaintenanceWindow) Get() *BatchMaintenanceWindow { + return v.value +} + +func (v *NullableBatchMaintenanceWindow) Set(val *BatchMaintenanceWindow) { + v.value = val + v.isSet = true +} + +func (v NullableBatchMaintenanceWindow) IsSet() bool { + return v.isSet +} + +func (v *NullableBatchMaintenanceWindow) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableBatchMaintenanceWindow(val *BatchMaintenanceWindow) *NullableBatchMaintenanceWindow { + return &NullableBatchMaintenanceWindow{value: val, isSet: true} +} + +func (v NullableBatchMaintenanceWindow) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableBatchMaintenanceWindow) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/upgradepolicy/model_batch_maintenance_window_request.go b/upgradepolicy/model_batch_maintenance_window_request.go new file mode 100644 index 0000000..c9ce5a8 --- /dev/null +++ b/upgradepolicy/model_batch_maintenance_window_request.go @@ -0,0 +1,153 @@ +/* +Schedule Software/Config Updates + +Infoblox by default does automatic software updates when they become available. Updates are applied to all on-prem hosts, physical or virtual. However, you can override and schedule the software updates. You can also defer the updates to a later date and time. You can configure up to a total of 50 deferrals (scheduled and deferred software updates), which means you have the flexibility to create up to 50 update groups across different on-prem hosts by mapping with appropriate tags. Tags are be used to associate deferrals (scheduled or deferred) with a specific or group of onprem-hosts. Apart from software update deferrals, config update deferrals also can be configured using these overrides. + +API version: v2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package upgradepolicy + +import ( + "encoding/json" +) + +// checks if the BatchMaintenanceWindowRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &BatchMaintenanceWindowRequest{} + +// BatchMaintenanceWindowRequest struct for BatchMaintenanceWindowRequest +type BatchMaintenanceWindowRequest struct { + Payload *BatchMaintenanceWindow `json:"payload,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _BatchMaintenanceWindowRequest BatchMaintenanceWindowRequest + +// NewBatchMaintenanceWindowRequest instantiates a new BatchMaintenanceWindowRequest 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 NewBatchMaintenanceWindowRequest() *BatchMaintenanceWindowRequest { + this := BatchMaintenanceWindowRequest{} + return &this +} + +// NewBatchMaintenanceWindowRequestWithDefaults instantiates a new BatchMaintenanceWindowRequest 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 NewBatchMaintenanceWindowRequestWithDefaults() *BatchMaintenanceWindowRequest { + this := BatchMaintenanceWindowRequest{} + return &this +} + +// GetPayload returns the Payload field value if set, zero value otherwise. +func (o *BatchMaintenanceWindowRequest) GetPayload() BatchMaintenanceWindow { + if o == nil || IsNil(o.Payload) { + var ret BatchMaintenanceWindow + return ret + } + return *o.Payload +} + +// GetPayloadOk returns a tuple with the Payload field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *BatchMaintenanceWindowRequest) GetPayloadOk() (*BatchMaintenanceWindow, bool) { + if o == nil || IsNil(o.Payload) { + return nil, false + } + return o.Payload, true +} + +// HasPayload returns a boolean if a field has been set. +func (o *BatchMaintenanceWindowRequest) HasPayload() bool { + if o != nil && !IsNil(o.Payload) { + return true + } + + return false +} + +// SetPayload gets a reference to the given BatchMaintenanceWindow and assigns it to the Payload field. +func (o *BatchMaintenanceWindowRequest) SetPayload(v BatchMaintenanceWindow) { + o.Payload = &v +} + +func (o BatchMaintenanceWindowRequest) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o BatchMaintenanceWindowRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Payload) { + toSerialize["payload"] = o.Payload + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *BatchMaintenanceWindowRequest) UnmarshalJSON(data []byte) (err error) { + varBatchMaintenanceWindowRequest := _BatchMaintenanceWindowRequest{} + + err = json.Unmarshal(data, &varBatchMaintenanceWindowRequest) + + if err != nil { + return err + } + + *o = BatchMaintenanceWindowRequest(varBatchMaintenanceWindowRequest) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "payload") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableBatchMaintenanceWindowRequest struct { + value *BatchMaintenanceWindowRequest + isSet bool +} + +func (v NullableBatchMaintenanceWindowRequest) Get() *BatchMaintenanceWindowRequest { + return v.value +} + +func (v *NullableBatchMaintenanceWindowRequest) Set(val *BatchMaintenanceWindowRequest) { + v.value = val + v.isSet = true +} + +func (v NullableBatchMaintenanceWindowRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableBatchMaintenanceWindowRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableBatchMaintenanceWindowRequest(val *BatchMaintenanceWindowRequest) *NullableBatchMaintenanceWindowRequest { + return &NullableBatchMaintenanceWindowRequest{value: val, isSet: true} +} + +func (v NullableBatchMaintenanceWindowRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableBatchMaintenanceWindowRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/upgradepolicy/model_batch_maintenance_window_response.go b/upgradepolicy/model_batch_maintenance_window_response.go new file mode 100644 index 0000000..b382eb8 --- /dev/null +++ b/upgradepolicy/model_batch_maintenance_window_response.go @@ -0,0 +1,153 @@ +/* +Schedule Software/Config Updates + +Infoblox by default does automatic software updates when they become available. Updates are applied to all on-prem hosts, physical or virtual. However, you can override and schedule the software updates. You can also defer the updates to a later date and time. You can configure up to a total of 50 deferrals (scheduled and deferred software updates), which means you have the flexibility to create up to 50 update groups across different on-prem hosts by mapping with appropriate tags. Tags are be used to associate deferrals (scheduled or deferred) with a specific or group of onprem-hosts. Apart from software update deferrals, config update deferrals also can be configured using these overrides. + +API version: v2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package upgradepolicy + +import ( + "encoding/json" +) + +// checks if the BatchMaintenanceWindowResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &BatchMaintenanceWindowResponse{} + +// BatchMaintenanceWindowResponse struct for BatchMaintenanceWindowResponse +type BatchMaintenanceWindowResponse struct { + Result *BatchMaintenanceWindowResult `json:"result,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _BatchMaintenanceWindowResponse BatchMaintenanceWindowResponse + +// NewBatchMaintenanceWindowResponse instantiates a new BatchMaintenanceWindowResponse 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 NewBatchMaintenanceWindowResponse() *BatchMaintenanceWindowResponse { + this := BatchMaintenanceWindowResponse{} + return &this +} + +// NewBatchMaintenanceWindowResponseWithDefaults instantiates a new BatchMaintenanceWindowResponse 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 NewBatchMaintenanceWindowResponseWithDefaults() *BatchMaintenanceWindowResponse { + this := BatchMaintenanceWindowResponse{} + return &this +} + +// GetResult returns the Result field value if set, zero value otherwise. +func (o *BatchMaintenanceWindowResponse) GetResult() BatchMaintenanceWindowResult { + if o == nil || IsNil(o.Result) { + var ret BatchMaintenanceWindowResult + return ret + } + return *o.Result +} + +// GetResultOk returns a tuple with the Result field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *BatchMaintenanceWindowResponse) GetResultOk() (*BatchMaintenanceWindowResult, bool) { + if o == nil || IsNil(o.Result) { + return nil, false + } + return o.Result, true +} + +// HasResult returns a boolean if a field has been set. +func (o *BatchMaintenanceWindowResponse) HasResult() bool { + if o != nil && !IsNil(o.Result) { + return true + } + + return false +} + +// SetResult gets a reference to the given BatchMaintenanceWindowResult and assigns it to the Result field. +func (o *BatchMaintenanceWindowResponse) SetResult(v BatchMaintenanceWindowResult) { + o.Result = &v +} + +func (o BatchMaintenanceWindowResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o BatchMaintenanceWindowResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Result) { + toSerialize["result"] = o.Result + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *BatchMaintenanceWindowResponse) UnmarshalJSON(data []byte) (err error) { + varBatchMaintenanceWindowResponse := _BatchMaintenanceWindowResponse{} + + err = json.Unmarshal(data, &varBatchMaintenanceWindowResponse) + + if err != nil { + return err + } + + *o = BatchMaintenanceWindowResponse(varBatchMaintenanceWindowResponse) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "result") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableBatchMaintenanceWindowResponse struct { + value *BatchMaintenanceWindowResponse + isSet bool +} + +func (v NullableBatchMaintenanceWindowResponse) Get() *BatchMaintenanceWindowResponse { + return v.value +} + +func (v *NullableBatchMaintenanceWindowResponse) Set(val *BatchMaintenanceWindowResponse) { + v.value = val + v.isSet = true +} + +func (v NullableBatchMaintenanceWindowResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableBatchMaintenanceWindowResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableBatchMaintenanceWindowResponse(val *BatchMaintenanceWindowResponse) *NullableBatchMaintenanceWindowResponse { + return &NullableBatchMaintenanceWindowResponse{value: val, isSet: true} +} + +func (v NullableBatchMaintenanceWindowResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableBatchMaintenanceWindowResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/upgradepolicy/model_batch_maintenance_window_result.go b/upgradepolicy/model_batch_maintenance_window_result.go new file mode 100644 index 0000000..c1965bc --- /dev/null +++ b/upgradepolicy/model_batch_maintenance_window_result.go @@ -0,0 +1,190 @@ +/* +Schedule Software/Config Updates + +Infoblox by default does automatic software updates when they become available. Updates are applied to all on-prem hosts, physical or virtual. However, you can override and schedule the software updates. You can also defer the updates to a later date and time. You can configure up to a total of 50 deferrals (scheduled and deferred software updates), which means you have the flexibility to create up to 50 update groups across different on-prem hosts by mapping with appropriate tags. Tags are be used to associate deferrals (scheduled or deferred) with a specific or group of onprem-hosts. Apart from software update deferrals, config update deferrals also can be configured using these overrides. + +API version: v2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package upgradepolicy + +import ( + "encoding/json" +) + +// checks if the BatchMaintenanceWindowResult type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &BatchMaintenanceWindowResult{} + +// BatchMaintenanceWindowResult struct for BatchMaintenanceWindowResult +type BatchMaintenanceWindowResult struct { + CreatedIds []string `json:"created_ids,omitempty"` + UpdatedMws []MaintenanceWindow `json:"updated_mws,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _BatchMaintenanceWindowResult BatchMaintenanceWindowResult + +// NewBatchMaintenanceWindowResult instantiates a new BatchMaintenanceWindowResult 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 NewBatchMaintenanceWindowResult() *BatchMaintenanceWindowResult { + this := BatchMaintenanceWindowResult{} + return &this +} + +// NewBatchMaintenanceWindowResultWithDefaults instantiates a new BatchMaintenanceWindowResult 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 NewBatchMaintenanceWindowResultWithDefaults() *BatchMaintenanceWindowResult { + this := BatchMaintenanceWindowResult{} + return &this +} + +// GetCreatedIds returns the CreatedIds field value if set, zero value otherwise. +func (o *BatchMaintenanceWindowResult) GetCreatedIds() []string { + if o == nil || IsNil(o.CreatedIds) { + var ret []string + return ret + } + return o.CreatedIds +} + +// GetCreatedIdsOk returns a tuple with the CreatedIds field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *BatchMaintenanceWindowResult) GetCreatedIdsOk() ([]string, bool) { + if o == nil || IsNil(o.CreatedIds) { + return nil, false + } + return o.CreatedIds, true +} + +// HasCreatedIds returns a boolean if a field has been set. +func (o *BatchMaintenanceWindowResult) HasCreatedIds() bool { + if o != nil && !IsNil(o.CreatedIds) { + return true + } + + return false +} + +// SetCreatedIds gets a reference to the given []string and assigns it to the CreatedIds field. +func (o *BatchMaintenanceWindowResult) SetCreatedIds(v []string) { + o.CreatedIds = v +} + +// GetUpdatedMws returns the UpdatedMws field value if set, zero value otherwise. +func (o *BatchMaintenanceWindowResult) GetUpdatedMws() []MaintenanceWindow { + if o == nil || IsNil(o.UpdatedMws) { + var ret []MaintenanceWindow + return ret + } + return o.UpdatedMws +} + +// GetUpdatedMwsOk returns a tuple with the UpdatedMws field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *BatchMaintenanceWindowResult) GetUpdatedMwsOk() ([]MaintenanceWindow, bool) { + if o == nil || IsNil(o.UpdatedMws) { + return nil, false + } + return o.UpdatedMws, true +} + +// HasUpdatedMws returns a boolean if a field has been set. +func (o *BatchMaintenanceWindowResult) HasUpdatedMws() bool { + if o != nil && !IsNil(o.UpdatedMws) { + return true + } + + return false +} + +// SetUpdatedMws gets a reference to the given []MaintenanceWindow and assigns it to the UpdatedMws field. +func (o *BatchMaintenanceWindowResult) SetUpdatedMws(v []MaintenanceWindow) { + o.UpdatedMws = v +} + +func (o BatchMaintenanceWindowResult) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o BatchMaintenanceWindowResult) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.CreatedIds) { + toSerialize["created_ids"] = o.CreatedIds + } + if !IsNil(o.UpdatedMws) { + toSerialize["updated_mws"] = o.UpdatedMws + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *BatchMaintenanceWindowResult) UnmarshalJSON(data []byte) (err error) { + varBatchMaintenanceWindowResult := _BatchMaintenanceWindowResult{} + + err = json.Unmarshal(data, &varBatchMaintenanceWindowResult) + + if err != nil { + return err + } + + *o = BatchMaintenanceWindowResult(varBatchMaintenanceWindowResult) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "created_ids") + delete(additionalProperties, "updated_mws") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableBatchMaintenanceWindowResult struct { + value *BatchMaintenanceWindowResult + isSet bool +} + +func (v NullableBatchMaintenanceWindowResult) Get() *BatchMaintenanceWindowResult { + return v.value +} + +func (v *NullableBatchMaintenanceWindowResult) Set(val *BatchMaintenanceWindowResult) { + v.value = val + v.isSet = true +} + +func (v NullableBatchMaintenanceWindowResult) IsSet() bool { + return v.isSet +} + +func (v *NullableBatchMaintenanceWindowResult) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableBatchMaintenanceWindowResult(val *BatchMaintenanceWindowResult) *NullableBatchMaintenanceWindowResult { + return &NullableBatchMaintenanceWindowResult{value: val, isSet: true} +} + +func (v NullableBatchMaintenanceWindowResult) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableBatchMaintenanceWindowResult) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/upgradepolicy/model_create_maintenance_window.go b/upgradepolicy/model_create_maintenance_window.go new file mode 100644 index 0000000..c6c359c --- /dev/null +++ b/upgradepolicy/model_create_maintenance_window.go @@ -0,0 +1,301 @@ +/* +Schedule Software/Config Updates + +Infoblox by default does automatic software updates when they become available. Updates are applied to all on-prem hosts, physical or virtual. However, you can override and schedule the software updates. You can also defer the updates to a later date and time. You can configure up to a total of 50 deferrals (scheduled and deferred software updates), which means you have the flexibility to create up to 50 update groups across different on-prem hosts by mapping with appropriate tags. Tags are be used to associate deferrals (scheduled or deferred) with a specific or group of onprem-hosts. Apart from software update deferrals, config update deferrals also can be configured using these overrides. + +API version: v2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package upgradepolicy + +import ( + "encoding/json" +) + +// checks if the CreateMaintenanceWindow type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreateMaintenanceWindow{} + +// CreateMaintenanceWindow struct for CreateMaintenanceWindow +type CreateMaintenanceWindow struct { + DeferredWindow *DeferredWindow `json:"deferred_window,omitempty"` + Id *string `json:"id,omitempty"` + ScheduledWindow *ScheduledWindow `json:"scheduled_window,omitempty"` + Tags map[string]map[string]interface{} `json:"tags,omitempty"` + WindowType *string `json:"window_type,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _CreateMaintenanceWindow CreateMaintenanceWindow + +// NewCreateMaintenanceWindow instantiates a new CreateMaintenanceWindow 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 NewCreateMaintenanceWindow() *CreateMaintenanceWindow { + this := CreateMaintenanceWindow{} + return &this +} + +// NewCreateMaintenanceWindowWithDefaults instantiates a new CreateMaintenanceWindow 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 NewCreateMaintenanceWindowWithDefaults() *CreateMaintenanceWindow { + this := CreateMaintenanceWindow{} + return &this +} + +// GetDeferredWindow returns the DeferredWindow field value if set, zero value otherwise. +func (o *CreateMaintenanceWindow) GetDeferredWindow() DeferredWindow { + if o == nil || IsNil(o.DeferredWindow) { + var ret DeferredWindow + return ret + } + return *o.DeferredWindow +} + +// GetDeferredWindowOk returns a tuple with the DeferredWindow field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateMaintenanceWindow) GetDeferredWindowOk() (*DeferredWindow, bool) { + if o == nil || IsNil(o.DeferredWindow) { + return nil, false + } + return o.DeferredWindow, true +} + +// HasDeferredWindow returns a boolean if a field has been set. +func (o *CreateMaintenanceWindow) HasDeferredWindow() bool { + if o != nil && !IsNil(o.DeferredWindow) { + return true + } + + return false +} + +// SetDeferredWindow gets a reference to the given DeferredWindow and assigns it to the DeferredWindow field. +func (o *CreateMaintenanceWindow) SetDeferredWindow(v DeferredWindow) { + o.DeferredWindow = &v +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *CreateMaintenanceWindow) GetId() string { + if o == nil || IsNil(o.Id) { + var ret string + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateMaintenanceWindow) GetIdOk() (*string, bool) { + if o == nil || IsNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *CreateMaintenanceWindow) HasId() bool { + if o != nil && !IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given string and assigns it to the Id field. +func (o *CreateMaintenanceWindow) SetId(v string) { + o.Id = &v +} + +// GetScheduledWindow returns the ScheduledWindow field value if set, zero value otherwise. +func (o *CreateMaintenanceWindow) GetScheduledWindow() ScheduledWindow { + if o == nil || IsNil(o.ScheduledWindow) { + var ret ScheduledWindow + return ret + } + return *o.ScheduledWindow +} + +// GetScheduledWindowOk returns a tuple with the ScheduledWindow field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateMaintenanceWindow) GetScheduledWindowOk() (*ScheduledWindow, bool) { + if o == nil || IsNil(o.ScheduledWindow) { + return nil, false + } + return o.ScheduledWindow, true +} + +// HasScheduledWindow returns a boolean if a field has been set. +func (o *CreateMaintenanceWindow) HasScheduledWindow() bool { + if o != nil && !IsNil(o.ScheduledWindow) { + return true + } + + return false +} + +// SetScheduledWindow gets a reference to the given ScheduledWindow and assigns it to the ScheduledWindow field. +func (o *CreateMaintenanceWindow) SetScheduledWindow(v ScheduledWindow) { + o.ScheduledWindow = &v +} + +// GetTags returns the Tags field value if set, zero value otherwise. +func (o *CreateMaintenanceWindow) GetTags() map[string]map[string]interface{} { + if o == nil || IsNil(o.Tags) { + var ret map[string]map[string]interface{} + return ret + } + return o.Tags +} + +// GetTagsOk returns a tuple with the Tags field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateMaintenanceWindow) GetTagsOk() (map[string]map[string]interface{}, bool) { + if o == nil || IsNil(o.Tags) { + return map[string]map[string]interface{}{}, false + } + return o.Tags, true +} + +// HasTags returns a boolean if a field has been set. +func (o *CreateMaintenanceWindow) HasTags() bool { + if o != nil && !IsNil(o.Tags) { + return true + } + + return false +} + +// SetTags gets a reference to the given map[string]map[string]interface{} and assigns it to the Tags field. +func (o *CreateMaintenanceWindow) SetTags(v map[string]map[string]interface{}) { + o.Tags = v +} + +// GetWindowType returns the WindowType field value if set, zero value otherwise. +func (o *CreateMaintenanceWindow) GetWindowType() string { + if o == nil || IsNil(o.WindowType) { + var ret string + return ret + } + return *o.WindowType +} + +// GetWindowTypeOk returns a tuple with the WindowType field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateMaintenanceWindow) GetWindowTypeOk() (*string, bool) { + if o == nil || IsNil(o.WindowType) { + return nil, false + } + return o.WindowType, true +} + +// HasWindowType returns a boolean if a field has been set. +func (o *CreateMaintenanceWindow) HasWindowType() bool { + if o != nil && !IsNil(o.WindowType) { + return true + } + + return false +} + +// SetWindowType gets a reference to the given string and assigns it to the WindowType field. +func (o *CreateMaintenanceWindow) SetWindowType(v string) { + o.WindowType = &v +} + +func (o CreateMaintenanceWindow) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CreateMaintenanceWindow) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.DeferredWindow) { + toSerialize["deferred_window"] = o.DeferredWindow + } + if !IsNil(o.Id) { + toSerialize["id"] = o.Id + } + if !IsNil(o.ScheduledWindow) { + toSerialize["scheduled_window"] = o.ScheduledWindow + } + if !IsNil(o.Tags) { + toSerialize["tags"] = o.Tags + } + if !IsNil(o.WindowType) { + toSerialize["window_type"] = o.WindowType + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *CreateMaintenanceWindow) UnmarshalJSON(data []byte) (err error) { + varCreateMaintenanceWindow := _CreateMaintenanceWindow{} + + err = json.Unmarshal(data, &varCreateMaintenanceWindow) + + if err != nil { + return err + } + + *o = CreateMaintenanceWindow(varCreateMaintenanceWindow) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "deferred_window") + delete(additionalProperties, "id") + delete(additionalProperties, "scheduled_window") + delete(additionalProperties, "tags") + delete(additionalProperties, "window_type") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableCreateMaintenanceWindow struct { + value *CreateMaintenanceWindow + isSet bool +} + +func (v NullableCreateMaintenanceWindow) Get() *CreateMaintenanceWindow { + return v.value +} + +func (v *NullableCreateMaintenanceWindow) Set(val *CreateMaintenanceWindow) { + v.value = val + v.isSet = true +} + +func (v NullableCreateMaintenanceWindow) IsSet() bool { + return v.isSet +} + +func (v *NullableCreateMaintenanceWindow) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCreateMaintenanceWindow(val *CreateMaintenanceWindow) *NullableCreateMaintenanceWindow { + return &NullableCreateMaintenanceWindow{value: val, isSet: true} +} + +func (v NullableCreateMaintenanceWindow) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCreateMaintenanceWindow) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/upgradepolicy/model_create_maintenance_window_request.go b/upgradepolicy/model_create_maintenance_window_request.go new file mode 100644 index 0000000..d1aed2e --- /dev/null +++ b/upgradepolicy/model_create_maintenance_window_request.go @@ -0,0 +1,153 @@ +/* +Schedule Software/Config Updates + +Infoblox by default does automatic software updates when they become available. Updates are applied to all on-prem hosts, physical or virtual. However, you can override and schedule the software updates. You can also defer the updates to a later date and time. You can configure up to a total of 50 deferrals (scheduled and deferred software updates), which means you have the flexibility to create up to 50 update groups across different on-prem hosts by mapping with appropriate tags. Tags are be used to associate deferrals (scheduled or deferred) with a specific or group of onprem-hosts. Apart from software update deferrals, config update deferrals also can be configured using these overrides. + +API version: v2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package upgradepolicy + +import ( + "encoding/json" +) + +// checks if the CreateMaintenanceWindowRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreateMaintenanceWindowRequest{} + +// CreateMaintenanceWindowRequest struct for CreateMaintenanceWindowRequest +type CreateMaintenanceWindowRequest struct { + Payload *CreateMaintenanceWindow `json:"payload,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _CreateMaintenanceWindowRequest CreateMaintenanceWindowRequest + +// NewCreateMaintenanceWindowRequest instantiates a new CreateMaintenanceWindowRequest 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 NewCreateMaintenanceWindowRequest() *CreateMaintenanceWindowRequest { + this := CreateMaintenanceWindowRequest{} + return &this +} + +// NewCreateMaintenanceWindowRequestWithDefaults instantiates a new CreateMaintenanceWindowRequest 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 NewCreateMaintenanceWindowRequestWithDefaults() *CreateMaintenanceWindowRequest { + this := CreateMaintenanceWindowRequest{} + return &this +} + +// GetPayload returns the Payload field value if set, zero value otherwise. +func (o *CreateMaintenanceWindowRequest) GetPayload() CreateMaintenanceWindow { + if o == nil || IsNil(o.Payload) { + var ret CreateMaintenanceWindow + return ret + } + return *o.Payload +} + +// GetPayloadOk returns a tuple with the Payload field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateMaintenanceWindowRequest) GetPayloadOk() (*CreateMaintenanceWindow, bool) { + if o == nil || IsNil(o.Payload) { + return nil, false + } + return o.Payload, true +} + +// HasPayload returns a boolean if a field has been set. +func (o *CreateMaintenanceWindowRequest) HasPayload() bool { + if o != nil && !IsNil(o.Payload) { + return true + } + + return false +} + +// SetPayload gets a reference to the given CreateMaintenanceWindow and assigns it to the Payload field. +func (o *CreateMaintenanceWindowRequest) SetPayload(v CreateMaintenanceWindow) { + o.Payload = &v +} + +func (o CreateMaintenanceWindowRequest) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CreateMaintenanceWindowRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Payload) { + toSerialize["payload"] = o.Payload + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *CreateMaintenanceWindowRequest) UnmarshalJSON(data []byte) (err error) { + varCreateMaintenanceWindowRequest := _CreateMaintenanceWindowRequest{} + + err = json.Unmarshal(data, &varCreateMaintenanceWindowRequest) + + if err != nil { + return err + } + + *o = CreateMaintenanceWindowRequest(varCreateMaintenanceWindowRequest) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "payload") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableCreateMaintenanceWindowRequest struct { + value *CreateMaintenanceWindowRequest + isSet bool +} + +func (v NullableCreateMaintenanceWindowRequest) Get() *CreateMaintenanceWindowRequest { + return v.value +} + +func (v *NullableCreateMaintenanceWindowRequest) Set(val *CreateMaintenanceWindowRequest) { + v.value = val + v.isSet = true +} + +func (v NullableCreateMaintenanceWindowRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableCreateMaintenanceWindowRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCreateMaintenanceWindowRequest(val *CreateMaintenanceWindowRequest) *NullableCreateMaintenanceWindowRequest { + return &NullableCreateMaintenanceWindowRequest{value: val, isSet: true} +} + +func (v NullableCreateMaintenanceWindowRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCreateMaintenanceWindowRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/upgradepolicy/model_create_maintenance_window_response.go b/upgradepolicy/model_create_maintenance_window_response.go new file mode 100644 index 0000000..6bad750 --- /dev/null +++ b/upgradepolicy/model_create_maintenance_window_response.go @@ -0,0 +1,153 @@ +/* +Schedule Software/Config Updates + +Infoblox by default does automatic software updates when they become available. Updates are applied to all on-prem hosts, physical or virtual. However, you can override and schedule the software updates. You can also defer the updates to a later date and time. You can configure up to a total of 50 deferrals (scheduled and deferred software updates), which means you have the flexibility to create up to 50 update groups across different on-prem hosts by mapping with appropriate tags. Tags are be used to associate deferrals (scheduled or deferred) with a specific or group of onprem-hosts. Apart from software update deferrals, config update deferrals also can be configured using these overrides. + +API version: v2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package upgradepolicy + +import ( + "encoding/json" +) + +// checks if the CreateMaintenanceWindowResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreateMaintenanceWindowResponse{} + +// CreateMaintenanceWindowResponse struct for CreateMaintenanceWindowResponse +type CreateMaintenanceWindowResponse struct { + Id *string `json:"id,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _CreateMaintenanceWindowResponse CreateMaintenanceWindowResponse + +// NewCreateMaintenanceWindowResponse instantiates a new CreateMaintenanceWindowResponse 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 NewCreateMaintenanceWindowResponse() *CreateMaintenanceWindowResponse { + this := CreateMaintenanceWindowResponse{} + return &this +} + +// NewCreateMaintenanceWindowResponseWithDefaults instantiates a new CreateMaintenanceWindowResponse 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 NewCreateMaintenanceWindowResponseWithDefaults() *CreateMaintenanceWindowResponse { + this := CreateMaintenanceWindowResponse{} + return &this +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *CreateMaintenanceWindowResponse) GetId() string { + if o == nil || IsNil(o.Id) { + var ret string + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateMaintenanceWindowResponse) GetIdOk() (*string, bool) { + if o == nil || IsNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *CreateMaintenanceWindowResponse) HasId() bool { + if o != nil && !IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given string and assigns it to the Id field. +func (o *CreateMaintenanceWindowResponse) SetId(v string) { + o.Id = &v +} + +func (o CreateMaintenanceWindowResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CreateMaintenanceWindowResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Id) { + toSerialize["id"] = o.Id + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *CreateMaintenanceWindowResponse) UnmarshalJSON(data []byte) (err error) { + varCreateMaintenanceWindowResponse := _CreateMaintenanceWindowResponse{} + + err = json.Unmarshal(data, &varCreateMaintenanceWindowResponse) + + if err != nil { + return err + } + + *o = CreateMaintenanceWindowResponse(varCreateMaintenanceWindowResponse) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "id") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableCreateMaintenanceWindowResponse struct { + value *CreateMaintenanceWindowResponse + isSet bool +} + +func (v NullableCreateMaintenanceWindowResponse) Get() *CreateMaintenanceWindowResponse { + return v.value +} + +func (v *NullableCreateMaintenanceWindowResponse) Set(val *CreateMaintenanceWindowResponse) { + v.value = val + v.isSet = true +} + +func (v NullableCreateMaintenanceWindowResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableCreateMaintenanceWindowResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCreateMaintenanceWindowResponse(val *CreateMaintenanceWindowResponse) *NullableCreateMaintenanceWindowResponse { + return &NullableCreateMaintenanceWindowResponse{value: val, isSet: true} +} + +func (v NullableCreateMaintenanceWindowResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCreateMaintenanceWindowResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/upgradepolicy/model_deferred_window.go b/upgradepolicy/model_deferred_window.go new file mode 100644 index 0000000..b83ddb9 --- /dev/null +++ b/upgradepolicy/model_deferred_window.go @@ -0,0 +1,302 @@ +/* +Schedule Software/Config Updates + +Infoblox by default does automatic software updates when they become available. Updates are applied to all on-prem hosts, physical or virtual. However, you can override and schedule the software updates. You can also defer the updates to a later date and time. You can configure up to a total of 50 deferrals (scheduled and deferred software updates), which means you have the flexibility to create up to 50 update groups across different on-prem hosts by mapping with appropriate tags. Tags are be used to associate deferrals (scheduled or deferred) with a specific or group of onprem-hosts. Apart from software update deferrals, config update deferrals also can be configured using these overrides. + +API version: v2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package upgradepolicy + +import ( + "encoding/json" + "time" +) + +// checks if the DeferredWindow type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &DeferredWindow{} + +// DeferredWindow struct for DeferredWindow +type DeferredWindow struct { + CreatedAt *time.Time `json:"created_at,omitempty"` + Enabled *bool `json:"enabled,omitempty"` + EndTime *time.Time `json:"end_time,omitempty"` + StartTime *time.Time `json:"start_time,omitempty"` + UpdatedAt *time.Time `json:"updated_at,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _DeferredWindow DeferredWindow + +// NewDeferredWindow instantiates a new DeferredWindow 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 NewDeferredWindow() *DeferredWindow { + this := DeferredWindow{} + return &this +} + +// NewDeferredWindowWithDefaults instantiates a new DeferredWindow 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 NewDeferredWindowWithDefaults() *DeferredWindow { + this := DeferredWindow{} + return &this +} + +// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. +func (o *DeferredWindow) GetCreatedAt() time.Time { + if o == nil || IsNil(o.CreatedAt) { + var ret time.Time + return ret + } + return *o.CreatedAt +} + +// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DeferredWindow) GetCreatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.CreatedAt) { + return nil, false + } + return o.CreatedAt, true +} + +// HasCreatedAt returns a boolean if a field has been set. +func (o *DeferredWindow) HasCreatedAt() bool { + if o != nil && !IsNil(o.CreatedAt) { + return true + } + + return false +} + +// SetCreatedAt gets a reference to the given time.Time and assigns it to the CreatedAt field. +func (o *DeferredWindow) SetCreatedAt(v time.Time) { + o.CreatedAt = &v +} + +// GetEnabled returns the Enabled field value if set, zero value otherwise. +func (o *DeferredWindow) GetEnabled() bool { + if o == nil || IsNil(o.Enabled) { + var ret bool + return ret + } + return *o.Enabled +} + +// GetEnabledOk returns a tuple with the Enabled field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DeferredWindow) GetEnabledOk() (*bool, bool) { + if o == nil || IsNil(o.Enabled) { + return nil, false + } + return o.Enabled, true +} + +// HasEnabled returns a boolean if a field has been set. +func (o *DeferredWindow) HasEnabled() bool { + if o != nil && !IsNil(o.Enabled) { + return true + } + + return false +} + +// SetEnabled gets a reference to the given bool and assigns it to the Enabled field. +func (o *DeferredWindow) SetEnabled(v bool) { + o.Enabled = &v +} + +// GetEndTime returns the EndTime field value if set, zero value otherwise. +func (o *DeferredWindow) GetEndTime() time.Time { + if o == nil || IsNil(o.EndTime) { + var ret time.Time + return ret + } + return *o.EndTime +} + +// GetEndTimeOk returns a tuple with the EndTime field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DeferredWindow) GetEndTimeOk() (*time.Time, bool) { + if o == nil || IsNil(o.EndTime) { + return nil, false + } + return o.EndTime, true +} + +// HasEndTime returns a boolean if a field has been set. +func (o *DeferredWindow) HasEndTime() bool { + if o != nil && !IsNil(o.EndTime) { + return true + } + + return false +} + +// SetEndTime gets a reference to the given time.Time and assigns it to the EndTime field. +func (o *DeferredWindow) SetEndTime(v time.Time) { + o.EndTime = &v +} + +// GetStartTime returns the StartTime field value if set, zero value otherwise. +func (o *DeferredWindow) GetStartTime() time.Time { + if o == nil || IsNil(o.StartTime) { + var ret time.Time + return ret + } + return *o.StartTime +} + +// GetStartTimeOk returns a tuple with the StartTime field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DeferredWindow) GetStartTimeOk() (*time.Time, bool) { + if o == nil || IsNil(o.StartTime) { + return nil, false + } + return o.StartTime, true +} + +// HasStartTime returns a boolean if a field has been set. +func (o *DeferredWindow) HasStartTime() bool { + if o != nil && !IsNil(o.StartTime) { + return true + } + + return false +} + +// SetStartTime gets a reference to the given time.Time and assigns it to the StartTime field. +func (o *DeferredWindow) SetStartTime(v time.Time) { + o.StartTime = &v +} + +// GetUpdatedAt returns the UpdatedAt field value if set, zero value otherwise. +func (o *DeferredWindow) GetUpdatedAt() time.Time { + if o == nil || IsNil(o.UpdatedAt) { + var ret time.Time + return ret + } + return *o.UpdatedAt +} + +// GetUpdatedAtOk returns a tuple with the UpdatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DeferredWindow) GetUpdatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.UpdatedAt) { + return nil, false + } + return o.UpdatedAt, true +} + +// HasUpdatedAt returns a boolean if a field has been set. +func (o *DeferredWindow) HasUpdatedAt() bool { + if o != nil && !IsNil(o.UpdatedAt) { + return true + } + + return false +} + +// SetUpdatedAt gets a reference to the given time.Time and assigns it to the UpdatedAt field. +func (o *DeferredWindow) SetUpdatedAt(v time.Time) { + o.UpdatedAt = &v +} + +func (o DeferredWindow) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o DeferredWindow) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.CreatedAt) { + toSerialize["created_at"] = o.CreatedAt + } + if !IsNil(o.Enabled) { + toSerialize["enabled"] = o.Enabled + } + if !IsNil(o.EndTime) { + toSerialize["end_time"] = o.EndTime + } + if !IsNil(o.StartTime) { + toSerialize["start_time"] = o.StartTime + } + if !IsNil(o.UpdatedAt) { + toSerialize["updated_at"] = o.UpdatedAt + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *DeferredWindow) UnmarshalJSON(data []byte) (err error) { + varDeferredWindow := _DeferredWindow{} + + err = json.Unmarshal(data, &varDeferredWindow) + + if err != nil { + return err + } + + *o = DeferredWindow(varDeferredWindow) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "created_at") + delete(additionalProperties, "enabled") + delete(additionalProperties, "end_time") + delete(additionalProperties, "start_time") + delete(additionalProperties, "updated_at") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableDeferredWindow struct { + value *DeferredWindow + isSet bool +} + +func (v NullableDeferredWindow) Get() *DeferredWindow { + return v.value +} + +func (v *NullableDeferredWindow) Set(val *DeferredWindow) { + v.value = val + v.isSet = true +} + +func (v NullableDeferredWindow) IsSet() bool { + return v.isSet +} + +func (v *NullableDeferredWindow) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDeferredWindow(val *DeferredWindow) *NullableDeferredWindow { + return &NullableDeferredWindow{value: val, isSet: true} +} + +func (v NullableDeferredWindow) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDeferredWindow) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/upgradepolicy/model_delete_maintenance_window_response.go b/upgradepolicy/model_delete_maintenance_window_response.go new file mode 100644 index 0000000..0dc9fee --- /dev/null +++ b/upgradepolicy/model_delete_maintenance_window_response.go @@ -0,0 +1,153 @@ +/* +Schedule Software/Config Updates + +Infoblox by default does automatic software updates when they become available. Updates are applied to all on-prem hosts, physical or virtual. However, you can override and schedule the software updates. You can also defer the updates to a later date and time. You can configure up to a total of 50 deferrals (scheduled and deferred software updates), which means you have the flexibility to create up to 50 update groups across different on-prem hosts by mapping with appropriate tags. Tags are be used to associate deferrals (scheduled or deferred) with a specific or group of onprem-hosts. Apart from software update deferrals, config update deferrals also can be configured using these overrides. + +API version: v2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package upgradepolicy + +import ( + "encoding/json" +) + +// checks if the DeleteMaintenanceWindowResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &DeleteMaintenanceWindowResponse{} + +// DeleteMaintenanceWindowResponse struct for DeleteMaintenanceWindowResponse +type DeleteMaintenanceWindowResponse struct { + WindowType *string `json:"window_type,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _DeleteMaintenanceWindowResponse DeleteMaintenanceWindowResponse + +// NewDeleteMaintenanceWindowResponse instantiates a new DeleteMaintenanceWindowResponse 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 NewDeleteMaintenanceWindowResponse() *DeleteMaintenanceWindowResponse { + this := DeleteMaintenanceWindowResponse{} + return &this +} + +// NewDeleteMaintenanceWindowResponseWithDefaults instantiates a new DeleteMaintenanceWindowResponse 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 NewDeleteMaintenanceWindowResponseWithDefaults() *DeleteMaintenanceWindowResponse { + this := DeleteMaintenanceWindowResponse{} + return &this +} + +// GetWindowType returns the WindowType field value if set, zero value otherwise. +func (o *DeleteMaintenanceWindowResponse) GetWindowType() string { + if o == nil || IsNil(o.WindowType) { + var ret string + return ret + } + return *o.WindowType +} + +// GetWindowTypeOk returns a tuple with the WindowType field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DeleteMaintenanceWindowResponse) GetWindowTypeOk() (*string, bool) { + if o == nil || IsNil(o.WindowType) { + return nil, false + } + return o.WindowType, true +} + +// HasWindowType returns a boolean if a field has been set. +func (o *DeleteMaintenanceWindowResponse) HasWindowType() bool { + if o != nil && !IsNil(o.WindowType) { + return true + } + + return false +} + +// SetWindowType gets a reference to the given string and assigns it to the WindowType field. +func (o *DeleteMaintenanceWindowResponse) SetWindowType(v string) { + o.WindowType = &v +} + +func (o DeleteMaintenanceWindowResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o DeleteMaintenanceWindowResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.WindowType) { + toSerialize["window_type"] = o.WindowType + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *DeleteMaintenanceWindowResponse) UnmarshalJSON(data []byte) (err error) { + varDeleteMaintenanceWindowResponse := _DeleteMaintenanceWindowResponse{} + + err = json.Unmarshal(data, &varDeleteMaintenanceWindowResponse) + + if err != nil { + return err + } + + *o = DeleteMaintenanceWindowResponse(varDeleteMaintenanceWindowResponse) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "window_type") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableDeleteMaintenanceWindowResponse struct { + value *DeleteMaintenanceWindowResponse + isSet bool +} + +func (v NullableDeleteMaintenanceWindowResponse) Get() *DeleteMaintenanceWindowResponse { + return v.value +} + +func (v *NullableDeleteMaintenanceWindowResponse) Set(val *DeleteMaintenanceWindowResponse) { + v.value = val + v.isSet = true +} + +func (v NullableDeleteMaintenanceWindowResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableDeleteMaintenanceWindowResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDeleteMaintenanceWindowResponse(val *DeleteMaintenanceWindowResponse) *NullableDeleteMaintenanceWindowResponse { + return &NullableDeleteMaintenanceWindowResponse{value: val, isSet: true} +} + +func (v NullableDeleteMaintenanceWindowResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDeleteMaintenanceWindowResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/upgradepolicy/model_get_maintenance_window_response.go b/upgradepolicy/model_get_maintenance_window_response.go new file mode 100644 index 0000000..b878c89 --- /dev/null +++ b/upgradepolicy/model_get_maintenance_window_response.go @@ -0,0 +1,153 @@ +/* +Schedule Software/Config Updates + +Infoblox by default does automatic software updates when they become available. Updates are applied to all on-prem hosts, physical or virtual. However, you can override and schedule the software updates. You can also defer the updates to a later date and time. You can configure up to a total of 50 deferrals (scheduled and deferred software updates), which means you have the flexibility to create up to 50 update groups across different on-prem hosts by mapping with appropriate tags. Tags are be used to associate deferrals (scheduled or deferred) with a specific or group of onprem-hosts. Apart from software update deferrals, config update deferrals also can be configured using these overrides. + +API version: v2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package upgradepolicy + +import ( + "encoding/json" +) + +// checks if the GetMaintenanceWindowResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &GetMaintenanceWindowResponse{} + +// GetMaintenanceWindowResponse struct for GetMaintenanceWindowResponse +type GetMaintenanceWindowResponse struct { + Result *MaintenanceWindow `json:"result,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _GetMaintenanceWindowResponse GetMaintenanceWindowResponse + +// NewGetMaintenanceWindowResponse instantiates a new GetMaintenanceWindowResponse 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 NewGetMaintenanceWindowResponse() *GetMaintenanceWindowResponse { + this := GetMaintenanceWindowResponse{} + return &this +} + +// NewGetMaintenanceWindowResponseWithDefaults instantiates a new GetMaintenanceWindowResponse 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 NewGetMaintenanceWindowResponseWithDefaults() *GetMaintenanceWindowResponse { + this := GetMaintenanceWindowResponse{} + return &this +} + +// GetResult returns the Result field value if set, zero value otherwise. +func (o *GetMaintenanceWindowResponse) GetResult() MaintenanceWindow { + if o == nil || IsNil(o.Result) { + var ret MaintenanceWindow + return ret + } + return *o.Result +} + +// GetResultOk returns a tuple with the Result field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GetMaintenanceWindowResponse) GetResultOk() (*MaintenanceWindow, bool) { + if o == nil || IsNil(o.Result) { + return nil, false + } + return o.Result, true +} + +// HasResult returns a boolean if a field has been set. +func (o *GetMaintenanceWindowResponse) HasResult() bool { + if o != nil && !IsNil(o.Result) { + return true + } + + return false +} + +// SetResult gets a reference to the given MaintenanceWindow and assigns it to the Result field. +func (o *GetMaintenanceWindowResponse) SetResult(v MaintenanceWindow) { + o.Result = &v +} + +func (o GetMaintenanceWindowResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o GetMaintenanceWindowResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Result) { + toSerialize["result"] = o.Result + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *GetMaintenanceWindowResponse) UnmarshalJSON(data []byte) (err error) { + varGetMaintenanceWindowResponse := _GetMaintenanceWindowResponse{} + + err = json.Unmarshal(data, &varGetMaintenanceWindowResponse) + + if err != nil { + return err + } + + *o = GetMaintenanceWindowResponse(varGetMaintenanceWindowResponse) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "result") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableGetMaintenanceWindowResponse struct { + value *GetMaintenanceWindowResponse + isSet bool +} + +func (v NullableGetMaintenanceWindowResponse) Get() *GetMaintenanceWindowResponse { + return v.value +} + +func (v *NullableGetMaintenanceWindowResponse) Set(val *GetMaintenanceWindowResponse) { + v.value = val + v.isSet = true +} + +func (v NullableGetMaintenanceWindowResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableGetMaintenanceWindowResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableGetMaintenanceWindowResponse(val *GetMaintenanceWindowResponse) *NullableGetMaintenanceWindowResponse { + return &NullableGetMaintenanceWindowResponse{value: val, isSet: true} +} + +func (v NullableGetMaintenanceWindowResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableGetMaintenanceWindowResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/upgradepolicy/model_list_maintenance_window_response.go b/upgradepolicy/model_list_maintenance_window_response.go new file mode 100644 index 0000000..b16b895 --- /dev/null +++ b/upgradepolicy/model_list_maintenance_window_response.go @@ -0,0 +1,153 @@ +/* +Schedule Software/Config Updates + +Infoblox by default does automatic software updates when they become available. Updates are applied to all on-prem hosts, physical or virtual. However, you can override and schedule the software updates. You can also defer the updates to a later date and time. You can configure up to a total of 50 deferrals (scheduled and deferred software updates), which means you have the flexibility to create up to 50 update groups across different on-prem hosts by mapping with appropriate tags. Tags are be used to associate deferrals (scheduled or deferred) with a specific or group of onprem-hosts. Apart from software update deferrals, config update deferrals also can be configured using these overrides. + +API version: v2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package upgradepolicy + +import ( + "encoding/json" +) + +// checks if the ListMaintenanceWindowResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ListMaintenanceWindowResponse{} + +// ListMaintenanceWindowResponse struct for ListMaintenanceWindowResponse +type ListMaintenanceWindowResponse struct { + Result []MaintenanceWindow `json:"result,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _ListMaintenanceWindowResponse ListMaintenanceWindowResponse + +// NewListMaintenanceWindowResponse instantiates a new ListMaintenanceWindowResponse 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 NewListMaintenanceWindowResponse() *ListMaintenanceWindowResponse { + this := ListMaintenanceWindowResponse{} + return &this +} + +// NewListMaintenanceWindowResponseWithDefaults instantiates a new ListMaintenanceWindowResponse 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 NewListMaintenanceWindowResponseWithDefaults() *ListMaintenanceWindowResponse { + this := ListMaintenanceWindowResponse{} + return &this +} + +// GetResult returns the Result field value if set, zero value otherwise. +func (o *ListMaintenanceWindowResponse) GetResult() []MaintenanceWindow { + if o == nil || IsNil(o.Result) { + var ret []MaintenanceWindow + return ret + } + return o.Result +} + +// GetResultOk returns a tuple with the Result field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ListMaintenanceWindowResponse) GetResultOk() ([]MaintenanceWindow, bool) { + if o == nil || IsNil(o.Result) { + return nil, false + } + return o.Result, true +} + +// HasResult returns a boolean if a field has been set. +func (o *ListMaintenanceWindowResponse) HasResult() bool { + if o != nil && !IsNil(o.Result) { + return true + } + + return false +} + +// SetResult gets a reference to the given []MaintenanceWindow and assigns it to the Result field. +func (o *ListMaintenanceWindowResponse) SetResult(v []MaintenanceWindow) { + o.Result = v +} + +func (o ListMaintenanceWindowResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ListMaintenanceWindowResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Result) { + toSerialize["result"] = o.Result + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *ListMaintenanceWindowResponse) UnmarshalJSON(data []byte) (err error) { + varListMaintenanceWindowResponse := _ListMaintenanceWindowResponse{} + + err = json.Unmarshal(data, &varListMaintenanceWindowResponse) + + if err != nil { + return err + } + + *o = ListMaintenanceWindowResponse(varListMaintenanceWindowResponse) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "result") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableListMaintenanceWindowResponse struct { + value *ListMaintenanceWindowResponse + isSet bool +} + +func (v NullableListMaintenanceWindowResponse) Get() *ListMaintenanceWindowResponse { + return v.value +} + +func (v *NullableListMaintenanceWindowResponse) Set(val *ListMaintenanceWindowResponse) { + v.value = val + v.isSet = true +} + +func (v NullableListMaintenanceWindowResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableListMaintenanceWindowResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableListMaintenanceWindowResponse(val *ListMaintenanceWindowResponse) *NullableListMaintenanceWindowResponse { + return &NullableListMaintenanceWindowResponse{value: val, isSet: true} +} + +func (v NullableListMaintenanceWindowResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableListMaintenanceWindowResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/upgradepolicy/model_maintenance_window.go b/upgradepolicy/model_maintenance_window.go new file mode 100644 index 0000000..ed77f3e --- /dev/null +++ b/upgradepolicy/model_maintenance_window.go @@ -0,0 +1,301 @@ +/* +Schedule Software/Config Updates + +Infoblox by default does automatic software updates when they become available. Updates are applied to all on-prem hosts, physical or virtual. However, you can override and schedule the software updates. You can also defer the updates to a later date and time. You can configure up to a total of 50 deferrals (scheduled and deferred software updates), which means you have the flexibility to create up to 50 update groups across different on-prem hosts by mapping with appropriate tags. Tags are be used to associate deferrals (scheduled or deferred) with a specific or group of onprem-hosts. Apart from software update deferrals, config update deferrals also can be configured using these overrides. + +API version: v2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package upgradepolicy + +import ( + "encoding/json" +) + +// checks if the MaintenanceWindow type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &MaintenanceWindow{} + +// MaintenanceWindow struct for MaintenanceWindow +type MaintenanceWindow struct { + DeferredWindow *DeferredWindow `json:"deferred_window,omitempty"` + Id *string `json:"id,omitempty"` + ScheduledWindow *ScheduledWindow `json:"scheduled_window,omitempty"` + Tags map[string]map[string]interface{} `json:"tags,omitempty"` + WindowType *string `json:"window_type,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _MaintenanceWindow MaintenanceWindow + +// NewMaintenanceWindow instantiates a new MaintenanceWindow 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 NewMaintenanceWindow() *MaintenanceWindow { + this := MaintenanceWindow{} + return &this +} + +// NewMaintenanceWindowWithDefaults instantiates a new MaintenanceWindow 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 NewMaintenanceWindowWithDefaults() *MaintenanceWindow { + this := MaintenanceWindow{} + return &this +} + +// GetDeferredWindow returns the DeferredWindow field value if set, zero value otherwise. +func (o *MaintenanceWindow) GetDeferredWindow() DeferredWindow { + if o == nil || IsNil(o.DeferredWindow) { + var ret DeferredWindow + return ret + } + return *o.DeferredWindow +} + +// GetDeferredWindowOk returns a tuple with the DeferredWindow field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *MaintenanceWindow) GetDeferredWindowOk() (*DeferredWindow, bool) { + if o == nil || IsNil(o.DeferredWindow) { + return nil, false + } + return o.DeferredWindow, true +} + +// HasDeferredWindow returns a boolean if a field has been set. +func (o *MaintenanceWindow) HasDeferredWindow() bool { + if o != nil && !IsNil(o.DeferredWindow) { + return true + } + + return false +} + +// SetDeferredWindow gets a reference to the given DeferredWindow and assigns it to the DeferredWindow field. +func (o *MaintenanceWindow) SetDeferredWindow(v DeferredWindow) { + o.DeferredWindow = &v +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *MaintenanceWindow) GetId() string { + if o == nil || IsNil(o.Id) { + var ret string + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *MaintenanceWindow) GetIdOk() (*string, bool) { + if o == nil || IsNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *MaintenanceWindow) HasId() bool { + if o != nil && !IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given string and assigns it to the Id field. +func (o *MaintenanceWindow) SetId(v string) { + o.Id = &v +} + +// GetScheduledWindow returns the ScheduledWindow field value if set, zero value otherwise. +func (o *MaintenanceWindow) GetScheduledWindow() ScheduledWindow { + if o == nil || IsNil(o.ScheduledWindow) { + var ret ScheduledWindow + return ret + } + return *o.ScheduledWindow +} + +// GetScheduledWindowOk returns a tuple with the ScheduledWindow field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *MaintenanceWindow) GetScheduledWindowOk() (*ScheduledWindow, bool) { + if o == nil || IsNil(o.ScheduledWindow) { + return nil, false + } + return o.ScheduledWindow, true +} + +// HasScheduledWindow returns a boolean if a field has been set. +func (o *MaintenanceWindow) HasScheduledWindow() bool { + if o != nil && !IsNil(o.ScheduledWindow) { + return true + } + + return false +} + +// SetScheduledWindow gets a reference to the given ScheduledWindow and assigns it to the ScheduledWindow field. +func (o *MaintenanceWindow) SetScheduledWindow(v ScheduledWindow) { + o.ScheduledWindow = &v +} + +// GetTags returns the Tags field value if set, zero value otherwise. +func (o *MaintenanceWindow) GetTags() map[string]map[string]interface{} { + if o == nil || IsNil(o.Tags) { + var ret map[string]map[string]interface{} + return ret + } + return o.Tags +} + +// GetTagsOk returns a tuple with the Tags field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *MaintenanceWindow) GetTagsOk() (map[string]map[string]interface{}, bool) { + if o == nil || IsNil(o.Tags) { + return map[string]map[string]interface{}{}, false + } + return o.Tags, true +} + +// HasTags returns a boolean if a field has been set. +func (o *MaintenanceWindow) HasTags() bool { + if o != nil && !IsNil(o.Tags) { + return true + } + + return false +} + +// SetTags gets a reference to the given map[string]map[string]interface{} and assigns it to the Tags field. +func (o *MaintenanceWindow) SetTags(v map[string]map[string]interface{}) { + o.Tags = v +} + +// GetWindowType returns the WindowType field value if set, zero value otherwise. +func (o *MaintenanceWindow) GetWindowType() string { + if o == nil || IsNil(o.WindowType) { + var ret string + return ret + } + return *o.WindowType +} + +// GetWindowTypeOk returns a tuple with the WindowType field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *MaintenanceWindow) GetWindowTypeOk() (*string, bool) { + if o == nil || IsNil(o.WindowType) { + return nil, false + } + return o.WindowType, true +} + +// HasWindowType returns a boolean if a field has been set. +func (o *MaintenanceWindow) HasWindowType() bool { + if o != nil && !IsNil(o.WindowType) { + return true + } + + return false +} + +// SetWindowType gets a reference to the given string and assigns it to the WindowType field. +func (o *MaintenanceWindow) SetWindowType(v string) { + o.WindowType = &v +} + +func (o MaintenanceWindow) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o MaintenanceWindow) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.DeferredWindow) { + toSerialize["deferred_window"] = o.DeferredWindow + } + if !IsNil(o.Id) { + toSerialize["id"] = o.Id + } + if !IsNil(o.ScheduledWindow) { + toSerialize["scheduled_window"] = o.ScheduledWindow + } + if !IsNil(o.Tags) { + toSerialize["tags"] = o.Tags + } + if !IsNil(o.WindowType) { + toSerialize["window_type"] = o.WindowType + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *MaintenanceWindow) UnmarshalJSON(data []byte) (err error) { + varMaintenanceWindow := _MaintenanceWindow{} + + err = json.Unmarshal(data, &varMaintenanceWindow) + + if err != nil { + return err + } + + *o = MaintenanceWindow(varMaintenanceWindow) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "deferred_window") + delete(additionalProperties, "id") + delete(additionalProperties, "scheduled_window") + delete(additionalProperties, "tags") + delete(additionalProperties, "window_type") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableMaintenanceWindow struct { + value *MaintenanceWindow + isSet bool +} + +func (v NullableMaintenanceWindow) Get() *MaintenanceWindow { + return v.value +} + +func (v *NullableMaintenanceWindow) Set(val *MaintenanceWindow) { + v.value = val + v.isSet = true +} + +func (v NullableMaintenanceWindow) IsSet() bool { + return v.isSet +} + +func (v *NullableMaintenanceWindow) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableMaintenanceWindow(val *MaintenanceWindow) *NullableMaintenanceWindow { + return &NullableMaintenanceWindow{value: val, isSet: true} +} + +func (v NullableMaintenanceWindow) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableMaintenanceWindow) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/upgradepolicy/model_onprem_details.go b/upgradepolicy/model_onprem_details.go new file mode 100644 index 0000000..409e113 --- /dev/null +++ b/upgradepolicy/model_onprem_details.go @@ -0,0 +1,190 @@ +/* +Schedule Software/Config Updates + +Infoblox by default does automatic software updates when they become available. Updates are applied to all on-prem hosts, physical or virtual. However, you can override and schedule the software updates. You can also defer the updates to a later date and time. You can configure up to a total of 50 deferrals (scheduled and deferred software updates), which means you have the flexibility to create up to 50 update groups across different on-prem hosts by mapping with appropriate tags. Tags are be used to associate deferrals (scheduled or deferred) with a specific or group of onprem-hosts. Apart from software update deferrals, config update deferrals also can be configured using these overrides. + +API version: v2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package upgradepolicy + +import ( + "encoding/json" +) + +// checks if the OnpremDetails type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &OnpremDetails{} + +// OnpremDetails struct for OnpremDetails +type OnpremDetails struct { + Hostid *string `json:"hostid,omitempty"` + Ophid *string `json:"ophid,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _OnpremDetails OnpremDetails + +// NewOnpremDetails instantiates a new OnpremDetails 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 NewOnpremDetails() *OnpremDetails { + this := OnpremDetails{} + return &this +} + +// NewOnpremDetailsWithDefaults instantiates a new OnpremDetails 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 NewOnpremDetailsWithDefaults() *OnpremDetails { + this := OnpremDetails{} + return &this +} + +// GetHostid returns the Hostid field value if set, zero value otherwise. +func (o *OnpremDetails) GetHostid() string { + if o == nil || IsNil(o.Hostid) { + var ret string + return ret + } + return *o.Hostid +} + +// GetHostidOk returns a tuple with the Hostid field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *OnpremDetails) GetHostidOk() (*string, bool) { + if o == nil || IsNil(o.Hostid) { + return nil, false + } + return o.Hostid, true +} + +// HasHostid returns a boolean if a field has been set. +func (o *OnpremDetails) HasHostid() bool { + if o != nil && !IsNil(o.Hostid) { + return true + } + + return false +} + +// SetHostid gets a reference to the given string and assigns it to the Hostid field. +func (o *OnpremDetails) SetHostid(v string) { + o.Hostid = &v +} + +// GetOphid returns the Ophid field value if set, zero value otherwise. +func (o *OnpremDetails) GetOphid() string { + if o == nil || IsNil(o.Ophid) { + var ret string + return ret + } + return *o.Ophid +} + +// GetOphidOk returns a tuple with the Ophid field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *OnpremDetails) GetOphidOk() (*string, bool) { + if o == nil || IsNil(o.Ophid) { + return nil, false + } + return o.Ophid, true +} + +// HasOphid returns a boolean if a field has been set. +func (o *OnpremDetails) HasOphid() bool { + if o != nil && !IsNil(o.Ophid) { + return true + } + + return false +} + +// SetOphid gets a reference to the given string and assigns it to the Ophid field. +func (o *OnpremDetails) SetOphid(v string) { + o.Ophid = &v +} + +func (o OnpremDetails) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o OnpremDetails) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Hostid) { + toSerialize["hostid"] = o.Hostid + } + if !IsNil(o.Ophid) { + toSerialize["ophid"] = o.Ophid + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *OnpremDetails) UnmarshalJSON(data []byte) (err error) { + varOnpremDetails := _OnpremDetails{} + + err = json.Unmarshal(data, &varOnpremDetails) + + if err != nil { + return err + } + + *o = OnpremDetails(varOnpremDetails) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "hostid") + delete(additionalProperties, "ophid") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableOnpremDetails struct { + value *OnpremDetails + isSet bool +} + +func (v NullableOnpremDetails) Get() *OnpremDetails { + return v.value +} + +func (v *NullableOnpremDetails) Set(val *OnpremDetails) { + v.value = val + v.isSet = true +} + +func (v NullableOnpremDetails) IsSet() bool { + return v.isSet +} + +func (v *NullableOnpremDetails) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableOnpremDetails(val *OnpremDetails) *NullableOnpremDetails { + return &NullableOnpremDetails{value: val, isSet: true} +} + +func (v NullableOnpremDetails) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableOnpremDetails) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/upgradepolicy/model_scheduled_window.go b/upgradepolicy/model_scheduled_window.go new file mode 100644 index 0000000..b590beb --- /dev/null +++ b/upgradepolicy/model_scheduled_window.go @@ -0,0 +1,339 @@ +/* +Schedule Software/Config Updates + +Infoblox by default does automatic software updates when they become available. Updates are applied to all on-prem hosts, physical or virtual. However, you can override and schedule the software updates. You can also defer the updates to a later date and time. You can configure up to a total of 50 deferrals (scheduled and deferred software updates), which means you have the flexibility to create up to 50 update groups across different on-prem hosts by mapping with appropriate tags. Tags are be used to associate deferrals (scheduled or deferred) with a specific or group of onprem-hosts. Apart from software update deferrals, config update deferrals also can be configured using these overrides. + +API version: v2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package upgradepolicy + +import ( + "encoding/json" + "time" +) + +// checks if the ScheduledWindow type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ScheduledWindow{} + +// ScheduledWindow struct for ScheduledWindow +type ScheduledWindow struct { + CreatedAt *time.Time `json:"created_at,omitempty"` + Duration *int32 `json:"duration,omitempty"` + Enabled *bool `json:"enabled,omitempty"` + StartTime *int32 `json:"start_time,omitempty"` + UpdatedAt *time.Time `json:"updated_at,omitempty"` + Weekday *int32 `json:"weekday,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _ScheduledWindow ScheduledWindow + +// NewScheduledWindow instantiates a new ScheduledWindow 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 NewScheduledWindow() *ScheduledWindow { + this := ScheduledWindow{} + return &this +} + +// NewScheduledWindowWithDefaults instantiates a new ScheduledWindow 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 NewScheduledWindowWithDefaults() *ScheduledWindow { + this := ScheduledWindow{} + return &this +} + +// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. +func (o *ScheduledWindow) GetCreatedAt() time.Time { + if o == nil || IsNil(o.CreatedAt) { + var ret time.Time + return ret + } + return *o.CreatedAt +} + +// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ScheduledWindow) GetCreatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.CreatedAt) { + return nil, false + } + return o.CreatedAt, true +} + +// HasCreatedAt returns a boolean if a field has been set. +func (o *ScheduledWindow) HasCreatedAt() bool { + if o != nil && !IsNil(o.CreatedAt) { + return true + } + + return false +} + +// SetCreatedAt gets a reference to the given time.Time and assigns it to the CreatedAt field. +func (o *ScheduledWindow) SetCreatedAt(v time.Time) { + o.CreatedAt = &v +} + +// GetDuration returns the Duration field value if set, zero value otherwise. +func (o *ScheduledWindow) GetDuration() int32 { + if o == nil || IsNil(o.Duration) { + var ret int32 + return ret + } + return *o.Duration +} + +// GetDurationOk returns a tuple with the Duration field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ScheduledWindow) GetDurationOk() (*int32, bool) { + if o == nil || IsNil(o.Duration) { + return nil, false + } + return o.Duration, true +} + +// HasDuration returns a boolean if a field has been set. +func (o *ScheduledWindow) HasDuration() bool { + if o != nil && !IsNil(o.Duration) { + return true + } + + return false +} + +// SetDuration gets a reference to the given int32 and assigns it to the Duration field. +func (o *ScheduledWindow) SetDuration(v int32) { + o.Duration = &v +} + +// GetEnabled returns the Enabled field value if set, zero value otherwise. +func (o *ScheduledWindow) GetEnabled() bool { + if o == nil || IsNil(o.Enabled) { + var ret bool + return ret + } + return *o.Enabled +} + +// GetEnabledOk returns a tuple with the Enabled field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ScheduledWindow) GetEnabledOk() (*bool, bool) { + if o == nil || IsNil(o.Enabled) { + return nil, false + } + return o.Enabled, true +} + +// HasEnabled returns a boolean if a field has been set. +func (o *ScheduledWindow) HasEnabled() bool { + if o != nil && !IsNil(o.Enabled) { + return true + } + + return false +} + +// SetEnabled gets a reference to the given bool and assigns it to the Enabled field. +func (o *ScheduledWindow) SetEnabled(v bool) { + o.Enabled = &v +} + +// GetStartTime returns the StartTime field value if set, zero value otherwise. +func (o *ScheduledWindow) GetStartTime() int32 { + if o == nil || IsNil(o.StartTime) { + var ret int32 + return ret + } + return *o.StartTime +} + +// GetStartTimeOk returns a tuple with the StartTime field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ScheduledWindow) GetStartTimeOk() (*int32, bool) { + if o == nil || IsNil(o.StartTime) { + return nil, false + } + return o.StartTime, true +} + +// HasStartTime returns a boolean if a field has been set. +func (o *ScheduledWindow) HasStartTime() bool { + if o != nil && !IsNil(o.StartTime) { + return true + } + + return false +} + +// SetStartTime gets a reference to the given int32 and assigns it to the StartTime field. +func (o *ScheduledWindow) SetStartTime(v int32) { + o.StartTime = &v +} + +// GetUpdatedAt returns the UpdatedAt field value if set, zero value otherwise. +func (o *ScheduledWindow) GetUpdatedAt() time.Time { + if o == nil || IsNil(o.UpdatedAt) { + var ret time.Time + return ret + } + return *o.UpdatedAt +} + +// GetUpdatedAtOk returns a tuple with the UpdatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ScheduledWindow) GetUpdatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.UpdatedAt) { + return nil, false + } + return o.UpdatedAt, true +} + +// HasUpdatedAt returns a boolean if a field has been set. +func (o *ScheduledWindow) HasUpdatedAt() bool { + if o != nil && !IsNil(o.UpdatedAt) { + return true + } + + return false +} + +// SetUpdatedAt gets a reference to the given time.Time and assigns it to the UpdatedAt field. +func (o *ScheduledWindow) SetUpdatedAt(v time.Time) { + o.UpdatedAt = &v +} + +// GetWeekday returns the Weekday field value if set, zero value otherwise. +func (o *ScheduledWindow) GetWeekday() int32 { + if o == nil || IsNil(o.Weekday) { + var ret int32 + return ret + } + return *o.Weekday +} + +// GetWeekdayOk returns a tuple with the Weekday field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ScheduledWindow) GetWeekdayOk() (*int32, bool) { + if o == nil || IsNil(o.Weekday) { + return nil, false + } + return o.Weekday, true +} + +// HasWeekday returns a boolean if a field has been set. +func (o *ScheduledWindow) HasWeekday() bool { + if o != nil && !IsNil(o.Weekday) { + return true + } + + return false +} + +// SetWeekday gets a reference to the given int32 and assigns it to the Weekday field. +func (o *ScheduledWindow) SetWeekday(v int32) { + o.Weekday = &v +} + +func (o ScheduledWindow) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ScheduledWindow) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.CreatedAt) { + toSerialize["created_at"] = o.CreatedAt + } + if !IsNil(o.Duration) { + toSerialize["duration"] = o.Duration + } + if !IsNil(o.Enabled) { + toSerialize["enabled"] = o.Enabled + } + if !IsNil(o.StartTime) { + toSerialize["start_time"] = o.StartTime + } + if !IsNil(o.UpdatedAt) { + toSerialize["updated_at"] = o.UpdatedAt + } + if !IsNil(o.Weekday) { + toSerialize["weekday"] = o.Weekday + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *ScheduledWindow) UnmarshalJSON(data []byte) (err error) { + varScheduledWindow := _ScheduledWindow{} + + err = json.Unmarshal(data, &varScheduledWindow) + + if err != nil { + return err + } + + *o = ScheduledWindow(varScheduledWindow) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "created_at") + delete(additionalProperties, "duration") + delete(additionalProperties, "enabled") + delete(additionalProperties, "start_time") + delete(additionalProperties, "updated_at") + delete(additionalProperties, "weekday") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableScheduledWindow struct { + value *ScheduledWindow + isSet bool +} + +func (v NullableScheduledWindow) Get() *ScheduledWindow { + return v.value +} + +func (v *NullableScheduledWindow) Set(val *ScheduledWindow) { + v.value = val + v.isSet = true +} + +func (v NullableScheduledWindow) IsSet() bool { + return v.isSet +} + +func (v *NullableScheduledWindow) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableScheduledWindow(val *ScheduledWindow) *NullableScheduledWindow { + return &NullableScheduledWindow{value: val, isSet: true} +} + +func (v NullableScheduledWindow) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableScheduledWindow) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/upgradepolicy/model_status_code.go b/upgradepolicy/model_status_code.go new file mode 100644 index 0000000..a22319c --- /dev/null +++ b/upgradepolicy/model_status_code.go @@ -0,0 +1,118 @@ +/* +Schedule Software/Config Updates + +Infoblox by default does automatic software updates when they become available. Updates are applied to all on-prem hosts, physical or virtual. However, you can override and schedule the software updates. You can also defer the updates to a later date and time. You can configure up to a total of 50 deferrals (scheduled and deferred software updates), which means you have the flexibility to create up to 50 update groups across different on-prem hosts by mapping with appropriate tags. Tags are be used to associate deferrals (scheduled or deferred) with a specific or group of onprem-hosts. Apart from software update deferrals, config update deferrals also can be configured using these overrides. + +API version: v2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package upgradepolicy + +import ( + "encoding/json" + "fmt" +) + +// StatusCode the model 'StatusCode' +type StatusCode string + +// List of service_v2StatusCode +const ( + STATUSCODE_SUCCESS StatusCode = "SUCCESS" + STATUSCODE_GENERAL_FAILURE StatusCode = "GENERAL_FAILURE" + STATUSCODE_HASH_FAILURE StatusCode = "HASH_FAILURE" + STATUSCODE_VALIDATION_FAILURE StatusCode = "VALIDATION_FAILURE" + STATUSCODE_COPY_FAILURE StatusCode = "COPY_FAILURE" + STATUSCODE_RELOAD_FAILIURE StatusCode = "RELOAD_FAILIURE" +) + +// All allowed values of StatusCode enum +var AllowedStatusCodeEnumValues = []StatusCode{ + "SUCCESS", + "GENERAL_FAILURE", + "HASH_FAILURE", + "VALIDATION_FAILURE", + "COPY_FAILURE", + "RELOAD_FAILIURE", +} + +func (v *StatusCode) UnmarshalJSON(src []byte) error { + var value string + err := json.Unmarshal(src, &value) + if err != nil { + return err + } + enumTypeValue := StatusCode(value) + for _, existing := range AllowedStatusCodeEnumValues { + if existing == enumTypeValue { + *v = enumTypeValue + return nil + } + } + + return fmt.Errorf("%+v is not a valid StatusCode", value) +} + +// NewStatusCodeFromValue returns a pointer to a valid StatusCode +// for the value passed as argument, or an error if the value passed is not allowed by the enum +func NewStatusCodeFromValue(v string) (*StatusCode, error) { + ev := StatusCode(v) + if ev.IsValid() { + return &ev, nil + } else { + return nil, fmt.Errorf("invalid value '%v' for StatusCode: valid values are %v", v, AllowedStatusCodeEnumValues) + } +} + +// IsValid return true if the value is valid for the enum, false otherwise +func (v StatusCode) IsValid() bool { + for _, existing := range AllowedStatusCodeEnumValues { + if existing == v { + return true + } + } + return false +} + +// Ptr returns reference to service_v2StatusCode value +func (v StatusCode) Ptr() *StatusCode { + return &v +} + +type NullableStatusCode struct { + value *StatusCode + isSet bool +} + +func (v NullableStatusCode) Get() *StatusCode { + return v.value +} + +func (v *NullableStatusCode) Set(val *StatusCode) { + v.value = val + v.isSet = true +} + +func (v NullableStatusCode) IsSet() bool { + return v.isSet +} + +func (v *NullableStatusCode) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableStatusCode(val *StatusCode) *NullableStatusCode { + return &NullableStatusCode{value: val, isSet: true} +} + +func (v NullableStatusCode) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableStatusCode) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/upgradepolicy/model_update_batch_maintenance_window.go b/upgradepolicy/model_update_batch_maintenance_window.go new file mode 100644 index 0000000..9ff87b3 --- /dev/null +++ b/upgradepolicy/model_update_batch_maintenance_window.go @@ -0,0 +1,264 @@ +/* +Schedule Software/Config Updates + +Infoblox by default does automatic software updates when they become available. Updates are applied to all on-prem hosts, physical or virtual. However, you can override and schedule the software updates. You can also defer the updates to a later date and time. You can configure up to a total of 50 deferrals (scheduled and deferred software updates), which means you have the flexibility to create up to 50 update groups across different on-prem hosts by mapping with appropriate tags. Tags are be used to associate deferrals (scheduled or deferred) with a specific or group of onprem-hosts. Apart from software update deferrals, config update deferrals also can be configured using these overrides. + +API version: v2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package upgradepolicy + +import ( + "encoding/json" +) + +// checks if the UpdateBatchMaintenanceWindow type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &UpdateBatchMaintenanceWindow{} + +// UpdateBatchMaintenanceWindow struct for UpdateBatchMaintenanceWindow +type UpdateBatchMaintenanceWindow struct { + DeferredWindow *DeferredWindow `json:"deferred_window,omitempty"` + MwId *string `json:"mw_id,omitempty"` + ScheduledWindow *ScheduledWindow `json:"scheduled_window,omitempty"` + Tags map[string]map[string]interface{} `json:"tags,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _UpdateBatchMaintenanceWindow UpdateBatchMaintenanceWindow + +// NewUpdateBatchMaintenanceWindow instantiates a new UpdateBatchMaintenanceWindow 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 NewUpdateBatchMaintenanceWindow() *UpdateBatchMaintenanceWindow { + this := UpdateBatchMaintenanceWindow{} + return &this +} + +// NewUpdateBatchMaintenanceWindowWithDefaults instantiates a new UpdateBatchMaintenanceWindow 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 NewUpdateBatchMaintenanceWindowWithDefaults() *UpdateBatchMaintenanceWindow { + this := UpdateBatchMaintenanceWindow{} + return &this +} + +// GetDeferredWindow returns the DeferredWindow field value if set, zero value otherwise. +func (o *UpdateBatchMaintenanceWindow) GetDeferredWindow() DeferredWindow { + if o == nil || IsNil(o.DeferredWindow) { + var ret DeferredWindow + return ret + } + return *o.DeferredWindow +} + +// GetDeferredWindowOk returns a tuple with the DeferredWindow field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdateBatchMaintenanceWindow) GetDeferredWindowOk() (*DeferredWindow, bool) { + if o == nil || IsNil(o.DeferredWindow) { + return nil, false + } + return o.DeferredWindow, true +} + +// HasDeferredWindow returns a boolean if a field has been set. +func (o *UpdateBatchMaintenanceWindow) HasDeferredWindow() bool { + if o != nil && !IsNil(o.DeferredWindow) { + return true + } + + return false +} + +// SetDeferredWindow gets a reference to the given DeferredWindow and assigns it to the DeferredWindow field. +func (o *UpdateBatchMaintenanceWindow) SetDeferredWindow(v DeferredWindow) { + o.DeferredWindow = &v +} + +// GetMwId returns the MwId field value if set, zero value otherwise. +func (o *UpdateBatchMaintenanceWindow) GetMwId() string { + if o == nil || IsNil(o.MwId) { + var ret string + return ret + } + return *o.MwId +} + +// GetMwIdOk returns a tuple with the MwId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdateBatchMaintenanceWindow) GetMwIdOk() (*string, bool) { + if o == nil || IsNil(o.MwId) { + return nil, false + } + return o.MwId, true +} + +// HasMwId returns a boolean if a field has been set. +func (o *UpdateBatchMaintenanceWindow) HasMwId() bool { + if o != nil && !IsNil(o.MwId) { + return true + } + + return false +} + +// SetMwId gets a reference to the given string and assigns it to the MwId field. +func (o *UpdateBatchMaintenanceWindow) SetMwId(v string) { + o.MwId = &v +} + +// GetScheduledWindow returns the ScheduledWindow field value if set, zero value otherwise. +func (o *UpdateBatchMaintenanceWindow) GetScheduledWindow() ScheduledWindow { + if o == nil || IsNil(o.ScheduledWindow) { + var ret ScheduledWindow + return ret + } + return *o.ScheduledWindow +} + +// GetScheduledWindowOk returns a tuple with the ScheduledWindow field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdateBatchMaintenanceWindow) GetScheduledWindowOk() (*ScheduledWindow, bool) { + if o == nil || IsNil(o.ScheduledWindow) { + return nil, false + } + return o.ScheduledWindow, true +} + +// HasScheduledWindow returns a boolean if a field has been set. +func (o *UpdateBatchMaintenanceWindow) HasScheduledWindow() bool { + if o != nil && !IsNil(o.ScheduledWindow) { + return true + } + + return false +} + +// SetScheduledWindow gets a reference to the given ScheduledWindow and assigns it to the ScheduledWindow field. +func (o *UpdateBatchMaintenanceWindow) SetScheduledWindow(v ScheduledWindow) { + o.ScheduledWindow = &v +} + +// GetTags returns the Tags field value if set, zero value otherwise. +func (o *UpdateBatchMaintenanceWindow) GetTags() map[string]map[string]interface{} { + if o == nil || IsNil(o.Tags) { + var ret map[string]map[string]interface{} + return ret + } + return o.Tags +} + +// GetTagsOk returns a tuple with the Tags field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdateBatchMaintenanceWindow) GetTagsOk() (map[string]map[string]interface{}, bool) { + if o == nil || IsNil(o.Tags) { + return map[string]map[string]interface{}{}, false + } + return o.Tags, true +} + +// HasTags returns a boolean if a field has been set. +func (o *UpdateBatchMaintenanceWindow) HasTags() bool { + if o != nil && !IsNil(o.Tags) { + return true + } + + return false +} + +// SetTags gets a reference to the given map[string]map[string]interface{} and assigns it to the Tags field. +func (o *UpdateBatchMaintenanceWindow) SetTags(v map[string]map[string]interface{}) { + o.Tags = v +} + +func (o UpdateBatchMaintenanceWindow) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o UpdateBatchMaintenanceWindow) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.DeferredWindow) { + toSerialize["deferred_window"] = o.DeferredWindow + } + if !IsNil(o.MwId) { + toSerialize["mw_id"] = o.MwId + } + if !IsNil(o.ScheduledWindow) { + toSerialize["scheduled_window"] = o.ScheduledWindow + } + if !IsNil(o.Tags) { + toSerialize["tags"] = o.Tags + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *UpdateBatchMaintenanceWindow) UnmarshalJSON(data []byte) (err error) { + varUpdateBatchMaintenanceWindow := _UpdateBatchMaintenanceWindow{} + + err = json.Unmarshal(data, &varUpdateBatchMaintenanceWindow) + + if err != nil { + return err + } + + *o = UpdateBatchMaintenanceWindow(varUpdateBatchMaintenanceWindow) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "deferred_window") + delete(additionalProperties, "mw_id") + delete(additionalProperties, "scheduled_window") + delete(additionalProperties, "tags") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableUpdateBatchMaintenanceWindow struct { + value *UpdateBatchMaintenanceWindow + isSet bool +} + +func (v NullableUpdateBatchMaintenanceWindow) Get() *UpdateBatchMaintenanceWindow { + return v.value +} + +func (v *NullableUpdateBatchMaintenanceWindow) Set(val *UpdateBatchMaintenanceWindow) { + v.value = val + v.isSet = true +} + +func (v NullableUpdateBatchMaintenanceWindow) IsSet() bool { + return v.isSet +} + +func (v *NullableUpdateBatchMaintenanceWindow) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableUpdateBatchMaintenanceWindow(val *UpdateBatchMaintenanceWindow) *NullableUpdateBatchMaintenanceWindow { + return &NullableUpdateBatchMaintenanceWindow{value: val, isSet: true} +} + +func (v NullableUpdateBatchMaintenanceWindow) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableUpdateBatchMaintenanceWindow) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/upgradepolicy/model_update_maintenance_window.go b/upgradepolicy/model_update_maintenance_window.go new file mode 100644 index 0000000..3f86381 --- /dev/null +++ b/upgradepolicy/model_update_maintenance_window.go @@ -0,0 +1,264 @@ +/* +Schedule Software/Config Updates + +Infoblox by default does automatic software updates when they become available. Updates are applied to all on-prem hosts, physical or virtual. However, you can override and schedule the software updates. You can also defer the updates to a later date and time. You can configure up to a total of 50 deferrals (scheduled and deferred software updates), which means you have the flexibility to create up to 50 update groups across different on-prem hosts by mapping with appropriate tags. Tags are be used to associate deferrals (scheduled or deferred) with a specific or group of onprem-hosts. Apart from software update deferrals, config update deferrals also can be configured using these overrides. + +API version: v2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package upgradepolicy + +import ( + "encoding/json" +) + +// checks if the UpdateMaintenanceWindow type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &UpdateMaintenanceWindow{} + +// UpdateMaintenanceWindow struct for UpdateMaintenanceWindow +type UpdateMaintenanceWindow struct { + DeferredWindow *DeferredWindow `json:"deferred_window,omitempty"` + Id *string `json:"id,omitempty"` + ScheduledWindow *ScheduledWindow `json:"scheduled_window,omitempty"` + Tags map[string]map[string]interface{} `json:"tags,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _UpdateMaintenanceWindow UpdateMaintenanceWindow + +// NewUpdateMaintenanceWindow instantiates a new UpdateMaintenanceWindow 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 NewUpdateMaintenanceWindow() *UpdateMaintenanceWindow { + this := UpdateMaintenanceWindow{} + return &this +} + +// NewUpdateMaintenanceWindowWithDefaults instantiates a new UpdateMaintenanceWindow 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 NewUpdateMaintenanceWindowWithDefaults() *UpdateMaintenanceWindow { + this := UpdateMaintenanceWindow{} + return &this +} + +// GetDeferredWindow returns the DeferredWindow field value if set, zero value otherwise. +func (o *UpdateMaintenanceWindow) GetDeferredWindow() DeferredWindow { + if o == nil || IsNil(o.DeferredWindow) { + var ret DeferredWindow + return ret + } + return *o.DeferredWindow +} + +// GetDeferredWindowOk returns a tuple with the DeferredWindow field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdateMaintenanceWindow) GetDeferredWindowOk() (*DeferredWindow, bool) { + if o == nil || IsNil(o.DeferredWindow) { + return nil, false + } + return o.DeferredWindow, true +} + +// HasDeferredWindow returns a boolean if a field has been set. +func (o *UpdateMaintenanceWindow) HasDeferredWindow() bool { + if o != nil && !IsNil(o.DeferredWindow) { + return true + } + + return false +} + +// SetDeferredWindow gets a reference to the given DeferredWindow and assigns it to the DeferredWindow field. +func (o *UpdateMaintenanceWindow) SetDeferredWindow(v DeferredWindow) { + o.DeferredWindow = &v +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *UpdateMaintenanceWindow) GetId() string { + if o == nil || IsNil(o.Id) { + var ret string + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdateMaintenanceWindow) GetIdOk() (*string, bool) { + if o == nil || IsNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *UpdateMaintenanceWindow) HasId() bool { + if o != nil && !IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given string and assigns it to the Id field. +func (o *UpdateMaintenanceWindow) SetId(v string) { + o.Id = &v +} + +// GetScheduledWindow returns the ScheduledWindow field value if set, zero value otherwise. +func (o *UpdateMaintenanceWindow) GetScheduledWindow() ScheduledWindow { + if o == nil || IsNil(o.ScheduledWindow) { + var ret ScheduledWindow + return ret + } + return *o.ScheduledWindow +} + +// GetScheduledWindowOk returns a tuple with the ScheduledWindow field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdateMaintenanceWindow) GetScheduledWindowOk() (*ScheduledWindow, bool) { + if o == nil || IsNil(o.ScheduledWindow) { + return nil, false + } + return o.ScheduledWindow, true +} + +// HasScheduledWindow returns a boolean if a field has been set. +func (o *UpdateMaintenanceWindow) HasScheduledWindow() bool { + if o != nil && !IsNil(o.ScheduledWindow) { + return true + } + + return false +} + +// SetScheduledWindow gets a reference to the given ScheduledWindow and assigns it to the ScheduledWindow field. +func (o *UpdateMaintenanceWindow) SetScheduledWindow(v ScheduledWindow) { + o.ScheduledWindow = &v +} + +// GetTags returns the Tags field value if set, zero value otherwise. +func (o *UpdateMaintenanceWindow) GetTags() map[string]map[string]interface{} { + if o == nil || IsNil(o.Tags) { + var ret map[string]map[string]interface{} + return ret + } + return o.Tags +} + +// GetTagsOk returns a tuple with the Tags field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdateMaintenanceWindow) GetTagsOk() (map[string]map[string]interface{}, bool) { + if o == nil || IsNil(o.Tags) { + return map[string]map[string]interface{}{}, false + } + return o.Tags, true +} + +// HasTags returns a boolean if a field has been set. +func (o *UpdateMaintenanceWindow) HasTags() bool { + if o != nil && !IsNil(o.Tags) { + return true + } + + return false +} + +// SetTags gets a reference to the given map[string]map[string]interface{} and assigns it to the Tags field. +func (o *UpdateMaintenanceWindow) SetTags(v map[string]map[string]interface{}) { + o.Tags = v +} + +func (o UpdateMaintenanceWindow) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o UpdateMaintenanceWindow) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.DeferredWindow) { + toSerialize["deferred_window"] = o.DeferredWindow + } + if !IsNil(o.Id) { + toSerialize["id"] = o.Id + } + if !IsNil(o.ScheduledWindow) { + toSerialize["scheduled_window"] = o.ScheduledWindow + } + if !IsNil(o.Tags) { + toSerialize["tags"] = o.Tags + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *UpdateMaintenanceWindow) UnmarshalJSON(data []byte) (err error) { + varUpdateMaintenanceWindow := _UpdateMaintenanceWindow{} + + err = json.Unmarshal(data, &varUpdateMaintenanceWindow) + + if err != nil { + return err + } + + *o = UpdateMaintenanceWindow(varUpdateMaintenanceWindow) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "deferred_window") + delete(additionalProperties, "id") + delete(additionalProperties, "scheduled_window") + delete(additionalProperties, "tags") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableUpdateMaintenanceWindow struct { + value *UpdateMaintenanceWindow + isSet bool +} + +func (v NullableUpdateMaintenanceWindow) Get() *UpdateMaintenanceWindow { + return v.value +} + +func (v *NullableUpdateMaintenanceWindow) Set(val *UpdateMaintenanceWindow) { + v.value = val + v.isSet = true +} + +func (v NullableUpdateMaintenanceWindow) IsSet() bool { + return v.isSet +} + +func (v *NullableUpdateMaintenanceWindow) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableUpdateMaintenanceWindow(val *UpdateMaintenanceWindow) *NullableUpdateMaintenanceWindow { + return &NullableUpdateMaintenanceWindow{value: val, isSet: true} +} + +func (v NullableUpdateMaintenanceWindow) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableUpdateMaintenanceWindow) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/upgradepolicy/model_update_maintenance_window_request.go b/upgradepolicy/model_update_maintenance_window_request.go new file mode 100644 index 0000000..e669025 --- /dev/null +++ b/upgradepolicy/model_update_maintenance_window_request.go @@ -0,0 +1,190 @@ +/* +Schedule Software/Config Updates + +Infoblox by default does automatic software updates when they become available. Updates are applied to all on-prem hosts, physical or virtual. However, you can override and schedule the software updates. You can also defer the updates to a later date and time. You can configure up to a total of 50 deferrals (scheduled and deferred software updates), which means you have the flexibility to create up to 50 update groups across different on-prem hosts by mapping with appropriate tags. Tags are be used to associate deferrals (scheduled or deferred) with a specific or group of onprem-hosts. Apart from software update deferrals, config update deferrals also can be configured using these overrides. + +API version: v2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package upgradepolicy + +import ( + "encoding/json" +) + +// checks if the UpdateMaintenanceWindowRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &UpdateMaintenanceWindowRequest{} + +// UpdateMaintenanceWindowRequest struct for UpdateMaintenanceWindowRequest +type UpdateMaintenanceWindowRequest struct { + Id *string `json:"id,omitempty"` + Payload *UpdateMaintenanceWindow `json:"payload,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _UpdateMaintenanceWindowRequest UpdateMaintenanceWindowRequest + +// NewUpdateMaintenanceWindowRequest instantiates a new UpdateMaintenanceWindowRequest 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 NewUpdateMaintenanceWindowRequest() *UpdateMaintenanceWindowRequest { + this := UpdateMaintenanceWindowRequest{} + return &this +} + +// NewUpdateMaintenanceWindowRequestWithDefaults instantiates a new UpdateMaintenanceWindowRequest 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 NewUpdateMaintenanceWindowRequestWithDefaults() *UpdateMaintenanceWindowRequest { + this := UpdateMaintenanceWindowRequest{} + return &this +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *UpdateMaintenanceWindowRequest) GetId() string { + if o == nil || IsNil(o.Id) { + var ret string + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdateMaintenanceWindowRequest) GetIdOk() (*string, bool) { + if o == nil || IsNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *UpdateMaintenanceWindowRequest) HasId() bool { + if o != nil && !IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given string and assigns it to the Id field. +func (o *UpdateMaintenanceWindowRequest) SetId(v string) { + o.Id = &v +} + +// GetPayload returns the Payload field value if set, zero value otherwise. +func (o *UpdateMaintenanceWindowRequest) GetPayload() UpdateMaintenanceWindow { + if o == nil || IsNil(o.Payload) { + var ret UpdateMaintenanceWindow + return ret + } + return *o.Payload +} + +// GetPayloadOk returns a tuple with the Payload field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdateMaintenanceWindowRequest) GetPayloadOk() (*UpdateMaintenanceWindow, bool) { + if o == nil || IsNil(o.Payload) { + return nil, false + } + return o.Payload, true +} + +// HasPayload returns a boolean if a field has been set. +func (o *UpdateMaintenanceWindowRequest) HasPayload() bool { + if o != nil && !IsNil(o.Payload) { + return true + } + + return false +} + +// SetPayload gets a reference to the given UpdateMaintenanceWindow and assigns it to the Payload field. +func (o *UpdateMaintenanceWindowRequest) SetPayload(v UpdateMaintenanceWindow) { + o.Payload = &v +} + +func (o UpdateMaintenanceWindowRequest) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o UpdateMaintenanceWindowRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Id) { + toSerialize["id"] = o.Id + } + if !IsNil(o.Payload) { + toSerialize["payload"] = o.Payload + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *UpdateMaintenanceWindowRequest) UnmarshalJSON(data []byte) (err error) { + varUpdateMaintenanceWindowRequest := _UpdateMaintenanceWindowRequest{} + + err = json.Unmarshal(data, &varUpdateMaintenanceWindowRequest) + + if err != nil { + return err + } + + *o = UpdateMaintenanceWindowRequest(varUpdateMaintenanceWindowRequest) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "id") + delete(additionalProperties, "payload") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableUpdateMaintenanceWindowRequest struct { + value *UpdateMaintenanceWindowRequest + isSet bool +} + +func (v NullableUpdateMaintenanceWindowRequest) Get() *UpdateMaintenanceWindowRequest { + return v.value +} + +func (v *NullableUpdateMaintenanceWindowRequest) Set(val *UpdateMaintenanceWindowRequest) { + v.value = val + v.isSet = true +} + +func (v NullableUpdateMaintenanceWindowRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableUpdateMaintenanceWindowRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableUpdateMaintenanceWindowRequest(val *UpdateMaintenanceWindowRequest) *NullableUpdateMaintenanceWindowRequest { + return &NullableUpdateMaintenanceWindowRequest{value: val, isSet: true} +} + +func (v NullableUpdateMaintenanceWindowRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableUpdateMaintenanceWindowRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/upgradepolicy/model_update_maintenance_window_response.go b/upgradepolicy/model_update_maintenance_window_response.go new file mode 100644 index 0000000..4238f2e --- /dev/null +++ b/upgradepolicy/model_update_maintenance_window_response.go @@ -0,0 +1,153 @@ +/* +Schedule Software/Config Updates + +Infoblox by default does automatic software updates when they become available. Updates are applied to all on-prem hosts, physical or virtual. However, you can override and schedule the software updates. You can also defer the updates to a later date and time. You can configure up to a total of 50 deferrals (scheduled and deferred software updates), which means you have the flexibility to create up to 50 update groups across different on-prem hosts by mapping with appropriate tags. Tags are be used to associate deferrals (scheduled or deferred) with a specific or group of onprem-hosts. Apart from software update deferrals, config update deferrals also can be configured using these overrides. + +API version: v2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package upgradepolicy + +import ( + "encoding/json" +) + +// checks if the UpdateMaintenanceWindowResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &UpdateMaintenanceWindowResponse{} + +// UpdateMaintenanceWindowResponse struct for UpdateMaintenanceWindowResponse +type UpdateMaintenanceWindowResponse struct { + Result *MaintenanceWindow `json:"result,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _UpdateMaintenanceWindowResponse UpdateMaintenanceWindowResponse + +// NewUpdateMaintenanceWindowResponse instantiates a new UpdateMaintenanceWindowResponse 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 NewUpdateMaintenanceWindowResponse() *UpdateMaintenanceWindowResponse { + this := UpdateMaintenanceWindowResponse{} + return &this +} + +// NewUpdateMaintenanceWindowResponseWithDefaults instantiates a new UpdateMaintenanceWindowResponse 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 NewUpdateMaintenanceWindowResponseWithDefaults() *UpdateMaintenanceWindowResponse { + this := UpdateMaintenanceWindowResponse{} + return &this +} + +// GetResult returns the Result field value if set, zero value otherwise. +func (o *UpdateMaintenanceWindowResponse) GetResult() MaintenanceWindow { + if o == nil || IsNil(o.Result) { + var ret MaintenanceWindow + return ret + } + return *o.Result +} + +// GetResultOk returns a tuple with the Result field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdateMaintenanceWindowResponse) GetResultOk() (*MaintenanceWindow, bool) { + if o == nil || IsNil(o.Result) { + return nil, false + } + return o.Result, true +} + +// HasResult returns a boolean if a field has been set. +func (o *UpdateMaintenanceWindowResponse) HasResult() bool { + if o != nil && !IsNil(o.Result) { + return true + } + + return false +} + +// SetResult gets a reference to the given MaintenanceWindow and assigns it to the Result field. +func (o *UpdateMaintenanceWindowResponse) SetResult(v MaintenanceWindow) { + o.Result = &v +} + +func (o UpdateMaintenanceWindowResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o UpdateMaintenanceWindowResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Result) { + toSerialize["result"] = o.Result + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *UpdateMaintenanceWindowResponse) UnmarshalJSON(data []byte) (err error) { + varUpdateMaintenanceWindowResponse := _UpdateMaintenanceWindowResponse{} + + err = json.Unmarshal(data, &varUpdateMaintenanceWindowResponse) + + if err != nil { + return err + } + + *o = UpdateMaintenanceWindowResponse(varUpdateMaintenanceWindowResponse) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "result") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableUpdateMaintenanceWindowResponse struct { + value *UpdateMaintenanceWindowResponse + isSet bool +} + +func (v NullableUpdateMaintenanceWindowResponse) Get() *UpdateMaintenanceWindowResponse { + return v.value +} + +func (v *NullableUpdateMaintenanceWindowResponse) Set(val *UpdateMaintenanceWindowResponse) { + v.value = val + v.isSet = true +} + +func (v NullableUpdateMaintenanceWindowResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableUpdateMaintenanceWindowResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableUpdateMaintenanceWindowResponse(val *UpdateMaintenanceWindowResponse) *NullableUpdateMaintenanceWindowResponse { + return &NullableUpdateMaintenanceWindowResponse{value: val, isSet: true} +} + +func (v NullableUpdateMaintenanceWindowResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableUpdateMaintenanceWindowResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/upgradepolicy/test/api_upgrade_policy_v2_test.go b/upgradepolicy/test/api_upgrade_policy_v2_test.go new file mode 100644 index 0000000..21f21f6 --- /dev/null +++ b/upgradepolicy/test/api_upgrade_policy_v2_test.go @@ -0,0 +1,116 @@ +/* +Schedule Software/Config Updates + +Testing UpgradePolicyV2APIService + +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); + +package upgradepolicy + +import ( + "context" + "testing" + + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + + "github.com/infobloxopen/bloxone-go-client/upgradepolicy" +) + +func TestUpgradePolicyV2APIService(t *testing.T) { + + apiClient := upgradepolicy.NewAPIClient() + + t.Run("Test UpgradePolicyV2APIService ApplyConfigNow", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.UpgradePolicyV2API.ApplyConfigNow(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test UpgradePolicyV2APIService Batch", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.UpgradePolicyV2API.Batch(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test UpgradePolicyV2APIService Create", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.UpgradePolicyV2API.Create(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test UpgradePolicyV2APIService Delete", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var id string + + resp, httpRes, err := apiClient.UpgradePolicyV2API.Delete(context.Background(), id).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test UpgradePolicyV2APIService Get", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var id string + + resp, httpRes, err := apiClient.UpgradePolicyV2API.Get(context.Background(), id).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test UpgradePolicyV2APIService List", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.UpgradePolicyV2API.List(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test UpgradePolicyV2APIService Update", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var id string + + resp, httpRes, err := apiClient.UpgradePolicyV2API.Update(context.Background(), id).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + +} diff --git a/upgradepolicy/utils.go b/upgradepolicy/utils.go new file mode 100644 index 0000000..566b42c --- /dev/null +++ b/upgradepolicy/utils.go @@ -0,0 +1,347 @@ +/* +Schedule Software/Config Updates + +Infoblox by default does automatic software updates when they become available. Updates are applied to all on-prem hosts, physical or virtual. However, you can override and schedule the software updates. You can also defer the updates to a later date and time. You can configure up to a total of 50 deferrals (scheduled and deferred software updates), which means you have the flexibility to create up to 50 update groups across different on-prem hosts by mapping with appropriate tags. Tags are be used to associate deferrals (scheduled or deferred) with a specific or group of onprem-hosts. Apart from software update deferrals, config update deferrals also can be configured using these overrides. + +API version: v2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package upgradepolicy + +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) +}