From 498f59bac7c522ffa5071006f3cfd0f7adde5470 Mon Sep 17 00:00:00 2001 From: Patrick Cowland Date: Tue, 4 Jun 2024 19:10:40 +0100 Subject: [PATCH 1/4] Add support for API Server Deployment --- CHANGELOG.md | 1 + authorize/.openapi-generator/FILES | 18 + authorize/CHANGELOG.md | 1 + authorize/README.md | 10 + authorize/api/openapi.yaml | 288 ++++++++++++ authorize/api_api_server_deployment.go | 441 ++++++++++++++++++ authorize/client.go | 3 + authorize/docs/APIServerDeployment.md | 186 ++++++++ .../docs/APIServerDeploymentAccessControl.md | 56 +++ .../APIServerDeploymentAccessControlCustom.md | 56 +++ authorize/docs/APIServerDeploymentApi.md | 154 ++++++ ...APIServerDeploymentAuthorizationVersion.md | 56 +++ .../APIServerDeploymentDecisionEndpoint.md | 56 +++ authorize/docs/APIServerDeploymentPolicy.md | 56 +++ authorize/docs/APIServerDeploymentStatus.md | 82 ++++ .../docs/APIServerDeploymentStatusError.md | 108 +++++ authorize/generate/pingone-authorize.yml | 150 ++++++ authorize/model_api_server_deployment.go | 308 ++++++++++++ ...el_api_server_deployment_access_control.go | 126 +++++ ...server_deployment_access_control_custom.go | 131 ++++++ ...server_deployment_authorization_version.go | 127 +++++ ...api_server_deployment_decision_endpoint.go | 127 +++++ .../model_api_server_deployment_policy.go | 127 +++++ .../model_api_server_deployment_status.go | 163 +++++++ ...odel_api_server_deployment_status_error.go | 201 ++++++++ 25 files changed, 3032 insertions(+) create mode 100644 authorize/api_api_server_deployment.go create mode 100644 authorize/docs/APIServerDeployment.md create mode 100644 authorize/docs/APIServerDeploymentAccessControl.md create mode 100644 authorize/docs/APIServerDeploymentAccessControlCustom.md create mode 100644 authorize/docs/APIServerDeploymentApi.md create mode 100644 authorize/docs/APIServerDeploymentAuthorizationVersion.md create mode 100644 authorize/docs/APIServerDeploymentDecisionEndpoint.md create mode 100644 authorize/docs/APIServerDeploymentPolicy.md create mode 100644 authorize/docs/APIServerDeploymentStatus.md create mode 100644 authorize/docs/APIServerDeploymentStatusError.md create mode 100644 authorize/model_api_server_deployment.go create mode 100644 authorize/model_api_server_deployment_access_control.go create mode 100644 authorize/model_api_server_deployment_access_control_custom.go create mode 100644 authorize/model_api_server_deployment_authorization_version.go create mode 100644 authorize/model_api_server_deployment_decision_endpoint.go create mode 100644 authorize/model_api_server_deployment_policy.go create mode 100644 authorize/model_api_server_deployment_status.go create mode 100644 authorize/model_api_server_deployment_status_error.go diff --git a/CHANGELOG.md b/CHANGELOG.md index c1ae9264..98c9cf7e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,7 @@ * **Feature** Add support for Application Role Assignments API. [#344](https://github.com/patrickcping/pingone-go-sdk-v2/pull/344) * **Feature** Add support for Application Role Permissions API. [#344](https://github.com/patrickcping/pingone-go-sdk-v2/pull/344) * **Feature** Add support for API Server Operations. [#354](https://github.com/patrickcping/pingone-go-sdk-v2/pull/354) + * **Feature** Add support for API Server Deployment. * **Enhancement** Add the `com.au` top level domain to the connection configuration. [#351](https://github.com/patrickcping/pingone-go-sdk-v2/pull/351) * **Enhancement** Added `AccessControl` and `Directory` fields to the `APIServer` model. [#353](https://github.com/patrickcping/pingone-go-sdk-v2/pull/353) * **Enhancement** Added `Type` field to the `APIServerAuthorizationServer` model. [#353](https://github.com/patrickcping/pingone-go-sdk-v2/pull/353) diff --git a/authorize/.openapi-generator/FILES b/authorize/.openapi-generator/FILES index 5f630dde..eeb1b01c 100644 --- a/authorize/.openapi-generator/FILES +++ b/authorize/.openapi-generator/FILES @@ -1,5 +1,6 @@ README.md api/openapi.yaml +api_api_server_deployment.go api_api_server_operations.go api_api_servers.go api_application_resource_permissions.go @@ -14,6 +15,15 @@ docs/APIServerAccessControl.md docs/APIServerAccessControlCustom.md docs/APIServerAuthorizationServer.md docs/APIServerAuthorizationServerResource.md +docs/APIServerDeployment.md +docs/APIServerDeploymentAccessControl.md +docs/APIServerDeploymentAccessControlCustom.md +docs/APIServerDeploymentApi.md +docs/APIServerDeploymentAuthorizationVersion.md +docs/APIServerDeploymentDecisionEndpoint.md +docs/APIServerDeploymentPolicy.md +docs/APIServerDeploymentStatus.md +docs/APIServerDeploymentStatusError.md docs/APIServerDirectory.md docs/APIServerOperation.md docs/APIServerOperationAccessControl.md @@ -70,6 +80,14 @@ model_api_server_access_control.go model_api_server_access_control_custom.go model_api_server_authorization_server.go model_api_server_authorization_server_resource.go +model_api_server_deployment.go +model_api_server_deployment_access_control.go +model_api_server_deployment_access_control_custom.go +model_api_server_deployment_authorization_version.go +model_api_server_deployment_decision_endpoint.go +model_api_server_deployment_policy.go +model_api_server_deployment_status.go +model_api_server_deployment_status_error.go model_api_server_directory.go model_api_server_operation.go model_api_server_operation_access_control.go diff --git a/authorize/CHANGELOG.md b/authorize/CHANGELOG.md index f6c7aaea..dad7c504 100644 --- a/authorize/CHANGELOG.md +++ b/authorize/CHANGELOG.md @@ -8,6 +8,7 @@ * **Feature** Add support for Application Role Permissions API. [#344](https://github.com/patrickcping/pingone-go-sdk-v2/pull/344) * **Feature** Add support for Application Roles API. [#344](https://github.com/patrickcping/pingone-go-sdk-v2/pull/344) * **Feature** Add support for API Server Operations. [#354](https://github.com/patrickcping/pingone-go-sdk-v2/pull/354) +* **Feature** Add support for API Server Deployment. * **Enhancement** Add the `com.au` top level domain to the connection configuration. [#351](https://github.com/patrickcping/pingone-go-sdk-v2/pull/351) * **Enhancement** Added `AccessControl` and `Directory` fields to the `APIServer` model. [#353](https://github.com/patrickcping/pingone-go-sdk-v2/pull/353) * **Enhancement** Added `Type` field to the `APIServerAuthorizationServer` model. [#353](https://github.com/patrickcping/pingone-go-sdk-v2/pull/353) diff --git a/authorize/README.md b/authorize/README.md index 91144068..1a97ee9e 100644 --- a/authorize/README.md +++ b/authorize/README.md @@ -77,6 +77,8 @@ All URIs are relative to *https://api.pingone.com/v1* Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- +*APIServerDeploymentApi* | [**DeployAPIServer**](docs/APIServerDeploymentApi.md#deployapiserver) | **Post** /environments/{environmentID}/apiServers/{apiServerID}/deployment | Deploy API Server +*APIServerDeploymentApi* | [**ReadDeploymentStatus**](docs/APIServerDeploymentApi.md#readdeploymentstatus) | **Get** /environments/{environmentID}/apiServers/{apiServerID}/deployment | READ API Server Deployment Status *APIServerOperationsApi* | [**CreateAPIServerOperation**](docs/APIServerOperationsApi.md#createapiserveroperation) | **Post** /environments/{environmentID}/apiServers/{apiServerID}/operations | CREATE API Server Operation *APIServerOperationsApi* | [**DeleteAPIServerOperation**](docs/APIServerOperationsApi.md#deleteapiserveroperation) | **Delete** /environments/{environmentID}/apiServers/{apiServerID}/operations/{apiServerOperationID} | DELETE API Server Operation *APIServerOperationsApi* | [**ReadAllAPIServerOperations**](docs/APIServerOperationsApi.md#readallapiserveroperations) | **Get** /environments/{environmentID}/apiServers/{apiServerID}/operations | READ All API Server Operations @@ -117,6 +119,14 @@ Class | Method | HTTP request | Description - [APIServerAccessControlCustom](docs/APIServerAccessControlCustom.md) - [APIServerAuthorizationServer](docs/APIServerAuthorizationServer.md) - [APIServerAuthorizationServerResource](docs/APIServerAuthorizationServerResource.md) + - [APIServerDeployment](docs/APIServerDeployment.md) + - [APIServerDeploymentAccessControl](docs/APIServerDeploymentAccessControl.md) + - [APIServerDeploymentAccessControlCustom](docs/APIServerDeploymentAccessControlCustom.md) + - [APIServerDeploymentAuthorizationVersion](docs/APIServerDeploymentAuthorizationVersion.md) + - [APIServerDeploymentDecisionEndpoint](docs/APIServerDeploymentDecisionEndpoint.md) + - [APIServerDeploymentPolicy](docs/APIServerDeploymentPolicy.md) + - [APIServerDeploymentStatus](docs/APIServerDeploymentStatus.md) + - [APIServerDeploymentStatusError](docs/APIServerDeploymentStatusError.md) - [APIServerDirectory](docs/APIServerDirectory.md) - [APIServerOperation](docs/APIServerOperation.md) - [APIServerOperationAccessControl](docs/APIServerOperationAccessControl.md) diff --git a/authorize/api/openapi.yaml b/authorize/api/openapi.yaml index 74c86baa..62f9482d 100644 --- a/authorize/api/openapi.yaml +++ b/authorize/api/openapi.yaml @@ -738,6 +738,163 @@ paths: summary: UPDATE API Server tags: - API Servers + /environments/{environmentID}/apiServers/{apiServerID}/deployment: + get: + operationId: readDeploymentStatus + parameters: + - explode: false + in: path + name: environmentID + required: true + schema: + type: string + style: simple + - explode: false + in: path + name: apiServerID + required: true + schema: + type: string + style: simple + responses: + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/P1Error' + description: "Invalid request received. Malformed JSON, malformed HTTP\ + \ request." + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/P1Error' + description: Request failed due to authorization issue. + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/P1Error' + description: Request failed due to authorization issue. + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/P1Error' + description: Not found. + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/P1Error' + description: Conflict. + "429": + content: + application/json: + schema: + $ref: '#/components/schemas/P1Error' + description: Request was rate limited + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/P1Error' + description: Uncaught error occurred. Platform outage + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/APIServerDeployment' + description: Successful response + summary: READ API Server Deployment Status + tags: + - API Server Deployment + post: + operationId: deployAPIServer + parameters: + - explode: false + in: path + name: environmentID + required: true + schema: + type: string + style: simple + - explode: false + in: path + name: apiServerID + required: true + schema: + type: string + style: simple + - explode: false + in: header + name: Content-Type + required: true + schema: + enum: + - application/vnd.pingidentity.apiserver.deploy+json + type: string + style: simple + responses: + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/P1Error' + description: "Invalid request received. Malformed JSON, malformed HTTP\ + \ request." + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/P1Error' + description: Request failed due to authorization issue. + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/P1Error' + description: Request failed due to authorization issue. + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/P1Error' + description: Not found. + "405": + content: + application/json: + schema: + $ref: '#/components/schemas/P1Error' + description: "Invalid request received. Malformed JSON, malformed HTTP\ + \ request." + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/P1Error' + description: Conflict. + "429": + content: + application/json: + schema: + $ref: '#/components/schemas/P1Error' + description: Request was rate limited + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/P1Error' + description: Uncaught error occurred. Platform outage + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/APIServerDeployment' + description: Successful response + summary: Deploy API Server + tags: + - API Server Deployment /environments/{environmentID}/apiServers/{apiServerID}/operations: get: operationId: readAllAPIServerOperations @@ -2426,6 +2583,42 @@ components: - baseURLs - name type: object + APIServerDeployment: + example: + accessControl: + custom: + enabled: false + authorizationVersion: + id: id + decisionEndpoint: + id: id + deployedAt: 2000-01-23T04:56:07.000+00:00 + policy: + id: id + status: + code: POLICIES_CREATE_IN_PROGRESS + error: + code: code + id: id + message: message + properties: + accessControl: + $ref: '#/components/schemas/APIServerDeployment_accessControl' + authorizationVersion: + $ref: '#/components/schemas/APIServerDeployment_authorizationVersion' + decisionEndpoint: + $ref: '#/components/schemas/APIServerDeployment_decisionEndpoint' + deployedAt: + description: The time of most recent successful deployment. Null if the + API service has never been successfully deployed. + format: date-time + readOnly: true + type: string + policy: + $ref: '#/components/schemas/APIServerDeployment_policy' + status: + $ref: '#/components/schemas/APIServerDeployment_status' + type: object APIServerOperation: example: accessControl: @@ -3054,6 +3247,101 @@ components: required: - id type: object + APIServerDeployment_accessControl_custom: + description: Defines if the operation will use custom policy rather than the + "Group" or "Scope" `accessControl` requirement. + example: + enabled: false + properties: + enabled: + default: false + description: "If `TRUE`, custom policy will be used for the endpoint. Defaults\ + \ to `FALSE`." + type: boolean + type: object + APIServerDeployment_accessControl: + example: + custom: + enabled: false + properties: + custom: + $ref: '#/components/schemas/APIServerDeployment_accessControl_custom' + type: object + APIServerDeployment_authorizationVersion: + example: + id: id + properties: + id: + description: The UUID of the last deployed policy authorization version. + This is present only if custom polcies are enabled and the API service + has been deployed at least once. + type: string + readOnly: true + type: object + APIServerDeployment_decisionEndpoint: + example: + id: id + properties: + id: + description: The UUID of the decision endpoint. + type: string + readOnly: true + type: object + APIServerDeployment_policy: + example: + id: id + properties: + id: + description: The ID of the root policy. + type: string + readOnly: true + type: object + APIServerDeployment_status_error: + description: Error details returned if the last deployment request failed. + example: + code: code + id: id + message: message + properties: + id: + description: A unique identifier for the error. + type: string + code: + description: "A general fault code that identifies the the type of error.\ + \ See [Error codes](https://apidocs.pingidentity.com/pingone/platform/v1/api/#error-codes)." + type: string + message: + description: A short human-readable description of the error. + type: string + type: object + APIServerDeployment_status: + example: + code: POLICIES_CREATE_IN_PROGRESS + error: + code: code + id: id + message: message + properties: + code: + description: "The deployment status code.\n- `POLICIES_CREATE_IN_PROGRESS`\t\ + The policy bundle for the API service's managed policies is being created.\n\ + - `DECISION_ENDPOINT_CREATE_IN_PROGRESS`\tA decision endpoint is being\ + \ created for the API service.\n- `DECISION_ENDPOINT_UPDATE_IN_PROGRESS`\t\ + The API service's decision endpoint is being updated.\n- `DEPLOYMENT_SUCCESSFUL`\t\ + The API service's policies have been successfully deployed.\n- `DEPLOYMENT_FAILED`\t\ + HAP-MGMT was unable to deploy the API service's policies.\n- `DEPLOYMENT_UNINITIALIZED`\t\ + A deployment has not yet been attempted.\n" + enum: + - POLICIES_CREATE_IN_PROGRESS + - DECISION_ENDPOINT_CREATE_IN_PROGRESS + - DECISION_ENDPOINT_UPDATE_IN_PROGRESS + - DEPLOYMENT_SUCCESSFUL + - DEPLOYMENT_FAILED + - DEPLOYMENT_UNINITIALIZED + type: string + error: + $ref: '#/components/schemas/APIServerDeployment_status_error' + type: object APIServerOperation_accessControl_group_groups_inner_element: description: "The ID of the group, wrapped in an object, for future extensibility.\ \ This is a required property if `operations.value.accessControl.group` is\ diff --git a/authorize/api_api_server_deployment.go b/authorize/api_api_server_deployment.go new file mode 100644 index 00000000..05f04180 --- /dev/null +++ b/authorize/api_api_server_deployment.go @@ -0,0 +1,441 @@ +/* +PingOne Platform API - Authorize + +The PingOne Platform API covering the PingOne Authorize service + +API version: 2023-06-29 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package authorize + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" +) + + +// APIServerDeploymentApiService APIServerDeploymentApi service +type APIServerDeploymentApiService service + +type ApiDeployAPIServerRequest struct { + ctx context.Context + ApiService *APIServerDeploymentApiService + environmentID string + apiServerID string + contentType *string +} + +func (r ApiDeployAPIServerRequest) ContentType(contentType string) ApiDeployAPIServerRequest { + r.contentType = &contentType + return r +} + +func (r ApiDeployAPIServerRequest) Execute() (*APIServerDeployment, *http.Response, error) { + return r.ApiService.DeployAPIServerExecute(r) +} + +/* +DeployAPIServer Deploy API Server + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param environmentID + @param apiServerID + @return ApiDeployAPIServerRequest +*/ +func (a *APIServerDeploymentApiService) DeployAPIServer(ctx context.Context, environmentID string, apiServerID string) ApiDeployAPIServerRequest { + return ApiDeployAPIServerRequest{ + ApiService: a, + ctx: ctx, + environmentID: environmentID, + apiServerID: apiServerID, + } +} + +// Execute executes the request +// @return APIServerDeployment +func (a *APIServerDeploymentApiService) DeployAPIServerExecute(r ApiDeployAPIServerRequest) (*APIServerDeployment, *http.Response, error) { + var ( + err error + response *http.Response + localVarReturnValue *APIServerDeployment + ) + + response, err = processResponse( + func() (any, *http.Response, error) { + return r.ApiService.internalDeployAPIServerExecute(r) + }, + &localVarReturnValue, + ) + return localVarReturnValue, response, err +} + +func (a *APIServerDeploymentApiService) internalDeployAPIServerExecute(r ApiDeployAPIServerRequest) (*APIServerDeployment, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *APIServerDeployment + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "APIServerDeploymentApiService.DeployAPIServer") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/environments/{environmentID}/apiServers/{apiServerID}/deployment" + localVarPath = strings.Replace(localVarPath, "{"+"environmentID"+"}", url.PathEscape(parameterValueToString(r.environmentID, "environmentID")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"apiServerID"+"}", url.PathEscape(parameterValueToString(r.apiServerID, "apiServerID")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.contentType == nil { + return localVarReturnValue, nil, reportError("contentType is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + parameterAddToHeaderOrQuery(localVarHeaderParams, "Content-Type", r.contentType, "") + 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 := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v P1Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v P1Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v P1Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v P1Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v P1Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 409 { + var v P1Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v P1Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v P1Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiReadDeploymentStatusRequest struct { + ctx context.Context + ApiService *APIServerDeploymentApiService + environmentID string + apiServerID string +} + +func (r ApiReadDeploymentStatusRequest) Execute() (*APIServerDeployment, *http.Response, error) { + return r.ApiService.ReadDeploymentStatusExecute(r) +} + +/* +ReadDeploymentStatus READ API Server Deployment Status + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param environmentID + @param apiServerID + @return ApiReadDeploymentStatusRequest +*/ +func (a *APIServerDeploymentApiService) ReadDeploymentStatus(ctx context.Context, environmentID string, apiServerID string) ApiReadDeploymentStatusRequest { + return ApiReadDeploymentStatusRequest{ + ApiService: a, + ctx: ctx, + environmentID: environmentID, + apiServerID: apiServerID, + } +} + +// Execute executes the request +// @return APIServerDeployment +func (a *APIServerDeploymentApiService) ReadDeploymentStatusExecute(r ApiReadDeploymentStatusRequest) (*APIServerDeployment, *http.Response, error) { + var ( + err error + response *http.Response + localVarReturnValue *APIServerDeployment + ) + + response, err = processResponse( + func() (any, *http.Response, error) { + return r.ApiService.internalReadDeploymentStatusExecute(r) + }, + &localVarReturnValue, + ) + return localVarReturnValue, response, err +} + +func (a *APIServerDeploymentApiService) internalReadDeploymentStatusExecute(r ApiReadDeploymentStatusRequest) (*APIServerDeployment, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *APIServerDeployment + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "APIServerDeploymentApiService.ReadDeploymentStatus") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/environments/{environmentID}/apiServers/{apiServerID}/deployment" + localVarPath = strings.Replace(localVarPath, "{"+"environmentID"+"}", url.PathEscape(parameterValueToString(r.environmentID, "environmentID")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"apiServerID"+"}", url.PathEscape(parameterValueToString(r.apiServerID, "apiServerID")), -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 := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := 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 := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v P1Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v P1Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v P1Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v P1Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 409 { + var v P1Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v P1Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v P1Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/authorize/client.go b/authorize/client.go index 0f431be6..da703e82 100644 --- a/authorize/client.go +++ b/authorize/client.go @@ -44,6 +44,8 @@ type APIClient struct { APIServersApi *APIServersApiService + APIServerDeploymentApi *APIServerDeploymentApiService + APIServerOperationsApi *APIServerOperationsApiService ApplicationResourcePermissionsApi *ApplicationResourcePermissionsApiService @@ -97,6 +99,7 @@ func NewAPIClient(cfg *Configuration) *APIClient { // API Services c.APIServersApi = (*APIServersApiService)(&c.common) + c.APIServerDeploymentApi = (*APIServerDeploymentApiService)(&c.common) c.APIServerOperationsApi = (*APIServerOperationsApiService)(&c.common) c.ApplicationResourcePermissionsApi = (*ApplicationResourcePermissionsApiService)(&c.common) c.ApplicationResourcesApi = (*ApplicationResourcesApiService)(&c.common) diff --git a/authorize/docs/APIServerDeployment.md b/authorize/docs/APIServerDeployment.md new file mode 100644 index 00000000..4a250267 --- /dev/null +++ b/authorize/docs/APIServerDeployment.md @@ -0,0 +1,186 @@ +# APIServerDeployment + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccessControl** | Pointer to [**APIServerDeploymentAccessControl**](APIServerDeploymentAccessControl.md) | | [optional] +**AuthorizationVersion** | Pointer to [**APIServerDeploymentAuthorizationVersion**](APIServerDeploymentAuthorizationVersion.md) | | [optional] +**DecisionEndpoint** | Pointer to [**APIServerDeploymentDecisionEndpoint**](APIServerDeploymentDecisionEndpoint.md) | | [optional] +**DeployedAt** | Pointer to **time.Time** | The time of most recent successful deployment. Null if the API service has never been successfully deployed. | [optional] [readonly] +**Policy** | Pointer to [**APIServerDeploymentPolicy**](APIServerDeploymentPolicy.md) | | [optional] +**Status** | Pointer to [**APIServerDeploymentStatus**](APIServerDeploymentStatus.md) | | [optional] + +## Methods + +### NewAPIServerDeployment + +`func NewAPIServerDeployment() *APIServerDeployment` + +NewAPIServerDeployment instantiates a new APIServerDeployment 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 + +### NewAPIServerDeploymentWithDefaults + +`func NewAPIServerDeploymentWithDefaults() *APIServerDeployment` + +NewAPIServerDeploymentWithDefaults instantiates a new APIServerDeployment 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 + +### GetAccessControl + +`func (o *APIServerDeployment) GetAccessControl() APIServerDeploymentAccessControl` + +GetAccessControl returns the AccessControl field if non-nil, zero value otherwise. + +### GetAccessControlOk + +`func (o *APIServerDeployment) GetAccessControlOk() (*APIServerDeploymentAccessControl, bool)` + +GetAccessControlOk returns a tuple with the AccessControl field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAccessControl + +`func (o *APIServerDeployment) SetAccessControl(v APIServerDeploymentAccessControl)` + +SetAccessControl sets AccessControl field to given value. + +### HasAccessControl + +`func (o *APIServerDeployment) HasAccessControl() bool` + +HasAccessControl returns a boolean if a field has been set. + +### GetAuthorizationVersion + +`func (o *APIServerDeployment) GetAuthorizationVersion() APIServerDeploymentAuthorizationVersion` + +GetAuthorizationVersion returns the AuthorizationVersion field if non-nil, zero value otherwise. + +### GetAuthorizationVersionOk + +`func (o *APIServerDeployment) GetAuthorizationVersionOk() (*APIServerDeploymentAuthorizationVersion, bool)` + +GetAuthorizationVersionOk returns a tuple with the AuthorizationVersion field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAuthorizationVersion + +`func (o *APIServerDeployment) SetAuthorizationVersion(v APIServerDeploymentAuthorizationVersion)` + +SetAuthorizationVersion sets AuthorizationVersion field to given value. + +### HasAuthorizationVersion + +`func (o *APIServerDeployment) HasAuthorizationVersion() bool` + +HasAuthorizationVersion returns a boolean if a field has been set. + +### GetDecisionEndpoint + +`func (o *APIServerDeployment) GetDecisionEndpoint() APIServerDeploymentDecisionEndpoint` + +GetDecisionEndpoint returns the DecisionEndpoint field if non-nil, zero value otherwise. + +### GetDecisionEndpointOk + +`func (o *APIServerDeployment) GetDecisionEndpointOk() (*APIServerDeploymentDecisionEndpoint, bool)` + +GetDecisionEndpointOk returns a tuple with the DecisionEndpoint field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDecisionEndpoint + +`func (o *APIServerDeployment) SetDecisionEndpoint(v APIServerDeploymentDecisionEndpoint)` + +SetDecisionEndpoint sets DecisionEndpoint field to given value. + +### HasDecisionEndpoint + +`func (o *APIServerDeployment) HasDecisionEndpoint() bool` + +HasDecisionEndpoint returns a boolean if a field has been set. + +### GetDeployedAt + +`func (o *APIServerDeployment) GetDeployedAt() time.Time` + +GetDeployedAt returns the DeployedAt field if non-nil, zero value otherwise. + +### GetDeployedAtOk + +`func (o *APIServerDeployment) GetDeployedAtOk() (*time.Time, bool)` + +GetDeployedAtOk returns a tuple with the DeployedAt field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDeployedAt + +`func (o *APIServerDeployment) SetDeployedAt(v time.Time)` + +SetDeployedAt sets DeployedAt field to given value. + +### HasDeployedAt + +`func (o *APIServerDeployment) HasDeployedAt() bool` + +HasDeployedAt returns a boolean if a field has been set. + +### GetPolicy + +`func (o *APIServerDeployment) GetPolicy() APIServerDeploymentPolicy` + +GetPolicy returns the Policy field if non-nil, zero value otherwise. + +### GetPolicyOk + +`func (o *APIServerDeployment) GetPolicyOk() (*APIServerDeploymentPolicy, bool)` + +GetPolicyOk returns a tuple with the Policy field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPolicy + +`func (o *APIServerDeployment) SetPolicy(v APIServerDeploymentPolicy)` + +SetPolicy sets Policy field to given value. + +### HasPolicy + +`func (o *APIServerDeployment) HasPolicy() bool` + +HasPolicy returns a boolean if a field has been set. + +### GetStatus + +`func (o *APIServerDeployment) GetStatus() APIServerDeploymentStatus` + +GetStatus returns the Status field if non-nil, zero value otherwise. + +### GetStatusOk + +`func (o *APIServerDeployment) GetStatusOk() (*APIServerDeploymentStatus, bool)` + +GetStatusOk returns a tuple with the Status field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetStatus + +`func (o *APIServerDeployment) SetStatus(v APIServerDeploymentStatus)` + +SetStatus sets Status field to given value. + +### HasStatus + +`func (o *APIServerDeployment) HasStatus() bool` + +HasStatus returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/authorize/docs/APIServerDeploymentAccessControl.md b/authorize/docs/APIServerDeploymentAccessControl.md new file mode 100644 index 00000000..c76caa4c --- /dev/null +++ b/authorize/docs/APIServerDeploymentAccessControl.md @@ -0,0 +1,56 @@ +# APIServerDeploymentAccessControl + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Custom** | Pointer to [**APIServerDeploymentAccessControlCustom**](APIServerDeploymentAccessControlCustom.md) | | [optional] + +## Methods + +### NewAPIServerDeploymentAccessControl + +`func NewAPIServerDeploymentAccessControl() *APIServerDeploymentAccessControl` + +NewAPIServerDeploymentAccessControl instantiates a new APIServerDeploymentAccessControl 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 + +### NewAPIServerDeploymentAccessControlWithDefaults + +`func NewAPIServerDeploymentAccessControlWithDefaults() *APIServerDeploymentAccessControl` + +NewAPIServerDeploymentAccessControlWithDefaults instantiates a new APIServerDeploymentAccessControl 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 + +### GetCustom + +`func (o *APIServerDeploymentAccessControl) GetCustom() APIServerDeploymentAccessControlCustom` + +GetCustom returns the Custom field if non-nil, zero value otherwise. + +### GetCustomOk + +`func (o *APIServerDeploymentAccessControl) GetCustomOk() (*APIServerDeploymentAccessControlCustom, bool)` + +GetCustomOk returns a tuple with the Custom field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCustom + +`func (o *APIServerDeploymentAccessControl) SetCustom(v APIServerDeploymentAccessControlCustom)` + +SetCustom sets Custom field to given value. + +### HasCustom + +`func (o *APIServerDeploymentAccessControl) HasCustom() bool` + +HasCustom 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/authorize/docs/APIServerDeploymentAccessControlCustom.md b/authorize/docs/APIServerDeploymentAccessControlCustom.md new file mode 100644 index 00000000..699d675d --- /dev/null +++ b/authorize/docs/APIServerDeploymentAccessControlCustom.md @@ -0,0 +1,56 @@ +# APIServerDeploymentAccessControlCustom + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Enabled** | Pointer to **bool** | If `TRUE`, custom policy will be used for the endpoint. Defaults to `FALSE`. | [optional] [default to false] + +## Methods + +### NewAPIServerDeploymentAccessControlCustom + +`func NewAPIServerDeploymentAccessControlCustom() *APIServerDeploymentAccessControlCustom` + +NewAPIServerDeploymentAccessControlCustom instantiates a new APIServerDeploymentAccessControlCustom 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 + +### NewAPIServerDeploymentAccessControlCustomWithDefaults + +`func NewAPIServerDeploymentAccessControlCustomWithDefaults() *APIServerDeploymentAccessControlCustom` + +NewAPIServerDeploymentAccessControlCustomWithDefaults instantiates a new APIServerDeploymentAccessControlCustom 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 + +### GetEnabled + +`func (o *APIServerDeploymentAccessControlCustom) GetEnabled() bool` + +GetEnabled returns the Enabled field if non-nil, zero value otherwise. + +### GetEnabledOk + +`func (o *APIServerDeploymentAccessControlCustom) 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 *APIServerDeploymentAccessControlCustom) SetEnabled(v bool)` + +SetEnabled sets Enabled field to given value. + +### HasEnabled + +`func (o *APIServerDeploymentAccessControlCustom) HasEnabled() bool` + +HasEnabled 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/authorize/docs/APIServerDeploymentApi.md b/authorize/docs/APIServerDeploymentApi.md new file mode 100644 index 00000000..7c48cb86 --- /dev/null +++ b/authorize/docs/APIServerDeploymentApi.md @@ -0,0 +1,154 @@ +# \APIServerDeploymentApi + +All URIs are relative to *https://api.pingone.com/v1* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**DeployAPIServer**](APIServerDeploymentApi.md#DeployAPIServer) | **Post** /environments/{environmentID}/apiServers/{apiServerID}/deployment | Deploy API Server +[**ReadDeploymentStatus**](APIServerDeploymentApi.md#ReadDeploymentStatus) | **Get** /environments/{environmentID}/apiServers/{apiServerID}/deployment | READ API Server Deployment Status + + + +## DeployAPIServer + +> APIServerDeployment DeployAPIServer(ctx, environmentID, apiServerID).ContentType(contentType).Execute() + +Deploy API Server + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/patrickcping/pingone-go-sdk-v2/authorize" +) + +func main() { + environmentID := "environmentID_example" // string | + apiServerID := "apiServerID_example" // string | + contentType := "contentType_example" // string | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.APIServerDeploymentApi.DeployAPIServer(context.Background(), environmentID, apiServerID).ContentType(contentType).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `APIServerDeploymentApi.DeployAPIServer``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `DeployAPIServer`: APIServerDeployment + fmt.Fprintf(os.Stdout, "Response from `APIServerDeploymentApi.DeployAPIServer`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**environmentID** | **string** | | +**apiServerID** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiDeployAPIServerRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **contentType** | **string** | | + +### Return type + +[**APIServerDeployment**](APIServerDeployment.md) + +### Authorization + +[bearer](../README.md#bearer) + +### 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) + + +## ReadDeploymentStatus + +> APIServerDeployment ReadDeploymentStatus(ctx, environmentID, apiServerID).Execute() + +READ API Server Deployment Status + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/patrickcping/pingone-go-sdk-v2/authorize" +) + +func main() { + environmentID := "environmentID_example" // string | + apiServerID := "apiServerID_example" // string | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.APIServerDeploymentApi.ReadDeploymentStatus(context.Background(), environmentID, apiServerID).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `APIServerDeploymentApi.ReadDeploymentStatus``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ReadDeploymentStatus`: APIServerDeployment + fmt.Fprintf(os.Stdout, "Response from `APIServerDeploymentApi.ReadDeploymentStatus`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**environmentID** | **string** | | +**apiServerID** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiReadDeploymentStatusRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + +### Return type + +[**APIServerDeployment**](APIServerDeployment.md) + +### Authorization + +[bearer](../README.md#bearer) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/authorize/docs/APIServerDeploymentAuthorizationVersion.md b/authorize/docs/APIServerDeploymentAuthorizationVersion.md new file mode 100644 index 00000000..603d92d8 --- /dev/null +++ b/authorize/docs/APIServerDeploymentAuthorizationVersion.md @@ -0,0 +1,56 @@ +# APIServerDeploymentAuthorizationVersion + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | Pointer to **string** | The UUID of the last deployed policy authorization version. This is present only if custom polcies are enabled and the API service has been deployed at least once. | [optional] + +## Methods + +### NewAPIServerDeploymentAuthorizationVersion + +`func NewAPIServerDeploymentAuthorizationVersion() *APIServerDeploymentAuthorizationVersion` + +NewAPIServerDeploymentAuthorizationVersion instantiates a new APIServerDeploymentAuthorizationVersion 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 + +### NewAPIServerDeploymentAuthorizationVersionWithDefaults + +`func NewAPIServerDeploymentAuthorizationVersionWithDefaults() *APIServerDeploymentAuthorizationVersion` + +NewAPIServerDeploymentAuthorizationVersionWithDefaults instantiates a new APIServerDeploymentAuthorizationVersion 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 *APIServerDeploymentAuthorizationVersion) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *APIServerDeploymentAuthorizationVersion) 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 *APIServerDeploymentAuthorizationVersion) SetId(v string)` + +SetId sets Id field to given value. + +### HasId + +`func (o *APIServerDeploymentAuthorizationVersion) 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/authorize/docs/APIServerDeploymentDecisionEndpoint.md b/authorize/docs/APIServerDeploymentDecisionEndpoint.md new file mode 100644 index 00000000..2dfbb8c7 --- /dev/null +++ b/authorize/docs/APIServerDeploymentDecisionEndpoint.md @@ -0,0 +1,56 @@ +# APIServerDeploymentDecisionEndpoint + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | Pointer to **string** | The UUID of the decision endpoint. | [optional] + +## Methods + +### NewAPIServerDeploymentDecisionEndpoint + +`func NewAPIServerDeploymentDecisionEndpoint() *APIServerDeploymentDecisionEndpoint` + +NewAPIServerDeploymentDecisionEndpoint instantiates a new APIServerDeploymentDecisionEndpoint 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 + +### NewAPIServerDeploymentDecisionEndpointWithDefaults + +`func NewAPIServerDeploymentDecisionEndpointWithDefaults() *APIServerDeploymentDecisionEndpoint` + +NewAPIServerDeploymentDecisionEndpointWithDefaults instantiates a new APIServerDeploymentDecisionEndpoint 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 *APIServerDeploymentDecisionEndpoint) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *APIServerDeploymentDecisionEndpoint) 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 *APIServerDeploymentDecisionEndpoint) SetId(v string)` + +SetId sets Id field to given value. + +### HasId + +`func (o *APIServerDeploymentDecisionEndpoint) 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/authorize/docs/APIServerDeploymentPolicy.md b/authorize/docs/APIServerDeploymentPolicy.md new file mode 100644 index 00000000..b18fa606 --- /dev/null +++ b/authorize/docs/APIServerDeploymentPolicy.md @@ -0,0 +1,56 @@ +# APIServerDeploymentPolicy + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | Pointer to **string** | The ID of the root policy. | [optional] + +## Methods + +### NewAPIServerDeploymentPolicy + +`func NewAPIServerDeploymentPolicy() *APIServerDeploymentPolicy` + +NewAPIServerDeploymentPolicy instantiates a new APIServerDeploymentPolicy 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 + +### NewAPIServerDeploymentPolicyWithDefaults + +`func NewAPIServerDeploymentPolicyWithDefaults() *APIServerDeploymentPolicy` + +NewAPIServerDeploymentPolicyWithDefaults instantiates a new APIServerDeploymentPolicy 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 *APIServerDeploymentPolicy) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *APIServerDeploymentPolicy) 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 *APIServerDeploymentPolicy) SetId(v string)` + +SetId sets Id field to given value. + +### HasId + +`func (o *APIServerDeploymentPolicy) 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/authorize/docs/APIServerDeploymentStatus.md b/authorize/docs/APIServerDeploymentStatus.md new file mode 100644 index 00000000..bda50c98 --- /dev/null +++ b/authorize/docs/APIServerDeploymentStatus.md @@ -0,0 +1,82 @@ +# APIServerDeploymentStatus + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Code** | Pointer to **string** | The deployment status code. - `POLICIES_CREATE_IN_PROGRESS` The policy bundle for the API service's managed policies is being created. - `DECISION_ENDPOINT_CREATE_IN_PROGRESS` A decision endpoint is being created for the API service. - `DECISION_ENDPOINT_UPDATE_IN_PROGRESS` The API service's decision endpoint is being updated. - `DEPLOYMENT_SUCCESSFUL` The API service's policies have been successfully deployed. - `DEPLOYMENT_FAILED` HAP-MGMT was unable to deploy the API service's policies. - `DEPLOYMENT_UNINITIALIZED` A deployment has not yet been attempted. | [optional] +**Error** | Pointer to [**APIServerDeploymentStatusError**](APIServerDeploymentStatusError.md) | | [optional] + +## Methods + +### NewAPIServerDeploymentStatus + +`func NewAPIServerDeploymentStatus() *APIServerDeploymentStatus` + +NewAPIServerDeploymentStatus instantiates a new APIServerDeploymentStatus 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 + +### NewAPIServerDeploymentStatusWithDefaults + +`func NewAPIServerDeploymentStatusWithDefaults() *APIServerDeploymentStatus` + +NewAPIServerDeploymentStatusWithDefaults instantiates a new APIServerDeploymentStatus object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetCode + +`func (o *APIServerDeploymentStatus) GetCode() string` + +GetCode returns the Code field if non-nil, zero value otherwise. + +### GetCodeOk + +`func (o *APIServerDeploymentStatus) GetCodeOk() (*string, bool)` + +GetCodeOk returns a tuple with the Code field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCode + +`func (o *APIServerDeploymentStatus) SetCode(v string)` + +SetCode sets Code field to given value. + +### HasCode + +`func (o *APIServerDeploymentStatus) HasCode() bool` + +HasCode returns a boolean if a field has been set. + +### GetError + +`func (o *APIServerDeploymentStatus) GetError() APIServerDeploymentStatusError` + +GetError returns the Error field if non-nil, zero value otherwise. + +### GetErrorOk + +`func (o *APIServerDeploymentStatus) GetErrorOk() (*APIServerDeploymentStatusError, bool)` + +GetErrorOk returns a tuple with the Error field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetError + +`func (o *APIServerDeploymentStatus) SetError(v APIServerDeploymentStatusError)` + +SetError sets Error field to given value. + +### HasError + +`func (o *APIServerDeploymentStatus) HasError() bool` + +HasError returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/authorize/docs/APIServerDeploymentStatusError.md b/authorize/docs/APIServerDeploymentStatusError.md new file mode 100644 index 00000000..a6640fea --- /dev/null +++ b/authorize/docs/APIServerDeploymentStatusError.md @@ -0,0 +1,108 @@ +# APIServerDeploymentStatusError + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | Pointer to **string** | A unique identifier for the error. | [optional] +**Code** | Pointer to **string** | A general fault code that identifies the the type of error. See [Error codes](https://apidocs.pingidentity.com/pingone/platform/v1/api/#error-codes). | [optional] +**Message** | Pointer to **string** | A short human-readable description of the error. | [optional] + +## Methods + +### NewAPIServerDeploymentStatusError + +`func NewAPIServerDeploymentStatusError() *APIServerDeploymentStatusError` + +NewAPIServerDeploymentStatusError instantiates a new APIServerDeploymentStatusError 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 + +### NewAPIServerDeploymentStatusErrorWithDefaults + +`func NewAPIServerDeploymentStatusErrorWithDefaults() *APIServerDeploymentStatusError` + +NewAPIServerDeploymentStatusErrorWithDefaults instantiates a new APIServerDeploymentStatusError 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 *APIServerDeploymentStatusError) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *APIServerDeploymentStatusError) 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 *APIServerDeploymentStatusError) SetId(v string)` + +SetId sets Id field to given value. + +### HasId + +`func (o *APIServerDeploymentStatusError) HasId() bool` + +HasId returns a boolean if a field has been set. + +### GetCode + +`func (o *APIServerDeploymentStatusError) GetCode() string` + +GetCode returns the Code field if non-nil, zero value otherwise. + +### GetCodeOk + +`func (o *APIServerDeploymentStatusError) GetCodeOk() (*string, bool)` + +GetCodeOk returns a tuple with the Code field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCode + +`func (o *APIServerDeploymentStatusError) SetCode(v string)` + +SetCode sets Code field to given value. + +### HasCode + +`func (o *APIServerDeploymentStatusError) HasCode() bool` + +HasCode returns a boolean if a field has been set. + +### GetMessage + +`func (o *APIServerDeploymentStatusError) GetMessage() string` + +GetMessage returns the Message field if non-nil, zero value otherwise. + +### GetMessageOk + +`func (o *APIServerDeploymentStatusError) GetMessageOk() (*string, bool)` + +GetMessageOk returns a tuple with the Message field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMessage + +`func (o *APIServerDeploymentStatusError) SetMessage(v string)` + +SetMessage sets Message field to given value. + +### HasMessage + +`func (o *APIServerDeploymentStatusError) HasMessage() bool` + +HasMessage returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/authorize/generate/pingone-authorize.yml b/authorize/generate/pingone-authorize.yml index 878a8e6b..f01b5ac4 100644 --- a/authorize/generate/pingone-authorize.yml +++ b/authorize/generate/pingone-authorize.yml @@ -123,6 +123,73 @@ components: - name - authorizationServer - baseURLs + APIServerDeployment: + type: object + properties: + accessControl: + type: object + properties: + custom: + type: object + description: Defines if the operation will use custom policy rather than the "Group" or "Scope" `accessControl` requirement. + properties: + enabled: + type: boolean + default: false + description: If `TRUE`, custom policy will be used for the endpoint. Defaults to `FALSE`. + authorizationVersion: + type: object + readOnly: true + properties: + id: + type: string + description: The UUID of the last deployed policy authorization version. This is present only if custom polcies are enabled and the API service has been deployed at least once. + decisionEndpoint: + type: object + readOnly: true + properties: + id: + type: string + description: The UUID of the decision endpoint. + deployedAt: + type: string + format: date-time + readOnly: true + description: The time of most recent successful deployment. Null if the API service has never been successfully deployed. + policy: + type: object + readOnly: true + properties: + id: + type: string + description: The ID of the root policy. + status: + type: object + properties: + code: + type: string + description: | + The deployment status code. + - `POLICIES_CREATE_IN_PROGRESS` The policy bundle for the API service's managed policies is being created. + - `DECISION_ENDPOINT_CREATE_IN_PROGRESS` A decision endpoint is being created for the API service. + - `DECISION_ENDPOINT_UPDATE_IN_PROGRESS` The API service's decision endpoint is being updated. + - `DEPLOYMENT_SUCCESSFUL` The API service's policies have been successfully deployed. + - `DEPLOYMENT_FAILED` HAP-MGMT was unable to deploy the API service's policies. + - `DEPLOYMENT_UNINITIALIZED` A deployment has not yet been attempted. + enum: [POLICIES_CREATE_IN_PROGRESS, DECISION_ENDPOINT_CREATE_IN_PROGRESS, DECISION_ENDPOINT_UPDATE_IN_PROGRESS, DEPLOYMENT_SUCCESSFUL, DEPLOYMENT_FAILED, DEPLOYMENT_UNINITIALIZED] + error: + type: object + description: Error details returned if the last deployment request failed. + properties: + id: + type: string + description: A unique identifier for the error. + code: + type: string + description: A general fault code that identifies the the type of error. See [Error codes](https://apidocs.pingidentity.com/pingone/platform/v1/api/#error-codes). + message: + type: string + description: A short human-readable description of the error. APIServerOperation: type: object properties: @@ -974,6 +1041,89 @@ paths: $ref: '#/components/responses/500' '204': description: Successful response + /environments/{environmentID}/apiServers/{apiServerID}/deployment: + get: + tags: + - API Server Deployment + summary: READ API Server Deployment Status + operationId: readDeploymentStatus + parameters: + - name: environmentID + in: path + schema: + type: string + required: true + - name: apiServerID + in: path + schema: + type: string + required: true + responses: + '400': + $ref: '#/components/responses/400' + '401': + $ref: '#/components/responses/401' + '403': + $ref: '#/components/responses/403' + '404': + $ref: '#/components/responses/404' + '409': + $ref: '#/components/responses/409' + '429': + $ref: '#/components/responses/429' + '500': + $ref: '#/components/responses/500' + '200': + description: Successful response + content: + application/json: + schema: + $ref: '#/components/schemas/APIServerDeployment' + post: + tags: + - API Server Deployment + summary: Deploy API Server + operationId: deployAPIServer + parameters: + - name: environmentID + in: path + schema: + type: string + required: true + - name: apiServerID + in: path + schema: + type: string + required: true + - name: Content-Type + in: header + schema: + type: string + enum: [application/vnd.pingidentity.apiserver.deploy+json] + required: true + responses: + '400': + $ref: '#/components/responses/400' + '401': + $ref: '#/components/responses/401' + '403': + $ref: '#/components/responses/403' + '404': + $ref: '#/components/responses/404' + '405': + $ref: '#/components/responses/405' + '409': + $ref: '#/components/responses/409' + '429': + $ref: '#/components/responses/429' + '500': + $ref: '#/components/responses/500' + '200': + description: Successful response + content: + application/json: + schema: + $ref: '#/components/schemas/APIServerDeployment' /environments/{environmentID}/apiServers/{apiServerID}/operations: get: tags: diff --git a/authorize/model_api_server_deployment.go b/authorize/model_api_server_deployment.go new file mode 100644 index 00000000..4fc24af6 --- /dev/null +++ b/authorize/model_api_server_deployment.go @@ -0,0 +1,308 @@ +/* +PingOne Platform API - Authorize + +The PingOne Platform API covering the PingOne Authorize service + +API version: 2023-06-29 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package authorize + +import ( + "encoding/json" + "time" +) + +// checks if the APIServerDeployment type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &APIServerDeployment{} + +// APIServerDeployment struct for APIServerDeployment +type APIServerDeployment struct { + AccessControl *APIServerDeploymentAccessControl `json:"accessControl,omitempty"` + AuthorizationVersion *APIServerDeploymentAuthorizationVersion `json:"authorizationVersion,omitempty"` + DecisionEndpoint *APIServerDeploymentDecisionEndpoint `json:"decisionEndpoint,omitempty"` + // The time of most recent successful deployment. Null if the API service has never been successfully deployed. + DeployedAt *time.Time `json:"deployedAt,omitempty"` + Policy *APIServerDeploymentPolicy `json:"policy,omitempty"` + Status *APIServerDeploymentStatus `json:"status,omitempty"` +} + +// NewAPIServerDeployment instantiates a new APIServerDeployment 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 NewAPIServerDeployment() *APIServerDeployment { + this := APIServerDeployment{} + return &this +} + +// NewAPIServerDeploymentWithDefaults instantiates a new APIServerDeployment 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 NewAPIServerDeploymentWithDefaults() *APIServerDeployment { + this := APIServerDeployment{} + return &this +} + +// GetAccessControl returns the AccessControl field value if set, zero value otherwise. +func (o *APIServerDeployment) GetAccessControl() APIServerDeploymentAccessControl { + if o == nil || IsNil(o.AccessControl) { + var ret APIServerDeploymentAccessControl + return ret + } + return *o.AccessControl +} + +// GetAccessControlOk returns a tuple with the AccessControl field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *APIServerDeployment) GetAccessControlOk() (*APIServerDeploymentAccessControl, bool) { + if o == nil || IsNil(o.AccessControl) { + return nil, false + } + return o.AccessControl, true +} + +// HasAccessControl returns a boolean if a field has been set. +func (o *APIServerDeployment) HasAccessControl() bool { + if o != nil && !IsNil(o.AccessControl) { + return true + } + + return false +} + +// SetAccessControl gets a reference to the given APIServerDeploymentAccessControl and assigns it to the AccessControl field. +func (o *APIServerDeployment) SetAccessControl(v APIServerDeploymentAccessControl) { + o.AccessControl = &v +} + +// GetAuthorizationVersion returns the AuthorizationVersion field value if set, zero value otherwise. +func (o *APIServerDeployment) GetAuthorizationVersion() APIServerDeploymentAuthorizationVersion { + if o == nil || IsNil(o.AuthorizationVersion) { + var ret APIServerDeploymentAuthorizationVersion + return ret + } + return *o.AuthorizationVersion +} + +// GetAuthorizationVersionOk returns a tuple with the AuthorizationVersion field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *APIServerDeployment) GetAuthorizationVersionOk() (*APIServerDeploymentAuthorizationVersion, bool) { + if o == nil || IsNil(o.AuthorizationVersion) { + return nil, false + } + return o.AuthorizationVersion, true +} + +// HasAuthorizationVersion returns a boolean if a field has been set. +func (o *APIServerDeployment) HasAuthorizationVersion() bool { + if o != nil && !IsNil(o.AuthorizationVersion) { + return true + } + + return false +} + +// SetAuthorizationVersion gets a reference to the given APIServerDeploymentAuthorizationVersion and assigns it to the AuthorizationVersion field. +func (o *APIServerDeployment) SetAuthorizationVersion(v APIServerDeploymentAuthorizationVersion) { + o.AuthorizationVersion = &v +} + +// GetDecisionEndpoint returns the DecisionEndpoint field value if set, zero value otherwise. +func (o *APIServerDeployment) GetDecisionEndpoint() APIServerDeploymentDecisionEndpoint { + if o == nil || IsNil(o.DecisionEndpoint) { + var ret APIServerDeploymentDecisionEndpoint + return ret + } + return *o.DecisionEndpoint +} + +// GetDecisionEndpointOk returns a tuple with the DecisionEndpoint field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *APIServerDeployment) GetDecisionEndpointOk() (*APIServerDeploymentDecisionEndpoint, bool) { + if o == nil || IsNil(o.DecisionEndpoint) { + return nil, false + } + return o.DecisionEndpoint, true +} + +// HasDecisionEndpoint returns a boolean if a field has been set. +func (o *APIServerDeployment) HasDecisionEndpoint() bool { + if o != nil && !IsNil(o.DecisionEndpoint) { + return true + } + + return false +} + +// SetDecisionEndpoint gets a reference to the given APIServerDeploymentDecisionEndpoint and assigns it to the DecisionEndpoint field. +func (o *APIServerDeployment) SetDecisionEndpoint(v APIServerDeploymentDecisionEndpoint) { + o.DecisionEndpoint = &v +} + +// GetDeployedAt returns the DeployedAt field value if set, zero value otherwise. +func (o *APIServerDeployment) GetDeployedAt() time.Time { + if o == nil || IsNil(o.DeployedAt) { + var ret time.Time + return ret + } + return *o.DeployedAt +} + +// GetDeployedAtOk returns a tuple with the DeployedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *APIServerDeployment) GetDeployedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.DeployedAt) { + return nil, false + } + return o.DeployedAt, true +} + +// HasDeployedAt returns a boolean if a field has been set. +func (o *APIServerDeployment) HasDeployedAt() bool { + if o != nil && !IsNil(o.DeployedAt) { + return true + } + + return false +} + +// SetDeployedAt gets a reference to the given time.Time and assigns it to the DeployedAt field. +func (o *APIServerDeployment) SetDeployedAt(v time.Time) { + o.DeployedAt = &v +} + +// GetPolicy returns the Policy field value if set, zero value otherwise. +func (o *APIServerDeployment) GetPolicy() APIServerDeploymentPolicy { + if o == nil || IsNil(o.Policy) { + var ret APIServerDeploymentPolicy + return ret + } + return *o.Policy +} + +// GetPolicyOk returns a tuple with the Policy field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *APIServerDeployment) GetPolicyOk() (*APIServerDeploymentPolicy, bool) { + if o == nil || IsNil(o.Policy) { + return nil, false + } + return o.Policy, true +} + +// HasPolicy returns a boolean if a field has been set. +func (o *APIServerDeployment) HasPolicy() bool { + if o != nil && !IsNil(o.Policy) { + return true + } + + return false +} + +// SetPolicy gets a reference to the given APIServerDeploymentPolicy and assigns it to the Policy field. +func (o *APIServerDeployment) SetPolicy(v APIServerDeploymentPolicy) { + o.Policy = &v +} + +// GetStatus returns the Status field value if set, zero value otherwise. +func (o *APIServerDeployment) GetStatus() APIServerDeploymentStatus { + if o == nil || IsNil(o.Status) { + var ret APIServerDeploymentStatus + return ret + } + return *o.Status +} + +// GetStatusOk returns a tuple with the Status field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *APIServerDeployment) GetStatusOk() (*APIServerDeploymentStatus, bool) { + if o == nil || IsNil(o.Status) { + return nil, false + } + return o.Status, true +} + +// HasStatus returns a boolean if a field has been set. +func (o *APIServerDeployment) HasStatus() bool { + if o != nil && !IsNil(o.Status) { + return true + } + + return false +} + +// SetStatus gets a reference to the given APIServerDeploymentStatus and assigns it to the Status field. +func (o *APIServerDeployment) SetStatus(v APIServerDeploymentStatus) { + o.Status = &v +} + +func (o APIServerDeployment) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o APIServerDeployment) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.AccessControl) { + toSerialize["accessControl"] = o.AccessControl + } + if !IsNil(o.AuthorizationVersion) { + toSerialize["authorizationVersion"] = o.AuthorizationVersion + } + if !IsNil(o.DecisionEndpoint) { + toSerialize["decisionEndpoint"] = o.DecisionEndpoint + } + if !IsNil(o.DeployedAt) { + toSerialize["deployedAt"] = o.DeployedAt + } + if !IsNil(o.Policy) { + toSerialize["policy"] = o.Policy + } + if !IsNil(o.Status) { + toSerialize["status"] = o.Status + } + return toSerialize, nil +} + +type NullableAPIServerDeployment struct { + value *APIServerDeployment + isSet bool +} + +func (v NullableAPIServerDeployment) Get() *APIServerDeployment { + return v.value +} + +func (v *NullableAPIServerDeployment) Set(val *APIServerDeployment) { + v.value = val + v.isSet = true +} + +func (v NullableAPIServerDeployment) IsSet() bool { + return v.isSet +} + +func (v *NullableAPIServerDeployment) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableAPIServerDeployment(val *APIServerDeployment) *NullableAPIServerDeployment { + return &NullableAPIServerDeployment{value: val, isSet: true} +} + +func (v NullableAPIServerDeployment) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableAPIServerDeployment) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/authorize/model_api_server_deployment_access_control.go b/authorize/model_api_server_deployment_access_control.go new file mode 100644 index 00000000..cf04d8cd --- /dev/null +++ b/authorize/model_api_server_deployment_access_control.go @@ -0,0 +1,126 @@ +/* +PingOne Platform API - Authorize + +The PingOne Platform API covering the PingOne Authorize service + +API version: 2023-06-29 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package authorize + +import ( + "encoding/json" +) + +// checks if the APIServerDeploymentAccessControl type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &APIServerDeploymentAccessControl{} + +// APIServerDeploymentAccessControl struct for APIServerDeploymentAccessControl +type APIServerDeploymentAccessControl struct { + Custom *APIServerDeploymentAccessControlCustom `json:"custom,omitempty"` +} + +// NewAPIServerDeploymentAccessControl instantiates a new APIServerDeploymentAccessControl 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 NewAPIServerDeploymentAccessControl() *APIServerDeploymentAccessControl { + this := APIServerDeploymentAccessControl{} + return &this +} + +// NewAPIServerDeploymentAccessControlWithDefaults instantiates a new APIServerDeploymentAccessControl 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 NewAPIServerDeploymentAccessControlWithDefaults() *APIServerDeploymentAccessControl { + this := APIServerDeploymentAccessControl{} + return &this +} + +// GetCustom returns the Custom field value if set, zero value otherwise. +func (o *APIServerDeploymentAccessControl) GetCustom() APIServerDeploymentAccessControlCustom { + if o == nil || IsNil(o.Custom) { + var ret APIServerDeploymentAccessControlCustom + return ret + } + return *o.Custom +} + +// GetCustomOk returns a tuple with the Custom field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *APIServerDeploymentAccessControl) GetCustomOk() (*APIServerDeploymentAccessControlCustom, bool) { + if o == nil || IsNil(o.Custom) { + return nil, false + } + return o.Custom, true +} + +// HasCustom returns a boolean if a field has been set. +func (o *APIServerDeploymentAccessControl) HasCustom() bool { + if o != nil && !IsNil(o.Custom) { + return true + } + + return false +} + +// SetCustom gets a reference to the given APIServerDeploymentAccessControlCustom and assigns it to the Custom field. +func (o *APIServerDeploymentAccessControl) SetCustom(v APIServerDeploymentAccessControlCustom) { + o.Custom = &v +} + +func (o APIServerDeploymentAccessControl) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o APIServerDeploymentAccessControl) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Custom) { + toSerialize["custom"] = o.Custom + } + return toSerialize, nil +} + +type NullableAPIServerDeploymentAccessControl struct { + value *APIServerDeploymentAccessControl + isSet bool +} + +func (v NullableAPIServerDeploymentAccessControl) Get() *APIServerDeploymentAccessControl { + return v.value +} + +func (v *NullableAPIServerDeploymentAccessControl) Set(val *APIServerDeploymentAccessControl) { + v.value = val + v.isSet = true +} + +func (v NullableAPIServerDeploymentAccessControl) IsSet() bool { + return v.isSet +} + +func (v *NullableAPIServerDeploymentAccessControl) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableAPIServerDeploymentAccessControl(val *APIServerDeploymentAccessControl) *NullableAPIServerDeploymentAccessControl { + return &NullableAPIServerDeploymentAccessControl{value: val, isSet: true} +} + +func (v NullableAPIServerDeploymentAccessControl) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableAPIServerDeploymentAccessControl) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/authorize/model_api_server_deployment_access_control_custom.go b/authorize/model_api_server_deployment_access_control_custom.go new file mode 100644 index 00000000..2cad1b62 --- /dev/null +++ b/authorize/model_api_server_deployment_access_control_custom.go @@ -0,0 +1,131 @@ +/* +PingOne Platform API - Authorize + +The PingOne Platform API covering the PingOne Authorize service + +API version: 2023-06-29 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package authorize + +import ( + "encoding/json" +) + +// checks if the APIServerDeploymentAccessControlCustom type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &APIServerDeploymentAccessControlCustom{} + +// APIServerDeploymentAccessControlCustom Defines if the operation will use custom policy rather than the \"Group\" or \"Scope\" `accessControl` requirement. +type APIServerDeploymentAccessControlCustom struct { + // If `TRUE`, custom policy will be used for the endpoint. Defaults to `FALSE`. + Enabled *bool `json:"enabled,omitempty"` +} + +// NewAPIServerDeploymentAccessControlCustom instantiates a new APIServerDeploymentAccessControlCustom 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 NewAPIServerDeploymentAccessControlCustom() *APIServerDeploymentAccessControlCustom { + this := APIServerDeploymentAccessControlCustom{} + var enabled bool = false + this.Enabled = &enabled + return &this +} + +// NewAPIServerDeploymentAccessControlCustomWithDefaults instantiates a new APIServerDeploymentAccessControlCustom 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 NewAPIServerDeploymentAccessControlCustomWithDefaults() *APIServerDeploymentAccessControlCustom { + this := APIServerDeploymentAccessControlCustom{} + var enabled bool = false + this.Enabled = &enabled + return &this +} + +// GetEnabled returns the Enabled field value if set, zero value otherwise. +func (o *APIServerDeploymentAccessControlCustom) 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 *APIServerDeploymentAccessControlCustom) 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 *APIServerDeploymentAccessControlCustom) 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 *APIServerDeploymentAccessControlCustom) SetEnabled(v bool) { + o.Enabled = &v +} + +func (o APIServerDeploymentAccessControlCustom) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o APIServerDeploymentAccessControlCustom) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Enabled) { + toSerialize["enabled"] = o.Enabled + } + return toSerialize, nil +} + +type NullableAPIServerDeploymentAccessControlCustom struct { + value *APIServerDeploymentAccessControlCustom + isSet bool +} + +func (v NullableAPIServerDeploymentAccessControlCustom) Get() *APIServerDeploymentAccessControlCustom { + return v.value +} + +func (v *NullableAPIServerDeploymentAccessControlCustom) Set(val *APIServerDeploymentAccessControlCustom) { + v.value = val + v.isSet = true +} + +func (v NullableAPIServerDeploymentAccessControlCustom) IsSet() bool { + return v.isSet +} + +func (v *NullableAPIServerDeploymentAccessControlCustom) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableAPIServerDeploymentAccessControlCustom(val *APIServerDeploymentAccessControlCustom) *NullableAPIServerDeploymentAccessControlCustom { + return &NullableAPIServerDeploymentAccessControlCustom{value: val, isSet: true} +} + +func (v NullableAPIServerDeploymentAccessControlCustom) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableAPIServerDeploymentAccessControlCustom) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/authorize/model_api_server_deployment_authorization_version.go b/authorize/model_api_server_deployment_authorization_version.go new file mode 100644 index 00000000..9e668c3a --- /dev/null +++ b/authorize/model_api_server_deployment_authorization_version.go @@ -0,0 +1,127 @@ +/* +PingOne Platform API - Authorize + +The PingOne Platform API covering the PingOne Authorize service + +API version: 2023-06-29 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package authorize + +import ( + "encoding/json" +) + +// checks if the APIServerDeploymentAuthorizationVersion type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &APIServerDeploymentAuthorizationVersion{} + +// APIServerDeploymentAuthorizationVersion struct for APIServerDeploymentAuthorizationVersion +type APIServerDeploymentAuthorizationVersion struct { + // The UUID of the last deployed policy authorization version. This is present only if custom polcies are enabled and the API service has been deployed at least once. + Id *string `json:"id,omitempty"` +} + +// NewAPIServerDeploymentAuthorizationVersion instantiates a new APIServerDeploymentAuthorizationVersion 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 NewAPIServerDeploymentAuthorizationVersion() *APIServerDeploymentAuthorizationVersion { + this := APIServerDeploymentAuthorizationVersion{} + return &this +} + +// NewAPIServerDeploymentAuthorizationVersionWithDefaults instantiates a new APIServerDeploymentAuthorizationVersion 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 NewAPIServerDeploymentAuthorizationVersionWithDefaults() *APIServerDeploymentAuthorizationVersion { + this := APIServerDeploymentAuthorizationVersion{} + return &this +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *APIServerDeploymentAuthorizationVersion) 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 *APIServerDeploymentAuthorizationVersion) 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 *APIServerDeploymentAuthorizationVersion) 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 *APIServerDeploymentAuthorizationVersion) SetId(v string) { + o.Id = &v +} + +func (o APIServerDeploymentAuthorizationVersion) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o APIServerDeploymentAuthorizationVersion) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Id) { + toSerialize["id"] = o.Id + } + return toSerialize, nil +} + +type NullableAPIServerDeploymentAuthorizationVersion struct { + value *APIServerDeploymentAuthorizationVersion + isSet bool +} + +func (v NullableAPIServerDeploymentAuthorizationVersion) Get() *APIServerDeploymentAuthorizationVersion { + return v.value +} + +func (v *NullableAPIServerDeploymentAuthorizationVersion) Set(val *APIServerDeploymentAuthorizationVersion) { + v.value = val + v.isSet = true +} + +func (v NullableAPIServerDeploymentAuthorizationVersion) IsSet() bool { + return v.isSet +} + +func (v *NullableAPIServerDeploymentAuthorizationVersion) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableAPIServerDeploymentAuthorizationVersion(val *APIServerDeploymentAuthorizationVersion) *NullableAPIServerDeploymentAuthorizationVersion { + return &NullableAPIServerDeploymentAuthorizationVersion{value: val, isSet: true} +} + +func (v NullableAPIServerDeploymentAuthorizationVersion) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableAPIServerDeploymentAuthorizationVersion) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/authorize/model_api_server_deployment_decision_endpoint.go b/authorize/model_api_server_deployment_decision_endpoint.go new file mode 100644 index 00000000..7ff80919 --- /dev/null +++ b/authorize/model_api_server_deployment_decision_endpoint.go @@ -0,0 +1,127 @@ +/* +PingOne Platform API - Authorize + +The PingOne Platform API covering the PingOne Authorize service + +API version: 2023-06-29 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package authorize + +import ( + "encoding/json" +) + +// checks if the APIServerDeploymentDecisionEndpoint type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &APIServerDeploymentDecisionEndpoint{} + +// APIServerDeploymentDecisionEndpoint struct for APIServerDeploymentDecisionEndpoint +type APIServerDeploymentDecisionEndpoint struct { + // The UUID of the decision endpoint. + Id *string `json:"id,omitempty"` +} + +// NewAPIServerDeploymentDecisionEndpoint instantiates a new APIServerDeploymentDecisionEndpoint 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 NewAPIServerDeploymentDecisionEndpoint() *APIServerDeploymentDecisionEndpoint { + this := APIServerDeploymentDecisionEndpoint{} + return &this +} + +// NewAPIServerDeploymentDecisionEndpointWithDefaults instantiates a new APIServerDeploymentDecisionEndpoint 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 NewAPIServerDeploymentDecisionEndpointWithDefaults() *APIServerDeploymentDecisionEndpoint { + this := APIServerDeploymentDecisionEndpoint{} + return &this +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *APIServerDeploymentDecisionEndpoint) 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 *APIServerDeploymentDecisionEndpoint) 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 *APIServerDeploymentDecisionEndpoint) 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 *APIServerDeploymentDecisionEndpoint) SetId(v string) { + o.Id = &v +} + +func (o APIServerDeploymentDecisionEndpoint) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o APIServerDeploymentDecisionEndpoint) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Id) { + toSerialize["id"] = o.Id + } + return toSerialize, nil +} + +type NullableAPIServerDeploymentDecisionEndpoint struct { + value *APIServerDeploymentDecisionEndpoint + isSet bool +} + +func (v NullableAPIServerDeploymentDecisionEndpoint) Get() *APIServerDeploymentDecisionEndpoint { + return v.value +} + +func (v *NullableAPIServerDeploymentDecisionEndpoint) Set(val *APIServerDeploymentDecisionEndpoint) { + v.value = val + v.isSet = true +} + +func (v NullableAPIServerDeploymentDecisionEndpoint) IsSet() bool { + return v.isSet +} + +func (v *NullableAPIServerDeploymentDecisionEndpoint) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableAPIServerDeploymentDecisionEndpoint(val *APIServerDeploymentDecisionEndpoint) *NullableAPIServerDeploymentDecisionEndpoint { + return &NullableAPIServerDeploymentDecisionEndpoint{value: val, isSet: true} +} + +func (v NullableAPIServerDeploymentDecisionEndpoint) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableAPIServerDeploymentDecisionEndpoint) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/authorize/model_api_server_deployment_policy.go b/authorize/model_api_server_deployment_policy.go new file mode 100644 index 00000000..b9e75abc --- /dev/null +++ b/authorize/model_api_server_deployment_policy.go @@ -0,0 +1,127 @@ +/* +PingOne Platform API - Authorize + +The PingOne Platform API covering the PingOne Authorize service + +API version: 2023-06-29 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package authorize + +import ( + "encoding/json" +) + +// checks if the APIServerDeploymentPolicy type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &APIServerDeploymentPolicy{} + +// APIServerDeploymentPolicy struct for APIServerDeploymentPolicy +type APIServerDeploymentPolicy struct { + // The ID of the root policy. + Id *string `json:"id,omitempty"` +} + +// NewAPIServerDeploymentPolicy instantiates a new APIServerDeploymentPolicy 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 NewAPIServerDeploymentPolicy() *APIServerDeploymentPolicy { + this := APIServerDeploymentPolicy{} + return &this +} + +// NewAPIServerDeploymentPolicyWithDefaults instantiates a new APIServerDeploymentPolicy 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 NewAPIServerDeploymentPolicyWithDefaults() *APIServerDeploymentPolicy { + this := APIServerDeploymentPolicy{} + return &this +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *APIServerDeploymentPolicy) 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 *APIServerDeploymentPolicy) 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 *APIServerDeploymentPolicy) 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 *APIServerDeploymentPolicy) SetId(v string) { + o.Id = &v +} + +func (o APIServerDeploymentPolicy) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o APIServerDeploymentPolicy) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Id) { + toSerialize["id"] = o.Id + } + return toSerialize, nil +} + +type NullableAPIServerDeploymentPolicy struct { + value *APIServerDeploymentPolicy + isSet bool +} + +func (v NullableAPIServerDeploymentPolicy) Get() *APIServerDeploymentPolicy { + return v.value +} + +func (v *NullableAPIServerDeploymentPolicy) Set(val *APIServerDeploymentPolicy) { + v.value = val + v.isSet = true +} + +func (v NullableAPIServerDeploymentPolicy) IsSet() bool { + return v.isSet +} + +func (v *NullableAPIServerDeploymentPolicy) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableAPIServerDeploymentPolicy(val *APIServerDeploymentPolicy) *NullableAPIServerDeploymentPolicy { + return &NullableAPIServerDeploymentPolicy{value: val, isSet: true} +} + +func (v NullableAPIServerDeploymentPolicy) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableAPIServerDeploymentPolicy) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/authorize/model_api_server_deployment_status.go b/authorize/model_api_server_deployment_status.go new file mode 100644 index 00000000..5d8cd912 --- /dev/null +++ b/authorize/model_api_server_deployment_status.go @@ -0,0 +1,163 @@ +/* +PingOne Platform API - Authorize + +The PingOne Platform API covering the PingOne Authorize service + +API version: 2023-06-29 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package authorize + +import ( + "encoding/json" +) + +// checks if the APIServerDeploymentStatus type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &APIServerDeploymentStatus{} + +// APIServerDeploymentStatus struct for APIServerDeploymentStatus +type APIServerDeploymentStatus struct { + // The deployment status code. - `POLICIES_CREATE_IN_PROGRESS` The policy bundle for the API service's managed policies is being created. - `DECISION_ENDPOINT_CREATE_IN_PROGRESS` A decision endpoint is being created for the API service. - `DECISION_ENDPOINT_UPDATE_IN_PROGRESS` The API service's decision endpoint is being updated. - `DEPLOYMENT_SUCCESSFUL` The API service's policies have been successfully deployed. - `DEPLOYMENT_FAILED` HAP-MGMT was unable to deploy the API service's policies. - `DEPLOYMENT_UNINITIALIZED` A deployment has not yet been attempted. + Code *string `json:"code,omitempty"` + Error *APIServerDeploymentStatusError `json:"error,omitempty"` +} + +// NewAPIServerDeploymentStatus instantiates a new APIServerDeploymentStatus 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 NewAPIServerDeploymentStatus() *APIServerDeploymentStatus { + this := APIServerDeploymentStatus{} + return &this +} + +// NewAPIServerDeploymentStatusWithDefaults instantiates a new APIServerDeploymentStatus 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 NewAPIServerDeploymentStatusWithDefaults() *APIServerDeploymentStatus { + this := APIServerDeploymentStatus{} + return &this +} + +// GetCode returns the Code field value if set, zero value otherwise. +func (o *APIServerDeploymentStatus) GetCode() string { + if o == nil || IsNil(o.Code) { + var ret string + return ret + } + return *o.Code +} + +// GetCodeOk returns a tuple with the Code field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *APIServerDeploymentStatus) GetCodeOk() (*string, bool) { + if o == nil || IsNil(o.Code) { + return nil, false + } + return o.Code, true +} + +// HasCode returns a boolean if a field has been set. +func (o *APIServerDeploymentStatus) HasCode() bool { + if o != nil && !IsNil(o.Code) { + return true + } + + return false +} + +// SetCode gets a reference to the given string and assigns it to the Code field. +func (o *APIServerDeploymentStatus) SetCode(v string) { + o.Code = &v +} + +// GetError returns the Error field value if set, zero value otherwise. +func (o *APIServerDeploymentStatus) GetError() APIServerDeploymentStatusError { + if o == nil || IsNil(o.Error) { + var ret APIServerDeploymentStatusError + return ret + } + return *o.Error +} + +// GetErrorOk returns a tuple with the Error field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *APIServerDeploymentStatus) GetErrorOk() (*APIServerDeploymentStatusError, bool) { + if o == nil || IsNil(o.Error) { + return nil, false + } + return o.Error, true +} + +// HasError returns a boolean if a field has been set. +func (o *APIServerDeploymentStatus) HasError() bool { + if o != nil && !IsNil(o.Error) { + return true + } + + return false +} + +// SetError gets a reference to the given APIServerDeploymentStatusError and assigns it to the Error field. +func (o *APIServerDeploymentStatus) SetError(v APIServerDeploymentStatusError) { + o.Error = &v +} + +func (o APIServerDeploymentStatus) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o APIServerDeploymentStatus) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Code) { + toSerialize["code"] = o.Code + } + if !IsNil(o.Error) { + toSerialize["error"] = o.Error + } + return toSerialize, nil +} + +type NullableAPIServerDeploymentStatus struct { + value *APIServerDeploymentStatus + isSet bool +} + +func (v NullableAPIServerDeploymentStatus) Get() *APIServerDeploymentStatus { + return v.value +} + +func (v *NullableAPIServerDeploymentStatus) Set(val *APIServerDeploymentStatus) { + v.value = val + v.isSet = true +} + +func (v NullableAPIServerDeploymentStatus) IsSet() bool { + return v.isSet +} + +func (v *NullableAPIServerDeploymentStatus) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableAPIServerDeploymentStatus(val *APIServerDeploymentStatus) *NullableAPIServerDeploymentStatus { + return &NullableAPIServerDeploymentStatus{value: val, isSet: true} +} + +func (v NullableAPIServerDeploymentStatus) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableAPIServerDeploymentStatus) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/authorize/model_api_server_deployment_status_error.go b/authorize/model_api_server_deployment_status_error.go new file mode 100644 index 00000000..fe6a931b --- /dev/null +++ b/authorize/model_api_server_deployment_status_error.go @@ -0,0 +1,201 @@ +/* +PingOne Platform API - Authorize + +The PingOne Platform API covering the PingOne Authorize service + +API version: 2023-06-29 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package authorize + +import ( + "encoding/json" +) + +// checks if the APIServerDeploymentStatusError type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &APIServerDeploymentStatusError{} + +// APIServerDeploymentStatusError Error details returned if the last deployment request failed. +type APIServerDeploymentStatusError struct { + // A unique identifier for the error. + Id *string `json:"id,omitempty"` + // A general fault code that identifies the the type of error. See [Error codes](https://apidocs.pingidentity.com/pingone/platform/v1/api/#error-codes). + Code *string `json:"code,omitempty"` + // A short human-readable description of the error. + Message *string `json:"message,omitempty"` +} + +// NewAPIServerDeploymentStatusError instantiates a new APIServerDeploymentStatusError 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 NewAPIServerDeploymentStatusError() *APIServerDeploymentStatusError { + this := APIServerDeploymentStatusError{} + return &this +} + +// NewAPIServerDeploymentStatusErrorWithDefaults instantiates a new APIServerDeploymentStatusError 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 NewAPIServerDeploymentStatusErrorWithDefaults() *APIServerDeploymentStatusError { + this := APIServerDeploymentStatusError{} + return &this +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *APIServerDeploymentStatusError) 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 *APIServerDeploymentStatusError) 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 *APIServerDeploymentStatusError) 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 *APIServerDeploymentStatusError) SetId(v string) { + o.Id = &v +} + +// GetCode returns the Code field value if set, zero value otherwise. +func (o *APIServerDeploymentStatusError) GetCode() string { + if o == nil || IsNil(o.Code) { + var ret string + return ret + } + return *o.Code +} + +// GetCodeOk returns a tuple with the Code field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *APIServerDeploymentStatusError) GetCodeOk() (*string, bool) { + if o == nil || IsNil(o.Code) { + return nil, false + } + return o.Code, true +} + +// HasCode returns a boolean if a field has been set. +func (o *APIServerDeploymentStatusError) HasCode() bool { + if o != nil && !IsNil(o.Code) { + return true + } + + return false +} + +// SetCode gets a reference to the given string and assigns it to the Code field. +func (o *APIServerDeploymentStatusError) SetCode(v string) { + o.Code = &v +} + +// GetMessage returns the Message field value if set, zero value otherwise. +func (o *APIServerDeploymentStatusError) GetMessage() string { + if o == nil || IsNil(o.Message) { + var ret string + return ret + } + return *o.Message +} + +// GetMessageOk returns a tuple with the Message field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *APIServerDeploymentStatusError) GetMessageOk() (*string, bool) { + if o == nil || IsNil(o.Message) { + return nil, false + } + return o.Message, true +} + +// HasMessage returns a boolean if a field has been set. +func (o *APIServerDeploymentStatusError) HasMessage() bool { + if o != nil && !IsNil(o.Message) { + return true + } + + return false +} + +// SetMessage gets a reference to the given string and assigns it to the Message field. +func (o *APIServerDeploymentStatusError) SetMessage(v string) { + o.Message = &v +} + +func (o APIServerDeploymentStatusError) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o APIServerDeploymentStatusError) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Id) { + toSerialize["id"] = o.Id + } + if !IsNil(o.Code) { + toSerialize["code"] = o.Code + } + if !IsNil(o.Message) { + toSerialize["message"] = o.Message + } + return toSerialize, nil +} + +type NullableAPIServerDeploymentStatusError struct { + value *APIServerDeploymentStatusError + isSet bool +} + +func (v NullableAPIServerDeploymentStatusError) Get() *APIServerDeploymentStatusError { + return v.value +} + +func (v *NullableAPIServerDeploymentStatusError) Set(val *APIServerDeploymentStatusError) { + v.value = val + v.isSet = true +} + +func (v NullableAPIServerDeploymentStatusError) IsSet() bool { + return v.isSet +} + +func (v *NullableAPIServerDeploymentStatusError) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableAPIServerDeploymentStatusError(val *APIServerDeploymentStatusError) *NullableAPIServerDeploymentStatusError { + return &NullableAPIServerDeploymentStatusError{value: val, isSet: true} +} + +func (v NullableAPIServerDeploymentStatusError) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableAPIServerDeploymentStatusError) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + From 056b0a16b5bdc1b50a5f860bfe942c8f811c4a3b Mon Sep 17 00:00:00 2001 From: Patrick Cowland Date: Tue, 4 Jun 2024 19:12:53 +0100 Subject: [PATCH 2/4] add missing client function --- authorize/client.go | 88 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 88 insertions(+) diff --git a/authorize/client.go b/authorize/client.go index da703e82..fa846fb5 100644 --- a/authorize/client.go +++ b/authorize/client.go @@ -23,6 +23,7 @@ import ( "path/filepath" "reflect" "regexp" + "strconv" "strings" "time" ) @@ -537,3 +538,90 @@ func formatErrorMessage(status string, v interface{}) string { // status title (detail) return strings.TrimSpace(fmt.Sprintf("%s %s", status, str)) } + +// parameterAddToHeaderOrQuery adds the provided object to the request header or url query +// supporting deep object syntax +func parameterAddToHeaderOrQuery(headerOrQueryParams interface{}, keyPrefix string, obj interface{}, collectionType string) { + var v = reflect.ValueOf(obj) + var value = "" + if v == reflect.ValueOf(nil) { + value = "null" + } else { + switch v.Kind() { + case reflect.Invalid: + value = "invalid" + + case reflect.Struct: + if t, ok := obj.(MappedNullable); ok { + dataMap, err := t.ToMap() + if err != nil { + return + } + parameterAddToHeaderOrQuery(headerOrQueryParams, keyPrefix, dataMap, collectionType) + return + } + if t, ok := obj.(time.Time); ok { + parameterAddToHeaderOrQuery(headerOrQueryParams, keyPrefix, t.Format(time.RFC3339), collectionType) + return + } + value = v.Type().String() + " value" + case reflect.Slice: + var indValue = reflect.ValueOf(obj) + if indValue == reflect.ValueOf(nil) { + return + } + var lenIndValue = indValue.Len() + for i := 0; i < lenIndValue; i++ { + var arrayValue = indValue.Index(i) + parameterAddToHeaderOrQuery(headerOrQueryParams, keyPrefix, arrayValue.Interface(), collectionType) + } + return + + case reflect.Map: + var indValue = reflect.ValueOf(obj) + if indValue == reflect.ValueOf(nil) { + return + } + iter := indValue.MapRange() + for iter.Next() { + k, v := iter.Key(), iter.Value() + parameterAddToHeaderOrQuery(headerOrQueryParams, fmt.Sprintf("%s[%s]", keyPrefix, k.String()), v.Interface(), collectionType) + } + return + + case reflect.Interface: + fallthrough + case reflect.Ptr: + parameterAddToHeaderOrQuery(headerOrQueryParams, keyPrefix, v.Elem().Interface(), collectionType) + return + + case reflect.Int, reflect.Int8, reflect.Int16, + reflect.Int32, reflect.Int64: + value = strconv.FormatInt(v.Int(), 10) + case reflect.Uint, reflect.Uint8, reflect.Uint16, + reflect.Uint32, reflect.Uint64, reflect.Uintptr: + value = strconv.FormatUint(v.Uint(), 10) + case reflect.Float32, reflect.Float64: + value = strconv.FormatFloat(v.Float(), 'g', -1, 32) + case reflect.Bool: + value = strconv.FormatBool(v.Bool()) + case reflect.String: + value = v.String() + default: + value = v.Type().String() + " value" + } + } + + switch valuesMap := headerOrQueryParams.(type) { + case url.Values: + if collectionType == "csv" && valuesMap.Get(keyPrefix) != "" { + valuesMap.Set(keyPrefix, valuesMap.Get(keyPrefix)+","+value) + } else { + valuesMap.Add(keyPrefix, value) + } + break + case map[string]string: + valuesMap[keyPrefix] = value + break + } +} From b8bb6e18f0274a24c6553aaa151362a1190be15f Mon Sep 17 00:00:00 2001 From: Patrick Cowland Date: Tue, 4 Jun 2024 19:15:33 +0100 Subject: [PATCH 3/4] lint corrections --- authorize/client.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/authorize/client.go b/authorize/client.go index fa846fb5..6a6e0c31 100644 --- a/authorize/client.go +++ b/authorize/client.go @@ -543,7 +543,7 @@ func formatErrorMessage(status string, v interface{}) string { // supporting deep object syntax func parameterAddToHeaderOrQuery(headerOrQueryParams interface{}, keyPrefix string, obj interface{}, collectionType string) { var v = reflect.ValueOf(obj) - var value = "" + value := "" if v == reflect.ValueOf(nil) { value = "null" } else { @@ -619,9 +619,7 @@ func parameterAddToHeaderOrQuery(headerOrQueryParams interface{}, keyPrefix stri } else { valuesMap.Add(keyPrefix, value) } - break case map[string]string: valuesMap[keyPrefix] = value - break } } From 8a6e6520eed1b5c18cd7503874f95197415a91a0 Mon Sep 17 00:00:00 2001 From: Patrick Cowland Date: Tue, 4 Jun 2024 19:19:30 +0100 Subject: [PATCH 4/4] add HAL links to the core model --- authorize/api/openapi.yaml | 7 +++++ authorize/docs/APIServerDeployment.md | 26 +++++++++++++++++ authorize/generate/pingone-authorize.yml | 2 ++ authorize/model_api_server_deployment.go | 36 ++++++++++++++++++++++++ 4 files changed, 71 insertions(+) diff --git a/authorize/api/openapi.yaml b/authorize/api/openapi.yaml index 62f9482d..cd1b26c3 100644 --- a/authorize/api/openapi.yaml +++ b/authorize/api/openapi.yaml @@ -2588,6 +2588,11 @@ components: accessControl: custom: enabled: false + _links: + next: + href: https://openapi-generator.tech + self: + href: https://openapi-generator.tech authorizationVersion: id: id decisionEndpoint: @@ -2602,6 +2607,8 @@ components: id: id message: message properties: + _links: + $ref: '#/components/schemas/LinksHATEOAS' accessControl: $ref: '#/components/schemas/APIServerDeployment_accessControl' authorizationVersion: diff --git a/authorize/docs/APIServerDeployment.md b/authorize/docs/APIServerDeployment.md index 4a250267..975d65f4 100644 --- a/authorize/docs/APIServerDeployment.md +++ b/authorize/docs/APIServerDeployment.md @@ -4,6 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- +**Links** | Pointer to [**LinksHATEOAS**](LinksHATEOAS.md) | | [optional] **AccessControl** | Pointer to [**APIServerDeploymentAccessControl**](APIServerDeploymentAccessControl.md) | | [optional] **AuthorizationVersion** | Pointer to [**APIServerDeploymentAuthorizationVersion**](APIServerDeploymentAuthorizationVersion.md) | | [optional] **DecisionEndpoint** | Pointer to [**APIServerDeploymentDecisionEndpoint**](APIServerDeploymentDecisionEndpoint.md) | | [optional] @@ -30,6 +31,31 @@ NewAPIServerDeploymentWithDefaults instantiates a new APIServerDeployment 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 +### GetLinks + +`func (o *APIServerDeployment) GetLinks() LinksHATEOAS` + +GetLinks returns the Links field if non-nil, zero value otherwise. + +### GetLinksOk + +`func (o *APIServerDeployment) GetLinksOk() (*LinksHATEOAS, bool)` + +GetLinksOk returns a tuple with the Links field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLinks + +`func (o *APIServerDeployment) SetLinks(v LinksHATEOAS)` + +SetLinks sets Links field to given value. + +### HasLinks + +`func (o *APIServerDeployment) HasLinks() bool` + +HasLinks returns a boolean if a field has been set. + ### GetAccessControl `func (o *APIServerDeployment) GetAccessControl() APIServerDeploymentAccessControl` diff --git a/authorize/generate/pingone-authorize.yml b/authorize/generate/pingone-authorize.yml index f01b5ac4..d44935ee 100644 --- a/authorize/generate/pingone-authorize.yml +++ b/authorize/generate/pingone-authorize.yml @@ -126,6 +126,8 @@ components: APIServerDeployment: type: object properties: + '_links': + $ref: '#/components/schemas/LinksHATEOAS' accessControl: type: object properties: diff --git a/authorize/model_api_server_deployment.go b/authorize/model_api_server_deployment.go index 4fc24af6..464b8b68 100644 --- a/authorize/model_api_server_deployment.go +++ b/authorize/model_api_server_deployment.go @@ -20,6 +20,7 @@ var _ MappedNullable = &APIServerDeployment{} // APIServerDeployment struct for APIServerDeployment type APIServerDeployment struct { + Links *LinksHATEOAS `json:"_links,omitempty"` AccessControl *APIServerDeploymentAccessControl `json:"accessControl,omitempty"` AuthorizationVersion *APIServerDeploymentAuthorizationVersion `json:"authorizationVersion,omitempty"` DecisionEndpoint *APIServerDeploymentDecisionEndpoint `json:"decisionEndpoint,omitempty"` @@ -46,6 +47,38 @@ func NewAPIServerDeploymentWithDefaults() *APIServerDeployment { return &this } +// GetLinks returns the Links field value if set, zero value otherwise. +func (o *APIServerDeployment) GetLinks() LinksHATEOAS { + if o == nil || IsNil(o.Links) { + var ret LinksHATEOAS + return ret + } + return *o.Links +} + +// GetLinksOk returns a tuple with the Links field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *APIServerDeployment) GetLinksOk() (*LinksHATEOAS, bool) { + if o == nil || IsNil(o.Links) { + return nil, false + } + return o.Links, true +} + +// HasLinks returns a boolean if a field has been set. +func (o *APIServerDeployment) HasLinks() bool { + if o != nil && !IsNil(o.Links) { + return true + } + + return false +} + +// SetLinks gets a reference to the given LinksHATEOAS and assigns it to the Links field. +func (o *APIServerDeployment) SetLinks(v LinksHATEOAS) { + o.Links = &v +} + // GetAccessControl returns the AccessControl field value if set, zero value otherwise. func (o *APIServerDeployment) GetAccessControl() APIServerDeploymentAccessControl { if o == nil || IsNil(o.AccessControl) { @@ -248,6 +281,9 @@ func (o APIServerDeployment) MarshalJSON() ([]byte, error) { func (o APIServerDeployment) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} + if !IsNil(o.Links) { + toSerialize["_links"] = o.Links + } if !IsNil(o.AccessControl) { toSerialize["accessControl"] = o.AccessControl }