From b49e3fc52b308739593313f19116c012320dafc7 Mon Sep 17 00:00:00 2001 From: michaelkad <45772690+michaelkad@users.noreply.github.com> Date: Tue, 18 Jun 2024 09:46:34 -0500 Subject: [PATCH] Q2 Release 2024 (#413) * Add hostgroups (#326) * Add hostgroups * Fix build * Update swagger client and models to service-broker v1.140.0 (#337) * Generated Swagger client from service-broker commit f482db37dd0b38392de1f3aecdc2219212147830 * Fix build --------- Co-authored-by: michael kad * Update swagger client and models to service-broker v1.140.0 (#336) * Generated Swagger client from service-broker commit 9786c4b2360ad846a1aa8f68f01fbb41979af3c9 * Fix build --------- Co-authored-by: michael kad * Update swagger client and models to service-broker v1.140.0 (#346) * Bump github.com/IBM/go-sdk-core/v5 from 5.15.1 to 5.15.3 Bumps [github.com/IBM/go-sdk-core/v5](https://github.com/IBM/go-sdk-core) from 5.15.1 to 5.15.3. - [Release notes](https://github.com/IBM/go-sdk-core/releases) - [Changelog](https://github.com/IBM/go-sdk-core/blob/main/CHANGELOG.md) - [Commits](https://github.com/IBM/go-sdk-core/compare/v5.15.1...v5.15.3) --- updated-dependencies: - dependency-name: github.com/IBM/go-sdk-core/v5 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] * Fix golangci-lint action v4 requirement Signed-off-by: Yussuf Shaikh * Update golangci-lint version and skip cache Signed-off-by: Yussuf Shaikh * Add branch to dependabot (#338) * Add branch to dependabot * Fix build * Generated Swagger client from service-broker commit 1db48bf5f665abf4e91c66d019aa231b913db3d9 --------- Signed-off-by: dependabot[bot] Signed-off-by: Yussuf Shaikh Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Yussuf Shaikh Co-authored-by: michaelkad <45772690+michaelkad@users.noreply.github.com> * Update swagger client and models to service-broker v1.140.0 (#347) * Bump github.com/IBM/go-sdk-core/v5 from 5.15.1 to 5.15.3 Bumps [github.com/IBM/go-sdk-core/v5](https://github.com/IBM/go-sdk-core) from 5.15.1 to 5.15.3. - [Release notes](https://github.com/IBM/go-sdk-core/releases) - [Changelog](https://github.com/IBM/go-sdk-core/blob/main/CHANGELOG.md) - [Commits](https://github.com/IBM/go-sdk-core/compare/v5.15.1...v5.15.3) --- updated-dependencies: - dependency-name: github.com/IBM/go-sdk-core/v5 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] * Fix golangci-lint action v4 requirement Signed-off-by: Yussuf Shaikh * Update golangci-lint version and skip cache Signed-off-by: Yussuf Shaikh * Add branch to dependabot (#338) * Add branch to dependabot * Fix build * Generated Swagger client from service-broker commit b0bfdfb575c650fd620a92f064c1f7b05d1dd56d --------- Signed-off-by: dependabot[bot] Signed-off-by: Yussuf Shaikh Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Yussuf Shaikh Co-authored-by: michaelkad <45772690+michaelkad@users.noreply.github.com> * Bump github.com/IBM/go-sdk-core/v5 from 5.15.1 to 5.15.3 Bumps [github.com/IBM/go-sdk-core/v5](https://github.com/IBM/go-sdk-core) from 5.15.1 to 5.15.3. - [Release notes](https://github.com/IBM/go-sdk-core/releases) - [Changelog](https://github.com/IBM/go-sdk-core/blob/main/CHANGELOG.md) - [Commits](https://github.com/IBM/go-sdk-core/compare/v5.15.1...v5.15.3) --- updated-dependencies: - dependency-name: github.com/IBM/go-sdk-core/v5 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] * Fix golangci-lint action v4 requirement Signed-off-by: Yussuf Shaikh * Add branch to dependabot (#338) * Add branch to dependabot * Fix build * Bump github.com/stretchr/testify from 1.8.4 to 1.9.0 Bumps [github.com/stretchr/testify](https://github.com/stretchr/testify) from 1.8.4 to 1.9.0. - [Release notes](https://github.com/stretchr/testify/releases) - [Commits](https://github.com/stretchr/testify/compare/v1.8.4...v1.9.0) --- updated-dependencies: - dependency-name: github.com/stretchr/testify dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] * Bump github.com/IBM/platform-services-go-sdk from 0.59.1 to 0.60.0 Bumps [github.com/IBM/platform-services-go-sdk](https://github.com/IBM/platform-services-go-sdk) from 0.59.1 to 0.60.0. - [Release notes](https://github.com/IBM/platform-services-go-sdk/releases) - [Changelog](https://github.com/IBM/platform-services-go-sdk/blob/main/CHANGELOG.md) - [Commits](https://github.com/IBM/platform-services-go-sdk/compare/v0.59.1...v0.60.0) --- updated-dependencies: - dependency-name: github.com/IBM/platform-services-go-sdk dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] * Add Removal of Create VPN (#315) Adding back vpn create removal * Revert "Enable shared-processor-pool functionality on stratos" (#354) This reverts commit d32d15616555c890d73c99bbfcb564d1ef2b0ad9. * Remove duplicate go setup step (#348) * Bump github.com/IBM/go-sdk-core/v5 from 5.15.1 to 5.15.3 Bumps [github.com/IBM/go-sdk-core/v5](https://github.com/IBM/go-sdk-core) from 5.15.1 to 5.15.3. - [Release notes](https://github.com/IBM/go-sdk-core/releases) - [Changelog](https://github.com/IBM/go-sdk-core/blob/main/CHANGELOG.md) - [Commits](https://github.com/IBM/go-sdk-core/compare/v5.15.1...v5.15.3) --- updated-dependencies: - dependency-name: github.com/IBM/go-sdk-core/v5 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] * Fix golangci-lint action v4 requirement Signed-off-by: Yussuf Shaikh * Bump github.com/IBM/platform-services-go-sdk from 0.56.4 to 0.57.0 Bumps [github.com/IBM/platform-services-go-sdk](https://github.com/IBM/platform-services-go-sdk) from 0.56.4 to 0.57.0. - [Release notes](https://github.com/IBM/platform-services-go-sdk/releases) - [Changelog](https://github.com/IBM/platform-services-go-sdk/blob/main/CHANGELOG.md) - [Commits](https://github.com/IBM/platform-services-go-sdk/compare/v0.56.4...v0.57.0) --- updated-dependencies: - dependency-name: github.com/IBM/platform-services-go-sdk dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] * Bump github.com/IBM/platform-services-go-sdk from 0.57.0 to 0.58.0 Bumps [github.com/IBM/platform-services-go-sdk](https://github.com/IBM/platform-services-go-sdk) from 0.57.0 to 0.58.0. - [Release notes](https://github.com/IBM/platform-services-go-sdk/releases) - [Changelog](https://github.com/IBM/platform-services-go-sdk/blob/main/CHANGELOG.md) - [Commits](https://github.com/IBM/platform-services-go-sdk/compare/v0.57.0...v0.58.0) --- updated-dependencies: - dependency-name: github.com/IBM/platform-services-go-sdk dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] * Bump github.com/IBM/platform-services-go-sdk from 0.58.0 to 0.59.0 Bumps [github.com/IBM/platform-services-go-sdk](https://github.com/IBM/platform-services-go-sdk) from 0.58.0 to 0.59.0. - [Release notes](https://github.com/IBM/platform-services-go-sdk/releases) - [Changelog](https://github.com/IBM/platform-services-go-sdk/blob/main/CHANGELOG.md) - [Commits](https://github.com/IBM/platform-services-go-sdk/compare/v0.58.0...v0.59.0) --- updated-dependencies: - dependency-name: github.com/IBM/platform-services-go-sdk dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] * Bump github.com/IBM/platform-services-go-sdk from 0.59.0 to 0.59.1 Bumps [github.com/IBM/platform-services-go-sdk](https://github.com/IBM/platform-services-go-sdk) from 0.59.0 to 0.59.1. - [Release notes](https://github.com/IBM/platform-services-go-sdk/releases) - [Changelog](https://github.com/IBM/platform-services-go-sdk/blob/main/CHANGELOG.md) - [Commits](https://github.com/IBM/platform-services-go-sdk/compare/v0.59.0...v0.59.1) --- updated-dependencies: - dependency-name: github.com/IBM/platform-services-go-sdk dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] * Bump github.com/IBM/go-sdk-core/v5 from 5.15.1 to 5.15.3 Bumps [github.com/IBM/go-sdk-core/v5](https://github.com/IBM/go-sdk-core) from 5.15.1 to 5.15.3. - [Release notes](https://github.com/IBM/go-sdk-core/releases) - [Changelog](https://github.com/IBM/go-sdk-core/blob/main/CHANGELOG.md) - [Commits](https://github.com/IBM/go-sdk-core/compare/v5.15.1...v5.15.3) --- updated-dependencies: - dependency-name: github.com/IBM/go-sdk-core/v5 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] * Bump github.com/stretchr/testify from 1.8.4 to 1.9.0 Bumps [github.com/stretchr/testify](https://github.com/stretchr/testify) from 1.8.4 to 1.9.0. - [Release notes](https://github.com/stretchr/testify/releases) - [Commits](https://github.com/stretchr/testify/compare/v1.8.4...v1.9.0) --- updated-dependencies: - dependency-name: github.com/stretchr/testify dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] * Bump github.com/IBM/platform-services-go-sdk from 0.59.1 to 0.60.0 Bumps [github.com/IBM/platform-services-go-sdk](https://github.com/IBM/platform-services-go-sdk) from 0.59.1 to 0.60.0. - [Release notes](https://github.com/IBM/platform-services-go-sdk/releases) - [Changelog](https://github.com/IBM/platform-services-go-sdk/blob/main/CHANGELOG.md) - [Commits](https://github.com/IBM/platform-services-go-sdk/compare/v0.59.1...v0.60.0) --- updated-dependencies: - dependency-name: github.com/IBM/platform-services-go-sdk dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] * Bump github.com/IBM/go-sdk-core/v5 from 5.15.1 to 5.15.3 Bumps [github.com/IBM/go-sdk-core/v5](https://github.com/IBM/go-sdk-core) from 5.15.1 to 5.15.3. - [Release notes](https://github.com/IBM/go-sdk-core/releases) - [Changelog](https://github.com/IBM/go-sdk-core/blob/main/CHANGELOG.md) - [Commits](https://github.com/IBM/go-sdk-core/compare/v5.15.1...v5.15.3) --- updated-dependencies: - dependency-name: github.com/IBM/go-sdk-core/v5 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] * Fix golangci-lint action v4 requirement Signed-off-by: Yussuf Shaikh * Add branch to dependabot (#338) * Add branch to dependabot * Fix build * Remove duplicate go setup step (#348) * Update swagger client and models to service-broker v1.140.0 (#337) * Generated Swagger client from service-broker commit f482db37dd0b38392de1f3aecdc2219212147830 * Fix build --------- Co-authored-by: michael kad * Update swagger client and models to service-broker v1.140.0 (#346) * Bump github.com/IBM/go-sdk-core/v5 from 5.15.1 to 5.15.3 Bumps [github.com/IBM/go-sdk-core/v5](https://github.com/IBM/go-sdk-core) from 5.15.1 to 5.15.3. - [Release notes](https://github.com/IBM/go-sdk-core/releases) - [Changelog](https://github.com/IBM/go-sdk-core/blob/main/CHANGELOG.md) - [Commits](https://github.com/IBM/go-sdk-core/compare/v5.15.1...v5.15.3) --- updated-dependencies: - dependency-name: github.com/IBM/go-sdk-core/v5 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] * Fix golangci-lint action v4 requirement Signed-off-by: Yussuf Shaikh * Update golangci-lint version and skip cache Signed-off-by: Yussuf Shaikh * Add branch to dependabot (#338) * Add branch to dependabot * Fix build * Generated Swagger client from service-broker commit 1db48bf5f665abf4e91c66d019aa231b913db3d9 --------- Signed-off-by: dependabot[bot] Signed-off-by: Yussuf Shaikh Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Yussuf Shaikh Co-authored-by: michaelkad <45772690+michaelkad@users.noreply.github.com> * Bump github.com/IBM/go-sdk-core/v5 from 5.15.1 to 5.15.3 Bumps [github.com/IBM/go-sdk-core/v5](https://github.com/IBM/go-sdk-core) from 5.15.1 to 5.15.3. - [Release notes](https://github.com/IBM/go-sdk-core/releases) - [Changelog](https://github.com/IBM/go-sdk-core/blob/main/CHANGELOG.md) - [Commits](https://github.com/IBM/go-sdk-core/compare/v5.15.1...v5.15.3) --- updated-dependencies: - dependency-name: github.com/IBM/go-sdk-core/v5 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] * Add branch to dependabot (#338) * Add branch to dependabot * Fix build * Bump github.com/IBM/go-sdk-core/v5 from 5.15.1 to 5.15.3 Bumps [github.com/IBM/go-sdk-core/v5](https://github.com/IBM/go-sdk-core) from 5.15.1 to 5.15.3. - [Release notes](https://github.com/IBM/go-sdk-core/releases) - [Changelog](https://github.com/IBM/go-sdk-core/blob/main/CHANGELOG.md) - [Commits](https://github.com/IBM/go-sdk-core/compare/v5.15.1...v5.15.3) --- updated-dependencies: - dependency-name: github.com/IBM/go-sdk-core/v5 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] * Add hostgroups (#326) * Add hostgroups * Fix build * Update swagger client and models to service-broker v1.140.0 (#337) * Generated Swagger client from service-broker commit f482db37dd0b38392de1f3aecdc2219212147830 * Fix build --------- Co-authored-by: michael kad * Update swagger client and models to service-broker v1.140.0 (#346) * Bump github.com/IBM/go-sdk-core/v5 from 5.15.1 to 5.15.3 Bumps [github.com/IBM/go-sdk-core/v5](https://github.com/IBM/go-sdk-core) from 5.15.1 to 5.15.3. - [Release notes](https://github.com/IBM/go-sdk-core/releases) - [Changelog](https://github.com/IBM/go-sdk-core/blob/main/CHANGELOG.md) - [Commits](https://github.com/IBM/go-sdk-core/compare/v5.15.1...v5.15.3) --- updated-dependencies: - dependency-name: github.com/IBM/go-sdk-core/v5 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] * Fix golangci-lint action v4 requirement Signed-off-by: Yussuf Shaikh * Update golangci-lint version and skip cache Signed-off-by: Yussuf Shaikh * Add branch to dependabot (#338) * Add branch to dependabot * Fix build * Generated Swagger client from service-broker commit 1db48bf5f665abf4e91c66d019aa231b913db3d9 --------- Signed-off-by: dependabot[bot] Signed-off-by: Yussuf Shaikh Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Yussuf Shaikh Co-authored-by: michaelkad <45772690+michaelkad@users.noreply.github.com> * Update swagger client and models to service-broker v1.140.0 (#347) * Bump github.com/IBM/go-sdk-core/v5 from 5.15.1 to 5.15.3 Bumps [github.com/IBM/go-sdk-core/v5](https://github.com/IBM/go-sdk-core) from 5.15.1 to 5.15.3. - [Release notes](https://github.com/IBM/go-sdk-core/releases) - [Changelog](https://github.com/IBM/go-sdk-core/blob/main/CHANGELOG.md) - [Commits](https://github.com/IBM/go-sdk-core/compare/v5.15.1...v5.15.3) --- updated-dependencies: - dependency-name: github.com/IBM/go-sdk-core/v5 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] * Fix golangci-lint action v4 requirement Signed-off-by: Yussuf Shaikh * Update golangci-lint version and skip cache Signed-off-by: Yussuf Shaikh * Add branch to dependabot (#338) * Add branch to dependabot * Fix build * Generated Swagger client from service-broker commit b0bfdfb575c650fd620a92f064c1f7b05d1dd56d --------- Signed-off-by: dependabot[bot] Signed-off-by: Yussuf Shaikh Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Yussuf Shaikh Co-authored-by: michaelkad <45772690+michaelkad@users.noreply.github.com> * Bump github.com/IBM/go-sdk-core/v5 from 5.15.1 to 5.15.3 Bumps [github.com/IBM/go-sdk-core/v5](https://github.com/IBM/go-sdk-core) from 5.15.1 to 5.15.3. - [Release notes](https://github.com/IBM/go-sdk-core/releases) - [Changelog](https://github.com/IBM/go-sdk-core/blob/main/CHANGELOG.md) - [Commits](https://github.com/IBM/go-sdk-core/compare/v5.15.1...v5.15.3) --- updated-dependencies: - dependency-name: github.com/IBM/go-sdk-core/v5 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] * Fix golangci-lint action v4 requirement Signed-off-by: Yussuf Shaikh * Add branch to dependabot (#338) * Add branch to dependabot * Fix build * Remove duplicate go setup step (#348) * Bump github.com/IBM/go-sdk-core/v5 from 5.15.1 to 5.15.3 Bumps [github.com/IBM/go-sdk-core/v5](https://github.com/IBM/go-sdk-core) from 5.15.1 to 5.15.3. - [Release notes](https://github.com/IBM/go-sdk-core/releases) - [Changelog](https://github.com/IBM/go-sdk-core/blob/main/CHANGELOG.md) - [Commits](https://github.com/IBM/go-sdk-core/compare/v5.15.1...v5.15.3) --- updated-dependencies: - dependency-name: github.com/IBM/go-sdk-core/v5 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] * Fix golangci-lint action v4 requirement Signed-off-by: Yussuf Shaikh * Fix golangci-lint action v4 requirement Signed-off-by: Yussuf Shaikh * Add branch to dependabot (#338) * Add branch to dependabot * Fix build * Update swagger client and models to service-broker v1.140.0 (#337) * Generated Swagger client from service-broker commit f482db37dd0b38392de1f3aecdc2219212147830 * Fix build --------- Co-authored-by: michael kad * Update swagger client and models to service-broker v1.140.0 (#346) * Bump github.com/IBM/go-sdk-core/v5 from 5.15.1 to 5.15.3 Bumps [github.com/IBM/go-sdk-core/v5](https://github.com/IBM/go-sdk-core) from 5.15.1 to 5.15.3. - [Release notes](https://github.com/IBM/go-sdk-core/releases) - [Changelog](https://github.com/IBM/go-sdk-core/blob/main/CHANGELOG.md) - [Commits](https://github.com/IBM/go-sdk-core/compare/v5.15.1...v5.15.3) --- updated-dependencies: - dependency-name: github.com/IBM/go-sdk-core/v5 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] * Fix golangci-lint action v4 requirement Signed-off-by: Yussuf Shaikh * Update golangci-lint version and skip cache Signed-off-by: Yussuf Shaikh * Add branch to dependabot (#338) * Add branch to dependabot * Fix build * Generated Swagger client from service-broker commit 1db48bf5f665abf4e91c66d019aa231b913db3d9 --------- Signed-off-by: dependabot[bot] Signed-off-by: Yussuf Shaikh Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Yussuf Shaikh Co-authored-by: michaelkad <45772690+michaelkad@users.noreply.github.com> * Bump github.com/IBM/go-sdk-core/v5 from 5.15.1 to 5.15.3 Bumps [github.com/IBM/go-sdk-core/v5](https://github.com/IBM/go-sdk-core) from 5.15.1 to 5.15.3. - [Release notes](https://github.com/IBM/go-sdk-core/releases) - [Changelog](https://github.com/IBM/go-sdk-core/blob/main/CHANGELOG.md) - [Commits](https://github.com/IBM/go-sdk-core/compare/v5.15.1...v5.15.3) --- updated-dependencies: - dependency-name: github.com/IBM/go-sdk-core/v5 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] * Add branch to dependabot (#338) * Add branch to dependabot * Fix build * Bump github.com/IBM/go-sdk-core/v5 from 5.15.1 to 5.15.3 Bumps [github.com/IBM/go-sdk-core/v5](https://github.com/IBM/go-sdk-core) from 5.15.1 to 5.15.3. - [Release notes](https://github.com/IBM/go-sdk-core/releases) - [Changelog](https://github.com/IBM/go-sdk-core/blob/main/CHANGELOG.md) - [Commits](https://github.com/IBM/go-sdk-core/compare/v5.15.1...v5.15.3) --- updated-dependencies: - dependency-name: github.com/IBM/go-sdk-core/v5 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] * Generated Swagger client from service-broker commit 0fecb85e68db0dcc5ddf2eb1072b39d45e2fef86 (#356) * Generated Swagger client from service-broker commit a74a353d92fbe6cfeb2421df47b52c5cc0e9d689 * Generated Swagger client from service-broker commit e98a290ebdfbe53e5fec9ff5100a299bc77a6014 * Generated Swagger client from service-broker commit a9e6e612e2556e1c67678aebe155d22089a75639 * Generated Swagger client from service-broker commit 70b0722398f5a64ea1e7bf1fbd07c6b3e7f8c9fc (#360) * Generated Swagger client from service-broker commit 8ea7617cec1e857b8597b60c4db288df066295f8 (#363) * Generated Swagger client from service-broker commit 384961399c43e0ea945615662e92396491168189 (#362) * Update Hostgroup client and add stratos validation (#361) * Update Hostgroup client and add stratos validation * Update name to hostGroup pattern * Rename file * Generated Swagger client from service-broker commit 125c585619c1c406c466dfae897cc2bff5faf797 (#364) * Generated Swagger client from service-broker commit 6238c39937d5f7a63f07fba4fd83d5d18e18752b (#365) * Refactor host group name (#367) * Generated Swagger client from service-broker commit 4c221d25789a0cbf90427cfb5e22509532cf4265 (#366) * Generated Swagger client from service-broker commit 1efc6f47450f757d13cf5813a45212ed381b2b8d (#368) * Generated Swagger client from service-broker commit f627067b7cfb1a503a8fe46e15715957137676f5 (#370) * Generated Swagger client from service-broker commit e43ad9dd41dd11d0210c10b8ffa0104e1b74afd0 (#371) * [IBMPIHostGroupsClient]Fix typo (#369) * Refactor host group name * Fix typo * sync branch * Add checksum gates for powervs (#372) * Generated Swagger client from service-broker commit 0562d1c6f66295c4ee5c4df5179dd6b2b41c0097 (#373) * Generated Swagger client from service-broker commit c4cb98d889ffe37cd2324735bfc86efe4e1fdbb6 (#374) * Generated Swagger client from service-broker commit 8f5f60718bab6db63d05bacb4fb30550762b50eb (#375) * Generated Swagger client from service-broker commit b9bc7ab551a37f4cd3546c19757fe74b6eee179f (#380) * Fix error in host-group example (#376) There appeared to be a typo in the client definition preventing the example from compiling. * Add deploymentTarget safeguard for Stratos (#378) * Add deploymentTarget safeguard This option is only available off-prem where dedicated host commands are supported. * Remove IBMi safeguard for stratos * Update instance create safeguard * Update spp safeguards for stratos (#379) * Update spp safeguards for stratos SPP commands will be supported for Q2 for stratos, but not the dedicated host-id option. * Update host-id error message * Generated Swagger client from service-broker commit 2a7c3111d7d5c55678486f3cab44f3437796762c (#381) WorkspacePowerEdgeRouterDetails state addition * Bump golang.org/x/net from 0.20.0 to 0.23.0 (#384) Bumps [golang.org/x/net](https://github.com/golang/net) from 0.20.0 to 0.23.0. - [Commits](https://github.com/golang/net/compare/v0.20.0...v0.23.0) --- updated-dependencies: - dependency-name: golang.org/x/net dependency-type: indirect ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Generated Swagger client from service-broker commit a76fd7fb2c0026fa0c68c2a52417f395f801dd46 (#386) * Generated Swagger client from service-broker commit bfe8b85d361707cf82c025266813ecb7889a556c (#388) * Bump golangci/golangci-lint-action from 4 to 5 Bumps [golangci/golangci-lint-action](https://github.com/golangci/golangci-lint-action) from 4 to 5. - [Release notes](https://github.com/golangci/golangci-lint-action/releases) - [Commits](https://github.com/golangci/golangci-lint-action/compare/v4...v5) --- updated-dependencies: - dependency-name: golangci/golangci-lint-action dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] (cherry picked from commit 2c275e78e830dc1584c26ee62271b3be8e71a3ee) * Bump golangci/golangci-lint-action from 4 to 5 Bumps [golangci/golangci-lint-action](https://github.com/golangci/golangci-lint-action) from 4 to 5. - [Release notes](https://github.com/golangci/golangci-lint-action/releases) - [Commits](https://github.com/golangci/golangci-lint-action/compare/v4...v5) --- updated-dependencies: - dependency-name: golangci/golangci-lint-action dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] (cherry picked from commit 2c275e78e830dc1584c26ee62271b3be8e71a3ee) * Generated Swagger client from service-broker commit a433c612326d695146ca7953d6aef37ac709618f (#389) * Generated Swagger client from service-broker commit 6f9b593c228169c62a3b446bfc480cab28b91ed2 (#390) * Generated Swagger client from service-broker commit a08ee4720fe9268263f8c3bee59330454b619109 (#392) * Generated Swagger client from service-broker commit bd9c5c4d29bd093067dd82a8dce8e5b746a0284b (#394) * Update to go 1.22 * Generated Swagger client from service-broker commit 1a54ea3efa13779bf08f2c162677acdd026001c9 (#399) * Update to go 1.22 (#396) * Generated Swagger client from service-broker commit f43b28fb6f66ffdf7aa6499f4dc09619d22feeda (#401) * Generated Swagger client from service-broker commit 814f6cac25d7b8aef6e71aa89b6ba9ebecbfff9e (#402) * Generated Swagger client from service-broker commit d82c42a9b20ab1dcd2188c89e0b0a3c8ea8db1ff (#403) * Generated Swagger client from service-broker commit ad5b24d0dca3b490cb45eadc0284d9bbcfbcea4e (#404) * Generated Swagger client from service-broker commit 5fa65c3c11cd0c1479d3c3e135aa62c79cfd84bf (#405) * Generated Swagger client from service-broker commit c455f6094ce91e25678e3fe9575767c3122cf837 (#406) * Generated Swagger client from service-broker commit f19df27ca2e676ba6cb9f5e73036f4536d5c050c (#407) * Generated Swagger client from service-broker commit f856adaa7760209889781f329a122db016cc5587 (#408) * Generated Swagger client from service-broker commit b7a20105660b86a198fa90be0e47093ac3ff9a5d (#409) --------- Signed-off-by: dependabot[bot] Signed-off-by: Yussuf Shaikh Co-authored-by: powervs-ibm <137309855+powervs-ibm@users.noreply.github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Yussuf Shaikh Co-authored-by: ismirlia <90468712+ismirlia@users.noreply.github.com> Co-authored-by: powervs-ibm --- .github/workflows/go.yml | 4 +- clients/instance/ibm-pi-host-groups.go | 193 ++++++ clients/instance/ibm-pi-image.go | 8 + clients/instance/ibm-pi-instance.go | 8 +- .../instance/ibm-pi-shared-processor-pool.go | 17 +- examples/host-groups/main.go | 62 ++ go.mod | 10 +- go.sum | 54 +- .../authentication/authentication_client.go | 28 +- .../service_broker_auth_callback_responses.go | 37 +- ..._broker_auth_device_code_post_responses.go | 37 +- ...broker_auth_device_token_post_responses.go | 43 +- ...ervice_broker_auth_info_token_responses.go | 37 +- ...service_broker_auth_info_user_responses.go | 37 +- .../service_broker_auth_login_responses.go | 37 +- .../service_broker_auth_logout_responses.go | 37 +- ...er_auth_registration_callback_responses.go | 37 +- ...vice_broker_auth_registration_responses.go | 37 +- ...ervice_broker_auth_token_post_responses.go | 43 +- .../bluemix_service_instance_get_responses.go | 31 +- .../bluemix_service_instance_put_responses.go | 31 +- .../bluemix_service_instances_client.go | 28 +- power/client/catalog/catalog_client.go | 28 +- power/client/catalog/catalog_get_responses.go | 31 +- .../client/datacenters/datacenters_client.go | 28 +- .../v1_datacenters_get_responses.go | 31 +- .../v1_datacenters_getall_responses.go | 31 +- .../hardware_platforms_client.go | 28 +- ..._broker_hardwareplatforms_get_responses.go | 37 +- .../host_groups_client.go} | 110 +-- .../v1_available_hosts_parameters.go | 2 +- .../v1_available_hosts_responses.go | 39 +- .../v1_host_groups_get_parameters.go | 128 ++++ .../v1_host_groups_get_responses.go | 484 +++++++++++++ .../v1_host_groups_id_get_parameters.go | 151 +++++ .../v1_host_groups_id_get_responses.go | 562 +++++++++++++++ .../v1_host_groups_id_put_parameters.go | 175 +++++ .../v1_host_groups_id_put_responses.go | 638 ++++++++++++++++++ .../v1_host_groups_post_parameters.go | 153 +++++ .../v1_host_groups_post_responses.go | 638 ++++++++++++++++++ .../v1_hosts_get_parameters.go | 2 +- .../v1_hosts_get_responses.go | 39 +- .../v1_hosts_id_delete_parameters.go | 2 +- .../v1_hosts_id_delete_responses.go | 45 +- .../v1_hosts_id_get_parameters.go | 2 +- .../v1_hosts_id_get_responses.go | 45 +- .../v1_hosts_id_put_parameters.go | 2 +- .../v1_hosts_id_put_responses.go | 51 +- .../v1_hosts_post_parameters.go | 4 +- .../v1_hosts_post_responses.go | 53 +- .../v1_hostgroups_get_parameters.go | 128 ---- .../hostgroups/v1_hostgroups_get_responses.go | 471 ------------- .../v1_hostgroups_id_get_parameters.go | 151 ----- .../v1_hostgroups_id_get_responses.go | 547 --------------- .../v1_hostgroups_id_put_parameters.go | 175 ----- .../v1_hostgroups_id_put_responses.go | 621 ----------------- .../v1_hostgroups_post_parameters.go | 153 ----- .../v1_hostgroups_post_responses.go | 621 ----------------- .../iaas_service_broker_client.go | 28 +- .../service_broker_health_head_responses.go | 31 +- .../service_broker_health_responses.go | 31 +- .../service_broker_test_timeout_responses.go | 31 +- .../service_broker_version_responses.go | 31 +- .../internal_powervs_instances_client.go | 28 +- ...rnal_v1_powervs_instances_get_responses.go | 19 +- .../internal_powervs_locations_client.go | 28 +- ...owervs_locations_activate_put_responses.go | 31 +- ..._powervs_locations_tag_delete_responses.go | 29 +- ...v1_powervs_locations_tag_post_responses.go | 29 +- ..._locations_transitgateway_get_responses.go | 19 +- .../internal_storage_regions_client.go | 28 +- ...age_regions_storage_pools_get_responses.go | 31 +- ..._regions_storage_pools_getall_responses.go | 31 +- ...age_regions_storage_pools_put_responses.go | 37 +- ...torage_regions_thresholds_get_responses.go | 31 +- ...torage_regions_thresholds_put_responses.go | 43 +- .../internal_transit_gateway_client.go | 28 +- ...nternal_v1_transitgateway_get_responses.go | 13 +- .../client/open_stacks/open_stacks_client.go | 28 +- ...service_broker_openstacks_get_responses.go | 37 +- ...e_broker_openstacks_hosts_get_responses.go | 25 +- ...oker_openstacks_openstack_get_responses.go | 37 +- ...ervice_broker_openstacks_post_responses.go | 55 +- ...broker_openstacks_servers_get_responses.go | 37 +- .../p_cloud_cloud_connections_client.go | 28 +- ...cloud_cloudconnections_delete_responses.go | 55 +- .../pcloud_cloudconnections_get_responses.go | 43 +- ...cloud_cloudconnections_getall_responses.go | 43 +- ...udconnections_networks_delete_responses.go | 55 +- ...cloudconnections_networks_put_responses.go | 55 +- .../pcloud_cloudconnections_post_responses.go | 79 ++- .../pcloud_cloudconnections_put_responses.go | 73 +- ...s_virtualprivateclouds_getall_responses.go | 55 +- .../p_cloud_disaster_recovery_client.go | 28 +- ...ocations_disasterrecovery_get_responses.go | 37 +- ...tions_disasterrecovery_getall_responses.go | 37 +- .../p_cloud_events/p_cloud_events_client.go | 28 +- .../pcloud_events_get_responses.go | 37 +- .../pcloud_events_getquery_responses.go | 37 +- .../p_cloud_images/p_cloud_images_client.go | 28 +- ..._cloudinstances_images_delete_responses.go | 43 +- ...dinstances_images_export_post_responses.go | 43 +- ...oud_cloudinstances_images_get_responses.go | 37 +- ..._cloudinstances_images_getall_responses.go | 37 +- ...ud_cloudinstances_images_post_responses.go | 55 +- ...loudinstances_stockimages_get_responses.go | 37 +- ...dinstances_stockimages_getall_responses.go | 37 +- .../pcloud_images_get_responses.go | 37 +- .../pcloud_images_getall_responses.go | 37 +- ..._cloudinstances_cosimages_get_responses.go | 37 +- ...cloudinstances_cosimages_post_responses.go | 49 +- .../pcloud_v2_images_export_get_responses.go | 37 +- .../pcloud_v2_images_export_post_responses.go | 51 +- .../p_cloud_instances_client.go | 28 +- .../pcloud_cloudinstances_delete_responses.go | 43 +- .../pcloud_cloudinstances_get_responses.go | 37 +- .../pcloud_cloudinstances_put_responses.go | 43 +- .../p_cloud_jobs/p_cloud_jobs_client.go | 28 +- ...ud_cloudinstances_jobs_delete_responses.go | 43 +- ...cloud_cloudinstances_jobs_get_responses.go | 37 +- ...ud_cloudinstances_jobs_getall_responses.go | 37 +- .../p_cloud_networks_client.go | 28 +- .../pcloud_networks_delete_responses.go | 43 +- .../pcloud_networks_get_responses.go | 37 +- .../pcloud_networks_getall_responses.go | 37 +- .../pcloud_networks_ports_delete_responses.go | 43 +- .../pcloud_networks_ports_get_responses.go | 37 +- .../pcloud_networks_ports_getall_responses.go | 37 +- .../pcloud_networks_ports_post_responses.go | 49 +- .../pcloud_networks_ports_put_responses.go | 43 +- .../pcloud_networks_post_responses.go | 61 +- .../pcloud_networks_put_responses.go | 43 +- .../p_cloudp_vm_instances_client.go | 32 +- ...loud_pvminstances_action_post_responses.go | 43 +- ...oud_pvminstances_capture_post_responses.go | 49 +- ...cloud_pvminstances_clone_post_responses.go | 49 +- ...loud_pvminstances_console_get_responses.go | 37 +- ...oud_pvminstances_console_post_responses.go | 43 +- ...loud_pvminstances_console_put_responses.go | 37 +- .../pcloud_pvminstances_delete_responses.go | 43 +- .../pcloud_pvminstances_get_responses.go | 37 +- .../pcloud_pvminstances_getall_responses.go | 43 +- ..._pvminstances_networks_delete_responses.go | 43 +- ...oud_pvminstances_networks_get_responses.go | 37 +- ..._pvminstances_networks_getall_responses.go | 37 +- ...ud_pvminstances_networks_post_responses.go | 49 +- ..._pvminstances_operations_post_responses.go | 43 +- .../pcloud_pvminstances_post_responses.go | 67 +- .../pcloud_pvminstances_put_responses.go | 43 +- ...pvminstances_snapshots_getall_responses.go | 37 +- ...d_pvminstances_snapshots_post_responses.go | 49 +- ...tances_snapshots_restore_post_responses.go | 43 +- ...d_v2_pvminstances_capture_get_responses.go | 37 +- ..._v2_pvminstances_capture_post_responses.go | 49 +- ...pcloud_v2_pvminstances_getall_responses.go | 43 +- .../p_cloud_placement_groups_client.go | 28 +- ...pcloud_placementgroups_delete_responses.go | 37 +- .../pcloud_placementgroups_get_responses.go | 37 +- ...pcloud_placementgroups_getall_responses.go | 37 +- ...lacementgroups_members_delete_responses.go | 49 +- ..._placementgroups_members_post_responses.go | 49 +- .../pcloud_placementgroups_post_responses.go | 49 +- .../p_cloud_pod_capacity_client.go | 30 +- .../pcloud_podcapacity_get_responses.go | 37 +- .../client/p_cloud_s_a_p/p_cloudsap_client.go | 28 +- .../p_cloud_s_a_p/pcloud_sap_get_responses.go | 37 +- .../pcloud_sap_getall_responses.go | 37 +- .../pcloud_sap_post_responses.go | 61 +- .../p_cloudspp_placement_groups_client.go | 28 +- ...oud_sppplacementgroups_delete_responses.go | 43 +- ...pcloud_sppplacementgroups_get_responses.go | 37 +- ...oud_sppplacementgroups_getall_responses.go | 37 +- ...lacementgroups_members_delete_responses.go | 43 +- ...pplacementgroups_members_post_responses.go | 49 +- ...cloud_sppplacementgroups_post_responses.go | 49 +- .../p_cloud_servicedhcp_client.go | 28 +- .../pcloud_dhcp_delete_responses.go | 31 +- .../pcloud_dhcp_get_responses.go | 37 +- .../pcloud_dhcp_getall_responses.go | 37 +- .../pcloud_dhcp_post_responses.go | 37 +- .../p_cloud_shared_processor_pools_client.go | 28 +- ...d_sharedprocessorpools_delete_responses.go | 43 +- ...loud_sharedprocessorpools_get_responses.go | 37 +- ...d_sharedprocessorpools_getall_responses.go | 37 +- ...oud_sharedprocessorpools_post_responses.go | 49 +- ...loud_sharedprocessorpools_put_responses.go | 37 +- .../p_cloud_snapshots_client.go | 28 +- ...oudinstances_snapshots_delete_responses.go | 43 +- ..._cloudinstances_snapshots_get_responses.go | 37 +- ...oudinstances_snapshots_getall_responses.go | 37 +- ..._cloudinstances_snapshots_put_responses.go | 37 +- .../p_cloud_storage_capacity_client.go | 28 +- ...oud_storagecapacity_pools_get_responses.go | 37 +- ..._storagecapacity_pools_getall_responses.go | 37 +- ...oud_storagecapacity_types_get_responses.go | 37 +- ..._storagecapacity_types_getall_responses.go | 37 +- .../p_cloud_storage_tiers_client.go | 28 +- ...instances_storagetiers_getall_responses.go | 37 +- .../p_cloud_system_pools_client.go | 28 +- .../pcloud_systempools_get_responses.go | 37 +- .../p_cloud_tasks/p_cloud_tasks_client.go | 28 +- .../pcloud_tasks_delete_responses.go | 43 +- .../pcloud_tasks_get_responses.go | 37 +- .../p_cloud_tenants/p_cloud_tenants_client.go | 28 +- .../pcloud_tenants_get_responses.go | 37 +- .../pcloud_tenants_put_responses.go | 43 +- .../p_cloud_tenants_ssh_keys_client.go | 28 +- ...pcloud_tenants_sshkeys_delete_responses.go | 43 +- .../pcloud_tenants_sshkeys_get_responses.go | 37 +- ...pcloud_tenants_sshkeys_getall_responses.go | 37 +- .../pcloud_tenants_sshkeys_post_responses.go | 55 +- .../pcloud_tenants_sshkeys_put_responses.go | 43 +- .../p_cloudvpn_connections_client.go | 28 +- .../pcloud_vpnconnections_delete_responses.go | 37 +- .../pcloud_vpnconnections_get_responses.go | 43 +- .../pcloud_vpnconnections_getall_responses.go | 37 +- ...pnconnections_networks_delete_responses.go | 43 +- ...d_vpnconnections_networks_get_responses.go | 37 +- ...d_vpnconnections_networks_put_responses.go | 43 +- ...onnections_peersubnets_delete_responses.go | 43 +- ...pnconnections_peersubnets_get_responses.go | 37 +- ...pnconnections_peersubnets_put_responses.go | 43 +- .../pcloud_vpnconnections_post_responses.go | 55 +- .../pcloud_vpnconnections_put_responses.go | 43 +- .../p_cloudvpn_policies_client.go | 28 +- .../pcloud_ikepolicies_delete_responses.go | 37 +- .../pcloud_ikepolicies_get_responses.go | 43 +- .../pcloud_ikepolicies_getall_responses.go | 37 +- .../pcloud_ikepolicies_post_responses.go | 43 +- .../pcloud_ikepolicies_put_responses.go | 43 +- .../pcloud_ipsecpolicies_delete_responses.go | 37 +- .../pcloud_ipsecpolicies_get_responses.go | 43 +- .../pcloud_ipsecpolicies_getall_responses.go | 37 +- .../pcloud_ipsecpolicies_post_responses.go | 49 +- .../pcloud_ipsecpolicies_put_responses.go | 49 +- .../p_cloud_volume_groups_client.go | 32 +- ...loud_volumegroups_action_post_responses.go | 43 +- .../pcloud_volumegroups_delete_responses.go | 37 +- ...loud_volumegroups_get_details_responses.go | 37 +- .../pcloud_volumegroups_get_responses.go | 37 +- ...d_volumegroups_getall_details_responses.go | 37 +- .../pcloud_volumegroups_getall_responses.go | 37 +- .../pcloud_volumegroups_post_responses.go | 61 +- .../pcloud_volumegroups_put_responses.go | 49 +- ...remote_copy_relationships_get_responses.go | 43 +- ...umegroups_storage_details_get_responses.go | 43 +- .../p_cloud_volume_onboarding_client.go | 28 +- .../pcloud_volume_onboarding_get_responses.go | 37 +- ...loud_volume_onboarding_getall_responses.go | 37 +- ...pcloud_volume_onboarding_post_responses.go | 43 +- .../p_cloud_volumes/p_cloud_volumes_client.go | 46 +- ...instances_volumes_action_post_responses.go | 43 +- ...cloudinstances_volumes_delete_responses.go | 43 +- ...lumes_flash_copy_mappings_get_responses.go | 43 +- ...ud_cloudinstances_volumes_get_responses.go | 37 +- ...cloudinstances_volumes_getall_responses.go | 37 +- ...d_cloudinstances_volumes_post_responses.go | 49 +- ...ud_cloudinstances_volumes_put_responses.go | 49 +- ..._remote_copy_relationship_get_responses.go | 43 +- ...d_pvminstances_volumes_delete_responses.go | 43 +- ...loud_pvminstances_volumes_get_responses.go | 37 +- ...d_pvminstances_volumes_getall_responses.go | 37 +- ...oud_pvminstances_volumes_post_responses.go | 43 +- ...loud_pvminstances_volumes_put_responses.go | 37 +- ...instances_volumes_setboot_put_responses.go | 37 +- ...2_pvminstances_volumes_delete_responses.go | 43 +- ..._v2_pvminstances_volumes_post_responses.go | 43 +- .../pcloud_v2_volumes_clone_post_responses.go | 37 +- ...oud_v2_volumes_clonetasks_get_responses.go | 43 +- .../pcloud_v2_volumes_delete_responses.go | 49 +- .../pcloud_v2_volumes_post_responses.go | 49 +- ...d_v2_volumesclone_cancel_post_responses.go | 37 +- ...pcloud_v2_volumesclone_delete_responses.go | 37 +- ..._v2_volumesclone_execute_post_responses.go | 37 +- .../pcloud_v2_volumesclone_get_responses.go | 37 +- ...pcloud_v2_volumesclone_getall_responses.go | 37 +- .../pcloud_v2_volumesclone_post_responses.go | 37 +- ...ud_v2_volumesclone_start_post_responses.go | 37 +- .../pcloud_volumes_clone_post_responses.go | 43 +- .../power_edge_router_client.go | 106 +++ ..._poweredgerouter_action_post_parameters.go | 175 +++++ ...1_poweredgerouter_action_post_responses.go | 560 +++++++++++++++ power/client/power_iaas_api_client.go | 18 +- .../service_binding_binding_responses.go | 55 +- .../service_binding_get_responses.go | 31 +- ...ce_binding_last_operation_get_responses.go | 37 +- .../service_binding_unbinding_responses.go | 43 +- .../service_bindings_client.go | 28 +- .../service_instance_deprovision_responses.go | 49 +- .../service_instance_get_responses.go | 31 +- ...e_instance_last_operation_get_responses.go | 37 +- .../service_instance_provision_responses.go | 55 +- .../service_instance_update_responses.go | 43 +- .../service_instances_client.go | 28 +- power/client/snapshots/snapshots_client.go | 147 ++++ .../snapshots/v1_snapshots_get_parameters.go | 151 +++++ .../snapshots/v1_snapshots_get_responses.go | 562 +++++++++++++++ .../v1_snapshots_getall_parameters.go | 128 ++++ .../v1_snapshots_getall_responses.go | 486 +++++++++++++ ...rvice_broker_storagetypes_get_responses.go | 43 +- .../storage_types/storage_types_client.go | 28 +- .../service_broker_swaggerspec_responses.go | 31 +- .../swagger_spec/swagger_spec_client.go | 28 +- .../workspaces/v1_workspaces_get_responses.go | 43 +- .../v1_workspaces_getall_responses.go | 31 +- power/client/workspaces/workspaces_client.go | 28 +- power/models/add_host.go | 2 +- power/models/available_host.go | 2 +- power/models/available_host_capacity.go | 160 +++++ .../available_host_resource_capacity.go | 71 ++ power/models/clone_task_status.go | 2 +- power/models/cloud_connection_create.go | 2 +- power/models/cloud_connection_update.go | 2 +- power/models/cloud_initialization.go | 2 +- power/models/create_cos_image_import_job.go | 58 +- power/models/create_data_volume.go | 5 +- power/models/create_image.go | 4 +- power/models/datacenter.go | 4 +- power/models/dead_peer_detection.go | 2 +- power/models/deployment_target.go | 124 ++++ power/models/event.go | 2 +- power/models/export_image.go | 3 + power/models/host.go | 49 +- power/models/host_available_capacity.go | 53 -- power/models/host_capacity.go | 127 +++- power/models/host_create.go | 78 ++- power/models/{hostgroup.go => host_group.go} | 36 +- ...stgroup_create.go => host_group_create.go} | 36 +- .../{hostgroup_list.go => host_group_list.go} | 14 +- ...oup_share_op.go => host_group_share_op.go} | 28 +- power/models/host_group_summary.go | 56 ++ power/models/host_resource_capacity.go | 122 ++++ power/models/hostgroup_href.go | 27 - power/models/i_k_e_policy.go | 6 +- power/models/i_k_e_policy_create.go | 6 +- power/models/i_k_e_policy_update.go | 20 +- power/models/image_import_details.go | 205 ++++++ power/models/ip_sec_policy.go | 4 +- power/models/ip_sec_policy_create.go | 4 +- power/models/ip_sec_policy_update.go | 14 +- power/models/last_operation_resource.go | 2 +- power/models/multi_volumes_create.go | 5 +- power/models/network.go | 2 +- power/models/network_create.go | 2 +- power/models/network_reference.go | 2 +- power/models/operations.go | 6 +- power/models/p_vm_instance.go | 5 +- power/models/p_vm_instance_action.go | 2 +- power/models/p_vm_instance_address.go | 10 + power/models/p_vm_instance_capture.go | 5 +- power/models/p_vm_instance_clone.go | 2 +- power/models/p_vm_instance_create.go | 72 +- power/models/p_vm_instance_multi_create.go | 4 +- power/models/p_vm_instance_operation.go | 2 +- power/models/p_vm_instance_reference.go | 5 +- power/models/p_vm_instance_update.go | 2 +- power/models/p_vm_instance_update_response.go | 56 +- power/models/p_vm_instance_v2_network_port.go | 4 +- power/models/placement_group.go | 2 +- power/models/placement_group_create.go | 2 +- power/models/power_edge_router_action.go | 107 +++ power/models/pvm_instance_deployment.go | 2 +- power/models/s_a_p_create.go | 53 +- power/models/s_a_p_profile.go | 63 +- power/models/s_p_p_placement_group_create.go | 2 +- power/models/secondary.go | 6 +- power/models/service_binding_volume_mount.go | 4 +- power/models/shared_processor_pool_create.go | 3 + power/models/shared_processor_pool_server.go | 4 +- power/models/shared_processor_pool_update.go | 2 +- power/models/site.go | 76 ++- power/models/snapshot_list.go | 124 ++++ power/models/snapshot_v1.go | 179 +++++ power/models/storage_affinity.go | 2 +- power/models/storage_pool.go | 2 +- power/models/storage_pool_map.go | 53 ++ power/models/storage_tier.go | 2 +- power/models/storage_type.go | 2 +- power/models/token_request.go | 2 +- power/models/transit_gateway_location.go | 2 +- power/models/update_storage_pool.go | 2 +- power/models/v_p_n_connection.go | 4 +- power/models/v_p_n_connection_create.go | 2 +- power/models/v_p_n_connection_update.go | 2 +- power/models/volume.go | 5 +- power/models/volume_group_action.go | 4 +- power/models/volume_group_action_reset.go | 2 +- power/models/volume_group_action_start.go | 2 +- power/models/volume_reference.go | 5 +- power/models/volumes_clone_async_request.go | 1 + power/models/volumes_clone_execute.go | 1 + power/models/volumes_clone_request.go | 1 + power/models/workspace.go | 2 +- .../workspace_power_edge_router_details.go | 11 +- 394 files changed, 14904 insertions(+), 6287 deletions(-) create mode 100644 clients/instance/ibm-pi-host-groups.go create mode 100644 examples/host-groups/main.go rename power/client/{hostgroups/hostgroups_client.go => host_groups/host_groups_client.go} (77%) rename power/client/{hostgroups => host_groups}/v1_available_hosts_parameters.go (99%) rename power/client/{hostgroups => host_groups}/v1_available_hosts_responses.go (94%) create mode 100644 power/client/host_groups/v1_host_groups_get_parameters.go create mode 100644 power/client/host_groups/v1_host_groups_get_responses.go create mode 100644 power/client/host_groups/v1_host_groups_id_get_parameters.go create mode 100644 power/client/host_groups/v1_host_groups_id_get_responses.go create mode 100644 power/client/host_groups/v1_host_groups_id_put_parameters.go create mode 100644 power/client/host_groups/v1_host_groups_id_put_responses.go create mode 100644 power/client/host_groups/v1_host_groups_post_parameters.go create mode 100644 power/client/host_groups/v1_host_groups_post_responses.go rename power/client/{hostgroups => host_groups}/v1_hosts_get_parameters.go (99%) rename power/client/{hostgroups => host_groups}/v1_hosts_get_responses.go (92%) rename power/client/{hostgroups => host_groups}/v1_hosts_id_delete_parameters.go (99%) rename power/client/{hostgroups => host_groups}/v1_hosts_id_delete_responses.go (93%) rename power/client/{hostgroups => host_groups}/v1_hosts_id_get_parameters.go (99%) rename power/client/{hostgroups => host_groups}/v1_hosts_id_get_responses.go (94%) rename power/client/{hostgroups => host_groups}/v1_hosts_id_put_parameters.go (99%) rename power/client/{hostgroups => host_groups}/v1_hosts_id_put_responses.go (94%) rename power/client/{hostgroups => host_groups}/v1_hosts_post_parameters.go (98%) rename power/client/{hostgroups => host_groups}/v1_hosts_post_responses.go (92%) delete mode 100644 power/client/hostgroups/v1_hostgroups_get_parameters.go delete mode 100644 power/client/hostgroups/v1_hostgroups_get_responses.go delete mode 100644 power/client/hostgroups/v1_hostgroups_id_get_parameters.go delete mode 100644 power/client/hostgroups/v1_hostgroups_id_get_responses.go delete mode 100644 power/client/hostgroups/v1_hostgroups_id_put_parameters.go delete mode 100644 power/client/hostgroups/v1_hostgroups_id_put_responses.go delete mode 100644 power/client/hostgroups/v1_hostgroups_post_parameters.go delete mode 100644 power/client/hostgroups/v1_hostgroups_post_responses.go create mode 100644 power/client/power_edge_router/power_edge_router_client.go create mode 100644 power/client/power_edge_router/v1_poweredgerouter_action_post_parameters.go create mode 100644 power/client/power_edge_router/v1_poweredgerouter_action_post_responses.go create mode 100644 power/client/snapshots/snapshots_client.go create mode 100644 power/client/snapshots/v1_snapshots_get_parameters.go create mode 100644 power/client/snapshots/v1_snapshots_get_responses.go create mode 100644 power/client/snapshots/v1_snapshots_getall_parameters.go create mode 100644 power/client/snapshots/v1_snapshots_getall_responses.go create mode 100644 power/models/available_host_capacity.go create mode 100644 power/models/available_host_resource_capacity.go create mode 100644 power/models/deployment_target.go delete mode 100644 power/models/host_available_capacity.go rename power/models/{hostgroup.go => host_group.go} (74%) rename power/models/{hostgroup_create.go => host_group_create.go} (79%) rename power/models/{hostgroup_list.go => host_group_list.go} (79%) rename power/models/{hostgroup_share_op.go => host_group_share_op.go} (72%) create mode 100644 power/models/host_group_summary.go create mode 100644 power/models/host_resource_capacity.go delete mode 100644 power/models/hostgroup_href.go create mode 100644 power/models/image_import_details.go create mode 100644 power/models/power_edge_router_action.go create mode 100644 power/models/snapshot_list.go create mode 100644 power/models/snapshot_v1.go create mode 100644 power/models/storage_pool_map.go diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index c8ef1af5..d8f5e267 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -14,7 +14,7 @@ jobs: steps: - uses: actions/checkout@v4 - + - name: Set up Go uses: actions/setup-go@v5 with: @@ -39,4 +39,4 @@ jobs: run: go test -v `go list ./... | grep -v '/power/' | grep -v examples` - name: Coverage - run: go test `go list ./... | grep -v '/power/' | grep -v examples` -coverprofile=profile.cov && go tool cover -func profile.cov + run: go test `go list ./... | grep -v '/power/' | grep -v examples` -coverprofile=profile.cov && go tool cover -func profile.cov \ No newline at end of file diff --git a/clients/instance/ibm-pi-host-groups.go b/clients/instance/ibm-pi-host-groups.go new file mode 100644 index 00000000..4c6c2474 --- /dev/null +++ b/clients/instance/ibm-pi-host-groups.go @@ -0,0 +1,193 @@ +package instance + +import ( + "context" + "fmt" + + "github.com/IBM-Cloud/power-go-client/helpers" + "github.com/IBM-Cloud/power-go-client/ibmpisession" + "github.com/IBM-Cloud/power-go-client/power/client/host_groups" + "github.com/IBM-Cloud/power-go-client/power/models" +) + +// IBMPIHostGroupsClient +type IBMPIHostGroupsClient struct { + IBMPIClient +} + +// NewIBMPIHostGroupsClient +func NewIBMPIHostGroupsClient(ctx context.Context, sess *ibmpisession.IBMPISession, cloudInstanceID string) *IBMPIHostGroupsClient { + return &IBMPIHostGroupsClient{ + *NewIBMPIClient(ctx, sess, cloudInstanceID), + } +} + +// Get All available hosts +func (f *IBMPIHostGroupsClient) GetAvailableHosts() (models.AvailableHostList, error) { + if f.session.IsOnPrem() { + return nil, fmt.Errorf("operation not supported in satellite location, check documentation") + } + params := host_groups.NewV1AvailableHostsParams().WithContext(f.ctx).WithTimeout(helpers.PIGetTimeOut) + resp, err := f.session.Power.HostGroups.V1AvailableHosts(params, f.session.AuthInfo(f.cloudInstanceID)) + if err != nil { + return nil, ibmpisession.SDKFailWithAPIError(err, fmt.Errorf("failed to Get available hosts for %s: %w", f.cloudInstanceID, err)) + } + + if resp == nil || resp.Payload == nil { + return nil, fmt.Errorf("failed to get available hosts") + } + return resp.Payload, nil +} + +// Get all host groups +func (f *IBMPIHostGroupsClient) GetHostGroups() (models.HostGroupList, error) { + if f.session.IsOnPrem() { + return nil, fmt.Errorf("operation not supported in satellite location, check documentation") + } + params := host_groups.NewV1HostGroupsGetParams().WithContext(f.ctx).WithTimeout(helpers.PIGetTimeOut) + resp, err := f.session.Power.HostGroups.V1HostGroupsGet(params, f.session.AuthInfo(f.cloudInstanceID)) + if err != nil { + return nil, ibmpisession.SDKFailWithAPIError(err, fmt.Errorf("failed to get Host groups for %s: %w", f.cloudInstanceID, err)) + } + + if resp == nil || resp.Payload == nil { + return nil, fmt.Errorf("failed to get host groups") + } + return resp.Payload, nil +} + +// Create a host group +func (f *IBMPIHostGroupsClient) CreateHostGroup(body *models.HostGroupCreate) (*models.HostGroup, error) { + if f.session.IsOnPrem() { + return nil, fmt.Errorf("operation not supported in satellite location, check documentation") + } + params := host_groups.NewV1HostGroupsPostParams().WithContext(f.ctx).WithTimeout(helpers.PICreateTimeOut).WithBody(body) + resp, err := f.session.Power.HostGroups.V1HostGroupsPost(params, f.session.AuthInfo(f.cloudInstanceID)) + if err != nil { + return nil, ibmpisession.SDKFailWithAPIError(err, fmt.Errorf("failed to create host group for %s: %w", f.cloudInstanceID, err)) + } + + if resp == nil || resp.Payload == nil { + return nil, fmt.Errorf("failed to create host groups") + } + return resp.Payload, nil +} + +// Update a host group +func (f *IBMPIHostGroupsClient) UpdateHostGroup(body *models.HostGroupShareOp, id string) (*models.HostGroup, error) { + if f.session.IsOnPrem() { + return nil, fmt.Errorf("operation not supported in satellite location, check documentation") + } + params := host_groups.NewV1HostGroupsIDPutParams().WithContext(f.ctx).WithTimeout(helpers.PICreateTimeOut).WithBody(body).WithHostGroupID(id) + resp, err := f.session.Power.HostGroups.V1HostGroupsIDPut(params, f.session.AuthInfo(f.cloudInstanceID)) + if err != nil { + return nil, ibmpisession.SDKFailWithAPIError(err, fmt.Errorf("failed to update host group for %s: %w", f.cloudInstanceID, err)) + } + + if resp == nil || resp.Payload == nil { + return nil, fmt.Errorf("failed to update host groups") + } + return resp.Payload, nil +} + +// Get a host group +func (f *IBMPIHostGroupsClient) GetHostGroup(id string) (*models.HostGroup, error) { + if f.session.IsOnPrem() { + return nil, fmt.Errorf("operation not supported in satellite location, check documentation") + } + params := host_groups.NewV1HostGroupsIDGetParams().WithContext(f.ctx).WithTimeout(helpers.PIGetTimeOut).WithHostGroupID(id) + resp, err := f.session.Power.HostGroups.V1HostGroupsIDGet(params, f.session.AuthInfo(f.cloudInstanceID)) + if err != nil { + return nil, ibmpisession.SDKFailWithAPIError(err, fmt.Errorf("failed to get host group %s for %s: %w", id, f.cloudInstanceID, err)) + } + + if resp == nil || resp.Payload == nil { + return nil, fmt.Errorf("failed to get host group %s", id) + } + return resp.Payload, nil +} + +// Get all hosts +func (f *IBMPIHostGroupsClient) GetHosts() (models.HostList, error) { + if f.session.IsOnPrem() { + return nil, fmt.Errorf("operation not supported in satellite location, check documentation") + } + params := host_groups.NewV1HostsGetParams().WithContext(f.ctx).WithTimeout(helpers.PIGetTimeOut) + resp, err := f.session.Power.HostGroups.V1HostsGet(params, f.session.AuthInfo(f.cloudInstanceID)) + if err != nil { + return nil, ibmpisession.SDKFailWithAPIError(err, fmt.Errorf("failed to get hosts for %s: %w", f.cloudInstanceID, err)) + } + + if resp == nil || resp.Payload == nil { + return nil, fmt.Errorf("failed to get hosts") + } + return resp.Payload, nil +} + +// Create a host +func (f *IBMPIHostGroupsClient) CreateHost(body *models.HostCreate) (models.HostList, error) { + if f.session.IsOnPrem() { + return nil, fmt.Errorf("operation not supported in satellite location, check documentation") + } + params := host_groups.NewV1HostsPostParams().WithContext(f.ctx).WithTimeout(helpers.PIGetTimeOut).WithBody(body) + resp, err := f.session.Power.HostGroups.V1HostsPost(params, f.session.AuthInfo(f.cloudInstanceID)) + if err != nil { + return nil, ibmpisession.SDKFailWithAPIError(err, fmt.Errorf("failed to create a host for %s: %w", f.cloudInstanceID, err)) + } + + if resp == nil || resp.Payload == nil { + return nil, fmt.Errorf("failed to create a host") + } + return resp.Payload, nil +} + +// Get a host +func (f *IBMPIHostGroupsClient) GetHost(id string) (*models.Host, error) { + if f.session.IsOnPrem() { + return nil, fmt.Errorf("operation not supported in satellite location, check documentation") + } + params := host_groups.NewV1HostsIDGetParams().WithContext(f.ctx).WithTimeout(helpers.PIGetTimeOut).WithHostID(id) + resp, err := f.session.Power.HostGroups.V1HostsIDGet(params, f.session.AuthInfo(f.cloudInstanceID)) + if err != nil { + return nil, ibmpisession.SDKFailWithAPIError(err, fmt.Errorf("failed to get host %s for %s: %w", id, f.cloudInstanceID, err)) + } + + if resp == nil || resp.Payload == nil { + return nil, fmt.Errorf("failed to get host %s", id) + } + return resp.Payload, nil +} + +// Update a host +func (f *IBMPIHostGroupsClient) UpdateHost(body *models.HostPut, id string) (*models.Host, error) { + if f.session.IsOnPrem() { + return nil, fmt.Errorf("operation not supported in satellite location, check documentation") + } + params := host_groups.NewV1HostsIDPutParams().WithContext(f.ctx).WithTimeout(helpers.PIGetTimeOut).WithHostID(id).WithBody(body) + resp, err := f.session.Power.HostGroups.V1HostsIDPut(params, f.session.AuthInfo(f.cloudInstanceID)) + if err != nil { + return nil, ibmpisession.SDKFailWithAPIError(err, fmt.Errorf("failed to update host %s for %s: %w", id, f.cloudInstanceID, err)) + } + + if resp == nil || resp.Payload == nil { + return nil, fmt.Errorf("failed to update host %s", id) + } + return resp.Payload, nil +} + +// Delete a host +func (f *IBMPIHostGroupsClient) DeleteHost(id string) error { + if f.session.IsOnPrem() { + return fmt.Errorf("operation not supported in satellite location, check documentation") + } + params := host_groups.NewV1HostsIDDeleteParams().WithContext(f.ctx).WithTimeout(helpers.PIGetTimeOut).WithHostID(id) + resp, err := f.session.Power.HostGroups.V1HostsIDDelete(params, f.session.AuthInfo(f.cloudInstanceID)) + if err != nil { + return ibmpisession.SDKFailWithAPIError(err, fmt.Errorf("failed to delete host %s for %s: %w", id, f.cloudInstanceID, err)) + } + + if resp == nil || resp.Payload == nil { + return fmt.Errorf("failed to delete host %s", id) + } + return nil +} diff --git a/clients/instance/ibm-pi-image.go b/clients/instance/ibm-pi-image.go index b93be950..9ac2796d 100644 --- a/clients/instance/ibm-pi-image.go +++ b/clients/instance/ibm-pi-image.go @@ -79,6 +79,10 @@ func (f *IBMPIImageClient) Create(body *models.CreateImage) (*models.Image, erro // Import an Image func (f *IBMPIImageClient) CreateCosImage(body *models.CreateCosImageImportJob) (imageJob *models.JobReference, err error) { + // Check for satellite differences in this endpoint + if !f.session.IsOnPrem() && body.Checksum { + return nil, fmt.Errorf("checksum parameter is not supported off-premise") + } params := p_cloud_images.NewPcloudV1CloudinstancesCosimagesPostParams(). WithContext(f.ctx).WithTimeout(helpers.PICreateTimeOut). WithCloudInstanceID(f.cloudInstanceID).WithBody(body) @@ -94,6 +98,10 @@ func (f *IBMPIImageClient) CreateCosImage(body *models.CreateCosImageImportJob) // Export an Image func (f *IBMPIImageClient) ExportImage(id string, body *models.ExportImage) (*models.JobReference, error) { + // Check for satellite differences in this endpoint + if !f.session.IsOnPrem() && body.Checksum { + return nil, fmt.Errorf("checksum parameter is not supported off-premise") + } params := p_cloud_images.NewPcloudV2ImagesExportPostParams(). WithContext(f.ctx).WithTimeout(helpers.PICreateTimeOut). WithCloudInstanceID(f.cloudInstanceID).WithImageID(id).WithBody(body) diff --git a/clients/instance/ibm-pi-instance.go b/clients/instance/ibm-pi-instance.go index 3143b669..f676a5b9 100644 --- a/clients/instance/ibm-pi-instance.go +++ b/clients/instance/ibm-pi-instance.go @@ -55,8 +55,8 @@ func (f *IBMPIInstanceClient) GetAll() (*models.PVMInstances, error) { // Create an Instance func (f *IBMPIInstanceClient) Create(body *models.PVMInstanceCreate) (*models.PVMInstanceList, error) { // Check for satellite differences in this endpoint - if f.session.IsOnPrem() && (body.SoftwareLicenses != nil || body.SharedProcessorPool != "") { - return nil, fmt.Errorf("software licenses and shared processor pool parameters are not supported in satellite location, check documentation") + if f.session.IsOnPrem() && body.DeploymentTarget != nil { + return nil, fmt.Errorf("deployment target parameter is not supported in satellite location, check documentation") } params := p_cloud_p_vm_instances.NewPcloudPvminstancesPostParams(). WithContext(f.ctx).WithTimeout(helpers.PICreateTimeOut). @@ -176,6 +176,10 @@ func (f *IBMPIInstanceClient) UpdateConsoleLanguage(id string, body *models.Cons // Capture an Instance func (f *IBMPIInstanceClient) CaptureInstanceToImageCatalog(id string, body *models.PVMInstanceCapture) error { + // Check for satellite differences in this endpoint + if !f.session.IsOnPrem() && body.Checksum { + return fmt.Errorf("checksum parameter is not supported off-premise") + } params := p_cloud_p_vm_instances.NewPcloudPvminstancesCapturePostParams(). WithContext(f.ctx).WithTimeout(helpers.PIGetTimeOut). WithCloudInstanceID(f.cloudInstanceID).WithPvmInstanceID(id). diff --git a/clients/instance/ibm-pi-shared-processor-pool.go b/clients/instance/ibm-pi-shared-processor-pool.go index 1722f9ac..0f5b3e9c 100644 --- a/clients/instance/ibm-pi-shared-processor-pool.go +++ b/clients/instance/ibm-pi-shared-processor-pool.go @@ -26,9 +26,6 @@ func NewIBMPISharedProcessorPoolClient(ctx context.Context, sess *ibmpisession.I // Get a PI Shared Processor Pool func (f *IBMPISharedProcessorPoolClient) Get(id string) (*models.SharedProcessorPoolDetail, error) { - if f.session.IsOnPrem() { - return nil, fmt.Errorf("operation not supported in satellite location, check documentation") - } params := p_cloud_shared_processor_pools.NewPcloudSharedprocessorpoolsGetParams(). WithContext(f.ctx).WithTimeout(helpers.PIGetTimeOut). WithCloudInstanceID(f.cloudInstanceID).WithSharedProcessorPoolID(id) @@ -44,9 +41,6 @@ func (f *IBMPISharedProcessorPoolClient) Get(id string) (*models.SharedProcessor // Get All Shared Processor Pools func (f *IBMPISharedProcessorPoolClient) GetAll() (*models.SharedProcessorPools, error) { - if f.session.IsOnPrem() { - return nil, fmt.Errorf("operation not supported in satellite location, check documentation") - } params := p_cloud_shared_processor_pools.NewPcloudSharedprocessorpoolsGetallParams(). WithContext(f.ctx).WithTimeout(helpers.PIGetTimeOut). WithCloudInstanceID(f.cloudInstanceID) @@ -62,8 +56,9 @@ func (f *IBMPISharedProcessorPoolClient) GetAll() (*models.SharedProcessorPools, // Create a Shared Processor Pool func (f *IBMPISharedProcessorPoolClient) Create(body *models.SharedProcessorPoolCreate) (*models.SharedProcessorPool, error) { - if f.session.IsOnPrem() { - return nil, fmt.Errorf("operation not supported in satellite location, check documentation") + // Check for satellite differences in this endpoint + if f.session.IsOnPrem() && body.HostID != "" { + return nil, fmt.Errorf("host id parameter is not supported in satellite location, check documentation") } params := p_cloud_shared_processor_pools.NewPcloudSharedprocessorpoolsPostParams(). WithContext(f.ctx).WithTimeout(helpers.PICreateTimeOut). @@ -80,9 +75,6 @@ func (f *IBMPISharedProcessorPoolClient) Create(body *models.SharedProcessorPool // Delete a Shared Processor Pool func (f *IBMPISharedProcessorPoolClient) Delete(id string) error { - if f.session.IsOnPrem() { - return fmt.Errorf("operation not supported in satellite location, check documentation") - } params := p_cloud_shared_processor_pools.NewPcloudSharedprocessorpoolsDeleteParams(). WithContext(f.ctx).WithTimeout(helpers.PIDeleteTimeOut). WithCloudInstanceID(f.cloudInstanceID).WithSharedProcessorPoolID(id) @@ -95,9 +87,6 @@ func (f *IBMPISharedProcessorPoolClient) Delete(id string) error { // Update a PI Shared Processor Pool func (f *IBMPISharedProcessorPoolClient) Update(id string, body *models.SharedProcessorPoolUpdate) (*models.SharedProcessorPool, error) { - if f.session.IsOnPrem() { - return nil, fmt.Errorf("operation not supported in satellite location, check documentation") - } params := p_cloud_shared_processor_pools.NewPcloudSharedprocessorpoolsPutParams(). WithContext(f.ctx).WithTimeout(helpers.PIUpdateTimeOut). WithCloudInstanceID(f.cloudInstanceID).WithBody(body).WithSharedProcessorPoolID(id) diff --git a/examples/host-groups/main.go b/examples/host-groups/main.go new file mode 100644 index 00000000..c20e6d77 --- /dev/null +++ b/examples/host-groups/main.go @@ -0,0 +1,62 @@ +package main + +import ( + "context" + "log" + + v "github.com/IBM-Cloud/power-go-client/clients/instance" + ps "github.com/IBM-Cloud/power-go-client/ibmpisession" + "github.com/IBM/go-sdk-core/v5/core" +) + +func main() { + //session Inputs + // < IAM TOKEN > + // token := "" + apiKey := "" + region := " < REGION > " + zone := " < ZONE > " + accountID := " < ACCOUNT ID > " + url := region + ".power-iaas.test.cloud.ibm.com" + + // dr location inputs + piID := " < POWER INSTANCE ID > " + + // authenticator := &core.BearerTokenAuthenticator{ + // BearerToken: token, + // } + authenticator := &core.IamAuthenticator{ + ApiKey: apiKey, + // Uncomment for test environment + URL: "https://iam.test.cloud.ibm.com", + } + + // Create the session + options := &ps.IBMPIOptions{ + Authenticator: authenticator, + UserAccount: accountID, + Zone: zone, + URL: url, + Debug: true, + } + session, err := ps.NewIBMPISession(options) + if err != nil { + log.Fatal(err) + } + powerClient := v.NewIBMPIHostGroupsClient(context.Background(), session, piID) + if err != nil { + log.Fatal(err) + } + + getAllAvailableHost, err := powerClient.GetAvailableHosts() + if err != nil { + log.Fatal(err) + } + log.Printf("***************[0]****************** %+v \n", getAllAvailableHost) + + getHostGroups, err := powerClient.GetHostGroups() + if err != nil { + log.Fatal(err) + } + log.Printf("***************[1]****************** %+v \n", getHostGroups) +} diff --git a/go.mod b/go.mod index 2f055d7a..49b13a69 100644 --- a/go.mod +++ b/go.mod @@ -4,14 +4,14 @@ go 1.22 require ( github.com/IBM/go-sdk-core/v5 v5.15.3 - github.com/IBM/platform-services-go-sdk v0.60.0 + github.com/IBM/platform-services-go-sdk v0.59.1 github.com/apparentlymart/go-cidr v1.1.0 github.com/go-openapi/errors v0.21.0 github.com/go-openapi/runtime v0.26.0 - github.com/go-openapi/strfmt v0.22.1 + github.com/go-openapi/strfmt v0.22.0 github.com/go-openapi/swag v0.22.5 github.com/go-openapi/validate v0.22.4 - github.com/stretchr/testify v1.9.0 + github.com/stretchr/testify v1.8.4 ) require ( @@ -28,6 +28,7 @@ require ( github.com/go-playground/locales v0.14.1 // indirect github.com/go-playground/universal-translator v0.18.1 // indirect github.com/go-playground/validator/v10 v10.17.0 // indirect + github.com/google/go-cmp v0.6.0 // indirect github.com/google/uuid v1.6.0 // indirect github.com/hashicorp/go-cleanhttp v0.5.2 // indirect github.com/hashicorp/go-retryablehttp v0.7.5 // indirect @@ -36,9 +37,10 @@ require ( github.com/mailru/easyjson v0.7.7 // indirect github.com/mitchellh/mapstructure v1.5.0 // indirect github.com/oklog/ulid v1.3.1 // indirect + github.com/onsi/gomega v1.29.0 // indirect github.com/opentracing/opentracing-go v1.2.0 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect - go.mongodb.org/mongo-driver v1.14.0 // indirect + go.mongodb.org/mongo-driver v1.13.1 // indirect go.opentelemetry.io/otel v1.14.0 // indirect go.opentelemetry.io/otel/trace v1.14.0 // indirect golang.org/x/crypto v0.21.0 // indirect diff --git a/go.sum b/go.sum index a6646718..86e4bfb8 100644 --- a/go.sum +++ b/go.sum @@ -1,7 +1,7 @@ github.com/IBM/go-sdk-core/v5 v5.15.3 h1:yBSSYLuQSO9Ip+j3mONsTcymoYQyxarQ6rh3aU9cVt8= github.com/IBM/go-sdk-core/v5 v5.15.3/go.mod h1:ee+AZaB15yUwZigJdRCwZZ3u7HIvEQzxNUdxVpnJHY8= -github.com/IBM/platform-services-go-sdk v0.60.0 h1:DXCp5hAtFO6quUmb5qKeosQw0ln/fYE5nrKjgXbiSBU= -github.com/IBM/platform-services-go-sdk v0.60.0/go.mod h1:fcmUb29QKLjMM0UWrR5bAidC7qfKWrf96H0xxmGJHdE= +github.com/IBM/platform-services-go-sdk v0.59.1 h1:qyXJX1sNgbDDrXb5M9LrjMjCm2w9dkSEtBGAfZJlT0Y= +github.com/IBM/platform-services-go-sdk v0.59.1/go.mod h1:cLKLn9Bd1YcTM/micLQmikjZDDQvRgfhdAHKOeulILg= github.com/apparentlymart/go-cidr v1.1.0 h1:2mAhrMoF+nhXqxTzSZMUzDHkLjmIHC+Zzn4tdgBZjnU= github.com/apparentlymart/go-cidr v1.1.0/go.mod h1:EBcsNrHc3zQeuaeCeCtQruQm+n9/YjEn/vI25Lg7Gwc= github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2 h1:DklsrG3dyBCFEj5IhUbnKptjxatkF07cF2ak3yi77so= @@ -32,8 +32,8 @@ github.com/go-openapi/runtime v0.26.0 h1:HYOFtG00FM1UvqrcxbEJg/SwvDRvYLQKGhw2zaQ github.com/go-openapi/runtime v0.26.0/go.mod h1:QgRGeZwrUcSHdeh4Ka9Glvo0ug1LC5WyE+EV88plZrQ= github.com/go-openapi/spec v0.20.12 h1:cgSLbrsmziAP2iais+Vz7kSazwZ8rsUZd6TUzdDgkVI= github.com/go-openapi/spec v0.20.12/go.mod h1:iSCgnBcwbMW9SfzJb8iYynXvcY6C/QFrI7otzF7xGM4= -github.com/go-openapi/strfmt v0.22.1 h1:5Ky8cybT4576C6Ffc+8gYji/wRXCo6Ozm8RaWjPI6jc= -github.com/go-openapi/strfmt v0.22.1/go.mod h1:OfVoytIXJasDkkGvkb1Cceb3BPyMOwk1FgmyyEw7NYg= +github.com/go-openapi/strfmt v0.22.0 h1:Ew9PnEYc246TwrEspvBdDHS4BVKXy/AOVsfqGDgAcaI= +github.com/go-openapi/strfmt v0.22.0/go.mod h1:HzJ9kokGIju3/K6ap8jL+OlGAbjpSv27135Yr9OivU4= github.com/go-openapi/swag v0.22.5 h1:fVS63IE3M0lsuWRzuom3RLwUMVI2peDH01s6M70ugys= github.com/go-openapi/swag v0.22.5/go.mod h1:Gl91UqO+btAM0plGGxHqJcQZ1ZTy6jbmridBTsDy8A0= github.com/go-openapi/validate v0.22.4 h1:5v3jmMyIPKTR8Lv9syBAIRxG6lY0RqeBPB1LKEijzk8= @@ -46,6 +46,8 @@ github.com/go-playground/universal-translator v0.18.1 h1:Bcnm0ZwsGyWbCzImXv+pAJn github.com/go-playground/universal-translator v0.18.1/go.mod h1:xekY+UJKNuX9WP91TpwSH2VMlDf28Uj24BCp08ZFTUY= github.com/go-playground/validator/v10 v10.17.0 h1:SmVVlfAOtlZncTxRuinDPomC2DkXJ4E5T9gDA0AIH74= github.com/go-playground/validator/v10 v10.17.0/go.mod h1:9iXMNT7sEkjXb0I+enO7QXmzG6QCsPWY4zveKFVRSyU= +github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= +github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= @@ -58,6 +60,7 @@ github.com/hashicorp/go-retryablehttp v0.7.5 h1:bJj+Pj19UZMIweq/iie+1u5YCdGrnxCT github.com/hashicorp/go-retryablehttp v0.7.5/go.mod h1:Jy/gPYAdjqffZ/yFGCFV2doI5wjtH1ewM9u8iYVjtX8= github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY= github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= +github.com/klauspost/compress v1.13.6/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47etQ6QUkpK6sk= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= @@ -68,6 +71,7 @@ github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0 github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY= github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= +github.com/montanaflynn/stats v0.0.0-20171201202039-1bf9dbcd8cbe/go.mod h1:wL8QJuTMNUDYhXwkmfOly8iTdp5TEcJFWZD2D7SIkUc= github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE= github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU= github.com/oklog/ulid v1.3.1 h1:EGfNDEx6MqHz8B3uNV6QAib1UR2Lm97sHi3ocA6ESJ4= @@ -85,24 +89,58 @@ github.com/rogpeppe/go-internal v1.11.0/go.mod h1:ddIwULY96R17DhadqLgMfk9H9tvdUz github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= -github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= -github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= -go.mongodb.org/mongo-driver v1.14.0 h1:P98w8egYRjYe3XDjxhYJagTokP/H6HzlsnojRgZRd80= -go.mongodb.org/mongo-driver v1.14.0/go.mod h1:Vzb0Mk/pa7e6cWw85R4F/endUC3u0U9jGcNU603k65c= +github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= +github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= +github.com/xdg-go/pbkdf2 v1.0.0/go.mod h1:jrpuAogTd400dnrH08LKmI/xc1MbPOebTwRqcT5RDeI= +github.com/xdg-go/scram v1.1.2/go.mod h1:RT/sEzTbU5y00aCK8UOx6R7YryM0iF1N2MOmC3kKLN4= +github.com/xdg-go/stringprep v1.0.4/go.mod h1:mPGuuIYwz7CmR2bT9j4GbQqutWS1zV24gijq1dTyGkM= +github.com/youmark/pkcs8 v0.0.0-20181117223130-1be2e3e5546d/go.mod h1:rHwXgn7JulP+udvsHwJoVG1YGAP6VLg4y9I5dyZdqmA= +github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= +go.mongodb.org/mongo-driver v1.13.1 h1:YIc7HTYsKndGK4RFzJ3covLz1byri52x0IoMB0Pt/vk= +go.mongodb.org/mongo-driver v1.13.1/go.mod h1:wcDf1JBCXy2mOW0bWHwO/IOYqdca1MPCwDtFu/Z9+eo= go.opentelemetry.io/otel v1.14.0 h1:/79Huy8wbf5DnIPhemGB+zEPVwnN6fuQybr/SRXa6hM= go.opentelemetry.io/otel v1.14.0/go.mod h1:o4buv+dJzx8rohcUeRmWUZhqupFvzWis188WlggnNeU= go.opentelemetry.io/otel/sdk v1.14.0 h1:PDCppFRDq8A1jL9v6KMI6dYesaq+DFcDZvjsoGvxGzY= go.opentelemetry.io/otel/sdk v1.14.0/go.mod h1:bwIC5TjrNG6QDCHNWvW4HLHtUQ4I+VQDsnjhvyZCALM= go.opentelemetry.io/otel/trace v1.14.0 h1:wp2Mmvj41tDsyAJXiWDWpfNsOiIyd38fy85pyKcFq/M= go.opentelemetry.io/otel/trace v1.14.0/go.mod h1:8avnQLK+CG77yNLUae4ea2JDQ6iT+gozhnZjy/rw9G8= +golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= +golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.21.0 h1:X31++rzVUdKhX5sWmSOFZxx8UW/ldWx55cbf08iNAMA= golang.org/x/crypto v0.21.0/go.mod h1:0BP7YvVV9gBbVKyeTG0Gyn+gZm94bibOW5BjDEYAOMs= +golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= +golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/net v0.23.0 h1:7EYJ93RZ9vYSZAIb2x3lnuvqO5zneoD6IvWjuhfxjTs= golang.org/x/net v0.23.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg= +golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.18.0 h1:DBdB3niSjOA/O0blCZBqDefyWNYveAYMNF1Wum0DYQ4= golang.org/x/sys v0.18.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= +golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= +golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= +golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ= +golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= +golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= +golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= diff --git a/power/client/authentication/authentication_client.go b/power/client/authentication/authentication_client.go index 33f0e028..175237cb 100644 --- a/power/client/authentication/authentication_client.go +++ b/power/client/authentication/authentication_client.go @@ -9,6 +9,7 @@ import ( "fmt" "github.com/go-openapi/runtime" + httptransport "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" ) @@ -17,6 +18,31 @@ func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientServi return &Client{transport: transport, formats: formats} } +// New creates a new authentication API client with basic auth credentials. +// It takes the following parameters: +// - host: http host (github.com). +// - basePath: any base path for the API client ("/v1", "/v3"). +// - scheme: http scheme ("http", "https"). +// - user: user for basic authentication header. +// - password: password for basic authentication header. +func NewClientWithBasicAuth(host, basePath, scheme, user, password string) ClientService { + transport := httptransport.New(host, basePath, []string{scheme}) + transport.DefaultAuthentication = httptransport.BasicAuth(user, password) + return &Client{transport: transport, formats: strfmt.Default} +} + +// New creates a new authentication API client with a bearer token for authentication. +// It takes the following parameters: +// - host: http host (github.com). +// - basePath: any base path for the API client ("/v1", "/v3"). +// - scheme: http scheme ("http", "https"). +// - bearerToken: bearer token for Bearer authentication header. +func NewClientWithBearerToken(host, basePath, scheme, bearerToken string) ClientService { + transport := httptransport.New(host, basePath, []string{scheme}) + transport.DefaultAuthentication = httptransport.BearerToken(bearerToken) + return &Client{transport: transport, formats: strfmt.Default} +} + /* Client for authentication API */ @@ -25,7 +51,7 @@ type Client struct { formats strfmt.Registry } -// ClientOption is the option for Client methods +// ClientOption may be used to customize the behavior of Client methods. type ClientOption func(*runtime.ClientOperation) // ClientService is the interface for Client methods diff --git a/power/client/authentication/service_broker_auth_callback_responses.go b/power/client/authentication/service_broker_auth_callback_responses.go index 94ed66f1..cb6002ee 100644 --- a/power/client/authentication/service_broker_auth_callback_responses.go +++ b/power/client/authentication/service_broker_auth_callback_responses.go @@ -6,6 +6,7 @@ package authentication // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -109,11 +110,13 @@ func (o *ServiceBrokerAuthCallbackOK) Code() int { } func (o *ServiceBrokerAuthCallbackOK) Error() string { - return fmt.Sprintf("[GET /auth/v1/callback][%d] serviceBrokerAuthCallbackOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /auth/v1/callback][%d] serviceBrokerAuthCallbackOK %s", 200, payload) } func (o *ServiceBrokerAuthCallbackOK) String() string { - return fmt.Sprintf("[GET /auth/v1/callback][%d] serviceBrokerAuthCallbackOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /auth/v1/callback][%d] serviceBrokerAuthCallbackOK %s", 200, payload) } func (o *ServiceBrokerAuthCallbackOK) GetPayload() *models.AccessToken { @@ -177,11 +180,13 @@ func (o *ServiceBrokerAuthCallbackBadRequest) Code() int { } func (o *ServiceBrokerAuthCallbackBadRequest) Error() string { - return fmt.Sprintf("[GET /auth/v1/callback][%d] serviceBrokerAuthCallbackBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /auth/v1/callback][%d] serviceBrokerAuthCallbackBadRequest %s", 400, payload) } func (o *ServiceBrokerAuthCallbackBadRequest) String() string { - return fmt.Sprintf("[GET /auth/v1/callback][%d] serviceBrokerAuthCallbackBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /auth/v1/callback][%d] serviceBrokerAuthCallbackBadRequest %s", 400, payload) } func (o *ServiceBrokerAuthCallbackBadRequest) GetPayload() *models.Error { @@ -245,11 +250,13 @@ func (o *ServiceBrokerAuthCallbackUnauthorized) Code() int { } func (o *ServiceBrokerAuthCallbackUnauthorized) Error() string { - return fmt.Sprintf("[GET /auth/v1/callback][%d] serviceBrokerAuthCallbackUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /auth/v1/callback][%d] serviceBrokerAuthCallbackUnauthorized %s", 401, payload) } func (o *ServiceBrokerAuthCallbackUnauthorized) String() string { - return fmt.Sprintf("[GET /auth/v1/callback][%d] serviceBrokerAuthCallbackUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /auth/v1/callback][%d] serviceBrokerAuthCallbackUnauthorized %s", 401, payload) } func (o *ServiceBrokerAuthCallbackUnauthorized) GetPayload() *models.Error { @@ -313,11 +320,13 @@ func (o *ServiceBrokerAuthCallbackForbidden) Code() int { } func (o *ServiceBrokerAuthCallbackForbidden) Error() string { - return fmt.Sprintf("[GET /auth/v1/callback][%d] serviceBrokerAuthCallbackForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /auth/v1/callback][%d] serviceBrokerAuthCallbackForbidden %s", 403, payload) } func (o *ServiceBrokerAuthCallbackForbidden) String() string { - return fmt.Sprintf("[GET /auth/v1/callback][%d] serviceBrokerAuthCallbackForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /auth/v1/callback][%d] serviceBrokerAuthCallbackForbidden %s", 403, payload) } func (o *ServiceBrokerAuthCallbackForbidden) GetPayload() *models.Error { @@ -381,11 +390,13 @@ func (o *ServiceBrokerAuthCallbackNotFound) Code() int { } func (o *ServiceBrokerAuthCallbackNotFound) Error() string { - return fmt.Sprintf("[GET /auth/v1/callback][%d] serviceBrokerAuthCallbackNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /auth/v1/callback][%d] serviceBrokerAuthCallbackNotFound %s", 404, payload) } func (o *ServiceBrokerAuthCallbackNotFound) String() string { - return fmt.Sprintf("[GET /auth/v1/callback][%d] serviceBrokerAuthCallbackNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /auth/v1/callback][%d] serviceBrokerAuthCallbackNotFound %s", 404, payload) } func (o *ServiceBrokerAuthCallbackNotFound) GetPayload() *models.Error { @@ -449,11 +460,13 @@ func (o *ServiceBrokerAuthCallbackInternalServerError) Code() int { } func (o *ServiceBrokerAuthCallbackInternalServerError) Error() string { - return fmt.Sprintf("[GET /auth/v1/callback][%d] serviceBrokerAuthCallbackInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /auth/v1/callback][%d] serviceBrokerAuthCallbackInternalServerError %s", 500, payload) } func (o *ServiceBrokerAuthCallbackInternalServerError) String() string { - return fmt.Sprintf("[GET /auth/v1/callback][%d] serviceBrokerAuthCallbackInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /auth/v1/callback][%d] serviceBrokerAuthCallbackInternalServerError %s", 500, payload) } func (o *ServiceBrokerAuthCallbackInternalServerError) GetPayload() *models.Error { diff --git a/power/client/authentication/service_broker_auth_device_code_post_responses.go b/power/client/authentication/service_broker_auth_device_code_post_responses.go index 6834f289..273f5fcd 100644 --- a/power/client/authentication/service_broker_auth_device_code_post_responses.go +++ b/power/client/authentication/service_broker_auth_device_code_post_responses.go @@ -6,6 +6,7 @@ package authentication // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -109,11 +110,13 @@ func (o *ServiceBrokerAuthDeviceCodePostOK) Code() int { } func (o *ServiceBrokerAuthDeviceCodePostOK) Error() string { - return fmt.Sprintf("[POST /auth/v1/device/code][%d] serviceBrokerAuthDeviceCodePostOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /auth/v1/device/code][%d] serviceBrokerAuthDeviceCodePostOK %s", 200, payload) } func (o *ServiceBrokerAuthDeviceCodePostOK) String() string { - return fmt.Sprintf("[POST /auth/v1/device/code][%d] serviceBrokerAuthDeviceCodePostOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /auth/v1/device/code][%d] serviceBrokerAuthDeviceCodePostOK %s", 200, payload) } func (o *ServiceBrokerAuthDeviceCodePostOK) GetPayload() *models.DeviceCode { @@ -177,11 +180,13 @@ func (o *ServiceBrokerAuthDeviceCodePostBadRequest) Code() int { } func (o *ServiceBrokerAuthDeviceCodePostBadRequest) Error() string { - return fmt.Sprintf("[POST /auth/v1/device/code][%d] serviceBrokerAuthDeviceCodePostBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /auth/v1/device/code][%d] serviceBrokerAuthDeviceCodePostBadRequest %s", 400, payload) } func (o *ServiceBrokerAuthDeviceCodePostBadRequest) String() string { - return fmt.Sprintf("[POST /auth/v1/device/code][%d] serviceBrokerAuthDeviceCodePostBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /auth/v1/device/code][%d] serviceBrokerAuthDeviceCodePostBadRequest %s", 400, payload) } func (o *ServiceBrokerAuthDeviceCodePostBadRequest) GetPayload() *models.Error { @@ -245,11 +250,13 @@ func (o *ServiceBrokerAuthDeviceCodePostUnauthorized) Code() int { } func (o *ServiceBrokerAuthDeviceCodePostUnauthorized) Error() string { - return fmt.Sprintf("[POST /auth/v1/device/code][%d] serviceBrokerAuthDeviceCodePostUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /auth/v1/device/code][%d] serviceBrokerAuthDeviceCodePostUnauthorized %s", 401, payload) } func (o *ServiceBrokerAuthDeviceCodePostUnauthorized) String() string { - return fmt.Sprintf("[POST /auth/v1/device/code][%d] serviceBrokerAuthDeviceCodePostUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /auth/v1/device/code][%d] serviceBrokerAuthDeviceCodePostUnauthorized %s", 401, payload) } func (o *ServiceBrokerAuthDeviceCodePostUnauthorized) GetPayload() *models.Error { @@ -313,11 +320,13 @@ func (o *ServiceBrokerAuthDeviceCodePostForbidden) Code() int { } func (o *ServiceBrokerAuthDeviceCodePostForbidden) Error() string { - return fmt.Sprintf("[POST /auth/v1/device/code][%d] serviceBrokerAuthDeviceCodePostForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /auth/v1/device/code][%d] serviceBrokerAuthDeviceCodePostForbidden %s", 403, payload) } func (o *ServiceBrokerAuthDeviceCodePostForbidden) String() string { - return fmt.Sprintf("[POST /auth/v1/device/code][%d] serviceBrokerAuthDeviceCodePostForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /auth/v1/device/code][%d] serviceBrokerAuthDeviceCodePostForbidden %s", 403, payload) } func (o *ServiceBrokerAuthDeviceCodePostForbidden) GetPayload() *models.Error { @@ -381,11 +390,13 @@ func (o *ServiceBrokerAuthDeviceCodePostNotFound) Code() int { } func (o *ServiceBrokerAuthDeviceCodePostNotFound) Error() string { - return fmt.Sprintf("[POST /auth/v1/device/code][%d] serviceBrokerAuthDeviceCodePostNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /auth/v1/device/code][%d] serviceBrokerAuthDeviceCodePostNotFound %s", 404, payload) } func (o *ServiceBrokerAuthDeviceCodePostNotFound) String() string { - return fmt.Sprintf("[POST /auth/v1/device/code][%d] serviceBrokerAuthDeviceCodePostNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /auth/v1/device/code][%d] serviceBrokerAuthDeviceCodePostNotFound %s", 404, payload) } func (o *ServiceBrokerAuthDeviceCodePostNotFound) GetPayload() *models.Error { @@ -449,11 +460,13 @@ func (o *ServiceBrokerAuthDeviceCodePostInternalServerError) Code() int { } func (o *ServiceBrokerAuthDeviceCodePostInternalServerError) Error() string { - return fmt.Sprintf("[POST /auth/v1/device/code][%d] serviceBrokerAuthDeviceCodePostInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /auth/v1/device/code][%d] serviceBrokerAuthDeviceCodePostInternalServerError %s", 500, payload) } func (o *ServiceBrokerAuthDeviceCodePostInternalServerError) String() string { - return fmt.Sprintf("[POST /auth/v1/device/code][%d] serviceBrokerAuthDeviceCodePostInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /auth/v1/device/code][%d] serviceBrokerAuthDeviceCodePostInternalServerError %s", 500, payload) } func (o *ServiceBrokerAuthDeviceCodePostInternalServerError) GetPayload() *models.Error { diff --git a/power/client/authentication/service_broker_auth_device_token_post_responses.go b/power/client/authentication/service_broker_auth_device_token_post_responses.go index 1fe6d724..511eb84b 100644 --- a/power/client/authentication/service_broker_auth_device_token_post_responses.go +++ b/power/client/authentication/service_broker_auth_device_token_post_responses.go @@ -7,6 +7,7 @@ package authentication import ( "context" + "encoding/json" "fmt" "io" @@ -117,11 +118,13 @@ func (o *ServiceBrokerAuthDeviceTokenPostOK) Code() int { } func (o *ServiceBrokerAuthDeviceTokenPostOK) Error() string { - return fmt.Sprintf("[POST /auth/v1/device/token][%d] serviceBrokerAuthDeviceTokenPostOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /auth/v1/device/token][%d] serviceBrokerAuthDeviceTokenPostOK %s", 200, payload) } func (o *ServiceBrokerAuthDeviceTokenPostOK) String() string { - return fmt.Sprintf("[POST /auth/v1/device/token][%d] serviceBrokerAuthDeviceTokenPostOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /auth/v1/device/token][%d] serviceBrokerAuthDeviceTokenPostOK %s", 200, payload) } func (o *ServiceBrokerAuthDeviceTokenPostOK) GetPayload() *models.Token { @@ -185,11 +188,13 @@ func (o *ServiceBrokerAuthDeviceTokenPostBadRequest) Code() int { } func (o *ServiceBrokerAuthDeviceTokenPostBadRequest) Error() string { - return fmt.Sprintf("[POST /auth/v1/device/token][%d] serviceBrokerAuthDeviceTokenPostBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /auth/v1/device/token][%d] serviceBrokerAuthDeviceTokenPostBadRequest %s", 400, payload) } func (o *ServiceBrokerAuthDeviceTokenPostBadRequest) String() string { - return fmt.Sprintf("[POST /auth/v1/device/token][%d] serviceBrokerAuthDeviceTokenPostBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /auth/v1/device/token][%d] serviceBrokerAuthDeviceTokenPostBadRequest %s", 400, payload) } func (o *ServiceBrokerAuthDeviceTokenPostBadRequest) GetPayload() *models.Error { @@ -253,11 +258,13 @@ func (o *ServiceBrokerAuthDeviceTokenPostUnauthorized) Code() int { } func (o *ServiceBrokerAuthDeviceTokenPostUnauthorized) Error() string { - return fmt.Sprintf("[POST /auth/v1/device/token][%d] serviceBrokerAuthDeviceTokenPostUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /auth/v1/device/token][%d] serviceBrokerAuthDeviceTokenPostUnauthorized %s", 401, payload) } func (o *ServiceBrokerAuthDeviceTokenPostUnauthorized) String() string { - return fmt.Sprintf("[POST /auth/v1/device/token][%d] serviceBrokerAuthDeviceTokenPostUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /auth/v1/device/token][%d] serviceBrokerAuthDeviceTokenPostUnauthorized %s", 401, payload) } func (o *ServiceBrokerAuthDeviceTokenPostUnauthorized) GetPayload() *models.Error { @@ -321,11 +328,13 @@ func (o *ServiceBrokerAuthDeviceTokenPostForbidden) Code() int { } func (o *ServiceBrokerAuthDeviceTokenPostForbidden) Error() string { - return fmt.Sprintf("[POST /auth/v1/device/token][%d] serviceBrokerAuthDeviceTokenPostForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /auth/v1/device/token][%d] serviceBrokerAuthDeviceTokenPostForbidden %s", 403, payload) } func (o *ServiceBrokerAuthDeviceTokenPostForbidden) String() string { - return fmt.Sprintf("[POST /auth/v1/device/token][%d] serviceBrokerAuthDeviceTokenPostForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /auth/v1/device/token][%d] serviceBrokerAuthDeviceTokenPostForbidden %s", 403, payload) } func (o *ServiceBrokerAuthDeviceTokenPostForbidden) GetPayload() *models.Error { @@ -389,11 +398,13 @@ func (o *ServiceBrokerAuthDeviceTokenPostNotFound) Code() int { } func (o *ServiceBrokerAuthDeviceTokenPostNotFound) Error() string { - return fmt.Sprintf("[POST /auth/v1/device/token][%d] serviceBrokerAuthDeviceTokenPostNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /auth/v1/device/token][%d] serviceBrokerAuthDeviceTokenPostNotFound %s", 404, payload) } func (o *ServiceBrokerAuthDeviceTokenPostNotFound) String() string { - return fmt.Sprintf("[POST /auth/v1/device/token][%d] serviceBrokerAuthDeviceTokenPostNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /auth/v1/device/token][%d] serviceBrokerAuthDeviceTokenPostNotFound %s", 404, payload) } func (o *ServiceBrokerAuthDeviceTokenPostNotFound) GetPayload() *models.Error { @@ -457,11 +468,13 @@ func (o *ServiceBrokerAuthDeviceTokenPostTooManyRequests) Code() int { } func (o *ServiceBrokerAuthDeviceTokenPostTooManyRequests) Error() string { - return fmt.Sprintf("[POST /auth/v1/device/token][%d] serviceBrokerAuthDeviceTokenPostTooManyRequests %+v", 429, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /auth/v1/device/token][%d] serviceBrokerAuthDeviceTokenPostTooManyRequests %s", 429, payload) } func (o *ServiceBrokerAuthDeviceTokenPostTooManyRequests) String() string { - return fmt.Sprintf("[POST /auth/v1/device/token][%d] serviceBrokerAuthDeviceTokenPostTooManyRequests %+v", 429, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /auth/v1/device/token][%d] serviceBrokerAuthDeviceTokenPostTooManyRequests %s", 429, payload) } func (o *ServiceBrokerAuthDeviceTokenPostTooManyRequests) GetPayload() *models.Error { @@ -525,11 +538,13 @@ func (o *ServiceBrokerAuthDeviceTokenPostInternalServerError) Code() int { } func (o *ServiceBrokerAuthDeviceTokenPostInternalServerError) Error() string { - return fmt.Sprintf("[POST /auth/v1/device/token][%d] serviceBrokerAuthDeviceTokenPostInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /auth/v1/device/token][%d] serviceBrokerAuthDeviceTokenPostInternalServerError %s", 500, payload) } func (o *ServiceBrokerAuthDeviceTokenPostInternalServerError) String() string { - return fmt.Sprintf("[POST /auth/v1/device/token][%d] serviceBrokerAuthDeviceTokenPostInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /auth/v1/device/token][%d] serviceBrokerAuthDeviceTokenPostInternalServerError %s", 500, payload) } func (o *ServiceBrokerAuthDeviceTokenPostInternalServerError) GetPayload() *models.Error { diff --git a/power/client/authentication/service_broker_auth_info_token_responses.go b/power/client/authentication/service_broker_auth_info_token_responses.go index 36886cd2..c9ad50f4 100644 --- a/power/client/authentication/service_broker_auth_info_token_responses.go +++ b/power/client/authentication/service_broker_auth_info_token_responses.go @@ -6,6 +6,7 @@ package authentication // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -109,11 +110,13 @@ func (o *ServiceBrokerAuthInfoTokenOK) Code() int { } func (o *ServiceBrokerAuthInfoTokenOK) Error() string { - return fmt.Sprintf("[GET /auth/v1/info/token][%d] serviceBrokerAuthInfoTokenOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /auth/v1/info/token][%d] serviceBrokerAuthInfoTokenOK %s", 200, payload) } func (o *ServiceBrokerAuthInfoTokenOK) String() string { - return fmt.Sprintf("[GET /auth/v1/info/token][%d] serviceBrokerAuthInfoTokenOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /auth/v1/info/token][%d] serviceBrokerAuthInfoTokenOK %s", 200, payload) } func (o *ServiceBrokerAuthInfoTokenOK) GetPayload() *models.TokenExtra { @@ -177,11 +180,13 @@ func (o *ServiceBrokerAuthInfoTokenBadRequest) Code() int { } func (o *ServiceBrokerAuthInfoTokenBadRequest) Error() string { - return fmt.Sprintf("[GET /auth/v1/info/token][%d] serviceBrokerAuthInfoTokenBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /auth/v1/info/token][%d] serviceBrokerAuthInfoTokenBadRequest %s", 400, payload) } func (o *ServiceBrokerAuthInfoTokenBadRequest) String() string { - return fmt.Sprintf("[GET /auth/v1/info/token][%d] serviceBrokerAuthInfoTokenBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /auth/v1/info/token][%d] serviceBrokerAuthInfoTokenBadRequest %s", 400, payload) } func (o *ServiceBrokerAuthInfoTokenBadRequest) GetPayload() *models.Error { @@ -245,11 +250,13 @@ func (o *ServiceBrokerAuthInfoTokenUnauthorized) Code() int { } func (o *ServiceBrokerAuthInfoTokenUnauthorized) Error() string { - return fmt.Sprintf("[GET /auth/v1/info/token][%d] serviceBrokerAuthInfoTokenUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /auth/v1/info/token][%d] serviceBrokerAuthInfoTokenUnauthorized %s", 401, payload) } func (o *ServiceBrokerAuthInfoTokenUnauthorized) String() string { - return fmt.Sprintf("[GET /auth/v1/info/token][%d] serviceBrokerAuthInfoTokenUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /auth/v1/info/token][%d] serviceBrokerAuthInfoTokenUnauthorized %s", 401, payload) } func (o *ServiceBrokerAuthInfoTokenUnauthorized) GetPayload() *models.Error { @@ -313,11 +320,13 @@ func (o *ServiceBrokerAuthInfoTokenForbidden) Code() int { } func (o *ServiceBrokerAuthInfoTokenForbidden) Error() string { - return fmt.Sprintf("[GET /auth/v1/info/token][%d] serviceBrokerAuthInfoTokenForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /auth/v1/info/token][%d] serviceBrokerAuthInfoTokenForbidden %s", 403, payload) } func (o *ServiceBrokerAuthInfoTokenForbidden) String() string { - return fmt.Sprintf("[GET /auth/v1/info/token][%d] serviceBrokerAuthInfoTokenForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /auth/v1/info/token][%d] serviceBrokerAuthInfoTokenForbidden %s", 403, payload) } func (o *ServiceBrokerAuthInfoTokenForbidden) GetPayload() *models.Error { @@ -381,11 +390,13 @@ func (o *ServiceBrokerAuthInfoTokenNotFound) Code() int { } func (o *ServiceBrokerAuthInfoTokenNotFound) Error() string { - return fmt.Sprintf("[GET /auth/v1/info/token][%d] serviceBrokerAuthInfoTokenNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /auth/v1/info/token][%d] serviceBrokerAuthInfoTokenNotFound %s", 404, payload) } func (o *ServiceBrokerAuthInfoTokenNotFound) String() string { - return fmt.Sprintf("[GET /auth/v1/info/token][%d] serviceBrokerAuthInfoTokenNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /auth/v1/info/token][%d] serviceBrokerAuthInfoTokenNotFound %s", 404, payload) } func (o *ServiceBrokerAuthInfoTokenNotFound) GetPayload() *models.Error { @@ -449,11 +460,13 @@ func (o *ServiceBrokerAuthInfoTokenInternalServerError) Code() int { } func (o *ServiceBrokerAuthInfoTokenInternalServerError) Error() string { - return fmt.Sprintf("[GET /auth/v1/info/token][%d] serviceBrokerAuthInfoTokenInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /auth/v1/info/token][%d] serviceBrokerAuthInfoTokenInternalServerError %s", 500, payload) } func (o *ServiceBrokerAuthInfoTokenInternalServerError) String() string { - return fmt.Sprintf("[GET /auth/v1/info/token][%d] serviceBrokerAuthInfoTokenInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /auth/v1/info/token][%d] serviceBrokerAuthInfoTokenInternalServerError %s", 500, payload) } func (o *ServiceBrokerAuthInfoTokenInternalServerError) GetPayload() *models.Error { diff --git a/power/client/authentication/service_broker_auth_info_user_responses.go b/power/client/authentication/service_broker_auth_info_user_responses.go index 5fffd210..672d5a39 100644 --- a/power/client/authentication/service_broker_auth_info_user_responses.go +++ b/power/client/authentication/service_broker_auth_info_user_responses.go @@ -6,6 +6,7 @@ package authentication // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -109,11 +110,13 @@ func (o *ServiceBrokerAuthInfoUserOK) Code() int { } func (o *ServiceBrokerAuthInfoUserOK) Error() string { - return fmt.Sprintf("[GET /auth/v1/info/user][%d] serviceBrokerAuthInfoUserOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /auth/v1/info/user][%d] serviceBrokerAuthInfoUserOK %s", 200, payload) } func (o *ServiceBrokerAuthInfoUserOK) String() string { - return fmt.Sprintf("[GET /auth/v1/info/user][%d] serviceBrokerAuthInfoUserOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /auth/v1/info/user][%d] serviceBrokerAuthInfoUserOK %s", 200, payload) } func (o *ServiceBrokerAuthInfoUserOK) GetPayload() *models.UserInfo { @@ -177,11 +180,13 @@ func (o *ServiceBrokerAuthInfoUserBadRequest) Code() int { } func (o *ServiceBrokerAuthInfoUserBadRequest) Error() string { - return fmt.Sprintf("[GET /auth/v1/info/user][%d] serviceBrokerAuthInfoUserBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /auth/v1/info/user][%d] serviceBrokerAuthInfoUserBadRequest %s", 400, payload) } func (o *ServiceBrokerAuthInfoUserBadRequest) String() string { - return fmt.Sprintf("[GET /auth/v1/info/user][%d] serviceBrokerAuthInfoUserBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /auth/v1/info/user][%d] serviceBrokerAuthInfoUserBadRequest %s", 400, payload) } func (o *ServiceBrokerAuthInfoUserBadRequest) GetPayload() *models.Error { @@ -245,11 +250,13 @@ func (o *ServiceBrokerAuthInfoUserUnauthorized) Code() int { } func (o *ServiceBrokerAuthInfoUserUnauthorized) Error() string { - return fmt.Sprintf("[GET /auth/v1/info/user][%d] serviceBrokerAuthInfoUserUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /auth/v1/info/user][%d] serviceBrokerAuthInfoUserUnauthorized %s", 401, payload) } func (o *ServiceBrokerAuthInfoUserUnauthorized) String() string { - return fmt.Sprintf("[GET /auth/v1/info/user][%d] serviceBrokerAuthInfoUserUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /auth/v1/info/user][%d] serviceBrokerAuthInfoUserUnauthorized %s", 401, payload) } func (o *ServiceBrokerAuthInfoUserUnauthorized) GetPayload() *models.Error { @@ -313,11 +320,13 @@ func (o *ServiceBrokerAuthInfoUserForbidden) Code() int { } func (o *ServiceBrokerAuthInfoUserForbidden) Error() string { - return fmt.Sprintf("[GET /auth/v1/info/user][%d] serviceBrokerAuthInfoUserForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /auth/v1/info/user][%d] serviceBrokerAuthInfoUserForbidden %s", 403, payload) } func (o *ServiceBrokerAuthInfoUserForbidden) String() string { - return fmt.Sprintf("[GET /auth/v1/info/user][%d] serviceBrokerAuthInfoUserForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /auth/v1/info/user][%d] serviceBrokerAuthInfoUserForbidden %s", 403, payload) } func (o *ServiceBrokerAuthInfoUserForbidden) GetPayload() *models.Error { @@ -381,11 +390,13 @@ func (o *ServiceBrokerAuthInfoUserNotFound) Code() int { } func (o *ServiceBrokerAuthInfoUserNotFound) Error() string { - return fmt.Sprintf("[GET /auth/v1/info/user][%d] serviceBrokerAuthInfoUserNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /auth/v1/info/user][%d] serviceBrokerAuthInfoUserNotFound %s", 404, payload) } func (o *ServiceBrokerAuthInfoUserNotFound) String() string { - return fmt.Sprintf("[GET /auth/v1/info/user][%d] serviceBrokerAuthInfoUserNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /auth/v1/info/user][%d] serviceBrokerAuthInfoUserNotFound %s", 404, payload) } func (o *ServiceBrokerAuthInfoUserNotFound) GetPayload() *models.Error { @@ -449,11 +460,13 @@ func (o *ServiceBrokerAuthInfoUserInternalServerError) Code() int { } func (o *ServiceBrokerAuthInfoUserInternalServerError) Error() string { - return fmt.Sprintf("[GET /auth/v1/info/user][%d] serviceBrokerAuthInfoUserInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /auth/v1/info/user][%d] serviceBrokerAuthInfoUserInternalServerError %s", 500, payload) } func (o *ServiceBrokerAuthInfoUserInternalServerError) String() string { - return fmt.Sprintf("[GET /auth/v1/info/user][%d] serviceBrokerAuthInfoUserInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /auth/v1/info/user][%d] serviceBrokerAuthInfoUserInternalServerError %s", 500, payload) } func (o *ServiceBrokerAuthInfoUserInternalServerError) GetPayload() *models.Error { diff --git a/power/client/authentication/service_broker_auth_login_responses.go b/power/client/authentication/service_broker_auth_login_responses.go index 7500d6e1..1836f4f9 100644 --- a/power/client/authentication/service_broker_auth_login_responses.go +++ b/power/client/authentication/service_broker_auth_login_responses.go @@ -6,6 +6,7 @@ package authentication // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -109,11 +110,13 @@ func (o *ServiceBrokerAuthLoginOK) Code() int { } func (o *ServiceBrokerAuthLoginOK) Error() string { - return fmt.Sprintf("[GET /auth/v1/login][%d] serviceBrokerAuthLoginOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /auth/v1/login][%d] serviceBrokerAuthLoginOK %s", 200, payload) } func (o *ServiceBrokerAuthLoginOK) String() string { - return fmt.Sprintf("[GET /auth/v1/login][%d] serviceBrokerAuthLoginOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /auth/v1/login][%d] serviceBrokerAuthLoginOK %s", 200, payload) } func (o *ServiceBrokerAuthLoginOK) GetPayload() *models.AccessToken { @@ -177,11 +180,13 @@ func (o *ServiceBrokerAuthLoginBadRequest) Code() int { } func (o *ServiceBrokerAuthLoginBadRequest) Error() string { - return fmt.Sprintf("[GET /auth/v1/login][%d] serviceBrokerAuthLoginBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /auth/v1/login][%d] serviceBrokerAuthLoginBadRequest %s", 400, payload) } func (o *ServiceBrokerAuthLoginBadRequest) String() string { - return fmt.Sprintf("[GET /auth/v1/login][%d] serviceBrokerAuthLoginBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /auth/v1/login][%d] serviceBrokerAuthLoginBadRequest %s", 400, payload) } func (o *ServiceBrokerAuthLoginBadRequest) GetPayload() *models.Error { @@ -245,11 +250,13 @@ func (o *ServiceBrokerAuthLoginUnauthorized) Code() int { } func (o *ServiceBrokerAuthLoginUnauthorized) Error() string { - return fmt.Sprintf("[GET /auth/v1/login][%d] serviceBrokerAuthLoginUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /auth/v1/login][%d] serviceBrokerAuthLoginUnauthorized %s", 401, payload) } func (o *ServiceBrokerAuthLoginUnauthorized) String() string { - return fmt.Sprintf("[GET /auth/v1/login][%d] serviceBrokerAuthLoginUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /auth/v1/login][%d] serviceBrokerAuthLoginUnauthorized %s", 401, payload) } func (o *ServiceBrokerAuthLoginUnauthorized) GetPayload() *models.Error { @@ -313,11 +320,13 @@ func (o *ServiceBrokerAuthLoginForbidden) Code() int { } func (o *ServiceBrokerAuthLoginForbidden) Error() string { - return fmt.Sprintf("[GET /auth/v1/login][%d] serviceBrokerAuthLoginForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /auth/v1/login][%d] serviceBrokerAuthLoginForbidden %s", 403, payload) } func (o *ServiceBrokerAuthLoginForbidden) String() string { - return fmt.Sprintf("[GET /auth/v1/login][%d] serviceBrokerAuthLoginForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /auth/v1/login][%d] serviceBrokerAuthLoginForbidden %s", 403, payload) } func (o *ServiceBrokerAuthLoginForbidden) GetPayload() *models.Error { @@ -381,11 +390,13 @@ func (o *ServiceBrokerAuthLoginNotFound) Code() int { } func (o *ServiceBrokerAuthLoginNotFound) Error() string { - return fmt.Sprintf("[GET /auth/v1/login][%d] serviceBrokerAuthLoginNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /auth/v1/login][%d] serviceBrokerAuthLoginNotFound %s", 404, payload) } func (o *ServiceBrokerAuthLoginNotFound) String() string { - return fmt.Sprintf("[GET /auth/v1/login][%d] serviceBrokerAuthLoginNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /auth/v1/login][%d] serviceBrokerAuthLoginNotFound %s", 404, payload) } func (o *ServiceBrokerAuthLoginNotFound) GetPayload() *models.Error { @@ -449,11 +460,13 @@ func (o *ServiceBrokerAuthLoginInternalServerError) Code() int { } func (o *ServiceBrokerAuthLoginInternalServerError) Error() string { - return fmt.Sprintf("[GET /auth/v1/login][%d] serviceBrokerAuthLoginInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /auth/v1/login][%d] serviceBrokerAuthLoginInternalServerError %s", 500, payload) } func (o *ServiceBrokerAuthLoginInternalServerError) String() string { - return fmt.Sprintf("[GET /auth/v1/login][%d] serviceBrokerAuthLoginInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /auth/v1/login][%d] serviceBrokerAuthLoginInternalServerError %s", 500, payload) } func (o *ServiceBrokerAuthLoginInternalServerError) GetPayload() *models.Error { diff --git a/power/client/authentication/service_broker_auth_logout_responses.go b/power/client/authentication/service_broker_auth_logout_responses.go index d1ef9e2c..fabf4561 100644 --- a/power/client/authentication/service_broker_auth_logout_responses.go +++ b/power/client/authentication/service_broker_auth_logout_responses.go @@ -6,6 +6,7 @@ package authentication // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -109,11 +110,13 @@ func (o *ServiceBrokerAuthLogoutOK) Code() int { } func (o *ServiceBrokerAuthLogoutOK) Error() string { - return fmt.Sprintf("[GET /auth/v1/logout][%d] serviceBrokerAuthLogoutOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /auth/v1/logout][%d] serviceBrokerAuthLogoutOK %s", 200, payload) } func (o *ServiceBrokerAuthLogoutOK) String() string { - return fmt.Sprintf("[GET /auth/v1/logout][%d] serviceBrokerAuthLogoutOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /auth/v1/logout][%d] serviceBrokerAuthLogoutOK %s", 200, payload) } func (o *ServiceBrokerAuthLogoutOK) GetPayload() models.Object { @@ -175,11 +178,13 @@ func (o *ServiceBrokerAuthLogoutBadRequest) Code() int { } func (o *ServiceBrokerAuthLogoutBadRequest) Error() string { - return fmt.Sprintf("[GET /auth/v1/logout][%d] serviceBrokerAuthLogoutBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /auth/v1/logout][%d] serviceBrokerAuthLogoutBadRequest %s", 400, payload) } func (o *ServiceBrokerAuthLogoutBadRequest) String() string { - return fmt.Sprintf("[GET /auth/v1/logout][%d] serviceBrokerAuthLogoutBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /auth/v1/logout][%d] serviceBrokerAuthLogoutBadRequest %s", 400, payload) } func (o *ServiceBrokerAuthLogoutBadRequest) GetPayload() *models.Error { @@ -243,11 +248,13 @@ func (o *ServiceBrokerAuthLogoutUnauthorized) Code() int { } func (o *ServiceBrokerAuthLogoutUnauthorized) Error() string { - return fmt.Sprintf("[GET /auth/v1/logout][%d] serviceBrokerAuthLogoutUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /auth/v1/logout][%d] serviceBrokerAuthLogoutUnauthorized %s", 401, payload) } func (o *ServiceBrokerAuthLogoutUnauthorized) String() string { - return fmt.Sprintf("[GET /auth/v1/logout][%d] serviceBrokerAuthLogoutUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /auth/v1/logout][%d] serviceBrokerAuthLogoutUnauthorized %s", 401, payload) } func (o *ServiceBrokerAuthLogoutUnauthorized) GetPayload() *models.Error { @@ -311,11 +318,13 @@ func (o *ServiceBrokerAuthLogoutForbidden) Code() int { } func (o *ServiceBrokerAuthLogoutForbidden) Error() string { - return fmt.Sprintf("[GET /auth/v1/logout][%d] serviceBrokerAuthLogoutForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /auth/v1/logout][%d] serviceBrokerAuthLogoutForbidden %s", 403, payload) } func (o *ServiceBrokerAuthLogoutForbidden) String() string { - return fmt.Sprintf("[GET /auth/v1/logout][%d] serviceBrokerAuthLogoutForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /auth/v1/logout][%d] serviceBrokerAuthLogoutForbidden %s", 403, payload) } func (o *ServiceBrokerAuthLogoutForbidden) GetPayload() *models.Error { @@ -379,11 +388,13 @@ func (o *ServiceBrokerAuthLogoutNotFound) Code() int { } func (o *ServiceBrokerAuthLogoutNotFound) Error() string { - return fmt.Sprintf("[GET /auth/v1/logout][%d] serviceBrokerAuthLogoutNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /auth/v1/logout][%d] serviceBrokerAuthLogoutNotFound %s", 404, payload) } func (o *ServiceBrokerAuthLogoutNotFound) String() string { - return fmt.Sprintf("[GET /auth/v1/logout][%d] serviceBrokerAuthLogoutNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /auth/v1/logout][%d] serviceBrokerAuthLogoutNotFound %s", 404, payload) } func (o *ServiceBrokerAuthLogoutNotFound) GetPayload() *models.Error { @@ -447,11 +458,13 @@ func (o *ServiceBrokerAuthLogoutInternalServerError) Code() int { } func (o *ServiceBrokerAuthLogoutInternalServerError) Error() string { - return fmt.Sprintf("[GET /auth/v1/logout][%d] serviceBrokerAuthLogoutInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /auth/v1/logout][%d] serviceBrokerAuthLogoutInternalServerError %s", 500, payload) } func (o *ServiceBrokerAuthLogoutInternalServerError) String() string { - return fmt.Sprintf("[GET /auth/v1/logout][%d] serviceBrokerAuthLogoutInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /auth/v1/logout][%d] serviceBrokerAuthLogoutInternalServerError %s", 500, payload) } func (o *ServiceBrokerAuthLogoutInternalServerError) GetPayload() *models.Error { diff --git a/power/client/authentication/service_broker_auth_registration_callback_responses.go b/power/client/authentication/service_broker_auth_registration_callback_responses.go index 2833807d..85f55348 100644 --- a/power/client/authentication/service_broker_auth_registration_callback_responses.go +++ b/power/client/authentication/service_broker_auth_registration_callback_responses.go @@ -6,6 +6,7 @@ package authentication // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -109,11 +110,13 @@ func (o *ServiceBrokerAuthRegistrationCallbackOK) Code() int { } func (o *ServiceBrokerAuthRegistrationCallbackOK) Error() string { - return fmt.Sprintf("[GET /auth/v1/callback-registration][%d] serviceBrokerAuthRegistrationCallbackOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /auth/v1/callback-registration][%d] serviceBrokerAuthRegistrationCallbackOK %s", 200, payload) } func (o *ServiceBrokerAuthRegistrationCallbackOK) String() string { - return fmt.Sprintf("[GET /auth/v1/callback-registration][%d] serviceBrokerAuthRegistrationCallbackOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /auth/v1/callback-registration][%d] serviceBrokerAuthRegistrationCallbackOK %s", 200, payload) } func (o *ServiceBrokerAuthRegistrationCallbackOK) GetPayload() *models.AccessToken { @@ -177,11 +180,13 @@ func (o *ServiceBrokerAuthRegistrationCallbackBadRequest) Code() int { } func (o *ServiceBrokerAuthRegistrationCallbackBadRequest) Error() string { - return fmt.Sprintf("[GET /auth/v1/callback-registration][%d] serviceBrokerAuthRegistrationCallbackBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /auth/v1/callback-registration][%d] serviceBrokerAuthRegistrationCallbackBadRequest %s", 400, payload) } func (o *ServiceBrokerAuthRegistrationCallbackBadRequest) String() string { - return fmt.Sprintf("[GET /auth/v1/callback-registration][%d] serviceBrokerAuthRegistrationCallbackBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /auth/v1/callback-registration][%d] serviceBrokerAuthRegistrationCallbackBadRequest %s", 400, payload) } func (o *ServiceBrokerAuthRegistrationCallbackBadRequest) GetPayload() *models.Error { @@ -245,11 +250,13 @@ func (o *ServiceBrokerAuthRegistrationCallbackUnauthorized) Code() int { } func (o *ServiceBrokerAuthRegistrationCallbackUnauthorized) Error() string { - return fmt.Sprintf("[GET /auth/v1/callback-registration][%d] serviceBrokerAuthRegistrationCallbackUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /auth/v1/callback-registration][%d] serviceBrokerAuthRegistrationCallbackUnauthorized %s", 401, payload) } func (o *ServiceBrokerAuthRegistrationCallbackUnauthorized) String() string { - return fmt.Sprintf("[GET /auth/v1/callback-registration][%d] serviceBrokerAuthRegistrationCallbackUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /auth/v1/callback-registration][%d] serviceBrokerAuthRegistrationCallbackUnauthorized %s", 401, payload) } func (o *ServiceBrokerAuthRegistrationCallbackUnauthorized) GetPayload() *models.Error { @@ -313,11 +320,13 @@ func (o *ServiceBrokerAuthRegistrationCallbackForbidden) Code() int { } func (o *ServiceBrokerAuthRegistrationCallbackForbidden) Error() string { - return fmt.Sprintf("[GET /auth/v1/callback-registration][%d] serviceBrokerAuthRegistrationCallbackForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /auth/v1/callback-registration][%d] serviceBrokerAuthRegistrationCallbackForbidden %s", 403, payload) } func (o *ServiceBrokerAuthRegistrationCallbackForbidden) String() string { - return fmt.Sprintf("[GET /auth/v1/callback-registration][%d] serviceBrokerAuthRegistrationCallbackForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /auth/v1/callback-registration][%d] serviceBrokerAuthRegistrationCallbackForbidden %s", 403, payload) } func (o *ServiceBrokerAuthRegistrationCallbackForbidden) GetPayload() *models.Error { @@ -381,11 +390,13 @@ func (o *ServiceBrokerAuthRegistrationCallbackNotFound) Code() int { } func (o *ServiceBrokerAuthRegistrationCallbackNotFound) Error() string { - return fmt.Sprintf("[GET /auth/v1/callback-registration][%d] serviceBrokerAuthRegistrationCallbackNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /auth/v1/callback-registration][%d] serviceBrokerAuthRegistrationCallbackNotFound %s", 404, payload) } func (o *ServiceBrokerAuthRegistrationCallbackNotFound) String() string { - return fmt.Sprintf("[GET /auth/v1/callback-registration][%d] serviceBrokerAuthRegistrationCallbackNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /auth/v1/callback-registration][%d] serviceBrokerAuthRegistrationCallbackNotFound %s", 404, payload) } func (o *ServiceBrokerAuthRegistrationCallbackNotFound) GetPayload() *models.Error { @@ -449,11 +460,13 @@ func (o *ServiceBrokerAuthRegistrationCallbackInternalServerError) Code() int { } func (o *ServiceBrokerAuthRegistrationCallbackInternalServerError) Error() string { - return fmt.Sprintf("[GET /auth/v1/callback-registration][%d] serviceBrokerAuthRegistrationCallbackInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /auth/v1/callback-registration][%d] serviceBrokerAuthRegistrationCallbackInternalServerError %s", 500, payload) } func (o *ServiceBrokerAuthRegistrationCallbackInternalServerError) String() string { - return fmt.Sprintf("[GET /auth/v1/callback-registration][%d] serviceBrokerAuthRegistrationCallbackInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /auth/v1/callback-registration][%d] serviceBrokerAuthRegistrationCallbackInternalServerError %s", 500, payload) } func (o *ServiceBrokerAuthRegistrationCallbackInternalServerError) GetPayload() *models.Error { diff --git a/power/client/authentication/service_broker_auth_registration_responses.go b/power/client/authentication/service_broker_auth_registration_responses.go index 48a0f28c..3df3f3f5 100644 --- a/power/client/authentication/service_broker_auth_registration_responses.go +++ b/power/client/authentication/service_broker_auth_registration_responses.go @@ -6,6 +6,7 @@ package authentication // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -109,11 +110,13 @@ func (o *ServiceBrokerAuthRegistrationOK) Code() int { } func (o *ServiceBrokerAuthRegistrationOK) Error() string { - return fmt.Sprintf("[GET /auth/v1/registration][%d] serviceBrokerAuthRegistrationOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /auth/v1/registration][%d] serviceBrokerAuthRegistrationOK %s", 200, payload) } func (o *ServiceBrokerAuthRegistrationOK) String() string { - return fmt.Sprintf("[GET /auth/v1/registration][%d] serviceBrokerAuthRegistrationOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /auth/v1/registration][%d] serviceBrokerAuthRegistrationOK %s", 200, payload) } func (o *ServiceBrokerAuthRegistrationOK) GetPayload() *models.AccessToken { @@ -177,11 +180,13 @@ func (o *ServiceBrokerAuthRegistrationBadRequest) Code() int { } func (o *ServiceBrokerAuthRegistrationBadRequest) Error() string { - return fmt.Sprintf("[GET /auth/v1/registration][%d] serviceBrokerAuthRegistrationBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /auth/v1/registration][%d] serviceBrokerAuthRegistrationBadRequest %s", 400, payload) } func (o *ServiceBrokerAuthRegistrationBadRequest) String() string { - return fmt.Sprintf("[GET /auth/v1/registration][%d] serviceBrokerAuthRegistrationBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /auth/v1/registration][%d] serviceBrokerAuthRegistrationBadRequest %s", 400, payload) } func (o *ServiceBrokerAuthRegistrationBadRequest) GetPayload() *models.Error { @@ -245,11 +250,13 @@ func (o *ServiceBrokerAuthRegistrationUnauthorized) Code() int { } func (o *ServiceBrokerAuthRegistrationUnauthorized) Error() string { - return fmt.Sprintf("[GET /auth/v1/registration][%d] serviceBrokerAuthRegistrationUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /auth/v1/registration][%d] serviceBrokerAuthRegistrationUnauthorized %s", 401, payload) } func (o *ServiceBrokerAuthRegistrationUnauthorized) String() string { - return fmt.Sprintf("[GET /auth/v1/registration][%d] serviceBrokerAuthRegistrationUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /auth/v1/registration][%d] serviceBrokerAuthRegistrationUnauthorized %s", 401, payload) } func (o *ServiceBrokerAuthRegistrationUnauthorized) GetPayload() *models.Error { @@ -313,11 +320,13 @@ func (o *ServiceBrokerAuthRegistrationForbidden) Code() int { } func (o *ServiceBrokerAuthRegistrationForbidden) Error() string { - return fmt.Sprintf("[GET /auth/v1/registration][%d] serviceBrokerAuthRegistrationForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /auth/v1/registration][%d] serviceBrokerAuthRegistrationForbidden %s", 403, payload) } func (o *ServiceBrokerAuthRegistrationForbidden) String() string { - return fmt.Sprintf("[GET /auth/v1/registration][%d] serviceBrokerAuthRegistrationForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /auth/v1/registration][%d] serviceBrokerAuthRegistrationForbidden %s", 403, payload) } func (o *ServiceBrokerAuthRegistrationForbidden) GetPayload() *models.Error { @@ -381,11 +390,13 @@ func (o *ServiceBrokerAuthRegistrationNotFound) Code() int { } func (o *ServiceBrokerAuthRegistrationNotFound) Error() string { - return fmt.Sprintf("[GET /auth/v1/registration][%d] serviceBrokerAuthRegistrationNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /auth/v1/registration][%d] serviceBrokerAuthRegistrationNotFound %s", 404, payload) } func (o *ServiceBrokerAuthRegistrationNotFound) String() string { - return fmt.Sprintf("[GET /auth/v1/registration][%d] serviceBrokerAuthRegistrationNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /auth/v1/registration][%d] serviceBrokerAuthRegistrationNotFound %s", 404, payload) } func (o *ServiceBrokerAuthRegistrationNotFound) GetPayload() *models.Error { @@ -449,11 +460,13 @@ func (o *ServiceBrokerAuthRegistrationInternalServerError) Code() int { } func (o *ServiceBrokerAuthRegistrationInternalServerError) Error() string { - return fmt.Sprintf("[GET /auth/v1/registration][%d] serviceBrokerAuthRegistrationInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /auth/v1/registration][%d] serviceBrokerAuthRegistrationInternalServerError %s", 500, payload) } func (o *ServiceBrokerAuthRegistrationInternalServerError) String() string { - return fmt.Sprintf("[GET /auth/v1/registration][%d] serviceBrokerAuthRegistrationInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /auth/v1/registration][%d] serviceBrokerAuthRegistrationInternalServerError %s", 500, payload) } func (o *ServiceBrokerAuthRegistrationInternalServerError) GetPayload() *models.Error { diff --git a/power/client/authentication/service_broker_auth_token_post_responses.go b/power/client/authentication/service_broker_auth_token_post_responses.go index dd493095..cc218ffb 100644 --- a/power/client/authentication/service_broker_auth_token_post_responses.go +++ b/power/client/authentication/service_broker_auth_token_post_responses.go @@ -6,6 +6,7 @@ package authentication // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -115,11 +116,13 @@ func (o *ServiceBrokerAuthTokenPostOK) Code() int { } func (o *ServiceBrokerAuthTokenPostOK) Error() string { - return fmt.Sprintf("[POST /auth/v1/token][%d] serviceBrokerAuthTokenPostOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /auth/v1/token][%d] serviceBrokerAuthTokenPostOK %s", 200, payload) } func (o *ServiceBrokerAuthTokenPostOK) String() string { - return fmt.Sprintf("[POST /auth/v1/token][%d] serviceBrokerAuthTokenPostOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /auth/v1/token][%d] serviceBrokerAuthTokenPostOK %s", 200, payload) } func (o *ServiceBrokerAuthTokenPostOK) GetPayload() *models.Token { @@ -183,11 +186,13 @@ func (o *ServiceBrokerAuthTokenPostBadRequest) Code() int { } func (o *ServiceBrokerAuthTokenPostBadRequest) Error() string { - return fmt.Sprintf("[POST /auth/v1/token][%d] serviceBrokerAuthTokenPostBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /auth/v1/token][%d] serviceBrokerAuthTokenPostBadRequest %s", 400, payload) } func (o *ServiceBrokerAuthTokenPostBadRequest) String() string { - return fmt.Sprintf("[POST /auth/v1/token][%d] serviceBrokerAuthTokenPostBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /auth/v1/token][%d] serviceBrokerAuthTokenPostBadRequest %s", 400, payload) } func (o *ServiceBrokerAuthTokenPostBadRequest) GetPayload() *models.Error { @@ -251,11 +256,13 @@ func (o *ServiceBrokerAuthTokenPostUnauthorized) Code() int { } func (o *ServiceBrokerAuthTokenPostUnauthorized) Error() string { - return fmt.Sprintf("[POST /auth/v1/token][%d] serviceBrokerAuthTokenPostUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /auth/v1/token][%d] serviceBrokerAuthTokenPostUnauthorized %s", 401, payload) } func (o *ServiceBrokerAuthTokenPostUnauthorized) String() string { - return fmt.Sprintf("[POST /auth/v1/token][%d] serviceBrokerAuthTokenPostUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /auth/v1/token][%d] serviceBrokerAuthTokenPostUnauthorized %s", 401, payload) } func (o *ServiceBrokerAuthTokenPostUnauthorized) GetPayload() *models.Error { @@ -319,11 +326,13 @@ func (o *ServiceBrokerAuthTokenPostForbidden) Code() int { } func (o *ServiceBrokerAuthTokenPostForbidden) Error() string { - return fmt.Sprintf("[POST /auth/v1/token][%d] serviceBrokerAuthTokenPostForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /auth/v1/token][%d] serviceBrokerAuthTokenPostForbidden %s", 403, payload) } func (o *ServiceBrokerAuthTokenPostForbidden) String() string { - return fmt.Sprintf("[POST /auth/v1/token][%d] serviceBrokerAuthTokenPostForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /auth/v1/token][%d] serviceBrokerAuthTokenPostForbidden %s", 403, payload) } func (o *ServiceBrokerAuthTokenPostForbidden) GetPayload() *models.Error { @@ -387,11 +396,13 @@ func (o *ServiceBrokerAuthTokenPostNotFound) Code() int { } func (o *ServiceBrokerAuthTokenPostNotFound) Error() string { - return fmt.Sprintf("[POST /auth/v1/token][%d] serviceBrokerAuthTokenPostNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /auth/v1/token][%d] serviceBrokerAuthTokenPostNotFound %s", 404, payload) } func (o *ServiceBrokerAuthTokenPostNotFound) String() string { - return fmt.Sprintf("[POST /auth/v1/token][%d] serviceBrokerAuthTokenPostNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /auth/v1/token][%d] serviceBrokerAuthTokenPostNotFound %s", 404, payload) } func (o *ServiceBrokerAuthTokenPostNotFound) GetPayload() *models.Error { @@ -455,11 +466,13 @@ func (o *ServiceBrokerAuthTokenPostTooManyRequests) Code() int { } func (o *ServiceBrokerAuthTokenPostTooManyRequests) Error() string { - return fmt.Sprintf("[POST /auth/v1/token][%d] serviceBrokerAuthTokenPostTooManyRequests %+v", 429, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /auth/v1/token][%d] serviceBrokerAuthTokenPostTooManyRequests %s", 429, payload) } func (o *ServiceBrokerAuthTokenPostTooManyRequests) String() string { - return fmt.Sprintf("[POST /auth/v1/token][%d] serviceBrokerAuthTokenPostTooManyRequests %+v", 429, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /auth/v1/token][%d] serviceBrokerAuthTokenPostTooManyRequests %s", 429, payload) } func (o *ServiceBrokerAuthTokenPostTooManyRequests) GetPayload() *models.Error { @@ -523,11 +536,13 @@ func (o *ServiceBrokerAuthTokenPostInternalServerError) Code() int { } func (o *ServiceBrokerAuthTokenPostInternalServerError) Error() string { - return fmt.Sprintf("[POST /auth/v1/token][%d] serviceBrokerAuthTokenPostInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /auth/v1/token][%d] serviceBrokerAuthTokenPostInternalServerError %s", 500, payload) } func (o *ServiceBrokerAuthTokenPostInternalServerError) String() string { - return fmt.Sprintf("[POST /auth/v1/token][%d] serviceBrokerAuthTokenPostInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /auth/v1/token][%d] serviceBrokerAuthTokenPostInternalServerError %s", 500, payload) } func (o *ServiceBrokerAuthTokenPostInternalServerError) GetPayload() *models.Error { diff --git a/power/client/bluemix_service_instances/bluemix_service_instance_get_responses.go b/power/client/bluemix_service_instances/bluemix_service_instance_get_responses.go index 27f9fd56..b77f3a34 100644 --- a/power/client/bluemix_service_instances/bluemix_service_instance_get_responses.go +++ b/power/client/bluemix_service_instances/bluemix_service_instance_get_responses.go @@ -6,6 +6,7 @@ package bluemix_service_instances // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -103,11 +104,13 @@ func (o *BluemixServiceInstanceGetOK) Code() int { } func (o *BluemixServiceInstanceGetOK) Error() string { - return fmt.Sprintf("[GET /bluemix_v1/service_instances/{instance_id}][%d] bluemixServiceInstanceGetOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /bluemix_v1/service_instances/{instance_id}][%d] bluemixServiceInstanceGetOK %s", 200, payload) } func (o *BluemixServiceInstanceGetOK) String() string { - return fmt.Sprintf("[GET /bluemix_v1/service_instances/{instance_id}][%d] bluemixServiceInstanceGetOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /bluemix_v1/service_instances/{instance_id}][%d] bluemixServiceInstanceGetOK %s", 200, payload) } func (o *BluemixServiceInstanceGetOK) GetPayload() *models.ServiceInstance { @@ -171,11 +174,13 @@ func (o *BluemixServiceInstanceGetBadRequest) Code() int { } func (o *BluemixServiceInstanceGetBadRequest) Error() string { - return fmt.Sprintf("[GET /bluemix_v1/service_instances/{instance_id}][%d] bluemixServiceInstanceGetBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /bluemix_v1/service_instances/{instance_id}][%d] bluemixServiceInstanceGetBadRequest %s", 400, payload) } func (o *BluemixServiceInstanceGetBadRequest) String() string { - return fmt.Sprintf("[GET /bluemix_v1/service_instances/{instance_id}][%d] bluemixServiceInstanceGetBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /bluemix_v1/service_instances/{instance_id}][%d] bluemixServiceInstanceGetBadRequest %s", 400, payload) } func (o *BluemixServiceInstanceGetBadRequest) GetPayload() *models.Error { @@ -239,11 +244,13 @@ func (o *BluemixServiceInstanceGetUnauthorized) Code() int { } func (o *BluemixServiceInstanceGetUnauthorized) Error() string { - return fmt.Sprintf("[GET /bluemix_v1/service_instances/{instance_id}][%d] bluemixServiceInstanceGetUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /bluemix_v1/service_instances/{instance_id}][%d] bluemixServiceInstanceGetUnauthorized %s", 401, payload) } func (o *BluemixServiceInstanceGetUnauthorized) String() string { - return fmt.Sprintf("[GET /bluemix_v1/service_instances/{instance_id}][%d] bluemixServiceInstanceGetUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /bluemix_v1/service_instances/{instance_id}][%d] bluemixServiceInstanceGetUnauthorized %s", 401, payload) } func (o *BluemixServiceInstanceGetUnauthorized) GetPayload() *models.Error { @@ -307,11 +314,13 @@ func (o *BluemixServiceInstanceGetForbidden) Code() int { } func (o *BluemixServiceInstanceGetForbidden) Error() string { - return fmt.Sprintf("[GET /bluemix_v1/service_instances/{instance_id}][%d] bluemixServiceInstanceGetForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /bluemix_v1/service_instances/{instance_id}][%d] bluemixServiceInstanceGetForbidden %s", 403, payload) } func (o *BluemixServiceInstanceGetForbidden) String() string { - return fmt.Sprintf("[GET /bluemix_v1/service_instances/{instance_id}][%d] bluemixServiceInstanceGetForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /bluemix_v1/service_instances/{instance_id}][%d] bluemixServiceInstanceGetForbidden %s", 403, payload) } func (o *BluemixServiceInstanceGetForbidden) GetPayload() *models.Error { @@ -375,11 +384,13 @@ func (o *BluemixServiceInstanceGetNotFound) Code() int { } func (o *BluemixServiceInstanceGetNotFound) Error() string { - return fmt.Sprintf("[GET /bluemix_v1/service_instances/{instance_id}][%d] bluemixServiceInstanceGetNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /bluemix_v1/service_instances/{instance_id}][%d] bluemixServiceInstanceGetNotFound %s", 404, payload) } func (o *BluemixServiceInstanceGetNotFound) String() string { - return fmt.Sprintf("[GET /bluemix_v1/service_instances/{instance_id}][%d] bluemixServiceInstanceGetNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /bluemix_v1/service_instances/{instance_id}][%d] bluemixServiceInstanceGetNotFound %s", 404, payload) } func (o *BluemixServiceInstanceGetNotFound) GetPayload() *models.Error { diff --git a/power/client/bluemix_service_instances/bluemix_service_instance_put_responses.go b/power/client/bluemix_service_instances/bluemix_service_instance_put_responses.go index 1145f9fd..e930240a 100644 --- a/power/client/bluemix_service_instances/bluemix_service_instance_put_responses.go +++ b/power/client/bluemix_service_instances/bluemix_service_instance_put_responses.go @@ -6,6 +6,7 @@ package bluemix_service_instances // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -103,11 +104,13 @@ func (o *BluemixServiceInstancePutOK) Code() int { } func (o *BluemixServiceInstancePutOK) Error() string { - return fmt.Sprintf("[PUT /bluemix_v1/service_instances/{instance_id}][%d] bluemixServiceInstancePutOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /bluemix_v1/service_instances/{instance_id}][%d] bluemixServiceInstancePutOK %s", 200, payload) } func (o *BluemixServiceInstancePutOK) String() string { - return fmt.Sprintf("[PUT /bluemix_v1/service_instances/{instance_id}][%d] bluemixServiceInstancePutOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /bluemix_v1/service_instances/{instance_id}][%d] bluemixServiceInstancePutOK %s", 200, payload) } func (o *BluemixServiceInstancePutOK) GetPayload() *models.ServiceInstance { @@ -171,11 +174,13 @@ func (o *BluemixServiceInstancePutBadRequest) Code() int { } func (o *BluemixServiceInstancePutBadRequest) Error() string { - return fmt.Sprintf("[PUT /bluemix_v1/service_instances/{instance_id}][%d] bluemixServiceInstancePutBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /bluemix_v1/service_instances/{instance_id}][%d] bluemixServiceInstancePutBadRequest %s", 400, payload) } func (o *BluemixServiceInstancePutBadRequest) String() string { - return fmt.Sprintf("[PUT /bluemix_v1/service_instances/{instance_id}][%d] bluemixServiceInstancePutBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /bluemix_v1/service_instances/{instance_id}][%d] bluemixServiceInstancePutBadRequest %s", 400, payload) } func (o *BluemixServiceInstancePutBadRequest) GetPayload() *models.Error { @@ -239,11 +244,13 @@ func (o *BluemixServiceInstancePutUnauthorized) Code() int { } func (o *BluemixServiceInstancePutUnauthorized) Error() string { - return fmt.Sprintf("[PUT /bluemix_v1/service_instances/{instance_id}][%d] bluemixServiceInstancePutUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /bluemix_v1/service_instances/{instance_id}][%d] bluemixServiceInstancePutUnauthorized %s", 401, payload) } func (o *BluemixServiceInstancePutUnauthorized) String() string { - return fmt.Sprintf("[PUT /bluemix_v1/service_instances/{instance_id}][%d] bluemixServiceInstancePutUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /bluemix_v1/service_instances/{instance_id}][%d] bluemixServiceInstancePutUnauthorized %s", 401, payload) } func (o *BluemixServiceInstancePutUnauthorized) GetPayload() *models.Error { @@ -307,11 +314,13 @@ func (o *BluemixServiceInstancePutForbidden) Code() int { } func (o *BluemixServiceInstancePutForbidden) Error() string { - return fmt.Sprintf("[PUT /bluemix_v1/service_instances/{instance_id}][%d] bluemixServiceInstancePutForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /bluemix_v1/service_instances/{instance_id}][%d] bluemixServiceInstancePutForbidden %s", 403, payload) } func (o *BluemixServiceInstancePutForbidden) String() string { - return fmt.Sprintf("[PUT /bluemix_v1/service_instances/{instance_id}][%d] bluemixServiceInstancePutForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /bluemix_v1/service_instances/{instance_id}][%d] bluemixServiceInstancePutForbidden %s", 403, payload) } func (o *BluemixServiceInstancePutForbidden) GetPayload() *models.Error { @@ -375,11 +384,13 @@ func (o *BluemixServiceInstancePutNotFound) Code() int { } func (o *BluemixServiceInstancePutNotFound) Error() string { - return fmt.Sprintf("[PUT /bluemix_v1/service_instances/{instance_id}][%d] bluemixServiceInstancePutNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /bluemix_v1/service_instances/{instance_id}][%d] bluemixServiceInstancePutNotFound %s", 404, payload) } func (o *BluemixServiceInstancePutNotFound) String() string { - return fmt.Sprintf("[PUT /bluemix_v1/service_instances/{instance_id}][%d] bluemixServiceInstancePutNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /bluemix_v1/service_instances/{instance_id}][%d] bluemixServiceInstancePutNotFound %s", 404, payload) } func (o *BluemixServiceInstancePutNotFound) GetPayload() *models.Error { diff --git a/power/client/bluemix_service_instances/bluemix_service_instances_client.go b/power/client/bluemix_service_instances/bluemix_service_instances_client.go index 76f2c993..e6ac7174 100644 --- a/power/client/bluemix_service_instances/bluemix_service_instances_client.go +++ b/power/client/bluemix_service_instances/bluemix_service_instances_client.go @@ -9,6 +9,7 @@ import ( "fmt" "github.com/go-openapi/runtime" + httptransport "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" ) @@ -17,6 +18,31 @@ func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientServi return &Client{transport: transport, formats: formats} } +// New creates a new bluemix service instances API client with basic auth credentials. +// It takes the following parameters: +// - host: http host (github.com). +// - basePath: any base path for the API client ("/v1", "/v3"). +// - scheme: http scheme ("http", "https"). +// - user: user for basic authentication header. +// - password: password for basic authentication header. +func NewClientWithBasicAuth(host, basePath, scheme, user, password string) ClientService { + transport := httptransport.New(host, basePath, []string{scheme}) + transport.DefaultAuthentication = httptransport.BasicAuth(user, password) + return &Client{transport: transport, formats: strfmt.Default} +} + +// New creates a new bluemix service instances API client with a bearer token for authentication. +// It takes the following parameters: +// - host: http host (github.com). +// - basePath: any base path for the API client ("/v1", "/v3"). +// - scheme: http scheme ("http", "https"). +// - bearerToken: bearer token for Bearer authentication header. +func NewClientWithBearerToken(host, basePath, scheme, bearerToken string) ClientService { + transport := httptransport.New(host, basePath, []string{scheme}) + transport.DefaultAuthentication = httptransport.BearerToken(bearerToken) + return &Client{transport: transport, formats: strfmt.Default} +} + /* Client for bluemix service instances API */ @@ -25,7 +51,7 @@ type Client struct { formats strfmt.Registry } -// ClientOption is the option for Client methods +// ClientOption may be used to customize the behavior of Client methods. type ClientOption func(*runtime.ClientOperation) // ClientService is the interface for Client methods diff --git a/power/client/catalog/catalog_client.go b/power/client/catalog/catalog_client.go index 0641b3b1..dc74d0ae 100644 --- a/power/client/catalog/catalog_client.go +++ b/power/client/catalog/catalog_client.go @@ -9,6 +9,7 @@ import ( "fmt" "github.com/go-openapi/runtime" + httptransport "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" ) @@ -17,6 +18,31 @@ func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientServi return &Client{transport: transport, formats: formats} } +// New creates a new catalog API client with basic auth credentials. +// It takes the following parameters: +// - host: http host (github.com). +// - basePath: any base path for the API client ("/v1", "/v3"). +// - scheme: http scheme ("http", "https"). +// - user: user for basic authentication header. +// - password: password for basic authentication header. +func NewClientWithBasicAuth(host, basePath, scheme, user, password string) ClientService { + transport := httptransport.New(host, basePath, []string{scheme}) + transport.DefaultAuthentication = httptransport.BasicAuth(user, password) + return &Client{transport: transport, formats: strfmt.Default} +} + +// New creates a new catalog API client with a bearer token for authentication. +// It takes the following parameters: +// - host: http host (github.com). +// - basePath: any base path for the API client ("/v1", "/v3"). +// - scheme: http scheme ("http", "https"). +// - bearerToken: bearer token for Bearer authentication header. +func NewClientWithBearerToken(host, basePath, scheme, bearerToken string) ClientService { + transport := httptransport.New(host, basePath, []string{scheme}) + transport.DefaultAuthentication = httptransport.BearerToken(bearerToken) + return &Client{transport: transport, formats: strfmt.Default} +} + /* Client for catalog API */ @@ -25,7 +51,7 @@ type Client struct { formats strfmt.Registry } -// ClientOption is the option for Client methods +// ClientOption may be used to customize the behavior of Client methods. type ClientOption func(*runtime.ClientOperation) // ClientService is the interface for Client methods diff --git a/power/client/catalog/catalog_get_responses.go b/power/client/catalog/catalog_get_responses.go index f5845626..cb56dfa5 100644 --- a/power/client/catalog/catalog_get_responses.go +++ b/power/client/catalog/catalog_get_responses.go @@ -6,6 +6,7 @@ package catalog // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -103,11 +104,13 @@ func (o *CatalogGetOK) Code() int { } func (o *CatalogGetOK) Error() string { - return fmt.Sprintf("[GET /v2/catalog][%d] catalogGetOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /v2/catalog][%d] catalogGetOK %s", 200, payload) } func (o *CatalogGetOK) String() string { - return fmt.Sprintf("[GET /v2/catalog][%d] catalogGetOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /v2/catalog][%d] catalogGetOK %s", 200, payload) } func (o *CatalogGetOK) GetPayload() *models.Catalog { @@ -171,11 +174,13 @@ func (o *CatalogGetBadRequest) Code() int { } func (o *CatalogGetBadRequest) Error() string { - return fmt.Sprintf("[GET /v2/catalog][%d] catalogGetBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /v2/catalog][%d] catalogGetBadRequest %s", 400, payload) } func (o *CatalogGetBadRequest) String() string { - return fmt.Sprintf("[GET /v2/catalog][%d] catalogGetBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /v2/catalog][%d] catalogGetBadRequest %s", 400, payload) } func (o *CatalogGetBadRequest) GetPayload() *models.Error { @@ -239,11 +244,13 @@ func (o *CatalogGetUnauthorized) Code() int { } func (o *CatalogGetUnauthorized) Error() string { - return fmt.Sprintf("[GET /v2/catalog][%d] catalogGetUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /v2/catalog][%d] catalogGetUnauthorized %s", 401, payload) } func (o *CatalogGetUnauthorized) String() string { - return fmt.Sprintf("[GET /v2/catalog][%d] catalogGetUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /v2/catalog][%d] catalogGetUnauthorized %s", 401, payload) } func (o *CatalogGetUnauthorized) GetPayload() *models.Error { @@ -307,11 +314,13 @@ func (o *CatalogGetForbidden) Code() int { } func (o *CatalogGetForbidden) Error() string { - return fmt.Sprintf("[GET /v2/catalog][%d] catalogGetForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /v2/catalog][%d] catalogGetForbidden %s", 403, payload) } func (o *CatalogGetForbidden) String() string { - return fmt.Sprintf("[GET /v2/catalog][%d] catalogGetForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /v2/catalog][%d] catalogGetForbidden %s", 403, payload) } func (o *CatalogGetForbidden) GetPayload() *models.Error { @@ -375,11 +384,13 @@ func (o *CatalogGetNotFound) Code() int { } func (o *CatalogGetNotFound) Error() string { - return fmt.Sprintf("[GET /v2/catalog][%d] catalogGetNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /v2/catalog][%d] catalogGetNotFound %s", 404, payload) } func (o *CatalogGetNotFound) String() string { - return fmt.Sprintf("[GET /v2/catalog][%d] catalogGetNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /v2/catalog][%d] catalogGetNotFound %s", 404, payload) } func (o *CatalogGetNotFound) GetPayload() *models.Error { diff --git a/power/client/datacenters/datacenters_client.go b/power/client/datacenters/datacenters_client.go index 4bde6516..9f9e449a 100644 --- a/power/client/datacenters/datacenters_client.go +++ b/power/client/datacenters/datacenters_client.go @@ -9,6 +9,7 @@ import ( "fmt" "github.com/go-openapi/runtime" + httptransport "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" ) @@ -17,6 +18,31 @@ func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientServi return &Client{transport: transport, formats: formats} } +// New creates a new datacenters API client with basic auth credentials. +// It takes the following parameters: +// - host: http host (github.com). +// - basePath: any base path for the API client ("/v1", "/v3"). +// - scheme: http scheme ("http", "https"). +// - user: user for basic authentication header. +// - password: password for basic authentication header. +func NewClientWithBasicAuth(host, basePath, scheme, user, password string) ClientService { + transport := httptransport.New(host, basePath, []string{scheme}) + transport.DefaultAuthentication = httptransport.BasicAuth(user, password) + return &Client{transport: transport, formats: strfmt.Default} +} + +// New creates a new datacenters API client with a bearer token for authentication. +// It takes the following parameters: +// - host: http host (github.com). +// - basePath: any base path for the API client ("/v1", "/v3"). +// - scheme: http scheme ("http", "https"). +// - bearerToken: bearer token for Bearer authentication header. +func NewClientWithBearerToken(host, basePath, scheme, bearerToken string) ClientService { + transport := httptransport.New(host, basePath, []string{scheme}) + transport.DefaultAuthentication = httptransport.BearerToken(bearerToken) + return &Client{transport: transport, formats: strfmt.Default} +} + /* Client for datacenters API */ @@ -25,7 +51,7 @@ type Client struct { formats strfmt.Registry } -// ClientOption is the option for Client methods +// ClientOption may be used to customize the behavior of Client methods. type ClientOption func(*runtime.ClientOperation) // ClientService is the interface for Client methods diff --git a/power/client/datacenters/v1_datacenters_get_responses.go b/power/client/datacenters/v1_datacenters_get_responses.go index 2cc84f2e..8ddd956d 100644 --- a/power/client/datacenters/v1_datacenters_get_responses.go +++ b/power/client/datacenters/v1_datacenters_get_responses.go @@ -6,6 +6,7 @@ package datacenters // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -103,11 +104,13 @@ func (o *V1DatacentersGetOK) Code() int { } func (o *V1DatacentersGetOK) Error() string { - return fmt.Sprintf("[GET /v1/datacenters/{datacenter_region}][%d] v1DatacentersGetOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /v1/datacenters/{datacenter_region}][%d] v1DatacentersGetOK %s", 200, payload) } func (o *V1DatacentersGetOK) String() string { - return fmt.Sprintf("[GET /v1/datacenters/{datacenter_region}][%d] v1DatacentersGetOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /v1/datacenters/{datacenter_region}][%d] v1DatacentersGetOK %s", 200, payload) } func (o *V1DatacentersGetOK) GetPayload() *models.Datacenter { @@ -171,11 +174,13 @@ func (o *V1DatacentersGetBadRequest) Code() int { } func (o *V1DatacentersGetBadRequest) Error() string { - return fmt.Sprintf("[GET /v1/datacenters/{datacenter_region}][%d] v1DatacentersGetBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /v1/datacenters/{datacenter_region}][%d] v1DatacentersGetBadRequest %s", 400, payload) } func (o *V1DatacentersGetBadRequest) String() string { - return fmt.Sprintf("[GET /v1/datacenters/{datacenter_region}][%d] v1DatacentersGetBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /v1/datacenters/{datacenter_region}][%d] v1DatacentersGetBadRequest %s", 400, payload) } func (o *V1DatacentersGetBadRequest) GetPayload() *models.Error { @@ -239,11 +244,13 @@ func (o *V1DatacentersGetUnauthorized) Code() int { } func (o *V1DatacentersGetUnauthorized) Error() string { - return fmt.Sprintf("[GET /v1/datacenters/{datacenter_region}][%d] v1DatacentersGetUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /v1/datacenters/{datacenter_region}][%d] v1DatacentersGetUnauthorized %s", 401, payload) } func (o *V1DatacentersGetUnauthorized) String() string { - return fmt.Sprintf("[GET /v1/datacenters/{datacenter_region}][%d] v1DatacentersGetUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /v1/datacenters/{datacenter_region}][%d] v1DatacentersGetUnauthorized %s", 401, payload) } func (o *V1DatacentersGetUnauthorized) GetPayload() *models.Error { @@ -307,11 +314,13 @@ func (o *V1DatacentersGetForbidden) Code() int { } func (o *V1DatacentersGetForbidden) Error() string { - return fmt.Sprintf("[GET /v1/datacenters/{datacenter_region}][%d] v1DatacentersGetForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /v1/datacenters/{datacenter_region}][%d] v1DatacentersGetForbidden %s", 403, payload) } func (o *V1DatacentersGetForbidden) String() string { - return fmt.Sprintf("[GET /v1/datacenters/{datacenter_region}][%d] v1DatacentersGetForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /v1/datacenters/{datacenter_region}][%d] v1DatacentersGetForbidden %s", 403, payload) } func (o *V1DatacentersGetForbidden) GetPayload() *models.Error { @@ -375,11 +384,13 @@ func (o *V1DatacentersGetInternalServerError) Code() int { } func (o *V1DatacentersGetInternalServerError) Error() string { - return fmt.Sprintf("[GET /v1/datacenters/{datacenter_region}][%d] v1DatacentersGetInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /v1/datacenters/{datacenter_region}][%d] v1DatacentersGetInternalServerError %s", 500, payload) } func (o *V1DatacentersGetInternalServerError) String() string { - return fmt.Sprintf("[GET /v1/datacenters/{datacenter_region}][%d] v1DatacentersGetInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /v1/datacenters/{datacenter_region}][%d] v1DatacentersGetInternalServerError %s", 500, payload) } func (o *V1DatacentersGetInternalServerError) GetPayload() *models.Error { diff --git a/power/client/datacenters/v1_datacenters_getall_responses.go b/power/client/datacenters/v1_datacenters_getall_responses.go index 3bcf1f10..a088af4d 100644 --- a/power/client/datacenters/v1_datacenters_getall_responses.go +++ b/power/client/datacenters/v1_datacenters_getall_responses.go @@ -6,6 +6,7 @@ package datacenters // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -103,11 +104,13 @@ func (o *V1DatacentersGetallOK) Code() int { } func (o *V1DatacentersGetallOK) Error() string { - return fmt.Sprintf("[GET /v1/datacenters][%d] v1DatacentersGetallOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /v1/datacenters][%d] v1DatacentersGetallOK %s", 200, payload) } func (o *V1DatacentersGetallOK) String() string { - return fmt.Sprintf("[GET /v1/datacenters][%d] v1DatacentersGetallOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /v1/datacenters][%d] v1DatacentersGetallOK %s", 200, payload) } func (o *V1DatacentersGetallOK) GetPayload() *models.Datacenters { @@ -171,11 +174,13 @@ func (o *V1DatacentersGetallBadRequest) Code() int { } func (o *V1DatacentersGetallBadRequest) Error() string { - return fmt.Sprintf("[GET /v1/datacenters][%d] v1DatacentersGetallBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /v1/datacenters][%d] v1DatacentersGetallBadRequest %s", 400, payload) } func (o *V1DatacentersGetallBadRequest) String() string { - return fmt.Sprintf("[GET /v1/datacenters][%d] v1DatacentersGetallBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /v1/datacenters][%d] v1DatacentersGetallBadRequest %s", 400, payload) } func (o *V1DatacentersGetallBadRequest) GetPayload() *models.Error { @@ -239,11 +244,13 @@ func (o *V1DatacentersGetallUnauthorized) Code() int { } func (o *V1DatacentersGetallUnauthorized) Error() string { - return fmt.Sprintf("[GET /v1/datacenters][%d] v1DatacentersGetallUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /v1/datacenters][%d] v1DatacentersGetallUnauthorized %s", 401, payload) } func (o *V1DatacentersGetallUnauthorized) String() string { - return fmt.Sprintf("[GET /v1/datacenters][%d] v1DatacentersGetallUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /v1/datacenters][%d] v1DatacentersGetallUnauthorized %s", 401, payload) } func (o *V1DatacentersGetallUnauthorized) GetPayload() *models.Error { @@ -307,11 +314,13 @@ func (o *V1DatacentersGetallForbidden) Code() int { } func (o *V1DatacentersGetallForbidden) Error() string { - return fmt.Sprintf("[GET /v1/datacenters][%d] v1DatacentersGetallForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /v1/datacenters][%d] v1DatacentersGetallForbidden %s", 403, payload) } func (o *V1DatacentersGetallForbidden) String() string { - return fmt.Sprintf("[GET /v1/datacenters][%d] v1DatacentersGetallForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /v1/datacenters][%d] v1DatacentersGetallForbidden %s", 403, payload) } func (o *V1DatacentersGetallForbidden) GetPayload() *models.Error { @@ -375,11 +384,13 @@ func (o *V1DatacentersGetallInternalServerError) Code() int { } func (o *V1DatacentersGetallInternalServerError) Error() string { - return fmt.Sprintf("[GET /v1/datacenters][%d] v1DatacentersGetallInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /v1/datacenters][%d] v1DatacentersGetallInternalServerError %s", 500, payload) } func (o *V1DatacentersGetallInternalServerError) String() string { - return fmt.Sprintf("[GET /v1/datacenters][%d] v1DatacentersGetallInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /v1/datacenters][%d] v1DatacentersGetallInternalServerError %s", 500, payload) } func (o *V1DatacentersGetallInternalServerError) GetPayload() *models.Error { diff --git a/power/client/hardware_platforms/hardware_platforms_client.go b/power/client/hardware_platforms/hardware_platforms_client.go index 89412a25..893c2aa4 100644 --- a/power/client/hardware_platforms/hardware_platforms_client.go +++ b/power/client/hardware_platforms/hardware_platforms_client.go @@ -9,6 +9,7 @@ import ( "fmt" "github.com/go-openapi/runtime" + httptransport "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" ) @@ -17,6 +18,31 @@ func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientServi return &Client{transport: transport, formats: formats} } +// New creates a new hardware platforms API client with basic auth credentials. +// It takes the following parameters: +// - host: http host (github.com). +// - basePath: any base path for the API client ("/v1", "/v3"). +// - scheme: http scheme ("http", "https"). +// - user: user for basic authentication header. +// - password: password for basic authentication header. +func NewClientWithBasicAuth(host, basePath, scheme, user, password string) ClientService { + transport := httptransport.New(host, basePath, []string{scheme}) + transport.DefaultAuthentication = httptransport.BasicAuth(user, password) + return &Client{transport: transport, formats: strfmt.Default} +} + +// New creates a new hardware platforms API client with a bearer token for authentication. +// It takes the following parameters: +// - host: http host (github.com). +// - basePath: any base path for the API client ("/v1", "/v3"). +// - scheme: http scheme ("http", "https"). +// - bearerToken: bearer token for Bearer authentication header. +func NewClientWithBearerToken(host, basePath, scheme, bearerToken string) ClientService { + transport := httptransport.New(host, basePath, []string{scheme}) + transport.DefaultAuthentication = httptransport.BearerToken(bearerToken) + return &Client{transport: transport, formats: strfmt.Default} +} + /* Client for hardware platforms API */ @@ -25,7 +51,7 @@ type Client struct { formats strfmt.Registry } -// ClientOption is the option for Client methods +// ClientOption may be used to customize the behavior of Client methods. type ClientOption func(*runtime.ClientOperation) // ClientService is the interface for Client methods diff --git a/power/client/hardware_platforms/service_broker_hardwareplatforms_get_responses.go b/power/client/hardware_platforms/service_broker_hardwareplatforms_get_responses.go index d9573a44..a269f65f 100644 --- a/power/client/hardware_platforms/service_broker_hardwareplatforms_get_responses.go +++ b/power/client/hardware_platforms/service_broker_hardwareplatforms_get_responses.go @@ -6,6 +6,7 @@ package hardware_platforms // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -109,11 +110,13 @@ func (o *ServiceBrokerHardwareplatformsGetOK) Code() int { } func (o *ServiceBrokerHardwareplatformsGetOK) Error() string { - return fmt.Sprintf("[GET /broker/v1/hardware-platforms][%d] serviceBrokerHardwareplatformsGetOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /broker/v1/hardware-platforms][%d] serviceBrokerHardwareplatformsGetOK %s", 200, payload) } func (o *ServiceBrokerHardwareplatformsGetOK) String() string { - return fmt.Sprintf("[GET /broker/v1/hardware-platforms][%d] serviceBrokerHardwareplatformsGetOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /broker/v1/hardware-platforms][%d] serviceBrokerHardwareplatformsGetOK %s", 200, payload) } func (o *ServiceBrokerHardwareplatformsGetOK) GetPayload() models.HardwarePlatforms { @@ -175,11 +178,13 @@ func (o *ServiceBrokerHardwareplatformsGetBadRequest) Code() int { } func (o *ServiceBrokerHardwareplatformsGetBadRequest) Error() string { - return fmt.Sprintf("[GET /broker/v1/hardware-platforms][%d] serviceBrokerHardwareplatformsGetBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /broker/v1/hardware-platforms][%d] serviceBrokerHardwareplatformsGetBadRequest %s", 400, payload) } func (o *ServiceBrokerHardwareplatformsGetBadRequest) String() string { - return fmt.Sprintf("[GET /broker/v1/hardware-platforms][%d] serviceBrokerHardwareplatformsGetBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /broker/v1/hardware-platforms][%d] serviceBrokerHardwareplatformsGetBadRequest %s", 400, payload) } func (o *ServiceBrokerHardwareplatformsGetBadRequest) GetPayload() *models.Error { @@ -243,11 +248,13 @@ func (o *ServiceBrokerHardwareplatformsGetUnauthorized) Code() int { } func (o *ServiceBrokerHardwareplatformsGetUnauthorized) Error() string { - return fmt.Sprintf("[GET /broker/v1/hardware-platforms][%d] serviceBrokerHardwareplatformsGetUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /broker/v1/hardware-platforms][%d] serviceBrokerHardwareplatformsGetUnauthorized %s", 401, payload) } func (o *ServiceBrokerHardwareplatformsGetUnauthorized) String() string { - return fmt.Sprintf("[GET /broker/v1/hardware-platforms][%d] serviceBrokerHardwareplatformsGetUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /broker/v1/hardware-platforms][%d] serviceBrokerHardwareplatformsGetUnauthorized %s", 401, payload) } func (o *ServiceBrokerHardwareplatformsGetUnauthorized) GetPayload() *models.Error { @@ -311,11 +318,13 @@ func (o *ServiceBrokerHardwareplatformsGetForbidden) Code() int { } func (o *ServiceBrokerHardwareplatformsGetForbidden) Error() string { - return fmt.Sprintf("[GET /broker/v1/hardware-platforms][%d] serviceBrokerHardwareplatformsGetForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /broker/v1/hardware-platforms][%d] serviceBrokerHardwareplatformsGetForbidden %s", 403, payload) } func (o *ServiceBrokerHardwareplatformsGetForbidden) String() string { - return fmt.Sprintf("[GET /broker/v1/hardware-platforms][%d] serviceBrokerHardwareplatformsGetForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /broker/v1/hardware-platforms][%d] serviceBrokerHardwareplatformsGetForbidden %s", 403, payload) } func (o *ServiceBrokerHardwareplatformsGetForbidden) GetPayload() *models.Error { @@ -379,11 +388,13 @@ func (o *ServiceBrokerHardwareplatformsGetNotFound) Code() int { } func (o *ServiceBrokerHardwareplatformsGetNotFound) Error() string { - return fmt.Sprintf("[GET /broker/v1/hardware-platforms][%d] serviceBrokerHardwareplatformsGetNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /broker/v1/hardware-platforms][%d] serviceBrokerHardwareplatformsGetNotFound %s", 404, payload) } func (o *ServiceBrokerHardwareplatformsGetNotFound) String() string { - return fmt.Sprintf("[GET /broker/v1/hardware-platforms][%d] serviceBrokerHardwareplatformsGetNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /broker/v1/hardware-platforms][%d] serviceBrokerHardwareplatformsGetNotFound %s", 404, payload) } func (o *ServiceBrokerHardwareplatformsGetNotFound) GetPayload() *models.Error { @@ -447,11 +458,13 @@ func (o *ServiceBrokerHardwareplatformsGetInternalServerError) Code() int { } func (o *ServiceBrokerHardwareplatformsGetInternalServerError) Error() string { - return fmt.Sprintf("[GET /broker/v1/hardware-platforms][%d] serviceBrokerHardwareplatformsGetInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /broker/v1/hardware-platforms][%d] serviceBrokerHardwareplatformsGetInternalServerError %s", 500, payload) } func (o *ServiceBrokerHardwareplatformsGetInternalServerError) String() string { - return fmt.Sprintf("[GET /broker/v1/hardware-platforms][%d] serviceBrokerHardwareplatformsGetInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /broker/v1/hardware-platforms][%d] serviceBrokerHardwareplatformsGetInternalServerError %s", 500, payload) } func (o *ServiceBrokerHardwareplatformsGetInternalServerError) GetPayload() *models.Error { diff --git a/power/client/hostgroups/hostgroups_client.go b/power/client/host_groups/host_groups_client.go similarity index 77% rename from power/client/hostgroups/hostgroups_client.go rename to power/client/host_groups/host_groups_client.go index 19daf7c8..e7fd62b2 100644 --- a/power/client/hostgroups/hostgroups_client.go +++ b/power/client/host_groups/host_groups_client.go @@ -1,6 +1,6 @@ // Code generated by go-swagger; DO NOT EDIT. -package hostgroups +package host_groups // This file was generated by the swagger tool. // Editing this file might prove futile when you re-run the swagger generate command @@ -9,36 +9,62 @@ import ( "fmt" "github.com/go-openapi/runtime" + httptransport "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" ) -// New creates a new hostgroups API client. +// New creates a new host groups API client. func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService { return &Client{transport: transport, formats: formats} } +// New creates a new host groups API client with basic auth credentials. +// It takes the following parameters: +// - host: http host (github.com). +// - basePath: any base path for the API client ("/v1", "/v3"). +// - scheme: http scheme ("http", "https"). +// - user: user for basic authentication header. +// - password: password for basic authentication header. +func NewClientWithBasicAuth(host, basePath, scheme, user, password string) ClientService { + transport := httptransport.New(host, basePath, []string{scheme}) + transport.DefaultAuthentication = httptransport.BasicAuth(user, password) + return &Client{transport: transport, formats: strfmt.Default} +} + +// New creates a new host groups API client with a bearer token for authentication. +// It takes the following parameters: +// - host: http host (github.com). +// - basePath: any base path for the API client ("/v1", "/v3"). +// - scheme: http scheme ("http", "https"). +// - bearerToken: bearer token for Bearer authentication header. +func NewClientWithBearerToken(host, basePath, scheme, bearerToken string) ClientService { + transport := httptransport.New(host, basePath, []string{scheme}) + transport.DefaultAuthentication = httptransport.BearerToken(bearerToken) + return &Client{transport: transport, formats: strfmt.Default} +} + /* -Client for hostgroups API +Client for host groups API */ type Client struct { transport runtime.ClientTransport formats strfmt.Registry } -// ClientOption is the option for Client methods +// ClientOption may be used to customize the behavior of Client methods. type ClientOption func(*runtime.ClientOperation) // ClientService is the interface for Client methods type ClientService interface { V1AvailableHosts(params *V1AvailableHostsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*V1AvailableHostsOK, error) - V1HostgroupsGet(params *V1HostgroupsGetParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*V1HostgroupsGetOK, error) + V1HostGroupsGet(params *V1HostGroupsGetParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*V1HostGroupsGetOK, error) - V1HostgroupsIDGet(params *V1HostgroupsIDGetParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*V1HostgroupsIDGetOK, error) + V1HostGroupsIDGet(params *V1HostGroupsIDGetParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*V1HostGroupsIDGetOK, error) - V1HostgroupsIDPut(params *V1HostgroupsIDPutParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*V1HostgroupsIDPutOK, error) + V1HostGroupsIDPut(params *V1HostGroupsIDPutParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*V1HostGroupsIDPutOK, error) - V1HostgroupsPost(params *V1HostgroupsPostParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*V1HostgroupsPostCreated, error) + V1HostGroupsPost(params *V1HostGroupsPostParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*V1HostGroupsPostCreated, error) V1HostsGet(params *V1HostsGetParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*V1HostsGetOK, error) @@ -93,22 +119,22 @@ func (a *Client) V1AvailableHosts(params *V1AvailableHostsParams, authInfo runti } /* -V1HostgroupsGet gets the list of hostgroups for the workspace +V1HostGroupsGet gets the list of host groups for the workspace */ -func (a *Client) V1HostgroupsGet(params *V1HostgroupsGetParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*V1HostgroupsGetOK, error) { +func (a *Client) V1HostGroupsGet(params *V1HostGroupsGetParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*V1HostGroupsGetOK, error) { // TODO: Validate the params before sending if params == nil { - params = NewV1HostgroupsGetParams() + params = NewV1HostGroupsGetParams() } op := &runtime.ClientOperation{ - ID: "v1.hostgroups.get", + ID: "v1.hostGroups.get", Method: "GET", - PathPattern: "/v1/hostgroups", + PathPattern: "/v1/host-groups", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, Schemes: []string{"http"}, Params: params, - Reader: &V1HostgroupsGetReader{formats: a.formats}, + Reader: &V1HostGroupsGetReader{formats: a.formats}, AuthInfo: authInfo, Context: params.Context, Client: params.HTTPClient, @@ -121,33 +147,33 @@ func (a *Client) V1HostgroupsGet(params *V1HostgroupsGetParams, authInfo runtime if err != nil { return nil, err } - success, ok := result.(*V1HostgroupsGetOK) + success, ok := result.(*V1HostGroupsGetOK) if ok { return success, nil } // unexpected success response // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue - msg := fmt.Sprintf("unexpected success response for v1.hostgroups.get: API contract not enforced by server. Client expected to get an error, but got: %T", result) + msg := fmt.Sprintf("unexpected success response for v1.hostGroups.get: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } /* -V1HostgroupsIDGet gets the details of a hostgroup +V1HostGroupsIDGet gets the details of a host group */ -func (a *Client) V1HostgroupsIDGet(params *V1HostgroupsIDGetParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*V1HostgroupsIDGetOK, error) { +func (a *Client) V1HostGroupsIDGet(params *V1HostGroupsIDGetParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*V1HostGroupsIDGetOK, error) { // TODO: Validate the params before sending if params == nil { - params = NewV1HostgroupsIDGetParams() + params = NewV1HostGroupsIDGetParams() } op := &runtime.ClientOperation{ - ID: "v1.hostgroups.id.get", + ID: "v1.hostGroups.id.get", Method: "GET", - PathPattern: "/v1/hostgroups/{hostgroup_id}", + PathPattern: "/v1/host-groups/{host_group_id}", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, Schemes: []string{"http"}, Params: params, - Reader: &V1HostgroupsIDGetReader{formats: a.formats}, + Reader: &V1HostGroupsIDGetReader{formats: a.formats}, AuthInfo: authInfo, Context: params.Context, Client: params.HTTPClient, @@ -160,33 +186,33 @@ func (a *Client) V1HostgroupsIDGet(params *V1HostgroupsIDGetParams, authInfo run if err != nil { return nil, err } - success, ok := result.(*V1HostgroupsIDGetOK) + success, ok := result.(*V1HostGroupsIDGetOK) if ok { return success, nil } // unexpected success response // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue - msg := fmt.Sprintf("unexpected success response for v1.hostgroups.id.get: API contract not enforced by server. Client expected to get an error, but got: %T", result) + msg := fmt.Sprintf("unexpected success response for v1.hostGroups.id.get: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } /* -V1HostgroupsIDPut shares unshare a hostgroup with another workspace +V1HostGroupsIDPut shares unshare a host group with another workspace */ -func (a *Client) V1HostgroupsIDPut(params *V1HostgroupsIDPutParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*V1HostgroupsIDPutOK, error) { +func (a *Client) V1HostGroupsIDPut(params *V1HostGroupsIDPutParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*V1HostGroupsIDPutOK, error) { // TODO: Validate the params before sending if params == nil { - params = NewV1HostgroupsIDPutParams() + params = NewV1HostGroupsIDPutParams() } op := &runtime.ClientOperation{ - ID: "v1.hostgroups.id.put", + ID: "v1.hostGroups.id.put", Method: "PUT", - PathPattern: "/v1/hostgroups/{hostgroup_id}", + PathPattern: "/v1/host-groups/{host_group_id}", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, Schemes: []string{"http"}, Params: params, - Reader: &V1HostgroupsIDPutReader{formats: a.formats}, + Reader: &V1HostGroupsIDPutReader{formats: a.formats}, AuthInfo: authInfo, Context: params.Context, Client: params.HTTPClient, @@ -199,33 +225,33 @@ func (a *Client) V1HostgroupsIDPut(params *V1HostgroupsIDPutParams, authInfo run if err != nil { return nil, err } - success, ok := result.(*V1HostgroupsIDPutOK) + success, ok := result.(*V1HostGroupsIDPutOK) if ok { return success, nil } // unexpected success response // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue - msg := fmt.Sprintf("unexpected success response for v1.hostgroups.id.put: API contract not enforced by server. Client expected to get an error, but got: %T", result) + msg := fmt.Sprintf("unexpected success response for v1.hostGroups.id.put: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } /* -V1HostgroupsPost creates a hostgroup with one or more host +V1HostGroupsPost creates a host group with one or more host */ -func (a *Client) V1HostgroupsPost(params *V1HostgroupsPostParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*V1HostgroupsPostCreated, error) { +func (a *Client) V1HostGroupsPost(params *V1HostGroupsPostParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*V1HostGroupsPostCreated, error) { // TODO: Validate the params before sending if params == nil { - params = NewV1HostgroupsPostParams() + params = NewV1HostGroupsPostParams() } op := &runtime.ClientOperation{ - ID: "v1.hostgroups.post", + ID: "v1.hostGroups.post", Method: "POST", - PathPattern: "/v1/hostgroups", + PathPattern: "/v1/host-groups", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, Schemes: []string{"http"}, Params: params, - Reader: &V1HostgroupsPostReader{formats: a.formats}, + Reader: &V1HostGroupsPostReader{formats: a.formats}, AuthInfo: authInfo, Context: params.Context, Client: params.HTTPClient, @@ -238,13 +264,13 @@ func (a *Client) V1HostgroupsPost(params *V1HostgroupsPostParams, authInfo runti if err != nil { return nil, err } - success, ok := result.(*V1HostgroupsPostCreated) + success, ok := result.(*V1HostGroupsPostCreated) if ok { return success, nil } // unexpected success response // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue - msg := fmt.Sprintf("unexpected success response for v1.hostgroups.post: API contract not enforced by server. Client expected to get an error, but got: %T", result) + msg := fmt.Sprintf("unexpected success response for v1.hostGroups.post: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } @@ -288,7 +314,7 @@ func (a *Client) V1HostsGet(params *V1HostsGetParams, authInfo runtime.ClientAut } /* -V1HostsIDDelete releases a host from its hostgroup +V1HostsIDDelete releases a host from its host group */ func (a *Client) V1HostsIDDelete(params *V1HostsIDDeleteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*V1HostsIDDeleteAccepted, error) { // TODO: Validate the params before sending @@ -405,7 +431,7 @@ func (a *Client) V1HostsIDPut(params *V1HostsIDPutParams, authInfo runtime.Clien } /* -V1HostsPost adds new host s to an existing hostgroup +V1HostsPost adds new host s to an existing host group */ func (a *Client) V1HostsPost(params *V1HostsPostParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*V1HostsPostCreated, error) { // TODO: Validate the params before sending diff --git a/power/client/hostgroups/v1_available_hosts_parameters.go b/power/client/host_groups/v1_available_hosts_parameters.go similarity index 99% rename from power/client/hostgroups/v1_available_hosts_parameters.go rename to power/client/host_groups/v1_available_hosts_parameters.go index f2c3babf..8a26b9cd 100644 --- a/power/client/hostgroups/v1_available_hosts_parameters.go +++ b/power/client/host_groups/v1_available_hosts_parameters.go @@ -1,6 +1,6 @@ // Code generated by go-swagger; DO NOT EDIT. -package hostgroups +package host_groups // This file was generated by the swagger tool. // Editing this file might prove futile when you re-run the swagger generate command diff --git a/power/client/hostgroups/v1_available_hosts_responses.go b/power/client/host_groups/v1_available_hosts_responses.go similarity index 94% rename from power/client/hostgroups/v1_available_hosts_responses.go rename to power/client/host_groups/v1_available_hosts_responses.go index a591b6e1..eee83893 100644 --- a/power/client/hostgroups/v1_available_hosts_responses.go +++ b/power/client/host_groups/v1_available_hosts_responses.go @@ -1,11 +1,12 @@ // Code generated by go-swagger; DO NOT EDIT. -package hostgroups +package host_groups // This file was generated by the swagger tool. // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -109,11 +110,13 @@ func (o *V1AvailableHostsOK) Code() int { } func (o *V1AvailableHostsOK) Error() string { - return fmt.Sprintf("[GET /v1/available-hosts][%d] v1AvailableHostsOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /v1/available-hosts][%d] v1AvailableHostsOK %s", 200, payload) } func (o *V1AvailableHostsOK) String() string { - return fmt.Sprintf("[GET /v1/available-hosts][%d] v1AvailableHostsOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /v1/available-hosts][%d] v1AvailableHostsOK %s", 200, payload) } func (o *V1AvailableHostsOK) GetPayload() models.AvailableHostList { @@ -175,11 +178,13 @@ func (o *V1AvailableHostsBadRequest) Code() int { } func (o *V1AvailableHostsBadRequest) Error() string { - return fmt.Sprintf("[GET /v1/available-hosts][%d] v1AvailableHostsBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /v1/available-hosts][%d] v1AvailableHostsBadRequest %s", 400, payload) } func (o *V1AvailableHostsBadRequest) String() string { - return fmt.Sprintf("[GET /v1/available-hosts][%d] v1AvailableHostsBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /v1/available-hosts][%d] v1AvailableHostsBadRequest %s", 400, payload) } func (o *V1AvailableHostsBadRequest) GetPayload() *models.Error { @@ -243,11 +248,13 @@ func (o *V1AvailableHostsUnauthorized) Code() int { } func (o *V1AvailableHostsUnauthorized) Error() string { - return fmt.Sprintf("[GET /v1/available-hosts][%d] v1AvailableHostsUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /v1/available-hosts][%d] v1AvailableHostsUnauthorized %s", 401, payload) } func (o *V1AvailableHostsUnauthorized) String() string { - return fmt.Sprintf("[GET /v1/available-hosts][%d] v1AvailableHostsUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /v1/available-hosts][%d] v1AvailableHostsUnauthorized %s", 401, payload) } func (o *V1AvailableHostsUnauthorized) GetPayload() *models.Error { @@ -311,11 +318,13 @@ func (o *V1AvailableHostsForbidden) Code() int { } func (o *V1AvailableHostsForbidden) Error() string { - return fmt.Sprintf("[GET /v1/available-hosts][%d] v1AvailableHostsForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /v1/available-hosts][%d] v1AvailableHostsForbidden %s", 403, payload) } func (o *V1AvailableHostsForbidden) String() string { - return fmt.Sprintf("[GET /v1/available-hosts][%d] v1AvailableHostsForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /v1/available-hosts][%d] v1AvailableHostsForbidden %s", 403, payload) } func (o *V1AvailableHostsForbidden) GetPayload() *models.Error { @@ -379,11 +388,13 @@ func (o *V1AvailableHostsInternalServerError) Code() int { } func (o *V1AvailableHostsInternalServerError) Error() string { - return fmt.Sprintf("[GET /v1/available-hosts][%d] v1AvailableHostsInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /v1/available-hosts][%d] v1AvailableHostsInternalServerError %s", 500, payload) } func (o *V1AvailableHostsInternalServerError) String() string { - return fmt.Sprintf("[GET /v1/available-hosts][%d] v1AvailableHostsInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /v1/available-hosts][%d] v1AvailableHostsInternalServerError %s", 500, payload) } func (o *V1AvailableHostsInternalServerError) GetPayload() *models.Error { @@ -447,11 +458,13 @@ func (o *V1AvailableHostsGatewayTimeout) Code() int { } func (o *V1AvailableHostsGatewayTimeout) Error() string { - return fmt.Sprintf("[GET /v1/available-hosts][%d] v1AvailableHostsGatewayTimeout %+v", 504, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /v1/available-hosts][%d] v1AvailableHostsGatewayTimeout %s", 504, payload) } func (o *V1AvailableHostsGatewayTimeout) String() string { - return fmt.Sprintf("[GET /v1/available-hosts][%d] v1AvailableHostsGatewayTimeout %+v", 504, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /v1/available-hosts][%d] v1AvailableHostsGatewayTimeout %s", 504, payload) } func (o *V1AvailableHostsGatewayTimeout) GetPayload() *models.Error { diff --git a/power/client/host_groups/v1_host_groups_get_parameters.go b/power/client/host_groups/v1_host_groups_get_parameters.go new file mode 100644 index 00000000..91bf33de --- /dev/null +++ b/power/client/host_groups/v1_host_groups_get_parameters.go @@ -0,0 +1,128 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package host_groups + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1HostGroupsGetParams creates a new V1HostGroupsGetParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewV1HostGroupsGetParams() *V1HostGroupsGetParams { + return &V1HostGroupsGetParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewV1HostGroupsGetParamsWithTimeout creates a new V1HostGroupsGetParams object +// with the ability to set a timeout on a request. +func NewV1HostGroupsGetParamsWithTimeout(timeout time.Duration) *V1HostGroupsGetParams { + return &V1HostGroupsGetParams{ + timeout: timeout, + } +} + +// NewV1HostGroupsGetParamsWithContext creates a new V1HostGroupsGetParams object +// with the ability to set a context for a request. +func NewV1HostGroupsGetParamsWithContext(ctx context.Context) *V1HostGroupsGetParams { + return &V1HostGroupsGetParams{ + Context: ctx, + } +} + +// NewV1HostGroupsGetParamsWithHTTPClient creates a new V1HostGroupsGetParams object +// with the ability to set a custom HTTPClient for a request. +func NewV1HostGroupsGetParamsWithHTTPClient(client *http.Client) *V1HostGroupsGetParams { + return &V1HostGroupsGetParams{ + HTTPClient: client, + } +} + +/* +V1HostGroupsGetParams contains all the parameters to send to the API endpoint + + for the v1 host groups get operation. + + Typically these are written to a http.Request. +*/ +type V1HostGroupsGetParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the v1 host groups get params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *V1HostGroupsGetParams) WithDefaults() *V1HostGroupsGetParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the v1 host groups get params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *V1HostGroupsGetParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the v1 host groups get params +func (o *V1HostGroupsGetParams) WithTimeout(timeout time.Duration) *V1HostGroupsGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 host groups get params +func (o *V1HostGroupsGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 host groups get params +func (o *V1HostGroupsGetParams) WithContext(ctx context.Context) *V1HostGroupsGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 host groups get params +func (o *V1HostGroupsGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 host groups get params +func (o *V1HostGroupsGetParams) WithHTTPClient(client *http.Client) *V1HostGroupsGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 host groups get params +func (o *V1HostGroupsGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *V1HostGroupsGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/power/client/host_groups/v1_host_groups_get_responses.go b/power/client/host_groups/v1_host_groups_get_responses.go new file mode 100644 index 00000000..e112020b --- /dev/null +++ b/power/client/host_groups/v1_host_groups_get_responses.go @@ -0,0 +1,484 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package host_groups + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "encoding/json" + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/IBM-Cloud/power-go-client/power/models" +) + +// V1HostGroupsGetReader is a Reader for the V1HostGroupsGet structure. +type V1HostGroupsGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1HostGroupsGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1HostGroupsGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 400: + result := NewV1HostGroupsGetBadRequest() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 401: + result := NewV1HostGroupsGetUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewV1HostGroupsGetForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewV1HostGroupsGetInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 504: + result := NewV1HostGroupsGetGatewayTimeout() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + default: + return nil, runtime.NewAPIError("[GET /v1/host-groups] v1.hostGroups.get", response, response.Code()) + } +} + +// NewV1HostGroupsGetOK creates a V1HostGroupsGetOK with default headers values +func NewV1HostGroupsGetOK() *V1HostGroupsGetOK { + return &V1HostGroupsGetOK{} +} + +/* +V1HostGroupsGetOK describes a response with status code 200, with default header values. + +OK +*/ +type V1HostGroupsGetOK struct { + Payload models.HostGroupList +} + +// IsSuccess returns true when this v1 host groups get o k response has a 2xx status code +func (o *V1HostGroupsGetOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this v1 host groups get o k response has a 3xx status code +func (o *V1HostGroupsGetOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this v1 host groups get o k response has a 4xx status code +func (o *V1HostGroupsGetOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this v1 host groups get o k response has a 5xx status code +func (o *V1HostGroupsGetOK) IsServerError() bool { + return false +} + +// IsCode returns true when this v1 host groups get o k response a status code equal to that given +func (o *V1HostGroupsGetOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the v1 host groups get o k response +func (o *V1HostGroupsGetOK) Code() int { + return 200 +} + +func (o *V1HostGroupsGetOK) Error() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /v1/host-groups][%d] v1HostGroupsGetOK %s", 200, payload) +} + +func (o *V1HostGroupsGetOK) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /v1/host-groups][%d] v1HostGroupsGetOK %s", 200, payload) +} + +func (o *V1HostGroupsGetOK) GetPayload() models.HostGroupList { + return o.Payload +} + +func (o *V1HostGroupsGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response payload + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewV1HostGroupsGetBadRequest creates a V1HostGroupsGetBadRequest with default headers values +func NewV1HostGroupsGetBadRequest() *V1HostGroupsGetBadRequest { + return &V1HostGroupsGetBadRequest{} +} + +/* +V1HostGroupsGetBadRequest describes a response with status code 400, with default header values. + +Bad Request +*/ +type V1HostGroupsGetBadRequest struct { + Payload *models.Error +} + +// IsSuccess returns true when this v1 host groups get bad request response has a 2xx status code +func (o *V1HostGroupsGetBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this v1 host groups get bad request response has a 3xx status code +func (o *V1HostGroupsGetBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this v1 host groups get bad request response has a 4xx status code +func (o *V1HostGroupsGetBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this v1 host groups get bad request response has a 5xx status code +func (o *V1HostGroupsGetBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this v1 host groups get bad request response a status code equal to that given +func (o *V1HostGroupsGetBadRequest) IsCode(code int) bool { + return code == 400 +} + +// Code gets the status code for the v1 host groups get bad request response +func (o *V1HostGroupsGetBadRequest) Code() int { + return 400 +} + +func (o *V1HostGroupsGetBadRequest) Error() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /v1/host-groups][%d] v1HostGroupsGetBadRequest %s", 400, payload) +} + +func (o *V1HostGroupsGetBadRequest) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /v1/host-groups][%d] v1HostGroupsGetBadRequest %s", 400, payload) +} + +func (o *V1HostGroupsGetBadRequest) GetPayload() *models.Error { + return o.Payload +} + +func (o *V1HostGroupsGetBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewV1HostGroupsGetUnauthorized creates a V1HostGroupsGetUnauthorized with default headers values +func NewV1HostGroupsGetUnauthorized() *V1HostGroupsGetUnauthorized { + return &V1HostGroupsGetUnauthorized{} +} + +/* +V1HostGroupsGetUnauthorized describes a response with status code 401, with default header values. + +Unauthorized +*/ +type V1HostGroupsGetUnauthorized struct { + Payload *models.Error +} + +// IsSuccess returns true when this v1 host groups get unauthorized response has a 2xx status code +func (o *V1HostGroupsGetUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this v1 host groups get unauthorized response has a 3xx status code +func (o *V1HostGroupsGetUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this v1 host groups get unauthorized response has a 4xx status code +func (o *V1HostGroupsGetUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this v1 host groups get unauthorized response has a 5xx status code +func (o *V1HostGroupsGetUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this v1 host groups get unauthorized response a status code equal to that given +func (o *V1HostGroupsGetUnauthorized) IsCode(code int) bool { + return code == 401 +} + +// Code gets the status code for the v1 host groups get unauthorized response +func (o *V1HostGroupsGetUnauthorized) Code() int { + return 401 +} + +func (o *V1HostGroupsGetUnauthorized) Error() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /v1/host-groups][%d] v1HostGroupsGetUnauthorized %s", 401, payload) +} + +func (o *V1HostGroupsGetUnauthorized) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /v1/host-groups][%d] v1HostGroupsGetUnauthorized %s", 401, payload) +} + +func (o *V1HostGroupsGetUnauthorized) GetPayload() *models.Error { + return o.Payload +} + +func (o *V1HostGroupsGetUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewV1HostGroupsGetForbidden creates a V1HostGroupsGetForbidden with default headers values +func NewV1HostGroupsGetForbidden() *V1HostGroupsGetForbidden { + return &V1HostGroupsGetForbidden{} +} + +/* +V1HostGroupsGetForbidden describes a response with status code 403, with default header values. + +Forbidden +*/ +type V1HostGroupsGetForbidden struct { + Payload *models.Error +} + +// IsSuccess returns true when this v1 host groups get forbidden response has a 2xx status code +func (o *V1HostGroupsGetForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this v1 host groups get forbidden response has a 3xx status code +func (o *V1HostGroupsGetForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this v1 host groups get forbidden response has a 4xx status code +func (o *V1HostGroupsGetForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this v1 host groups get forbidden response has a 5xx status code +func (o *V1HostGroupsGetForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this v1 host groups get forbidden response a status code equal to that given +func (o *V1HostGroupsGetForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the v1 host groups get forbidden response +func (o *V1HostGroupsGetForbidden) Code() int { + return 403 +} + +func (o *V1HostGroupsGetForbidden) Error() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /v1/host-groups][%d] v1HostGroupsGetForbidden %s", 403, payload) +} + +func (o *V1HostGroupsGetForbidden) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /v1/host-groups][%d] v1HostGroupsGetForbidden %s", 403, payload) +} + +func (o *V1HostGroupsGetForbidden) GetPayload() *models.Error { + return o.Payload +} + +func (o *V1HostGroupsGetForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewV1HostGroupsGetInternalServerError creates a V1HostGroupsGetInternalServerError with default headers values +func NewV1HostGroupsGetInternalServerError() *V1HostGroupsGetInternalServerError { + return &V1HostGroupsGetInternalServerError{} +} + +/* +V1HostGroupsGetInternalServerError describes a response with status code 500, with default header values. + +Internal Server Error +*/ +type V1HostGroupsGetInternalServerError struct { + Payload *models.Error +} + +// IsSuccess returns true when this v1 host groups get internal server error response has a 2xx status code +func (o *V1HostGroupsGetInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this v1 host groups get internal server error response has a 3xx status code +func (o *V1HostGroupsGetInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this v1 host groups get internal server error response has a 4xx status code +func (o *V1HostGroupsGetInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this v1 host groups get internal server error response has a 5xx status code +func (o *V1HostGroupsGetInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this v1 host groups get internal server error response a status code equal to that given +func (o *V1HostGroupsGetInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the v1 host groups get internal server error response +func (o *V1HostGroupsGetInternalServerError) Code() int { + return 500 +} + +func (o *V1HostGroupsGetInternalServerError) Error() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /v1/host-groups][%d] v1HostGroupsGetInternalServerError %s", 500, payload) +} + +func (o *V1HostGroupsGetInternalServerError) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /v1/host-groups][%d] v1HostGroupsGetInternalServerError %s", 500, payload) +} + +func (o *V1HostGroupsGetInternalServerError) GetPayload() *models.Error { + return o.Payload +} + +func (o *V1HostGroupsGetInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewV1HostGroupsGetGatewayTimeout creates a V1HostGroupsGetGatewayTimeout with default headers values +func NewV1HostGroupsGetGatewayTimeout() *V1HostGroupsGetGatewayTimeout { + return &V1HostGroupsGetGatewayTimeout{} +} + +/* +V1HostGroupsGetGatewayTimeout describes a response with status code 504, with default header values. + +Gateway Timeout. Request is still processing and taking longer than expected. +*/ +type V1HostGroupsGetGatewayTimeout struct { + Payload *models.Error +} + +// IsSuccess returns true when this v1 host groups get gateway timeout response has a 2xx status code +func (o *V1HostGroupsGetGatewayTimeout) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this v1 host groups get gateway timeout response has a 3xx status code +func (o *V1HostGroupsGetGatewayTimeout) IsRedirect() bool { + return false +} + +// IsClientError returns true when this v1 host groups get gateway timeout response has a 4xx status code +func (o *V1HostGroupsGetGatewayTimeout) IsClientError() bool { + return false +} + +// IsServerError returns true when this v1 host groups get gateway timeout response has a 5xx status code +func (o *V1HostGroupsGetGatewayTimeout) IsServerError() bool { + return true +} + +// IsCode returns true when this v1 host groups get gateway timeout response a status code equal to that given +func (o *V1HostGroupsGetGatewayTimeout) IsCode(code int) bool { + return code == 504 +} + +// Code gets the status code for the v1 host groups get gateway timeout response +func (o *V1HostGroupsGetGatewayTimeout) Code() int { + return 504 +} + +func (o *V1HostGroupsGetGatewayTimeout) Error() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /v1/host-groups][%d] v1HostGroupsGetGatewayTimeout %s", 504, payload) +} + +func (o *V1HostGroupsGetGatewayTimeout) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /v1/host-groups][%d] v1HostGroupsGetGatewayTimeout %s", 504, payload) +} + +func (o *V1HostGroupsGetGatewayTimeout) GetPayload() *models.Error { + return o.Payload +} + +func (o *V1HostGroupsGetGatewayTimeout) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/power/client/host_groups/v1_host_groups_id_get_parameters.go b/power/client/host_groups/v1_host_groups_id_get_parameters.go new file mode 100644 index 00000000..2952b90a --- /dev/null +++ b/power/client/host_groups/v1_host_groups_id_get_parameters.go @@ -0,0 +1,151 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package host_groups + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1HostGroupsIDGetParams creates a new V1HostGroupsIDGetParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewV1HostGroupsIDGetParams() *V1HostGroupsIDGetParams { + return &V1HostGroupsIDGetParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewV1HostGroupsIDGetParamsWithTimeout creates a new V1HostGroupsIDGetParams object +// with the ability to set a timeout on a request. +func NewV1HostGroupsIDGetParamsWithTimeout(timeout time.Duration) *V1HostGroupsIDGetParams { + return &V1HostGroupsIDGetParams{ + timeout: timeout, + } +} + +// NewV1HostGroupsIDGetParamsWithContext creates a new V1HostGroupsIDGetParams object +// with the ability to set a context for a request. +func NewV1HostGroupsIDGetParamsWithContext(ctx context.Context) *V1HostGroupsIDGetParams { + return &V1HostGroupsIDGetParams{ + Context: ctx, + } +} + +// NewV1HostGroupsIDGetParamsWithHTTPClient creates a new V1HostGroupsIDGetParams object +// with the ability to set a custom HTTPClient for a request. +func NewV1HostGroupsIDGetParamsWithHTTPClient(client *http.Client) *V1HostGroupsIDGetParams { + return &V1HostGroupsIDGetParams{ + HTTPClient: client, + } +} + +/* +V1HostGroupsIDGetParams contains all the parameters to send to the API endpoint + + for the v1 host groups id get operation. + + Typically these are written to a http.Request. +*/ +type V1HostGroupsIDGetParams struct { + + /* HostGroupID. + + Hostgroup ID + */ + HostGroupID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the v1 host groups id get params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *V1HostGroupsIDGetParams) WithDefaults() *V1HostGroupsIDGetParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the v1 host groups id get params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *V1HostGroupsIDGetParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the v1 host groups id get params +func (o *V1HostGroupsIDGetParams) WithTimeout(timeout time.Duration) *V1HostGroupsIDGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 host groups id get params +func (o *V1HostGroupsIDGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 host groups id get params +func (o *V1HostGroupsIDGetParams) WithContext(ctx context.Context) *V1HostGroupsIDGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 host groups id get params +func (o *V1HostGroupsIDGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 host groups id get params +func (o *V1HostGroupsIDGetParams) WithHTTPClient(client *http.Client) *V1HostGroupsIDGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 host groups id get params +func (o *V1HostGroupsIDGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithHostGroupID adds the hostGroupID to the v1 host groups id get params +func (o *V1HostGroupsIDGetParams) WithHostGroupID(hostGroupID string) *V1HostGroupsIDGetParams { + o.SetHostGroupID(hostGroupID) + return o +} + +// SetHostGroupID adds the hostGroupId to the v1 host groups id get params +func (o *V1HostGroupsIDGetParams) SetHostGroupID(hostGroupID string) { + o.HostGroupID = hostGroupID +} + +// WriteToRequest writes these params to a swagger request +func (o *V1HostGroupsIDGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param host_group_id + if err := r.SetPathParam("host_group_id", o.HostGroupID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/power/client/host_groups/v1_host_groups_id_get_responses.go b/power/client/host_groups/v1_host_groups_id_get_responses.go new file mode 100644 index 00000000..0aa259da --- /dev/null +++ b/power/client/host_groups/v1_host_groups_id_get_responses.go @@ -0,0 +1,562 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package host_groups + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "encoding/json" + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/IBM-Cloud/power-go-client/power/models" +) + +// V1HostGroupsIDGetReader is a Reader for the V1HostGroupsIDGet structure. +type V1HostGroupsIDGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1HostGroupsIDGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1HostGroupsIDGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 400: + result := NewV1HostGroupsIDGetBadRequest() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 401: + result := NewV1HostGroupsIDGetUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewV1HostGroupsIDGetForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewV1HostGroupsIDGetNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewV1HostGroupsIDGetInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 504: + result := NewV1HostGroupsIDGetGatewayTimeout() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + default: + return nil, runtime.NewAPIError("[GET /v1/host-groups/{host_group_id}] v1.hostGroups.id.get", response, response.Code()) + } +} + +// NewV1HostGroupsIDGetOK creates a V1HostGroupsIDGetOK with default headers values +func NewV1HostGroupsIDGetOK() *V1HostGroupsIDGetOK { + return &V1HostGroupsIDGetOK{} +} + +/* +V1HostGroupsIDGetOK describes a response with status code 200, with default header values. + +OK +*/ +type V1HostGroupsIDGetOK struct { + Payload *models.HostGroup +} + +// IsSuccess returns true when this v1 host groups Id get o k response has a 2xx status code +func (o *V1HostGroupsIDGetOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this v1 host groups Id get o k response has a 3xx status code +func (o *V1HostGroupsIDGetOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this v1 host groups Id get o k response has a 4xx status code +func (o *V1HostGroupsIDGetOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this v1 host groups Id get o k response has a 5xx status code +func (o *V1HostGroupsIDGetOK) IsServerError() bool { + return false +} + +// IsCode returns true when this v1 host groups Id get o k response a status code equal to that given +func (o *V1HostGroupsIDGetOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the v1 host groups Id get o k response +func (o *V1HostGroupsIDGetOK) Code() int { + return 200 +} + +func (o *V1HostGroupsIDGetOK) Error() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /v1/host-groups/{host_group_id}][%d] v1HostGroupsIdGetOK %s", 200, payload) +} + +func (o *V1HostGroupsIDGetOK) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /v1/host-groups/{host_group_id}][%d] v1HostGroupsIdGetOK %s", 200, payload) +} + +func (o *V1HostGroupsIDGetOK) GetPayload() *models.HostGroup { + return o.Payload +} + +func (o *V1HostGroupsIDGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.HostGroup) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewV1HostGroupsIDGetBadRequest creates a V1HostGroupsIDGetBadRequest with default headers values +func NewV1HostGroupsIDGetBadRequest() *V1HostGroupsIDGetBadRequest { + return &V1HostGroupsIDGetBadRequest{} +} + +/* +V1HostGroupsIDGetBadRequest describes a response with status code 400, with default header values. + +Bad Request +*/ +type V1HostGroupsIDGetBadRequest struct { + Payload *models.Error +} + +// IsSuccess returns true when this v1 host groups Id get bad request response has a 2xx status code +func (o *V1HostGroupsIDGetBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this v1 host groups Id get bad request response has a 3xx status code +func (o *V1HostGroupsIDGetBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this v1 host groups Id get bad request response has a 4xx status code +func (o *V1HostGroupsIDGetBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this v1 host groups Id get bad request response has a 5xx status code +func (o *V1HostGroupsIDGetBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this v1 host groups Id get bad request response a status code equal to that given +func (o *V1HostGroupsIDGetBadRequest) IsCode(code int) bool { + return code == 400 +} + +// Code gets the status code for the v1 host groups Id get bad request response +func (o *V1HostGroupsIDGetBadRequest) Code() int { + return 400 +} + +func (o *V1HostGroupsIDGetBadRequest) Error() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /v1/host-groups/{host_group_id}][%d] v1HostGroupsIdGetBadRequest %s", 400, payload) +} + +func (o *V1HostGroupsIDGetBadRequest) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /v1/host-groups/{host_group_id}][%d] v1HostGroupsIdGetBadRequest %s", 400, payload) +} + +func (o *V1HostGroupsIDGetBadRequest) GetPayload() *models.Error { + return o.Payload +} + +func (o *V1HostGroupsIDGetBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewV1HostGroupsIDGetUnauthorized creates a V1HostGroupsIDGetUnauthorized with default headers values +func NewV1HostGroupsIDGetUnauthorized() *V1HostGroupsIDGetUnauthorized { + return &V1HostGroupsIDGetUnauthorized{} +} + +/* +V1HostGroupsIDGetUnauthorized describes a response with status code 401, with default header values. + +Unauthorized +*/ +type V1HostGroupsIDGetUnauthorized struct { + Payload *models.Error +} + +// IsSuccess returns true when this v1 host groups Id get unauthorized response has a 2xx status code +func (o *V1HostGroupsIDGetUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this v1 host groups Id get unauthorized response has a 3xx status code +func (o *V1HostGroupsIDGetUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this v1 host groups Id get unauthorized response has a 4xx status code +func (o *V1HostGroupsIDGetUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this v1 host groups Id get unauthorized response has a 5xx status code +func (o *V1HostGroupsIDGetUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this v1 host groups Id get unauthorized response a status code equal to that given +func (o *V1HostGroupsIDGetUnauthorized) IsCode(code int) bool { + return code == 401 +} + +// Code gets the status code for the v1 host groups Id get unauthorized response +func (o *V1HostGroupsIDGetUnauthorized) Code() int { + return 401 +} + +func (o *V1HostGroupsIDGetUnauthorized) Error() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /v1/host-groups/{host_group_id}][%d] v1HostGroupsIdGetUnauthorized %s", 401, payload) +} + +func (o *V1HostGroupsIDGetUnauthorized) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /v1/host-groups/{host_group_id}][%d] v1HostGroupsIdGetUnauthorized %s", 401, payload) +} + +func (o *V1HostGroupsIDGetUnauthorized) GetPayload() *models.Error { + return o.Payload +} + +func (o *V1HostGroupsIDGetUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewV1HostGroupsIDGetForbidden creates a V1HostGroupsIDGetForbidden with default headers values +func NewV1HostGroupsIDGetForbidden() *V1HostGroupsIDGetForbidden { + return &V1HostGroupsIDGetForbidden{} +} + +/* +V1HostGroupsIDGetForbidden describes a response with status code 403, with default header values. + +Forbidden +*/ +type V1HostGroupsIDGetForbidden struct { + Payload *models.Error +} + +// IsSuccess returns true when this v1 host groups Id get forbidden response has a 2xx status code +func (o *V1HostGroupsIDGetForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this v1 host groups Id get forbidden response has a 3xx status code +func (o *V1HostGroupsIDGetForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this v1 host groups Id get forbidden response has a 4xx status code +func (o *V1HostGroupsIDGetForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this v1 host groups Id get forbidden response has a 5xx status code +func (o *V1HostGroupsIDGetForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this v1 host groups Id get forbidden response a status code equal to that given +func (o *V1HostGroupsIDGetForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the v1 host groups Id get forbidden response +func (o *V1HostGroupsIDGetForbidden) Code() int { + return 403 +} + +func (o *V1HostGroupsIDGetForbidden) Error() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /v1/host-groups/{host_group_id}][%d] v1HostGroupsIdGetForbidden %s", 403, payload) +} + +func (o *V1HostGroupsIDGetForbidden) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /v1/host-groups/{host_group_id}][%d] v1HostGroupsIdGetForbidden %s", 403, payload) +} + +func (o *V1HostGroupsIDGetForbidden) GetPayload() *models.Error { + return o.Payload +} + +func (o *V1HostGroupsIDGetForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewV1HostGroupsIDGetNotFound creates a V1HostGroupsIDGetNotFound with default headers values +func NewV1HostGroupsIDGetNotFound() *V1HostGroupsIDGetNotFound { + return &V1HostGroupsIDGetNotFound{} +} + +/* +V1HostGroupsIDGetNotFound describes a response with status code 404, with default header values. + +Not Found +*/ +type V1HostGroupsIDGetNotFound struct { + Payload *models.Error +} + +// IsSuccess returns true when this v1 host groups Id get not found response has a 2xx status code +func (o *V1HostGroupsIDGetNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this v1 host groups Id get not found response has a 3xx status code +func (o *V1HostGroupsIDGetNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this v1 host groups Id get not found response has a 4xx status code +func (o *V1HostGroupsIDGetNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this v1 host groups Id get not found response has a 5xx status code +func (o *V1HostGroupsIDGetNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this v1 host groups Id get not found response a status code equal to that given +func (o *V1HostGroupsIDGetNotFound) IsCode(code int) bool { + return code == 404 +} + +// Code gets the status code for the v1 host groups Id get not found response +func (o *V1HostGroupsIDGetNotFound) Code() int { + return 404 +} + +func (o *V1HostGroupsIDGetNotFound) Error() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /v1/host-groups/{host_group_id}][%d] v1HostGroupsIdGetNotFound %s", 404, payload) +} + +func (o *V1HostGroupsIDGetNotFound) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /v1/host-groups/{host_group_id}][%d] v1HostGroupsIdGetNotFound %s", 404, payload) +} + +func (o *V1HostGroupsIDGetNotFound) GetPayload() *models.Error { + return o.Payload +} + +func (o *V1HostGroupsIDGetNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewV1HostGroupsIDGetInternalServerError creates a V1HostGroupsIDGetInternalServerError with default headers values +func NewV1HostGroupsIDGetInternalServerError() *V1HostGroupsIDGetInternalServerError { + return &V1HostGroupsIDGetInternalServerError{} +} + +/* +V1HostGroupsIDGetInternalServerError describes a response with status code 500, with default header values. + +Internal Server Error +*/ +type V1HostGroupsIDGetInternalServerError struct { + Payload *models.Error +} + +// IsSuccess returns true when this v1 host groups Id get internal server error response has a 2xx status code +func (o *V1HostGroupsIDGetInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this v1 host groups Id get internal server error response has a 3xx status code +func (o *V1HostGroupsIDGetInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this v1 host groups Id get internal server error response has a 4xx status code +func (o *V1HostGroupsIDGetInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this v1 host groups Id get internal server error response has a 5xx status code +func (o *V1HostGroupsIDGetInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this v1 host groups Id get internal server error response a status code equal to that given +func (o *V1HostGroupsIDGetInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the v1 host groups Id get internal server error response +func (o *V1HostGroupsIDGetInternalServerError) Code() int { + return 500 +} + +func (o *V1HostGroupsIDGetInternalServerError) Error() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /v1/host-groups/{host_group_id}][%d] v1HostGroupsIdGetInternalServerError %s", 500, payload) +} + +func (o *V1HostGroupsIDGetInternalServerError) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /v1/host-groups/{host_group_id}][%d] v1HostGroupsIdGetInternalServerError %s", 500, payload) +} + +func (o *V1HostGroupsIDGetInternalServerError) GetPayload() *models.Error { + return o.Payload +} + +func (o *V1HostGroupsIDGetInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewV1HostGroupsIDGetGatewayTimeout creates a V1HostGroupsIDGetGatewayTimeout with default headers values +func NewV1HostGroupsIDGetGatewayTimeout() *V1HostGroupsIDGetGatewayTimeout { + return &V1HostGroupsIDGetGatewayTimeout{} +} + +/* +V1HostGroupsIDGetGatewayTimeout describes a response with status code 504, with default header values. + +Gateway Timeout. Request is still processing and taking longer than expected. +*/ +type V1HostGroupsIDGetGatewayTimeout struct { + Payload *models.Error +} + +// IsSuccess returns true when this v1 host groups Id get gateway timeout response has a 2xx status code +func (o *V1HostGroupsIDGetGatewayTimeout) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this v1 host groups Id get gateway timeout response has a 3xx status code +func (o *V1HostGroupsIDGetGatewayTimeout) IsRedirect() bool { + return false +} + +// IsClientError returns true when this v1 host groups Id get gateway timeout response has a 4xx status code +func (o *V1HostGroupsIDGetGatewayTimeout) IsClientError() bool { + return false +} + +// IsServerError returns true when this v1 host groups Id get gateway timeout response has a 5xx status code +func (o *V1HostGroupsIDGetGatewayTimeout) IsServerError() bool { + return true +} + +// IsCode returns true when this v1 host groups Id get gateway timeout response a status code equal to that given +func (o *V1HostGroupsIDGetGatewayTimeout) IsCode(code int) bool { + return code == 504 +} + +// Code gets the status code for the v1 host groups Id get gateway timeout response +func (o *V1HostGroupsIDGetGatewayTimeout) Code() int { + return 504 +} + +func (o *V1HostGroupsIDGetGatewayTimeout) Error() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /v1/host-groups/{host_group_id}][%d] v1HostGroupsIdGetGatewayTimeout %s", 504, payload) +} + +func (o *V1HostGroupsIDGetGatewayTimeout) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /v1/host-groups/{host_group_id}][%d] v1HostGroupsIdGetGatewayTimeout %s", 504, payload) +} + +func (o *V1HostGroupsIDGetGatewayTimeout) GetPayload() *models.Error { + return o.Payload +} + +func (o *V1HostGroupsIDGetGatewayTimeout) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/power/client/host_groups/v1_host_groups_id_put_parameters.go b/power/client/host_groups/v1_host_groups_id_put_parameters.go new file mode 100644 index 00000000..02a106c1 --- /dev/null +++ b/power/client/host_groups/v1_host_groups_id_put_parameters.go @@ -0,0 +1,175 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package host_groups + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/IBM-Cloud/power-go-client/power/models" +) + +// NewV1HostGroupsIDPutParams creates a new V1HostGroupsIDPutParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewV1HostGroupsIDPutParams() *V1HostGroupsIDPutParams { + return &V1HostGroupsIDPutParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewV1HostGroupsIDPutParamsWithTimeout creates a new V1HostGroupsIDPutParams object +// with the ability to set a timeout on a request. +func NewV1HostGroupsIDPutParamsWithTimeout(timeout time.Duration) *V1HostGroupsIDPutParams { + return &V1HostGroupsIDPutParams{ + timeout: timeout, + } +} + +// NewV1HostGroupsIDPutParamsWithContext creates a new V1HostGroupsIDPutParams object +// with the ability to set a context for a request. +func NewV1HostGroupsIDPutParamsWithContext(ctx context.Context) *V1HostGroupsIDPutParams { + return &V1HostGroupsIDPutParams{ + Context: ctx, + } +} + +// NewV1HostGroupsIDPutParamsWithHTTPClient creates a new V1HostGroupsIDPutParams object +// with the ability to set a custom HTTPClient for a request. +func NewV1HostGroupsIDPutParamsWithHTTPClient(client *http.Client) *V1HostGroupsIDPutParams { + return &V1HostGroupsIDPutParams{ + HTTPClient: client, + } +} + +/* +V1HostGroupsIDPutParams contains all the parameters to send to the API endpoint + + for the v1 host groups id put operation. + + Typically these are written to a http.Request. +*/ +type V1HostGroupsIDPutParams struct { + + /* Body. + + Parameters to set the sharing status of the host group + */ + Body *models.HostGroupShareOp + + /* HostGroupID. + + Hostgroup ID + */ + HostGroupID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the v1 host groups id put params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *V1HostGroupsIDPutParams) WithDefaults() *V1HostGroupsIDPutParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the v1 host groups id put params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *V1HostGroupsIDPutParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the v1 host groups id put params +func (o *V1HostGroupsIDPutParams) WithTimeout(timeout time.Duration) *V1HostGroupsIDPutParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 host groups id put params +func (o *V1HostGroupsIDPutParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 host groups id put params +func (o *V1HostGroupsIDPutParams) WithContext(ctx context.Context) *V1HostGroupsIDPutParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 host groups id put params +func (o *V1HostGroupsIDPutParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 host groups id put params +func (o *V1HostGroupsIDPutParams) WithHTTPClient(client *http.Client) *V1HostGroupsIDPutParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 host groups id put params +func (o *V1HostGroupsIDPutParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 host groups id put params +func (o *V1HostGroupsIDPutParams) WithBody(body *models.HostGroupShareOp) *V1HostGroupsIDPutParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 host groups id put params +func (o *V1HostGroupsIDPutParams) SetBody(body *models.HostGroupShareOp) { + o.Body = body +} + +// WithHostGroupID adds the hostGroupID to the v1 host groups id put params +func (o *V1HostGroupsIDPutParams) WithHostGroupID(hostGroupID string) *V1HostGroupsIDPutParams { + o.SetHostGroupID(hostGroupID) + return o +} + +// SetHostGroupID adds the hostGroupId to the v1 host groups id put params +func (o *V1HostGroupsIDPutParams) SetHostGroupID(hostGroupID string) { + o.HostGroupID = hostGroupID +} + +// WriteToRequest writes these params to a swagger request +func (o *V1HostGroupsIDPutParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param host_group_id + if err := r.SetPathParam("host_group_id", o.HostGroupID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/power/client/host_groups/v1_host_groups_id_put_responses.go b/power/client/host_groups/v1_host_groups_id_put_responses.go new file mode 100644 index 00000000..0afb7f05 --- /dev/null +++ b/power/client/host_groups/v1_host_groups_id_put_responses.go @@ -0,0 +1,638 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package host_groups + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "encoding/json" + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/IBM-Cloud/power-go-client/power/models" +) + +// V1HostGroupsIDPutReader is a Reader for the V1HostGroupsIDPut structure. +type V1HostGroupsIDPutReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1HostGroupsIDPutReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1HostGroupsIDPutOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 400: + result := NewV1HostGroupsIDPutBadRequest() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 401: + result := NewV1HostGroupsIDPutUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewV1HostGroupsIDPutForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewV1HostGroupsIDPutNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 409: + result := NewV1HostGroupsIDPutConflict() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewV1HostGroupsIDPutInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 504: + result := NewV1HostGroupsIDPutGatewayTimeout() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + default: + return nil, runtime.NewAPIError("[PUT /v1/host-groups/{host_group_id}] v1.hostGroups.id.put", response, response.Code()) + } +} + +// NewV1HostGroupsIDPutOK creates a V1HostGroupsIDPutOK with default headers values +func NewV1HostGroupsIDPutOK() *V1HostGroupsIDPutOK { + return &V1HostGroupsIDPutOK{} +} + +/* +V1HostGroupsIDPutOK describes a response with status code 200, with default header values. + +OK +*/ +type V1HostGroupsIDPutOK struct { + Payload *models.HostGroup +} + +// IsSuccess returns true when this v1 host groups Id put o k response has a 2xx status code +func (o *V1HostGroupsIDPutOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this v1 host groups Id put o k response has a 3xx status code +func (o *V1HostGroupsIDPutOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this v1 host groups Id put o k response has a 4xx status code +func (o *V1HostGroupsIDPutOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this v1 host groups Id put o k response has a 5xx status code +func (o *V1HostGroupsIDPutOK) IsServerError() bool { + return false +} + +// IsCode returns true when this v1 host groups Id put o k response a status code equal to that given +func (o *V1HostGroupsIDPutOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the v1 host groups Id put o k response +func (o *V1HostGroupsIDPutOK) Code() int { + return 200 +} + +func (o *V1HostGroupsIDPutOK) Error() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /v1/host-groups/{host_group_id}][%d] v1HostGroupsIdPutOK %s", 200, payload) +} + +func (o *V1HostGroupsIDPutOK) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /v1/host-groups/{host_group_id}][%d] v1HostGroupsIdPutOK %s", 200, payload) +} + +func (o *V1HostGroupsIDPutOK) GetPayload() *models.HostGroup { + return o.Payload +} + +func (o *V1HostGroupsIDPutOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.HostGroup) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewV1HostGroupsIDPutBadRequest creates a V1HostGroupsIDPutBadRequest with default headers values +func NewV1HostGroupsIDPutBadRequest() *V1HostGroupsIDPutBadRequest { + return &V1HostGroupsIDPutBadRequest{} +} + +/* +V1HostGroupsIDPutBadRequest describes a response with status code 400, with default header values. + +Bad Request +*/ +type V1HostGroupsIDPutBadRequest struct { + Payload *models.Error +} + +// IsSuccess returns true when this v1 host groups Id put bad request response has a 2xx status code +func (o *V1HostGroupsIDPutBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this v1 host groups Id put bad request response has a 3xx status code +func (o *V1HostGroupsIDPutBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this v1 host groups Id put bad request response has a 4xx status code +func (o *V1HostGroupsIDPutBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this v1 host groups Id put bad request response has a 5xx status code +func (o *V1HostGroupsIDPutBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this v1 host groups Id put bad request response a status code equal to that given +func (o *V1HostGroupsIDPutBadRequest) IsCode(code int) bool { + return code == 400 +} + +// Code gets the status code for the v1 host groups Id put bad request response +func (o *V1HostGroupsIDPutBadRequest) Code() int { + return 400 +} + +func (o *V1HostGroupsIDPutBadRequest) Error() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /v1/host-groups/{host_group_id}][%d] v1HostGroupsIdPutBadRequest %s", 400, payload) +} + +func (o *V1HostGroupsIDPutBadRequest) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /v1/host-groups/{host_group_id}][%d] v1HostGroupsIdPutBadRequest %s", 400, payload) +} + +func (o *V1HostGroupsIDPutBadRequest) GetPayload() *models.Error { + return o.Payload +} + +func (o *V1HostGroupsIDPutBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewV1HostGroupsIDPutUnauthorized creates a V1HostGroupsIDPutUnauthorized with default headers values +func NewV1HostGroupsIDPutUnauthorized() *V1HostGroupsIDPutUnauthorized { + return &V1HostGroupsIDPutUnauthorized{} +} + +/* +V1HostGroupsIDPutUnauthorized describes a response with status code 401, with default header values. + +Unauthorized +*/ +type V1HostGroupsIDPutUnauthorized struct { + Payload *models.Error +} + +// IsSuccess returns true when this v1 host groups Id put unauthorized response has a 2xx status code +func (o *V1HostGroupsIDPutUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this v1 host groups Id put unauthorized response has a 3xx status code +func (o *V1HostGroupsIDPutUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this v1 host groups Id put unauthorized response has a 4xx status code +func (o *V1HostGroupsIDPutUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this v1 host groups Id put unauthorized response has a 5xx status code +func (o *V1HostGroupsIDPutUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this v1 host groups Id put unauthorized response a status code equal to that given +func (o *V1HostGroupsIDPutUnauthorized) IsCode(code int) bool { + return code == 401 +} + +// Code gets the status code for the v1 host groups Id put unauthorized response +func (o *V1HostGroupsIDPutUnauthorized) Code() int { + return 401 +} + +func (o *V1HostGroupsIDPutUnauthorized) Error() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /v1/host-groups/{host_group_id}][%d] v1HostGroupsIdPutUnauthorized %s", 401, payload) +} + +func (o *V1HostGroupsIDPutUnauthorized) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /v1/host-groups/{host_group_id}][%d] v1HostGroupsIdPutUnauthorized %s", 401, payload) +} + +func (o *V1HostGroupsIDPutUnauthorized) GetPayload() *models.Error { + return o.Payload +} + +func (o *V1HostGroupsIDPutUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewV1HostGroupsIDPutForbidden creates a V1HostGroupsIDPutForbidden with default headers values +func NewV1HostGroupsIDPutForbidden() *V1HostGroupsIDPutForbidden { + return &V1HostGroupsIDPutForbidden{} +} + +/* +V1HostGroupsIDPutForbidden describes a response with status code 403, with default header values. + +Forbidden +*/ +type V1HostGroupsIDPutForbidden struct { + Payload *models.Error +} + +// IsSuccess returns true when this v1 host groups Id put forbidden response has a 2xx status code +func (o *V1HostGroupsIDPutForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this v1 host groups Id put forbidden response has a 3xx status code +func (o *V1HostGroupsIDPutForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this v1 host groups Id put forbidden response has a 4xx status code +func (o *V1HostGroupsIDPutForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this v1 host groups Id put forbidden response has a 5xx status code +func (o *V1HostGroupsIDPutForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this v1 host groups Id put forbidden response a status code equal to that given +func (o *V1HostGroupsIDPutForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the v1 host groups Id put forbidden response +func (o *V1HostGroupsIDPutForbidden) Code() int { + return 403 +} + +func (o *V1HostGroupsIDPutForbidden) Error() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /v1/host-groups/{host_group_id}][%d] v1HostGroupsIdPutForbidden %s", 403, payload) +} + +func (o *V1HostGroupsIDPutForbidden) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /v1/host-groups/{host_group_id}][%d] v1HostGroupsIdPutForbidden %s", 403, payload) +} + +func (o *V1HostGroupsIDPutForbidden) GetPayload() *models.Error { + return o.Payload +} + +func (o *V1HostGroupsIDPutForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewV1HostGroupsIDPutNotFound creates a V1HostGroupsIDPutNotFound with default headers values +func NewV1HostGroupsIDPutNotFound() *V1HostGroupsIDPutNotFound { + return &V1HostGroupsIDPutNotFound{} +} + +/* +V1HostGroupsIDPutNotFound describes a response with status code 404, with default header values. + +Not Found +*/ +type V1HostGroupsIDPutNotFound struct { + Payload *models.Error +} + +// IsSuccess returns true when this v1 host groups Id put not found response has a 2xx status code +func (o *V1HostGroupsIDPutNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this v1 host groups Id put not found response has a 3xx status code +func (o *V1HostGroupsIDPutNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this v1 host groups Id put not found response has a 4xx status code +func (o *V1HostGroupsIDPutNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this v1 host groups Id put not found response has a 5xx status code +func (o *V1HostGroupsIDPutNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this v1 host groups Id put not found response a status code equal to that given +func (o *V1HostGroupsIDPutNotFound) IsCode(code int) bool { + return code == 404 +} + +// Code gets the status code for the v1 host groups Id put not found response +func (o *V1HostGroupsIDPutNotFound) Code() int { + return 404 +} + +func (o *V1HostGroupsIDPutNotFound) Error() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /v1/host-groups/{host_group_id}][%d] v1HostGroupsIdPutNotFound %s", 404, payload) +} + +func (o *V1HostGroupsIDPutNotFound) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /v1/host-groups/{host_group_id}][%d] v1HostGroupsIdPutNotFound %s", 404, payload) +} + +func (o *V1HostGroupsIDPutNotFound) GetPayload() *models.Error { + return o.Payload +} + +func (o *V1HostGroupsIDPutNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewV1HostGroupsIDPutConflict creates a V1HostGroupsIDPutConflict with default headers values +func NewV1HostGroupsIDPutConflict() *V1HostGroupsIDPutConflict { + return &V1HostGroupsIDPutConflict{} +} + +/* +V1HostGroupsIDPutConflict describes a response with status code 409, with default header values. + +Conflict +*/ +type V1HostGroupsIDPutConflict struct { + Payload *models.Error +} + +// IsSuccess returns true when this v1 host groups Id put conflict response has a 2xx status code +func (o *V1HostGroupsIDPutConflict) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this v1 host groups Id put conflict response has a 3xx status code +func (o *V1HostGroupsIDPutConflict) IsRedirect() bool { + return false +} + +// IsClientError returns true when this v1 host groups Id put conflict response has a 4xx status code +func (o *V1HostGroupsIDPutConflict) IsClientError() bool { + return true +} + +// IsServerError returns true when this v1 host groups Id put conflict response has a 5xx status code +func (o *V1HostGroupsIDPutConflict) IsServerError() bool { + return false +} + +// IsCode returns true when this v1 host groups Id put conflict response a status code equal to that given +func (o *V1HostGroupsIDPutConflict) IsCode(code int) bool { + return code == 409 +} + +// Code gets the status code for the v1 host groups Id put conflict response +func (o *V1HostGroupsIDPutConflict) Code() int { + return 409 +} + +func (o *V1HostGroupsIDPutConflict) Error() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /v1/host-groups/{host_group_id}][%d] v1HostGroupsIdPutConflict %s", 409, payload) +} + +func (o *V1HostGroupsIDPutConflict) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /v1/host-groups/{host_group_id}][%d] v1HostGroupsIdPutConflict %s", 409, payload) +} + +func (o *V1HostGroupsIDPutConflict) GetPayload() *models.Error { + return o.Payload +} + +func (o *V1HostGroupsIDPutConflict) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewV1HostGroupsIDPutInternalServerError creates a V1HostGroupsIDPutInternalServerError with default headers values +func NewV1HostGroupsIDPutInternalServerError() *V1HostGroupsIDPutInternalServerError { + return &V1HostGroupsIDPutInternalServerError{} +} + +/* +V1HostGroupsIDPutInternalServerError describes a response with status code 500, with default header values. + +Internal Server Error +*/ +type V1HostGroupsIDPutInternalServerError struct { + Payload *models.Error +} + +// IsSuccess returns true when this v1 host groups Id put internal server error response has a 2xx status code +func (o *V1HostGroupsIDPutInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this v1 host groups Id put internal server error response has a 3xx status code +func (o *V1HostGroupsIDPutInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this v1 host groups Id put internal server error response has a 4xx status code +func (o *V1HostGroupsIDPutInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this v1 host groups Id put internal server error response has a 5xx status code +func (o *V1HostGroupsIDPutInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this v1 host groups Id put internal server error response a status code equal to that given +func (o *V1HostGroupsIDPutInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the v1 host groups Id put internal server error response +func (o *V1HostGroupsIDPutInternalServerError) Code() int { + return 500 +} + +func (o *V1HostGroupsIDPutInternalServerError) Error() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /v1/host-groups/{host_group_id}][%d] v1HostGroupsIdPutInternalServerError %s", 500, payload) +} + +func (o *V1HostGroupsIDPutInternalServerError) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /v1/host-groups/{host_group_id}][%d] v1HostGroupsIdPutInternalServerError %s", 500, payload) +} + +func (o *V1HostGroupsIDPutInternalServerError) GetPayload() *models.Error { + return o.Payload +} + +func (o *V1HostGroupsIDPutInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewV1HostGroupsIDPutGatewayTimeout creates a V1HostGroupsIDPutGatewayTimeout with default headers values +func NewV1HostGroupsIDPutGatewayTimeout() *V1HostGroupsIDPutGatewayTimeout { + return &V1HostGroupsIDPutGatewayTimeout{} +} + +/* +V1HostGroupsIDPutGatewayTimeout describes a response with status code 504, with default header values. + +Gateway Timeout. Request is still processing and taking longer than expected. +*/ +type V1HostGroupsIDPutGatewayTimeout struct { + Payload *models.Error +} + +// IsSuccess returns true when this v1 host groups Id put gateway timeout response has a 2xx status code +func (o *V1HostGroupsIDPutGatewayTimeout) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this v1 host groups Id put gateway timeout response has a 3xx status code +func (o *V1HostGroupsIDPutGatewayTimeout) IsRedirect() bool { + return false +} + +// IsClientError returns true when this v1 host groups Id put gateway timeout response has a 4xx status code +func (o *V1HostGroupsIDPutGatewayTimeout) IsClientError() bool { + return false +} + +// IsServerError returns true when this v1 host groups Id put gateway timeout response has a 5xx status code +func (o *V1HostGroupsIDPutGatewayTimeout) IsServerError() bool { + return true +} + +// IsCode returns true when this v1 host groups Id put gateway timeout response a status code equal to that given +func (o *V1HostGroupsIDPutGatewayTimeout) IsCode(code int) bool { + return code == 504 +} + +// Code gets the status code for the v1 host groups Id put gateway timeout response +func (o *V1HostGroupsIDPutGatewayTimeout) Code() int { + return 504 +} + +func (o *V1HostGroupsIDPutGatewayTimeout) Error() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /v1/host-groups/{host_group_id}][%d] v1HostGroupsIdPutGatewayTimeout %s", 504, payload) +} + +func (o *V1HostGroupsIDPutGatewayTimeout) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /v1/host-groups/{host_group_id}][%d] v1HostGroupsIdPutGatewayTimeout %s", 504, payload) +} + +func (o *V1HostGroupsIDPutGatewayTimeout) GetPayload() *models.Error { + return o.Payload +} + +func (o *V1HostGroupsIDPutGatewayTimeout) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/power/client/host_groups/v1_host_groups_post_parameters.go b/power/client/host_groups/v1_host_groups_post_parameters.go new file mode 100644 index 00000000..f75d2a3a --- /dev/null +++ b/power/client/host_groups/v1_host_groups_post_parameters.go @@ -0,0 +1,153 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package host_groups + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/IBM-Cloud/power-go-client/power/models" +) + +// NewV1HostGroupsPostParams creates a new V1HostGroupsPostParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewV1HostGroupsPostParams() *V1HostGroupsPostParams { + return &V1HostGroupsPostParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewV1HostGroupsPostParamsWithTimeout creates a new V1HostGroupsPostParams object +// with the ability to set a timeout on a request. +func NewV1HostGroupsPostParamsWithTimeout(timeout time.Duration) *V1HostGroupsPostParams { + return &V1HostGroupsPostParams{ + timeout: timeout, + } +} + +// NewV1HostGroupsPostParamsWithContext creates a new V1HostGroupsPostParams object +// with the ability to set a context for a request. +func NewV1HostGroupsPostParamsWithContext(ctx context.Context) *V1HostGroupsPostParams { + return &V1HostGroupsPostParams{ + Context: ctx, + } +} + +// NewV1HostGroupsPostParamsWithHTTPClient creates a new V1HostGroupsPostParams object +// with the ability to set a custom HTTPClient for a request. +func NewV1HostGroupsPostParamsWithHTTPClient(client *http.Client) *V1HostGroupsPostParams { + return &V1HostGroupsPostParams{ + HTTPClient: client, + } +} + +/* +V1HostGroupsPostParams contains all the parameters to send to the API endpoint + + for the v1 host groups post operation. + + Typically these are written to a http.Request. +*/ +type V1HostGroupsPostParams struct { + + /* Body. + + Parameters for the creation of a new host group + */ + Body *models.HostGroupCreate + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the v1 host groups post params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *V1HostGroupsPostParams) WithDefaults() *V1HostGroupsPostParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the v1 host groups post params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *V1HostGroupsPostParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the v1 host groups post params +func (o *V1HostGroupsPostParams) WithTimeout(timeout time.Duration) *V1HostGroupsPostParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 host groups post params +func (o *V1HostGroupsPostParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 host groups post params +func (o *V1HostGroupsPostParams) WithContext(ctx context.Context) *V1HostGroupsPostParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 host groups post params +func (o *V1HostGroupsPostParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 host groups post params +func (o *V1HostGroupsPostParams) WithHTTPClient(client *http.Client) *V1HostGroupsPostParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 host groups post params +func (o *V1HostGroupsPostParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 host groups post params +func (o *V1HostGroupsPostParams) WithBody(body *models.HostGroupCreate) *V1HostGroupsPostParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 host groups post params +func (o *V1HostGroupsPostParams) SetBody(body *models.HostGroupCreate) { + o.Body = body +} + +// WriteToRequest writes these params to a swagger request +func (o *V1HostGroupsPostParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/power/client/host_groups/v1_host_groups_post_responses.go b/power/client/host_groups/v1_host_groups_post_responses.go new file mode 100644 index 00000000..f20ccba9 --- /dev/null +++ b/power/client/host_groups/v1_host_groups_post_responses.go @@ -0,0 +1,638 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package host_groups + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "encoding/json" + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/IBM-Cloud/power-go-client/power/models" +) + +// V1HostGroupsPostReader is a Reader for the V1HostGroupsPost structure. +type V1HostGroupsPostReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1HostGroupsPostReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 201: + result := NewV1HostGroupsPostCreated() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 400: + result := NewV1HostGroupsPostBadRequest() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 401: + result := NewV1HostGroupsPostUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewV1HostGroupsPostForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 409: + result := NewV1HostGroupsPostConflict() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 422: + result := NewV1HostGroupsPostUnprocessableEntity() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewV1HostGroupsPostInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 504: + result := NewV1HostGroupsPostGatewayTimeout() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + default: + return nil, runtime.NewAPIError("[POST /v1/host-groups] v1.hostGroups.post", response, response.Code()) + } +} + +// NewV1HostGroupsPostCreated creates a V1HostGroupsPostCreated with default headers values +func NewV1HostGroupsPostCreated() *V1HostGroupsPostCreated { + return &V1HostGroupsPostCreated{} +} + +/* +V1HostGroupsPostCreated describes a response with status code 201, with default header values. + +Created +*/ +type V1HostGroupsPostCreated struct { + Payload *models.HostGroup +} + +// IsSuccess returns true when this v1 host groups post created response has a 2xx status code +func (o *V1HostGroupsPostCreated) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this v1 host groups post created response has a 3xx status code +func (o *V1HostGroupsPostCreated) IsRedirect() bool { + return false +} + +// IsClientError returns true when this v1 host groups post created response has a 4xx status code +func (o *V1HostGroupsPostCreated) IsClientError() bool { + return false +} + +// IsServerError returns true when this v1 host groups post created response has a 5xx status code +func (o *V1HostGroupsPostCreated) IsServerError() bool { + return false +} + +// IsCode returns true when this v1 host groups post created response a status code equal to that given +func (o *V1HostGroupsPostCreated) IsCode(code int) bool { + return code == 201 +} + +// Code gets the status code for the v1 host groups post created response +func (o *V1HostGroupsPostCreated) Code() int { + return 201 +} + +func (o *V1HostGroupsPostCreated) Error() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /v1/host-groups][%d] v1HostGroupsPostCreated %s", 201, payload) +} + +func (o *V1HostGroupsPostCreated) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /v1/host-groups][%d] v1HostGroupsPostCreated %s", 201, payload) +} + +func (o *V1HostGroupsPostCreated) GetPayload() *models.HostGroup { + return o.Payload +} + +func (o *V1HostGroupsPostCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.HostGroup) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewV1HostGroupsPostBadRequest creates a V1HostGroupsPostBadRequest with default headers values +func NewV1HostGroupsPostBadRequest() *V1HostGroupsPostBadRequest { + return &V1HostGroupsPostBadRequest{} +} + +/* +V1HostGroupsPostBadRequest describes a response with status code 400, with default header values. + +Bad Request +*/ +type V1HostGroupsPostBadRequest struct { + Payload *models.Error +} + +// IsSuccess returns true when this v1 host groups post bad request response has a 2xx status code +func (o *V1HostGroupsPostBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this v1 host groups post bad request response has a 3xx status code +func (o *V1HostGroupsPostBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this v1 host groups post bad request response has a 4xx status code +func (o *V1HostGroupsPostBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this v1 host groups post bad request response has a 5xx status code +func (o *V1HostGroupsPostBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this v1 host groups post bad request response a status code equal to that given +func (o *V1HostGroupsPostBadRequest) IsCode(code int) bool { + return code == 400 +} + +// Code gets the status code for the v1 host groups post bad request response +func (o *V1HostGroupsPostBadRequest) Code() int { + return 400 +} + +func (o *V1HostGroupsPostBadRequest) Error() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /v1/host-groups][%d] v1HostGroupsPostBadRequest %s", 400, payload) +} + +func (o *V1HostGroupsPostBadRequest) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /v1/host-groups][%d] v1HostGroupsPostBadRequest %s", 400, payload) +} + +func (o *V1HostGroupsPostBadRequest) GetPayload() *models.Error { + return o.Payload +} + +func (o *V1HostGroupsPostBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewV1HostGroupsPostUnauthorized creates a V1HostGroupsPostUnauthorized with default headers values +func NewV1HostGroupsPostUnauthorized() *V1HostGroupsPostUnauthorized { + return &V1HostGroupsPostUnauthorized{} +} + +/* +V1HostGroupsPostUnauthorized describes a response with status code 401, with default header values. + +Unauthorized +*/ +type V1HostGroupsPostUnauthorized struct { + Payload *models.Error +} + +// IsSuccess returns true when this v1 host groups post unauthorized response has a 2xx status code +func (o *V1HostGroupsPostUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this v1 host groups post unauthorized response has a 3xx status code +func (o *V1HostGroupsPostUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this v1 host groups post unauthorized response has a 4xx status code +func (o *V1HostGroupsPostUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this v1 host groups post unauthorized response has a 5xx status code +func (o *V1HostGroupsPostUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this v1 host groups post unauthorized response a status code equal to that given +func (o *V1HostGroupsPostUnauthorized) IsCode(code int) bool { + return code == 401 +} + +// Code gets the status code for the v1 host groups post unauthorized response +func (o *V1HostGroupsPostUnauthorized) Code() int { + return 401 +} + +func (o *V1HostGroupsPostUnauthorized) Error() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /v1/host-groups][%d] v1HostGroupsPostUnauthorized %s", 401, payload) +} + +func (o *V1HostGroupsPostUnauthorized) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /v1/host-groups][%d] v1HostGroupsPostUnauthorized %s", 401, payload) +} + +func (o *V1HostGroupsPostUnauthorized) GetPayload() *models.Error { + return o.Payload +} + +func (o *V1HostGroupsPostUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewV1HostGroupsPostForbidden creates a V1HostGroupsPostForbidden with default headers values +func NewV1HostGroupsPostForbidden() *V1HostGroupsPostForbidden { + return &V1HostGroupsPostForbidden{} +} + +/* +V1HostGroupsPostForbidden describes a response with status code 403, with default header values. + +Forbidden +*/ +type V1HostGroupsPostForbidden struct { + Payload *models.Error +} + +// IsSuccess returns true when this v1 host groups post forbidden response has a 2xx status code +func (o *V1HostGroupsPostForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this v1 host groups post forbidden response has a 3xx status code +func (o *V1HostGroupsPostForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this v1 host groups post forbidden response has a 4xx status code +func (o *V1HostGroupsPostForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this v1 host groups post forbidden response has a 5xx status code +func (o *V1HostGroupsPostForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this v1 host groups post forbidden response a status code equal to that given +func (o *V1HostGroupsPostForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the v1 host groups post forbidden response +func (o *V1HostGroupsPostForbidden) Code() int { + return 403 +} + +func (o *V1HostGroupsPostForbidden) Error() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /v1/host-groups][%d] v1HostGroupsPostForbidden %s", 403, payload) +} + +func (o *V1HostGroupsPostForbidden) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /v1/host-groups][%d] v1HostGroupsPostForbidden %s", 403, payload) +} + +func (o *V1HostGroupsPostForbidden) GetPayload() *models.Error { + return o.Payload +} + +func (o *V1HostGroupsPostForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewV1HostGroupsPostConflict creates a V1HostGroupsPostConflict with default headers values +func NewV1HostGroupsPostConflict() *V1HostGroupsPostConflict { + return &V1HostGroupsPostConflict{} +} + +/* +V1HostGroupsPostConflict describes a response with status code 409, with default header values. + +Conflict +*/ +type V1HostGroupsPostConflict struct { + Payload *models.Error +} + +// IsSuccess returns true when this v1 host groups post conflict response has a 2xx status code +func (o *V1HostGroupsPostConflict) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this v1 host groups post conflict response has a 3xx status code +func (o *V1HostGroupsPostConflict) IsRedirect() bool { + return false +} + +// IsClientError returns true when this v1 host groups post conflict response has a 4xx status code +func (o *V1HostGroupsPostConflict) IsClientError() bool { + return true +} + +// IsServerError returns true when this v1 host groups post conflict response has a 5xx status code +func (o *V1HostGroupsPostConflict) IsServerError() bool { + return false +} + +// IsCode returns true when this v1 host groups post conflict response a status code equal to that given +func (o *V1HostGroupsPostConflict) IsCode(code int) bool { + return code == 409 +} + +// Code gets the status code for the v1 host groups post conflict response +func (o *V1HostGroupsPostConflict) Code() int { + return 409 +} + +func (o *V1HostGroupsPostConflict) Error() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /v1/host-groups][%d] v1HostGroupsPostConflict %s", 409, payload) +} + +func (o *V1HostGroupsPostConflict) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /v1/host-groups][%d] v1HostGroupsPostConflict %s", 409, payload) +} + +func (o *V1HostGroupsPostConflict) GetPayload() *models.Error { + return o.Payload +} + +func (o *V1HostGroupsPostConflict) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewV1HostGroupsPostUnprocessableEntity creates a V1HostGroupsPostUnprocessableEntity with default headers values +func NewV1HostGroupsPostUnprocessableEntity() *V1HostGroupsPostUnprocessableEntity { + return &V1HostGroupsPostUnprocessableEntity{} +} + +/* +V1HostGroupsPostUnprocessableEntity describes a response with status code 422, with default header values. + +Unprocessable Entity +*/ +type V1HostGroupsPostUnprocessableEntity struct { + Payload *models.Error +} + +// IsSuccess returns true when this v1 host groups post unprocessable entity response has a 2xx status code +func (o *V1HostGroupsPostUnprocessableEntity) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this v1 host groups post unprocessable entity response has a 3xx status code +func (o *V1HostGroupsPostUnprocessableEntity) IsRedirect() bool { + return false +} + +// IsClientError returns true when this v1 host groups post unprocessable entity response has a 4xx status code +func (o *V1HostGroupsPostUnprocessableEntity) IsClientError() bool { + return true +} + +// IsServerError returns true when this v1 host groups post unprocessable entity response has a 5xx status code +func (o *V1HostGroupsPostUnprocessableEntity) IsServerError() bool { + return false +} + +// IsCode returns true when this v1 host groups post unprocessable entity response a status code equal to that given +func (o *V1HostGroupsPostUnprocessableEntity) IsCode(code int) bool { + return code == 422 +} + +// Code gets the status code for the v1 host groups post unprocessable entity response +func (o *V1HostGroupsPostUnprocessableEntity) Code() int { + return 422 +} + +func (o *V1HostGroupsPostUnprocessableEntity) Error() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /v1/host-groups][%d] v1HostGroupsPostUnprocessableEntity %s", 422, payload) +} + +func (o *V1HostGroupsPostUnprocessableEntity) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /v1/host-groups][%d] v1HostGroupsPostUnprocessableEntity %s", 422, payload) +} + +func (o *V1HostGroupsPostUnprocessableEntity) GetPayload() *models.Error { + return o.Payload +} + +func (o *V1HostGroupsPostUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewV1HostGroupsPostInternalServerError creates a V1HostGroupsPostInternalServerError with default headers values +func NewV1HostGroupsPostInternalServerError() *V1HostGroupsPostInternalServerError { + return &V1HostGroupsPostInternalServerError{} +} + +/* +V1HostGroupsPostInternalServerError describes a response with status code 500, with default header values. + +Internal Server Error +*/ +type V1HostGroupsPostInternalServerError struct { + Payload *models.Error +} + +// IsSuccess returns true when this v1 host groups post internal server error response has a 2xx status code +func (o *V1HostGroupsPostInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this v1 host groups post internal server error response has a 3xx status code +func (o *V1HostGroupsPostInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this v1 host groups post internal server error response has a 4xx status code +func (o *V1HostGroupsPostInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this v1 host groups post internal server error response has a 5xx status code +func (o *V1HostGroupsPostInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this v1 host groups post internal server error response a status code equal to that given +func (o *V1HostGroupsPostInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the v1 host groups post internal server error response +func (o *V1HostGroupsPostInternalServerError) Code() int { + return 500 +} + +func (o *V1HostGroupsPostInternalServerError) Error() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /v1/host-groups][%d] v1HostGroupsPostInternalServerError %s", 500, payload) +} + +func (o *V1HostGroupsPostInternalServerError) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /v1/host-groups][%d] v1HostGroupsPostInternalServerError %s", 500, payload) +} + +func (o *V1HostGroupsPostInternalServerError) GetPayload() *models.Error { + return o.Payload +} + +func (o *V1HostGroupsPostInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewV1HostGroupsPostGatewayTimeout creates a V1HostGroupsPostGatewayTimeout with default headers values +func NewV1HostGroupsPostGatewayTimeout() *V1HostGroupsPostGatewayTimeout { + return &V1HostGroupsPostGatewayTimeout{} +} + +/* +V1HostGroupsPostGatewayTimeout describes a response with status code 504, with default header values. + +Gateway Timeout. Request is still processing and taking longer than expected. +*/ +type V1HostGroupsPostGatewayTimeout struct { + Payload *models.Error +} + +// IsSuccess returns true when this v1 host groups post gateway timeout response has a 2xx status code +func (o *V1HostGroupsPostGatewayTimeout) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this v1 host groups post gateway timeout response has a 3xx status code +func (o *V1HostGroupsPostGatewayTimeout) IsRedirect() bool { + return false +} + +// IsClientError returns true when this v1 host groups post gateway timeout response has a 4xx status code +func (o *V1HostGroupsPostGatewayTimeout) IsClientError() bool { + return false +} + +// IsServerError returns true when this v1 host groups post gateway timeout response has a 5xx status code +func (o *V1HostGroupsPostGatewayTimeout) IsServerError() bool { + return true +} + +// IsCode returns true when this v1 host groups post gateway timeout response a status code equal to that given +func (o *V1HostGroupsPostGatewayTimeout) IsCode(code int) bool { + return code == 504 +} + +// Code gets the status code for the v1 host groups post gateway timeout response +func (o *V1HostGroupsPostGatewayTimeout) Code() int { + return 504 +} + +func (o *V1HostGroupsPostGatewayTimeout) Error() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /v1/host-groups][%d] v1HostGroupsPostGatewayTimeout %s", 504, payload) +} + +func (o *V1HostGroupsPostGatewayTimeout) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /v1/host-groups][%d] v1HostGroupsPostGatewayTimeout %s", 504, payload) +} + +func (o *V1HostGroupsPostGatewayTimeout) GetPayload() *models.Error { + return o.Payload +} + +func (o *V1HostGroupsPostGatewayTimeout) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/power/client/hostgroups/v1_hosts_get_parameters.go b/power/client/host_groups/v1_hosts_get_parameters.go similarity index 99% rename from power/client/hostgroups/v1_hosts_get_parameters.go rename to power/client/host_groups/v1_hosts_get_parameters.go index b2b9e6c7..b4139ea5 100644 --- a/power/client/hostgroups/v1_hosts_get_parameters.go +++ b/power/client/host_groups/v1_hosts_get_parameters.go @@ -1,6 +1,6 @@ // Code generated by go-swagger; DO NOT EDIT. -package hostgroups +package host_groups // This file was generated by the swagger tool. // Editing this file might prove futile when you re-run the swagger generate command diff --git a/power/client/hostgroups/v1_hosts_get_responses.go b/power/client/host_groups/v1_hosts_get_responses.go similarity index 92% rename from power/client/hostgroups/v1_hosts_get_responses.go rename to power/client/host_groups/v1_hosts_get_responses.go index 80e385ed..632109b8 100644 --- a/power/client/hostgroups/v1_hosts_get_responses.go +++ b/power/client/host_groups/v1_hosts_get_responses.go @@ -1,11 +1,12 @@ // Code generated by go-swagger; DO NOT EDIT. -package hostgroups +package host_groups // This file was generated by the swagger tool. // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -109,11 +110,13 @@ func (o *V1HostsGetOK) Code() int { } func (o *V1HostsGetOK) Error() string { - return fmt.Sprintf("[GET /v1/hosts][%d] v1HostsGetOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /v1/hosts][%d] v1HostsGetOK %s", 200, payload) } func (o *V1HostsGetOK) String() string { - return fmt.Sprintf("[GET /v1/hosts][%d] v1HostsGetOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /v1/hosts][%d] v1HostsGetOK %s", 200, payload) } func (o *V1HostsGetOK) GetPayload() models.HostList { @@ -175,11 +178,13 @@ func (o *V1HostsGetBadRequest) Code() int { } func (o *V1HostsGetBadRequest) Error() string { - return fmt.Sprintf("[GET /v1/hosts][%d] v1HostsGetBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /v1/hosts][%d] v1HostsGetBadRequest %s", 400, payload) } func (o *V1HostsGetBadRequest) String() string { - return fmt.Sprintf("[GET /v1/hosts][%d] v1HostsGetBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /v1/hosts][%d] v1HostsGetBadRequest %s", 400, payload) } func (o *V1HostsGetBadRequest) GetPayload() *models.Error { @@ -243,11 +248,13 @@ func (o *V1HostsGetUnauthorized) Code() int { } func (o *V1HostsGetUnauthorized) Error() string { - return fmt.Sprintf("[GET /v1/hosts][%d] v1HostsGetUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /v1/hosts][%d] v1HostsGetUnauthorized %s", 401, payload) } func (o *V1HostsGetUnauthorized) String() string { - return fmt.Sprintf("[GET /v1/hosts][%d] v1HostsGetUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /v1/hosts][%d] v1HostsGetUnauthorized %s", 401, payload) } func (o *V1HostsGetUnauthorized) GetPayload() *models.Error { @@ -311,11 +318,13 @@ func (o *V1HostsGetForbidden) Code() int { } func (o *V1HostsGetForbidden) Error() string { - return fmt.Sprintf("[GET /v1/hosts][%d] v1HostsGetForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /v1/hosts][%d] v1HostsGetForbidden %s", 403, payload) } func (o *V1HostsGetForbidden) String() string { - return fmt.Sprintf("[GET /v1/hosts][%d] v1HostsGetForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /v1/hosts][%d] v1HostsGetForbidden %s", 403, payload) } func (o *V1HostsGetForbidden) GetPayload() *models.Error { @@ -379,11 +388,13 @@ func (o *V1HostsGetInternalServerError) Code() int { } func (o *V1HostsGetInternalServerError) Error() string { - return fmt.Sprintf("[GET /v1/hosts][%d] v1HostsGetInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /v1/hosts][%d] v1HostsGetInternalServerError %s", 500, payload) } func (o *V1HostsGetInternalServerError) String() string { - return fmt.Sprintf("[GET /v1/hosts][%d] v1HostsGetInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /v1/hosts][%d] v1HostsGetInternalServerError %s", 500, payload) } func (o *V1HostsGetInternalServerError) GetPayload() *models.Error { @@ -447,11 +458,13 @@ func (o *V1HostsGetGatewayTimeout) Code() int { } func (o *V1HostsGetGatewayTimeout) Error() string { - return fmt.Sprintf("[GET /v1/hosts][%d] v1HostsGetGatewayTimeout %+v", 504, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /v1/hosts][%d] v1HostsGetGatewayTimeout %s", 504, payload) } func (o *V1HostsGetGatewayTimeout) String() string { - return fmt.Sprintf("[GET /v1/hosts][%d] v1HostsGetGatewayTimeout %+v", 504, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /v1/hosts][%d] v1HostsGetGatewayTimeout %s", 504, payload) } func (o *V1HostsGetGatewayTimeout) GetPayload() *models.Error { diff --git a/power/client/hostgroups/v1_hosts_id_delete_parameters.go b/power/client/host_groups/v1_hosts_id_delete_parameters.go similarity index 99% rename from power/client/hostgroups/v1_hosts_id_delete_parameters.go rename to power/client/host_groups/v1_hosts_id_delete_parameters.go index e2508c8d..412fe32c 100644 --- a/power/client/hostgroups/v1_hosts_id_delete_parameters.go +++ b/power/client/host_groups/v1_hosts_id_delete_parameters.go @@ -1,6 +1,6 @@ // Code generated by go-swagger; DO NOT EDIT. -package hostgroups +package host_groups // This file was generated by the swagger tool. // Editing this file might prove futile when you re-run the swagger generate command diff --git a/power/client/hostgroups/v1_hosts_id_delete_responses.go b/power/client/host_groups/v1_hosts_id_delete_responses.go similarity index 93% rename from power/client/hostgroups/v1_hosts_id_delete_responses.go rename to power/client/host_groups/v1_hosts_id_delete_responses.go index e41a8ea2..afda9239 100644 --- a/power/client/hostgroups/v1_hosts_id_delete_responses.go +++ b/power/client/host_groups/v1_hosts_id_delete_responses.go @@ -1,11 +1,12 @@ // Code generated by go-swagger; DO NOT EDIT. -package hostgroups +package host_groups // This file was generated by the swagger tool. // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -115,11 +116,13 @@ func (o *V1HostsIDDeleteAccepted) Code() int { } func (o *V1HostsIDDeleteAccepted) Error() string { - return fmt.Sprintf("[DELETE /v1/hosts/{host_id}][%d] v1HostsIdDeleteAccepted %+v", 202, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /v1/hosts/{host_id}][%d] v1HostsIdDeleteAccepted %s", 202, payload) } func (o *V1HostsIDDeleteAccepted) String() string { - return fmt.Sprintf("[DELETE /v1/hosts/{host_id}][%d] v1HostsIdDeleteAccepted %+v", 202, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /v1/hosts/{host_id}][%d] v1HostsIdDeleteAccepted %s", 202, payload) } func (o *V1HostsIDDeleteAccepted) GetPayload() models.Object { @@ -181,11 +184,13 @@ func (o *V1HostsIDDeleteBadRequest) Code() int { } func (o *V1HostsIDDeleteBadRequest) Error() string { - return fmt.Sprintf("[DELETE /v1/hosts/{host_id}][%d] v1HostsIdDeleteBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /v1/hosts/{host_id}][%d] v1HostsIdDeleteBadRequest %s", 400, payload) } func (o *V1HostsIDDeleteBadRequest) String() string { - return fmt.Sprintf("[DELETE /v1/hosts/{host_id}][%d] v1HostsIdDeleteBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /v1/hosts/{host_id}][%d] v1HostsIdDeleteBadRequest %s", 400, payload) } func (o *V1HostsIDDeleteBadRequest) GetPayload() *models.Error { @@ -249,11 +254,13 @@ func (o *V1HostsIDDeleteUnauthorized) Code() int { } func (o *V1HostsIDDeleteUnauthorized) Error() string { - return fmt.Sprintf("[DELETE /v1/hosts/{host_id}][%d] v1HostsIdDeleteUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /v1/hosts/{host_id}][%d] v1HostsIdDeleteUnauthorized %s", 401, payload) } func (o *V1HostsIDDeleteUnauthorized) String() string { - return fmt.Sprintf("[DELETE /v1/hosts/{host_id}][%d] v1HostsIdDeleteUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /v1/hosts/{host_id}][%d] v1HostsIdDeleteUnauthorized %s", 401, payload) } func (o *V1HostsIDDeleteUnauthorized) GetPayload() *models.Error { @@ -317,11 +324,13 @@ func (o *V1HostsIDDeleteForbidden) Code() int { } func (o *V1HostsIDDeleteForbidden) Error() string { - return fmt.Sprintf("[DELETE /v1/hosts/{host_id}][%d] v1HostsIdDeleteForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /v1/hosts/{host_id}][%d] v1HostsIdDeleteForbidden %s", 403, payload) } func (o *V1HostsIDDeleteForbidden) String() string { - return fmt.Sprintf("[DELETE /v1/hosts/{host_id}][%d] v1HostsIdDeleteForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /v1/hosts/{host_id}][%d] v1HostsIdDeleteForbidden %s", 403, payload) } func (o *V1HostsIDDeleteForbidden) GetPayload() *models.Error { @@ -385,11 +394,13 @@ func (o *V1HostsIDDeleteNotFound) Code() int { } func (o *V1HostsIDDeleteNotFound) Error() string { - return fmt.Sprintf("[DELETE /v1/hosts/{host_id}][%d] v1HostsIdDeleteNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /v1/hosts/{host_id}][%d] v1HostsIdDeleteNotFound %s", 404, payload) } func (o *V1HostsIDDeleteNotFound) String() string { - return fmt.Sprintf("[DELETE /v1/hosts/{host_id}][%d] v1HostsIdDeleteNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /v1/hosts/{host_id}][%d] v1HostsIdDeleteNotFound %s", 404, payload) } func (o *V1HostsIDDeleteNotFound) GetPayload() *models.Error { @@ -453,11 +464,13 @@ func (o *V1HostsIDDeleteInternalServerError) Code() int { } func (o *V1HostsIDDeleteInternalServerError) Error() string { - return fmt.Sprintf("[DELETE /v1/hosts/{host_id}][%d] v1HostsIdDeleteInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /v1/hosts/{host_id}][%d] v1HostsIdDeleteInternalServerError %s", 500, payload) } func (o *V1HostsIDDeleteInternalServerError) String() string { - return fmt.Sprintf("[DELETE /v1/hosts/{host_id}][%d] v1HostsIdDeleteInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /v1/hosts/{host_id}][%d] v1HostsIdDeleteInternalServerError %s", 500, payload) } func (o *V1HostsIDDeleteInternalServerError) GetPayload() *models.Error { @@ -521,11 +534,13 @@ func (o *V1HostsIDDeleteGatewayTimeout) Code() int { } func (o *V1HostsIDDeleteGatewayTimeout) Error() string { - return fmt.Sprintf("[DELETE /v1/hosts/{host_id}][%d] v1HostsIdDeleteGatewayTimeout %+v", 504, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /v1/hosts/{host_id}][%d] v1HostsIdDeleteGatewayTimeout %s", 504, payload) } func (o *V1HostsIDDeleteGatewayTimeout) String() string { - return fmt.Sprintf("[DELETE /v1/hosts/{host_id}][%d] v1HostsIdDeleteGatewayTimeout %+v", 504, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /v1/hosts/{host_id}][%d] v1HostsIdDeleteGatewayTimeout %s", 504, payload) } func (o *V1HostsIDDeleteGatewayTimeout) GetPayload() *models.Error { diff --git a/power/client/hostgroups/v1_hosts_id_get_parameters.go b/power/client/host_groups/v1_hosts_id_get_parameters.go similarity index 99% rename from power/client/hostgroups/v1_hosts_id_get_parameters.go rename to power/client/host_groups/v1_hosts_id_get_parameters.go index 73c5b368..422c12ff 100644 --- a/power/client/hostgroups/v1_hosts_id_get_parameters.go +++ b/power/client/host_groups/v1_hosts_id_get_parameters.go @@ -1,6 +1,6 @@ // Code generated by go-swagger; DO NOT EDIT. -package hostgroups +package host_groups // This file was generated by the swagger tool. // Editing this file might prove futile when you re-run the swagger generate command diff --git a/power/client/hostgroups/v1_hosts_id_get_responses.go b/power/client/host_groups/v1_hosts_id_get_responses.go similarity index 94% rename from power/client/hostgroups/v1_hosts_id_get_responses.go rename to power/client/host_groups/v1_hosts_id_get_responses.go index f28f8270..3ea59092 100644 --- a/power/client/hostgroups/v1_hosts_id_get_responses.go +++ b/power/client/host_groups/v1_hosts_id_get_responses.go @@ -1,11 +1,12 @@ // Code generated by go-swagger; DO NOT EDIT. -package hostgroups +package host_groups // This file was generated by the swagger tool. // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -115,11 +116,13 @@ func (o *V1HostsIDGetOK) Code() int { } func (o *V1HostsIDGetOK) Error() string { - return fmt.Sprintf("[GET /v1/hosts/{host_id}][%d] v1HostsIdGetOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /v1/hosts/{host_id}][%d] v1HostsIdGetOK %s", 200, payload) } func (o *V1HostsIDGetOK) String() string { - return fmt.Sprintf("[GET /v1/hosts/{host_id}][%d] v1HostsIdGetOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /v1/hosts/{host_id}][%d] v1HostsIdGetOK %s", 200, payload) } func (o *V1HostsIDGetOK) GetPayload() *models.Host { @@ -183,11 +186,13 @@ func (o *V1HostsIDGetBadRequest) Code() int { } func (o *V1HostsIDGetBadRequest) Error() string { - return fmt.Sprintf("[GET /v1/hosts/{host_id}][%d] v1HostsIdGetBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /v1/hosts/{host_id}][%d] v1HostsIdGetBadRequest %s", 400, payload) } func (o *V1HostsIDGetBadRequest) String() string { - return fmt.Sprintf("[GET /v1/hosts/{host_id}][%d] v1HostsIdGetBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /v1/hosts/{host_id}][%d] v1HostsIdGetBadRequest %s", 400, payload) } func (o *V1HostsIDGetBadRequest) GetPayload() *models.Error { @@ -251,11 +256,13 @@ func (o *V1HostsIDGetUnauthorized) Code() int { } func (o *V1HostsIDGetUnauthorized) Error() string { - return fmt.Sprintf("[GET /v1/hosts/{host_id}][%d] v1HostsIdGetUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /v1/hosts/{host_id}][%d] v1HostsIdGetUnauthorized %s", 401, payload) } func (o *V1HostsIDGetUnauthorized) String() string { - return fmt.Sprintf("[GET /v1/hosts/{host_id}][%d] v1HostsIdGetUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /v1/hosts/{host_id}][%d] v1HostsIdGetUnauthorized %s", 401, payload) } func (o *V1HostsIDGetUnauthorized) GetPayload() *models.Error { @@ -319,11 +326,13 @@ func (o *V1HostsIDGetForbidden) Code() int { } func (o *V1HostsIDGetForbidden) Error() string { - return fmt.Sprintf("[GET /v1/hosts/{host_id}][%d] v1HostsIdGetForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /v1/hosts/{host_id}][%d] v1HostsIdGetForbidden %s", 403, payload) } func (o *V1HostsIDGetForbidden) String() string { - return fmt.Sprintf("[GET /v1/hosts/{host_id}][%d] v1HostsIdGetForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /v1/hosts/{host_id}][%d] v1HostsIdGetForbidden %s", 403, payload) } func (o *V1HostsIDGetForbidden) GetPayload() *models.Error { @@ -387,11 +396,13 @@ func (o *V1HostsIDGetNotFound) Code() int { } func (o *V1HostsIDGetNotFound) Error() string { - return fmt.Sprintf("[GET /v1/hosts/{host_id}][%d] v1HostsIdGetNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /v1/hosts/{host_id}][%d] v1HostsIdGetNotFound %s", 404, payload) } func (o *V1HostsIDGetNotFound) String() string { - return fmt.Sprintf("[GET /v1/hosts/{host_id}][%d] v1HostsIdGetNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /v1/hosts/{host_id}][%d] v1HostsIdGetNotFound %s", 404, payload) } func (o *V1HostsIDGetNotFound) GetPayload() *models.Error { @@ -455,11 +466,13 @@ func (o *V1HostsIDGetInternalServerError) Code() int { } func (o *V1HostsIDGetInternalServerError) Error() string { - return fmt.Sprintf("[GET /v1/hosts/{host_id}][%d] v1HostsIdGetInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /v1/hosts/{host_id}][%d] v1HostsIdGetInternalServerError %s", 500, payload) } func (o *V1HostsIDGetInternalServerError) String() string { - return fmt.Sprintf("[GET /v1/hosts/{host_id}][%d] v1HostsIdGetInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /v1/hosts/{host_id}][%d] v1HostsIdGetInternalServerError %s", 500, payload) } func (o *V1HostsIDGetInternalServerError) GetPayload() *models.Error { @@ -523,11 +536,13 @@ func (o *V1HostsIDGetGatewayTimeout) Code() int { } func (o *V1HostsIDGetGatewayTimeout) Error() string { - return fmt.Sprintf("[GET /v1/hosts/{host_id}][%d] v1HostsIdGetGatewayTimeout %+v", 504, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /v1/hosts/{host_id}][%d] v1HostsIdGetGatewayTimeout %s", 504, payload) } func (o *V1HostsIDGetGatewayTimeout) String() string { - return fmt.Sprintf("[GET /v1/hosts/{host_id}][%d] v1HostsIdGetGatewayTimeout %+v", 504, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /v1/hosts/{host_id}][%d] v1HostsIdGetGatewayTimeout %s", 504, payload) } func (o *V1HostsIDGetGatewayTimeout) GetPayload() *models.Error { diff --git a/power/client/hostgroups/v1_hosts_id_put_parameters.go b/power/client/host_groups/v1_hosts_id_put_parameters.go similarity index 99% rename from power/client/hostgroups/v1_hosts_id_put_parameters.go rename to power/client/host_groups/v1_hosts_id_put_parameters.go index d1186ae9..557c18a4 100644 --- a/power/client/hostgroups/v1_hosts_id_put_parameters.go +++ b/power/client/host_groups/v1_hosts_id_put_parameters.go @@ -1,6 +1,6 @@ // Code generated by go-swagger; DO NOT EDIT. -package hostgroups +package host_groups // This file was generated by the swagger tool. // Editing this file might prove futile when you re-run the swagger generate command diff --git a/power/client/hostgroups/v1_hosts_id_put_responses.go b/power/client/host_groups/v1_hosts_id_put_responses.go similarity index 94% rename from power/client/hostgroups/v1_hosts_id_put_responses.go rename to power/client/host_groups/v1_hosts_id_put_responses.go index 322ce86b..d71402c9 100644 --- a/power/client/hostgroups/v1_hosts_id_put_responses.go +++ b/power/client/host_groups/v1_hosts_id_put_responses.go @@ -1,11 +1,12 @@ // Code generated by go-swagger; DO NOT EDIT. -package hostgroups +package host_groups // This file was generated by the swagger tool. // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -121,11 +122,13 @@ func (o *V1HostsIDPutOK) Code() int { } func (o *V1HostsIDPutOK) Error() string { - return fmt.Sprintf("[PUT /v1/hosts/{host_id}][%d] v1HostsIdPutOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /v1/hosts/{host_id}][%d] v1HostsIdPutOK %s", 200, payload) } func (o *V1HostsIDPutOK) String() string { - return fmt.Sprintf("[PUT /v1/hosts/{host_id}][%d] v1HostsIdPutOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /v1/hosts/{host_id}][%d] v1HostsIdPutOK %s", 200, payload) } func (o *V1HostsIDPutOK) GetPayload() *models.Host { @@ -189,11 +192,13 @@ func (o *V1HostsIDPutBadRequest) Code() int { } func (o *V1HostsIDPutBadRequest) Error() string { - return fmt.Sprintf("[PUT /v1/hosts/{host_id}][%d] v1HostsIdPutBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /v1/hosts/{host_id}][%d] v1HostsIdPutBadRequest %s", 400, payload) } func (o *V1HostsIDPutBadRequest) String() string { - return fmt.Sprintf("[PUT /v1/hosts/{host_id}][%d] v1HostsIdPutBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /v1/hosts/{host_id}][%d] v1HostsIdPutBadRequest %s", 400, payload) } func (o *V1HostsIDPutBadRequest) GetPayload() *models.Error { @@ -257,11 +262,13 @@ func (o *V1HostsIDPutUnauthorized) Code() int { } func (o *V1HostsIDPutUnauthorized) Error() string { - return fmt.Sprintf("[PUT /v1/hosts/{host_id}][%d] v1HostsIdPutUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /v1/hosts/{host_id}][%d] v1HostsIdPutUnauthorized %s", 401, payload) } func (o *V1HostsIDPutUnauthorized) String() string { - return fmt.Sprintf("[PUT /v1/hosts/{host_id}][%d] v1HostsIdPutUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /v1/hosts/{host_id}][%d] v1HostsIdPutUnauthorized %s", 401, payload) } func (o *V1HostsIDPutUnauthorized) GetPayload() *models.Error { @@ -325,11 +332,13 @@ func (o *V1HostsIDPutForbidden) Code() int { } func (o *V1HostsIDPutForbidden) Error() string { - return fmt.Sprintf("[PUT /v1/hosts/{host_id}][%d] v1HostsIdPutForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /v1/hosts/{host_id}][%d] v1HostsIdPutForbidden %s", 403, payload) } func (o *V1HostsIDPutForbidden) String() string { - return fmt.Sprintf("[PUT /v1/hosts/{host_id}][%d] v1HostsIdPutForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /v1/hosts/{host_id}][%d] v1HostsIdPutForbidden %s", 403, payload) } func (o *V1HostsIDPutForbidden) GetPayload() *models.Error { @@ -393,11 +402,13 @@ func (o *V1HostsIDPutNotFound) Code() int { } func (o *V1HostsIDPutNotFound) Error() string { - return fmt.Sprintf("[PUT /v1/hosts/{host_id}][%d] v1HostsIdPutNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /v1/hosts/{host_id}][%d] v1HostsIdPutNotFound %s", 404, payload) } func (o *V1HostsIDPutNotFound) String() string { - return fmt.Sprintf("[PUT /v1/hosts/{host_id}][%d] v1HostsIdPutNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /v1/hosts/{host_id}][%d] v1HostsIdPutNotFound %s", 404, payload) } func (o *V1HostsIDPutNotFound) GetPayload() *models.Error { @@ -461,11 +472,13 @@ func (o *V1HostsIDPutUnprocessableEntity) Code() int { } func (o *V1HostsIDPutUnprocessableEntity) Error() string { - return fmt.Sprintf("[PUT /v1/hosts/{host_id}][%d] v1HostsIdPutUnprocessableEntity %+v", 422, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /v1/hosts/{host_id}][%d] v1HostsIdPutUnprocessableEntity %s", 422, payload) } func (o *V1HostsIDPutUnprocessableEntity) String() string { - return fmt.Sprintf("[PUT /v1/hosts/{host_id}][%d] v1HostsIdPutUnprocessableEntity %+v", 422, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /v1/hosts/{host_id}][%d] v1HostsIdPutUnprocessableEntity %s", 422, payload) } func (o *V1HostsIDPutUnprocessableEntity) GetPayload() *models.Error { @@ -529,11 +542,13 @@ func (o *V1HostsIDPutInternalServerError) Code() int { } func (o *V1HostsIDPutInternalServerError) Error() string { - return fmt.Sprintf("[PUT /v1/hosts/{host_id}][%d] v1HostsIdPutInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /v1/hosts/{host_id}][%d] v1HostsIdPutInternalServerError %s", 500, payload) } func (o *V1HostsIDPutInternalServerError) String() string { - return fmt.Sprintf("[PUT /v1/hosts/{host_id}][%d] v1HostsIdPutInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /v1/hosts/{host_id}][%d] v1HostsIdPutInternalServerError %s", 500, payload) } func (o *V1HostsIDPutInternalServerError) GetPayload() *models.Error { @@ -597,11 +612,13 @@ func (o *V1HostsIDPutGatewayTimeout) Code() int { } func (o *V1HostsIDPutGatewayTimeout) Error() string { - return fmt.Sprintf("[PUT /v1/hosts/{host_id}][%d] v1HostsIdPutGatewayTimeout %+v", 504, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /v1/hosts/{host_id}][%d] v1HostsIdPutGatewayTimeout %s", 504, payload) } func (o *V1HostsIDPutGatewayTimeout) String() string { - return fmt.Sprintf("[PUT /v1/hosts/{host_id}][%d] v1HostsIdPutGatewayTimeout %+v", 504, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /v1/hosts/{host_id}][%d] v1HostsIdPutGatewayTimeout %s", 504, payload) } func (o *V1HostsIDPutGatewayTimeout) GetPayload() *models.Error { diff --git a/power/client/hostgroups/v1_hosts_post_parameters.go b/power/client/host_groups/v1_hosts_post_parameters.go similarity index 98% rename from power/client/hostgroups/v1_hosts_post_parameters.go rename to power/client/host_groups/v1_hosts_post_parameters.go index d44a5ff3..21437e7a 100644 --- a/power/client/hostgroups/v1_hosts_post_parameters.go +++ b/power/client/host_groups/v1_hosts_post_parameters.go @@ -1,6 +1,6 @@ // Code generated by go-swagger; DO NOT EDIT. -package hostgroups +package host_groups // This file was generated by the swagger tool. // Editing this file might prove futile when you re-run the swagger generate command @@ -65,7 +65,7 @@ type V1HostsPostParams struct { /* Body. - Parameters to add a host to an existing hostgroup + Parameters to add a host to an existing host group */ Body *models.HostCreate diff --git a/power/client/hostgroups/v1_hosts_post_responses.go b/power/client/host_groups/v1_hosts_post_responses.go similarity index 92% rename from power/client/hostgroups/v1_hosts_post_responses.go rename to power/client/host_groups/v1_hosts_post_responses.go index 40dc82e7..55d71133 100644 --- a/power/client/hostgroups/v1_hosts_post_responses.go +++ b/power/client/host_groups/v1_hosts_post_responses.go @@ -1,11 +1,12 @@ // Code generated by go-swagger; DO NOT EDIT. -package hostgroups +package host_groups // This file was generated by the swagger tool. // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -81,7 +82,7 @@ V1HostsPostCreated describes a response with status code 201, with default heade Created */ type V1HostsPostCreated struct { - Payload *models.Host + Payload models.HostList } // IsSuccess returns true when this v1 hosts post created response has a 2xx status code @@ -115,23 +116,23 @@ func (o *V1HostsPostCreated) Code() int { } func (o *V1HostsPostCreated) Error() string { - return fmt.Sprintf("[POST /v1/hosts][%d] v1HostsPostCreated %+v", 201, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /v1/hosts][%d] v1HostsPostCreated %s", 201, payload) } func (o *V1HostsPostCreated) String() string { - return fmt.Sprintf("[POST /v1/hosts][%d] v1HostsPostCreated %+v", 201, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /v1/hosts][%d] v1HostsPostCreated %s", 201, payload) } -func (o *V1HostsPostCreated) GetPayload() *models.Host { +func (o *V1HostsPostCreated) GetPayload() models.HostList { return o.Payload } func (o *V1HostsPostCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(models.Host) - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { return err } @@ -183,11 +184,13 @@ func (o *V1HostsPostBadRequest) Code() int { } func (o *V1HostsPostBadRequest) Error() string { - return fmt.Sprintf("[POST /v1/hosts][%d] v1HostsPostBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /v1/hosts][%d] v1HostsPostBadRequest %s", 400, payload) } func (o *V1HostsPostBadRequest) String() string { - return fmt.Sprintf("[POST /v1/hosts][%d] v1HostsPostBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /v1/hosts][%d] v1HostsPostBadRequest %s", 400, payload) } func (o *V1HostsPostBadRequest) GetPayload() *models.Error { @@ -251,11 +254,13 @@ func (o *V1HostsPostUnauthorized) Code() int { } func (o *V1HostsPostUnauthorized) Error() string { - return fmt.Sprintf("[POST /v1/hosts][%d] v1HostsPostUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /v1/hosts][%d] v1HostsPostUnauthorized %s", 401, payload) } func (o *V1HostsPostUnauthorized) String() string { - return fmt.Sprintf("[POST /v1/hosts][%d] v1HostsPostUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /v1/hosts][%d] v1HostsPostUnauthorized %s", 401, payload) } func (o *V1HostsPostUnauthorized) GetPayload() *models.Error { @@ -319,11 +324,13 @@ func (o *V1HostsPostForbidden) Code() int { } func (o *V1HostsPostForbidden) Error() string { - return fmt.Sprintf("[POST /v1/hosts][%d] v1HostsPostForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /v1/hosts][%d] v1HostsPostForbidden %s", 403, payload) } func (o *V1HostsPostForbidden) String() string { - return fmt.Sprintf("[POST /v1/hosts][%d] v1HostsPostForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /v1/hosts][%d] v1HostsPostForbidden %s", 403, payload) } func (o *V1HostsPostForbidden) GetPayload() *models.Error { @@ -387,11 +394,13 @@ func (o *V1HostsPostUnprocessableEntity) Code() int { } func (o *V1HostsPostUnprocessableEntity) Error() string { - return fmt.Sprintf("[POST /v1/hosts][%d] v1HostsPostUnprocessableEntity %+v", 422, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /v1/hosts][%d] v1HostsPostUnprocessableEntity %s", 422, payload) } func (o *V1HostsPostUnprocessableEntity) String() string { - return fmt.Sprintf("[POST /v1/hosts][%d] v1HostsPostUnprocessableEntity %+v", 422, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /v1/hosts][%d] v1HostsPostUnprocessableEntity %s", 422, payload) } func (o *V1HostsPostUnprocessableEntity) GetPayload() *models.Error { @@ -455,11 +464,13 @@ func (o *V1HostsPostInternalServerError) Code() int { } func (o *V1HostsPostInternalServerError) Error() string { - return fmt.Sprintf("[POST /v1/hosts][%d] v1HostsPostInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /v1/hosts][%d] v1HostsPostInternalServerError %s", 500, payload) } func (o *V1HostsPostInternalServerError) String() string { - return fmt.Sprintf("[POST /v1/hosts][%d] v1HostsPostInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /v1/hosts][%d] v1HostsPostInternalServerError %s", 500, payload) } func (o *V1HostsPostInternalServerError) GetPayload() *models.Error { @@ -523,11 +534,13 @@ func (o *V1HostsPostGatewayTimeout) Code() int { } func (o *V1HostsPostGatewayTimeout) Error() string { - return fmt.Sprintf("[POST /v1/hosts][%d] v1HostsPostGatewayTimeout %+v", 504, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /v1/hosts][%d] v1HostsPostGatewayTimeout %s", 504, payload) } func (o *V1HostsPostGatewayTimeout) String() string { - return fmt.Sprintf("[POST /v1/hosts][%d] v1HostsPostGatewayTimeout %+v", 504, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /v1/hosts][%d] v1HostsPostGatewayTimeout %s", 504, payload) } func (o *V1HostsPostGatewayTimeout) GetPayload() *models.Error { diff --git a/power/client/hostgroups/v1_hostgroups_get_parameters.go b/power/client/hostgroups/v1_hostgroups_get_parameters.go deleted file mode 100644 index e4c9dcc2..00000000 --- a/power/client/hostgroups/v1_hostgroups_get_parameters.go +++ /dev/null @@ -1,128 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package hostgroups - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" -) - -// NewV1HostgroupsGetParams creates a new V1HostgroupsGetParams object, -// with the default timeout for this client. -// -// Default values are not hydrated, since defaults are normally applied by the API server side. -// -// To enforce default values in parameter, use SetDefaults or WithDefaults. -func NewV1HostgroupsGetParams() *V1HostgroupsGetParams { - return &V1HostgroupsGetParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewV1HostgroupsGetParamsWithTimeout creates a new V1HostgroupsGetParams object -// with the ability to set a timeout on a request. -func NewV1HostgroupsGetParamsWithTimeout(timeout time.Duration) *V1HostgroupsGetParams { - return &V1HostgroupsGetParams{ - timeout: timeout, - } -} - -// NewV1HostgroupsGetParamsWithContext creates a new V1HostgroupsGetParams object -// with the ability to set a context for a request. -func NewV1HostgroupsGetParamsWithContext(ctx context.Context) *V1HostgroupsGetParams { - return &V1HostgroupsGetParams{ - Context: ctx, - } -} - -// NewV1HostgroupsGetParamsWithHTTPClient creates a new V1HostgroupsGetParams object -// with the ability to set a custom HTTPClient for a request. -func NewV1HostgroupsGetParamsWithHTTPClient(client *http.Client) *V1HostgroupsGetParams { - return &V1HostgroupsGetParams{ - HTTPClient: client, - } -} - -/* -V1HostgroupsGetParams contains all the parameters to send to the API endpoint - - for the v1 hostgroups get operation. - - Typically these are written to a http.Request. -*/ -type V1HostgroupsGetParams struct { - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the v1 hostgroups get params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *V1HostgroupsGetParams) WithDefaults() *V1HostgroupsGetParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the v1 hostgroups get params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *V1HostgroupsGetParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the v1 hostgroups get params -func (o *V1HostgroupsGetParams) WithTimeout(timeout time.Duration) *V1HostgroupsGetParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the v1 hostgroups get params -func (o *V1HostgroupsGetParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the v1 hostgroups get params -func (o *V1HostgroupsGetParams) WithContext(ctx context.Context) *V1HostgroupsGetParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the v1 hostgroups get params -func (o *V1HostgroupsGetParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the v1 hostgroups get params -func (o *V1HostgroupsGetParams) WithHTTPClient(client *http.Client) *V1HostgroupsGetParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the v1 hostgroups get params -func (o *V1HostgroupsGetParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WriteToRequest writes these params to a swagger request -func (o *V1HostgroupsGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/power/client/hostgroups/v1_hostgroups_get_responses.go b/power/client/hostgroups/v1_hostgroups_get_responses.go deleted file mode 100644 index 6ee0eeca..00000000 --- a/power/client/hostgroups/v1_hostgroups_get_responses.go +++ /dev/null @@ -1,471 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package hostgroups - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "fmt" - "io" - - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" - - "github.com/IBM-Cloud/power-go-client/power/models" -) - -// V1HostgroupsGetReader is a Reader for the V1HostgroupsGet structure. -type V1HostgroupsGetReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *V1HostgroupsGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewV1HostgroupsGetOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - case 400: - result := NewV1HostgroupsGetBadRequest() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 401: - result := NewV1HostgroupsGetUnauthorized() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 403: - result := NewV1HostgroupsGetForbidden() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 500: - result := NewV1HostgroupsGetInternalServerError() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 504: - result := NewV1HostgroupsGetGatewayTimeout() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - default: - return nil, runtime.NewAPIError("[GET /v1/hostgroups] v1.hostgroups.get", response, response.Code()) - } -} - -// NewV1HostgroupsGetOK creates a V1HostgroupsGetOK with default headers values -func NewV1HostgroupsGetOK() *V1HostgroupsGetOK { - return &V1HostgroupsGetOK{} -} - -/* -V1HostgroupsGetOK describes a response with status code 200, with default header values. - -OK -*/ -type V1HostgroupsGetOK struct { - Payload models.HostgroupList -} - -// IsSuccess returns true when this v1 hostgroups get o k response has a 2xx status code -func (o *V1HostgroupsGetOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this v1 hostgroups get o k response has a 3xx status code -func (o *V1HostgroupsGetOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this v1 hostgroups get o k response has a 4xx status code -func (o *V1HostgroupsGetOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this v1 hostgroups get o k response has a 5xx status code -func (o *V1HostgroupsGetOK) IsServerError() bool { - return false -} - -// IsCode returns true when this v1 hostgroups get o k response a status code equal to that given -func (o *V1HostgroupsGetOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the v1 hostgroups get o k response -func (o *V1HostgroupsGetOK) Code() int { - return 200 -} - -func (o *V1HostgroupsGetOK) Error() string { - return fmt.Sprintf("[GET /v1/hostgroups][%d] v1HostgroupsGetOK %+v", 200, o.Payload) -} - -func (o *V1HostgroupsGetOK) String() string { - return fmt.Sprintf("[GET /v1/hostgroups][%d] v1HostgroupsGetOK %+v", 200, o.Payload) -} - -func (o *V1HostgroupsGetOK) GetPayload() models.HostgroupList { - return o.Payload -} - -func (o *V1HostgroupsGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewV1HostgroupsGetBadRequest creates a V1HostgroupsGetBadRequest with default headers values -func NewV1HostgroupsGetBadRequest() *V1HostgroupsGetBadRequest { - return &V1HostgroupsGetBadRequest{} -} - -/* -V1HostgroupsGetBadRequest describes a response with status code 400, with default header values. - -Bad Request -*/ -type V1HostgroupsGetBadRequest struct { - Payload *models.Error -} - -// IsSuccess returns true when this v1 hostgroups get bad request response has a 2xx status code -func (o *V1HostgroupsGetBadRequest) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this v1 hostgroups get bad request response has a 3xx status code -func (o *V1HostgroupsGetBadRequest) IsRedirect() bool { - return false -} - -// IsClientError returns true when this v1 hostgroups get bad request response has a 4xx status code -func (o *V1HostgroupsGetBadRequest) IsClientError() bool { - return true -} - -// IsServerError returns true when this v1 hostgroups get bad request response has a 5xx status code -func (o *V1HostgroupsGetBadRequest) IsServerError() bool { - return false -} - -// IsCode returns true when this v1 hostgroups get bad request response a status code equal to that given -func (o *V1HostgroupsGetBadRequest) IsCode(code int) bool { - return code == 400 -} - -// Code gets the status code for the v1 hostgroups get bad request response -func (o *V1HostgroupsGetBadRequest) Code() int { - return 400 -} - -func (o *V1HostgroupsGetBadRequest) Error() string { - return fmt.Sprintf("[GET /v1/hostgroups][%d] v1HostgroupsGetBadRequest %+v", 400, o.Payload) -} - -func (o *V1HostgroupsGetBadRequest) String() string { - return fmt.Sprintf("[GET /v1/hostgroups][%d] v1HostgroupsGetBadRequest %+v", 400, o.Payload) -} - -func (o *V1HostgroupsGetBadRequest) GetPayload() *models.Error { - return o.Payload -} - -func (o *V1HostgroupsGetBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.Error) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewV1HostgroupsGetUnauthorized creates a V1HostgroupsGetUnauthorized with default headers values -func NewV1HostgroupsGetUnauthorized() *V1HostgroupsGetUnauthorized { - return &V1HostgroupsGetUnauthorized{} -} - -/* -V1HostgroupsGetUnauthorized describes a response with status code 401, with default header values. - -Unauthorized -*/ -type V1HostgroupsGetUnauthorized struct { - Payload *models.Error -} - -// IsSuccess returns true when this v1 hostgroups get unauthorized response has a 2xx status code -func (o *V1HostgroupsGetUnauthorized) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this v1 hostgroups get unauthorized response has a 3xx status code -func (o *V1HostgroupsGetUnauthorized) IsRedirect() bool { - return false -} - -// IsClientError returns true when this v1 hostgroups get unauthorized response has a 4xx status code -func (o *V1HostgroupsGetUnauthorized) IsClientError() bool { - return true -} - -// IsServerError returns true when this v1 hostgroups get unauthorized response has a 5xx status code -func (o *V1HostgroupsGetUnauthorized) IsServerError() bool { - return false -} - -// IsCode returns true when this v1 hostgroups get unauthorized response a status code equal to that given -func (o *V1HostgroupsGetUnauthorized) IsCode(code int) bool { - return code == 401 -} - -// Code gets the status code for the v1 hostgroups get unauthorized response -func (o *V1HostgroupsGetUnauthorized) Code() int { - return 401 -} - -func (o *V1HostgroupsGetUnauthorized) Error() string { - return fmt.Sprintf("[GET /v1/hostgroups][%d] v1HostgroupsGetUnauthorized %+v", 401, o.Payload) -} - -func (o *V1HostgroupsGetUnauthorized) String() string { - return fmt.Sprintf("[GET /v1/hostgroups][%d] v1HostgroupsGetUnauthorized %+v", 401, o.Payload) -} - -func (o *V1HostgroupsGetUnauthorized) GetPayload() *models.Error { - return o.Payload -} - -func (o *V1HostgroupsGetUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.Error) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewV1HostgroupsGetForbidden creates a V1HostgroupsGetForbidden with default headers values -func NewV1HostgroupsGetForbidden() *V1HostgroupsGetForbidden { - return &V1HostgroupsGetForbidden{} -} - -/* -V1HostgroupsGetForbidden describes a response with status code 403, with default header values. - -Forbidden -*/ -type V1HostgroupsGetForbidden struct { - Payload *models.Error -} - -// IsSuccess returns true when this v1 hostgroups get forbidden response has a 2xx status code -func (o *V1HostgroupsGetForbidden) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this v1 hostgroups get forbidden response has a 3xx status code -func (o *V1HostgroupsGetForbidden) IsRedirect() bool { - return false -} - -// IsClientError returns true when this v1 hostgroups get forbidden response has a 4xx status code -func (o *V1HostgroupsGetForbidden) IsClientError() bool { - return true -} - -// IsServerError returns true when this v1 hostgroups get forbidden response has a 5xx status code -func (o *V1HostgroupsGetForbidden) IsServerError() bool { - return false -} - -// IsCode returns true when this v1 hostgroups get forbidden response a status code equal to that given -func (o *V1HostgroupsGetForbidden) IsCode(code int) bool { - return code == 403 -} - -// Code gets the status code for the v1 hostgroups get forbidden response -func (o *V1HostgroupsGetForbidden) Code() int { - return 403 -} - -func (o *V1HostgroupsGetForbidden) Error() string { - return fmt.Sprintf("[GET /v1/hostgroups][%d] v1HostgroupsGetForbidden %+v", 403, o.Payload) -} - -func (o *V1HostgroupsGetForbidden) String() string { - return fmt.Sprintf("[GET /v1/hostgroups][%d] v1HostgroupsGetForbidden %+v", 403, o.Payload) -} - -func (o *V1HostgroupsGetForbidden) GetPayload() *models.Error { - return o.Payload -} - -func (o *V1HostgroupsGetForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.Error) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewV1HostgroupsGetInternalServerError creates a V1HostgroupsGetInternalServerError with default headers values -func NewV1HostgroupsGetInternalServerError() *V1HostgroupsGetInternalServerError { - return &V1HostgroupsGetInternalServerError{} -} - -/* -V1HostgroupsGetInternalServerError describes a response with status code 500, with default header values. - -Internal Server Error -*/ -type V1HostgroupsGetInternalServerError struct { - Payload *models.Error -} - -// IsSuccess returns true when this v1 hostgroups get internal server error response has a 2xx status code -func (o *V1HostgroupsGetInternalServerError) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this v1 hostgroups get internal server error response has a 3xx status code -func (o *V1HostgroupsGetInternalServerError) IsRedirect() bool { - return false -} - -// IsClientError returns true when this v1 hostgroups get internal server error response has a 4xx status code -func (o *V1HostgroupsGetInternalServerError) IsClientError() bool { - return false -} - -// IsServerError returns true when this v1 hostgroups get internal server error response has a 5xx status code -func (o *V1HostgroupsGetInternalServerError) IsServerError() bool { - return true -} - -// IsCode returns true when this v1 hostgroups get internal server error response a status code equal to that given -func (o *V1HostgroupsGetInternalServerError) IsCode(code int) bool { - return code == 500 -} - -// Code gets the status code for the v1 hostgroups get internal server error response -func (o *V1HostgroupsGetInternalServerError) Code() int { - return 500 -} - -func (o *V1HostgroupsGetInternalServerError) Error() string { - return fmt.Sprintf("[GET /v1/hostgroups][%d] v1HostgroupsGetInternalServerError %+v", 500, o.Payload) -} - -func (o *V1HostgroupsGetInternalServerError) String() string { - return fmt.Sprintf("[GET /v1/hostgroups][%d] v1HostgroupsGetInternalServerError %+v", 500, o.Payload) -} - -func (o *V1HostgroupsGetInternalServerError) GetPayload() *models.Error { - return o.Payload -} - -func (o *V1HostgroupsGetInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.Error) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewV1HostgroupsGetGatewayTimeout creates a V1HostgroupsGetGatewayTimeout with default headers values -func NewV1HostgroupsGetGatewayTimeout() *V1HostgroupsGetGatewayTimeout { - return &V1HostgroupsGetGatewayTimeout{} -} - -/* -V1HostgroupsGetGatewayTimeout describes a response with status code 504, with default header values. - -Gateway Timeout. Request is still processing and taking longer than expected. -*/ -type V1HostgroupsGetGatewayTimeout struct { - Payload *models.Error -} - -// IsSuccess returns true when this v1 hostgroups get gateway timeout response has a 2xx status code -func (o *V1HostgroupsGetGatewayTimeout) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this v1 hostgroups get gateway timeout response has a 3xx status code -func (o *V1HostgroupsGetGatewayTimeout) IsRedirect() bool { - return false -} - -// IsClientError returns true when this v1 hostgroups get gateway timeout response has a 4xx status code -func (o *V1HostgroupsGetGatewayTimeout) IsClientError() bool { - return false -} - -// IsServerError returns true when this v1 hostgroups get gateway timeout response has a 5xx status code -func (o *V1HostgroupsGetGatewayTimeout) IsServerError() bool { - return true -} - -// IsCode returns true when this v1 hostgroups get gateway timeout response a status code equal to that given -func (o *V1HostgroupsGetGatewayTimeout) IsCode(code int) bool { - return code == 504 -} - -// Code gets the status code for the v1 hostgroups get gateway timeout response -func (o *V1HostgroupsGetGatewayTimeout) Code() int { - return 504 -} - -func (o *V1HostgroupsGetGatewayTimeout) Error() string { - return fmt.Sprintf("[GET /v1/hostgroups][%d] v1HostgroupsGetGatewayTimeout %+v", 504, o.Payload) -} - -func (o *V1HostgroupsGetGatewayTimeout) String() string { - return fmt.Sprintf("[GET /v1/hostgroups][%d] v1HostgroupsGetGatewayTimeout %+v", 504, o.Payload) -} - -func (o *V1HostgroupsGetGatewayTimeout) GetPayload() *models.Error { - return o.Payload -} - -func (o *V1HostgroupsGetGatewayTimeout) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.Error) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/power/client/hostgroups/v1_hostgroups_id_get_parameters.go b/power/client/hostgroups/v1_hostgroups_id_get_parameters.go deleted file mode 100644 index f266f7eb..00000000 --- a/power/client/hostgroups/v1_hostgroups_id_get_parameters.go +++ /dev/null @@ -1,151 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package hostgroups - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" -) - -// NewV1HostgroupsIDGetParams creates a new V1HostgroupsIDGetParams object, -// with the default timeout for this client. -// -// Default values are not hydrated, since defaults are normally applied by the API server side. -// -// To enforce default values in parameter, use SetDefaults or WithDefaults. -func NewV1HostgroupsIDGetParams() *V1HostgroupsIDGetParams { - return &V1HostgroupsIDGetParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewV1HostgroupsIDGetParamsWithTimeout creates a new V1HostgroupsIDGetParams object -// with the ability to set a timeout on a request. -func NewV1HostgroupsIDGetParamsWithTimeout(timeout time.Duration) *V1HostgroupsIDGetParams { - return &V1HostgroupsIDGetParams{ - timeout: timeout, - } -} - -// NewV1HostgroupsIDGetParamsWithContext creates a new V1HostgroupsIDGetParams object -// with the ability to set a context for a request. -func NewV1HostgroupsIDGetParamsWithContext(ctx context.Context) *V1HostgroupsIDGetParams { - return &V1HostgroupsIDGetParams{ - Context: ctx, - } -} - -// NewV1HostgroupsIDGetParamsWithHTTPClient creates a new V1HostgroupsIDGetParams object -// with the ability to set a custom HTTPClient for a request. -func NewV1HostgroupsIDGetParamsWithHTTPClient(client *http.Client) *V1HostgroupsIDGetParams { - return &V1HostgroupsIDGetParams{ - HTTPClient: client, - } -} - -/* -V1HostgroupsIDGetParams contains all the parameters to send to the API endpoint - - for the v1 hostgroups id get operation. - - Typically these are written to a http.Request. -*/ -type V1HostgroupsIDGetParams struct { - - /* HostgroupID. - - Hostgroup ID - */ - HostgroupID string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the v1 hostgroups id get params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *V1HostgroupsIDGetParams) WithDefaults() *V1HostgroupsIDGetParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the v1 hostgroups id get params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *V1HostgroupsIDGetParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the v1 hostgroups id get params -func (o *V1HostgroupsIDGetParams) WithTimeout(timeout time.Duration) *V1HostgroupsIDGetParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the v1 hostgroups id get params -func (o *V1HostgroupsIDGetParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the v1 hostgroups id get params -func (o *V1HostgroupsIDGetParams) WithContext(ctx context.Context) *V1HostgroupsIDGetParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the v1 hostgroups id get params -func (o *V1HostgroupsIDGetParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the v1 hostgroups id get params -func (o *V1HostgroupsIDGetParams) WithHTTPClient(client *http.Client) *V1HostgroupsIDGetParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the v1 hostgroups id get params -func (o *V1HostgroupsIDGetParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithHostgroupID adds the hostgroupID to the v1 hostgroups id get params -func (o *V1HostgroupsIDGetParams) WithHostgroupID(hostgroupID string) *V1HostgroupsIDGetParams { - o.SetHostgroupID(hostgroupID) - return o -} - -// SetHostgroupID adds the hostgroupId to the v1 hostgroups id get params -func (o *V1HostgroupsIDGetParams) SetHostgroupID(hostgroupID string) { - o.HostgroupID = hostgroupID -} - -// WriteToRequest writes these params to a swagger request -func (o *V1HostgroupsIDGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param hostgroup_id - if err := r.SetPathParam("hostgroup_id", o.HostgroupID); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/power/client/hostgroups/v1_hostgroups_id_get_responses.go b/power/client/hostgroups/v1_hostgroups_id_get_responses.go deleted file mode 100644 index d458c4db..00000000 --- a/power/client/hostgroups/v1_hostgroups_id_get_responses.go +++ /dev/null @@ -1,547 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package hostgroups - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "fmt" - "io" - - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" - - "github.com/IBM-Cloud/power-go-client/power/models" -) - -// V1HostgroupsIDGetReader is a Reader for the V1HostgroupsIDGet structure. -type V1HostgroupsIDGetReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *V1HostgroupsIDGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewV1HostgroupsIDGetOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - case 400: - result := NewV1HostgroupsIDGetBadRequest() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 401: - result := NewV1HostgroupsIDGetUnauthorized() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 403: - result := NewV1HostgroupsIDGetForbidden() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 404: - result := NewV1HostgroupsIDGetNotFound() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 500: - result := NewV1HostgroupsIDGetInternalServerError() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 504: - result := NewV1HostgroupsIDGetGatewayTimeout() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - default: - return nil, runtime.NewAPIError("[GET /v1/hostgroups/{hostgroup_id}] v1.hostgroups.id.get", response, response.Code()) - } -} - -// NewV1HostgroupsIDGetOK creates a V1HostgroupsIDGetOK with default headers values -func NewV1HostgroupsIDGetOK() *V1HostgroupsIDGetOK { - return &V1HostgroupsIDGetOK{} -} - -/* -V1HostgroupsIDGetOK describes a response with status code 200, with default header values. - -OK -*/ -type V1HostgroupsIDGetOK struct { - Payload *models.Hostgroup -} - -// IsSuccess returns true when this v1 hostgroups Id get o k response has a 2xx status code -func (o *V1HostgroupsIDGetOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this v1 hostgroups Id get o k response has a 3xx status code -func (o *V1HostgroupsIDGetOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this v1 hostgroups Id get o k response has a 4xx status code -func (o *V1HostgroupsIDGetOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this v1 hostgroups Id get o k response has a 5xx status code -func (o *V1HostgroupsIDGetOK) IsServerError() bool { - return false -} - -// IsCode returns true when this v1 hostgroups Id get o k response a status code equal to that given -func (o *V1HostgroupsIDGetOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the v1 hostgroups Id get o k response -func (o *V1HostgroupsIDGetOK) Code() int { - return 200 -} - -func (o *V1HostgroupsIDGetOK) Error() string { - return fmt.Sprintf("[GET /v1/hostgroups/{hostgroup_id}][%d] v1HostgroupsIdGetOK %+v", 200, o.Payload) -} - -func (o *V1HostgroupsIDGetOK) String() string { - return fmt.Sprintf("[GET /v1/hostgroups/{hostgroup_id}][%d] v1HostgroupsIdGetOK %+v", 200, o.Payload) -} - -func (o *V1HostgroupsIDGetOK) GetPayload() *models.Hostgroup { - return o.Payload -} - -func (o *V1HostgroupsIDGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.Hostgroup) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewV1HostgroupsIDGetBadRequest creates a V1HostgroupsIDGetBadRequest with default headers values -func NewV1HostgroupsIDGetBadRequest() *V1HostgroupsIDGetBadRequest { - return &V1HostgroupsIDGetBadRequest{} -} - -/* -V1HostgroupsIDGetBadRequest describes a response with status code 400, with default header values. - -Bad Request -*/ -type V1HostgroupsIDGetBadRequest struct { - Payload *models.Error -} - -// IsSuccess returns true when this v1 hostgroups Id get bad request response has a 2xx status code -func (o *V1HostgroupsIDGetBadRequest) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this v1 hostgroups Id get bad request response has a 3xx status code -func (o *V1HostgroupsIDGetBadRequest) IsRedirect() bool { - return false -} - -// IsClientError returns true when this v1 hostgroups Id get bad request response has a 4xx status code -func (o *V1HostgroupsIDGetBadRequest) IsClientError() bool { - return true -} - -// IsServerError returns true when this v1 hostgroups Id get bad request response has a 5xx status code -func (o *V1HostgroupsIDGetBadRequest) IsServerError() bool { - return false -} - -// IsCode returns true when this v1 hostgroups Id get bad request response a status code equal to that given -func (o *V1HostgroupsIDGetBadRequest) IsCode(code int) bool { - return code == 400 -} - -// Code gets the status code for the v1 hostgroups Id get bad request response -func (o *V1HostgroupsIDGetBadRequest) Code() int { - return 400 -} - -func (o *V1HostgroupsIDGetBadRequest) Error() string { - return fmt.Sprintf("[GET /v1/hostgroups/{hostgroup_id}][%d] v1HostgroupsIdGetBadRequest %+v", 400, o.Payload) -} - -func (o *V1HostgroupsIDGetBadRequest) String() string { - return fmt.Sprintf("[GET /v1/hostgroups/{hostgroup_id}][%d] v1HostgroupsIdGetBadRequest %+v", 400, o.Payload) -} - -func (o *V1HostgroupsIDGetBadRequest) GetPayload() *models.Error { - return o.Payload -} - -func (o *V1HostgroupsIDGetBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.Error) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewV1HostgroupsIDGetUnauthorized creates a V1HostgroupsIDGetUnauthorized with default headers values -func NewV1HostgroupsIDGetUnauthorized() *V1HostgroupsIDGetUnauthorized { - return &V1HostgroupsIDGetUnauthorized{} -} - -/* -V1HostgroupsIDGetUnauthorized describes a response with status code 401, with default header values. - -Unauthorized -*/ -type V1HostgroupsIDGetUnauthorized struct { - Payload *models.Error -} - -// IsSuccess returns true when this v1 hostgroups Id get unauthorized response has a 2xx status code -func (o *V1HostgroupsIDGetUnauthorized) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this v1 hostgroups Id get unauthorized response has a 3xx status code -func (o *V1HostgroupsIDGetUnauthorized) IsRedirect() bool { - return false -} - -// IsClientError returns true when this v1 hostgroups Id get unauthorized response has a 4xx status code -func (o *V1HostgroupsIDGetUnauthorized) IsClientError() bool { - return true -} - -// IsServerError returns true when this v1 hostgroups Id get unauthorized response has a 5xx status code -func (o *V1HostgroupsIDGetUnauthorized) IsServerError() bool { - return false -} - -// IsCode returns true when this v1 hostgroups Id get unauthorized response a status code equal to that given -func (o *V1HostgroupsIDGetUnauthorized) IsCode(code int) bool { - return code == 401 -} - -// Code gets the status code for the v1 hostgroups Id get unauthorized response -func (o *V1HostgroupsIDGetUnauthorized) Code() int { - return 401 -} - -func (o *V1HostgroupsIDGetUnauthorized) Error() string { - return fmt.Sprintf("[GET /v1/hostgroups/{hostgroup_id}][%d] v1HostgroupsIdGetUnauthorized %+v", 401, o.Payload) -} - -func (o *V1HostgroupsIDGetUnauthorized) String() string { - return fmt.Sprintf("[GET /v1/hostgroups/{hostgroup_id}][%d] v1HostgroupsIdGetUnauthorized %+v", 401, o.Payload) -} - -func (o *V1HostgroupsIDGetUnauthorized) GetPayload() *models.Error { - return o.Payload -} - -func (o *V1HostgroupsIDGetUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.Error) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewV1HostgroupsIDGetForbidden creates a V1HostgroupsIDGetForbidden with default headers values -func NewV1HostgroupsIDGetForbidden() *V1HostgroupsIDGetForbidden { - return &V1HostgroupsIDGetForbidden{} -} - -/* -V1HostgroupsIDGetForbidden describes a response with status code 403, with default header values. - -Forbidden -*/ -type V1HostgroupsIDGetForbidden struct { - Payload *models.Error -} - -// IsSuccess returns true when this v1 hostgroups Id get forbidden response has a 2xx status code -func (o *V1HostgroupsIDGetForbidden) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this v1 hostgroups Id get forbidden response has a 3xx status code -func (o *V1HostgroupsIDGetForbidden) IsRedirect() bool { - return false -} - -// IsClientError returns true when this v1 hostgroups Id get forbidden response has a 4xx status code -func (o *V1HostgroupsIDGetForbidden) IsClientError() bool { - return true -} - -// IsServerError returns true when this v1 hostgroups Id get forbidden response has a 5xx status code -func (o *V1HostgroupsIDGetForbidden) IsServerError() bool { - return false -} - -// IsCode returns true when this v1 hostgroups Id get forbidden response a status code equal to that given -func (o *V1HostgroupsIDGetForbidden) IsCode(code int) bool { - return code == 403 -} - -// Code gets the status code for the v1 hostgroups Id get forbidden response -func (o *V1HostgroupsIDGetForbidden) Code() int { - return 403 -} - -func (o *V1HostgroupsIDGetForbidden) Error() string { - return fmt.Sprintf("[GET /v1/hostgroups/{hostgroup_id}][%d] v1HostgroupsIdGetForbidden %+v", 403, o.Payload) -} - -func (o *V1HostgroupsIDGetForbidden) String() string { - return fmt.Sprintf("[GET /v1/hostgroups/{hostgroup_id}][%d] v1HostgroupsIdGetForbidden %+v", 403, o.Payload) -} - -func (o *V1HostgroupsIDGetForbidden) GetPayload() *models.Error { - return o.Payload -} - -func (o *V1HostgroupsIDGetForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.Error) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewV1HostgroupsIDGetNotFound creates a V1HostgroupsIDGetNotFound with default headers values -func NewV1HostgroupsIDGetNotFound() *V1HostgroupsIDGetNotFound { - return &V1HostgroupsIDGetNotFound{} -} - -/* -V1HostgroupsIDGetNotFound describes a response with status code 404, with default header values. - -Not Found -*/ -type V1HostgroupsIDGetNotFound struct { - Payload *models.Error -} - -// IsSuccess returns true when this v1 hostgroups Id get not found response has a 2xx status code -func (o *V1HostgroupsIDGetNotFound) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this v1 hostgroups Id get not found response has a 3xx status code -func (o *V1HostgroupsIDGetNotFound) IsRedirect() bool { - return false -} - -// IsClientError returns true when this v1 hostgroups Id get not found response has a 4xx status code -func (o *V1HostgroupsIDGetNotFound) IsClientError() bool { - return true -} - -// IsServerError returns true when this v1 hostgroups Id get not found response has a 5xx status code -func (o *V1HostgroupsIDGetNotFound) IsServerError() bool { - return false -} - -// IsCode returns true when this v1 hostgroups Id get not found response a status code equal to that given -func (o *V1HostgroupsIDGetNotFound) IsCode(code int) bool { - return code == 404 -} - -// Code gets the status code for the v1 hostgroups Id get not found response -func (o *V1HostgroupsIDGetNotFound) Code() int { - return 404 -} - -func (o *V1HostgroupsIDGetNotFound) Error() string { - return fmt.Sprintf("[GET /v1/hostgroups/{hostgroup_id}][%d] v1HostgroupsIdGetNotFound %+v", 404, o.Payload) -} - -func (o *V1HostgroupsIDGetNotFound) String() string { - return fmt.Sprintf("[GET /v1/hostgroups/{hostgroup_id}][%d] v1HostgroupsIdGetNotFound %+v", 404, o.Payload) -} - -func (o *V1HostgroupsIDGetNotFound) GetPayload() *models.Error { - return o.Payload -} - -func (o *V1HostgroupsIDGetNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.Error) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewV1HostgroupsIDGetInternalServerError creates a V1HostgroupsIDGetInternalServerError with default headers values -func NewV1HostgroupsIDGetInternalServerError() *V1HostgroupsIDGetInternalServerError { - return &V1HostgroupsIDGetInternalServerError{} -} - -/* -V1HostgroupsIDGetInternalServerError describes a response with status code 500, with default header values. - -Internal Server Error -*/ -type V1HostgroupsIDGetInternalServerError struct { - Payload *models.Error -} - -// IsSuccess returns true when this v1 hostgroups Id get internal server error response has a 2xx status code -func (o *V1HostgroupsIDGetInternalServerError) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this v1 hostgroups Id get internal server error response has a 3xx status code -func (o *V1HostgroupsIDGetInternalServerError) IsRedirect() bool { - return false -} - -// IsClientError returns true when this v1 hostgroups Id get internal server error response has a 4xx status code -func (o *V1HostgroupsIDGetInternalServerError) IsClientError() bool { - return false -} - -// IsServerError returns true when this v1 hostgroups Id get internal server error response has a 5xx status code -func (o *V1HostgroupsIDGetInternalServerError) IsServerError() bool { - return true -} - -// IsCode returns true when this v1 hostgroups Id get internal server error response a status code equal to that given -func (o *V1HostgroupsIDGetInternalServerError) IsCode(code int) bool { - return code == 500 -} - -// Code gets the status code for the v1 hostgroups Id get internal server error response -func (o *V1HostgroupsIDGetInternalServerError) Code() int { - return 500 -} - -func (o *V1HostgroupsIDGetInternalServerError) Error() string { - return fmt.Sprintf("[GET /v1/hostgroups/{hostgroup_id}][%d] v1HostgroupsIdGetInternalServerError %+v", 500, o.Payload) -} - -func (o *V1HostgroupsIDGetInternalServerError) String() string { - return fmt.Sprintf("[GET /v1/hostgroups/{hostgroup_id}][%d] v1HostgroupsIdGetInternalServerError %+v", 500, o.Payload) -} - -func (o *V1HostgroupsIDGetInternalServerError) GetPayload() *models.Error { - return o.Payload -} - -func (o *V1HostgroupsIDGetInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.Error) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewV1HostgroupsIDGetGatewayTimeout creates a V1HostgroupsIDGetGatewayTimeout with default headers values -func NewV1HostgroupsIDGetGatewayTimeout() *V1HostgroupsIDGetGatewayTimeout { - return &V1HostgroupsIDGetGatewayTimeout{} -} - -/* -V1HostgroupsIDGetGatewayTimeout describes a response with status code 504, with default header values. - -Gateway Timeout. Request is still processing and taking longer than expected. -*/ -type V1HostgroupsIDGetGatewayTimeout struct { - Payload *models.Error -} - -// IsSuccess returns true when this v1 hostgroups Id get gateway timeout response has a 2xx status code -func (o *V1HostgroupsIDGetGatewayTimeout) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this v1 hostgroups Id get gateway timeout response has a 3xx status code -func (o *V1HostgroupsIDGetGatewayTimeout) IsRedirect() bool { - return false -} - -// IsClientError returns true when this v1 hostgroups Id get gateway timeout response has a 4xx status code -func (o *V1HostgroupsIDGetGatewayTimeout) IsClientError() bool { - return false -} - -// IsServerError returns true when this v1 hostgroups Id get gateway timeout response has a 5xx status code -func (o *V1HostgroupsIDGetGatewayTimeout) IsServerError() bool { - return true -} - -// IsCode returns true when this v1 hostgroups Id get gateway timeout response a status code equal to that given -func (o *V1HostgroupsIDGetGatewayTimeout) IsCode(code int) bool { - return code == 504 -} - -// Code gets the status code for the v1 hostgroups Id get gateway timeout response -func (o *V1HostgroupsIDGetGatewayTimeout) Code() int { - return 504 -} - -func (o *V1HostgroupsIDGetGatewayTimeout) Error() string { - return fmt.Sprintf("[GET /v1/hostgroups/{hostgroup_id}][%d] v1HostgroupsIdGetGatewayTimeout %+v", 504, o.Payload) -} - -func (o *V1HostgroupsIDGetGatewayTimeout) String() string { - return fmt.Sprintf("[GET /v1/hostgroups/{hostgroup_id}][%d] v1HostgroupsIdGetGatewayTimeout %+v", 504, o.Payload) -} - -func (o *V1HostgroupsIDGetGatewayTimeout) GetPayload() *models.Error { - return o.Payload -} - -func (o *V1HostgroupsIDGetGatewayTimeout) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.Error) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/power/client/hostgroups/v1_hostgroups_id_put_parameters.go b/power/client/hostgroups/v1_hostgroups_id_put_parameters.go deleted file mode 100644 index 61e2d566..00000000 --- a/power/client/hostgroups/v1_hostgroups_id_put_parameters.go +++ /dev/null @@ -1,175 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package hostgroups - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" - - "github.com/IBM-Cloud/power-go-client/power/models" -) - -// NewV1HostgroupsIDPutParams creates a new V1HostgroupsIDPutParams object, -// with the default timeout for this client. -// -// Default values are not hydrated, since defaults are normally applied by the API server side. -// -// To enforce default values in parameter, use SetDefaults or WithDefaults. -func NewV1HostgroupsIDPutParams() *V1HostgroupsIDPutParams { - return &V1HostgroupsIDPutParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewV1HostgroupsIDPutParamsWithTimeout creates a new V1HostgroupsIDPutParams object -// with the ability to set a timeout on a request. -func NewV1HostgroupsIDPutParamsWithTimeout(timeout time.Duration) *V1HostgroupsIDPutParams { - return &V1HostgroupsIDPutParams{ - timeout: timeout, - } -} - -// NewV1HostgroupsIDPutParamsWithContext creates a new V1HostgroupsIDPutParams object -// with the ability to set a context for a request. -func NewV1HostgroupsIDPutParamsWithContext(ctx context.Context) *V1HostgroupsIDPutParams { - return &V1HostgroupsIDPutParams{ - Context: ctx, - } -} - -// NewV1HostgroupsIDPutParamsWithHTTPClient creates a new V1HostgroupsIDPutParams object -// with the ability to set a custom HTTPClient for a request. -func NewV1HostgroupsIDPutParamsWithHTTPClient(client *http.Client) *V1HostgroupsIDPutParams { - return &V1HostgroupsIDPutParams{ - HTTPClient: client, - } -} - -/* -V1HostgroupsIDPutParams contains all the parameters to send to the API endpoint - - for the v1 hostgroups id put operation. - - Typically these are written to a http.Request. -*/ -type V1HostgroupsIDPutParams struct { - - /* Body. - - Parameters to set the sharing status of the hostgroup - */ - Body *models.HostgroupShareOp - - /* HostgroupID. - - Hostgroup ID - */ - HostgroupID string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the v1 hostgroups id put params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *V1HostgroupsIDPutParams) WithDefaults() *V1HostgroupsIDPutParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the v1 hostgroups id put params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *V1HostgroupsIDPutParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the v1 hostgroups id put params -func (o *V1HostgroupsIDPutParams) WithTimeout(timeout time.Duration) *V1HostgroupsIDPutParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the v1 hostgroups id put params -func (o *V1HostgroupsIDPutParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the v1 hostgroups id put params -func (o *V1HostgroupsIDPutParams) WithContext(ctx context.Context) *V1HostgroupsIDPutParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the v1 hostgroups id put params -func (o *V1HostgroupsIDPutParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the v1 hostgroups id put params -func (o *V1HostgroupsIDPutParams) WithHTTPClient(client *http.Client) *V1HostgroupsIDPutParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the v1 hostgroups id put params -func (o *V1HostgroupsIDPutParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the v1 hostgroups id put params -func (o *V1HostgroupsIDPutParams) WithBody(body *models.HostgroupShareOp) *V1HostgroupsIDPutParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the v1 hostgroups id put params -func (o *V1HostgroupsIDPutParams) SetBody(body *models.HostgroupShareOp) { - o.Body = body -} - -// WithHostgroupID adds the hostgroupID to the v1 hostgroups id put params -func (o *V1HostgroupsIDPutParams) WithHostgroupID(hostgroupID string) *V1HostgroupsIDPutParams { - o.SetHostgroupID(hostgroupID) - return o -} - -// SetHostgroupID adds the hostgroupId to the v1 hostgroups id put params -func (o *V1HostgroupsIDPutParams) SetHostgroupID(hostgroupID string) { - o.HostgroupID = hostgroupID -} - -// WriteToRequest writes these params to a swagger request -func (o *V1HostgroupsIDPutParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - if o.Body != nil { - if err := r.SetBodyParam(o.Body); err != nil { - return err - } - } - - // path param hostgroup_id - if err := r.SetPathParam("hostgroup_id", o.HostgroupID); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/power/client/hostgroups/v1_hostgroups_id_put_responses.go b/power/client/hostgroups/v1_hostgroups_id_put_responses.go deleted file mode 100644 index 33b7c6b4..00000000 --- a/power/client/hostgroups/v1_hostgroups_id_put_responses.go +++ /dev/null @@ -1,621 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package hostgroups - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "fmt" - "io" - - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" - - "github.com/IBM-Cloud/power-go-client/power/models" -) - -// V1HostgroupsIDPutReader is a Reader for the V1HostgroupsIDPut structure. -type V1HostgroupsIDPutReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *V1HostgroupsIDPutReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewV1HostgroupsIDPutOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - case 400: - result := NewV1HostgroupsIDPutBadRequest() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 401: - result := NewV1HostgroupsIDPutUnauthorized() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 403: - result := NewV1HostgroupsIDPutForbidden() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 404: - result := NewV1HostgroupsIDPutNotFound() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 409: - result := NewV1HostgroupsIDPutConflict() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 500: - result := NewV1HostgroupsIDPutInternalServerError() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 504: - result := NewV1HostgroupsIDPutGatewayTimeout() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - default: - return nil, runtime.NewAPIError("[PUT /v1/hostgroups/{hostgroup_id}] v1.hostgroups.id.put", response, response.Code()) - } -} - -// NewV1HostgroupsIDPutOK creates a V1HostgroupsIDPutOK with default headers values -func NewV1HostgroupsIDPutOK() *V1HostgroupsIDPutOK { - return &V1HostgroupsIDPutOK{} -} - -/* -V1HostgroupsIDPutOK describes a response with status code 200, with default header values. - -OK -*/ -type V1HostgroupsIDPutOK struct { - Payload *models.Hostgroup -} - -// IsSuccess returns true when this v1 hostgroups Id put o k response has a 2xx status code -func (o *V1HostgroupsIDPutOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this v1 hostgroups Id put o k response has a 3xx status code -func (o *V1HostgroupsIDPutOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this v1 hostgroups Id put o k response has a 4xx status code -func (o *V1HostgroupsIDPutOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this v1 hostgroups Id put o k response has a 5xx status code -func (o *V1HostgroupsIDPutOK) IsServerError() bool { - return false -} - -// IsCode returns true when this v1 hostgroups Id put o k response a status code equal to that given -func (o *V1HostgroupsIDPutOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the v1 hostgroups Id put o k response -func (o *V1HostgroupsIDPutOK) Code() int { - return 200 -} - -func (o *V1HostgroupsIDPutOK) Error() string { - return fmt.Sprintf("[PUT /v1/hostgroups/{hostgroup_id}][%d] v1HostgroupsIdPutOK %+v", 200, o.Payload) -} - -func (o *V1HostgroupsIDPutOK) String() string { - return fmt.Sprintf("[PUT /v1/hostgroups/{hostgroup_id}][%d] v1HostgroupsIdPutOK %+v", 200, o.Payload) -} - -func (o *V1HostgroupsIDPutOK) GetPayload() *models.Hostgroup { - return o.Payload -} - -func (o *V1HostgroupsIDPutOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.Hostgroup) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewV1HostgroupsIDPutBadRequest creates a V1HostgroupsIDPutBadRequest with default headers values -func NewV1HostgroupsIDPutBadRequest() *V1HostgroupsIDPutBadRequest { - return &V1HostgroupsIDPutBadRequest{} -} - -/* -V1HostgroupsIDPutBadRequest describes a response with status code 400, with default header values. - -Bad Request -*/ -type V1HostgroupsIDPutBadRequest struct { - Payload *models.Error -} - -// IsSuccess returns true when this v1 hostgroups Id put bad request response has a 2xx status code -func (o *V1HostgroupsIDPutBadRequest) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this v1 hostgroups Id put bad request response has a 3xx status code -func (o *V1HostgroupsIDPutBadRequest) IsRedirect() bool { - return false -} - -// IsClientError returns true when this v1 hostgroups Id put bad request response has a 4xx status code -func (o *V1HostgroupsIDPutBadRequest) IsClientError() bool { - return true -} - -// IsServerError returns true when this v1 hostgroups Id put bad request response has a 5xx status code -func (o *V1HostgroupsIDPutBadRequest) IsServerError() bool { - return false -} - -// IsCode returns true when this v1 hostgroups Id put bad request response a status code equal to that given -func (o *V1HostgroupsIDPutBadRequest) IsCode(code int) bool { - return code == 400 -} - -// Code gets the status code for the v1 hostgroups Id put bad request response -func (o *V1HostgroupsIDPutBadRequest) Code() int { - return 400 -} - -func (o *V1HostgroupsIDPutBadRequest) Error() string { - return fmt.Sprintf("[PUT /v1/hostgroups/{hostgroup_id}][%d] v1HostgroupsIdPutBadRequest %+v", 400, o.Payload) -} - -func (o *V1HostgroupsIDPutBadRequest) String() string { - return fmt.Sprintf("[PUT /v1/hostgroups/{hostgroup_id}][%d] v1HostgroupsIdPutBadRequest %+v", 400, o.Payload) -} - -func (o *V1HostgroupsIDPutBadRequest) GetPayload() *models.Error { - return o.Payload -} - -func (o *V1HostgroupsIDPutBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.Error) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewV1HostgroupsIDPutUnauthorized creates a V1HostgroupsIDPutUnauthorized with default headers values -func NewV1HostgroupsIDPutUnauthorized() *V1HostgroupsIDPutUnauthorized { - return &V1HostgroupsIDPutUnauthorized{} -} - -/* -V1HostgroupsIDPutUnauthorized describes a response with status code 401, with default header values. - -Unauthorized -*/ -type V1HostgroupsIDPutUnauthorized struct { - Payload *models.Error -} - -// IsSuccess returns true when this v1 hostgroups Id put unauthorized response has a 2xx status code -func (o *V1HostgroupsIDPutUnauthorized) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this v1 hostgroups Id put unauthorized response has a 3xx status code -func (o *V1HostgroupsIDPutUnauthorized) IsRedirect() bool { - return false -} - -// IsClientError returns true when this v1 hostgroups Id put unauthorized response has a 4xx status code -func (o *V1HostgroupsIDPutUnauthorized) IsClientError() bool { - return true -} - -// IsServerError returns true when this v1 hostgroups Id put unauthorized response has a 5xx status code -func (o *V1HostgroupsIDPutUnauthorized) IsServerError() bool { - return false -} - -// IsCode returns true when this v1 hostgroups Id put unauthorized response a status code equal to that given -func (o *V1HostgroupsIDPutUnauthorized) IsCode(code int) bool { - return code == 401 -} - -// Code gets the status code for the v1 hostgroups Id put unauthorized response -func (o *V1HostgroupsIDPutUnauthorized) Code() int { - return 401 -} - -func (o *V1HostgroupsIDPutUnauthorized) Error() string { - return fmt.Sprintf("[PUT /v1/hostgroups/{hostgroup_id}][%d] v1HostgroupsIdPutUnauthorized %+v", 401, o.Payload) -} - -func (o *V1HostgroupsIDPutUnauthorized) String() string { - return fmt.Sprintf("[PUT /v1/hostgroups/{hostgroup_id}][%d] v1HostgroupsIdPutUnauthorized %+v", 401, o.Payload) -} - -func (o *V1HostgroupsIDPutUnauthorized) GetPayload() *models.Error { - return o.Payload -} - -func (o *V1HostgroupsIDPutUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.Error) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewV1HostgroupsIDPutForbidden creates a V1HostgroupsIDPutForbidden with default headers values -func NewV1HostgroupsIDPutForbidden() *V1HostgroupsIDPutForbidden { - return &V1HostgroupsIDPutForbidden{} -} - -/* -V1HostgroupsIDPutForbidden describes a response with status code 403, with default header values. - -Forbidden -*/ -type V1HostgroupsIDPutForbidden struct { - Payload *models.Error -} - -// IsSuccess returns true when this v1 hostgroups Id put forbidden response has a 2xx status code -func (o *V1HostgroupsIDPutForbidden) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this v1 hostgroups Id put forbidden response has a 3xx status code -func (o *V1HostgroupsIDPutForbidden) IsRedirect() bool { - return false -} - -// IsClientError returns true when this v1 hostgroups Id put forbidden response has a 4xx status code -func (o *V1HostgroupsIDPutForbidden) IsClientError() bool { - return true -} - -// IsServerError returns true when this v1 hostgroups Id put forbidden response has a 5xx status code -func (o *V1HostgroupsIDPutForbidden) IsServerError() bool { - return false -} - -// IsCode returns true when this v1 hostgroups Id put forbidden response a status code equal to that given -func (o *V1HostgroupsIDPutForbidden) IsCode(code int) bool { - return code == 403 -} - -// Code gets the status code for the v1 hostgroups Id put forbidden response -func (o *V1HostgroupsIDPutForbidden) Code() int { - return 403 -} - -func (o *V1HostgroupsIDPutForbidden) Error() string { - return fmt.Sprintf("[PUT /v1/hostgroups/{hostgroup_id}][%d] v1HostgroupsIdPutForbidden %+v", 403, o.Payload) -} - -func (o *V1HostgroupsIDPutForbidden) String() string { - return fmt.Sprintf("[PUT /v1/hostgroups/{hostgroup_id}][%d] v1HostgroupsIdPutForbidden %+v", 403, o.Payload) -} - -func (o *V1HostgroupsIDPutForbidden) GetPayload() *models.Error { - return o.Payload -} - -func (o *V1HostgroupsIDPutForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.Error) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewV1HostgroupsIDPutNotFound creates a V1HostgroupsIDPutNotFound with default headers values -func NewV1HostgroupsIDPutNotFound() *V1HostgroupsIDPutNotFound { - return &V1HostgroupsIDPutNotFound{} -} - -/* -V1HostgroupsIDPutNotFound describes a response with status code 404, with default header values. - -Not Found -*/ -type V1HostgroupsIDPutNotFound struct { - Payload *models.Error -} - -// IsSuccess returns true when this v1 hostgroups Id put not found response has a 2xx status code -func (o *V1HostgroupsIDPutNotFound) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this v1 hostgroups Id put not found response has a 3xx status code -func (o *V1HostgroupsIDPutNotFound) IsRedirect() bool { - return false -} - -// IsClientError returns true when this v1 hostgroups Id put not found response has a 4xx status code -func (o *V1HostgroupsIDPutNotFound) IsClientError() bool { - return true -} - -// IsServerError returns true when this v1 hostgroups Id put not found response has a 5xx status code -func (o *V1HostgroupsIDPutNotFound) IsServerError() bool { - return false -} - -// IsCode returns true when this v1 hostgroups Id put not found response a status code equal to that given -func (o *V1HostgroupsIDPutNotFound) IsCode(code int) bool { - return code == 404 -} - -// Code gets the status code for the v1 hostgroups Id put not found response -func (o *V1HostgroupsIDPutNotFound) Code() int { - return 404 -} - -func (o *V1HostgroupsIDPutNotFound) Error() string { - return fmt.Sprintf("[PUT /v1/hostgroups/{hostgroup_id}][%d] v1HostgroupsIdPutNotFound %+v", 404, o.Payload) -} - -func (o *V1HostgroupsIDPutNotFound) String() string { - return fmt.Sprintf("[PUT /v1/hostgroups/{hostgroup_id}][%d] v1HostgroupsIdPutNotFound %+v", 404, o.Payload) -} - -func (o *V1HostgroupsIDPutNotFound) GetPayload() *models.Error { - return o.Payload -} - -func (o *V1HostgroupsIDPutNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.Error) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewV1HostgroupsIDPutConflict creates a V1HostgroupsIDPutConflict with default headers values -func NewV1HostgroupsIDPutConflict() *V1HostgroupsIDPutConflict { - return &V1HostgroupsIDPutConflict{} -} - -/* -V1HostgroupsIDPutConflict describes a response with status code 409, with default header values. - -Conflict -*/ -type V1HostgroupsIDPutConflict struct { - Payload *models.Error -} - -// IsSuccess returns true when this v1 hostgroups Id put conflict response has a 2xx status code -func (o *V1HostgroupsIDPutConflict) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this v1 hostgroups Id put conflict response has a 3xx status code -func (o *V1HostgroupsIDPutConflict) IsRedirect() bool { - return false -} - -// IsClientError returns true when this v1 hostgroups Id put conflict response has a 4xx status code -func (o *V1HostgroupsIDPutConflict) IsClientError() bool { - return true -} - -// IsServerError returns true when this v1 hostgroups Id put conflict response has a 5xx status code -func (o *V1HostgroupsIDPutConflict) IsServerError() bool { - return false -} - -// IsCode returns true when this v1 hostgroups Id put conflict response a status code equal to that given -func (o *V1HostgroupsIDPutConflict) IsCode(code int) bool { - return code == 409 -} - -// Code gets the status code for the v1 hostgroups Id put conflict response -func (o *V1HostgroupsIDPutConflict) Code() int { - return 409 -} - -func (o *V1HostgroupsIDPutConflict) Error() string { - return fmt.Sprintf("[PUT /v1/hostgroups/{hostgroup_id}][%d] v1HostgroupsIdPutConflict %+v", 409, o.Payload) -} - -func (o *V1HostgroupsIDPutConflict) String() string { - return fmt.Sprintf("[PUT /v1/hostgroups/{hostgroup_id}][%d] v1HostgroupsIdPutConflict %+v", 409, o.Payload) -} - -func (o *V1HostgroupsIDPutConflict) GetPayload() *models.Error { - return o.Payload -} - -func (o *V1HostgroupsIDPutConflict) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.Error) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewV1HostgroupsIDPutInternalServerError creates a V1HostgroupsIDPutInternalServerError with default headers values -func NewV1HostgroupsIDPutInternalServerError() *V1HostgroupsIDPutInternalServerError { - return &V1HostgroupsIDPutInternalServerError{} -} - -/* -V1HostgroupsIDPutInternalServerError describes a response with status code 500, with default header values. - -Internal Server Error -*/ -type V1HostgroupsIDPutInternalServerError struct { - Payload *models.Error -} - -// IsSuccess returns true when this v1 hostgroups Id put internal server error response has a 2xx status code -func (o *V1HostgroupsIDPutInternalServerError) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this v1 hostgroups Id put internal server error response has a 3xx status code -func (o *V1HostgroupsIDPutInternalServerError) IsRedirect() bool { - return false -} - -// IsClientError returns true when this v1 hostgroups Id put internal server error response has a 4xx status code -func (o *V1HostgroupsIDPutInternalServerError) IsClientError() bool { - return false -} - -// IsServerError returns true when this v1 hostgroups Id put internal server error response has a 5xx status code -func (o *V1HostgroupsIDPutInternalServerError) IsServerError() bool { - return true -} - -// IsCode returns true when this v1 hostgroups Id put internal server error response a status code equal to that given -func (o *V1HostgroupsIDPutInternalServerError) IsCode(code int) bool { - return code == 500 -} - -// Code gets the status code for the v1 hostgroups Id put internal server error response -func (o *V1HostgroupsIDPutInternalServerError) Code() int { - return 500 -} - -func (o *V1HostgroupsIDPutInternalServerError) Error() string { - return fmt.Sprintf("[PUT /v1/hostgroups/{hostgroup_id}][%d] v1HostgroupsIdPutInternalServerError %+v", 500, o.Payload) -} - -func (o *V1HostgroupsIDPutInternalServerError) String() string { - return fmt.Sprintf("[PUT /v1/hostgroups/{hostgroup_id}][%d] v1HostgroupsIdPutInternalServerError %+v", 500, o.Payload) -} - -func (o *V1HostgroupsIDPutInternalServerError) GetPayload() *models.Error { - return o.Payload -} - -func (o *V1HostgroupsIDPutInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.Error) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewV1HostgroupsIDPutGatewayTimeout creates a V1HostgroupsIDPutGatewayTimeout with default headers values -func NewV1HostgroupsIDPutGatewayTimeout() *V1HostgroupsIDPutGatewayTimeout { - return &V1HostgroupsIDPutGatewayTimeout{} -} - -/* -V1HostgroupsIDPutGatewayTimeout describes a response with status code 504, with default header values. - -Gateway Timeout. Request is still processing and taking longer than expected. -*/ -type V1HostgroupsIDPutGatewayTimeout struct { - Payload *models.Error -} - -// IsSuccess returns true when this v1 hostgroups Id put gateway timeout response has a 2xx status code -func (o *V1HostgroupsIDPutGatewayTimeout) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this v1 hostgroups Id put gateway timeout response has a 3xx status code -func (o *V1HostgroupsIDPutGatewayTimeout) IsRedirect() bool { - return false -} - -// IsClientError returns true when this v1 hostgroups Id put gateway timeout response has a 4xx status code -func (o *V1HostgroupsIDPutGatewayTimeout) IsClientError() bool { - return false -} - -// IsServerError returns true when this v1 hostgroups Id put gateway timeout response has a 5xx status code -func (o *V1HostgroupsIDPutGatewayTimeout) IsServerError() bool { - return true -} - -// IsCode returns true when this v1 hostgroups Id put gateway timeout response a status code equal to that given -func (o *V1HostgroupsIDPutGatewayTimeout) IsCode(code int) bool { - return code == 504 -} - -// Code gets the status code for the v1 hostgroups Id put gateway timeout response -func (o *V1HostgroupsIDPutGatewayTimeout) Code() int { - return 504 -} - -func (o *V1HostgroupsIDPutGatewayTimeout) Error() string { - return fmt.Sprintf("[PUT /v1/hostgroups/{hostgroup_id}][%d] v1HostgroupsIdPutGatewayTimeout %+v", 504, o.Payload) -} - -func (o *V1HostgroupsIDPutGatewayTimeout) String() string { - return fmt.Sprintf("[PUT /v1/hostgroups/{hostgroup_id}][%d] v1HostgroupsIdPutGatewayTimeout %+v", 504, o.Payload) -} - -func (o *V1HostgroupsIDPutGatewayTimeout) GetPayload() *models.Error { - return o.Payload -} - -func (o *V1HostgroupsIDPutGatewayTimeout) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.Error) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/power/client/hostgroups/v1_hostgroups_post_parameters.go b/power/client/hostgroups/v1_hostgroups_post_parameters.go deleted file mode 100644 index 56fe0baa..00000000 --- a/power/client/hostgroups/v1_hostgroups_post_parameters.go +++ /dev/null @@ -1,153 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package hostgroups - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" - - "github.com/IBM-Cloud/power-go-client/power/models" -) - -// NewV1HostgroupsPostParams creates a new V1HostgroupsPostParams object, -// with the default timeout for this client. -// -// Default values are not hydrated, since defaults are normally applied by the API server side. -// -// To enforce default values in parameter, use SetDefaults or WithDefaults. -func NewV1HostgroupsPostParams() *V1HostgroupsPostParams { - return &V1HostgroupsPostParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewV1HostgroupsPostParamsWithTimeout creates a new V1HostgroupsPostParams object -// with the ability to set a timeout on a request. -func NewV1HostgroupsPostParamsWithTimeout(timeout time.Duration) *V1HostgroupsPostParams { - return &V1HostgroupsPostParams{ - timeout: timeout, - } -} - -// NewV1HostgroupsPostParamsWithContext creates a new V1HostgroupsPostParams object -// with the ability to set a context for a request. -func NewV1HostgroupsPostParamsWithContext(ctx context.Context) *V1HostgroupsPostParams { - return &V1HostgroupsPostParams{ - Context: ctx, - } -} - -// NewV1HostgroupsPostParamsWithHTTPClient creates a new V1HostgroupsPostParams object -// with the ability to set a custom HTTPClient for a request. -func NewV1HostgroupsPostParamsWithHTTPClient(client *http.Client) *V1HostgroupsPostParams { - return &V1HostgroupsPostParams{ - HTTPClient: client, - } -} - -/* -V1HostgroupsPostParams contains all the parameters to send to the API endpoint - - for the v1 hostgroups post operation. - - Typically these are written to a http.Request. -*/ -type V1HostgroupsPostParams struct { - - /* Body. - - Parameters for the creation of a new hostgroup - */ - Body *models.HostgroupCreate - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the v1 hostgroups post params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *V1HostgroupsPostParams) WithDefaults() *V1HostgroupsPostParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the v1 hostgroups post params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *V1HostgroupsPostParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the v1 hostgroups post params -func (o *V1HostgroupsPostParams) WithTimeout(timeout time.Duration) *V1HostgroupsPostParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the v1 hostgroups post params -func (o *V1HostgroupsPostParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the v1 hostgroups post params -func (o *V1HostgroupsPostParams) WithContext(ctx context.Context) *V1HostgroupsPostParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the v1 hostgroups post params -func (o *V1HostgroupsPostParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the v1 hostgroups post params -func (o *V1HostgroupsPostParams) WithHTTPClient(client *http.Client) *V1HostgroupsPostParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the v1 hostgroups post params -func (o *V1HostgroupsPostParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the v1 hostgroups post params -func (o *V1HostgroupsPostParams) WithBody(body *models.HostgroupCreate) *V1HostgroupsPostParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the v1 hostgroups post params -func (o *V1HostgroupsPostParams) SetBody(body *models.HostgroupCreate) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *V1HostgroupsPostParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - if o.Body != nil { - if err := r.SetBodyParam(o.Body); err != nil { - return err - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/power/client/hostgroups/v1_hostgroups_post_responses.go b/power/client/hostgroups/v1_hostgroups_post_responses.go deleted file mode 100644 index 81b051bb..00000000 --- a/power/client/hostgroups/v1_hostgroups_post_responses.go +++ /dev/null @@ -1,621 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package hostgroups - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "fmt" - "io" - - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" - - "github.com/IBM-Cloud/power-go-client/power/models" -) - -// V1HostgroupsPostReader is a Reader for the V1HostgroupsPost structure. -type V1HostgroupsPostReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *V1HostgroupsPostReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 201: - result := NewV1HostgroupsPostCreated() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - case 400: - result := NewV1HostgroupsPostBadRequest() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 401: - result := NewV1HostgroupsPostUnauthorized() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 403: - result := NewV1HostgroupsPostForbidden() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 409: - result := NewV1HostgroupsPostConflict() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 422: - result := NewV1HostgroupsPostUnprocessableEntity() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 500: - result := NewV1HostgroupsPostInternalServerError() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 504: - result := NewV1HostgroupsPostGatewayTimeout() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - default: - return nil, runtime.NewAPIError("[POST /v1/hostgroups] v1.hostgroups.post", response, response.Code()) - } -} - -// NewV1HostgroupsPostCreated creates a V1HostgroupsPostCreated with default headers values -func NewV1HostgroupsPostCreated() *V1HostgroupsPostCreated { - return &V1HostgroupsPostCreated{} -} - -/* -V1HostgroupsPostCreated describes a response with status code 201, with default header values. - -Created -*/ -type V1HostgroupsPostCreated struct { - Payload *models.Hostgroup -} - -// IsSuccess returns true when this v1 hostgroups post created response has a 2xx status code -func (o *V1HostgroupsPostCreated) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this v1 hostgroups post created response has a 3xx status code -func (o *V1HostgroupsPostCreated) IsRedirect() bool { - return false -} - -// IsClientError returns true when this v1 hostgroups post created response has a 4xx status code -func (o *V1HostgroupsPostCreated) IsClientError() bool { - return false -} - -// IsServerError returns true when this v1 hostgroups post created response has a 5xx status code -func (o *V1HostgroupsPostCreated) IsServerError() bool { - return false -} - -// IsCode returns true when this v1 hostgroups post created response a status code equal to that given -func (o *V1HostgroupsPostCreated) IsCode(code int) bool { - return code == 201 -} - -// Code gets the status code for the v1 hostgroups post created response -func (o *V1HostgroupsPostCreated) Code() int { - return 201 -} - -func (o *V1HostgroupsPostCreated) Error() string { - return fmt.Sprintf("[POST /v1/hostgroups][%d] v1HostgroupsPostCreated %+v", 201, o.Payload) -} - -func (o *V1HostgroupsPostCreated) String() string { - return fmt.Sprintf("[POST /v1/hostgroups][%d] v1HostgroupsPostCreated %+v", 201, o.Payload) -} - -func (o *V1HostgroupsPostCreated) GetPayload() *models.Hostgroup { - return o.Payload -} - -func (o *V1HostgroupsPostCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.Hostgroup) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewV1HostgroupsPostBadRequest creates a V1HostgroupsPostBadRequest with default headers values -func NewV1HostgroupsPostBadRequest() *V1HostgroupsPostBadRequest { - return &V1HostgroupsPostBadRequest{} -} - -/* -V1HostgroupsPostBadRequest describes a response with status code 400, with default header values. - -Bad Request -*/ -type V1HostgroupsPostBadRequest struct { - Payload *models.Error -} - -// IsSuccess returns true when this v1 hostgroups post bad request response has a 2xx status code -func (o *V1HostgroupsPostBadRequest) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this v1 hostgroups post bad request response has a 3xx status code -func (o *V1HostgroupsPostBadRequest) IsRedirect() bool { - return false -} - -// IsClientError returns true when this v1 hostgroups post bad request response has a 4xx status code -func (o *V1HostgroupsPostBadRequest) IsClientError() bool { - return true -} - -// IsServerError returns true when this v1 hostgroups post bad request response has a 5xx status code -func (o *V1HostgroupsPostBadRequest) IsServerError() bool { - return false -} - -// IsCode returns true when this v1 hostgroups post bad request response a status code equal to that given -func (o *V1HostgroupsPostBadRequest) IsCode(code int) bool { - return code == 400 -} - -// Code gets the status code for the v1 hostgroups post bad request response -func (o *V1HostgroupsPostBadRequest) Code() int { - return 400 -} - -func (o *V1HostgroupsPostBadRequest) Error() string { - return fmt.Sprintf("[POST /v1/hostgroups][%d] v1HostgroupsPostBadRequest %+v", 400, o.Payload) -} - -func (o *V1HostgroupsPostBadRequest) String() string { - return fmt.Sprintf("[POST /v1/hostgroups][%d] v1HostgroupsPostBadRequest %+v", 400, o.Payload) -} - -func (o *V1HostgroupsPostBadRequest) GetPayload() *models.Error { - return o.Payload -} - -func (o *V1HostgroupsPostBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.Error) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewV1HostgroupsPostUnauthorized creates a V1HostgroupsPostUnauthorized with default headers values -func NewV1HostgroupsPostUnauthorized() *V1HostgroupsPostUnauthorized { - return &V1HostgroupsPostUnauthorized{} -} - -/* -V1HostgroupsPostUnauthorized describes a response with status code 401, with default header values. - -Unauthorized -*/ -type V1HostgroupsPostUnauthorized struct { - Payload *models.Error -} - -// IsSuccess returns true when this v1 hostgroups post unauthorized response has a 2xx status code -func (o *V1HostgroupsPostUnauthorized) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this v1 hostgroups post unauthorized response has a 3xx status code -func (o *V1HostgroupsPostUnauthorized) IsRedirect() bool { - return false -} - -// IsClientError returns true when this v1 hostgroups post unauthorized response has a 4xx status code -func (o *V1HostgroupsPostUnauthorized) IsClientError() bool { - return true -} - -// IsServerError returns true when this v1 hostgroups post unauthorized response has a 5xx status code -func (o *V1HostgroupsPostUnauthorized) IsServerError() bool { - return false -} - -// IsCode returns true when this v1 hostgroups post unauthorized response a status code equal to that given -func (o *V1HostgroupsPostUnauthorized) IsCode(code int) bool { - return code == 401 -} - -// Code gets the status code for the v1 hostgroups post unauthorized response -func (o *V1HostgroupsPostUnauthorized) Code() int { - return 401 -} - -func (o *V1HostgroupsPostUnauthorized) Error() string { - return fmt.Sprintf("[POST /v1/hostgroups][%d] v1HostgroupsPostUnauthorized %+v", 401, o.Payload) -} - -func (o *V1HostgroupsPostUnauthorized) String() string { - return fmt.Sprintf("[POST /v1/hostgroups][%d] v1HostgroupsPostUnauthorized %+v", 401, o.Payload) -} - -func (o *V1HostgroupsPostUnauthorized) GetPayload() *models.Error { - return o.Payload -} - -func (o *V1HostgroupsPostUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.Error) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewV1HostgroupsPostForbidden creates a V1HostgroupsPostForbidden with default headers values -func NewV1HostgroupsPostForbidden() *V1HostgroupsPostForbidden { - return &V1HostgroupsPostForbidden{} -} - -/* -V1HostgroupsPostForbidden describes a response with status code 403, with default header values. - -Forbidden -*/ -type V1HostgroupsPostForbidden struct { - Payload *models.Error -} - -// IsSuccess returns true when this v1 hostgroups post forbidden response has a 2xx status code -func (o *V1HostgroupsPostForbidden) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this v1 hostgroups post forbidden response has a 3xx status code -func (o *V1HostgroupsPostForbidden) IsRedirect() bool { - return false -} - -// IsClientError returns true when this v1 hostgroups post forbidden response has a 4xx status code -func (o *V1HostgroupsPostForbidden) IsClientError() bool { - return true -} - -// IsServerError returns true when this v1 hostgroups post forbidden response has a 5xx status code -func (o *V1HostgroupsPostForbidden) IsServerError() bool { - return false -} - -// IsCode returns true when this v1 hostgroups post forbidden response a status code equal to that given -func (o *V1HostgroupsPostForbidden) IsCode(code int) bool { - return code == 403 -} - -// Code gets the status code for the v1 hostgroups post forbidden response -func (o *V1HostgroupsPostForbidden) Code() int { - return 403 -} - -func (o *V1HostgroupsPostForbidden) Error() string { - return fmt.Sprintf("[POST /v1/hostgroups][%d] v1HostgroupsPostForbidden %+v", 403, o.Payload) -} - -func (o *V1HostgroupsPostForbidden) String() string { - return fmt.Sprintf("[POST /v1/hostgroups][%d] v1HostgroupsPostForbidden %+v", 403, o.Payload) -} - -func (o *V1HostgroupsPostForbidden) GetPayload() *models.Error { - return o.Payload -} - -func (o *V1HostgroupsPostForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.Error) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewV1HostgroupsPostConflict creates a V1HostgroupsPostConflict with default headers values -func NewV1HostgroupsPostConflict() *V1HostgroupsPostConflict { - return &V1HostgroupsPostConflict{} -} - -/* -V1HostgroupsPostConflict describes a response with status code 409, with default header values. - -Conflict -*/ -type V1HostgroupsPostConflict struct { - Payload *models.Error -} - -// IsSuccess returns true when this v1 hostgroups post conflict response has a 2xx status code -func (o *V1HostgroupsPostConflict) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this v1 hostgroups post conflict response has a 3xx status code -func (o *V1HostgroupsPostConflict) IsRedirect() bool { - return false -} - -// IsClientError returns true when this v1 hostgroups post conflict response has a 4xx status code -func (o *V1HostgroupsPostConflict) IsClientError() bool { - return true -} - -// IsServerError returns true when this v1 hostgroups post conflict response has a 5xx status code -func (o *V1HostgroupsPostConflict) IsServerError() bool { - return false -} - -// IsCode returns true when this v1 hostgroups post conflict response a status code equal to that given -func (o *V1HostgroupsPostConflict) IsCode(code int) bool { - return code == 409 -} - -// Code gets the status code for the v1 hostgroups post conflict response -func (o *V1HostgroupsPostConflict) Code() int { - return 409 -} - -func (o *V1HostgroupsPostConflict) Error() string { - return fmt.Sprintf("[POST /v1/hostgroups][%d] v1HostgroupsPostConflict %+v", 409, o.Payload) -} - -func (o *V1HostgroupsPostConflict) String() string { - return fmt.Sprintf("[POST /v1/hostgroups][%d] v1HostgroupsPostConflict %+v", 409, o.Payload) -} - -func (o *V1HostgroupsPostConflict) GetPayload() *models.Error { - return o.Payload -} - -func (o *V1HostgroupsPostConflict) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.Error) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewV1HostgroupsPostUnprocessableEntity creates a V1HostgroupsPostUnprocessableEntity with default headers values -func NewV1HostgroupsPostUnprocessableEntity() *V1HostgroupsPostUnprocessableEntity { - return &V1HostgroupsPostUnprocessableEntity{} -} - -/* -V1HostgroupsPostUnprocessableEntity describes a response with status code 422, with default header values. - -Unprocessable Entity -*/ -type V1HostgroupsPostUnprocessableEntity struct { - Payload *models.Error -} - -// IsSuccess returns true when this v1 hostgroups post unprocessable entity response has a 2xx status code -func (o *V1HostgroupsPostUnprocessableEntity) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this v1 hostgroups post unprocessable entity response has a 3xx status code -func (o *V1HostgroupsPostUnprocessableEntity) IsRedirect() bool { - return false -} - -// IsClientError returns true when this v1 hostgroups post unprocessable entity response has a 4xx status code -func (o *V1HostgroupsPostUnprocessableEntity) IsClientError() bool { - return true -} - -// IsServerError returns true when this v1 hostgroups post unprocessable entity response has a 5xx status code -func (o *V1HostgroupsPostUnprocessableEntity) IsServerError() bool { - return false -} - -// IsCode returns true when this v1 hostgroups post unprocessable entity response a status code equal to that given -func (o *V1HostgroupsPostUnprocessableEntity) IsCode(code int) bool { - return code == 422 -} - -// Code gets the status code for the v1 hostgroups post unprocessable entity response -func (o *V1HostgroupsPostUnprocessableEntity) Code() int { - return 422 -} - -func (o *V1HostgroupsPostUnprocessableEntity) Error() string { - return fmt.Sprintf("[POST /v1/hostgroups][%d] v1HostgroupsPostUnprocessableEntity %+v", 422, o.Payload) -} - -func (o *V1HostgroupsPostUnprocessableEntity) String() string { - return fmt.Sprintf("[POST /v1/hostgroups][%d] v1HostgroupsPostUnprocessableEntity %+v", 422, o.Payload) -} - -func (o *V1HostgroupsPostUnprocessableEntity) GetPayload() *models.Error { - return o.Payload -} - -func (o *V1HostgroupsPostUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.Error) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewV1HostgroupsPostInternalServerError creates a V1HostgroupsPostInternalServerError with default headers values -func NewV1HostgroupsPostInternalServerError() *V1HostgroupsPostInternalServerError { - return &V1HostgroupsPostInternalServerError{} -} - -/* -V1HostgroupsPostInternalServerError describes a response with status code 500, with default header values. - -Internal Server Error -*/ -type V1HostgroupsPostInternalServerError struct { - Payload *models.Error -} - -// IsSuccess returns true when this v1 hostgroups post internal server error response has a 2xx status code -func (o *V1HostgroupsPostInternalServerError) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this v1 hostgroups post internal server error response has a 3xx status code -func (o *V1HostgroupsPostInternalServerError) IsRedirect() bool { - return false -} - -// IsClientError returns true when this v1 hostgroups post internal server error response has a 4xx status code -func (o *V1HostgroupsPostInternalServerError) IsClientError() bool { - return false -} - -// IsServerError returns true when this v1 hostgroups post internal server error response has a 5xx status code -func (o *V1HostgroupsPostInternalServerError) IsServerError() bool { - return true -} - -// IsCode returns true when this v1 hostgroups post internal server error response a status code equal to that given -func (o *V1HostgroupsPostInternalServerError) IsCode(code int) bool { - return code == 500 -} - -// Code gets the status code for the v1 hostgroups post internal server error response -func (o *V1HostgroupsPostInternalServerError) Code() int { - return 500 -} - -func (o *V1HostgroupsPostInternalServerError) Error() string { - return fmt.Sprintf("[POST /v1/hostgroups][%d] v1HostgroupsPostInternalServerError %+v", 500, o.Payload) -} - -func (o *V1HostgroupsPostInternalServerError) String() string { - return fmt.Sprintf("[POST /v1/hostgroups][%d] v1HostgroupsPostInternalServerError %+v", 500, o.Payload) -} - -func (o *V1HostgroupsPostInternalServerError) GetPayload() *models.Error { - return o.Payload -} - -func (o *V1HostgroupsPostInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.Error) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewV1HostgroupsPostGatewayTimeout creates a V1HostgroupsPostGatewayTimeout with default headers values -func NewV1HostgroupsPostGatewayTimeout() *V1HostgroupsPostGatewayTimeout { - return &V1HostgroupsPostGatewayTimeout{} -} - -/* -V1HostgroupsPostGatewayTimeout describes a response with status code 504, with default header values. - -Gateway Timeout. Request is still processing and taking longer than expected. -*/ -type V1HostgroupsPostGatewayTimeout struct { - Payload *models.Error -} - -// IsSuccess returns true when this v1 hostgroups post gateway timeout response has a 2xx status code -func (o *V1HostgroupsPostGatewayTimeout) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this v1 hostgroups post gateway timeout response has a 3xx status code -func (o *V1HostgroupsPostGatewayTimeout) IsRedirect() bool { - return false -} - -// IsClientError returns true when this v1 hostgroups post gateway timeout response has a 4xx status code -func (o *V1HostgroupsPostGatewayTimeout) IsClientError() bool { - return false -} - -// IsServerError returns true when this v1 hostgroups post gateway timeout response has a 5xx status code -func (o *V1HostgroupsPostGatewayTimeout) IsServerError() bool { - return true -} - -// IsCode returns true when this v1 hostgroups post gateway timeout response a status code equal to that given -func (o *V1HostgroupsPostGatewayTimeout) IsCode(code int) bool { - return code == 504 -} - -// Code gets the status code for the v1 hostgroups post gateway timeout response -func (o *V1HostgroupsPostGatewayTimeout) Code() int { - return 504 -} - -func (o *V1HostgroupsPostGatewayTimeout) Error() string { - return fmt.Sprintf("[POST /v1/hostgroups][%d] v1HostgroupsPostGatewayTimeout %+v", 504, o.Payload) -} - -func (o *V1HostgroupsPostGatewayTimeout) String() string { - return fmt.Sprintf("[POST /v1/hostgroups][%d] v1HostgroupsPostGatewayTimeout %+v", 504, o.Payload) -} - -func (o *V1HostgroupsPostGatewayTimeout) GetPayload() *models.Error { - return o.Payload -} - -func (o *V1HostgroupsPostGatewayTimeout) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.Error) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/power/client/iaas_service_broker/iaas_service_broker_client.go b/power/client/iaas_service_broker/iaas_service_broker_client.go index 8b177881..cefa48c3 100644 --- a/power/client/iaas_service_broker/iaas_service_broker_client.go +++ b/power/client/iaas_service_broker/iaas_service_broker_client.go @@ -9,6 +9,7 @@ import ( "fmt" "github.com/go-openapi/runtime" + httptransport "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" ) @@ -17,6 +18,31 @@ func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientServi return &Client{transport: transport, formats: formats} } +// New creates a new iaas service broker API client with basic auth credentials. +// It takes the following parameters: +// - host: http host (github.com). +// - basePath: any base path for the API client ("/v1", "/v3"). +// - scheme: http scheme ("http", "https"). +// - user: user for basic authentication header. +// - password: password for basic authentication header. +func NewClientWithBasicAuth(host, basePath, scheme, user, password string) ClientService { + transport := httptransport.New(host, basePath, []string{scheme}) + transport.DefaultAuthentication = httptransport.BasicAuth(user, password) + return &Client{transport: transport, formats: strfmt.Default} +} + +// New creates a new iaas service broker API client with a bearer token for authentication. +// It takes the following parameters: +// - host: http host (github.com). +// - basePath: any base path for the API client ("/v1", "/v3"). +// - scheme: http scheme ("http", "https"). +// - bearerToken: bearer token for Bearer authentication header. +func NewClientWithBearerToken(host, basePath, scheme, bearerToken string) ClientService { + transport := httptransport.New(host, basePath, []string{scheme}) + transport.DefaultAuthentication = httptransport.BearerToken(bearerToken) + return &Client{transport: transport, formats: strfmt.Default} +} + /* Client for iaas service broker API */ @@ -25,7 +51,7 @@ type Client struct { formats strfmt.Registry } -// ClientOption is the option for Client methods +// ClientOption may be used to customize the behavior of Client methods. type ClientOption func(*runtime.ClientOperation) // ClientService is the interface for Client methods diff --git a/power/client/iaas_service_broker/service_broker_health_head_responses.go b/power/client/iaas_service_broker/service_broker_health_head_responses.go index 53719cfa..de2604f7 100644 --- a/power/client/iaas_service_broker/service_broker_health_head_responses.go +++ b/power/client/iaas_service_broker/service_broker_health_head_responses.go @@ -6,6 +6,7 @@ package iaas_service_broker // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -103,11 +104,13 @@ func (o *ServiceBrokerHealthHeadOK) Code() int { } func (o *ServiceBrokerHealthHeadOK) Error() string { - return fmt.Sprintf("[HEAD /broker/v1/health][%d] serviceBrokerHealthHeadOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[HEAD /broker/v1/health][%d] serviceBrokerHealthHeadOK %s", 200, payload) } func (o *ServiceBrokerHealthHeadOK) String() string { - return fmt.Sprintf("[HEAD /broker/v1/health][%d] serviceBrokerHealthHeadOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[HEAD /broker/v1/health][%d] serviceBrokerHealthHeadOK %s", 200, payload) } func (o *ServiceBrokerHealthHeadOK) GetPayload() *models.Health { @@ -171,11 +174,13 @@ func (o *ServiceBrokerHealthHeadBadRequest) Code() int { } func (o *ServiceBrokerHealthHeadBadRequest) Error() string { - return fmt.Sprintf("[HEAD /broker/v1/health][%d] serviceBrokerHealthHeadBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[HEAD /broker/v1/health][%d] serviceBrokerHealthHeadBadRequest %s", 400, payload) } func (o *ServiceBrokerHealthHeadBadRequest) String() string { - return fmt.Sprintf("[HEAD /broker/v1/health][%d] serviceBrokerHealthHeadBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[HEAD /broker/v1/health][%d] serviceBrokerHealthHeadBadRequest %s", 400, payload) } func (o *ServiceBrokerHealthHeadBadRequest) GetPayload() *models.Error { @@ -239,11 +244,13 @@ func (o *ServiceBrokerHealthHeadUnauthorized) Code() int { } func (o *ServiceBrokerHealthHeadUnauthorized) Error() string { - return fmt.Sprintf("[HEAD /broker/v1/health][%d] serviceBrokerHealthHeadUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[HEAD /broker/v1/health][%d] serviceBrokerHealthHeadUnauthorized %s", 401, payload) } func (o *ServiceBrokerHealthHeadUnauthorized) String() string { - return fmt.Sprintf("[HEAD /broker/v1/health][%d] serviceBrokerHealthHeadUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[HEAD /broker/v1/health][%d] serviceBrokerHealthHeadUnauthorized %s", 401, payload) } func (o *ServiceBrokerHealthHeadUnauthorized) GetPayload() *models.Error { @@ -307,11 +314,13 @@ func (o *ServiceBrokerHealthHeadForbidden) Code() int { } func (o *ServiceBrokerHealthHeadForbidden) Error() string { - return fmt.Sprintf("[HEAD /broker/v1/health][%d] serviceBrokerHealthHeadForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[HEAD /broker/v1/health][%d] serviceBrokerHealthHeadForbidden %s", 403, payload) } func (o *ServiceBrokerHealthHeadForbidden) String() string { - return fmt.Sprintf("[HEAD /broker/v1/health][%d] serviceBrokerHealthHeadForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[HEAD /broker/v1/health][%d] serviceBrokerHealthHeadForbidden %s", 403, payload) } func (o *ServiceBrokerHealthHeadForbidden) GetPayload() *models.Error { @@ -375,11 +384,13 @@ func (o *ServiceBrokerHealthHeadNotFound) Code() int { } func (o *ServiceBrokerHealthHeadNotFound) Error() string { - return fmt.Sprintf("[HEAD /broker/v1/health][%d] serviceBrokerHealthHeadNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[HEAD /broker/v1/health][%d] serviceBrokerHealthHeadNotFound %s", 404, payload) } func (o *ServiceBrokerHealthHeadNotFound) String() string { - return fmt.Sprintf("[HEAD /broker/v1/health][%d] serviceBrokerHealthHeadNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[HEAD /broker/v1/health][%d] serviceBrokerHealthHeadNotFound %s", 404, payload) } func (o *ServiceBrokerHealthHeadNotFound) GetPayload() *models.Error { diff --git a/power/client/iaas_service_broker/service_broker_health_responses.go b/power/client/iaas_service_broker/service_broker_health_responses.go index e5a1f2fa..e89666a8 100644 --- a/power/client/iaas_service_broker/service_broker_health_responses.go +++ b/power/client/iaas_service_broker/service_broker_health_responses.go @@ -6,6 +6,7 @@ package iaas_service_broker // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -103,11 +104,13 @@ func (o *ServiceBrokerHealthOK) Code() int { } func (o *ServiceBrokerHealthOK) Error() string { - return fmt.Sprintf("[GET /broker/v1/health][%d] serviceBrokerHealthOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /broker/v1/health][%d] serviceBrokerHealthOK %s", 200, payload) } func (o *ServiceBrokerHealthOK) String() string { - return fmt.Sprintf("[GET /broker/v1/health][%d] serviceBrokerHealthOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /broker/v1/health][%d] serviceBrokerHealthOK %s", 200, payload) } func (o *ServiceBrokerHealthOK) GetPayload() *models.Health { @@ -171,11 +174,13 @@ func (o *ServiceBrokerHealthBadRequest) Code() int { } func (o *ServiceBrokerHealthBadRequest) Error() string { - return fmt.Sprintf("[GET /broker/v1/health][%d] serviceBrokerHealthBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /broker/v1/health][%d] serviceBrokerHealthBadRequest %s", 400, payload) } func (o *ServiceBrokerHealthBadRequest) String() string { - return fmt.Sprintf("[GET /broker/v1/health][%d] serviceBrokerHealthBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /broker/v1/health][%d] serviceBrokerHealthBadRequest %s", 400, payload) } func (o *ServiceBrokerHealthBadRequest) GetPayload() *models.Error { @@ -239,11 +244,13 @@ func (o *ServiceBrokerHealthUnauthorized) Code() int { } func (o *ServiceBrokerHealthUnauthorized) Error() string { - return fmt.Sprintf("[GET /broker/v1/health][%d] serviceBrokerHealthUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /broker/v1/health][%d] serviceBrokerHealthUnauthorized %s", 401, payload) } func (o *ServiceBrokerHealthUnauthorized) String() string { - return fmt.Sprintf("[GET /broker/v1/health][%d] serviceBrokerHealthUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /broker/v1/health][%d] serviceBrokerHealthUnauthorized %s", 401, payload) } func (o *ServiceBrokerHealthUnauthorized) GetPayload() *models.Error { @@ -307,11 +314,13 @@ func (o *ServiceBrokerHealthForbidden) Code() int { } func (o *ServiceBrokerHealthForbidden) Error() string { - return fmt.Sprintf("[GET /broker/v1/health][%d] serviceBrokerHealthForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /broker/v1/health][%d] serviceBrokerHealthForbidden %s", 403, payload) } func (o *ServiceBrokerHealthForbidden) String() string { - return fmt.Sprintf("[GET /broker/v1/health][%d] serviceBrokerHealthForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /broker/v1/health][%d] serviceBrokerHealthForbidden %s", 403, payload) } func (o *ServiceBrokerHealthForbidden) GetPayload() *models.Error { @@ -375,11 +384,13 @@ func (o *ServiceBrokerHealthNotFound) Code() int { } func (o *ServiceBrokerHealthNotFound) Error() string { - return fmt.Sprintf("[GET /broker/v1/health][%d] serviceBrokerHealthNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /broker/v1/health][%d] serviceBrokerHealthNotFound %s", 404, payload) } func (o *ServiceBrokerHealthNotFound) String() string { - return fmt.Sprintf("[GET /broker/v1/health][%d] serviceBrokerHealthNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /broker/v1/health][%d] serviceBrokerHealthNotFound %s", 404, payload) } func (o *ServiceBrokerHealthNotFound) GetPayload() *models.Error { diff --git a/power/client/iaas_service_broker/service_broker_test_timeout_responses.go b/power/client/iaas_service_broker/service_broker_test_timeout_responses.go index 5660b04c..b2304c38 100644 --- a/power/client/iaas_service_broker/service_broker_test_timeout_responses.go +++ b/power/client/iaas_service_broker/service_broker_test_timeout_responses.go @@ -6,6 +6,7 @@ package iaas_service_broker // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -103,11 +104,13 @@ func (o *ServiceBrokerTestTimeoutOK) Code() int { } func (o *ServiceBrokerTestTimeoutOK) Error() string { - return fmt.Sprintf("[GET /broker/v1/test/timeout][%d] serviceBrokerTestTimeoutOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /broker/v1/test/timeout][%d] serviceBrokerTestTimeoutOK %s", 200, payload) } func (o *ServiceBrokerTestTimeoutOK) String() string { - return fmt.Sprintf("[GET /broker/v1/test/timeout][%d] serviceBrokerTestTimeoutOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /broker/v1/test/timeout][%d] serviceBrokerTestTimeoutOK %s", 200, payload) } func (o *ServiceBrokerTestTimeoutOK) GetPayload() models.Object { @@ -169,11 +172,13 @@ func (o *ServiceBrokerTestTimeoutBadRequest) Code() int { } func (o *ServiceBrokerTestTimeoutBadRequest) Error() string { - return fmt.Sprintf("[GET /broker/v1/test/timeout][%d] serviceBrokerTestTimeoutBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /broker/v1/test/timeout][%d] serviceBrokerTestTimeoutBadRequest %s", 400, payload) } func (o *ServiceBrokerTestTimeoutBadRequest) String() string { - return fmt.Sprintf("[GET /broker/v1/test/timeout][%d] serviceBrokerTestTimeoutBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /broker/v1/test/timeout][%d] serviceBrokerTestTimeoutBadRequest %s", 400, payload) } func (o *ServiceBrokerTestTimeoutBadRequest) GetPayload() *models.Error { @@ -237,11 +242,13 @@ func (o *ServiceBrokerTestTimeoutUnauthorized) Code() int { } func (o *ServiceBrokerTestTimeoutUnauthorized) Error() string { - return fmt.Sprintf("[GET /broker/v1/test/timeout][%d] serviceBrokerTestTimeoutUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /broker/v1/test/timeout][%d] serviceBrokerTestTimeoutUnauthorized %s", 401, payload) } func (o *ServiceBrokerTestTimeoutUnauthorized) String() string { - return fmt.Sprintf("[GET /broker/v1/test/timeout][%d] serviceBrokerTestTimeoutUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /broker/v1/test/timeout][%d] serviceBrokerTestTimeoutUnauthorized %s", 401, payload) } func (o *ServiceBrokerTestTimeoutUnauthorized) GetPayload() *models.Error { @@ -305,11 +312,13 @@ func (o *ServiceBrokerTestTimeoutForbidden) Code() int { } func (o *ServiceBrokerTestTimeoutForbidden) Error() string { - return fmt.Sprintf("[GET /broker/v1/test/timeout][%d] serviceBrokerTestTimeoutForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /broker/v1/test/timeout][%d] serviceBrokerTestTimeoutForbidden %s", 403, payload) } func (o *ServiceBrokerTestTimeoutForbidden) String() string { - return fmt.Sprintf("[GET /broker/v1/test/timeout][%d] serviceBrokerTestTimeoutForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /broker/v1/test/timeout][%d] serviceBrokerTestTimeoutForbidden %s", 403, payload) } func (o *ServiceBrokerTestTimeoutForbidden) GetPayload() *models.Error { @@ -373,11 +382,13 @@ func (o *ServiceBrokerTestTimeoutNotFound) Code() int { } func (o *ServiceBrokerTestTimeoutNotFound) Error() string { - return fmt.Sprintf("[GET /broker/v1/test/timeout][%d] serviceBrokerTestTimeoutNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /broker/v1/test/timeout][%d] serviceBrokerTestTimeoutNotFound %s", 404, payload) } func (o *ServiceBrokerTestTimeoutNotFound) String() string { - return fmt.Sprintf("[GET /broker/v1/test/timeout][%d] serviceBrokerTestTimeoutNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /broker/v1/test/timeout][%d] serviceBrokerTestTimeoutNotFound %s", 404, payload) } func (o *ServiceBrokerTestTimeoutNotFound) GetPayload() *models.Error { diff --git a/power/client/iaas_service_broker/service_broker_version_responses.go b/power/client/iaas_service_broker/service_broker_version_responses.go index 23b0bf2a..04859bcc 100644 --- a/power/client/iaas_service_broker/service_broker_version_responses.go +++ b/power/client/iaas_service_broker/service_broker_version_responses.go @@ -6,6 +6,7 @@ package iaas_service_broker // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -103,11 +104,13 @@ func (o *ServiceBrokerVersionOK) Code() int { } func (o *ServiceBrokerVersionOK) Error() string { - return fmt.Sprintf("[GET /broker/v1/version][%d] serviceBrokerVersionOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /broker/v1/version][%d] serviceBrokerVersionOK %s", 200, payload) } func (o *ServiceBrokerVersionOK) String() string { - return fmt.Sprintf("[GET /broker/v1/version][%d] serviceBrokerVersionOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /broker/v1/version][%d] serviceBrokerVersionOK %s", 200, payload) } func (o *ServiceBrokerVersionOK) GetPayload() *models.Version { @@ -171,11 +174,13 @@ func (o *ServiceBrokerVersionBadRequest) Code() int { } func (o *ServiceBrokerVersionBadRequest) Error() string { - return fmt.Sprintf("[GET /broker/v1/version][%d] serviceBrokerVersionBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /broker/v1/version][%d] serviceBrokerVersionBadRequest %s", 400, payload) } func (o *ServiceBrokerVersionBadRequest) String() string { - return fmt.Sprintf("[GET /broker/v1/version][%d] serviceBrokerVersionBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /broker/v1/version][%d] serviceBrokerVersionBadRequest %s", 400, payload) } func (o *ServiceBrokerVersionBadRequest) GetPayload() *models.Error { @@ -239,11 +244,13 @@ func (o *ServiceBrokerVersionUnauthorized) Code() int { } func (o *ServiceBrokerVersionUnauthorized) Error() string { - return fmt.Sprintf("[GET /broker/v1/version][%d] serviceBrokerVersionUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /broker/v1/version][%d] serviceBrokerVersionUnauthorized %s", 401, payload) } func (o *ServiceBrokerVersionUnauthorized) String() string { - return fmt.Sprintf("[GET /broker/v1/version][%d] serviceBrokerVersionUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /broker/v1/version][%d] serviceBrokerVersionUnauthorized %s", 401, payload) } func (o *ServiceBrokerVersionUnauthorized) GetPayload() *models.Error { @@ -307,11 +314,13 @@ func (o *ServiceBrokerVersionForbidden) Code() int { } func (o *ServiceBrokerVersionForbidden) Error() string { - return fmt.Sprintf("[GET /broker/v1/version][%d] serviceBrokerVersionForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /broker/v1/version][%d] serviceBrokerVersionForbidden %s", 403, payload) } func (o *ServiceBrokerVersionForbidden) String() string { - return fmt.Sprintf("[GET /broker/v1/version][%d] serviceBrokerVersionForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /broker/v1/version][%d] serviceBrokerVersionForbidden %s", 403, payload) } func (o *ServiceBrokerVersionForbidden) GetPayload() *models.Error { @@ -375,11 +384,13 @@ func (o *ServiceBrokerVersionNotFound) Code() int { } func (o *ServiceBrokerVersionNotFound) Error() string { - return fmt.Sprintf("[GET /broker/v1/version][%d] serviceBrokerVersionNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /broker/v1/version][%d] serviceBrokerVersionNotFound %s", 404, payload) } func (o *ServiceBrokerVersionNotFound) String() string { - return fmt.Sprintf("[GET /broker/v1/version][%d] serviceBrokerVersionNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /broker/v1/version][%d] serviceBrokerVersionNotFound %s", 404, payload) } func (o *ServiceBrokerVersionNotFound) GetPayload() *models.Error { diff --git a/power/client/internal_power_v_s_instances/internal_powervs_instances_client.go b/power/client/internal_power_v_s_instances/internal_powervs_instances_client.go index 3c26fc52..4cf2e690 100644 --- a/power/client/internal_power_v_s_instances/internal_powervs_instances_client.go +++ b/power/client/internal_power_v_s_instances/internal_powervs_instances_client.go @@ -9,6 +9,7 @@ import ( "fmt" "github.com/go-openapi/runtime" + httptransport "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" ) @@ -17,6 +18,31 @@ func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientServi return &Client{transport: transport, formats: formats} } +// New creates a new internal power v s instances API client with basic auth credentials. +// It takes the following parameters: +// - host: http host (github.com). +// - basePath: any base path for the API client ("/v1", "/v3"). +// - scheme: http scheme ("http", "https"). +// - user: user for basic authentication header. +// - password: password for basic authentication header. +func NewClientWithBasicAuth(host, basePath, scheme, user, password string) ClientService { + transport := httptransport.New(host, basePath, []string{scheme}) + transport.DefaultAuthentication = httptransport.BasicAuth(user, password) + return &Client{transport: transport, formats: strfmt.Default} +} + +// New creates a new internal power v s instances API client with a bearer token for authentication. +// It takes the following parameters: +// - host: http host (github.com). +// - basePath: any base path for the API client ("/v1", "/v3"). +// - scheme: http scheme ("http", "https"). +// - bearerToken: bearer token for Bearer authentication header. +func NewClientWithBearerToken(host, basePath, scheme, bearerToken string) ClientService { + transport := httptransport.New(host, basePath, []string{scheme}) + transport.DefaultAuthentication = httptransport.BearerToken(bearerToken) + return &Client{transport: transport, formats: strfmt.Default} +} + /* Client for internal power v s instances API */ @@ -25,7 +51,7 @@ type Client struct { formats strfmt.Registry } -// ClientOption is the option for Client methods +// ClientOption may be used to customize the behavior of Client methods. type ClientOption func(*runtime.ClientOperation) // ClientService is the interface for Client methods diff --git a/power/client/internal_power_v_s_instances/internal_v1_powervs_instances_get_responses.go b/power/client/internal_power_v_s_instances/internal_v1_powervs_instances_get_responses.go index b84da6e3..a7d7ff74 100644 --- a/power/client/internal_power_v_s_instances/internal_v1_powervs_instances_get_responses.go +++ b/power/client/internal_power_v_s_instances/internal_v1_powervs_instances_get_responses.go @@ -6,6 +6,7 @@ package internal_power_v_s_instances // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -91,11 +92,13 @@ func (o *InternalV1PowervsInstancesGetOK) Code() int { } func (o *InternalV1PowervsInstancesGetOK) Error() string { - return fmt.Sprintf("[GET /internal/v1/powervs/instances][%d] internalV1PowervsInstancesGetOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /internal/v1/powervs/instances][%d] internalV1PowervsInstancesGetOK %s", 200, payload) } func (o *InternalV1PowervsInstancesGetOK) String() string { - return fmt.Sprintf("[GET /internal/v1/powervs/instances][%d] internalV1PowervsInstancesGetOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /internal/v1/powervs/instances][%d] internalV1PowervsInstancesGetOK %s", 200, payload) } func (o *InternalV1PowervsInstancesGetOK) GetPayload() *models.PowerVSInstances { @@ -159,11 +162,13 @@ func (o *InternalV1PowervsInstancesGetForbidden) Code() int { } func (o *InternalV1PowervsInstancesGetForbidden) Error() string { - return fmt.Sprintf("[GET /internal/v1/powervs/instances][%d] internalV1PowervsInstancesGetForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /internal/v1/powervs/instances][%d] internalV1PowervsInstancesGetForbidden %s", 403, payload) } func (o *InternalV1PowervsInstancesGetForbidden) String() string { - return fmt.Sprintf("[GET /internal/v1/powervs/instances][%d] internalV1PowervsInstancesGetForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /internal/v1/powervs/instances][%d] internalV1PowervsInstancesGetForbidden %s", 403, payload) } func (o *InternalV1PowervsInstancesGetForbidden) GetPayload() *models.Error { @@ -227,11 +232,13 @@ func (o *InternalV1PowervsInstancesGetInternalServerError) Code() int { } func (o *InternalV1PowervsInstancesGetInternalServerError) Error() string { - return fmt.Sprintf("[GET /internal/v1/powervs/instances][%d] internalV1PowervsInstancesGetInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /internal/v1/powervs/instances][%d] internalV1PowervsInstancesGetInternalServerError %s", 500, payload) } func (o *InternalV1PowervsInstancesGetInternalServerError) String() string { - return fmt.Sprintf("[GET /internal/v1/powervs/instances][%d] internalV1PowervsInstancesGetInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /internal/v1/powervs/instances][%d] internalV1PowervsInstancesGetInternalServerError %s", 500, payload) } func (o *InternalV1PowervsInstancesGetInternalServerError) GetPayload() *models.Error { diff --git a/power/client/internal_power_v_s_locations/internal_powervs_locations_client.go b/power/client/internal_power_v_s_locations/internal_powervs_locations_client.go index 1eb10428..a5b26b2b 100644 --- a/power/client/internal_power_v_s_locations/internal_powervs_locations_client.go +++ b/power/client/internal_power_v_s_locations/internal_powervs_locations_client.go @@ -9,6 +9,7 @@ import ( "fmt" "github.com/go-openapi/runtime" + httptransport "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" ) @@ -17,6 +18,31 @@ func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientServi return &Client{transport: transport, formats: formats} } +// New creates a new internal power v s locations API client with basic auth credentials. +// It takes the following parameters: +// - host: http host (github.com). +// - basePath: any base path for the API client ("/v1", "/v3"). +// - scheme: http scheme ("http", "https"). +// - user: user for basic authentication header. +// - password: password for basic authentication header. +func NewClientWithBasicAuth(host, basePath, scheme, user, password string) ClientService { + transport := httptransport.New(host, basePath, []string{scheme}) + transport.DefaultAuthentication = httptransport.BasicAuth(user, password) + return &Client{transport: transport, formats: strfmt.Default} +} + +// New creates a new internal power v s locations API client with a bearer token for authentication. +// It takes the following parameters: +// - host: http host (github.com). +// - basePath: any base path for the API client ("/v1", "/v3"). +// - scheme: http scheme ("http", "https"). +// - bearerToken: bearer token for Bearer authentication header. +func NewClientWithBearerToken(host, basePath, scheme, bearerToken string) ClientService { + transport := httptransport.New(host, basePath, []string{scheme}) + transport.DefaultAuthentication = httptransport.BearerToken(bearerToken) + return &Client{transport: transport, formats: strfmt.Default} +} + /* Client for internal power v s locations API */ @@ -25,7 +51,7 @@ type Client struct { formats strfmt.Registry } -// ClientOption is the option for Client methods +// ClientOption may be used to customize the behavior of Client methods. type ClientOption func(*runtime.ClientOperation) // ClientService is the interface for Client methods diff --git a/power/client/internal_power_v_s_locations/internal_v1_powervs_locations_activate_put_responses.go b/power/client/internal_power_v_s_locations/internal_v1_powervs_locations_activate_put_responses.go index 1210de96..a9674327 100644 --- a/power/client/internal_power_v_s_locations/internal_v1_powervs_locations_activate_put_responses.go +++ b/power/client/internal_power_v_s_locations/internal_v1_powervs_locations_activate_put_responses.go @@ -6,6 +6,7 @@ package internal_power_v_s_locations // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -103,11 +104,13 @@ func (o *InternalV1PowervsLocationsActivatePutOK) Code() int { } func (o *InternalV1PowervsLocationsActivatePutOK) Error() string { - return fmt.Sprintf("[PUT /internal/v1/powervs/locations/activate][%d] internalV1PowervsLocationsActivatePutOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /internal/v1/powervs/locations/activate][%d] internalV1PowervsLocationsActivatePutOK %s", 200, payload) } func (o *InternalV1PowervsLocationsActivatePutOK) String() string { - return fmt.Sprintf("[PUT /internal/v1/powervs/locations/activate][%d] internalV1PowervsLocationsActivatePutOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /internal/v1/powervs/locations/activate][%d] internalV1PowervsLocationsActivatePutOK %s", 200, payload) } func (o *InternalV1PowervsLocationsActivatePutOK) GetPayload() *models.SatelliteOrder { @@ -171,11 +174,13 @@ func (o *InternalV1PowervsLocationsActivatePutBadRequest) Code() int { } func (o *InternalV1PowervsLocationsActivatePutBadRequest) Error() string { - return fmt.Sprintf("[PUT /internal/v1/powervs/locations/activate][%d] internalV1PowervsLocationsActivatePutBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /internal/v1/powervs/locations/activate][%d] internalV1PowervsLocationsActivatePutBadRequest %s", 400, payload) } func (o *InternalV1PowervsLocationsActivatePutBadRequest) String() string { - return fmt.Sprintf("[PUT /internal/v1/powervs/locations/activate][%d] internalV1PowervsLocationsActivatePutBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /internal/v1/powervs/locations/activate][%d] internalV1PowervsLocationsActivatePutBadRequest %s", 400, payload) } func (o *InternalV1PowervsLocationsActivatePutBadRequest) GetPayload() *models.Error { @@ -239,11 +244,13 @@ func (o *InternalV1PowervsLocationsActivatePutUnauthorized) Code() int { } func (o *InternalV1PowervsLocationsActivatePutUnauthorized) Error() string { - return fmt.Sprintf("[PUT /internal/v1/powervs/locations/activate][%d] internalV1PowervsLocationsActivatePutUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /internal/v1/powervs/locations/activate][%d] internalV1PowervsLocationsActivatePutUnauthorized %s", 401, payload) } func (o *InternalV1PowervsLocationsActivatePutUnauthorized) String() string { - return fmt.Sprintf("[PUT /internal/v1/powervs/locations/activate][%d] internalV1PowervsLocationsActivatePutUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /internal/v1/powervs/locations/activate][%d] internalV1PowervsLocationsActivatePutUnauthorized %s", 401, payload) } func (o *InternalV1PowervsLocationsActivatePutUnauthorized) GetPayload() *models.Error { @@ -307,11 +314,13 @@ func (o *InternalV1PowervsLocationsActivatePutUnprocessableEntity) Code() int { } func (o *InternalV1PowervsLocationsActivatePutUnprocessableEntity) Error() string { - return fmt.Sprintf("[PUT /internal/v1/powervs/locations/activate][%d] internalV1PowervsLocationsActivatePutUnprocessableEntity %+v", 422, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /internal/v1/powervs/locations/activate][%d] internalV1PowervsLocationsActivatePutUnprocessableEntity %s", 422, payload) } func (o *InternalV1PowervsLocationsActivatePutUnprocessableEntity) String() string { - return fmt.Sprintf("[PUT /internal/v1/powervs/locations/activate][%d] internalV1PowervsLocationsActivatePutUnprocessableEntity %+v", 422, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /internal/v1/powervs/locations/activate][%d] internalV1PowervsLocationsActivatePutUnprocessableEntity %s", 422, payload) } func (o *InternalV1PowervsLocationsActivatePutUnprocessableEntity) GetPayload() *models.Error { @@ -375,11 +384,13 @@ func (o *InternalV1PowervsLocationsActivatePutInternalServerError) Code() int { } func (o *InternalV1PowervsLocationsActivatePutInternalServerError) Error() string { - return fmt.Sprintf("[PUT /internal/v1/powervs/locations/activate][%d] internalV1PowervsLocationsActivatePutInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /internal/v1/powervs/locations/activate][%d] internalV1PowervsLocationsActivatePutInternalServerError %s", 500, payload) } func (o *InternalV1PowervsLocationsActivatePutInternalServerError) String() string { - return fmt.Sprintf("[PUT /internal/v1/powervs/locations/activate][%d] internalV1PowervsLocationsActivatePutInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /internal/v1/powervs/locations/activate][%d] internalV1PowervsLocationsActivatePutInternalServerError %s", 500, payload) } func (o *InternalV1PowervsLocationsActivatePutInternalServerError) GetPayload() *models.Error { diff --git a/power/client/internal_power_v_s_locations/internal_v1_powervs_locations_tag_delete_responses.go b/power/client/internal_power_v_s_locations/internal_v1_powervs_locations_tag_delete_responses.go index 78c51d96..e9775fcf 100644 --- a/power/client/internal_power_v_s_locations/internal_v1_powervs_locations_tag_delete_responses.go +++ b/power/client/internal_power_v_s_locations/internal_v1_powervs_locations_tag_delete_responses.go @@ -6,6 +6,7 @@ package internal_power_v_s_locations // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -102,11 +103,11 @@ func (o *InternalV1PowervsLocationsTagDeleteOK) Code() int { } func (o *InternalV1PowervsLocationsTagDeleteOK) Error() string { - return fmt.Sprintf("[DELETE /internal/v1/powervs/locations/tag][%d] internalV1PowervsLocationsTagDeleteOK ", 200) + return fmt.Sprintf("[DELETE /internal/v1/powervs/locations/tag][%d] internalV1PowervsLocationsTagDeleteOK", 200) } func (o *InternalV1PowervsLocationsTagDeleteOK) String() string { - return fmt.Sprintf("[DELETE /internal/v1/powervs/locations/tag][%d] internalV1PowervsLocationsTagDeleteOK ", 200) + return fmt.Sprintf("[DELETE /internal/v1/powervs/locations/tag][%d] internalV1PowervsLocationsTagDeleteOK", 200) } func (o *InternalV1PowervsLocationsTagDeleteOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { @@ -159,11 +160,13 @@ func (o *InternalV1PowervsLocationsTagDeleteBadRequest) Code() int { } func (o *InternalV1PowervsLocationsTagDeleteBadRequest) Error() string { - return fmt.Sprintf("[DELETE /internal/v1/powervs/locations/tag][%d] internalV1PowervsLocationsTagDeleteBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /internal/v1/powervs/locations/tag][%d] internalV1PowervsLocationsTagDeleteBadRequest %s", 400, payload) } func (o *InternalV1PowervsLocationsTagDeleteBadRequest) String() string { - return fmt.Sprintf("[DELETE /internal/v1/powervs/locations/tag][%d] internalV1PowervsLocationsTagDeleteBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /internal/v1/powervs/locations/tag][%d] internalV1PowervsLocationsTagDeleteBadRequest %s", 400, payload) } func (o *InternalV1PowervsLocationsTagDeleteBadRequest) GetPayload() *models.Error { @@ -227,11 +230,13 @@ func (o *InternalV1PowervsLocationsTagDeleteUnauthorized) Code() int { } func (o *InternalV1PowervsLocationsTagDeleteUnauthorized) Error() string { - return fmt.Sprintf("[DELETE /internal/v1/powervs/locations/tag][%d] internalV1PowervsLocationsTagDeleteUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /internal/v1/powervs/locations/tag][%d] internalV1PowervsLocationsTagDeleteUnauthorized %s", 401, payload) } func (o *InternalV1PowervsLocationsTagDeleteUnauthorized) String() string { - return fmt.Sprintf("[DELETE /internal/v1/powervs/locations/tag][%d] internalV1PowervsLocationsTagDeleteUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /internal/v1/powervs/locations/tag][%d] internalV1PowervsLocationsTagDeleteUnauthorized %s", 401, payload) } func (o *InternalV1PowervsLocationsTagDeleteUnauthorized) GetPayload() *models.Error { @@ -295,11 +300,13 @@ func (o *InternalV1PowervsLocationsTagDeleteUnprocessableEntity) Code() int { } func (o *InternalV1PowervsLocationsTagDeleteUnprocessableEntity) Error() string { - return fmt.Sprintf("[DELETE /internal/v1/powervs/locations/tag][%d] internalV1PowervsLocationsTagDeleteUnprocessableEntity %+v", 422, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /internal/v1/powervs/locations/tag][%d] internalV1PowervsLocationsTagDeleteUnprocessableEntity %s", 422, payload) } func (o *InternalV1PowervsLocationsTagDeleteUnprocessableEntity) String() string { - return fmt.Sprintf("[DELETE /internal/v1/powervs/locations/tag][%d] internalV1PowervsLocationsTagDeleteUnprocessableEntity %+v", 422, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /internal/v1/powervs/locations/tag][%d] internalV1PowervsLocationsTagDeleteUnprocessableEntity %s", 422, payload) } func (o *InternalV1PowervsLocationsTagDeleteUnprocessableEntity) GetPayload() *models.Error { @@ -363,11 +370,13 @@ func (o *InternalV1PowervsLocationsTagDeleteInternalServerError) Code() int { } func (o *InternalV1PowervsLocationsTagDeleteInternalServerError) Error() string { - return fmt.Sprintf("[DELETE /internal/v1/powervs/locations/tag][%d] internalV1PowervsLocationsTagDeleteInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /internal/v1/powervs/locations/tag][%d] internalV1PowervsLocationsTagDeleteInternalServerError %s", 500, payload) } func (o *InternalV1PowervsLocationsTagDeleteInternalServerError) String() string { - return fmt.Sprintf("[DELETE /internal/v1/powervs/locations/tag][%d] internalV1PowervsLocationsTagDeleteInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /internal/v1/powervs/locations/tag][%d] internalV1PowervsLocationsTagDeleteInternalServerError %s", 500, payload) } func (o *InternalV1PowervsLocationsTagDeleteInternalServerError) GetPayload() *models.Error { diff --git a/power/client/internal_power_v_s_locations/internal_v1_powervs_locations_tag_post_responses.go b/power/client/internal_power_v_s_locations/internal_v1_powervs_locations_tag_post_responses.go index 938e531a..7b1e8cb0 100644 --- a/power/client/internal_power_v_s_locations/internal_v1_powervs_locations_tag_post_responses.go +++ b/power/client/internal_power_v_s_locations/internal_v1_powervs_locations_tag_post_responses.go @@ -6,6 +6,7 @@ package internal_power_v_s_locations // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -102,11 +103,11 @@ func (o *InternalV1PowervsLocationsTagPostOK) Code() int { } func (o *InternalV1PowervsLocationsTagPostOK) Error() string { - return fmt.Sprintf("[POST /internal/v1/powervs/locations/tag][%d] internalV1PowervsLocationsTagPostOK ", 200) + return fmt.Sprintf("[POST /internal/v1/powervs/locations/tag][%d] internalV1PowervsLocationsTagPostOK", 200) } func (o *InternalV1PowervsLocationsTagPostOK) String() string { - return fmt.Sprintf("[POST /internal/v1/powervs/locations/tag][%d] internalV1PowervsLocationsTagPostOK ", 200) + return fmt.Sprintf("[POST /internal/v1/powervs/locations/tag][%d] internalV1PowervsLocationsTagPostOK", 200) } func (o *InternalV1PowervsLocationsTagPostOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { @@ -159,11 +160,13 @@ func (o *InternalV1PowervsLocationsTagPostBadRequest) Code() int { } func (o *InternalV1PowervsLocationsTagPostBadRequest) Error() string { - return fmt.Sprintf("[POST /internal/v1/powervs/locations/tag][%d] internalV1PowervsLocationsTagPostBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /internal/v1/powervs/locations/tag][%d] internalV1PowervsLocationsTagPostBadRequest %s", 400, payload) } func (o *InternalV1PowervsLocationsTagPostBadRequest) String() string { - return fmt.Sprintf("[POST /internal/v1/powervs/locations/tag][%d] internalV1PowervsLocationsTagPostBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /internal/v1/powervs/locations/tag][%d] internalV1PowervsLocationsTagPostBadRequest %s", 400, payload) } func (o *InternalV1PowervsLocationsTagPostBadRequest) GetPayload() *models.Error { @@ -227,11 +230,13 @@ func (o *InternalV1PowervsLocationsTagPostUnauthorized) Code() int { } func (o *InternalV1PowervsLocationsTagPostUnauthorized) Error() string { - return fmt.Sprintf("[POST /internal/v1/powervs/locations/tag][%d] internalV1PowervsLocationsTagPostUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /internal/v1/powervs/locations/tag][%d] internalV1PowervsLocationsTagPostUnauthorized %s", 401, payload) } func (o *InternalV1PowervsLocationsTagPostUnauthorized) String() string { - return fmt.Sprintf("[POST /internal/v1/powervs/locations/tag][%d] internalV1PowervsLocationsTagPostUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /internal/v1/powervs/locations/tag][%d] internalV1PowervsLocationsTagPostUnauthorized %s", 401, payload) } func (o *InternalV1PowervsLocationsTagPostUnauthorized) GetPayload() *models.Error { @@ -295,11 +300,13 @@ func (o *InternalV1PowervsLocationsTagPostUnprocessableEntity) Code() int { } func (o *InternalV1PowervsLocationsTagPostUnprocessableEntity) Error() string { - return fmt.Sprintf("[POST /internal/v1/powervs/locations/tag][%d] internalV1PowervsLocationsTagPostUnprocessableEntity %+v", 422, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /internal/v1/powervs/locations/tag][%d] internalV1PowervsLocationsTagPostUnprocessableEntity %s", 422, payload) } func (o *InternalV1PowervsLocationsTagPostUnprocessableEntity) String() string { - return fmt.Sprintf("[POST /internal/v1/powervs/locations/tag][%d] internalV1PowervsLocationsTagPostUnprocessableEntity %+v", 422, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /internal/v1/powervs/locations/tag][%d] internalV1PowervsLocationsTagPostUnprocessableEntity %s", 422, payload) } func (o *InternalV1PowervsLocationsTagPostUnprocessableEntity) GetPayload() *models.Error { @@ -363,11 +370,13 @@ func (o *InternalV1PowervsLocationsTagPostInternalServerError) Code() int { } func (o *InternalV1PowervsLocationsTagPostInternalServerError) Error() string { - return fmt.Sprintf("[POST /internal/v1/powervs/locations/tag][%d] internalV1PowervsLocationsTagPostInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /internal/v1/powervs/locations/tag][%d] internalV1PowervsLocationsTagPostInternalServerError %s", 500, payload) } func (o *InternalV1PowervsLocationsTagPostInternalServerError) String() string { - return fmt.Sprintf("[POST /internal/v1/powervs/locations/tag][%d] internalV1PowervsLocationsTagPostInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /internal/v1/powervs/locations/tag][%d] internalV1PowervsLocationsTagPostInternalServerError %s", 500, payload) } func (o *InternalV1PowervsLocationsTagPostInternalServerError) GetPayload() *models.Error { diff --git a/power/client/internal_power_v_s_locations/internal_v1_powervs_locations_transitgateway_get_responses.go b/power/client/internal_power_v_s_locations/internal_v1_powervs_locations_transitgateway_get_responses.go index a65dc9f3..dca379c2 100644 --- a/power/client/internal_power_v_s_locations/internal_v1_powervs_locations_transitgateway_get_responses.go +++ b/power/client/internal_power_v_s_locations/internal_v1_powervs_locations_transitgateway_get_responses.go @@ -6,6 +6,7 @@ package internal_power_v_s_locations // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -91,11 +92,13 @@ func (o *InternalV1PowervsLocationsTransitgatewayGetOK) Code() int { } func (o *InternalV1PowervsLocationsTransitgatewayGetOK) Error() string { - return fmt.Sprintf("[GET /internal/v1/powervs/locations/transit-gateway][%d] internalV1PowervsLocationsTransitgatewayGetOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /internal/v1/powervs/locations/transit-gateway][%d] internalV1PowervsLocationsTransitgatewayGetOK %s", 200, payload) } func (o *InternalV1PowervsLocationsTransitgatewayGetOK) String() string { - return fmt.Sprintf("[GET /internal/v1/powervs/locations/transit-gateway][%d] internalV1PowervsLocationsTransitgatewayGetOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /internal/v1/powervs/locations/transit-gateway][%d] internalV1PowervsLocationsTransitgatewayGetOK %s", 200, payload) } func (o *InternalV1PowervsLocationsTransitgatewayGetOK) GetPayload() *models.TransitGatewayLocations { @@ -159,11 +162,13 @@ func (o *InternalV1PowervsLocationsTransitgatewayGetForbidden) Code() int { } func (o *InternalV1PowervsLocationsTransitgatewayGetForbidden) Error() string { - return fmt.Sprintf("[GET /internal/v1/powervs/locations/transit-gateway][%d] internalV1PowervsLocationsTransitgatewayGetForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /internal/v1/powervs/locations/transit-gateway][%d] internalV1PowervsLocationsTransitgatewayGetForbidden %s", 403, payload) } func (o *InternalV1PowervsLocationsTransitgatewayGetForbidden) String() string { - return fmt.Sprintf("[GET /internal/v1/powervs/locations/transit-gateway][%d] internalV1PowervsLocationsTransitgatewayGetForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /internal/v1/powervs/locations/transit-gateway][%d] internalV1PowervsLocationsTransitgatewayGetForbidden %s", 403, payload) } func (o *InternalV1PowervsLocationsTransitgatewayGetForbidden) GetPayload() *models.Error { @@ -227,11 +232,13 @@ func (o *InternalV1PowervsLocationsTransitgatewayGetInternalServerError) Code() } func (o *InternalV1PowervsLocationsTransitgatewayGetInternalServerError) Error() string { - return fmt.Sprintf("[GET /internal/v1/powervs/locations/transit-gateway][%d] internalV1PowervsLocationsTransitgatewayGetInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /internal/v1/powervs/locations/transit-gateway][%d] internalV1PowervsLocationsTransitgatewayGetInternalServerError %s", 500, payload) } func (o *InternalV1PowervsLocationsTransitgatewayGetInternalServerError) String() string { - return fmt.Sprintf("[GET /internal/v1/powervs/locations/transit-gateway][%d] internalV1PowervsLocationsTransitgatewayGetInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /internal/v1/powervs/locations/transit-gateway][%d] internalV1PowervsLocationsTransitgatewayGetInternalServerError %s", 500, payload) } func (o *InternalV1PowervsLocationsTransitgatewayGetInternalServerError) GetPayload() *models.Error { diff --git a/power/client/internal_storage_regions/internal_storage_regions_client.go b/power/client/internal_storage_regions/internal_storage_regions_client.go index 6c57756c..82b0960b 100644 --- a/power/client/internal_storage_regions/internal_storage_regions_client.go +++ b/power/client/internal_storage_regions/internal_storage_regions_client.go @@ -9,6 +9,7 @@ import ( "fmt" "github.com/go-openapi/runtime" + httptransport "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" ) @@ -17,6 +18,31 @@ func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientServi return &Client{transport: transport, formats: formats} } +// New creates a new internal storage regions API client with basic auth credentials. +// It takes the following parameters: +// - host: http host (github.com). +// - basePath: any base path for the API client ("/v1", "/v3"). +// - scheme: http scheme ("http", "https"). +// - user: user for basic authentication header. +// - password: password for basic authentication header. +func NewClientWithBasicAuth(host, basePath, scheme, user, password string) ClientService { + transport := httptransport.New(host, basePath, []string{scheme}) + transport.DefaultAuthentication = httptransport.BasicAuth(user, password) + return &Client{transport: transport, formats: strfmt.Default} +} + +// New creates a new internal storage regions API client with a bearer token for authentication. +// It takes the following parameters: +// - host: http host (github.com). +// - basePath: any base path for the API client ("/v1", "/v3"). +// - scheme: http scheme ("http", "https"). +// - bearerToken: bearer token for Bearer authentication header. +func NewClientWithBearerToken(host, basePath, scheme, bearerToken string) ClientService { + transport := httptransport.New(host, basePath, []string{scheme}) + transport.DefaultAuthentication = httptransport.BearerToken(bearerToken) + return &Client{transport: transport, formats: strfmt.Default} +} + /* Client for internal storage regions API */ @@ -25,7 +51,7 @@ type Client struct { formats strfmt.Registry } -// ClientOption is the option for Client methods +// ClientOption may be used to customize the behavior of Client methods. type ClientOption func(*runtime.ClientOperation) // ClientService is the interface for Client methods diff --git a/power/client/internal_storage_regions/internal_v1_storage_regions_storage_pools_get_responses.go b/power/client/internal_storage_regions/internal_v1_storage_regions_storage_pools_get_responses.go index 8bf2e4d2..97315bc5 100644 --- a/power/client/internal_storage_regions/internal_v1_storage_regions_storage_pools_get_responses.go +++ b/power/client/internal_storage_regions/internal_v1_storage_regions_storage_pools_get_responses.go @@ -6,6 +6,7 @@ package internal_storage_regions // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -103,11 +104,13 @@ func (o *InternalV1StorageRegionsStoragePoolsGetOK) Code() int { } func (o *InternalV1StorageRegionsStoragePoolsGetOK) Error() string { - return fmt.Sprintf("[GET /internal/v1/storage/regions/{region_zone_id}/storage-pools/{storage_pool_name}][%d] internalV1StorageRegionsStoragePoolsGetOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /internal/v1/storage/regions/{region_zone_id}/storage-pools/{storage_pool_name}][%d] internalV1StorageRegionsStoragePoolsGetOK %s", 200, payload) } func (o *InternalV1StorageRegionsStoragePoolsGetOK) String() string { - return fmt.Sprintf("[GET /internal/v1/storage/regions/{region_zone_id}/storage-pools/{storage_pool_name}][%d] internalV1StorageRegionsStoragePoolsGetOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /internal/v1/storage/regions/{region_zone_id}/storage-pools/{storage_pool_name}][%d] internalV1StorageRegionsStoragePoolsGetOK %s", 200, payload) } func (o *InternalV1StorageRegionsStoragePoolsGetOK) GetPayload() models.StoragePools { @@ -169,11 +172,13 @@ func (o *InternalV1StorageRegionsStoragePoolsGetUnauthorized) Code() int { } func (o *InternalV1StorageRegionsStoragePoolsGetUnauthorized) Error() string { - return fmt.Sprintf("[GET /internal/v1/storage/regions/{region_zone_id}/storage-pools/{storage_pool_name}][%d] internalV1StorageRegionsStoragePoolsGetUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /internal/v1/storage/regions/{region_zone_id}/storage-pools/{storage_pool_name}][%d] internalV1StorageRegionsStoragePoolsGetUnauthorized %s", 401, payload) } func (o *InternalV1StorageRegionsStoragePoolsGetUnauthorized) String() string { - return fmt.Sprintf("[GET /internal/v1/storage/regions/{region_zone_id}/storage-pools/{storage_pool_name}][%d] internalV1StorageRegionsStoragePoolsGetUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /internal/v1/storage/regions/{region_zone_id}/storage-pools/{storage_pool_name}][%d] internalV1StorageRegionsStoragePoolsGetUnauthorized %s", 401, payload) } func (o *InternalV1StorageRegionsStoragePoolsGetUnauthorized) GetPayload() *models.Error { @@ -237,11 +242,13 @@ func (o *InternalV1StorageRegionsStoragePoolsGetForbidden) Code() int { } func (o *InternalV1StorageRegionsStoragePoolsGetForbidden) Error() string { - return fmt.Sprintf("[GET /internal/v1/storage/regions/{region_zone_id}/storage-pools/{storage_pool_name}][%d] internalV1StorageRegionsStoragePoolsGetForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /internal/v1/storage/regions/{region_zone_id}/storage-pools/{storage_pool_name}][%d] internalV1StorageRegionsStoragePoolsGetForbidden %s", 403, payload) } func (o *InternalV1StorageRegionsStoragePoolsGetForbidden) String() string { - return fmt.Sprintf("[GET /internal/v1/storage/regions/{region_zone_id}/storage-pools/{storage_pool_name}][%d] internalV1StorageRegionsStoragePoolsGetForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /internal/v1/storage/regions/{region_zone_id}/storage-pools/{storage_pool_name}][%d] internalV1StorageRegionsStoragePoolsGetForbidden %s", 403, payload) } func (o *InternalV1StorageRegionsStoragePoolsGetForbidden) GetPayload() *models.Error { @@ -305,11 +312,13 @@ func (o *InternalV1StorageRegionsStoragePoolsGetNotFound) Code() int { } func (o *InternalV1StorageRegionsStoragePoolsGetNotFound) Error() string { - return fmt.Sprintf("[GET /internal/v1/storage/regions/{region_zone_id}/storage-pools/{storage_pool_name}][%d] internalV1StorageRegionsStoragePoolsGetNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /internal/v1/storage/regions/{region_zone_id}/storage-pools/{storage_pool_name}][%d] internalV1StorageRegionsStoragePoolsGetNotFound %s", 404, payload) } func (o *InternalV1StorageRegionsStoragePoolsGetNotFound) String() string { - return fmt.Sprintf("[GET /internal/v1/storage/regions/{region_zone_id}/storage-pools/{storage_pool_name}][%d] internalV1StorageRegionsStoragePoolsGetNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /internal/v1/storage/regions/{region_zone_id}/storage-pools/{storage_pool_name}][%d] internalV1StorageRegionsStoragePoolsGetNotFound %s", 404, payload) } func (o *InternalV1StorageRegionsStoragePoolsGetNotFound) GetPayload() *models.Error { @@ -373,11 +382,13 @@ func (o *InternalV1StorageRegionsStoragePoolsGetInternalServerError) Code() int } func (o *InternalV1StorageRegionsStoragePoolsGetInternalServerError) Error() string { - return fmt.Sprintf("[GET /internal/v1/storage/regions/{region_zone_id}/storage-pools/{storage_pool_name}][%d] internalV1StorageRegionsStoragePoolsGetInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /internal/v1/storage/regions/{region_zone_id}/storage-pools/{storage_pool_name}][%d] internalV1StorageRegionsStoragePoolsGetInternalServerError %s", 500, payload) } func (o *InternalV1StorageRegionsStoragePoolsGetInternalServerError) String() string { - return fmt.Sprintf("[GET /internal/v1/storage/regions/{region_zone_id}/storage-pools/{storage_pool_name}][%d] internalV1StorageRegionsStoragePoolsGetInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /internal/v1/storage/regions/{region_zone_id}/storage-pools/{storage_pool_name}][%d] internalV1StorageRegionsStoragePoolsGetInternalServerError %s", 500, payload) } func (o *InternalV1StorageRegionsStoragePoolsGetInternalServerError) GetPayload() *models.Error { diff --git a/power/client/internal_storage_regions/internal_v1_storage_regions_storage_pools_getall_responses.go b/power/client/internal_storage_regions/internal_v1_storage_regions_storage_pools_getall_responses.go index 43e5acda..ce6a4ac2 100644 --- a/power/client/internal_storage_regions/internal_v1_storage_regions_storage_pools_getall_responses.go +++ b/power/client/internal_storage_regions/internal_v1_storage_regions_storage_pools_getall_responses.go @@ -6,6 +6,7 @@ package internal_storage_regions // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -103,11 +104,13 @@ func (o *InternalV1StorageRegionsStoragePoolsGetallOK) Code() int { } func (o *InternalV1StorageRegionsStoragePoolsGetallOK) Error() string { - return fmt.Sprintf("[GET /internal/v1/storage/regions/{region_zone_id}/storage-pools][%d] internalV1StorageRegionsStoragePoolsGetallOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /internal/v1/storage/regions/{region_zone_id}/storage-pools][%d] internalV1StorageRegionsStoragePoolsGetallOK %s", 200, payload) } func (o *InternalV1StorageRegionsStoragePoolsGetallOK) String() string { - return fmt.Sprintf("[GET /internal/v1/storage/regions/{region_zone_id}/storage-pools][%d] internalV1StorageRegionsStoragePoolsGetallOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /internal/v1/storage/regions/{region_zone_id}/storage-pools][%d] internalV1StorageRegionsStoragePoolsGetallOK %s", 200, payload) } func (o *InternalV1StorageRegionsStoragePoolsGetallOK) GetPayload() models.StoragePools { @@ -169,11 +172,13 @@ func (o *InternalV1StorageRegionsStoragePoolsGetallUnauthorized) Code() int { } func (o *InternalV1StorageRegionsStoragePoolsGetallUnauthorized) Error() string { - return fmt.Sprintf("[GET /internal/v1/storage/regions/{region_zone_id}/storage-pools][%d] internalV1StorageRegionsStoragePoolsGetallUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /internal/v1/storage/regions/{region_zone_id}/storage-pools][%d] internalV1StorageRegionsStoragePoolsGetallUnauthorized %s", 401, payload) } func (o *InternalV1StorageRegionsStoragePoolsGetallUnauthorized) String() string { - return fmt.Sprintf("[GET /internal/v1/storage/regions/{region_zone_id}/storage-pools][%d] internalV1StorageRegionsStoragePoolsGetallUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /internal/v1/storage/regions/{region_zone_id}/storage-pools][%d] internalV1StorageRegionsStoragePoolsGetallUnauthorized %s", 401, payload) } func (o *InternalV1StorageRegionsStoragePoolsGetallUnauthorized) GetPayload() *models.Error { @@ -237,11 +242,13 @@ func (o *InternalV1StorageRegionsStoragePoolsGetallForbidden) Code() int { } func (o *InternalV1StorageRegionsStoragePoolsGetallForbidden) Error() string { - return fmt.Sprintf("[GET /internal/v1/storage/regions/{region_zone_id}/storage-pools][%d] internalV1StorageRegionsStoragePoolsGetallForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /internal/v1/storage/regions/{region_zone_id}/storage-pools][%d] internalV1StorageRegionsStoragePoolsGetallForbidden %s", 403, payload) } func (o *InternalV1StorageRegionsStoragePoolsGetallForbidden) String() string { - return fmt.Sprintf("[GET /internal/v1/storage/regions/{region_zone_id}/storage-pools][%d] internalV1StorageRegionsStoragePoolsGetallForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /internal/v1/storage/regions/{region_zone_id}/storage-pools][%d] internalV1StorageRegionsStoragePoolsGetallForbidden %s", 403, payload) } func (o *InternalV1StorageRegionsStoragePoolsGetallForbidden) GetPayload() *models.Error { @@ -305,11 +312,13 @@ func (o *InternalV1StorageRegionsStoragePoolsGetallNotFound) Code() int { } func (o *InternalV1StorageRegionsStoragePoolsGetallNotFound) Error() string { - return fmt.Sprintf("[GET /internal/v1/storage/regions/{region_zone_id}/storage-pools][%d] internalV1StorageRegionsStoragePoolsGetallNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /internal/v1/storage/regions/{region_zone_id}/storage-pools][%d] internalV1StorageRegionsStoragePoolsGetallNotFound %s", 404, payload) } func (o *InternalV1StorageRegionsStoragePoolsGetallNotFound) String() string { - return fmt.Sprintf("[GET /internal/v1/storage/regions/{region_zone_id}/storage-pools][%d] internalV1StorageRegionsStoragePoolsGetallNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /internal/v1/storage/regions/{region_zone_id}/storage-pools][%d] internalV1StorageRegionsStoragePoolsGetallNotFound %s", 404, payload) } func (o *InternalV1StorageRegionsStoragePoolsGetallNotFound) GetPayload() *models.Error { @@ -373,11 +382,13 @@ func (o *InternalV1StorageRegionsStoragePoolsGetallInternalServerError) Code() i } func (o *InternalV1StorageRegionsStoragePoolsGetallInternalServerError) Error() string { - return fmt.Sprintf("[GET /internal/v1/storage/regions/{region_zone_id}/storage-pools][%d] internalV1StorageRegionsStoragePoolsGetallInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /internal/v1/storage/regions/{region_zone_id}/storage-pools][%d] internalV1StorageRegionsStoragePoolsGetallInternalServerError %s", 500, payload) } func (o *InternalV1StorageRegionsStoragePoolsGetallInternalServerError) String() string { - return fmt.Sprintf("[GET /internal/v1/storage/regions/{region_zone_id}/storage-pools][%d] internalV1StorageRegionsStoragePoolsGetallInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /internal/v1/storage/regions/{region_zone_id}/storage-pools][%d] internalV1StorageRegionsStoragePoolsGetallInternalServerError %s", 500, payload) } func (o *InternalV1StorageRegionsStoragePoolsGetallInternalServerError) GetPayload() *models.Error { diff --git a/power/client/internal_storage_regions/internal_v1_storage_regions_storage_pools_put_responses.go b/power/client/internal_storage_regions/internal_v1_storage_regions_storage_pools_put_responses.go index 6df8bdf3..f2957229 100644 --- a/power/client/internal_storage_regions/internal_v1_storage_regions_storage_pools_put_responses.go +++ b/power/client/internal_storage_regions/internal_v1_storage_regions_storage_pools_put_responses.go @@ -6,6 +6,7 @@ package internal_storage_regions // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -109,11 +110,13 @@ func (o *InternalV1StorageRegionsStoragePoolsPutOK) Code() int { } func (o *InternalV1StorageRegionsStoragePoolsPutOK) Error() string { - return fmt.Sprintf("[PUT /internal/v1/storage/regions/{region_zone_id}/storage-pools/{storage_pool_name}][%d] internalV1StorageRegionsStoragePoolsPutOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /internal/v1/storage/regions/{region_zone_id}/storage-pools/{storage_pool_name}][%d] internalV1StorageRegionsStoragePoolsPutOK %s", 200, payload) } func (o *InternalV1StorageRegionsStoragePoolsPutOK) String() string { - return fmt.Sprintf("[PUT /internal/v1/storage/regions/{region_zone_id}/storage-pools/{storage_pool_name}][%d] internalV1StorageRegionsStoragePoolsPutOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /internal/v1/storage/regions/{region_zone_id}/storage-pools/{storage_pool_name}][%d] internalV1StorageRegionsStoragePoolsPutOK %s", 200, payload) } func (o *InternalV1StorageRegionsStoragePoolsPutOK) GetPayload() *models.StoragePool { @@ -177,11 +180,13 @@ func (o *InternalV1StorageRegionsStoragePoolsPutBadRequest) Code() int { } func (o *InternalV1StorageRegionsStoragePoolsPutBadRequest) Error() string { - return fmt.Sprintf("[PUT /internal/v1/storage/regions/{region_zone_id}/storage-pools/{storage_pool_name}][%d] internalV1StorageRegionsStoragePoolsPutBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /internal/v1/storage/regions/{region_zone_id}/storage-pools/{storage_pool_name}][%d] internalV1StorageRegionsStoragePoolsPutBadRequest %s", 400, payload) } func (o *InternalV1StorageRegionsStoragePoolsPutBadRequest) String() string { - return fmt.Sprintf("[PUT /internal/v1/storage/regions/{region_zone_id}/storage-pools/{storage_pool_name}][%d] internalV1StorageRegionsStoragePoolsPutBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /internal/v1/storage/regions/{region_zone_id}/storage-pools/{storage_pool_name}][%d] internalV1StorageRegionsStoragePoolsPutBadRequest %s", 400, payload) } func (o *InternalV1StorageRegionsStoragePoolsPutBadRequest) GetPayload() *models.Error { @@ -245,11 +250,13 @@ func (o *InternalV1StorageRegionsStoragePoolsPutUnauthorized) Code() int { } func (o *InternalV1StorageRegionsStoragePoolsPutUnauthorized) Error() string { - return fmt.Sprintf("[PUT /internal/v1/storage/regions/{region_zone_id}/storage-pools/{storage_pool_name}][%d] internalV1StorageRegionsStoragePoolsPutUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /internal/v1/storage/regions/{region_zone_id}/storage-pools/{storage_pool_name}][%d] internalV1StorageRegionsStoragePoolsPutUnauthorized %s", 401, payload) } func (o *InternalV1StorageRegionsStoragePoolsPutUnauthorized) String() string { - return fmt.Sprintf("[PUT /internal/v1/storage/regions/{region_zone_id}/storage-pools/{storage_pool_name}][%d] internalV1StorageRegionsStoragePoolsPutUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /internal/v1/storage/regions/{region_zone_id}/storage-pools/{storage_pool_name}][%d] internalV1StorageRegionsStoragePoolsPutUnauthorized %s", 401, payload) } func (o *InternalV1StorageRegionsStoragePoolsPutUnauthorized) GetPayload() *models.Error { @@ -313,11 +320,13 @@ func (o *InternalV1StorageRegionsStoragePoolsPutForbidden) Code() int { } func (o *InternalV1StorageRegionsStoragePoolsPutForbidden) Error() string { - return fmt.Sprintf("[PUT /internal/v1/storage/regions/{region_zone_id}/storage-pools/{storage_pool_name}][%d] internalV1StorageRegionsStoragePoolsPutForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /internal/v1/storage/regions/{region_zone_id}/storage-pools/{storage_pool_name}][%d] internalV1StorageRegionsStoragePoolsPutForbidden %s", 403, payload) } func (o *InternalV1StorageRegionsStoragePoolsPutForbidden) String() string { - return fmt.Sprintf("[PUT /internal/v1/storage/regions/{region_zone_id}/storage-pools/{storage_pool_name}][%d] internalV1StorageRegionsStoragePoolsPutForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /internal/v1/storage/regions/{region_zone_id}/storage-pools/{storage_pool_name}][%d] internalV1StorageRegionsStoragePoolsPutForbidden %s", 403, payload) } func (o *InternalV1StorageRegionsStoragePoolsPutForbidden) GetPayload() *models.Error { @@ -381,11 +390,13 @@ func (o *InternalV1StorageRegionsStoragePoolsPutNotFound) Code() int { } func (o *InternalV1StorageRegionsStoragePoolsPutNotFound) Error() string { - return fmt.Sprintf("[PUT /internal/v1/storage/regions/{region_zone_id}/storage-pools/{storage_pool_name}][%d] internalV1StorageRegionsStoragePoolsPutNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /internal/v1/storage/regions/{region_zone_id}/storage-pools/{storage_pool_name}][%d] internalV1StorageRegionsStoragePoolsPutNotFound %s", 404, payload) } func (o *InternalV1StorageRegionsStoragePoolsPutNotFound) String() string { - return fmt.Sprintf("[PUT /internal/v1/storage/regions/{region_zone_id}/storage-pools/{storage_pool_name}][%d] internalV1StorageRegionsStoragePoolsPutNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /internal/v1/storage/regions/{region_zone_id}/storage-pools/{storage_pool_name}][%d] internalV1StorageRegionsStoragePoolsPutNotFound %s", 404, payload) } func (o *InternalV1StorageRegionsStoragePoolsPutNotFound) GetPayload() *models.Error { @@ -449,11 +460,13 @@ func (o *InternalV1StorageRegionsStoragePoolsPutInternalServerError) Code() int } func (o *InternalV1StorageRegionsStoragePoolsPutInternalServerError) Error() string { - return fmt.Sprintf("[PUT /internal/v1/storage/regions/{region_zone_id}/storage-pools/{storage_pool_name}][%d] internalV1StorageRegionsStoragePoolsPutInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /internal/v1/storage/regions/{region_zone_id}/storage-pools/{storage_pool_name}][%d] internalV1StorageRegionsStoragePoolsPutInternalServerError %s", 500, payload) } func (o *InternalV1StorageRegionsStoragePoolsPutInternalServerError) String() string { - return fmt.Sprintf("[PUT /internal/v1/storage/regions/{region_zone_id}/storage-pools/{storage_pool_name}][%d] internalV1StorageRegionsStoragePoolsPutInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /internal/v1/storage/regions/{region_zone_id}/storage-pools/{storage_pool_name}][%d] internalV1StorageRegionsStoragePoolsPutInternalServerError %s", 500, payload) } func (o *InternalV1StorageRegionsStoragePoolsPutInternalServerError) GetPayload() *models.Error { diff --git a/power/client/internal_storage_regions/internal_v1_storage_regions_thresholds_get_responses.go b/power/client/internal_storage_regions/internal_v1_storage_regions_thresholds_get_responses.go index 0dd69444..84e6ef2f 100644 --- a/power/client/internal_storage_regions/internal_v1_storage_regions_thresholds_get_responses.go +++ b/power/client/internal_storage_regions/internal_v1_storage_regions_thresholds_get_responses.go @@ -6,6 +6,7 @@ package internal_storage_regions // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -103,11 +104,13 @@ func (o *InternalV1StorageRegionsThresholdsGetOK) Code() int { } func (o *InternalV1StorageRegionsThresholdsGetOK) Error() string { - return fmt.Sprintf("[GET /internal/v1/storage/regions/{region_zone_id}/thresholds][%d] internalV1StorageRegionsThresholdsGetOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /internal/v1/storage/regions/{region_zone_id}/thresholds][%d] internalV1StorageRegionsThresholdsGetOK %s", 200, payload) } func (o *InternalV1StorageRegionsThresholdsGetOK) String() string { - return fmt.Sprintf("[GET /internal/v1/storage/regions/{region_zone_id}/thresholds][%d] internalV1StorageRegionsThresholdsGetOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /internal/v1/storage/regions/{region_zone_id}/thresholds][%d] internalV1StorageRegionsThresholdsGetOK %s", 200, payload) } func (o *InternalV1StorageRegionsThresholdsGetOK) GetPayload() *models.Thresholds { @@ -171,11 +174,13 @@ func (o *InternalV1StorageRegionsThresholdsGetUnauthorized) Code() int { } func (o *InternalV1StorageRegionsThresholdsGetUnauthorized) Error() string { - return fmt.Sprintf("[GET /internal/v1/storage/regions/{region_zone_id}/thresholds][%d] internalV1StorageRegionsThresholdsGetUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /internal/v1/storage/regions/{region_zone_id}/thresholds][%d] internalV1StorageRegionsThresholdsGetUnauthorized %s", 401, payload) } func (o *InternalV1StorageRegionsThresholdsGetUnauthorized) String() string { - return fmt.Sprintf("[GET /internal/v1/storage/regions/{region_zone_id}/thresholds][%d] internalV1StorageRegionsThresholdsGetUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /internal/v1/storage/regions/{region_zone_id}/thresholds][%d] internalV1StorageRegionsThresholdsGetUnauthorized %s", 401, payload) } func (o *InternalV1StorageRegionsThresholdsGetUnauthorized) GetPayload() *models.Error { @@ -239,11 +244,13 @@ func (o *InternalV1StorageRegionsThresholdsGetForbidden) Code() int { } func (o *InternalV1StorageRegionsThresholdsGetForbidden) Error() string { - return fmt.Sprintf("[GET /internal/v1/storage/regions/{region_zone_id}/thresholds][%d] internalV1StorageRegionsThresholdsGetForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /internal/v1/storage/regions/{region_zone_id}/thresholds][%d] internalV1StorageRegionsThresholdsGetForbidden %s", 403, payload) } func (o *InternalV1StorageRegionsThresholdsGetForbidden) String() string { - return fmt.Sprintf("[GET /internal/v1/storage/regions/{region_zone_id}/thresholds][%d] internalV1StorageRegionsThresholdsGetForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /internal/v1/storage/regions/{region_zone_id}/thresholds][%d] internalV1StorageRegionsThresholdsGetForbidden %s", 403, payload) } func (o *InternalV1StorageRegionsThresholdsGetForbidden) GetPayload() *models.Error { @@ -307,11 +314,13 @@ func (o *InternalV1StorageRegionsThresholdsGetNotFound) Code() int { } func (o *InternalV1StorageRegionsThresholdsGetNotFound) Error() string { - return fmt.Sprintf("[GET /internal/v1/storage/regions/{region_zone_id}/thresholds][%d] internalV1StorageRegionsThresholdsGetNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /internal/v1/storage/regions/{region_zone_id}/thresholds][%d] internalV1StorageRegionsThresholdsGetNotFound %s", 404, payload) } func (o *InternalV1StorageRegionsThresholdsGetNotFound) String() string { - return fmt.Sprintf("[GET /internal/v1/storage/regions/{region_zone_id}/thresholds][%d] internalV1StorageRegionsThresholdsGetNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /internal/v1/storage/regions/{region_zone_id}/thresholds][%d] internalV1StorageRegionsThresholdsGetNotFound %s", 404, payload) } func (o *InternalV1StorageRegionsThresholdsGetNotFound) GetPayload() *models.Error { @@ -375,11 +384,13 @@ func (o *InternalV1StorageRegionsThresholdsGetInternalServerError) Code() int { } func (o *InternalV1StorageRegionsThresholdsGetInternalServerError) Error() string { - return fmt.Sprintf("[GET /internal/v1/storage/regions/{region_zone_id}/thresholds][%d] internalV1StorageRegionsThresholdsGetInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /internal/v1/storage/regions/{region_zone_id}/thresholds][%d] internalV1StorageRegionsThresholdsGetInternalServerError %s", 500, payload) } func (o *InternalV1StorageRegionsThresholdsGetInternalServerError) String() string { - return fmt.Sprintf("[GET /internal/v1/storage/regions/{region_zone_id}/thresholds][%d] internalV1StorageRegionsThresholdsGetInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /internal/v1/storage/regions/{region_zone_id}/thresholds][%d] internalV1StorageRegionsThresholdsGetInternalServerError %s", 500, payload) } func (o *InternalV1StorageRegionsThresholdsGetInternalServerError) GetPayload() *models.Error { diff --git a/power/client/internal_storage_regions/internal_v1_storage_regions_thresholds_put_responses.go b/power/client/internal_storage_regions/internal_v1_storage_regions_thresholds_put_responses.go index c52a3f2b..bdb8682e 100644 --- a/power/client/internal_storage_regions/internal_v1_storage_regions_thresholds_put_responses.go +++ b/power/client/internal_storage_regions/internal_v1_storage_regions_thresholds_put_responses.go @@ -6,6 +6,7 @@ package internal_storage_regions // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -115,11 +116,13 @@ func (o *InternalV1StorageRegionsThresholdsPutAccepted) Code() int { } func (o *InternalV1StorageRegionsThresholdsPutAccepted) Error() string { - return fmt.Sprintf("[PUT /internal/v1/storage/regions/{region_zone_id}/thresholds][%d] internalV1StorageRegionsThresholdsPutAccepted %+v", 202, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /internal/v1/storage/regions/{region_zone_id}/thresholds][%d] internalV1StorageRegionsThresholdsPutAccepted %s", 202, payload) } func (o *InternalV1StorageRegionsThresholdsPutAccepted) String() string { - return fmt.Sprintf("[PUT /internal/v1/storage/regions/{region_zone_id}/thresholds][%d] internalV1StorageRegionsThresholdsPutAccepted %+v", 202, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /internal/v1/storage/regions/{region_zone_id}/thresholds][%d] internalV1StorageRegionsThresholdsPutAccepted %s", 202, payload) } func (o *InternalV1StorageRegionsThresholdsPutAccepted) GetPayload() *models.Thresholds { @@ -183,11 +186,13 @@ func (o *InternalV1StorageRegionsThresholdsPutBadRequest) Code() int { } func (o *InternalV1StorageRegionsThresholdsPutBadRequest) Error() string { - return fmt.Sprintf("[PUT /internal/v1/storage/regions/{region_zone_id}/thresholds][%d] internalV1StorageRegionsThresholdsPutBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /internal/v1/storage/regions/{region_zone_id}/thresholds][%d] internalV1StorageRegionsThresholdsPutBadRequest %s", 400, payload) } func (o *InternalV1StorageRegionsThresholdsPutBadRequest) String() string { - return fmt.Sprintf("[PUT /internal/v1/storage/regions/{region_zone_id}/thresholds][%d] internalV1StorageRegionsThresholdsPutBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /internal/v1/storage/regions/{region_zone_id}/thresholds][%d] internalV1StorageRegionsThresholdsPutBadRequest %s", 400, payload) } func (o *InternalV1StorageRegionsThresholdsPutBadRequest) GetPayload() *models.Error { @@ -251,11 +256,13 @@ func (o *InternalV1StorageRegionsThresholdsPutUnauthorized) Code() int { } func (o *InternalV1StorageRegionsThresholdsPutUnauthorized) Error() string { - return fmt.Sprintf("[PUT /internal/v1/storage/regions/{region_zone_id}/thresholds][%d] internalV1StorageRegionsThresholdsPutUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /internal/v1/storage/regions/{region_zone_id}/thresholds][%d] internalV1StorageRegionsThresholdsPutUnauthorized %s", 401, payload) } func (o *InternalV1StorageRegionsThresholdsPutUnauthorized) String() string { - return fmt.Sprintf("[PUT /internal/v1/storage/regions/{region_zone_id}/thresholds][%d] internalV1StorageRegionsThresholdsPutUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /internal/v1/storage/regions/{region_zone_id}/thresholds][%d] internalV1StorageRegionsThresholdsPutUnauthorized %s", 401, payload) } func (o *InternalV1StorageRegionsThresholdsPutUnauthorized) GetPayload() *models.Error { @@ -319,11 +326,13 @@ func (o *InternalV1StorageRegionsThresholdsPutForbidden) Code() int { } func (o *InternalV1StorageRegionsThresholdsPutForbidden) Error() string { - return fmt.Sprintf("[PUT /internal/v1/storage/regions/{region_zone_id}/thresholds][%d] internalV1StorageRegionsThresholdsPutForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /internal/v1/storage/regions/{region_zone_id}/thresholds][%d] internalV1StorageRegionsThresholdsPutForbidden %s", 403, payload) } func (o *InternalV1StorageRegionsThresholdsPutForbidden) String() string { - return fmt.Sprintf("[PUT /internal/v1/storage/regions/{region_zone_id}/thresholds][%d] internalV1StorageRegionsThresholdsPutForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /internal/v1/storage/regions/{region_zone_id}/thresholds][%d] internalV1StorageRegionsThresholdsPutForbidden %s", 403, payload) } func (o *InternalV1StorageRegionsThresholdsPutForbidden) GetPayload() *models.Error { @@ -387,11 +396,13 @@ func (o *InternalV1StorageRegionsThresholdsPutConflict) Code() int { } func (o *InternalV1StorageRegionsThresholdsPutConflict) Error() string { - return fmt.Sprintf("[PUT /internal/v1/storage/regions/{region_zone_id}/thresholds][%d] internalV1StorageRegionsThresholdsPutConflict %+v", 409, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /internal/v1/storage/regions/{region_zone_id}/thresholds][%d] internalV1StorageRegionsThresholdsPutConflict %s", 409, payload) } func (o *InternalV1StorageRegionsThresholdsPutConflict) String() string { - return fmt.Sprintf("[PUT /internal/v1/storage/regions/{region_zone_id}/thresholds][%d] internalV1StorageRegionsThresholdsPutConflict %+v", 409, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /internal/v1/storage/regions/{region_zone_id}/thresholds][%d] internalV1StorageRegionsThresholdsPutConflict %s", 409, payload) } func (o *InternalV1StorageRegionsThresholdsPutConflict) GetPayload() *models.Error { @@ -455,11 +466,13 @@ func (o *InternalV1StorageRegionsThresholdsPutUnprocessableEntity) Code() int { } func (o *InternalV1StorageRegionsThresholdsPutUnprocessableEntity) Error() string { - return fmt.Sprintf("[PUT /internal/v1/storage/regions/{region_zone_id}/thresholds][%d] internalV1StorageRegionsThresholdsPutUnprocessableEntity %+v", 422, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /internal/v1/storage/regions/{region_zone_id}/thresholds][%d] internalV1StorageRegionsThresholdsPutUnprocessableEntity %s", 422, payload) } func (o *InternalV1StorageRegionsThresholdsPutUnprocessableEntity) String() string { - return fmt.Sprintf("[PUT /internal/v1/storage/regions/{region_zone_id}/thresholds][%d] internalV1StorageRegionsThresholdsPutUnprocessableEntity %+v", 422, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /internal/v1/storage/regions/{region_zone_id}/thresholds][%d] internalV1StorageRegionsThresholdsPutUnprocessableEntity %s", 422, payload) } func (o *InternalV1StorageRegionsThresholdsPutUnprocessableEntity) GetPayload() *models.Error { @@ -523,11 +536,13 @@ func (o *InternalV1StorageRegionsThresholdsPutInternalServerError) Code() int { } func (o *InternalV1StorageRegionsThresholdsPutInternalServerError) Error() string { - return fmt.Sprintf("[PUT /internal/v1/storage/regions/{region_zone_id}/thresholds][%d] internalV1StorageRegionsThresholdsPutInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /internal/v1/storage/regions/{region_zone_id}/thresholds][%d] internalV1StorageRegionsThresholdsPutInternalServerError %s", 500, payload) } func (o *InternalV1StorageRegionsThresholdsPutInternalServerError) String() string { - return fmt.Sprintf("[PUT /internal/v1/storage/regions/{region_zone_id}/thresholds][%d] internalV1StorageRegionsThresholdsPutInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /internal/v1/storage/regions/{region_zone_id}/thresholds][%d] internalV1StorageRegionsThresholdsPutInternalServerError %s", 500, payload) } func (o *InternalV1StorageRegionsThresholdsPutInternalServerError) GetPayload() *models.Error { diff --git a/power/client/internal_transit_gateway/internal_transit_gateway_client.go b/power/client/internal_transit_gateway/internal_transit_gateway_client.go index 7e54f6c3..98f09bfb 100644 --- a/power/client/internal_transit_gateway/internal_transit_gateway_client.go +++ b/power/client/internal_transit_gateway/internal_transit_gateway_client.go @@ -9,6 +9,7 @@ import ( "fmt" "github.com/go-openapi/runtime" + httptransport "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" ) @@ -17,6 +18,31 @@ func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientServi return &Client{transport: transport, formats: formats} } +// New creates a new internal transit gateway API client with basic auth credentials. +// It takes the following parameters: +// - host: http host (github.com). +// - basePath: any base path for the API client ("/v1", "/v3"). +// - scheme: http scheme ("http", "https"). +// - user: user for basic authentication header. +// - password: password for basic authentication header. +func NewClientWithBasicAuth(host, basePath, scheme, user, password string) ClientService { + transport := httptransport.New(host, basePath, []string{scheme}) + transport.DefaultAuthentication = httptransport.BasicAuth(user, password) + return &Client{transport: transport, formats: strfmt.Default} +} + +// New creates a new internal transit gateway API client with a bearer token for authentication. +// It takes the following parameters: +// - host: http host (github.com). +// - basePath: any base path for the API client ("/v1", "/v3"). +// - scheme: http scheme ("http", "https"). +// - bearerToken: bearer token for Bearer authentication header. +func NewClientWithBearerToken(host, basePath, scheme, bearerToken string) ClientService { + transport := httptransport.New(host, basePath, []string{scheme}) + transport.DefaultAuthentication = httptransport.BearerToken(bearerToken) + return &Client{transport: transport, formats: strfmt.Default} +} + /* Client for internal transit gateway API */ @@ -25,7 +51,7 @@ type Client struct { formats strfmt.Registry } -// ClientOption is the option for Client methods +// ClientOption may be used to customize the behavior of Client methods. type ClientOption func(*runtime.ClientOperation) // ClientService is the interface for Client methods diff --git a/power/client/internal_transit_gateway/internal_v1_transitgateway_get_responses.go b/power/client/internal_transit_gateway/internal_v1_transitgateway_get_responses.go index e39c82b9..bfb08462 100644 --- a/power/client/internal_transit_gateway/internal_v1_transitgateway_get_responses.go +++ b/power/client/internal_transit_gateway/internal_v1_transitgateway_get_responses.go @@ -6,6 +6,7 @@ package internal_transit_gateway // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -85,11 +86,13 @@ func (o *InternalV1TransitgatewayGetOK) Code() int { } func (o *InternalV1TransitgatewayGetOK) Error() string { - return fmt.Sprintf("[GET /internal/v1/transit-gateway/{powervs_service_crn}][%d] internalV1TransitgatewayGetOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /internal/v1/transit-gateway/{powervs_service_crn}][%d] internalV1TransitgatewayGetOK %s", 200, payload) } func (o *InternalV1TransitgatewayGetOK) String() string { - return fmt.Sprintf("[GET /internal/v1/transit-gateway/{powervs_service_crn}][%d] internalV1TransitgatewayGetOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /internal/v1/transit-gateway/{powervs_service_crn}][%d] internalV1TransitgatewayGetOK %s", 200, payload) } func (o *InternalV1TransitgatewayGetOK) GetPayload() *models.TransitGatewayInstance { @@ -153,11 +156,13 @@ func (o *InternalV1TransitgatewayGetForbidden) Code() int { } func (o *InternalV1TransitgatewayGetForbidden) Error() string { - return fmt.Sprintf("[GET /internal/v1/transit-gateway/{powervs_service_crn}][%d] internalV1TransitgatewayGetForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /internal/v1/transit-gateway/{powervs_service_crn}][%d] internalV1TransitgatewayGetForbidden %s", 403, payload) } func (o *InternalV1TransitgatewayGetForbidden) String() string { - return fmt.Sprintf("[GET /internal/v1/transit-gateway/{powervs_service_crn}][%d] internalV1TransitgatewayGetForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /internal/v1/transit-gateway/{powervs_service_crn}][%d] internalV1TransitgatewayGetForbidden %s", 403, payload) } func (o *InternalV1TransitgatewayGetForbidden) GetPayload() *models.Error { diff --git a/power/client/open_stacks/open_stacks_client.go b/power/client/open_stacks/open_stacks_client.go index 7cce851e..2d2f3f66 100644 --- a/power/client/open_stacks/open_stacks_client.go +++ b/power/client/open_stacks/open_stacks_client.go @@ -9,6 +9,7 @@ import ( "fmt" "github.com/go-openapi/runtime" + httptransport "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" ) @@ -17,6 +18,31 @@ func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientServi return &Client{transport: transport, formats: formats} } +// New creates a new open stacks API client with basic auth credentials. +// It takes the following parameters: +// - host: http host (github.com). +// - basePath: any base path for the API client ("/v1", "/v3"). +// - scheme: http scheme ("http", "https"). +// - user: user for basic authentication header. +// - password: password for basic authentication header. +func NewClientWithBasicAuth(host, basePath, scheme, user, password string) ClientService { + transport := httptransport.New(host, basePath, []string{scheme}) + transport.DefaultAuthentication = httptransport.BasicAuth(user, password) + return &Client{transport: transport, formats: strfmt.Default} +} + +// New creates a new open stacks API client with a bearer token for authentication. +// It takes the following parameters: +// - host: http host (github.com). +// - basePath: any base path for the API client ("/v1", "/v3"). +// - scheme: http scheme ("http", "https"). +// - bearerToken: bearer token for Bearer authentication header. +func NewClientWithBearerToken(host, basePath, scheme, bearerToken string) ClientService { + transport := httptransport.New(host, basePath, []string{scheme}) + transport.DefaultAuthentication = httptransport.BearerToken(bearerToken) + return &Client{transport: transport, formats: strfmt.Default} +} + /* Client for open stacks API */ @@ -25,7 +51,7 @@ type Client struct { formats strfmt.Registry } -// ClientOption is the option for Client methods +// ClientOption may be used to customize the behavior of Client methods. type ClientOption func(*runtime.ClientOperation) // ClientService is the interface for Client methods diff --git a/power/client/open_stacks/service_broker_openstacks_get_responses.go b/power/client/open_stacks/service_broker_openstacks_get_responses.go index 4dc173d8..f60ec26e 100644 --- a/power/client/open_stacks/service_broker_openstacks_get_responses.go +++ b/power/client/open_stacks/service_broker_openstacks_get_responses.go @@ -6,6 +6,7 @@ package open_stacks // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -109,11 +110,13 @@ func (o *ServiceBrokerOpenstacksGetOK) Code() int { } func (o *ServiceBrokerOpenstacksGetOK) Error() string { - return fmt.Sprintf("[GET /broker/v1/openstacks][%d] serviceBrokerOpenstacksGetOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /broker/v1/openstacks][%d] serviceBrokerOpenstacksGetOK %s", 200, payload) } func (o *ServiceBrokerOpenstacksGetOK) String() string { - return fmt.Sprintf("[GET /broker/v1/openstacks][%d] serviceBrokerOpenstacksGetOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /broker/v1/openstacks][%d] serviceBrokerOpenstacksGetOK %s", 200, payload) } func (o *ServiceBrokerOpenstacksGetOK) GetPayload() *models.OpenStacks { @@ -177,11 +180,13 @@ func (o *ServiceBrokerOpenstacksGetBadRequest) Code() int { } func (o *ServiceBrokerOpenstacksGetBadRequest) Error() string { - return fmt.Sprintf("[GET /broker/v1/openstacks][%d] serviceBrokerOpenstacksGetBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /broker/v1/openstacks][%d] serviceBrokerOpenstacksGetBadRequest %s", 400, payload) } func (o *ServiceBrokerOpenstacksGetBadRequest) String() string { - return fmt.Sprintf("[GET /broker/v1/openstacks][%d] serviceBrokerOpenstacksGetBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /broker/v1/openstacks][%d] serviceBrokerOpenstacksGetBadRequest %s", 400, payload) } func (o *ServiceBrokerOpenstacksGetBadRequest) GetPayload() *models.Error { @@ -245,11 +250,13 @@ func (o *ServiceBrokerOpenstacksGetUnauthorized) Code() int { } func (o *ServiceBrokerOpenstacksGetUnauthorized) Error() string { - return fmt.Sprintf("[GET /broker/v1/openstacks][%d] serviceBrokerOpenstacksGetUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /broker/v1/openstacks][%d] serviceBrokerOpenstacksGetUnauthorized %s", 401, payload) } func (o *ServiceBrokerOpenstacksGetUnauthorized) String() string { - return fmt.Sprintf("[GET /broker/v1/openstacks][%d] serviceBrokerOpenstacksGetUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /broker/v1/openstacks][%d] serviceBrokerOpenstacksGetUnauthorized %s", 401, payload) } func (o *ServiceBrokerOpenstacksGetUnauthorized) GetPayload() *models.Error { @@ -313,11 +320,13 @@ func (o *ServiceBrokerOpenstacksGetForbidden) Code() int { } func (o *ServiceBrokerOpenstacksGetForbidden) Error() string { - return fmt.Sprintf("[GET /broker/v1/openstacks][%d] serviceBrokerOpenstacksGetForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /broker/v1/openstacks][%d] serviceBrokerOpenstacksGetForbidden %s", 403, payload) } func (o *ServiceBrokerOpenstacksGetForbidden) String() string { - return fmt.Sprintf("[GET /broker/v1/openstacks][%d] serviceBrokerOpenstacksGetForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /broker/v1/openstacks][%d] serviceBrokerOpenstacksGetForbidden %s", 403, payload) } func (o *ServiceBrokerOpenstacksGetForbidden) GetPayload() *models.Error { @@ -381,11 +390,13 @@ func (o *ServiceBrokerOpenstacksGetNotFound) Code() int { } func (o *ServiceBrokerOpenstacksGetNotFound) Error() string { - return fmt.Sprintf("[GET /broker/v1/openstacks][%d] serviceBrokerOpenstacksGetNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /broker/v1/openstacks][%d] serviceBrokerOpenstacksGetNotFound %s", 404, payload) } func (o *ServiceBrokerOpenstacksGetNotFound) String() string { - return fmt.Sprintf("[GET /broker/v1/openstacks][%d] serviceBrokerOpenstacksGetNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /broker/v1/openstacks][%d] serviceBrokerOpenstacksGetNotFound %s", 404, payload) } func (o *ServiceBrokerOpenstacksGetNotFound) GetPayload() *models.Error { @@ -449,11 +460,13 @@ func (o *ServiceBrokerOpenstacksGetInternalServerError) Code() int { } func (o *ServiceBrokerOpenstacksGetInternalServerError) Error() string { - return fmt.Sprintf("[GET /broker/v1/openstacks][%d] serviceBrokerOpenstacksGetInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /broker/v1/openstacks][%d] serviceBrokerOpenstacksGetInternalServerError %s", 500, payload) } func (o *ServiceBrokerOpenstacksGetInternalServerError) String() string { - return fmt.Sprintf("[GET /broker/v1/openstacks][%d] serviceBrokerOpenstacksGetInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /broker/v1/openstacks][%d] serviceBrokerOpenstacksGetInternalServerError %s", 500, payload) } func (o *ServiceBrokerOpenstacksGetInternalServerError) GetPayload() *models.Error { diff --git a/power/client/open_stacks/service_broker_openstacks_hosts_get_responses.go b/power/client/open_stacks/service_broker_openstacks_hosts_get_responses.go index b7fa6312..fa1ef4d3 100644 --- a/power/client/open_stacks/service_broker_openstacks_hosts_get_responses.go +++ b/power/client/open_stacks/service_broker_openstacks_hosts_get_responses.go @@ -6,6 +6,7 @@ package open_stacks // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -97,11 +98,13 @@ func (o *ServiceBrokerOpenstacksHostsGetOK) Code() int { } func (o *ServiceBrokerOpenstacksHostsGetOK) Error() string { - return fmt.Sprintf("[GET /broker/v1/openstacks/{openstack_id}/hosts/{hostname}][%d] serviceBrokerOpenstacksHostsGetOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /broker/v1/openstacks/{openstack_id}/hosts/{hostname}][%d] serviceBrokerOpenstacksHostsGetOK %s", 200, payload) } func (o *ServiceBrokerOpenstacksHostsGetOK) String() string { - return fmt.Sprintf("[GET /broker/v1/openstacks/{openstack_id}/hosts/{hostname}][%d] serviceBrokerOpenstacksHostsGetOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /broker/v1/openstacks/{openstack_id}/hosts/{hostname}][%d] serviceBrokerOpenstacksHostsGetOK %s", 200, payload) } func (o *ServiceBrokerOpenstacksHostsGetOK) GetPayload() *models.HostInfo { @@ -165,11 +168,13 @@ func (o *ServiceBrokerOpenstacksHostsGetBadRequest) Code() int { } func (o *ServiceBrokerOpenstacksHostsGetBadRequest) Error() string { - return fmt.Sprintf("[GET /broker/v1/openstacks/{openstack_id}/hosts/{hostname}][%d] serviceBrokerOpenstacksHostsGetBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /broker/v1/openstacks/{openstack_id}/hosts/{hostname}][%d] serviceBrokerOpenstacksHostsGetBadRequest %s", 400, payload) } func (o *ServiceBrokerOpenstacksHostsGetBadRequest) String() string { - return fmt.Sprintf("[GET /broker/v1/openstacks/{openstack_id}/hosts/{hostname}][%d] serviceBrokerOpenstacksHostsGetBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /broker/v1/openstacks/{openstack_id}/hosts/{hostname}][%d] serviceBrokerOpenstacksHostsGetBadRequest %s", 400, payload) } func (o *ServiceBrokerOpenstacksHostsGetBadRequest) GetPayload() *models.Error { @@ -233,11 +238,13 @@ func (o *ServiceBrokerOpenstacksHostsGetNotFound) Code() int { } func (o *ServiceBrokerOpenstacksHostsGetNotFound) Error() string { - return fmt.Sprintf("[GET /broker/v1/openstacks/{openstack_id}/hosts/{hostname}][%d] serviceBrokerOpenstacksHostsGetNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /broker/v1/openstacks/{openstack_id}/hosts/{hostname}][%d] serviceBrokerOpenstacksHostsGetNotFound %s", 404, payload) } func (o *ServiceBrokerOpenstacksHostsGetNotFound) String() string { - return fmt.Sprintf("[GET /broker/v1/openstacks/{openstack_id}/hosts/{hostname}][%d] serviceBrokerOpenstacksHostsGetNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /broker/v1/openstacks/{openstack_id}/hosts/{hostname}][%d] serviceBrokerOpenstacksHostsGetNotFound %s", 404, payload) } func (o *ServiceBrokerOpenstacksHostsGetNotFound) GetPayload() *models.Error { @@ -301,11 +308,13 @@ func (o *ServiceBrokerOpenstacksHostsGetInternalServerError) Code() int { } func (o *ServiceBrokerOpenstacksHostsGetInternalServerError) Error() string { - return fmt.Sprintf("[GET /broker/v1/openstacks/{openstack_id}/hosts/{hostname}][%d] serviceBrokerOpenstacksHostsGetInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /broker/v1/openstacks/{openstack_id}/hosts/{hostname}][%d] serviceBrokerOpenstacksHostsGetInternalServerError %s", 500, payload) } func (o *ServiceBrokerOpenstacksHostsGetInternalServerError) String() string { - return fmt.Sprintf("[GET /broker/v1/openstacks/{openstack_id}/hosts/{hostname}][%d] serviceBrokerOpenstacksHostsGetInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /broker/v1/openstacks/{openstack_id}/hosts/{hostname}][%d] serviceBrokerOpenstacksHostsGetInternalServerError %s", 500, payload) } func (o *ServiceBrokerOpenstacksHostsGetInternalServerError) GetPayload() *models.Error { diff --git a/power/client/open_stacks/service_broker_openstacks_openstack_get_responses.go b/power/client/open_stacks/service_broker_openstacks_openstack_get_responses.go index ea4ea262..1586beb5 100644 --- a/power/client/open_stacks/service_broker_openstacks_openstack_get_responses.go +++ b/power/client/open_stacks/service_broker_openstacks_openstack_get_responses.go @@ -6,6 +6,7 @@ package open_stacks // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -109,11 +110,13 @@ func (o *ServiceBrokerOpenstacksOpenstackGetOK) Code() int { } func (o *ServiceBrokerOpenstacksOpenstackGetOK) Error() string { - return fmt.Sprintf("[GET /broker/v1/openstacks/{openstack_id}][%d] serviceBrokerOpenstacksOpenstackGetOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /broker/v1/openstacks/{openstack_id}][%d] serviceBrokerOpenstacksOpenstackGetOK %s", 200, payload) } func (o *ServiceBrokerOpenstacksOpenstackGetOK) String() string { - return fmt.Sprintf("[GET /broker/v1/openstacks/{openstack_id}][%d] serviceBrokerOpenstacksOpenstackGetOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /broker/v1/openstacks/{openstack_id}][%d] serviceBrokerOpenstacksOpenstackGetOK %s", 200, payload) } func (o *ServiceBrokerOpenstacksOpenstackGetOK) GetPayload() *models.OpenStackInfo { @@ -177,11 +180,13 @@ func (o *ServiceBrokerOpenstacksOpenstackGetBadRequest) Code() int { } func (o *ServiceBrokerOpenstacksOpenstackGetBadRequest) Error() string { - return fmt.Sprintf("[GET /broker/v1/openstacks/{openstack_id}][%d] serviceBrokerOpenstacksOpenstackGetBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /broker/v1/openstacks/{openstack_id}][%d] serviceBrokerOpenstacksOpenstackGetBadRequest %s", 400, payload) } func (o *ServiceBrokerOpenstacksOpenstackGetBadRequest) String() string { - return fmt.Sprintf("[GET /broker/v1/openstacks/{openstack_id}][%d] serviceBrokerOpenstacksOpenstackGetBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /broker/v1/openstacks/{openstack_id}][%d] serviceBrokerOpenstacksOpenstackGetBadRequest %s", 400, payload) } func (o *ServiceBrokerOpenstacksOpenstackGetBadRequest) GetPayload() *models.Error { @@ -245,11 +250,13 @@ func (o *ServiceBrokerOpenstacksOpenstackGetUnauthorized) Code() int { } func (o *ServiceBrokerOpenstacksOpenstackGetUnauthorized) Error() string { - return fmt.Sprintf("[GET /broker/v1/openstacks/{openstack_id}][%d] serviceBrokerOpenstacksOpenstackGetUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /broker/v1/openstacks/{openstack_id}][%d] serviceBrokerOpenstacksOpenstackGetUnauthorized %s", 401, payload) } func (o *ServiceBrokerOpenstacksOpenstackGetUnauthorized) String() string { - return fmt.Sprintf("[GET /broker/v1/openstacks/{openstack_id}][%d] serviceBrokerOpenstacksOpenstackGetUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /broker/v1/openstacks/{openstack_id}][%d] serviceBrokerOpenstacksOpenstackGetUnauthorized %s", 401, payload) } func (o *ServiceBrokerOpenstacksOpenstackGetUnauthorized) GetPayload() *models.Error { @@ -313,11 +320,13 @@ func (o *ServiceBrokerOpenstacksOpenstackGetForbidden) Code() int { } func (o *ServiceBrokerOpenstacksOpenstackGetForbidden) Error() string { - return fmt.Sprintf("[GET /broker/v1/openstacks/{openstack_id}][%d] serviceBrokerOpenstacksOpenstackGetForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /broker/v1/openstacks/{openstack_id}][%d] serviceBrokerOpenstacksOpenstackGetForbidden %s", 403, payload) } func (o *ServiceBrokerOpenstacksOpenstackGetForbidden) String() string { - return fmt.Sprintf("[GET /broker/v1/openstacks/{openstack_id}][%d] serviceBrokerOpenstacksOpenstackGetForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /broker/v1/openstacks/{openstack_id}][%d] serviceBrokerOpenstacksOpenstackGetForbidden %s", 403, payload) } func (o *ServiceBrokerOpenstacksOpenstackGetForbidden) GetPayload() *models.Error { @@ -381,11 +390,13 @@ func (o *ServiceBrokerOpenstacksOpenstackGetNotFound) Code() int { } func (o *ServiceBrokerOpenstacksOpenstackGetNotFound) Error() string { - return fmt.Sprintf("[GET /broker/v1/openstacks/{openstack_id}][%d] serviceBrokerOpenstacksOpenstackGetNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /broker/v1/openstacks/{openstack_id}][%d] serviceBrokerOpenstacksOpenstackGetNotFound %s", 404, payload) } func (o *ServiceBrokerOpenstacksOpenstackGetNotFound) String() string { - return fmt.Sprintf("[GET /broker/v1/openstacks/{openstack_id}][%d] serviceBrokerOpenstacksOpenstackGetNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /broker/v1/openstacks/{openstack_id}][%d] serviceBrokerOpenstacksOpenstackGetNotFound %s", 404, payload) } func (o *ServiceBrokerOpenstacksOpenstackGetNotFound) GetPayload() *models.Error { @@ -449,11 +460,13 @@ func (o *ServiceBrokerOpenstacksOpenstackGetInternalServerError) Code() int { } func (o *ServiceBrokerOpenstacksOpenstackGetInternalServerError) Error() string { - return fmt.Sprintf("[GET /broker/v1/openstacks/{openstack_id}][%d] serviceBrokerOpenstacksOpenstackGetInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /broker/v1/openstacks/{openstack_id}][%d] serviceBrokerOpenstacksOpenstackGetInternalServerError %s", 500, payload) } func (o *ServiceBrokerOpenstacksOpenstackGetInternalServerError) String() string { - return fmt.Sprintf("[GET /broker/v1/openstacks/{openstack_id}][%d] serviceBrokerOpenstacksOpenstackGetInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /broker/v1/openstacks/{openstack_id}][%d] serviceBrokerOpenstacksOpenstackGetInternalServerError %s", 500, payload) } func (o *ServiceBrokerOpenstacksOpenstackGetInternalServerError) GetPayload() *models.Error { diff --git a/power/client/open_stacks/service_broker_openstacks_post_responses.go b/power/client/open_stacks/service_broker_openstacks_post_responses.go index e7021aaa..5ad6d9ea 100644 --- a/power/client/open_stacks/service_broker_openstacks_post_responses.go +++ b/power/client/open_stacks/service_broker_openstacks_post_responses.go @@ -6,6 +6,7 @@ package open_stacks // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -127,11 +128,13 @@ func (o *ServiceBrokerOpenstacksPostOK) Code() int { } func (o *ServiceBrokerOpenstacksPostOK) Error() string { - return fmt.Sprintf("[POST /broker/v1/openstacks][%d] serviceBrokerOpenstacksPostOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /broker/v1/openstacks][%d] serviceBrokerOpenstacksPostOK %s", 200, payload) } func (o *ServiceBrokerOpenstacksPostOK) String() string { - return fmt.Sprintf("[POST /broker/v1/openstacks][%d] serviceBrokerOpenstacksPostOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /broker/v1/openstacks][%d] serviceBrokerOpenstacksPostOK %s", 200, payload) } func (o *ServiceBrokerOpenstacksPostOK) GetPayload() *models.OpenStack { @@ -195,11 +198,13 @@ func (o *ServiceBrokerOpenstacksPostCreated) Code() int { } func (o *ServiceBrokerOpenstacksPostCreated) Error() string { - return fmt.Sprintf("[POST /broker/v1/openstacks][%d] serviceBrokerOpenstacksPostCreated %+v", 201, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /broker/v1/openstacks][%d] serviceBrokerOpenstacksPostCreated %s", 201, payload) } func (o *ServiceBrokerOpenstacksPostCreated) String() string { - return fmt.Sprintf("[POST /broker/v1/openstacks][%d] serviceBrokerOpenstacksPostCreated %+v", 201, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /broker/v1/openstacks][%d] serviceBrokerOpenstacksPostCreated %s", 201, payload) } func (o *ServiceBrokerOpenstacksPostCreated) GetPayload() *models.OpenStack { @@ -263,11 +268,13 @@ func (o *ServiceBrokerOpenstacksPostBadRequest) Code() int { } func (o *ServiceBrokerOpenstacksPostBadRequest) Error() string { - return fmt.Sprintf("[POST /broker/v1/openstacks][%d] serviceBrokerOpenstacksPostBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /broker/v1/openstacks][%d] serviceBrokerOpenstacksPostBadRequest %s", 400, payload) } func (o *ServiceBrokerOpenstacksPostBadRequest) String() string { - return fmt.Sprintf("[POST /broker/v1/openstacks][%d] serviceBrokerOpenstacksPostBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /broker/v1/openstacks][%d] serviceBrokerOpenstacksPostBadRequest %s", 400, payload) } func (o *ServiceBrokerOpenstacksPostBadRequest) GetPayload() *models.Error { @@ -331,11 +338,13 @@ func (o *ServiceBrokerOpenstacksPostUnauthorized) Code() int { } func (o *ServiceBrokerOpenstacksPostUnauthorized) Error() string { - return fmt.Sprintf("[POST /broker/v1/openstacks][%d] serviceBrokerOpenstacksPostUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /broker/v1/openstacks][%d] serviceBrokerOpenstacksPostUnauthorized %s", 401, payload) } func (o *ServiceBrokerOpenstacksPostUnauthorized) String() string { - return fmt.Sprintf("[POST /broker/v1/openstacks][%d] serviceBrokerOpenstacksPostUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /broker/v1/openstacks][%d] serviceBrokerOpenstacksPostUnauthorized %s", 401, payload) } func (o *ServiceBrokerOpenstacksPostUnauthorized) GetPayload() *models.Error { @@ -399,11 +408,13 @@ func (o *ServiceBrokerOpenstacksPostForbidden) Code() int { } func (o *ServiceBrokerOpenstacksPostForbidden) Error() string { - return fmt.Sprintf("[POST /broker/v1/openstacks][%d] serviceBrokerOpenstacksPostForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /broker/v1/openstacks][%d] serviceBrokerOpenstacksPostForbidden %s", 403, payload) } func (o *ServiceBrokerOpenstacksPostForbidden) String() string { - return fmt.Sprintf("[POST /broker/v1/openstacks][%d] serviceBrokerOpenstacksPostForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /broker/v1/openstacks][%d] serviceBrokerOpenstacksPostForbidden %s", 403, payload) } func (o *ServiceBrokerOpenstacksPostForbidden) GetPayload() *models.Error { @@ -467,11 +478,13 @@ func (o *ServiceBrokerOpenstacksPostNotFound) Code() int { } func (o *ServiceBrokerOpenstacksPostNotFound) Error() string { - return fmt.Sprintf("[POST /broker/v1/openstacks][%d] serviceBrokerOpenstacksPostNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /broker/v1/openstacks][%d] serviceBrokerOpenstacksPostNotFound %s", 404, payload) } func (o *ServiceBrokerOpenstacksPostNotFound) String() string { - return fmt.Sprintf("[POST /broker/v1/openstacks][%d] serviceBrokerOpenstacksPostNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /broker/v1/openstacks][%d] serviceBrokerOpenstacksPostNotFound %s", 404, payload) } func (o *ServiceBrokerOpenstacksPostNotFound) GetPayload() *models.Error { @@ -535,11 +548,13 @@ func (o *ServiceBrokerOpenstacksPostConflict) Code() int { } func (o *ServiceBrokerOpenstacksPostConflict) Error() string { - return fmt.Sprintf("[POST /broker/v1/openstacks][%d] serviceBrokerOpenstacksPostConflict %+v", 409, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /broker/v1/openstacks][%d] serviceBrokerOpenstacksPostConflict %s", 409, payload) } func (o *ServiceBrokerOpenstacksPostConflict) String() string { - return fmt.Sprintf("[POST /broker/v1/openstacks][%d] serviceBrokerOpenstacksPostConflict %+v", 409, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /broker/v1/openstacks][%d] serviceBrokerOpenstacksPostConflict %s", 409, payload) } func (o *ServiceBrokerOpenstacksPostConflict) GetPayload() *models.Error { @@ -603,11 +618,13 @@ func (o *ServiceBrokerOpenstacksPostUnprocessableEntity) Code() int { } func (o *ServiceBrokerOpenstacksPostUnprocessableEntity) Error() string { - return fmt.Sprintf("[POST /broker/v1/openstacks][%d] serviceBrokerOpenstacksPostUnprocessableEntity %+v", 422, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /broker/v1/openstacks][%d] serviceBrokerOpenstacksPostUnprocessableEntity %s", 422, payload) } func (o *ServiceBrokerOpenstacksPostUnprocessableEntity) String() string { - return fmt.Sprintf("[POST /broker/v1/openstacks][%d] serviceBrokerOpenstacksPostUnprocessableEntity %+v", 422, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /broker/v1/openstacks][%d] serviceBrokerOpenstacksPostUnprocessableEntity %s", 422, payload) } func (o *ServiceBrokerOpenstacksPostUnprocessableEntity) GetPayload() *models.Error { @@ -671,11 +688,13 @@ func (o *ServiceBrokerOpenstacksPostInternalServerError) Code() int { } func (o *ServiceBrokerOpenstacksPostInternalServerError) Error() string { - return fmt.Sprintf("[POST /broker/v1/openstacks][%d] serviceBrokerOpenstacksPostInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /broker/v1/openstacks][%d] serviceBrokerOpenstacksPostInternalServerError %s", 500, payload) } func (o *ServiceBrokerOpenstacksPostInternalServerError) String() string { - return fmt.Sprintf("[POST /broker/v1/openstacks][%d] serviceBrokerOpenstacksPostInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /broker/v1/openstacks][%d] serviceBrokerOpenstacksPostInternalServerError %s", 500, payload) } func (o *ServiceBrokerOpenstacksPostInternalServerError) GetPayload() *models.Error { diff --git a/power/client/open_stacks/service_broker_openstacks_servers_get_responses.go b/power/client/open_stacks/service_broker_openstacks_servers_get_responses.go index 38e73206..46465a5d 100644 --- a/power/client/open_stacks/service_broker_openstacks_servers_get_responses.go +++ b/power/client/open_stacks/service_broker_openstacks_servers_get_responses.go @@ -6,6 +6,7 @@ package open_stacks // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -109,11 +110,13 @@ func (o *ServiceBrokerOpenstacksServersGetOK) Code() int { } func (o *ServiceBrokerOpenstacksServersGetOK) Error() string { - return fmt.Sprintf("[GET /broker/v1/openstacks/{openstack_id}/servers/{pvm_instance_id}][%d] serviceBrokerOpenstacksServersGetOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /broker/v1/openstacks/{openstack_id}/servers/{pvm_instance_id}][%d] serviceBrokerOpenstacksServersGetOK %s", 200, payload) } func (o *ServiceBrokerOpenstacksServersGetOK) String() string { - return fmt.Sprintf("[GET /broker/v1/openstacks/{openstack_id}/servers/{pvm_instance_id}][%d] serviceBrokerOpenstacksServersGetOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /broker/v1/openstacks/{openstack_id}/servers/{pvm_instance_id}][%d] serviceBrokerOpenstacksServersGetOK %s", 200, payload) } func (o *ServiceBrokerOpenstacksServersGetOK) GetPayload() *models.HostPVMInstance { @@ -177,11 +180,13 @@ func (o *ServiceBrokerOpenstacksServersGetBadRequest) Code() int { } func (o *ServiceBrokerOpenstacksServersGetBadRequest) Error() string { - return fmt.Sprintf("[GET /broker/v1/openstacks/{openstack_id}/servers/{pvm_instance_id}][%d] serviceBrokerOpenstacksServersGetBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /broker/v1/openstacks/{openstack_id}/servers/{pvm_instance_id}][%d] serviceBrokerOpenstacksServersGetBadRequest %s", 400, payload) } func (o *ServiceBrokerOpenstacksServersGetBadRequest) String() string { - return fmt.Sprintf("[GET /broker/v1/openstacks/{openstack_id}/servers/{pvm_instance_id}][%d] serviceBrokerOpenstacksServersGetBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /broker/v1/openstacks/{openstack_id}/servers/{pvm_instance_id}][%d] serviceBrokerOpenstacksServersGetBadRequest %s", 400, payload) } func (o *ServiceBrokerOpenstacksServersGetBadRequest) GetPayload() *models.Error { @@ -245,11 +250,13 @@ func (o *ServiceBrokerOpenstacksServersGetUnauthorized) Code() int { } func (o *ServiceBrokerOpenstacksServersGetUnauthorized) Error() string { - return fmt.Sprintf("[GET /broker/v1/openstacks/{openstack_id}/servers/{pvm_instance_id}][%d] serviceBrokerOpenstacksServersGetUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /broker/v1/openstacks/{openstack_id}/servers/{pvm_instance_id}][%d] serviceBrokerOpenstacksServersGetUnauthorized %s", 401, payload) } func (o *ServiceBrokerOpenstacksServersGetUnauthorized) String() string { - return fmt.Sprintf("[GET /broker/v1/openstacks/{openstack_id}/servers/{pvm_instance_id}][%d] serviceBrokerOpenstacksServersGetUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /broker/v1/openstacks/{openstack_id}/servers/{pvm_instance_id}][%d] serviceBrokerOpenstacksServersGetUnauthorized %s", 401, payload) } func (o *ServiceBrokerOpenstacksServersGetUnauthorized) GetPayload() *models.Error { @@ -313,11 +320,13 @@ func (o *ServiceBrokerOpenstacksServersGetForbidden) Code() int { } func (o *ServiceBrokerOpenstacksServersGetForbidden) Error() string { - return fmt.Sprintf("[GET /broker/v1/openstacks/{openstack_id}/servers/{pvm_instance_id}][%d] serviceBrokerOpenstacksServersGetForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /broker/v1/openstacks/{openstack_id}/servers/{pvm_instance_id}][%d] serviceBrokerOpenstacksServersGetForbidden %s", 403, payload) } func (o *ServiceBrokerOpenstacksServersGetForbidden) String() string { - return fmt.Sprintf("[GET /broker/v1/openstacks/{openstack_id}/servers/{pvm_instance_id}][%d] serviceBrokerOpenstacksServersGetForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /broker/v1/openstacks/{openstack_id}/servers/{pvm_instance_id}][%d] serviceBrokerOpenstacksServersGetForbidden %s", 403, payload) } func (o *ServiceBrokerOpenstacksServersGetForbidden) GetPayload() *models.Error { @@ -381,11 +390,13 @@ func (o *ServiceBrokerOpenstacksServersGetNotFound) Code() int { } func (o *ServiceBrokerOpenstacksServersGetNotFound) Error() string { - return fmt.Sprintf("[GET /broker/v1/openstacks/{openstack_id}/servers/{pvm_instance_id}][%d] serviceBrokerOpenstacksServersGetNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /broker/v1/openstacks/{openstack_id}/servers/{pvm_instance_id}][%d] serviceBrokerOpenstacksServersGetNotFound %s", 404, payload) } func (o *ServiceBrokerOpenstacksServersGetNotFound) String() string { - return fmt.Sprintf("[GET /broker/v1/openstacks/{openstack_id}/servers/{pvm_instance_id}][%d] serviceBrokerOpenstacksServersGetNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /broker/v1/openstacks/{openstack_id}/servers/{pvm_instance_id}][%d] serviceBrokerOpenstacksServersGetNotFound %s", 404, payload) } func (o *ServiceBrokerOpenstacksServersGetNotFound) GetPayload() *models.Error { @@ -449,11 +460,13 @@ func (o *ServiceBrokerOpenstacksServersGetInternalServerError) Code() int { } func (o *ServiceBrokerOpenstacksServersGetInternalServerError) Error() string { - return fmt.Sprintf("[GET /broker/v1/openstacks/{openstack_id}/servers/{pvm_instance_id}][%d] serviceBrokerOpenstacksServersGetInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /broker/v1/openstacks/{openstack_id}/servers/{pvm_instance_id}][%d] serviceBrokerOpenstacksServersGetInternalServerError %s", 500, payload) } func (o *ServiceBrokerOpenstacksServersGetInternalServerError) String() string { - return fmt.Sprintf("[GET /broker/v1/openstacks/{openstack_id}/servers/{pvm_instance_id}][%d] serviceBrokerOpenstacksServersGetInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /broker/v1/openstacks/{openstack_id}/servers/{pvm_instance_id}][%d] serviceBrokerOpenstacksServersGetInternalServerError %s", 500, payload) } func (o *ServiceBrokerOpenstacksServersGetInternalServerError) GetPayload() *models.Error { diff --git a/power/client/p_cloud_cloud_connections/p_cloud_cloud_connections_client.go b/power/client/p_cloud_cloud_connections/p_cloud_cloud_connections_client.go index 864741d5..d89d215e 100644 --- a/power/client/p_cloud_cloud_connections/p_cloud_cloud_connections_client.go +++ b/power/client/p_cloud_cloud_connections/p_cloud_cloud_connections_client.go @@ -9,6 +9,7 @@ import ( "fmt" "github.com/go-openapi/runtime" + httptransport "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" ) @@ -17,6 +18,31 @@ func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientServi return &Client{transport: transport, formats: formats} } +// New creates a new p cloud cloud connections API client with basic auth credentials. +// It takes the following parameters: +// - host: http host (github.com). +// - basePath: any base path for the API client ("/v1", "/v3"). +// - scheme: http scheme ("http", "https"). +// - user: user for basic authentication header. +// - password: password for basic authentication header. +func NewClientWithBasicAuth(host, basePath, scheme, user, password string) ClientService { + transport := httptransport.New(host, basePath, []string{scheme}) + transport.DefaultAuthentication = httptransport.BasicAuth(user, password) + return &Client{transport: transport, formats: strfmt.Default} +} + +// New creates a new p cloud cloud connections API client with a bearer token for authentication. +// It takes the following parameters: +// - host: http host (github.com). +// - basePath: any base path for the API client ("/v1", "/v3"). +// - scheme: http scheme ("http", "https"). +// - bearerToken: bearer token for Bearer authentication header. +func NewClientWithBearerToken(host, basePath, scheme, bearerToken string) ClientService { + transport := httptransport.New(host, basePath, []string{scheme}) + transport.DefaultAuthentication = httptransport.BearerToken(bearerToken) + return &Client{transport: transport, formats: strfmt.Default} +} + /* Client for p cloud cloud connections API */ @@ -25,7 +51,7 @@ type Client struct { formats strfmt.Registry } -// ClientOption is the option for Client methods +// ClientOption may be used to customize the behavior of Client methods. type ClientOption func(*runtime.ClientOperation) // ClientService is the interface for Client methods diff --git a/power/client/p_cloud_cloud_connections/pcloud_cloudconnections_delete_responses.go b/power/client/p_cloud_cloud_connections/pcloud_cloudconnections_delete_responses.go index 1cc559d2..bd961338 100644 --- a/power/client/p_cloud_cloud_connections/pcloud_cloudconnections_delete_responses.go +++ b/power/client/p_cloud_cloud_connections/pcloud_cloudconnections_delete_responses.go @@ -6,6 +6,7 @@ package p_cloud_cloud_connections // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -127,11 +128,13 @@ func (o *PcloudCloudconnectionsDeleteOK) Code() int { } func (o *PcloudCloudconnectionsDeleteOK) Error() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}][%d] pcloudCloudconnectionsDeleteOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}][%d] pcloudCloudconnectionsDeleteOK %s", 200, payload) } func (o *PcloudCloudconnectionsDeleteOK) String() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}][%d] pcloudCloudconnectionsDeleteOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}][%d] pcloudCloudconnectionsDeleteOK %s", 200, payload) } func (o *PcloudCloudconnectionsDeleteOK) GetPayload() models.Object { @@ -193,11 +196,13 @@ func (o *PcloudCloudconnectionsDeleteAccepted) Code() int { } func (o *PcloudCloudconnectionsDeleteAccepted) Error() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}][%d] pcloudCloudconnectionsDeleteAccepted %+v", 202, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}][%d] pcloudCloudconnectionsDeleteAccepted %s", 202, payload) } func (o *PcloudCloudconnectionsDeleteAccepted) String() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}][%d] pcloudCloudconnectionsDeleteAccepted %+v", 202, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}][%d] pcloudCloudconnectionsDeleteAccepted %s", 202, payload) } func (o *PcloudCloudconnectionsDeleteAccepted) GetPayload() *models.JobReference { @@ -261,11 +266,13 @@ func (o *PcloudCloudconnectionsDeleteBadRequest) Code() int { } func (o *PcloudCloudconnectionsDeleteBadRequest) Error() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}][%d] pcloudCloudconnectionsDeleteBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}][%d] pcloudCloudconnectionsDeleteBadRequest %s", 400, payload) } func (o *PcloudCloudconnectionsDeleteBadRequest) String() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}][%d] pcloudCloudconnectionsDeleteBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}][%d] pcloudCloudconnectionsDeleteBadRequest %s", 400, payload) } func (o *PcloudCloudconnectionsDeleteBadRequest) GetPayload() *models.Error { @@ -329,11 +336,13 @@ func (o *PcloudCloudconnectionsDeleteUnauthorized) Code() int { } func (o *PcloudCloudconnectionsDeleteUnauthorized) Error() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}][%d] pcloudCloudconnectionsDeleteUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}][%d] pcloudCloudconnectionsDeleteUnauthorized %s", 401, payload) } func (o *PcloudCloudconnectionsDeleteUnauthorized) String() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}][%d] pcloudCloudconnectionsDeleteUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}][%d] pcloudCloudconnectionsDeleteUnauthorized %s", 401, payload) } func (o *PcloudCloudconnectionsDeleteUnauthorized) GetPayload() *models.Error { @@ -397,11 +406,13 @@ func (o *PcloudCloudconnectionsDeleteForbidden) Code() int { } func (o *PcloudCloudconnectionsDeleteForbidden) Error() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}][%d] pcloudCloudconnectionsDeleteForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}][%d] pcloudCloudconnectionsDeleteForbidden %s", 403, payload) } func (o *PcloudCloudconnectionsDeleteForbidden) String() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}][%d] pcloudCloudconnectionsDeleteForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}][%d] pcloudCloudconnectionsDeleteForbidden %s", 403, payload) } func (o *PcloudCloudconnectionsDeleteForbidden) GetPayload() *models.Error { @@ -465,11 +476,13 @@ func (o *PcloudCloudconnectionsDeleteNotFound) Code() int { } func (o *PcloudCloudconnectionsDeleteNotFound) Error() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}][%d] pcloudCloudconnectionsDeleteNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}][%d] pcloudCloudconnectionsDeleteNotFound %s", 404, payload) } func (o *PcloudCloudconnectionsDeleteNotFound) String() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}][%d] pcloudCloudconnectionsDeleteNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}][%d] pcloudCloudconnectionsDeleteNotFound %s", 404, payload) } func (o *PcloudCloudconnectionsDeleteNotFound) GetPayload() *models.Error { @@ -533,11 +546,13 @@ func (o *PcloudCloudconnectionsDeleteRequestTimeout) Code() int { } func (o *PcloudCloudconnectionsDeleteRequestTimeout) Error() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}][%d] pcloudCloudconnectionsDeleteRequestTimeout %+v", 408, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}][%d] pcloudCloudconnectionsDeleteRequestTimeout %s", 408, payload) } func (o *PcloudCloudconnectionsDeleteRequestTimeout) String() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}][%d] pcloudCloudconnectionsDeleteRequestTimeout %+v", 408, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}][%d] pcloudCloudconnectionsDeleteRequestTimeout %s", 408, payload) } func (o *PcloudCloudconnectionsDeleteRequestTimeout) GetPayload() *models.Error { @@ -601,11 +616,13 @@ func (o *PcloudCloudconnectionsDeleteGone) Code() int { } func (o *PcloudCloudconnectionsDeleteGone) Error() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}][%d] pcloudCloudconnectionsDeleteGone %+v", 410, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}][%d] pcloudCloudconnectionsDeleteGone %s", 410, payload) } func (o *PcloudCloudconnectionsDeleteGone) String() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}][%d] pcloudCloudconnectionsDeleteGone %+v", 410, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}][%d] pcloudCloudconnectionsDeleteGone %s", 410, payload) } func (o *PcloudCloudconnectionsDeleteGone) GetPayload() *models.Error { @@ -669,11 +686,13 @@ func (o *PcloudCloudconnectionsDeleteInternalServerError) Code() int { } func (o *PcloudCloudconnectionsDeleteInternalServerError) Error() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}][%d] pcloudCloudconnectionsDeleteInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}][%d] pcloudCloudconnectionsDeleteInternalServerError %s", 500, payload) } func (o *PcloudCloudconnectionsDeleteInternalServerError) String() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}][%d] pcloudCloudconnectionsDeleteInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}][%d] pcloudCloudconnectionsDeleteInternalServerError %s", 500, payload) } func (o *PcloudCloudconnectionsDeleteInternalServerError) GetPayload() *models.Error { diff --git a/power/client/p_cloud_cloud_connections/pcloud_cloudconnections_get_responses.go b/power/client/p_cloud_cloud_connections/pcloud_cloudconnections_get_responses.go index f4b8e64a..cd751b72 100644 --- a/power/client/p_cloud_cloud_connections/pcloud_cloudconnections_get_responses.go +++ b/power/client/p_cloud_cloud_connections/pcloud_cloudconnections_get_responses.go @@ -6,6 +6,7 @@ package p_cloud_cloud_connections // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -115,11 +116,13 @@ func (o *PcloudCloudconnectionsGetOK) Code() int { } func (o *PcloudCloudconnectionsGetOK) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}][%d] pcloudCloudconnectionsGetOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}][%d] pcloudCloudconnectionsGetOK %s", 200, payload) } func (o *PcloudCloudconnectionsGetOK) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}][%d] pcloudCloudconnectionsGetOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}][%d] pcloudCloudconnectionsGetOK %s", 200, payload) } func (o *PcloudCloudconnectionsGetOK) GetPayload() *models.CloudConnection { @@ -183,11 +186,13 @@ func (o *PcloudCloudconnectionsGetBadRequest) Code() int { } func (o *PcloudCloudconnectionsGetBadRequest) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}][%d] pcloudCloudconnectionsGetBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}][%d] pcloudCloudconnectionsGetBadRequest %s", 400, payload) } func (o *PcloudCloudconnectionsGetBadRequest) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}][%d] pcloudCloudconnectionsGetBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}][%d] pcloudCloudconnectionsGetBadRequest %s", 400, payload) } func (o *PcloudCloudconnectionsGetBadRequest) GetPayload() *models.Error { @@ -251,11 +256,13 @@ func (o *PcloudCloudconnectionsGetUnauthorized) Code() int { } func (o *PcloudCloudconnectionsGetUnauthorized) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}][%d] pcloudCloudconnectionsGetUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}][%d] pcloudCloudconnectionsGetUnauthorized %s", 401, payload) } func (o *PcloudCloudconnectionsGetUnauthorized) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}][%d] pcloudCloudconnectionsGetUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}][%d] pcloudCloudconnectionsGetUnauthorized %s", 401, payload) } func (o *PcloudCloudconnectionsGetUnauthorized) GetPayload() *models.Error { @@ -319,11 +326,13 @@ func (o *PcloudCloudconnectionsGetForbidden) Code() int { } func (o *PcloudCloudconnectionsGetForbidden) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}][%d] pcloudCloudconnectionsGetForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}][%d] pcloudCloudconnectionsGetForbidden %s", 403, payload) } func (o *PcloudCloudconnectionsGetForbidden) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}][%d] pcloudCloudconnectionsGetForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}][%d] pcloudCloudconnectionsGetForbidden %s", 403, payload) } func (o *PcloudCloudconnectionsGetForbidden) GetPayload() *models.Error { @@ -387,11 +396,13 @@ func (o *PcloudCloudconnectionsGetNotFound) Code() int { } func (o *PcloudCloudconnectionsGetNotFound) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}][%d] pcloudCloudconnectionsGetNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}][%d] pcloudCloudconnectionsGetNotFound %s", 404, payload) } func (o *PcloudCloudconnectionsGetNotFound) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}][%d] pcloudCloudconnectionsGetNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}][%d] pcloudCloudconnectionsGetNotFound %s", 404, payload) } func (o *PcloudCloudconnectionsGetNotFound) GetPayload() *models.Error { @@ -455,11 +466,13 @@ func (o *PcloudCloudconnectionsGetRequestTimeout) Code() int { } func (o *PcloudCloudconnectionsGetRequestTimeout) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}][%d] pcloudCloudconnectionsGetRequestTimeout %+v", 408, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}][%d] pcloudCloudconnectionsGetRequestTimeout %s", 408, payload) } func (o *PcloudCloudconnectionsGetRequestTimeout) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}][%d] pcloudCloudconnectionsGetRequestTimeout %+v", 408, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}][%d] pcloudCloudconnectionsGetRequestTimeout %s", 408, payload) } func (o *PcloudCloudconnectionsGetRequestTimeout) GetPayload() *models.Error { @@ -523,11 +536,13 @@ func (o *PcloudCloudconnectionsGetInternalServerError) Code() int { } func (o *PcloudCloudconnectionsGetInternalServerError) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}][%d] pcloudCloudconnectionsGetInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}][%d] pcloudCloudconnectionsGetInternalServerError %s", 500, payload) } func (o *PcloudCloudconnectionsGetInternalServerError) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}][%d] pcloudCloudconnectionsGetInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}][%d] pcloudCloudconnectionsGetInternalServerError %s", 500, payload) } func (o *PcloudCloudconnectionsGetInternalServerError) GetPayload() *models.Error { diff --git a/power/client/p_cloud_cloud_connections/pcloud_cloudconnections_getall_responses.go b/power/client/p_cloud_cloud_connections/pcloud_cloudconnections_getall_responses.go index 4cc11e81..e28902dd 100644 --- a/power/client/p_cloud_cloud_connections/pcloud_cloudconnections_getall_responses.go +++ b/power/client/p_cloud_cloud_connections/pcloud_cloudconnections_getall_responses.go @@ -6,6 +6,7 @@ package p_cloud_cloud_connections // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -115,11 +116,13 @@ func (o *PcloudCloudconnectionsGetallOK) Code() int { } func (o *PcloudCloudconnectionsGetallOK) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections][%d] pcloudCloudconnectionsGetallOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections][%d] pcloudCloudconnectionsGetallOK %s", 200, payload) } func (o *PcloudCloudconnectionsGetallOK) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections][%d] pcloudCloudconnectionsGetallOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections][%d] pcloudCloudconnectionsGetallOK %s", 200, payload) } func (o *PcloudCloudconnectionsGetallOK) GetPayload() *models.CloudConnections { @@ -183,11 +186,13 @@ func (o *PcloudCloudconnectionsGetallBadRequest) Code() int { } func (o *PcloudCloudconnectionsGetallBadRequest) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections][%d] pcloudCloudconnectionsGetallBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections][%d] pcloudCloudconnectionsGetallBadRequest %s", 400, payload) } func (o *PcloudCloudconnectionsGetallBadRequest) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections][%d] pcloudCloudconnectionsGetallBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections][%d] pcloudCloudconnectionsGetallBadRequest %s", 400, payload) } func (o *PcloudCloudconnectionsGetallBadRequest) GetPayload() *models.Error { @@ -251,11 +256,13 @@ func (o *PcloudCloudconnectionsGetallUnauthorized) Code() int { } func (o *PcloudCloudconnectionsGetallUnauthorized) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections][%d] pcloudCloudconnectionsGetallUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections][%d] pcloudCloudconnectionsGetallUnauthorized %s", 401, payload) } func (o *PcloudCloudconnectionsGetallUnauthorized) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections][%d] pcloudCloudconnectionsGetallUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections][%d] pcloudCloudconnectionsGetallUnauthorized %s", 401, payload) } func (o *PcloudCloudconnectionsGetallUnauthorized) GetPayload() *models.Error { @@ -319,11 +326,13 @@ func (o *PcloudCloudconnectionsGetallForbidden) Code() int { } func (o *PcloudCloudconnectionsGetallForbidden) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections][%d] pcloudCloudconnectionsGetallForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections][%d] pcloudCloudconnectionsGetallForbidden %s", 403, payload) } func (o *PcloudCloudconnectionsGetallForbidden) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections][%d] pcloudCloudconnectionsGetallForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections][%d] pcloudCloudconnectionsGetallForbidden %s", 403, payload) } func (o *PcloudCloudconnectionsGetallForbidden) GetPayload() *models.Error { @@ -387,11 +396,13 @@ func (o *PcloudCloudconnectionsGetallNotFound) Code() int { } func (o *PcloudCloudconnectionsGetallNotFound) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections][%d] pcloudCloudconnectionsGetallNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections][%d] pcloudCloudconnectionsGetallNotFound %s", 404, payload) } func (o *PcloudCloudconnectionsGetallNotFound) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections][%d] pcloudCloudconnectionsGetallNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections][%d] pcloudCloudconnectionsGetallNotFound %s", 404, payload) } func (o *PcloudCloudconnectionsGetallNotFound) GetPayload() *models.Error { @@ -455,11 +466,13 @@ func (o *PcloudCloudconnectionsGetallRequestTimeout) Code() int { } func (o *PcloudCloudconnectionsGetallRequestTimeout) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections][%d] pcloudCloudconnectionsGetallRequestTimeout %+v", 408, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections][%d] pcloudCloudconnectionsGetallRequestTimeout %s", 408, payload) } func (o *PcloudCloudconnectionsGetallRequestTimeout) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections][%d] pcloudCloudconnectionsGetallRequestTimeout %+v", 408, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections][%d] pcloudCloudconnectionsGetallRequestTimeout %s", 408, payload) } func (o *PcloudCloudconnectionsGetallRequestTimeout) GetPayload() *models.Error { @@ -523,11 +536,13 @@ func (o *PcloudCloudconnectionsGetallInternalServerError) Code() int { } func (o *PcloudCloudconnectionsGetallInternalServerError) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections][%d] pcloudCloudconnectionsGetallInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections][%d] pcloudCloudconnectionsGetallInternalServerError %s", 500, payload) } func (o *PcloudCloudconnectionsGetallInternalServerError) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections][%d] pcloudCloudconnectionsGetallInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections][%d] pcloudCloudconnectionsGetallInternalServerError %s", 500, payload) } func (o *PcloudCloudconnectionsGetallInternalServerError) GetPayload() *models.Error { diff --git a/power/client/p_cloud_cloud_connections/pcloud_cloudconnections_networks_delete_responses.go b/power/client/p_cloud_cloud_connections/pcloud_cloudconnections_networks_delete_responses.go index 4ca9cca7..1a632f6b 100644 --- a/power/client/p_cloud_cloud_connections/pcloud_cloudconnections_networks_delete_responses.go +++ b/power/client/p_cloud_cloud_connections/pcloud_cloudconnections_networks_delete_responses.go @@ -6,6 +6,7 @@ package p_cloud_cloud_connections // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -127,11 +128,13 @@ func (o *PcloudCloudconnectionsNetworksDeleteOK) Code() int { } func (o *PcloudCloudconnectionsNetworksDeleteOK) Error() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}/networks/{network_id}][%d] pcloudCloudconnectionsNetworksDeleteOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}/networks/{network_id}][%d] pcloudCloudconnectionsNetworksDeleteOK %s", 200, payload) } func (o *PcloudCloudconnectionsNetworksDeleteOK) String() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}/networks/{network_id}][%d] pcloudCloudconnectionsNetworksDeleteOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}/networks/{network_id}][%d] pcloudCloudconnectionsNetworksDeleteOK %s", 200, payload) } func (o *PcloudCloudconnectionsNetworksDeleteOK) GetPayload() models.Object { @@ -193,11 +196,13 @@ func (o *PcloudCloudconnectionsNetworksDeleteAccepted) Code() int { } func (o *PcloudCloudconnectionsNetworksDeleteAccepted) Error() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}/networks/{network_id}][%d] pcloudCloudconnectionsNetworksDeleteAccepted %+v", 202, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}/networks/{network_id}][%d] pcloudCloudconnectionsNetworksDeleteAccepted %s", 202, payload) } func (o *PcloudCloudconnectionsNetworksDeleteAccepted) String() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}/networks/{network_id}][%d] pcloudCloudconnectionsNetworksDeleteAccepted %+v", 202, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}/networks/{network_id}][%d] pcloudCloudconnectionsNetworksDeleteAccepted %s", 202, payload) } func (o *PcloudCloudconnectionsNetworksDeleteAccepted) GetPayload() *models.JobReference { @@ -261,11 +266,13 @@ func (o *PcloudCloudconnectionsNetworksDeleteBadRequest) Code() int { } func (o *PcloudCloudconnectionsNetworksDeleteBadRequest) Error() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}/networks/{network_id}][%d] pcloudCloudconnectionsNetworksDeleteBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}/networks/{network_id}][%d] pcloudCloudconnectionsNetworksDeleteBadRequest %s", 400, payload) } func (o *PcloudCloudconnectionsNetworksDeleteBadRequest) String() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}/networks/{network_id}][%d] pcloudCloudconnectionsNetworksDeleteBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}/networks/{network_id}][%d] pcloudCloudconnectionsNetworksDeleteBadRequest %s", 400, payload) } func (o *PcloudCloudconnectionsNetworksDeleteBadRequest) GetPayload() *models.Error { @@ -329,11 +336,13 @@ func (o *PcloudCloudconnectionsNetworksDeleteUnauthorized) Code() int { } func (o *PcloudCloudconnectionsNetworksDeleteUnauthorized) Error() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}/networks/{network_id}][%d] pcloudCloudconnectionsNetworksDeleteUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}/networks/{network_id}][%d] pcloudCloudconnectionsNetworksDeleteUnauthorized %s", 401, payload) } func (o *PcloudCloudconnectionsNetworksDeleteUnauthorized) String() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}/networks/{network_id}][%d] pcloudCloudconnectionsNetworksDeleteUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}/networks/{network_id}][%d] pcloudCloudconnectionsNetworksDeleteUnauthorized %s", 401, payload) } func (o *PcloudCloudconnectionsNetworksDeleteUnauthorized) GetPayload() *models.Error { @@ -397,11 +406,13 @@ func (o *PcloudCloudconnectionsNetworksDeleteForbidden) Code() int { } func (o *PcloudCloudconnectionsNetworksDeleteForbidden) Error() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}/networks/{network_id}][%d] pcloudCloudconnectionsNetworksDeleteForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}/networks/{network_id}][%d] pcloudCloudconnectionsNetworksDeleteForbidden %s", 403, payload) } func (o *PcloudCloudconnectionsNetworksDeleteForbidden) String() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}/networks/{network_id}][%d] pcloudCloudconnectionsNetworksDeleteForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}/networks/{network_id}][%d] pcloudCloudconnectionsNetworksDeleteForbidden %s", 403, payload) } func (o *PcloudCloudconnectionsNetworksDeleteForbidden) GetPayload() *models.Error { @@ -465,11 +476,13 @@ func (o *PcloudCloudconnectionsNetworksDeleteNotFound) Code() int { } func (o *PcloudCloudconnectionsNetworksDeleteNotFound) Error() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}/networks/{network_id}][%d] pcloudCloudconnectionsNetworksDeleteNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}/networks/{network_id}][%d] pcloudCloudconnectionsNetworksDeleteNotFound %s", 404, payload) } func (o *PcloudCloudconnectionsNetworksDeleteNotFound) String() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}/networks/{network_id}][%d] pcloudCloudconnectionsNetworksDeleteNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}/networks/{network_id}][%d] pcloudCloudconnectionsNetworksDeleteNotFound %s", 404, payload) } func (o *PcloudCloudconnectionsNetworksDeleteNotFound) GetPayload() *models.Error { @@ -533,11 +546,13 @@ func (o *PcloudCloudconnectionsNetworksDeleteRequestTimeout) Code() int { } func (o *PcloudCloudconnectionsNetworksDeleteRequestTimeout) Error() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}/networks/{network_id}][%d] pcloudCloudconnectionsNetworksDeleteRequestTimeout %+v", 408, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}/networks/{network_id}][%d] pcloudCloudconnectionsNetworksDeleteRequestTimeout %s", 408, payload) } func (o *PcloudCloudconnectionsNetworksDeleteRequestTimeout) String() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}/networks/{network_id}][%d] pcloudCloudconnectionsNetworksDeleteRequestTimeout %+v", 408, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}/networks/{network_id}][%d] pcloudCloudconnectionsNetworksDeleteRequestTimeout %s", 408, payload) } func (o *PcloudCloudconnectionsNetworksDeleteRequestTimeout) GetPayload() *models.Error { @@ -601,11 +616,13 @@ func (o *PcloudCloudconnectionsNetworksDeleteGone) Code() int { } func (o *PcloudCloudconnectionsNetworksDeleteGone) Error() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}/networks/{network_id}][%d] pcloudCloudconnectionsNetworksDeleteGone %+v", 410, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}/networks/{network_id}][%d] pcloudCloudconnectionsNetworksDeleteGone %s", 410, payload) } func (o *PcloudCloudconnectionsNetworksDeleteGone) String() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}/networks/{network_id}][%d] pcloudCloudconnectionsNetworksDeleteGone %+v", 410, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}/networks/{network_id}][%d] pcloudCloudconnectionsNetworksDeleteGone %s", 410, payload) } func (o *PcloudCloudconnectionsNetworksDeleteGone) GetPayload() *models.Error { @@ -669,11 +686,13 @@ func (o *PcloudCloudconnectionsNetworksDeleteInternalServerError) Code() int { } func (o *PcloudCloudconnectionsNetworksDeleteInternalServerError) Error() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}/networks/{network_id}][%d] pcloudCloudconnectionsNetworksDeleteInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}/networks/{network_id}][%d] pcloudCloudconnectionsNetworksDeleteInternalServerError %s", 500, payload) } func (o *PcloudCloudconnectionsNetworksDeleteInternalServerError) String() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}/networks/{network_id}][%d] pcloudCloudconnectionsNetworksDeleteInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}/networks/{network_id}][%d] pcloudCloudconnectionsNetworksDeleteInternalServerError %s", 500, payload) } func (o *PcloudCloudconnectionsNetworksDeleteInternalServerError) GetPayload() *models.Error { diff --git a/power/client/p_cloud_cloud_connections/pcloud_cloudconnections_networks_put_responses.go b/power/client/p_cloud_cloud_connections/pcloud_cloudconnections_networks_put_responses.go index afa8d478..7e35af74 100644 --- a/power/client/p_cloud_cloud_connections/pcloud_cloudconnections_networks_put_responses.go +++ b/power/client/p_cloud_cloud_connections/pcloud_cloudconnections_networks_put_responses.go @@ -6,6 +6,7 @@ package p_cloud_cloud_connections // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -127,11 +128,13 @@ func (o *PcloudCloudconnectionsNetworksPutOK) Code() int { } func (o *PcloudCloudconnectionsNetworksPutOK) Error() string { - return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}/networks/{network_id}][%d] pcloudCloudconnectionsNetworksPutOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}/networks/{network_id}][%d] pcloudCloudconnectionsNetworksPutOK %s", 200, payload) } func (o *PcloudCloudconnectionsNetworksPutOK) String() string { - return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}/networks/{network_id}][%d] pcloudCloudconnectionsNetworksPutOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}/networks/{network_id}][%d] pcloudCloudconnectionsNetworksPutOK %s", 200, payload) } func (o *PcloudCloudconnectionsNetworksPutOK) GetPayload() models.Object { @@ -193,11 +196,13 @@ func (o *PcloudCloudconnectionsNetworksPutAccepted) Code() int { } func (o *PcloudCloudconnectionsNetworksPutAccepted) Error() string { - return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}/networks/{network_id}][%d] pcloudCloudconnectionsNetworksPutAccepted %+v", 202, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}/networks/{network_id}][%d] pcloudCloudconnectionsNetworksPutAccepted %s", 202, payload) } func (o *PcloudCloudconnectionsNetworksPutAccepted) String() string { - return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}/networks/{network_id}][%d] pcloudCloudconnectionsNetworksPutAccepted %+v", 202, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}/networks/{network_id}][%d] pcloudCloudconnectionsNetworksPutAccepted %s", 202, payload) } func (o *PcloudCloudconnectionsNetworksPutAccepted) GetPayload() *models.JobReference { @@ -261,11 +266,13 @@ func (o *PcloudCloudconnectionsNetworksPutBadRequest) Code() int { } func (o *PcloudCloudconnectionsNetworksPutBadRequest) Error() string { - return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}/networks/{network_id}][%d] pcloudCloudconnectionsNetworksPutBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}/networks/{network_id}][%d] pcloudCloudconnectionsNetworksPutBadRequest %s", 400, payload) } func (o *PcloudCloudconnectionsNetworksPutBadRequest) String() string { - return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}/networks/{network_id}][%d] pcloudCloudconnectionsNetworksPutBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}/networks/{network_id}][%d] pcloudCloudconnectionsNetworksPutBadRequest %s", 400, payload) } func (o *PcloudCloudconnectionsNetworksPutBadRequest) GetPayload() *models.Error { @@ -329,11 +336,13 @@ func (o *PcloudCloudconnectionsNetworksPutUnauthorized) Code() int { } func (o *PcloudCloudconnectionsNetworksPutUnauthorized) Error() string { - return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}/networks/{network_id}][%d] pcloudCloudconnectionsNetworksPutUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}/networks/{network_id}][%d] pcloudCloudconnectionsNetworksPutUnauthorized %s", 401, payload) } func (o *PcloudCloudconnectionsNetworksPutUnauthorized) String() string { - return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}/networks/{network_id}][%d] pcloudCloudconnectionsNetworksPutUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}/networks/{network_id}][%d] pcloudCloudconnectionsNetworksPutUnauthorized %s", 401, payload) } func (o *PcloudCloudconnectionsNetworksPutUnauthorized) GetPayload() *models.Error { @@ -397,11 +406,13 @@ func (o *PcloudCloudconnectionsNetworksPutForbidden) Code() int { } func (o *PcloudCloudconnectionsNetworksPutForbidden) Error() string { - return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}/networks/{network_id}][%d] pcloudCloudconnectionsNetworksPutForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}/networks/{network_id}][%d] pcloudCloudconnectionsNetworksPutForbidden %s", 403, payload) } func (o *PcloudCloudconnectionsNetworksPutForbidden) String() string { - return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}/networks/{network_id}][%d] pcloudCloudconnectionsNetworksPutForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}/networks/{network_id}][%d] pcloudCloudconnectionsNetworksPutForbidden %s", 403, payload) } func (o *PcloudCloudconnectionsNetworksPutForbidden) GetPayload() *models.Error { @@ -465,11 +476,13 @@ func (o *PcloudCloudconnectionsNetworksPutNotFound) Code() int { } func (o *PcloudCloudconnectionsNetworksPutNotFound) Error() string { - return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}/networks/{network_id}][%d] pcloudCloudconnectionsNetworksPutNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}/networks/{network_id}][%d] pcloudCloudconnectionsNetworksPutNotFound %s", 404, payload) } func (o *PcloudCloudconnectionsNetworksPutNotFound) String() string { - return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}/networks/{network_id}][%d] pcloudCloudconnectionsNetworksPutNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}/networks/{network_id}][%d] pcloudCloudconnectionsNetworksPutNotFound %s", 404, payload) } func (o *PcloudCloudconnectionsNetworksPutNotFound) GetPayload() *models.Error { @@ -533,11 +546,13 @@ func (o *PcloudCloudconnectionsNetworksPutRequestTimeout) Code() int { } func (o *PcloudCloudconnectionsNetworksPutRequestTimeout) Error() string { - return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}/networks/{network_id}][%d] pcloudCloudconnectionsNetworksPutRequestTimeout %+v", 408, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}/networks/{network_id}][%d] pcloudCloudconnectionsNetworksPutRequestTimeout %s", 408, payload) } func (o *PcloudCloudconnectionsNetworksPutRequestTimeout) String() string { - return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}/networks/{network_id}][%d] pcloudCloudconnectionsNetworksPutRequestTimeout %+v", 408, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}/networks/{network_id}][%d] pcloudCloudconnectionsNetworksPutRequestTimeout %s", 408, payload) } func (o *PcloudCloudconnectionsNetworksPutRequestTimeout) GetPayload() *models.Error { @@ -601,11 +616,13 @@ func (o *PcloudCloudconnectionsNetworksPutUnprocessableEntity) Code() int { } func (o *PcloudCloudconnectionsNetworksPutUnprocessableEntity) Error() string { - return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}/networks/{network_id}][%d] pcloudCloudconnectionsNetworksPutUnprocessableEntity %+v", 422, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}/networks/{network_id}][%d] pcloudCloudconnectionsNetworksPutUnprocessableEntity %s", 422, payload) } func (o *PcloudCloudconnectionsNetworksPutUnprocessableEntity) String() string { - return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}/networks/{network_id}][%d] pcloudCloudconnectionsNetworksPutUnprocessableEntity %+v", 422, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}/networks/{network_id}][%d] pcloudCloudconnectionsNetworksPutUnprocessableEntity %s", 422, payload) } func (o *PcloudCloudconnectionsNetworksPutUnprocessableEntity) GetPayload() *models.Error { @@ -669,11 +686,13 @@ func (o *PcloudCloudconnectionsNetworksPutInternalServerError) Code() int { } func (o *PcloudCloudconnectionsNetworksPutInternalServerError) Error() string { - return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}/networks/{network_id}][%d] pcloudCloudconnectionsNetworksPutInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}/networks/{network_id}][%d] pcloudCloudconnectionsNetworksPutInternalServerError %s", 500, payload) } func (o *PcloudCloudconnectionsNetworksPutInternalServerError) String() string { - return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}/networks/{network_id}][%d] pcloudCloudconnectionsNetworksPutInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}/networks/{network_id}][%d] pcloudCloudconnectionsNetworksPutInternalServerError %s", 500, payload) } func (o *PcloudCloudconnectionsNetworksPutInternalServerError) GetPayload() *models.Error { diff --git a/power/client/p_cloud_cloud_connections/pcloud_cloudconnections_post_responses.go b/power/client/p_cloud_cloud_connections/pcloud_cloudconnections_post_responses.go index aa886b9b..485b02fb 100644 --- a/power/client/p_cloud_cloud_connections/pcloud_cloudconnections_post_responses.go +++ b/power/client/p_cloud_cloud_connections/pcloud_cloudconnections_post_responses.go @@ -6,6 +6,7 @@ package p_cloud_cloud_connections // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -151,11 +152,13 @@ func (o *PcloudCloudconnectionsPostOK) Code() int { } func (o *PcloudCloudconnectionsPostOK) Error() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections][%d] pcloudCloudconnectionsPostOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections][%d] pcloudCloudconnectionsPostOK %s", 200, payload) } func (o *PcloudCloudconnectionsPostOK) String() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections][%d] pcloudCloudconnectionsPostOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections][%d] pcloudCloudconnectionsPostOK %s", 200, payload) } func (o *PcloudCloudconnectionsPostOK) GetPayload() *models.CloudConnection { @@ -219,11 +222,13 @@ func (o *PcloudCloudconnectionsPostCreated) Code() int { } func (o *PcloudCloudconnectionsPostCreated) Error() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections][%d] pcloudCloudconnectionsPostCreated %+v", 201, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections][%d] pcloudCloudconnectionsPostCreated %s", 201, payload) } func (o *PcloudCloudconnectionsPostCreated) String() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections][%d] pcloudCloudconnectionsPostCreated %+v", 201, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections][%d] pcloudCloudconnectionsPostCreated %s", 201, payload) } func (o *PcloudCloudconnectionsPostCreated) GetPayload() *models.CloudConnection { @@ -287,11 +292,13 @@ func (o *PcloudCloudconnectionsPostAccepted) Code() int { } func (o *PcloudCloudconnectionsPostAccepted) Error() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections][%d] pcloudCloudconnectionsPostAccepted %+v", 202, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections][%d] pcloudCloudconnectionsPostAccepted %s", 202, payload) } func (o *PcloudCloudconnectionsPostAccepted) String() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections][%d] pcloudCloudconnectionsPostAccepted %+v", 202, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections][%d] pcloudCloudconnectionsPostAccepted %s", 202, payload) } func (o *PcloudCloudconnectionsPostAccepted) GetPayload() *models.CloudConnectionCreateResponse { @@ -355,11 +362,13 @@ func (o *PcloudCloudconnectionsPostBadRequest) Code() int { } func (o *PcloudCloudconnectionsPostBadRequest) Error() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections][%d] pcloudCloudconnectionsPostBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections][%d] pcloudCloudconnectionsPostBadRequest %s", 400, payload) } func (o *PcloudCloudconnectionsPostBadRequest) String() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections][%d] pcloudCloudconnectionsPostBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections][%d] pcloudCloudconnectionsPostBadRequest %s", 400, payload) } func (o *PcloudCloudconnectionsPostBadRequest) GetPayload() *models.Error { @@ -423,11 +432,13 @@ func (o *PcloudCloudconnectionsPostUnauthorized) Code() int { } func (o *PcloudCloudconnectionsPostUnauthorized) Error() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections][%d] pcloudCloudconnectionsPostUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections][%d] pcloudCloudconnectionsPostUnauthorized %s", 401, payload) } func (o *PcloudCloudconnectionsPostUnauthorized) String() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections][%d] pcloudCloudconnectionsPostUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections][%d] pcloudCloudconnectionsPostUnauthorized %s", 401, payload) } func (o *PcloudCloudconnectionsPostUnauthorized) GetPayload() *models.Error { @@ -491,11 +502,13 @@ func (o *PcloudCloudconnectionsPostForbidden) Code() int { } func (o *PcloudCloudconnectionsPostForbidden) Error() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections][%d] pcloudCloudconnectionsPostForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections][%d] pcloudCloudconnectionsPostForbidden %s", 403, payload) } func (o *PcloudCloudconnectionsPostForbidden) String() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections][%d] pcloudCloudconnectionsPostForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections][%d] pcloudCloudconnectionsPostForbidden %s", 403, payload) } func (o *PcloudCloudconnectionsPostForbidden) GetPayload() *models.Error { @@ -559,11 +572,13 @@ func (o *PcloudCloudconnectionsPostNotFound) Code() int { } func (o *PcloudCloudconnectionsPostNotFound) Error() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections][%d] pcloudCloudconnectionsPostNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections][%d] pcloudCloudconnectionsPostNotFound %s", 404, payload) } func (o *PcloudCloudconnectionsPostNotFound) String() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections][%d] pcloudCloudconnectionsPostNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections][%d] pcloudCloudconnectionsPostNotFound %s", 404, payload) } func (o *PcloudCloudconnectionsPostNotFound) GetPayload() *models.Error { @@ -627,11 +642,13 @@ func (o *PcloudCloudconnectionsPostRequestTimeout) Code() int { } func (o *PcloudCloudconnectionsPostRequestTimeout) Error() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections][%d] pcloudCloudconnectionsPostRequestTimeout %+v", 408, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections][%d] pcloudCloudconnectionsPostRequestTimeout %s", 408, payload) } func (o *PcloudCloudconnectionsPostRequestTimeout) String() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections][%d] pcloudCloudconnectionsPostRequestTimeout %+v", 408, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections][%d] pcloudCloudconnectionsPostRequestTimeout %s", 408, payload) } func (o *PcloudCloudconnectionsPostRequestTimeout) GetPayload() *models.Error { @@ -695,11 +712,13 @@ func (o *PcloudCloudconnectionsPostConflict) Code() int { } func (o *PcloudCloudconnectionsPostConflict) Error() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections][%d] pcloudCloudconnectionsPostConflict %+v", 409, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections][%d] pcloudCloudconnectionsPostConflict %s", 409, payload) } func (o *PcloudCloudconnectionsPostConflict) String() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections][%d] pcloudCloudconnectionsPostConflict %+v", 409, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections][%d] pcloudCloudconnectionsPostConflict %s", 409, payload) } func (o *PcloudCloudconnectionsPostConflict) GetPayload() *models.Error { @@ -763,11 +782,13 @@ func (o *PcloudCloudconnectionsPostUnprocessableEntity) Code() int { } func (o *PcloudCloudconnectionsPostUnprocessableEntity) Error() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections][%d] pcloudCloudconnectionsPostUnprocessableEntity %+v", 422, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections][%d] pcloudCloudconnectionsPostUnprocessableEntity %s", 422, payload) } func (o *PcloudCloudconnectionsPostUnprocessableEntity) String() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections][%d] pcloudCloudconnectionsPostUnprocessableEntity %+v", 422, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections][%d] pcloudCloudconnectionsPostUnprocessableEntity %s", 422, payload) } func (o *PcloudCloudconnectionsPostUnprocessableEntity) GetPayload() *models.Error { @@ -831,11 +852,13 @@ func (o *PcloudCloudconnectionsPostInternalServerError) Code() int { } func (o *PcloudCloudconnectionsPostInternalServerError) Error() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections][%d] pcloudCloudconnectionsPostInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections][%d] pcloudCloudconnectionsPostInternalServerError %s", 500, payload) } func (o *PcloudCloudconnectionsPostInternalServerError) String() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections][%d] pcloudCloudconnectionsPostInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections][%d] pcloudCloudconnectionsPostInternalServerError %s", 500, payload) } func (o *PcloudCloudconnectionsPostInternalServerError) GetPayload() *models.Error { @@ -899,11 +922,13 @@ func (o *PcloudCloudconnectionsPostServiceUnavailable) Code() int { } func (o *PcloudCloudconnectionsPostServiceUnavailable) Error() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections][%d] pcloudCloudconnectionsPostServiceUnavailable %+v", 503, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections][%d] pcloudCloudconnectionsPostServiceUnavailable %s", 503, payload) } func (o *PcloudCloudconnectionsPostServiceUnavailable) String() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections][%d] pcloudCloudconnectionsPostServiceUnavailable %+v", 503, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections][%d] pcloudCloudconnectionsPostServiceUnavailable %s", 503, payload) } func (o *PcloudCloudconnectionsPostServiceUnavailable) GetPayload() *models.Error { @@ -967,11 +992,13 @@ func (o *PcloudCloudconnectionsPostGatewayTimeout) Code() int { } func (o *PcloudCloudconnectionsPostGatewayTimeout) Error() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections][%d] pcloudCloudconnectionsPostGatewayTimeout %+v", 504, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections][%d] pcloudCloudconnectionsPostGatewayTimeout %s", 504, payload) } func (o *PcloudCloudconnectionsPostGatewayTimeout) String() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections][%d] pcloudCloudconnectionsPostGatewayTimeout %+v", 504, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections][%d] pcloudCloudconnectionsPostGatewayTimeout %s", 504, payload) } func (o *PcloudCloudconnectionsPostGatewayTimeout) GetPayload() *models.Error { diff --git a/power/client/p_cloud_cloud_connections/pcloud_cloudconnections_put_responses.go b/power/client/p_cloud_cloud_connections/pcloud_cloudconnections_put_responses.go index df515672..e2ba3d91 100644 --- a/power/client/p_cloud_cloud_connections/pcloud_cloudconnections_put_responses.go +++ b/power/client/p_cloud_cloud_connections/pcloud_cloudconnections_put_responses.go @@ -6,6 +6,7 @@ package p_cloud_cloud_connections // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -145,11 +146,13 @@ func (o *PcloudCloudconnectionsPutOK) Code() int { } func (o *PcloudCloudconnectionsPutOK) Error() string { - return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}][%d] pcloudCloudconnectionsPutOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}][%d] pcloudCloudconnectionsPutOK %s", 200, payload) } func (o *PcloudCloudconnectionsPutOK) String() string { - return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}][%d] pcloudCloudconnectionsPutOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}][%d] pcloudCloudconnectionsPutOK %s", 200, payload) } func (o *PcloudCloudconnectionsPutOK) GetPayload() *models.CloudConnection { @@ -213,11 +216,13 @@ func (o *PcloudCloudconnectionsPutAccepted) Code() int { } func (o *PcloudCloudconnectionsPutAccepted) Error() string { - return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}][%d] pcloudCloudconnectionsPutAccepted %+v", 202, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}][%d] pcloudCloudconnectionsPutAccepted %s", 202, payload) } func (o *PcloudCloudconnectionsPutAccepted) String() string { - return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}][%d] pcloudCloudconnectionsPutAccepted %+v", 202, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}][%d] pcloudCloudconnectionsPutAccepted %s", 202, payload) } func (o *PcloudCloudconnectionsPutAccepted) GetPayload() *models.JobReference { @@ -281,11 +286,13 @@ func (o *PcloudCloudconnectionsPutBadRequest) Code() int { } func (o *PcloudCloudconnectionsPutBadRequest) Error() string { - return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}][%d] pcloudCloudconnectionsPutBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}][%d] pcloudCloudconnectionsPutBadRequest %s", 400, payload) } func (o *PcloudCloudconnectionsPutBadRequest) String() string { - return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}][%d] pcloudCloudconnectionsPutBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}][%d] pcloudCloudconnectionsPutBadRequest %s", 400, payload) } func (o *PcloudCloudconnectionsPutBadRequest) GetPayload() *models.Error { @@ -349,11 +356,13 @@ func (o *PcloudCloudconnectionsPutUnauthorized) Code() int { } func (o *PcloudCloudconnectionsPutUnauthorized) Error() string { - return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}][%d] pcloudCloudconnectionsPutUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}][%d] pcloudCloudconnectionsPutUnauthorized %s", 401, payload) } func (o *PcloudCloudconnectionsPutUnauthorized) String() string { - return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}][%d] pcloudCloudconnectionsPutUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}][%d] pcloudCloudconnectionsPutUnauthorized %s", 401, payload) } func (o *PcloudCloudconnectionsPutUnauthorized) GetPayload() *models.Error { @@ -417,11 +426,13 @@ func (o *PcloudCloudconnectionsPutForbidden) Code() int { } func (o *PcloudCloudconnectionsPutForbidden) Error() string { - return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}][%d] pcloudCloudconnectionsPutForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}][%d] pcloudCloudconnectionsPutForbidden %s", 403, payload) } func (o *PcloudCloudconnectionsPutForbidden) String() string { - return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}][%d] pcloudCloudconnectionsPutForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}][%d] pcloudCloudconnectionsPutForbidden %s", 403, payload) } func (o *PcloudCloudconnectionsPutForbidden) GetPayload() *models.Error { @@ -485,11 +496,13 @@ func (o *PcloudCloudconnectionsPutNotFound) Code() int { } func (o *PcloudCloudconnectionsPutNotFound) Error() string { - return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}][%d] pcloudCloudconnectionsPutNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}][%d] pcloudCloudconnectionsPutNotFound %s", 404, payload) } func (o *PcloudCloudconnectionsPutNotFound) String() string { - return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}][%d] pcloudCloudconnectionsPutNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}][%d] pcloudCloudconnectionsPutNotFound %s", 404, payload) } func (o *PcloudCloudconnectionsPutNotFound) GetPayload() *models.Error { @@ -553,11 +566,13 @@ func (o *PcloudCloudconnectionsPutMethodNotAllowed) Code() int { } func (o *PcloudCloudconnectionsPutMethodNotAllowed) Error() string { - return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}][%d] pcloudCloudconnectionsPutMethodNotAllowed %+v", 405, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}][%d] pcloudCloudconnectionsPutMethodNotAllowed %s", 405, payload) } func (o *PcloudCloudconnectionsPutMethodNotAllowed) String() string { - return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}][%d] pcloudCloudconnectionsPutMethodNotAllowed %+v", 405, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}][%d] pcloudCloudconnectionsPutMethodNotAllowed %s", 405, payload) } func (o *PcloudCloudconnectionsPutMethodNotAllowed) GetPayload() *models.Error { @@ -621,11 +636,13 @@ func (o *PcloudCloudconnectionsPutRequestTimeout) Code() int { } func (o *PcloudCloudconnectionsPutRequestTimeout) Error() string { - return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}][%d] pcloudCloudconnectionsPutRequestTimeout %+v", 408, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}][%d] pcloudCloudconnectionsPutRequestTimeout %s", 408, payload) } func (o *PcloudCloudconnectionsPutRequestTimeout) String() string { - return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}][%d] pcloudCloudconnectionsPutRequestTimeout %+v", 408, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}][%d] pcloudCloudconnectionsPutRequestTimeout %s", 408, payload) } func (o *PcloudCloudconnectionsPutRequestTimeout) GetPayload() *models.Error { @@ -689,11 +706,13 @@ func (o *PcloudCloudconnectionsPutConflict) Code() int { } func (o *PcloudCloudconnectionsPutConflict) Error() string { - return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}][%d] pcloudCloudconnectionsPutConflict %+v", 409, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}][%d] pcloudCloudconnectionsPutConflict %s", 409, payload) } func (o *PcloudCloudconnectionsPutConflict) String() string { - return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}][%d] pcloudCloudconnectionsPutConflict %+v", 409, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}][%d] pcloudCloudconnectionsPutConflict %s", 409, payload) } func (o *PcloudCloudconnectionsPutConflict) GetPayload() *models.Error { @@ -757,11 +776,13 @@ func (o *PcloudCloudconnectionsPutUnprocessableEntity) Code() int { } func (o *PcloudCloudconnectionsPutUnprocessableEntity) Error() string { - return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}][%d] pcloudCloudconnectionsPutUnprocessableEntity %+v", 422, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}][%d] pcloudCloudconnectionsPutUnprocessableEntity %s", 422, payload) } func (o *PcloudCloudconnectionsPutUnprocessableEntity) String() string { - return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}][%d] pcloudCloudconnectionsPutUnprocessableEntity %+v", 422, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}][%d] pcloudCloudconnectionsPutUnprocessableEntity %s", 422, payload) } func (o *PcloudCloudconnectionsPutUnprocessableEntity) GetPayload() *models.Error { @@ -825,11 +846,13 @@ func (o *PcloudCloudconnectionsPutInternalServerError) Code() int { } func (o *PcloudCloudconnectionsPutInternalServerError) Error() string { - return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}][%d] pcloudCloudconnectionsPutInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}][%d] pcloudCloudconnectionsPutInternalServerError %s", 500, payload) } func (o *PcloudCloudconnectionsPutInternalServerError) String() string { - return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}][%d] pcloudCloudconnectionsPutInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}][%d] pcloudCloudconnectionsPutInternalServerError %s", 500, payload) } func (o *PcloudCloudconnectionsPutInternalServerError) GetPayload() *models.Error { @@ -893,11 +916,13 @@ func (o *PcloudCloudconnectionsPutServiceUnavailable) Code() int { } func (o *PcloudCloudconnectionsPutServiceUnavailable) Error() string { - return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}][%d] pcloudCloudconnectionsPutServiceUnavailable %+v", 503, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}][%d] pcloudCloudconnectionsPutServiceUnavailable %s", 503, payload) } func (o *PcloudCloudconnectionsPutServiceUnavailable) String() string { - return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}][%d] pcloudCloudconnectionsPutServiceUnavailable %+v", 503, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}][%d] pcloudCloudconnectionsPutServiceUnavailable %s", 503, payload) } func (o *PcloudCloudconnectionsPutServiceUnavailable) GetPayload() *models.Error { diff --git a/power/client/p_cloud_cloud_connections/pcloud_cloudconnections_virtualprivateclouds_getall_responses.go b/power/client/p_cloud_cloud_connections/pcloud_cloudconnections_virtualprivateclouds_getall_responses.go index 164c7838..f106b3e8 100644 --- a/power/client/p_cloud_cloud_connections/pcloud_cloudconnections_virtualprivateclouds_getall_responses.go +++ b/power/client/p_cloud_cloud_connections/pcloud_cloudconnections_virtualprivateclouds_getall_responses.go @@ -6,6 +6,7 @@ package p_cloud_cloud_connections // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -127,11 +128,13 @@ func (o *PcloudCloudconnectionsVirtualprivatecloudsGetallOK) Code() int { } func (o *PcloudCloudconnectionsVirtualprivatecloudsGetallOK) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections-virtual-private-clouds][%d] pcloudCloudconnectionsVirtualprivatecloudsGetallOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections-virtual-private-clouds][%d] pcloudCloudconnectionsVirtualprivatecloudsGetallOK %s", 200, payload) } func (o *PcloudCloudconnectionsVirtualprivatecloudsGetallOK) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections-virtual-private-clouds][%d] pcloudCloudconnectionsVirtualprivatecloudsGetallOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections-virtual-private-clouds][%d] pcloudCloudconnectionsVirtualprivatecloudsGetallOK %s", 200, payload) } func (o *PcloudCloudconnectionsVirtualprivatecloudsGetallOK) GetPayload() *models.CloudConnectionVirtualPrivateClouds { @@ -195,11 +198,13 @@ func (o *PcloudCloudconnectionsVirtualprivatecloudsGetallBadRequest) Code() int } func (o *PcloudCloudconnectionsVirtualprivatecloudsGetallBadRequest) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections-virtual-private-clouds][%d] pcloudCloudconnectionsVirtualprivatecloudsGetallBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections-virtual-private-clouds][%d] pcloudCloudconnectionsVirtualprivatecloudsGetallBadRequest %s", 400, payload) } func (o *PcloudCloudconnectionsVirtualprivatecloudsGetallBadRequest) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections-virtual-private-clouds][%d] pcloudCloudconnectionsVirtualprivatecloudsGetallBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections-virtual-private-clouds][%d] pcloudCloudconnectionsVirtualprivatecloudsGetallBadRequest %s", 400, payload) } func (o *PcloudCloudconnectionsVirtualprivatecloudsGetallBadRequest) GetPayload() *models.Error { @@ -263,11 +268,13 @@ func (o *PcloudCloudconnectionsVirtualprivatecloudsGetallUnauthorized) Code() in } func (o *PcloudCloudconnectionsVirtualprivatecloudsGetallUnauthorized) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections-virtual-private-clouds][%d] pcloudCloudconnectionsVirtualprivatecloudsGetallUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections-virtual-private-clouds][%d] pcloudCloudconnectionsVirtualprivatecloudsGetallUnauthorized %s", 401, payload) } func (o *PcloudCloudconnectionsVirtualprivatecloudsGetallUnauthorized) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections-virtual-private-clouds][%d] pcloudCloudconnectionsVirtualprivatecloudsGetallUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections-virtual-private-clouds][%d] pcloudCloudconnectionsVirtualprivatecloudsGetallUnauthorized %s", 401, payload) } func (o *PcloudCloudconnectionsVirtualprivatecloudsGetallUnauthorized) GetPayload() *models.Error { @@ -331,11 +338,13 @@ func (o *PcloudCloudconnectionsVirtualprivatecloudsGetallForbidden) Code() int { } func (o *PcloudCloudconnectionsVirtualprivatecloudsGetallForbidden) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections-virtual-private-clouds][%d] pcloudCloudconnectionsVirtualprivatecloudsGetallForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections-virtual-private-clouds][%d] pcloudCloudconnectionsVirtualprivatecloudsGetallForbidden %s", 403, payload) } func (o *PcloudCloudconnectionsVirtualprivatecloudsGetallForbidden) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections-virtual-private-clouds][%d] pcloudCloudconnectionsVirtualprivatecloudsGetallForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections-virtual-private-clouds][%d] pcloudCloudconnectionsVirtualprivatecloudsGetallForbidden %s", 403, payload) } func (o *PcloudCloudconnectionsVirtualprivatecloudsGetallForbidden) GetPayload() *models.Error { @@ -399,11 +408,13 @@ func (o *PcloudCloudconnectionsVirtualprivatecloudsGetallNotFound) Code() int { } func (o *PcloudCloudconnectionsVirtualprivatecloudsGetallNotFound) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections-virtual-private-clouds][%d] pcloudCloudconnectionsVirtualprivatecloudsGetallNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections-virtual-private-clouds][%d] pcloudCloudconnectionsVirtualprivatecloudsGetallNotFound %s", 404, payload) } func (o *PcloudCloudconnectionsVirtualprivatecloudsGetallNotFound) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections-virtual-private-clouds][%d] pcloudCloudconnectionsVirtualprivatecloudsGetallNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections-virtual-private-clouds][%d] pcloudCloudconnectionsVirtualprivatecloudsGetallNotFound %s", 404, payload) } func (o *PcloudCloudconnectionsVirtualprivatecloudsGetallNotFound) GetPayload() *models.Error { @@ -467,11 +478,13 @@ func (o *PcloudCloudconnectionsVirtualprivatecloudsGetallRequestTimeout) Code() } func (o *PcloudCloudconnectionsVirtualprivatecloudsGetallRequestTimeout) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections-virtual-private-clouds][%d] pcloudCloudconnectionsVirtualprivatecloudsGetallRequestTimeout %+v", 408, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections-virtual-private-clouds][%d] pcloudCloudconnectionsVirtualprivatecloudsGetallRequestTimeout %s", 408, payload) } func (o *PcloudCloudconnectionsVirtualprivatecloudsGetallRequestTimeout) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections-virtual-private-clouds][%d] pcloudCloudconnectionsVirtualprivatecloudsGetallRequestTimeout %+v", 408, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections-virtual-private-clouds][%d] pcloudCloudconnectionsVirtualprivatecloudsGetallRequestTimeout %s", 408, payload) } func (o *PcloudCloudconnectionsVirtualprivatecloudsGetallRequestTimeout) GetPayload() *models.Error { @@ -535,11 +548,13 @@ func (o *PcloudCloudconnectionsVirtualprivatecloudsGetallInternalServerError) Co } func (o *PcloudCloudconnectionsVirtualprivatecloudsGetallInternalServerError) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections-virtual-private-clouds][%d] pcloudCloudconnectionsVirtualprivatecloudsGetallInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections-virtual-private-clouds][%d] pcloudCloudconnectionsVirtualprivatecloudsGetallInternalServerError %s", 500, payload) } func (o *PcloudCloudconnectionsVirtualprivatecloudsGetallInternalServerError) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections-virtual-private-clouds][%d] pcloudCloudconnectionsVirtualprivatecloudsGetallInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections-virtual-private-clouds][%d] pcloudCloudconnectionsVirtualprivatecloudsGetallInternalServerError %s", 500, payload) } func (o *PcloudCloudconnectionsVirtualprivatecloudsGetallInternalServerError) GetPayload() *models.Error { @@ -603,11 +618,13 @@ func (o *PcloudCloudconnectionsVirtualprivatecloudsGetallServiceUnavailable) Cod } func (o *PcloudCloudconnectionsVirtualprivatecloudsGetallServiceUnavailable) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections-virtual-private-clouds][%d] pcloudCloudconnectionsVirtualprivatecloudsGetallServiceUnavailable %+v", 503, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections-virtual-private-clouds][%d] pcloudCloudconnectionsVirtualprivatecloudsGetallServiceUnavailable %s", 503, payload) } func (o *PcloudCloudconnectionsVirtualprivatecloudsGetallServiceUnavailable) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections-virtual-private-clouds][%d] pcloudCloudconnectionsVirtualprivatecloudsGetallServiceUnavailable %+v", 503, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections-virtual-private-clouds][%d] pcloudCloudconnectionsVirtualprivatecloudsGetallServiceUnavailable %s", 503, payload) } func (o *PcloudCloudconnectionsVirtualprivatecloudsGetallServiceUnavailable) GetPayload() *models.Error { @@ -671,11 +688,13 @@ func (o *PcloudCloudconnectionsVirtualprivatecloudsGetallGatewayTimeout) Code() } func (o *PcloudCloudconnectionsVirtualprivatecloudsGetallGatewayTimeout) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections-virtual-private-clouds][%d] pcloudCloudconnectionsVirtualprivatecloudsGetallGatewayTimeout %+v", 504, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections-virtual-private-clouds][%d] pcloudCloudconnectionsVirtualprivatecloudsGetallGatewayTimeout %s", 504, payload) } func (o *PcloudCloudconnectionsVirtualprivatecloudsGetallGatewayTimeout) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections-virtual-private-clouds][%d] pcloudCloudconnectionsVirtualprivatecloudsGetallGatewayTimeout %+v", 504, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections-virtual-private-clouds][%d] pcloudCloudconnectionsVirtualprivatecloudsGetallGatewayTimeout %s", 504, payload) } func (o *PcloudCloudconnectionsVirtualprivatecloudsGetallGatewayTimeout) GetPayload() *models.Error { diff --git a/power/client/p_cloud_disaster_recovery/p_cloud_disaster_recovery_client.go b/power/client/p_cloud_disaster_recovery/p_cloud_disaster_recovery_client.go index bdcf215f..c3a51368 100644 --- a/power/client/p_cloud_disaster_recovery/p_cloud_disaster_recovery_client.go +++ b/power/client/p_cloud_disaster_recovery/p_cloud_disaster_recovery_client.go @@ -9,6 +9,7 @@ import ( "fmt" "github.com/go-openapi/runtime" + httptransport "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" ) @@ -17,6 +18,31 @@ func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientServi return &Client{transport: transport, formats: formats} } +// New creates a new p cloud disaster recovery API client with basic auth credentials. +// It takes the following parameters: +// - host: http host (github.com). +// - basePath: any base path for the API client ("/v1", "/v3"). +// - scheme: http scheme ("http", "https"). +// - user: user for basic authentication header. +// - password: password for basic authentication header. +func NewClientWithBasicAuth(host, basePath, scheme, user, password string) ClientService { + transport := httptransport.New(host, basePath, []string{scheme}) + transport.DefaultAuthentication = httptransport.BasicAuth(user, password) + return &Client{transport: transport, formats: strfmt.Default} +} + +// New creates a new p cloud disaster recovery API client with a bearer token for authentication. +// It takes the following parameters: +// - host: http host (github.com). +// - basePath: any base path for the API client ("/v1", "/v3"). +// - scheme: http scheme ("http", "https"). +// - bearerToken: bearer token for Bearer authentication header. +func NewClientWithBearerToken(host, basePath, scheme, bearerToken string) ClientService { + transport := httptransport.New(host, basePath, []string{scheme}) + transport.DefaultAuthentication = httptransport.BearerToken(bearerToken) + return &Client{transport: transport, formats: strfmt.Default} +} + /* Client for p cloud disaster recovery API */ @@ -25,7 +51,7 @@ type Client struct { formats strfmt.Registry } -// ClientOption is the option for Client methods +// ClientOption may be used to customize the behavior of Client methods. type ClientOption func(*runtime.ClientOperation) // ClientService is the interface for Client methods diff --git a/power/client/p_cloud_disaster_recovery/pcloud_locations_disasterrecovery_get_responses.go b/power/client/p_cloud_disaster_recovery/pcloud_locations_disasterrecovery_get_responses.go index 735176d8..b66efb7a 100644 --- a/power/client/p_cloud_disaster_recovery/pcloud_locations_disasterrecovery_get_responses.go +++ b/power/client/p_cloud_disaster_recovery/pcloud_locations_disasterrecovery_get_responses.go @@ -6,6 +6,7 @@ package p_cloud_disaster_recovery // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -109,11 +110,13 @@ func (o *PcloudLocationsDisasterrecoveryGetOK) Code() int { } func (o *PcloudLocationsDisasterrecoveryGetOK) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/locations/disaster-recovery][%d] pcloudLocationsDisasterrecoveryGetOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/locations/disaster-recovery][%d] pcloudLocationsDisasterrecoveryGetOK %s", 200, payload) } func (o *PcloudLocationsDisasterrecoveryGetOK) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/locations/disaster-recovery][%d] pcloudLocationsDisasterrecoveryGetOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/locations/disaster-recovery][%d] pcloudLocationsDisasterrecoveryGetOK %s", 200, payload) } func (o *PcloudLocationsDisasterrecoveryGetOK) GetPayload() *models.DisasterRecoveryLocation { @@ -177,11 +180,13 @@ func (o *PcloudLocationsDisasterrecoveryGetBadRequest) Code() int { } func (o *PcloudLocationsDisasterrecoveryGetBadRequest) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/locations/disaster-recovery][%d] pcloudLocationsDisasterrecoveryGetBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/locations/disaster-recovery][%d] pcloudLocationsDisasterrecoveryGetBadRequest %s", 400, payload) } func (o *PcloudLocationsDisasterrecoveryGetBadRequest) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/locations/disaster-recovery][%d] pcloudLocationsDisasterrecoveryGetBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/locations/disaster-recovery][%d] pcloudLocationsDisasterrecoveryGetBadRequest %s", 400, payload) } func (o *PcloudLocationsDisasterrecoveryGetBadRequest) GetPayload() *models.Error { @@ -245,11 +250,13 @@ func (o *PcloudLocationsDisasterrecoveryGetUnauthorized) Code() int { } func (o *PcloudLocationsDisasterrecoveryGetUnauthorized) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/locations/disaster-recovery][%d] pcloudLocationsDisasterrecoveryGetUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/locations/disaster-recovery][%d] pcloudLocationsDisasterrecoveryGetUnauthorized %s", 401, payload) } func (o *PcloudLocationsDisasterrecoveryGetUnauthorized) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/locations/disaster-recovery][%d] pcloudLocationsDisasterrecoveryGetUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/locations/disaster-recovery][%d] pcloudLocationsDisasterrecoveryGetUnauthorized %s", 401, payload) } func (o *PcloudLocationsDisasterrecoveryGetUnauthorized) GetPayload() *models.Error { @@ -313,11 +320,13 @@ func (o *PcloudLocationsDisasterrecoveryGetForbidden) Code() int { } func (o *PcloudLocationsDisasterrecoveryGetForbidden) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/locations/disaster-recovery][%d] pcloudLocationsDisasterrecoveryGetForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/locations/disaster-recovery][%d] pcloudLocationsDisasterrecoveryGetForbidden %s", 403, payload) } func (o *PcloudLocationsDisasterrecoveryGetForbidden) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/locations/disaster-recovery][%d] pcloudLocationsDisasterrecoveryGetForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/locations/disaster-recovery][%d] pcloudLocationsDisasterrecoveryGetForbidden %s", 403, payload) } func (o *PcloudLocationsDisasterrecoveryGetForbidden) GetPayload() *models.Error { @@ -381,11 +390,13 @@ func (o *PcloudLocationsDisasterrecoveryGetNotFound) Code() int { } func (o *PcloudLocationsDisasterrecoveryGetNotFound) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/locations/disaster-recovery][%d] pcloudLocationsDisasterrecoveryGetNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/locations/disaster-recovery][%d] pcloudLocationsDisasterrecoveryGetNotFound %s", 404, payload) } func (o *PcloudLocationsDisasterrecoveryGetNotFound) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/locations/disaster-recovery][%d] pcloudLocationsDisasterrecoveryGetNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/locations/disaster-recovery][%d] pcloudLocationsDisasterrecoveryGetNotFound %s", 404, payload) } func (o *PcloudLocationsDisasterrecoveryGetNotFound) GetPayload() *models.Error { @@ -449,11 +460,13 @@ func (o *PcloudLocationsDisasterrecoveryGetInternalServerError) Code() int { } func (o *PcloudLocationsDisasterrecoveryGetInternalServerError) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/locations/disaster-recovery][%d] pcloudLocationsDisasterrecoveryGetInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/locations/disaster-recovery][%d] pcloudLocationsDisasterrecoveryGetInternalServerError %s", 500, payload) } func (o *PcloudLocationsDisasterrecoveryGetInternalServerError) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/locations/disaster-recovery][%d] pcloudLocationsDisasterrecoveryGetInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/locations/disaster-recovery][%d] pcloudLocationsDisasterrecoveryGetInternalServerError %s", 500, payload) } func (o *PcloudLocationsDisasterrecoveryGetInternalServerError) GetPayload() *models.Error { diff --git a/power/client/p_cloud_disaster_recovery/pcloud_locations_disasterrecovery_getall_responses.go b/power/client/p_cloud_disaster_recovery/pcloud_locations_disasterrecovery_getall_responses.go index d83e4ff4..92ef9589 100644 --- a/power/client/p_cloud_disaster_recovery/pcloud_locations_disasterrecovery_getall_responses.go +++ b/power/client/p_cloud_disaster_recovery/pcloud_locations_disasterrecovery_getall_responses.go @@ -6,6 +6,7 @@ package p_cloud_disaster_recovery // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -109,11 +110,13 @@ func (o *PcloudLocationsDisasterrecoveryGetallOK) Code() int { } func (o *PcloudLocationsDisasterrecoveryGetallOK) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/locations/disaster-recovery][%d] pcloudLocationsDisasterrecoveryGetallOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/locations/disaster-recovery][%d] pcloudLocationsDisasterrecoveryGetallOK %s", 200, payload) } func (o *PcloudLocationsDisasterrecoveryGetallOK) String() string { - return fmt.Sprintf("[GET /pcloud/v1/locations/disaster-recovery][%d] pcloudLocationsDisasterrecoveryGetallOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/locations/disaster-recovery][%d] pcloudLocationsDisasterrecoveryGetallOK %s", 200, payload) } func (o *PcloudLocationsDisasterrecoveryGetallOK) GetPayload() *models.DisasterRecoveryLocations { @@ -177,11 +180,13 @@ func (o *PcloudLocationsDisasterrecoveryGetallBadRequest) Code() int { } func (o *PcloudLocationsDisasterrecoveryGetallBadRequest) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/locations/disaster-recovery][%d] pcloudLocationsDisasterrecoveryGetallBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/locations/disaster-recovery][%d] pcloudLocationsDisasterrecoveryGetallBadRequest %s", 400, payload) } func (o *PcloudLocationsDisasterrecoveryGetallBadRequest) String() string { - return fmt.Sprintf("[GET /pcloud/v1/locations/disaster-recovery][%d] pcloudLocationsDisasterrecoveryGetallBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/locations/disaster-recovery][%d] pcloudLocationsDisasterrecoveryGetallBadRequest %s", 400, payload) } func (o *PcloudLocationsDisasterrecoveryGetallBadRequest) GetPayload() *models.Error { @@ -245,11 +250,13 @@ func (o *PcloudLocationsDisasterrecoveryGetallUnauthorized) Code() int { } func (o *PcloudLocationsDisasterrecoveryGetallUnauthorized) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/locations/disaster-recovery][%d] pcloudLocationsDisasterrecoveryGetallUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/locations/disaster-recovery][%d] pcloudLocationsDisasterrecoveryGetallUnauthorized %s", 401, payload) } func (o *PcloudLocationsDisasterrecoveryGetallUnauthorized) String() string { - return fmt.Sprintf("[GET /pcloud/v1/locations/disaster-recovery][%d] pcloudLocationsDisasterrecoveryGetallUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/locations/disaster-recovery][%d] pcloudLocationsDisasterrecoveryGetallUnauthorized %s", 401, payload) } func (o *PcloudLocationsDisasterrecoveryGetallUnauthorized) GetPayload() *models.Error { @@ -313,11 +320,13 @@ func (o *PcloudLocationsDisasterrecoveryGetallForbidden) Code() int { } func (o *PcloudLocationsDisasterrecoveryGetallForbidden) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/locations/disaster-recovery][%d] pcloudLocationsDisasterrecoveryGetallForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/locations/disaster-recovery][%d] pcloudLocationsDisasterrecoveryGetallForbidden %s", 403, payload) } func (o *PcloudLocationsDisasterrecoveryGetallForbidden) String() string { - return fmt.Sprintf("[GET /pcloud/v1/locations/disaster-recovery][%d] pcloudLocationsDisasterrecoveryGetallForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/locations/disaster-recovery][%d] pcloudLocationsDisasterrecoveryGetallForbidden %s", 403, payload) } func (o *PcloudLocationsDisasterrecoveryGetallForbidden) GetPayload() *models.Error { @@ -381,11 +390,13 @@ func (o *PcloudLocationsDisasterrecoveryGetallNotFound) Code() int { } func (o *PcloudLocationsDisasterrecoveryGetallNotFound) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/locations/disaster-recovery][%d] pcloudLocationsDisasterrecoveryGetallNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/locations/disaster-recovery][%d] pcloudLocationsDisasterrecoveryGetallNotFound %s", 404, payload) } func (o *PcloudLocationsDisasterrecoveryGetallNotFound) String() string { - return fmt.Sprintf("[GET /pcloud/v1/locations/disaster-recovery][%d] pcloudLocationsDisasterrecoveryGetallNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/locations/disaster-recovery][%d] pcloudLocationsDisasterrecoveryGetallNotFound %s", 404, payload) } func (o *PcloudLocationsDisasterrecoveryGetallNotFound) GetPayload() *models.Error { @@ -449,11 +460,13 @@ func (o *PcloudLocationsDisasterrecoveryGetallInternalServerError) Code() int { } func (o *PcloudLocationsDisasterrecoveryGetallInternalServerError) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/locations/disaster-recovery][%d] pcloudLocationsDisasterrecoveryGetallInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/locations/disaster-recovery][%d] pcloudLocationsDisasterrecoveryGetallInternalServerError %s", 500, payload) } func (o *PcloudLocationsDisasterrecoveryGetallInternalServerError) String() string { - return fmt.Sprintf("[GET /pcloud/v1/locations/disaster-recovery][%d] pcloudLocationsDisasterrecoveryGetallInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/locations/disaster-recovery][%d] pcloudLocationsDisasterrecoveryGetallInternalServerError %s", 500, payload) } func (o *PcloudLocationsDisasterrecoveryGetallInternalServerError) GetPayload() *models.Error { diff --git a/power/client/p_cloud_events/p_cloud_events_client.go b/power/client/p_cloud_events/p_cloud_events_client.go index 567b869d..62289661 100644 --- a/power/client/p_cloud_events/p_cloud_events_client.go +++ b/power/client/p_cloud_events/p_cloud_events_client.go @@ -9,6 +9,7 @@ import ( "fmt" "github.com/go-openapi/runtime" + httptransport "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" ) @@ -17,6 +18,31 @@ func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientServi return &Client{transport: transport, formats: formats} } +// New creates a new p cloud events API client with basic auth credentials. +// It takes the following parameters: +// - host: http host (github.com). +// - basePath: any base path for the API client ("/v1", "/v3"). +// - scheme: http scheme ("http", "https"). +// - user: user for basic authentication header. +// - password: password for basic authentication header. +func NewClientWithBasicAuth(host, basePath, scheme, user, password string) ClientService { + transport := httptransport.New(host, basePath, []string{scheme}) + transport.DefaultAuthentication = httptransport.BasicAuth(user, password) + return &Client{transport: transport, formats: strfmt.Default} +} + +// New creates a new p cloud events API client with a bearer token for authentication. +// It takes the following parameters: +// - host: http host (github.com). +// - basePath: any base path for the API client ("/v1", "/v3"). +// - scheme: http scheme ("http", "https"). +// - bearerToken: bearer token for Bearer authentication header. +func NewClientWithBearerToken(host, basePath, scheme, bearerToken string) ClientService { + transport := httptransport.New(host, basePath, []string{scheme}) + transport.DefaultAuthentication = httptransport.BearerToken(bearerToken) + return &Client{transport: transport, formats: strfmt.Default} +} + /* Client for p cloud events API */ @@ -25,7 +51,7 @@ type Client struct { formats strfmt.Registry } -// ClientOption is the option for Client methods +// ClientOption may be used to customize the behavior of Client methods. type ClientOption func(*runtime.ClientOperation) // ClientService is the interface for Client methods diff --git a/power/client/p_cloud_events/pcloud_events_get_responses.go b/power/client/p_cloud_events/pcloud_events_get_responses.go index b332e0ec..5e7e5971 100644 --- a/power/client/p_cloud_events/pcloud_events_get_responses.go +++ b/power/client/p_cloud_events/pcloud_events_get_responses.go @@ -6,6 +6,7 @@ package p_cloud_events // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -109,11 +110,13 @@ func (o *PcloudEventsGetOK) Code() int { } func (o *PcloudEventsGetOK) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/events/{event_id}][%d] pcloudEventsGetOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/events/{event_id}][%d] pcloudEventsGetOK %s", 200, payload) } func (o *PcloudEventsGetOK) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/events/{event_id}][%d] pcloudEventsGetOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/events/{event_id}][%d] pcloudEventsGetOK %s", 200, payload) } func (o *PcloudEventsGetOK) GetPayload() *models.Event { @@ -177,11 +180,13 @@ func (o *PcloudEventsGetBadRequest) Code() int { } func (o *PcloudEventsGetBadRequest) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/events/{event_id}][%d] pcloudEventsGetBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/events/{event_id}][%d] pcloudEventsGetBadRequest %s", 400, payload) } func (o *PcloudEventsGetBadRequest) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/events/{event_id}][%d] pcloudEventsGetBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/events/{event_id}][%d] pcloudEventsGetBadRequest %s", 400, payload) } func (o *PcloudEventsGetBadRequest) GetPayload() *models.Error { @@ -245,11 +250,13 @@ func (o *PcloudEventsGetUnauthorized) Code() int { } func (o *PcloudEventsGetUnauthorized) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/events/{event_id}][%d] pcloudEventsGetUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/events/{event_id}][%d] pcloudEventsGetUnauthorized %s", 401, payload) } func (o *PcloudEventsGetUnauthorized) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/events/{event_id}][%d] pcloudEventsGetUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/events/{event_id}][%d] pcloudEventsGetUnauthorized %s", 401, payload) } func (o *PcloudEventsGetUnauthorized) GetPayload() *models.Error { @@ -313,11 +320,13 @@ func (o *PcloudEventsGetForbidden) Code() int { } func (o *PcloudEventsGetForbidden) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/events/{event_id}][%d] pcloudEventsGetForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/events/{event_id}][%d] pcloudEventsGetForbidden %s", 403, payload) } func (o *PcloudEventsGetForbidden) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/events/{event_id}][%d] pcloudEventsGetForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/events/{event_id}][%d] pcloudEventsGetForbidden %s", 403, payload) } func (o *PcloudEventsGetForbidden) GetPayload() *models.Error { @@ -381,11 +390,13 @@ func (o *PcloudEventsGetNotFound) Code() int { } func (o *PcloudEventsGetNotFound) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/events/{event_id}][%d] pcloudEventsGetNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/events/{event_id}][%d] pcloudEventsGetNotFound %s", 404, payload) } func (o *PcloudEventsGetNotFound) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/events/{event_id}][%d] pcloudEventsGetNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/events/{event_id}][%d] pcloudEventsGetNotFound %s", 404, payload) } func (o *PcloudEventsGetNotFound) GetPayload() *models.Error { @@ -449,11 +460,13 @@ func (o *PcloudEventsGetInternalServerError) Code() int { } func (o *PcloudEventsGetInternalServerError) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/events/{event_id}][%d] pcloudEventsGetInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/events/{event_id}][%d] pcloudEventsGetInternalServerError %s", 500, payload) } func (o *PcloudEventsGetInternalServerError) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/events/{event_id}][%d] pcloudEventsGetInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/events/{event_id}][%d] pcloudEventsGetInternalServerError %s", 500, payload) } func (o *PcloudEventsGetInternalServerError) GetPayload() *models.Error { diff --git a/power/client/p_cloud_events/pcloud_events_getquery_responses.go b/power/client/p_cloud_events/pcloud_events_getquery_responses.go index 97369cbf..8140ed86 100644 --- a/power/client/p_cloud_events/pcloud_events_getquery_responses.go +++ b/power/client/p_cloud_events/pcloud_events_getquery_responses.go @@ -6,6 +6,7 @@ package p_cloud_events // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -109,11 +110,13 @@ func (o *PcloudEventsGetqueryOK) Code() int { } func (o *PcloudEventsGetqueryOK) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/events][%d] pcloudEventsGetqueryOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/events][%d] pcloudEventsGetqueryOK %s", 200, payload) } func (o *PcloudEventsGetqueryOK) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/events][%d] pcloudEventsGetqueryOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/events][%d] pcloudEventsGetqueryOK %s", 200, payload) } func (o *PcloudEventsGetqueryOK) GetPayload() *models.Events { @@ -177,11 +180,13 @@ func (o *PcloudEventsGetqueryBadRequest) Code() int { } func (o *PcloudEventsGetqueryBadRequest) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/events][%d] pcloudEventsGetqueryBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/events][%d] pcloudEventsGetqueryBadRequest %s", 400, payload) } func (o *PcloudEventsGetqueryBadRequest) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/events][%d] pcloudEventsGetqueryBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/events][%d] pcloudEventsGetqueryBadRequest %s", 400, payload) } func (o *PcloudEventsGetqueryBadRequest) GetPayload() *models.Error { @@ -245,11 +250,13 @@ func (o *PcloudEventsGetqueryUnauthorized) Code() int { } func (o *PcloudEventsGetqueryUnauthorized) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/events][%d] pcloudEventsGetqueryUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/events][%d] pcloudEventsGetqueryUnauthorized %s", 401, payload) } func (o *PcloudEventsGetqueryUnauthorized) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/events][%d] pcloudEventsGetqueryUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/events][%d] pcloudEventsGetqueryUnauthorized %s", 401, payload) } func (o *PcloudEventsGetqueryUnauthorized) GetPayload() *models.Error { @@ -313,11 +320,13 @@ func (o *PcloudEventsGetqueryForbidden) Code() int { } func (o *PcloudEventsGetqueryForbidden) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/events][%d] pcloudEventsGetqueryForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/events][%d] pcloudEventsGetqueryForbidden %s", 403, payload) } func (o *PcloudEventsGetqueryForbidden) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/events][%d] pcloudEventsGetqueryForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/events][%d] pcloudEventsGetqueryForbidden %s", 403, payload) } func (o *PcloudEventsGetqueryForbidden) GetPayload() *models.Error { @@ -381,11 +390,13 @@ func (o *PcloudEventsGetqueryNotFound) Code() int { } func (o *PcloudEventsGetqueryNotFound) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/events][%d] pcloudEventsGetqueryNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/events][%d] pcloudEventsGetqueryNotFound %s", 404, payload) } func (o *PcloudEventsGetqueryNotFound) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/events][%d] pcloudEventsGetqueryNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/events][%d] pcloudEventsGetqueryNotFound %s", 404, payload) } func (o *PcloudEventsGetqueryNotFound) GetPayload() *models.Error { @@ -449,11 +460,13 @@ func (o *PcloudEventsGetqueryInternalServerError) Code() int { } func (o *PcloudEventsGetqueryInternalServerError) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/events][%d] pcloudEventsGetqueryInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/events][%d] pcloudEventsGetqueryInternalServerError %s", 500, payload) } func (o *PcloudEventsGetqueryInternalServerError) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/events][%d] pcloudEventsGetqueryInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/events][%d] pcloudEventsGetqueryInternalServerError %s", 500, payload) } func (o *PcloudEventsGetqueryInternalServerError) GetPayload() *models.Error { diff --git a/power/client/p_cloud_images/p_cloud_images_client.go b/power/client/p_cloud_images/p_cloud_images_client.go index d8853ee3..4fbd54d5 100644 --- a/power/client/p_cloud_images/p_cloud_images_client.go +++ b/power/client/p_cloud_images/p_cloud_images_client.go @@ -9,6 +9,7 @@ import ( "fmt" "github.com/go-openapi/runtime" + httptransport "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" ) @@ -17,6 +18,31 @@ func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientServi return &Client{transport: transport, formats: formats} } +// New creates a new p cloud images API client with basic auth credentials. +// It takes the following parameters: +// - host: http host (github.com). +// - basePath: any base path for the API client ("/v1", "/v3"). +// - scheme: http scheme ("http", "https"). +// - user: user for basic authentication header. +// - password: password for basic authentication header. +func NewClientWithBasicAuth(host, basePath, scheme, user, password string) ClientService { + transport := httptransport.New(host, basePath, []string{scheme}) + transport.DefaultAuthentication = httptransport.BasicAuth(user, password) + return &Client{transport: transport, formats: strfmt.Default} +} + +// New creates a new p cloud images API client with a bearer token for authentication. +// It takes the following parameters: +// - host: http host (github.com). +// - basePath: any base path for the API client ("/v1", "/v3"). +// - scheme: http scheme ("http", "https"). +// - bearerToken: bearer token for Bearer authentication header. +func NewClientWithBearerToken(host, basePath, scheme, bearerToken string) ClientService { + transport := httptransport.New(host, basePath, []string{scheme}) + transport.DefaultAuthentication = httptransport.BearerToken(bearerToken) + return &Client{transport: transport, formats: strfmt.Default} +} + /* Client for p cloud images API */ @@ -25,7 +51,7 @@ type Client struct { formats strfmt.Registry } -// ClientOption is the option for Client methods +// ClientOption may be used to customize the behavior of Client methods. type ClientOption func(*runtime.ClientOperation) // ClientService is the interface for Client methods diff --git a/power/client/p_cloud_images/pcloud_cloudinstances_images_delete_responses.go b/power/client/p_cloud_images/pcloud_cloudinstances_images_delete_responses.go index 5c288720..d7ad65ac 100644 --- a/power/client/p_cloud_images/pcloud_cloudinstances_images_delete_responses.go +++ b/power/client/p_cloud_images/pcloud_cloudinstances_images_delete_responses.go @@ -6,6 +6,7 @@ package p_cloud_images // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -115,11 +116,13 @@ func (o *PcloudCloudinstancesImagesDeleteOK) Code() int { } func (o *PcloudCloudinstancesImagesDeleteOK) Error() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/images/{image_id}][%d] pcloudCloudinstancesImagesDeleteOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/images/{image_id}][%d] pcloudCloudinstancesImagesDeleteOK %s", 200, payload) } func (o *PcloudCloudinstancesImagesDeleteOK) String() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/images/{image_id}][%d] pcloudCloudinstancesImagesDeleteOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/images/{image_id}][%d] pcloudCloudinstancesImagesDeleteOK %s", 200, payload) } func (o *PcloudCloudinstancesImagesDeleteOK) GetPayload() models.Object { @@ -181,11 +184,13 @@ func (o *PcloudCloudinstancesImagesDeleteBadRequest) Code() int { } func (o *PcloudCloudinstancesImagesDeleteBadRequest) Error() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/images/{image_id}][%d] pcloudCloudinstancesImagesDeleteBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/images/{image_id}][%d] pcloudCloudinstancesImagesDeleteBadRequest %s", 400, payload) } func (o *PcloudCloudinstancesImagesDeleteBadRequest) String() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/images/{image_id}][%d] pcloudCloudinstancesImagesDeleteBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/images/{image_id}][%d] pcloudCloudinstancesImagesDeleteBadRequest %s", 400, payload) } func (o *PcloudCloudinstancesImagesDeleteBadRequest) GetPayload() *models.Error { @@ -249,11 +254,13 @@ func (o *PcloudCloudinstancesImagesDeleteUnauthorized) Code() int { } func (o *PcloudCloudinstancesImagesDeleteUnauthorized) Error() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/images/{image_id}][%d] pcloudCloudinstancesImagesDeleteUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/images/{image_id}][%d] pcloudCloudinstancesImagesDeleteUnauthorized %s", 401, payload) } func (o *PcloudCloudinstancesImagesDeleteUnauthorized) String() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/images/{image_id}][%d] pcloudCloudinstancesImagesDeleteUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/images/{image_id}][%d] pcloudCloudinstancesImagesDeleteUnauthorized %s", 401, payload) } func (o *PcloudCloudinstancesImagesDeleteUnauthorized) GetPayload() *models.Error { @@ -317,11 +324,13 @@ func (o *PcloudCloudinstancesImagesDeleteForbidden) Code() int { } func (o *PcloudCloudinstancesImagesDeleteForbidden) Error() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/images/{image_id}][%d] pcloudCloudinstancesImagesDeleteForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/images/{image_id}][%d] pcloudCloudinstancesImagesDeleteForbidden %s", 403, payload) } func (o *PcloudCloudinstancesImagesDeleteForbidden) String() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/images/{image_id}][%d] pcloudCloudinstancesImagesDeleteForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/images/{image_id}][%d] pcloudCloudinstancesImagesDeleteForbidden %s", 403, payload) } func (o *PcloudCloudinstancesImagesDeleteForbidden) GetPayload() *models.Error { @@ -385,11 +394,13 @@ func (o *PcloudCloudinstancesImagesDeleteNotFound) Code() int { } func (o *PcloudCloudinstancesImagesDeleteNotFound) Error() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/images/{image_id}][%d] pcloudCloudinstancesImagesDeleteNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/images/{image_id}][%d] pcloudCloudinstancesImagesDeleteNotFound %s", 404, payload) } func (o *PcloudCloudinstancesImagesDeleteNotFound) String() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/images/{image_id}][%d] pcloudCloudinstancesImagesDeleteNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/images/{image_id}][%d] pcloudCloudinstancesImagesDeleteNotFound %s", 404, payload) } func (o *PcloudCloudinstancesImagesDeleteNotFound) GetPayload() *models.Error { @@ -453,11 +464,13 @@ func (o *PcloudCloudinstancesImagesDeleteGone) Code() int { } func (o *PcloudCloudinstancesImagesDeleteGone) Error() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/images/{image_id}][%d] pcloudCloudinstancesImagesDeleteGone %+v", 410, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/images/{image_id}][%d] pcloudCloudinstancesImagesDeleteGone %s", 410, payload) } func (o *PcloudCloudinstancesImagesDeleteGone) String() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/images/{image_id}][%d] pcloudCloudinstancesImagesDeleteGone %+v", 410, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/images/{image_id}][%d] pcloudCloudinstancesImagesDeleteGone %s", 410, payload) } func (o *PcloudCloudinstancesImagesDeleteGone) GetPayload() *models.Error { @@ -521,11 +534,13 @@ func (o *PcloudCloudinstancesImagesDeleteInternalServerError) Code() int { } func (o *PcloudCloudinstancesImagesDeleteInternalServerError) Error() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/images/{image_id}][%d] pcloudCloudinstancesImagesDeleteInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/images/{image_id}][%d] pcloudCloudinstancesImagesDeleteInternalServerError %s", 500, payload) } func (o *PcloudCloudinstancesImagesDeleteInternalServerError) String() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/images/{image_id}][%d] pcloudCloudinstancesImagesDeleteInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/images/{image_id}][%d] pcloudCloudinstancesImagesDeleteInternalServerError %s", 500, payload) } func (o *PcloudCloudinstancesImagesDeleteInternalServerError) GetPayload() *models.Error { diff --git a/power/client/p_cloud_images/pcloud_cloudinstances_images_export_post_responses.go b/power/client/p_cloud_images/pcloud_cloudinstances_images_export_post_responses.go index 8505c878..713448c3 100644 --- a/power/client/p_cloud_images/pcloud_cloudinstances_images_export_post_responses.go +++ b/power/client/p_cloud_images/pcloud_cloudinstances_images_export_post_responses.go @@ -6,6 +6,7 @@ package p_cloud_images // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -115,11 +116,13 @@ func (o *PcloudCloudinstancesImagesExportPostAccepted) Code() int { } func (o *PcloudCloudinstancesImagesExportPostAccepted) Error() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/images/{image_id}/export][%d] pcloudCloudinstancesImagesExportPostAccepted %+v", 202, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/images/{image_id}/export][%d] pcloudCloudinstancesImagesExportPostAccepted %s", 202, payload) } func (o *PcloudCloudinstancesImagesExportPostAccepted) String() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/images/{image_id}/export][%d] pcloudCloudinstancesImagesExportPostAccepted %+v", 202, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/images/{image_id}/export][%d] pcloudCloudinstancesImagesExportPostAccepted %s", 202, payload) } func (o *PcloudCloudinstancesImagesExportPostAccepted) GetPayload() models.Object { @@ -181,11 +184,13 @@ func (o *PcloudCloudinstancesImagesExportPostBadRequest) Code() int { } func (o *PcloudCloudinstancesImagesExportPostBadRequest) Error() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/images/{image_id}/export][%d] pcloudCloudinstancesImagesExportPostBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/images/{image_id}/export][%d] pcloudCloudinstancesImagesExportPostBadRequest %s", 400, payload) } func (o *PcloudCloudinstancesImagesExportPostBadRequest) String() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/images/{image_id}/export][%d] pcloudCloudinstancesImagesExportPostBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/images/{image_id}/export][%d] pcloudCloudinstancesImagesExportPostBadRequest %s", 400, payload) } func (o *PcloudCloudinstancesImagesExportPostBadRequest) GetPayload() *models.Error { @@ -249,11 +254,13 @@ func (o *PcloudCloudinstancesImagesExportPostUnauthorized) Code() int { } func (o *PcloudCloudinstancesImagesExportPostUnauthorized) Error() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/images/{image_id}/export][%d] pcloudCloudinstancesImagesExportPostUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/images/{image_id}/export][%d] pcloudCloudinstancesImagesExportPostUnauthorized %s", 401, payload) } func (o *PcloudCloudinstancesImagesExportPostUnauthorized) String() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/images/{image_id}/export][%d] pcloudCloudinstancesImagesExportPostUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/images/{image_id}/export][%d] pcloudCloudinstancesImagesExportPostUnauthorized %s", 401, payload) } func (o *PcloudCloudinstancesImagesExportPostUnauthorized) GetPayload() *models.Error { @@ -317,11 +324,13 @@ func (o *PcloudCloudinstancesImagesExportPostForbidden) Code() int { } func (o *PcloudCloudinstancesImagesExportPostForbidden) Error() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/images/{image_id}/export][%d] pcloudCloudinstancesImagesExportPostForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/images/{image_id}/export][%d] pcloudCloudinstancesImagesExportPostForbidden %s", 403, payload) } func (o *PcloudCloudinstancesImagesExportPostForbidden) String() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/images/{image_id}/export][%d] pcloudCloudinstancesImagesExportPostForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/images/{image_id}/export][%d] pcloudCloudinstancesImagesExportPostForbidden %s", 403, payload) } func (o *PcloudCloudinstancesImagesExportPostForbidden) GetPayload() *models.Error { @@ -385,11 +394,13 @@ func (o *PcloudCloudinstancesImagesExportPostNotFound) Code() int { } func (o *PcloudCloudinstancesImagesExportPostNotFound) Error() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/images/{image_id}/export][%d] pcloudCloudinstancesImagesExportPostNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/images/{image_id}/export][%d] pcloudCloudinstancesImagesExportPostNotFound %s", 404, payload) } func (o *PcloudCloudinstancesImagesExportPostNotFound) String() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/images/{image_id}/export][%d] pcloudCloudinstancesImagesExportPostNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/images/{image_id}/export][%d] pcloudCloudinstancesImagesExportPostNotFound %s", 404, payload) } func (o *PcloudCloudinstancesImagesExportPostNotFound) GetPayload() *models.Error { @@ -453,11 +464,13 @@ func (o *PcloudCloudinstancesImagesExportPostUnprocessableEntity) Code() int { } func (o *PcloudCloudinstancesImagesExportPostUnprocessableEntity) Error() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/images/{image_id}/export][%d] pcloudCloudinstancesImagesExportPostUnprocessableEntity %+v", 422, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/images/{image_id}/export][%d] pcloudCloudinstancesImagesExportPostUnprocessableEntity %s", 422, payload) } func (o *PcloudCloudinstancesImagesExportPostUnprocessableEntity) String() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/images/{image_id}/export][%d] pcloudCloudinstancesImagesExportPostUnprocessableEntity %+v", 422, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/images/{image_id}/export][%d] pcloudCloudinstancesImagesExportPostUnprocessableEntity %s", 422, payload) } func (o *PcloudCloudinstancesImagesExportPostUnprocessableEntity) GetPayload() *models.Error { @@ -521,11 +534,13 @@ func (o *PcloudCloudinstancesImagesExportPostInternalServerError) Code() int { } func (o *PcloudCloudinstancesImagesExportPostInternalServerError) Error() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/images/{image_id}/export][%d] pcloudCloudinstancesImagesExportPostInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/images/{image_id}/export][%d] pcloudCloudinstancesImagesExportPostInternalServerError %s", 500, payload) } func (o *PcloudCloudinstancesImagesExportPostInternalServerError) String() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/images/{image_id}/export][%d] pcloudCloudinstancesImagesExportPostInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/images/{image_id}/export][%d] pcloudCloudinstancesImagesExportPostInternalServerError %s", 500, payload) } func (o *PcloudCloudinstancesImagesExportPostInternalServerError) GetPayload() *models.Error { diff --git a/power/client/p_cloud_images/pcloud_cloudinstances_images_get_responses.go b/power/client/p_cloud_images/pcloud_cloudinstances_images_get_responses.go index d652ae89..386dd1db 100644 --- a/power/client/p_cloud_images/pcloud_cloudinstances_images_get_responses.go +++ b/power/client/p_cloud_images/pcloud_cloudinstances_images_get_responses.go @@ -6,6 +6,7 @@ package p_cloud_images // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -109,11 +110,13 @@ func (o *PcloudCloudinstancesImagesGetOK) Code() int { } func (o *PcloudCloudinstancesImagesGetOK) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/images/{image_id}][%d] pcloudCloudinstancesImagesGetOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/images/{image_id}][%d] pcloudCloudinstancesImagesGetOK %s", 200, payload) } func (o *PcloudCloudinstancesImagesGetOK) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/images/{image_id}][%d] pcloudCloudinstancesImagesGetOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/images/{image_id}][%d] pcloudCloudinstancesImagesGetOK %s", 200, payload) } func (o *PcloudCloudinstancesImagesGetOK) GetPayload() *models.Image { @@ -177,11 +180,13 @@ func (o *PcloudCloudinstancesImagesGetBadRequest) Code() int { } func (o *PcloudCloudinstancesImagesGetBadRequest) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/images/{image_id}][%d] pcloudCloudinstancesImagesGetBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/images/{image_id}][%d] pcloudCloudinstancesImagesGetBadRequest %s", 400, payload) } func (o *PcloudCloudinstancesImagesGetBadRequest) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/images/{image_id}][%d] pcloudCloudinstancesImagesGetBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/images/{image_id}][%d] pcloudCloudinstancesImagesGetBadRequest %s", 400, payload) } func (o *PcloudCloudinstancesImagesGetBadRequest) GetPayload() *models.Error { @@ -245,11 +250,13 @@ func (o *PcloudCloudinstancesImagesGetUnauthorized) Code() int { } func (o *PcloudCloudinstancesImagesGetUnauthorized) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/images/{image_id}][%d] pcloudCloudinstancesImagesGetUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/images/{image_id}][%d] pcloudCloudinstancesImagesGetUnauthorized %s", 401, payload) } func (o *PcloudCloudinstancesImagesGetUnauthorized) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/images/{image_id}][%d] pcloudCloudinstancesImagesGetUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/images/{image_id}][%d] pcloudCloudinstancesImagesGetUnauthorized %s", 401, payload) } func (o *PcloudCloudinstancesImagesGetUnauthorized) GetPayload() *models.Error { @@ -313,11 +320,13 @@ func (o *PcloudCloudinstancesImagesGetForbidden) Code() int { } func (o *PcloudCloudinstancesImagesGetForbidden) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/images/{image_id}][%d] pcloudCloudinstancesImagesGetForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/images/{image_id}][%d] pcloudCloudinstancesImagesGetForbidden %s", 403, payload) } func (o *PcloudCloudinstancesImagesGetForbidden) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/images/{image_id}][%d] pcloudCloudinstancesImagesGetForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/images/{image_id}][%d] pcloudCloudinstancesImagesGetForbidden %s", 403, payload) } func (o *PcloudCloudinstancesImagesGetForbidden) GetPayload() *models.Error { @@ -381,11 +390,13 @@ func (o *PcloudCloudinstancesImagesGetNotFound) Code() int { } func (o *PcloudCloudinstancesImagesGetNotFound) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/images/{image_id}][%d] pcloudCloudinstancesImagesGetNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/images/{image_id}][%d] pcloudCloudinstancesImagesGetNotFound %s", 404, payload) } func (o *PcloudCloudinstancesImagesGetNotFound) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/images/{image_id}][%d] pcloudCloudinstancesImagesGetNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/images/{image_id}][%d] pcloudCloudinstancesImagesGetNotFound %s", 404, payload) } func (o *PcloudCloudinstancesImagesGetNotFound) GetPayload() *models.Error { @@ -449,11 +460,13 @@ func (o *PcloudCloudinstancesImagesGetInternalServerError) Code() int { } func (o *PcloudCloudinstancesImagesGetInternalServerError) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/images/{image_id}][%d] pcloudCloudinstancesImagesGetInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/images/{image_id}][%d] pcloudCloudinstancesImagesGetInternalServerError %s", 500, payload) } func (o *PcloudCloudinstancesImagesGetInternalServerError) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/images/{image_id}][%d] pcloudCloudinstancesImagesGetInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/images/{image_id}][%d] pcloudCloudinstancesImagesGetInternalServerError %s", 500, payload) } func (o *PcloudCloudinstancesImagesGetInternalServerError) GetPayload() *models.Error { diff --git a/power/client/p_cloud_images/pcloud_cloudinstances_images_getall_responses.go b/power/client/p_cloud_images/pcloud_cloudinstances_images_getall_responses.go index 0cfce049..2d7b4d17 100644 --- a/power/client/p_cloud_images/pcloud_cloudinstances_images_getall_responses.go +++ b/power/client/p_cloud_images/pcloud_cloudinstances_images_getall_responses.go @@ -6,6 +6,7 @@ package p_cloud_images // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -109,11 +110,13 @@ func (o *PcloudCloudinstancesImagesGetallOK) Code() int { } func (o *PcloudCloudinstancesImagesGetallOK) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/images][%d] pcloudCloudinstancesImagesGetallOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/images][%d] pcloudCloudinstancesImagesGetallOK %s", 200, payload) } func (o *PcloudCloudinstancesImagesGetallOK) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/images][%d] pcloudCloudinstancesImagesGetallOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/images][%d] pcloudCloudinstancesImagesGetallOK %s", 200, payload) } func (o *PcloudCloudinstancesImagesGetallOK) GetPayload() *models.Images { @@ -177,11 +180,13 @@ func (o *PcloudCloudinstancesImagesGetallBadRequest) Code() int { } func (o *PcloudCloudinstancesImagesGetallBadRequest) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/images][%d] pcloudCloudinstancesImagesGetallBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/images][%d] pcloudCloudinstancesImagesGetallBadRequest %s", 400, payload) } func (o *PcloudCloudinstancesImagesGetallBadRequest) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/images][%d] pcloudCloudinstancesImagesGetallBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/images][%d] pcloudCloudinstancesImagesGetallBadRequest %s", 400, payload) } func (o *PcloudCloudinstancesImagesGetallBadRequest) GetPayload() *models.Error { @@ -245,11 +250,13 @@ func (o *PcloudCloudinstancesImagesGetallUnauthorized) Code() int { } func (o *PcloudCloudinstancesImagesGetallUnauthorized) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/images][%d] pcloudCloudinstancesImagesGetallUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/images][%d] pcloudCloudinstancesImagesGetallUnauthorized %s", 401, payload) } func (o *PcloudCloudinstancesImagesGetallUnauthorized) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/images][%d] pcloudCloudinstancesImagesGetallUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/images][%d] pcloudCloudinstancesImagesGetallUnauthorized %s", 401, payload) } func (o *PcloudCloudinstancesImagesGetallUnauthorized) GetPayload() *models.Error { @@ -313,11 +320,13 @@ func (o *PcloudCloudinstancesImagesGetallForbidden) Code() int { } func (o *PcloudCloudinstancesImagesGetallForbidden) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/images][%d] pcloudCloudinstancesImagesGetallForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/images][%d] pcloudCloudinstancesImagesGetallForbidden %s", 403, payload) } func (o *PcloudCloudinstancesImagesGetallForbidden) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/images][%d] pcloudCloudinstancesImagesGetallForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/images][%d] pcloudCloudinstancesImagesGetallForbidden %s", 403, payload) } func (o *PcloudCloudinstancesImagesGetallForbidden) GetPayload() *models.Error { @@ -381,11 +390,13 @@ func (o *PcloudCloudinstancesImagesGetallNotFound) Code() int { } func (o *PcloudCloudinstancesImagesGetallNotFound) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/images][%d] pcloudCloudinstancesImagesGetallNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/images][%d] pcloudCloudinstancesImagesGetallNotFound %s", 404, payload) } func (o *PcloudCloudinstancesImagesGetallNotFound) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/images][%d] pcloudCloudinstancesImagesGetallNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/images][%d] pcloudCloudinstancesImagesGetallNotFound %s", 404, payload) } func (o *PcloudCloudinstancesImagesGetallNotFound) GetPayload() *models.Error { @@ -449,11 +460,13 @@ func (o *PcloudCloudinstancesImagesGetallInternalServerError) Code() int { } func (o *PcloudCloudinstancesImagesGetallInternalServerError) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/images][%d] pcloudCloudinstancesImagesGetallInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/images][%d] pcloudCloudinstancesImagesGetallInternalServerError %s", 500, payload) } func (o *PcloudCloudinstancesImagesGetallInternalServerError) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/images][%d] pcloudCloudinstancesImagesGetallInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/images][%d] pcloudCloudinstancesImagesGetallInternalServerError %s", 500, payload) } func (o *PcloudCloudinstancesImagesGetallInternalServerError) GetPayload() *models.Error { diff --git a/power/client/p_cloud_images/pcloud_cloudinstances_images_post_responses.go b/power/client/p_cloud_images/pcloud_cloudinstances_images_post_responses.go index 1dfd822e..86cc15e7 100644 --- a/power/client/p_cloud_images/pcloud_cloudinstances_images_post_responses.go +++ b/power/client/p_cloud_images/pcloud_cloudinstances_images_post_responses.go @@ -6,6 +6,7 @@ package p_cloud_images // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -127,11 +128,13 @@ func (o *PcloudCloudinstancesImagesPostOK) Code() int { } func (o *PcloudCloudinstancesImagesPostOK) Error() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/images][%d] pcloudCloudinstancesImagesPostOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/images][%d] pcloudCloudinstancesImagesPostOK %s", 200, payload) } func (o *PcloudCloudinstancesImagesPostOK) String() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/images][%d] pcloudCloudinstancesImagesPostOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/images][%d] pcloudCloudinstancesImagesPostOK %s", 200, payload) } func (o *PcloudCloudinstancesImagesPostOK) GetPayload() *models.Image { @@ -195,11 +198,13 @@ func (o *PcloudCloudinstancesImagesPostCreated) Code() int { } func (o *PcloudCloudinstancesImagesPostCreated) Error() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/images][%d] pcloudCloudinstancesImagesPostCreated %+v", 201, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/images][%d] pcloudCloudinstancesImagesPostCreated %s", 201, payload) } func (o *PcloudCloudinstancesImagesPostCreated) String() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/images][%d] pcloudCloudinstancesImagesPostCreated %+v", 201, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/images][%d] pcloudCloudinstancesImagesPostCreated %s", 201, payload) } func (o *PcloudCloudinstancesImagesPostCreated) GetPayload() *models.Image { @@ -263,11 +268,13 @@ func (o *PcloudCloudinstancesImagesPostBadRequest) Code() int { } func (o *PcloudCloudinstancesImagesPostBadRequest) Error() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/images][%d] pcloudCloudinstancesImagesPostBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/images][%d] pcloudCloudinstancesImagesPostBadRequest %s", 400, payload) } func (o *PcloudCloudinstancesImagesPostBadRequest) String() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/images][%d] pcloudCloudinstancesImagesPostBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/images][%d] pcloudCloudinstancesImagesPostBadRequest %s", 400, payload) } func (o *PcloudCloudinstancesImagesPostBadRequest) GetPayload() *models.Error { @@ -331,11 +338,13 @@ func (o *PcloudCloudinstancesImagesPostUnauthorized) Code() int { } func (o *PcloudCloudinstancesImagesPostUnauthorized) Error() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/images][%d] pcloudCloudinstancesImagesPostUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/images][%d] pcloudCloudinstancesImagesPostUnauthorized %s", 401, payload) } func (o *PcloudCloudinstancesImagesPostUnauthorized) String() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/images][%d] pcloudCloudinstancesImagesPostUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/images][%d] pcloudCloudinstancesImagesPostUnauthorized %s", 401, payload) } func (o *PcloudCloudinstancesImagesPostUnauthorized) GetPayload() *models.Error { @@ -399,11 +408,13 @@ func (o *PcloudCloudinstancesImagesPostForbidden) Code() int { } func (o *PcloudCloudinstancesImagesPostForbidden) Error() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/images][%d] pcloudCloudinstancesImagesPostForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/images][%d] pcloudCloudinstancesImagesPostForbidden %s", 403, payload) } func (o *PcloudCloudinstancesImagesPostForbidden) String() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/images][%d] pcloudCloudinstancesImagesPostForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/images][%d] pcloudCloudinstancesImagesPostForbidden %s", 403, payload) } func (o *PcloudCloudinstancesImagesPostForbidden) GetPayload() *models.Error { @@ -467,11 +478,13 @@ func (o *PcloudCloudinstancesImagesPostNotFound) Code() int { } func (o *PcloudCloudinstancesImagesPostNotFound) Error() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/images][%d] pcloudCloudinstancesImagesPostNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/images][%d] pcloudCloudinstancesImagesPostNotFound %s", 404, payload) } func (o *PcloudCloudinstancesImagesPostNotFound) String() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/images][%d] pcloudCloudinstancesImagesPostNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/images][%d] pcloudCloudinstancesImagesPostNotFound %s", 404, payload) } func (o *PcloudCloudinstancesImagesPostNotFound) GetPayload() *models.Error { @@ -535,11 +548,13 @@ func (o *PcloudCloudinstancesImagesPostConflict) Code() int { } func (o *PcloudCloudinstancesImagesPostConflict) Error() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/images][%d] pcloudCloudinstancesImagesPostConflict %+v", 409, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/images][%d] pcloudCloudinstancesImagesPostConflict %s", 409, payload) } func (o *PcloudCloudinstancesImagesPostConflict) String() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/images][%d] pcloudCloudinstancesImagesPostConflict %+v", 409, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/images][%d] pcloudCloudinstancesImagesPostConflict %s", 409, payload) } func (o *PcloudCloudinstancesImagesPostConflict) GetPayload() *models.Error { @@ -603,11 +618,13 @@ func (o *PcloudCloudinstancesImagesPostUnprocessableEntity) Code() int { } func (o *PcloudCloudinstancesImagesPostUnprocessableEntity) Error() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/images][%d] pcloudCloudinstancesImagesPostUnprocessableEntity %+v", 422, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/images][%d] pcloudCloudinstancesImagesPostUnprocessableEntity %s", 422, payload) } func (o *PcloudCloudinstancesImagesPostUnprocessableEntity) String() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/images][%d] pcloudCloudinstancesImagesPostUnprocessableEntity %+v", 422, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/images][%d] pcloudCloudinstancesImagesPostUnprocessableEntity %s", 422, payload) } func (o *PcloudCloudinstancesImagesPostUnprocessableEntity) GetPayload() *models.Error { @@ -671,11 +688,13 @@ func (o *PcloudCloudinstancesImagesPostInternalServerError) Code() int { } func (o *PcloudCloudinstancesImagesPostInternalServerError) Error() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/images][%d] pcloudCloudinstancesImagesPostInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/images][%d] pcloudCloudinstancesImagesPostInternalServerError %s", 500, payload) } func (o *PcloudCloudinstancesImagesPostInternalServerError) String() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/images][%d] pcloudCloudinstancesImagesPostInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/images][%d] pcloudCloudinstancesImagesPostInternalServerError %s", 500, payload) } func (o *PcloudCloudinstancesImagesPostInternalServerError) GetPayload() *models.Error { diff --git a/power/client/p_cloud_images/pcloud_cloudinstances_stockimages_get_responses.go b/power/client/p_cloud_images/pcloud_cloudinstances_stockimages_get_responses.go index 0758f724..23c3616f 100644 --- a/power/client/p_cloud_images/pcloud_cloudinstances_stockimages_get_responses.go +++ b/power/client/p_cloud_images/pcloud_cloudinstances_stockimages_get_responses.go @@ -6,6 +6,7 @@ package p_cloud_images // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -109,11 +110,13 @@ func (o *PcloudCloudinstancesStockimagesGetOK) Code() int { } func (o *PcloudCloudinstancesStockimagesGetOK) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/stock-images/{image_id}][%d] pcloudCloudinstancesStockimagesGetOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/stock-images/{image_id}][%d] pcloudCloudinstancesStockimagesGetOK %s", 200, payload) } func (o *PcloudCloudinstancesStockimagesGetOK) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/stock-images/{image_id}][%d] pcloudCloudinstancesStockimagesGetOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/stock-images/{image_id}][%d] pcloudCloudinstancesStockimagesGetOK %s", 200, payload) } func (o *PcloudCloudinstancesStockimagesGetOK) GetPayload() *models.Image { @@ -177,11 +180,13 @@ func (o *PcloudCloudinstancesStockimagesGetBadRequest) Code() int { } func (o *PcloudCloudinstancesStockimagesGetBadRequest) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/stock-images/{image_id}][%d] pcloudCloudinstancesStockimagesGetBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/stock-images/{image_id}][%d] pcloudCloudinstancesStockimagesGetBadRequest %s", 400, payload) } func (o *PcloudCloudinstancesStockimagesGetBadRequest) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/stock-images/{image_id}][%d] pcloudCloudinstancesStockimagesGetBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/stock-images/{image_id}][%d] pcloudCloudinstancesStockimagesGetBadRequest %s", 400, payload) } func (o *PcloudCloudinstancesStockimagesGetBadRequest) GetPayload() *models.Error { @@ -245,11 +250,13 @@ func (o *PcloudCloudinstancesStockimagesGetUnauthorized) Code() int { } func (o *PcloudCloudinstancesStockimagesGetUnauthorized) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/stock-images/{image_id}][%d] pcloudCloudinstancesStockimagesGetUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/stock-images/{image_id}][%d] pcloudCloudinstancesStockimagesGetUnauthorized %s", 401, payload) } func (o *PcloudCloudinstancesStockimagesGetUnauthorized) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/stock-images/{image_id}][%d] pcloudCloudinstancesStockimagesGetUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/stock-images/{image_id}][%d] pcloudCloudinstancesStockimagesGetUnauthorized %s", 401, payload) } func (o *PcloudCloudinstancesStockimagesGetUnauthorized) GetPayload() *models.Error { @@ -313,11 +320,13 @@ func (o *PcloudCloudinstancesStockimagesGetForbidden) Code() int { } func (o *PcloudCloudinstancesStockimagesGetForbidden) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/stock-images/{image_id}][%d] pcloudCloudinstancesStockimagesGetForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/stock-images/{image_id}][%d] pcloudCloudinstancesStockimagesGetForbidden %s", 403, payload) } func (o *PcloudCloudinstancesStockimagesGetForbidden) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/stock-images/{image_id}][%d] pcloudCloudinstancesStockimagesGetForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/stock-images/{image_id}][%d] pcloudCloudinstancesStockimagesGetForbidden %s", 403, payload) } func (o *PcloudCloudinstancesStockimagesGetForbidden) GetPayload() *models.Error { @@ -381,11 +390,13 @@ func (o *PcloudCloudinstancesStockimagesGetNotFound) Code() int { } func (o *PcloudCloudinstancesStockimagesGetNotFound) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/stock-images/{image_id}][%d] pcloudCloudinstancesStockimagesGetNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/stock-images/{image_id}][%d] pcloudCloudinstancesStockimagesGetNotFound %s", 404, payload) } func (o *PcloudCloudinstancesStockimagesGetNotFound) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/stock-images/{image_id}][%d] pcloudCloudinstancesStockimagesGetNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/stock-images/{image_id}][%d] pcloudCloudinstancesStockimagesGetNotFound %s", 404, payload) } func (o *PcloudCloudinstancesStockimagesGetNotFound) GetPayload() *models.Error { @@ -449,11 +460,13 @@ func (o *PcloudCloudinstancesStockimagesGetInternalServerError) Code() int { } func (o *PcloudCloudinstancesStockimagesGetInternalServerError) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/stock-images/{image_id}][%d] pcloudCloudinstancesStockimagesGetInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/stock-images/{image_id}][%d] pcloudCloudinstancesStockimagesGetInternalServerError %s", 500, payload) } func (o *PcloudCloudinstancesStockimagesGetInternalServerError) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/stock-images/{image_id}][%d] pcloudCloudinstancesStockimagesGetInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/stock-images/{image_id}][%d] pcloudCloudinstancesStockimagesGetInternalServerError %s", 500, payload) } func (o *PcloudCloudinstancesStockimagesGetInternalServerError) GetPayload() *models.Error { diff --git a/power/client/p_cloud_images/pcloud_cloudinstances_stockimages_getall_responses.go b/power/client/p_cloud_images/pcloud_cloudinstances_stockimages_getall_responses.go index f758bd3a..793017a3 100644 --- a/power/client/p_cloud_images/pcloud_cloudinstances_stockimages_getall_responses.go +++ b/power/client/p_cloud_images/pcloud_cloudinstances_stockimages_getall_responses.go @@ -6,6 +6,7 @@ package p_cloud_images // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -109,11 +110,13 @@ func (o *PcloudCloudinstancesStockimagesGetallOK) Code() int { } func (o *PcloudCloudinstancesStockimagesGetallOK) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/stock-images][%d] pcloudCloudinstancesStockimagesGetallOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/stock-images][%d] pcloudCloudinstancesStockimagesGetallOK %s", 200, payload) } func (o *PcloudCloudinstancesStockimagesGetallOK) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/stock-images][%d] pcloudCloudinstancesStockimagesGetallOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/stock-images][%d] pcloudCloudinstancesStockimagesGetallOK %s", 200, payload) } func (o *PcloudCloudinstancesStockimagesGetallOK) GetPayload() *models.Images { @@ -177,11 +180,13 @@ func (o *PcloudCloudinstancesStockimagesGetallBadRequest) Code() int { } func (o *PcloudCloudinstancesStockimagesGetallBadRequest) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/stock-images][%d] pcloudCloudinstancesStockimagesGetallBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/stock-images][%d] pcloudCloudinstancesStockimagesGetallBadRequest %s", 400, payload) } func (o *PcloudCloudinstancesStockimagesGetallBadRequest) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/stock-images][%d] pcloudCloudinstancesStockimagesGetallBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/stock-images][%d] pcloudCloudinstancesStockimagesGetallBadRequest %s", 400, payload) } func (o *PcloudCloudinstancesStockimagesGetallBadRequest) GetPayload() *models.Error { @@ -245,11 +250,13 @@ func (o *PcloudCloudinstancesStockimagesGetallUnauthorized) Code() int { } func (o *PcloudCloudinstancesStockimagesGetallUnauthorized) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/stock-images][%d] pcloudCloudinstancesStockimagesGetallUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/stock-images][%d] pcloudCloudinstancesStockimagesGetallUnauthorized %s", 401, payload) } func (o *PcloudCloudinstancesStockimagesGetallUnauthorized) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/stock-images][%d] pcloudCloudinstancesStockimagesGetallUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/stock-images][%d] pcloudCloudinstancesStockimagesGetallUnauthorized %s", 401, payload) } func (o *PcloudCloudinstancesStockimagesGetallUnauthorized) GetPayload() *models.Error { @@ -313,11 +320,13 @@ func (o *PcloudCloudinstancesStockimagesGetallForbidden) Code() int { } func (o *PcloudCloudinstancesStockimagesGetallForbidden) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/stock-images][%d] pcloudCloudinstancesStockimagesGetallForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/stock-images][%d] pcloudCloudinstancesStockimagesGetallForbidden %s", 403, payload) } func (o *PcloudCloudinstancesStockimagesGetallForbidden) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/stock-images][%d] pcloudCloudinstancesStockimagesGetallForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/stock-images][%d] pcloudCloudinstancesStockimagesGetallForbidden %s", 403, payload) } func (o *PcloudCloudinstancesStockimagesGetallForbidden) GetPayload() *models.Error { @@ -381,11 +390,13 @@ func (o *PcloudCloudinstancesStockimagesGetallNotFound) Code() int { } func (o *PcloudCloudinstancesStockimagesGetallNotFound) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/stock-images][%d] pcloudCloudinstancesStockimagesGetallNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/stock-images][%d] pcloudCloudinstancesStockimagesGetallNotFound %s", 404, payload) } func (o *PcloudCloudinstancesStockimagesGetallNotFound) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/stock-images][%d] pcloudCloudinstancesStockimagesGetallNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/stock-images][%d] pcloudCloudinstancesStockimagesGetallNotFound %s", 404, payload) } func (o *PcloudCloudinstancesStockimagesGetallNotFound) GetPayload() *models.Error { @@ -449,11 +460,13 @@ func (o *PcloudCloudinstancesStockimagesGetallInternalServerError) Code() int { } func (o *PcloudCloudinstancesStockimagesGetallInternalServerError) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/stock-images][%d] pcloudCloudinstancesStockimagesGetallInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/stock-images][%d] pcloudCloudinstancesStockimagesGetallInternalServerError %s", 500, payload) } func (o *PcloudCloudinstancesStockimagesGetallInternalServerError) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/stock-images][%d] pcloudCloudinstancesStockimagesGetallInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/stock-images][%d] pcloudCloudinstancesStockimagesGetallInternalServerError %s", 500, payload) } func (o *PcloudCloudinstancesStockimagesGetallInternalServerError) GetPayload() *models.Error { diff --git a/power/client/p_cloud_images/pcloud_images_get_responses.go b/power/client/p_cloud_images/pcloud_images_get_responses.go index 3a216875..a502fc2f 100644 --- a/power/client/p_cloud_images/pcloud_images_get_responses.go +++ b/power/client/p_cloud_images/pcloud_images_get_responses.go @@ -6,6 +6,7 @@ package p_cloud_images // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -109,11 +110,13 @@ func (o *PcloudImagesGetOK) Code() int { } func (o *PcloudImagesGetOK) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/images/{image_id}][%d] pcloudImagesGetOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/images/{image_id}][%d] pcloudImagesGetOK %s", 200, payload) } func (o *PcloudImagesGetOK) String() string { - return fmt.Sprintf("[GET /pcloud/v1/images/{image_id}][%d] pcloudImagesGetOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/images/{image_id}][%d] pcloudImagesGetOK %s", 200, payload) } func (o *PcloudImagesGetOK) GetPayload() *models.Image { @@ -177,11 +180,13 @@ func (o *PcloudImagesGetBadRequest) Code() int { } func (o *PcloudImagesGetBadRequest) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/images/{image_id}][%d] pcloudImagesGetBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/images/{image_id}][%d] pcloudImagesGetBadRequest %s", 400, payload) } func (o *PcloudImagesGetBadRequest) String() string { - return fmt.Sprintf("[GET /pcloud/v1/images/{image_id}][%d] pcloudImagesGetBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/images/{image_id}][%d] pcloudImagesGetBadRequest %s", 400, payload) } func (o *PcloudImagesGetBadRequest) GetPayload() *models.Error { @@ -245,11 +250,13 @@ func (o *PcloudImagesGetUnauthorized) Code() int { } func (o *PcloudImagesGetUnauthorized) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/images/{image_id}][%d] pcloudImagesGetUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/images/{image_id}][%d] pcloudImagesGetUnauthorized %s", 401, payload) } func (o *PcloudImagesGetUnauthorized) String() string { - return fmt.Sprintf("[GET /pcloud/v1/images/{image_id}][%d] pcloudImagesGetUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/images/{image_id}][%d] pcloudImagesGetUnauthorized %s", 401, payload) } func (o *PcloudImagesGetUnauthorized) GetPayload() *models.Error { @@ -313,11 +320,13 @@ func (o *PcloudImagesGetForbidden) Code() int { } func (o *PcloudImagesGetForbidden) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/images/{image_id}][%d] pcloudImagesGetForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/images/{image_id}][%d] pcloudImagesGetForbidden %s", 403, payload) } func (o *PcloudImagesGetForbidden) String() string { - return fmt.Sprintf("[GET /pcloud/v1/images/{image_id}][%d] pcloudImagesGetForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/images/{image_id}][%d] pcloudImagesGetForbidden %s", 403, payload) } func (o *PcloudImagesGetForbidden) GetPayload() *models.Error { @@ -381,11 +390,13 @@ func (o *PcloudImagesGetNotFound) Code() int { } func (o *PcloudImagesGetNotFound) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/images/{image_id}][%d] pcloudImagesGetNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/images/{image_id}][%d] pcloudImagesGetNotFound %s", 404, payload) } func (o *PcloudImagesGetNotFound) String() string { - return fmt.Sprintf("[GET /pcloud/v1/images/{image_id}][%d] pcloudImagesGetNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/images/{image_id}][%d] pcloudImagesGetNotFound %s", 404, payload) } func (o *PcloudImagesGetNotFound) GetPayload() *models.Error { @@ -449,11 +460,13 @@ func (o *PcloudImagesGetInternalServerError) Code() int { } func (o *PcloudImagesGetInternalServerError) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/images/{image_id}][%d] pcloudImagesGetInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/images/{image_id}][%d] pcloudImagesGetInternalServerError %s", 500, payload) } func (o *PcloudImagesGetInternalServerError) String() string { - return fmt.Sprintf("[GET /pcloud/v1/images/{image_id}][%d] pcloudImagesGetInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/images/{image_id}][%d] pcloudImagesGetInternalServerError %s", 500, payload) } func (o *PcloudImagesGetInternalServerError) GetPayload() *models.Error { diff --git a/power/client/p_cloud_images/pcloud_images_getall_responses.go b/power/client/p_cloud_images/pcloud_images_getall_responses.go index 6da20510..2b50824c 100644 --- a/power/client/p_cloud_images/pcloud_images_getall_responses.go +++ b/power/client/p_cloud_images/pcloud_images_getall_responses.go @@ -6,6 +6,7 @@ package p_cloud_images // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -109,11 +110,13 @@ func (o *PcloudImagesGetallOK) Code() int { } func (o *PcloudImagesGetallOK) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/images][%d] pcloudImagesGetallOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/images][%d] pcloudImagesGetallOK %s", 200, payload) } func (o *PcloudImagesGetallOK) String() string { - return fmt.Sprintf("[GET /pcloud/v1/images][%d] pcloudImagesGetallOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/images][%d] pcloudImagesGetallOK %s", 200, payload) } func (o *PcloudImagesGetallOK) GetPayload() *models.Images { @@ -177,11 +180,13 @@ func (o *PcloudImagesGetallBadRequest) Code() int { } func (o *PcloudImagesGetallBadRequest) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/images][%d] pcloudImagesGetallBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/images][%d] pcloudImagesGetallBadRequest %s", 400, payload) } func (o *PcloudImagesGetallBadRequest) String() string { - return fmt.Sprintf("[GET /pcloud/v1/images][%d] pcloudImagesGetallBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/images][%d] pcloudImagesGetallBadRequest %s", 400, payload) } func (o *PcloudImagesGetallBadRequest) GetPayload() *models.Error { @@ -245,11 +250,13 @@ func (o *PcloudImagesGetallUnauthorized) Code() int { } func (o *PcloudImagesGetallUnauthorized) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/images][%d] pcloudImagesGetallUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/images][%d] pcloudImagesGetallUnauthorized %s", 401, payload) } func (o *PcloudImagesGetallUnauthorized) String() string { - return fmt.Sprintf("[GET /pcloud/v1/images][%d] pcloudImagesGetallUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/images][%d] pcloudImagesGetallUnauthorized %s", 401, payload) } func (o *PcloudImagesGetallUnauthorized) GetPayload() *models.Error { @@ -313,11 +320,13 @@ func (o *PcloudImagesGetallForbidden) Code() int { } func (o *PcloudImagesGetallForbidden) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/images][%d] pcloudImagesGetallForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/images][%d] pcloudImagesGetallForbidden %s", 403, payload) } func (o *PcloudImagesGetallForbidden) String() string { - return fmt.Sprintf("[GET /pcloud/v1/images][%d] pcloudImagesGetallForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/images][%d] pcloudImagesGetallForbidden %s", 403, payload) } func (o *PcloudImagesGetallForbidden) GetPayload() *models.Error { @@ -381,11 +390,13 @@ func (o *PcloudImagesGetallNotFound) Code() int { } func (o *PcloudImagesGetallNotFound) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/images][%d] pcloudImagesGetallNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/images][%d] pcloudImagesGetallNotFound %s", 404, payload) } func (o *PcloudImagesGetallNotFound) String() string { - return fmt.Sprintf("[GET /pcloud/v1/images][%d] pcloudImagesGetallNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/images][%d] pcloudImagesGetallNotFound %s", 404, payload) } func (o *PcloudImagesGetallNotFound) GetPayload() *models.Error { @@ -449,11 +460,13 @@ func (o *PcloudImagesGetallInternalServerError) Code() int { } func (o *PcloudImagesGetallInternalServerError) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/images][%d] pcloudImagesGetallInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/images][%d] pcloudImagesGetallInternalServerError %s", 500, payload) } func (o *PcloudImagesGetallInternalServerError) String() string { - return fmt.Sprintf("[GET /pcloud/v1/images][%d] pcloudImagesGetallInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/images][%d] pcloudImagesGetallInternalServerError %s", 500, payload) } func (o *PcloudImagesGetallInternalServerError) GetPayload() *models.Error { diff --git a/power/client/p_cloud_images/pcloud_v1_cloudinstances_cosimages_get_responses.go b/power/client/p_cloud_images/pcloud_v1_cloudinstances_cosimages_get_responses.go index 01351d96..b8da793b 100644 --- a/power/client/p_cloud_images/pcloud_v1_cloudinstances_cosimages_get_responses.go +++ b/power/client/p_cloud_images/pcloud_v1_cloudinstances_cosimages_get_responses.go @@ -6,6 +6,7 @@ package p_cloud_images // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -109,11 +110,13 @@ func (o *PcloudV1CloudinstancesCosimagesGetOK) Code() int { } func (o *PcloudV1CloudinstancesCosimagesGetOK) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/cos-images][%d] pcloudV1CloudinstancesCosimagesGetOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/cos-images][%d] pcloudV1CloudinstancesCosimagesGetOK %s", 200, payload) } func (o *PcloudV1CloudinstancesCosimagesGetOK) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/cos-images][%d] pcloudV1CloudinstancesCosimagesGetOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/cos-images][%d] pcloudV1CloudinstancesCosimagesGetOK %s", 200, payload) } func (o *PcloudV1CloudinstancesCosimagesGetOK) GetPayload() *models.Job { @@ -177,11 +180,13 @@ func (o *PcloudV1CloudinstancesCosimagesGetBadRequest) Code() int { } func (o *PcloudV1CloudinstancesCosimagesGetBadRequest) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/cos-images][%d] pcloudV1CloudinstancesCosimagesGetBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/cos-images][%d] pcloudV1CloudinstancesCosimagesGetBadRequest %s", 400, payload) } func (o *PcloudV1CloudinstancesCosimagesGetBadRequest) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/cos-images][%d] pcloudV1CloudinstancesCosimagesGetBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/cos-images][%d] pcloudV1CloudinstancesCosimagesGetBadRequest %s", 400, payload) } func (o *PcloudV1CloudinstancesCosimagesGetBadRequest) GetPayload() *models.Error { @@ -245,11 +250,13 @@ func (o *PcloudV1CloudinstancesCosimagesGetUnauthorized) Code() int { } func (o *PcloudV1CloudinstancesCosimagesGetUnauthorized) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/cos-images][%d] pcloudV1CloudinstancesCosimagesGetUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/cos-images][%d] pcloudV1CloudinstancesCosimagesGetUnauthorized %s", 401, payload) } func (o *PcloudV1CloudinstancesCosimagesGetUnauthorized) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/cos-images][%d] pcloudV1CloudinstancesCosimagesGetUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/cos-images][%d] pcloudV1CloudinstancesCosimagesGetUnauthorized %s", 401, payload) } func (o *PcloudV1CloudinstancesCosimagesGetUnauthorized) GetPayload() *models.Error { @@ -313,11 +320,13 @@ func (o *PcloudV1CloudinstancesCosimagesGetForbidden) Code() int { } func (o *PcloudV1CloudinstancesCosimagesGetForbidden) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/cos-images][%d] pcloudV1CloudinstancesCosimagesGetForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/cos-images][%d] pcloudV1CloudinstancesCosimagesGetForbidden %s", 403, payload) } func (o *PcloudV1CloudinstancesCosimagesGetForbidden) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/cos-images][%d] pcloudV1CloudinstancesCosimagesGetForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/cos-images][%d] pcloudV1CloudinstancesCosimagesGetForbidden %s", 403, payload) } func (o *PcloudV1CloudinstancesCosimagesGetForbidden) GetPayload() *models.Error { @@ -381,11 +390,13 @@ func (o *PcloudV1CloudinstancesCosimagesGetNotFound) Code() int { } func (o *PcloudV1CloudinstancesCosimagesGetNotFound) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/cos-images][%d] pcloudV1CloudinstancesCosimagesGetNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/cos-images][%d] pcloudV1CloudinstancesCosimagesGetNotFound %s", 404, payload) } func (o *PcloudV1CloudinstancesCosimagesGetNotFound) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/cos-images][%d] pcloudV1CloudinstancesCosimagesGetNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/cos-images][%d] pcloudV1CloudinstancesCosimagesGetNotFound %s", 404, payload) } func (o *PcloudV1CloudinstancesCosimagesGetNotFound) GetPayload() *models.Error { @@ -449,11 +460,13 @@ func (o *PcloudV1CloudinstancesCosimagesGetInternalServerError) Code() int { } func (o *PcloudV1CloudinstancesCosimagesGetInternalServerError) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/cos-images][%d] pcloudV1CloudinstancesCosimagesGetInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/cos-images][%d] pcloudV1CloudinstancesCosimagesGetInternalServerError %s", 500, payload) } func (o *PcloudV1CloudinstancesCosimagesGetInternalServerError) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/cos-images][%d] pcloudV1CloudinstancesCosimagesGetInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/cos-images][%d] pcloudV1CloudinstancesCosimagesGetInternalServerError %s", 500, payload) } func (o *PcloudV1CloudinstancesCosimagesGetInternalServerError) GetPayload() *models.Error { diff --git a/power/client/p_cloud_images/pcloud_v1_cloudinstances_cosimages_post_responses.go b/power/client/p_cloud_images/pcloud_v1_cloudinstances_cosimages_post_responses.go index 4e96b47b..036bbb66 100644 --- a/power/client/p_cloud_images/pcloud_v1_cloudinstances_cosimages_post_responses.go +++ b/power/client/p_cloud_images/pcloud_v1_cloudinstances_cosimages_post_responses.go @@ -6,6 +6,7 @@ package p_cloud_images // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -121,11 +122,13 @@ func (o *PcloudV1CloudinstancesCosimagesPostAccepted) Code() int { } func (o *PcloudV1CloudinstancesCosimagesPostAccepted) Error() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/cos-images][%d] pcloudV1CloudinstancesCosimagesPostAccepted %+v", 202, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/cos-images][%d] pcloudV1CloudinstancesCosimagesPostAccepted %s", 202, payload) } func (o *PcloudV1CloudinstancesCosimagesPostAccepted) String() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/cos-images][%d] pcloudV1CloudinstancesCosimagesPostAccepted %+v", 202, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/cos-images][%d] pcloudV1CloudinstancesCosimagesPostAccepted %s", 202, payload) } func (o *PcloudV1CloudinstancesCosimagesPostAccepted) GetPayload() *models.JobReference { @@ -189,11 +192,13 @@ func (o *PcloudV1CloudinstancesCosimagesPostBadRequest) Code() int { } func (o *PcloudV1CloudinstancesCosimagesPostBadRequest) Error() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/cos-images][%d] pcloudV1CloudinstancesCosimagesPostBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/cos-images][%d] pcloudV1CloudinstancesCosimagesPostBadRequest %s", 400, payload) } func (o *PcloudV1CloudinstancesCosimagesPostBadRequest) String() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/cos-images][%d] pcloudV1CloudinstancesCosimagesPostBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/cos-images][%d] pcloudV1CloudinstancesCosimagesPostBadRequest %s", 400, payload) } func (o *PcloudV1CloudinstancesCosimagesPostBadRequest) GetPayload() *models.Error { @@ -257,11 +262,13 @@ func (o *PcloudV1CloudinstancesCosimagesPostUnauthorized) Code() int { } func (o *PcloudV1CloudinstancesCosimagesPostUnauthorized) Error() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/cos-images][%d] pcloudV1CloudinstancesCosimagesPostUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/cos-images][%d] pcloudV1CloudinstancesCosimagesPostUnauthorized %s", 401, payload) } func (o *PcloudV1CloudinstancesCosimagesPostUnauthorized) String() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/cos-images][%d] pcloudV1CloudinstancesCosimagesPostUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/cos-images][%d] pcloudV1CloudinstancesCosimagesPostUnauthorized %s", 401, payload) } func (o *PcloudV1CloudinstancesCosimagesPostUnauthorized) GetPayload() *models.Error { @@ -325,11 +332,13 @@ func (o *PcloudV1CloudinstancesCosimagesPostForbidden) Code() int { } func (o *PcloudV1CloudinstancesCosimagesPostForbidden) Error() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/cos-images][%d] pcloudV1CloudinstancesCosimagesPostForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/cos-images][%d] pcloudV1CloudinstancesCosimagesPostForbidden %s", 403, payload) } func (o *PcloudV1CloudinstancesCosimagesPostForbidden) String() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/cos-images][%d] pcloudV1CloudinstancesCosimagesPostForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/cos-images][%d] pcloudV1CloudinstancesCosimagesPostForbidden %s", 403, payload) } func (o *PcloudV1CloudinstancesCosimagesPostForbidden) GetPayload() *models.Error { @@ -393,11 +402,13 @@ func (o *PcloudV1CloudinstancesCosimagesPostNotFound) Code() int { } func (o *PcloudV1CloudinstancesCosimagesPostNotFound) Error() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/cos-images][%d] pcloudV1CloudinstancesCosimagesPostNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/cos-images][%d] pcloudV1CloudinstancesCosimagesPostNotFound %s", 404, payload) } func (o *PcloudV1CloudinstancesCosimagesPostNotFound) String() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/cos-images][%d] pcloudV1CloudinstancesCosimagesPostNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/cos-images][%d] pcloudV1CloudinstancesCosimagesPostNotFound %s", 404, payload) } func (o *PcloudV1CloudinstancesCosimagesPostNotFound) GetPayload() *models.Error { @@ -461,11 +472,13 @@ func (o *PcloudV1CloudinstancesCosimagesPostConflict) Code() int { } func (o *PcloudV1CloudinstancesCosimagesPostConflict) Error() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/cos-images][%d] pcloudV1CloudinstancesCosimagesPostConflict %+v", 409, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/cos-images][%d] pcloudV1CloudinstancesCosimagesPostConflict %s", 409, payload) } func (o *PcloudV1CloudinstancesCosimagesPostConflict) String() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/cos-images][%d] pcloudV1CloudinstancesCosimagesPostConflict %+v", 409, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/cos-images][%d] pcloudV1CloudinstancesCosimagesPostConflict %s", 409, payload) } func (o *PcloudV1CloudinstancesCosimagesPostConflict) GetPayload() *models.Error { @@ -529,11 +542,13 @@ func (o *PcloudV1CloudinstancesCosimagesPostUnprocessableEntity) Code() int { } func (o *PcloudV1CloudinstancesCosimagesPostUnprocessableEntity) Error() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/cos-images][%d] pcloudV1CloudinstancesCosimagesPostUnprocessableEntity %+v", 422, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/cos-images][%d] pcloudV1CloudinstancesCosimagesPostUnprocessableEntity %s", 422, payload) } func (o *PcloudV1CloudinstancesCosimagesPostUnprocessableEntity) String() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/cos-images][%d] pcloudV1CloudinstancesCosimagesPostUnprocessableEntity %+v", 422, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/cos-images][%d] pcloudV1CloudinstancesCosimagesPostUnprocessableEntity %s", 422, payload) } func (o *PcloudV1CloudinstancesCosimagesPostUnprocessableEntity) GetPayload() *models.Error { @@ -597,11 +612,13 @@ func (o *PcloudV1CloudinstancesCosimagesPostInternalServerError) Code() int { } func (o *PcloudV1CloudinstancesCosimagesPostInternalServerError) Error() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/cos-images][%d] pcloudV1CloudinstancesCosimagesPostInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/cos-images][%d] pcloudV1CloudinstancesCosimagesPostInternalServerError %s", 500, payload) } func (o *PcloudV1CloudinstancesCosimagesPostInternalServerError) String() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/cos-images][%d] pcloudV1CloudinstancesCosimagesPostInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/cos-images][%d] pcloudV1CloudinstancesCosimagesPostInternalServerError %s", 500, payload) } func (o *PcloudV1CloudinstancesCosimagesPostInternalServerError) GetPayload() *models.Error { diff --git a/power/client/p_cloud_images/pcloud_v2_images_export_get_responses.go b/power/client/p_cloud_images/pcloud_v2_images_export_get_responses.go index d1004447..27e8d1e4 100644 --- a/power/client/p_cloud_images/pcloud_v2_images_export_get_responses.go +++ b/power/client/p_cloud_images/pcloud_v2_images_export_get_responses.go @@ -6,6 +6,7 @@ package p_cloud_images // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -109,11 +110,13 @@ func (o *PcloudV2ImagesExportGetOK) Code() int { } func (o *PcloudV2ImagesExportGetOK) Error() string { - return fmt.Sprintf("[GET /pcloud/v2/cloud-instances/{cloud_instance_id}/images/{image_id}/export][%d] pcloudV2ImagesExportGetOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v2/cloud-instances/{cloud_instance_id}/images/{image_id}/export][%d] pcloudV2ImagesExportGetOK %s", 200, payload) } func (o *PcloudV2ImagesExportGetOK) String() string { - return fmt.Sprintf("[GET /pcloud/v2/cloud-instances/{cloud_instance_id}/images/{image_id}/export][%d] pcloudV2ImagesExportGetOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v2/cloud-instances/{cloud_instance_id}/images/{image_id}/export][%d] pcloudV2ImagesExportGetOK %s", 200, payload) } func (o *PcloudV2ImagesExportGetOK) GetPayload() *models.Job { @@ -177,11 +180,13 @@ func (o *PcloudV2ImagesExportGetBadRequest) Code() int { } func (o *PcloudV2ImagesExportGetBadRequest) Error() string { - return fmt.Sprintf("[GET /pcloud/v2/cloud-instances/{cloud_instance_id}/images/{image_id}/export][%d] pcloudV2ImagesExportGetBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v2/cloud-instances/{cloud_instance_id}/images/{image_id}/export][%d] pcloudV2ImagesExportGetBadRequest %s", 400, payload) } func (o *PcloudV2ImagesExportGetBadRequest) String() string { - return fmt.Sprintf("[GET /pcloud/v2/cloud-instances/{cloud_instance_id}/images/{image_id}/export][%d] pcloudV2ImagesExportGetBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v2/cloud-instances/{cloud_instance_id}/images/{image_id}/export][%d] pcloudV2ImagesExportGetBadRequest %s", 400, payload) } func (o *PcloudV2ImagesExportGetBadRequest) GetPayload() *models.Error { @@ -245,11 +250,13 @@ func (o *PcloudV2ImagesExportGetUnauthorized) Code() int { } func (o *PcloudV2ImagesExportGetUnauthorized) Error() string { - return fmt.Sprintf("[GET /pcloud/v2/cloud-instances/{cloud_instance_id}/images/{image_id}/export][%d] pcloudV2ImagesExportGetUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v2/cloud-instances/{cloud_instance_id}/images/{image_id}/export][%d] pcloudV2ImagesExportGetUnauthorized %s", 401, payload) } func (o *PcloudV2ImagesExportGetUnauthorized) String() string { - return fmt.Sprintf("[GET /pcloud/v2/cloud-instances/{cloud_instance_id}/images/{image_id}/export][%d] pcloudV2ImagesExportGetUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v2/cloud-instances/{cloud_instance_id}/images/{image_id}/export][%d] pcloudV2ImagesExportGetUnauthorized %s", 401, payload) } func (o *PcloudV2ImagesExportGetUnauthorized) GetPayload() *models.Error { @@ -313,11 +320,13 @@ func (o *PcloudV2ImagesExportGetForbidden) Code() int { } func (o *PcloudV2ImagesExportGetForbidden) Error() string { - return fmt.Sprintf("[GET /pcloud/v2/cloud-instances/{cloud_instance_id}/images/{image_id}/export][%d] pcloudV2ImagesExportGetForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v2/cloud-instances/{cloud_instance_id}/images/{image_id}/export][%d] pcloudV2ImagesExportGetForbidden %s", 403, payload) } func (o *PcloudV2ImagesExportGetForbidden) String() string { - return fmt.Sprintf("[GET /pcloud/v2/cloud-instances/{cloud_instance_id}/images/{image_id}/export][%d] pcloudV2ImagesExportGetForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v2/cloud-instances/{cloud_instance_id}/images/{image_id}/export][%d] pcloudV2ImagesExportGetForbidden %s", 403, payload) } func (o *PcloudV2ImagesExportGetForbidden) GetPayload() *models.Error { @@ -381,11 +390,13 @@ func (o *PcloudV2ImagesExportGetNotFound) Code() int { } func (o *PcloudV2ImagesExportGetNotFound) Error() string { - return fmt.Sprintf("[GET /pcloud/v2/cloud-instances/{cloud_instance_id}/images/{image_id}/export][%d] pcloudV2ImagesExportGetNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v2/cloud-instances/{cloud_instance_id}/images/{image_id}/export][%d] pcloudV2ImagesExportGetNotFound %s", 404, payload) } func (o *PcloudV2ImagesExportGetNotFound) String() string { - return fmt.Sprintf("[GET /pcloud/v2/cloud-instances/{cloud_instance_id}/images/{image_id}/export][%d] pcloudV2ImagesExportGetNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v2/cloud-instances/{cloud_instance_id}/images/{image_id}/export][%d] pcloudV2ImagesExportGetNotFound %s", 404, payload) } func (o *PcloudV2ImagesExportGetNotFound) GetPayload() *models.Error { @@ -449,11 +460,13 @@ func (o *PcloudV2ImagesExportGetInternalServerError) Code() int { } func (o *PcloudV2ImagesExportGetInternalServerError) Error() string { - return fmt.Sprintf("[GET /pcloud/v2/cloud-instances/{cloud_instance_id}/images/{image_id}/export][%d] pcloudV2ImagesExportGetInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v2/cloud-instances/{cloud_instance_id}/images/{image_id}/export][%d] pcloudV2ImagesExportGetInternalServerError %s", 500, payload) } func (o *PcloudV2ImagesExportGetInternalServerError) String() string { - return fmt.Sprintf("[GET /pcloud/v2/cloud-instances/{cloud_instance_id}/images/{image_id}/export][%d] pcloudV2ImagesExportGetInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v2/cloud-instances/{cloud_instance_id}/images/{image_id}/export][%d] pcloudV2ImagesExportGetInternalServerError %s", 500, payload) } func (o *PcloudV2ImagesExportGetInternalServerError) GetPayload() *models.Error { diff --git a/power/client/p_cloud_images/pcloud_v2_images_export_post_responses.go b/power/client/p_cloud_images/pcloud_v2_images_export_post_responses.go index 80ba815b..6abf0058 100644 --- a/power/client/p_cloud_images/pcloud_v2_images_export_post_responses.go +++ b/power/client/p_cloud_images/pcloud_v2_images_export_post_responses.go @@ -6,6 +6,7 @@ package p_cloud_images // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -121,11 +122,13 @@ func (o *PcloudV2ImagesExportPostAccepted) Code() int { } func (o *PcloudV2ImagesExportPostAccepted) Error() string { - return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/images/{image_id}/export][%d] pcloudV2ImagesExportPostAccepted %+v", 202, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/images/{image_id}/export][%d] pcloudV2ImagesExportPostAccepted %s", 202, payload) } func (o *PcloudV2ImagesExportPostAccepted) String() string { - return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/images/{image_id}/export][%d] pcloudV2ImagesExportPostAccepted %+v", 202, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/images/{image_id}/export][%d] pcloudV2ImagesExportPostAccepted %s", 202, payload) } func (o *PcloudV2ImagesExportPostAccepted) GetPayload() *models.JobReference { @@ -189,11 +192,13 @@ func (o *PcloudV2ImagesExportPostBadRequest) Code() int { } func (o *PcloudV2ImagesExportPostBadRequest) Error() string { - return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/images/{image_id}/export][%d] pcloudV2ImagesExportPostBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/images/{image_id}/export][%d] pcloudV2ImagesExportPostBadRequest %s", 400, payload) } func (o *PcloudV2ImagesExportPostBadRequest) String() string { - return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/images/{image_id}/export][%d] pcloudV2ImagesExportPostBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/images/{image_id}/export][%d] pcloudV2ImagesExportPostBadRequest %s", 400, payload) } func (o *PcloudV2ImagesExportPostBadRequest) GetPayload() *models.Error { @@ -257,11 +262,13 @@ func (o *PcloudV2ImagesExportPostUnauthorized) Code() int { } func (o *PcloudV2ImagesExportPostUnauthorized) Error() string { - return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/images/{image_id}/export][%d] pcloudV2ImagesExportPostUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/images/{image_id}/export][%d] pcloudV2ImagesExportPostUnauthorized %s", 401, payload) } func (o *PcloudV2ImagesExportPostUnauthorized) String() string { - return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/images/{image_id}/export][%d] pcloudV2ImagesExportPostUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/images/{image_id}/export][%d] pcloudV2ImagesExportPostUnauthorized %s", 401, payload) } func (o *PcloudV2ImagesExportPostUnauthorized) GetPayload() *models.Error { @@ -325,11 +332,13 @@ func (o *PcloudV2ImagesExportPostForbidden) Code() int { } func (o *PcloudV2ImagesExportPostForbidden) Error() string { - return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/images/{image_id}/export][%d] pcloudV2ImagesExportPostForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/images/{image_id}/export][%d] pcloudV2ImagesExportPostForbidden %s", 403, payload) } func (o *PcloudV2ImagesExportPostForbidden) String() string { - return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/images/{image_id}/export][%d] pcloudV2ImagesExportPostForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/images/{image_id}/export][%d] pcloudV2ImagesExportPostForbidden %s", 403, payload) } func (o *PcloudV2ImagesExportPostForbidden) GetPayload() *models.Error { @@ -356,7 +365,7 @@ func NewPcloudV2ImagesExportPostNotFound() *PcloudV2ImagesExportPostNotFound { /* PcloudV2ImagesExportPostNotFound describes a response with status code 404, with default header values. -image id not found +Not Found */ type PcloudV2ImagesExportPostNotFound struct { Payload *models.Error @@ -393,11 +402,13 @@ func (o *PcloudV2ImagesExportPostNotFound) Code() int { } func (o *PcloudV2ImagesExportPostNotFound) Error() string { - return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/images/{image_id}/export][%d] pcloudV2ImagesExportPostNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/images/{image_id}/export][%d] pcloudV2ImagesExportPostNotFound %s", 404, payload) } func (o *PcloudV2ImagesExportPostNotFound) String() string { - return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/images/{image_id}/export][%d] pcloudV2ImagesExportPostNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/images/{image_id}/export][%d] pcloudV2ImagesExportPostNotFound %s", 404, payload) } func (o *PcloudV2ImagesExportPostNotFound) GetPayload() *models.Error { @@ -461,11 +472,13 @@ func (o *PcloudV2ImagesExportPostConflict) Code() int { } func (o *PcloudV2ImagesExportPostConflict) Error() string { - return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/images/{image_id}/export][%d] pcloudV2ImagesExportPostConflict %+v", 409, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/images/{image_id}/export][%d] pcloudV2ImagesExportPostConflict %s", 409, payload) } func (o *PcloudV2ImagesExportPostConflict) String() string { - return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/images/{image_id}/export][%d] pcloudV2ImagesExportPostConflict %+v", 409, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/images/{image_id}/export][%d] pcloudV2ImagesExportPostConflict %s", 409, payload) } func (o *PcloudV2ImagesExportPostConflict) GetPayload() *models.Error { @@ -529,11 +542,13 @@ func (o *PcloudV2ImagesExportPostUnprocessableEntity) Code() int { } func (o *PcloudV2ImagesExportPostUnprocessableEntity) Error() string { - return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/images/{image_id}/export][%d] pcloudV2ImagesExportPostUnprocessableEntity %+v", 422, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/images/{image_id}/export][%d] pcloudV2ImagesExportPostUnprocessableEntity %s", 422, payload) } func (o *PcloudV2ImagesExportPostUnprocessableEntity) String() string { - return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/images/{image_id}/export][%d] pcloudV2ImagesExportPostUnprocessableEntity %+v", 422, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/images/{image_id}/export][%d] pcloudV2ImagesExportPostUnprocessableEntity %s", 422, payload) } func (o *PcloudV2ImagesExportPostUnprocessableEntity) GetPayload() *models.Error { @@ -597,11 +612,13 @@ func (o *PcloudV2ImagesExportPostInternalServerError) Code() int { } func (o *PcloudV2ImagesExportPostInternalServerError) Error() string { - return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/images/{image_id}/export][%d] pcloudV2ImagesExportPostInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/images/{image_id}/export][%d] pcloudV2ImagesExportPostInternalServerError %s", 500, payload) } func (o *PcloudV2ImagesExportPostInternalServerError) String() string { - return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/images/{image_id}/export][%d] pcloudV2ImagesExportPostInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/images/{image_id}/export][%d] pcloudV2ImagesExportPostInternalServerError %s", 500, payload) } func (o *PcloudV2ImagesExportPostInternalServerError) GetPayload() *models.Error { diff --git a/power/client/p_cloud_instances/p_cloud_instances_client.go b/power/client/p_cloud_instances/p_cloud_instances_client.go index 7a43f878..8f7720ee 100644 --- a/power/client/p_cloud_instances/p_cloud_instances_client.go +++ b/power/client/p_cloud_instances/p_cloud_instances_client.go @@ -9,6 +9,7 @@ import ( "fmt" "github.com/go-openapi/runtime" + httptransport "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" ) @@ -17,6 +18,31 @@ func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientServi return &Client{transport: transport, formats: formats} } +// New creates a new p cloud instances API client with basic auth credentials. +// It takes the following parameters: +// - host: http host (github.com). +// - basePath: any base path for the API client ("/v1", "/v3"). +// - scheme: http scheme ("http", "https"). +// - user: user for basic authentication header. +// - password: password for basic authentication header. +func NewClientWithBasicAuth(host, basePath, scheme, user, password string) ClientService { + transport := httptransport.New(host, basePath, []string{scheme}) + transport.DefaultAuthentication = httptransport.BasicAuth(user, password) + return &Client{transport: transport, formats: strfmt.Default} +} + +// New creates a new p cloud instances API client with a bearer token for authentication. +// It takes the following parameters: +// - host: http host (github.com). +// - basePath: any base path for the API client ("/v1", "/v3"). +// - scheme: http scheme ("http", "https"). +// - bearerToken: bearer token for Bearer authentication header. +func NewClientWithBearerToken(host, basePath, scheme, bearerToken string) ClientService { + transport := httptransport.New(host, basePath, []string{scheme}) + transport.DefaultAuthentication = httptransport.BearerToken(bearerToken) + return &Client{transport: transport, formats: strfmt.Default} +} + /* Client for p cloud instances API */ @@ -25,7 +51,7 @@ type Client struct { formats strfmt.Registry } -// ClientOption is the option for Client methods +// ClientOption may be used to customize the behavior of Client methods. type ClientOption func(*runtime.ClientOperation) // ClientService is the interface for Client methods diff --git a/power/client/p_cloud_instances/pcloud_cloudinstances_delete_responses.go b/power/client/p_cloud_instances/pcloud_cloudinstances_delete_responses.go index 220add32..380e0d18 100644 --- a/power/client/p_cloud_instances/pcloud_cloudinstances_delete_responses.go +++ b/power/client/p_cloud_instances/pcloud_cloudinstances_delete_responses.go @@ -6,6 +6,7 @@ package p_cloud_instances // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -115,11 +116,13 @@ func (o *PcloudCloudinstancesDeleteOK) Code() int { } func (o *PcloudCloudinstancesDeleteOK) Error() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}][%d] pcloudCloudinstancesDeleteOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}][%d] pcloudCloudinstancesDeleteOK %s", 200, payload) } func (o *PcloudCloudinstancesDeleteOK) String() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}][%d] pcloudCloudinstancesDeleteOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}][%d] pcloudCloudinstancesDeleteOK %s", 200, payload) } func (o *PcloudCloudinstancesDeleteOK) GetPayload() models.Object { @@ -181,11 +184,13 @@ func (o *PcloudCloudinstancesDeleteBadRequest) Code() int { } func (o *PcloudCloudinstancesDeleteBadRequest) Error() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}][%d] pcloudCloudinstancesDeleteBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}][%d] pcloudCloudinstancesDeleteBadRequest %s", 400, payload) } func (o *PcloudCloudinstancesDeleteBadRequest) String() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}][%d] pcloudCloudinstancesDeleteBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}][%d] pcloudCloudinstancesDeleteBadRequest %s", 400, payload) } func (o *PcloudCloudinstancesDeleteBadRequest) GetPayload() *models.Error { @@ -249,11 +254,13 @@ func (o *PcloudCloudinstancesDeleteUnauthorized) Code() int { } func (o *PcloudCloudinstancesDeleteUnauthorized) Error() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}][%d] pcloudCloudinstancesDeleteUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}][%d] pcloudCloudinstancesDeleteUnauthorized %s", 401, payload) } func (o *PcloudCloudinstancesDeleteUnauthorized) String() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}][%d] pcloudCloudinstancesDeleteUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}][%d] pcloudCloudinstancesDeleteUnauthorized %s", 401, payload) } func (o *PcloudCloudinstancesDeleteUnauthorized) GetPayload() *models.Error { @@ -317,11 +324,13 @@ func (o *PcloudCloudinstancesDeleteForbidden) Code() int { } func (o *PcloudCloudinstancesDeleteForbidden) Error() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}][%d] pcloudCloudinstancesDeleteForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}][%d] pcloudCloudinstancesDeleteForbidden %s", 403, payload) } func (o *PcloudCloudinstancesDeleteForbidden) String() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}][%d] pcloudCloudinstancesDeleteForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}][%d] pcloudCloudinstancesDeleteForbidden %s", 403, payload) } func (o *PcloudCloudinstancesDeleteForbidden) GetPayload() *models.Error { @@ -385,11 +394,13 @@ func (o *PcloudCloudinstancesDeleteNotFound) Code() int { } func (o *PcloudCloudinstancesDeleteNotFound) Error() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}][%d] pcloudCloudinstancesDeleteNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}][%d] pcloudCloudinstancesDeleteNotFound %s", 404, payload) } func (o *PcloudCloudinstancesDeleteNotFound) String() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}][%d] pcloudCloudinstancesDeleteNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}][%d] pcloudCloudinstancesDeleteNotFound %s", 404, payload) } func (o *PcloudCloudinstancesDeleteNotFound) GetPayload() *models.Error { @@ -453,11 +464,13 @@ func (o *PcloudCloudinstancesDeleteGone) Code() int { } func (o *PcloudCloudinstancesDeleteGone) Error() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}][%d] pcloudCloudinstancesDeleteGone %+v", 410, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}][%d] pcloudCloudinstancesDeleteGone %s", 410, payload) } func (o *PcloudCloudinstancesDeleteGone) String() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}][%d] pcloudCloudinstancesDeleteGone %+v", 410, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}][%d] pcloudCloudinstancesDeleteGone %s", 410, payload) } func (o *PcloudCloudinstancesDeleteGone) GetPayload() *models.Error { @@ -521,11 +534,13 @@ func (o *PcloudCloudinstancesDeleteInternalServerError) Code() int { } func (o *PcloudCloudinstancesDeleteInternalServerError) Error() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}][%d] pcloudCloudinstancesDeleteInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}][%d] pcloudCloudinstancesDeleteInternalServerError %s", 500, payload) } func (o *PcloudCloudinstancesDeleteInternalServerError) String() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}][%d] pcloudCloudinstancesDeleteInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}][%d] pcloudCloudinstancesDeleteInternalServerError %s", 500, payload) } func (o *PcloudCloudinstancesDeleteInternalServerError) GetPayload() *models.Error { diff --git a/power/client/p_cloud_instances/pcloud_cloudinstances_get_responses.go b/power/client/p_cloud_instances/pcloud_cloudinstances_get_responses.go index 37be0bd2..0c968e37 100644 --- a/power/client/p_cloud_instances/pcloud_cloudinstances_get_responses.go +++ b/power/client/p_cloud_instances/pcloud_cloudinstances_get_responses.go @@ -6,6 +6,7 @@ package p_cloud_instances // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -109,11 +110,13 @@ func (o *PcloudCloudinstancesGetOK) Code() int { } func (o *PcloudCloudinstancesGetOK) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}][%d] pcloudCloudinstancesGetOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}][%d] pcloudCloudinstancesGetOK %s", 200, payload) } func (o *PcloudCloudinstancesGetOK) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}][%d] pcloudCloudinstancesGetOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}][%d] pcloudCloudinstancesGetOK %s", 200, payload) } func (o *PcloudCloudinstancesGetOK) GetPayload() *models.CloudInstance { @@ -177,11 +180,13 @@ func (o *PcloudCloudinstancesGetBadRequest) Code() int { } func (o *PcloudCloudinstancesGetBadRequest) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}][%d] pcloudCloudinstancesGetBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}][%d] pcloudCloudinstancesGetBadRequest %s", 400, payload) } func (o *PcloudCloudinstancesGetBadRequest) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}][%d] pcloudCloudinstancesGetBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}][%d] pcloudCloudinstancesGetBadRequest %s", 400, payload) } func (o *PcloudCloudinstancesGetBadRequest) GetPayload() *models.Error { @@ -245,11 +250,13 @@ func (o *PcloudCloudinstancesGetUnauthorized) Code() int { } func (o *PcloudCloudinstancesGetUnauthorized) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}][%d] pcloudCloudinstancesGetUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}][%d] pcloudCloudinstancesGetUnauthorized %s", 401, payload) } func (o *PcloudCloudinstancesGetUnauthorized) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}][%d] pcloudCloudinstancesGetUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}][%d] pcloudCloudinstancesGetUnauthorized %s", 401, payload) } func (o *PcloudCloudinstancesGetUnauthorized) GetPayload() *models.Error { @@ -313,11 +320,13 @@ func (o *PcloudCloudinstancesGetForbidden) Code() int { } func (o *PcloudCloudinstancesGetForbidden) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}][%d] pcloudCloudinstancesGetForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}][%d] pcloudCloudinstancesGetForbidden %s", 403, payload) } func (o *PcloudCloudinstancesGetForbidden) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}][%d] pcloudCloudinstancesGetForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}][%d] pcloudCloudinstancesGetForbidden %s", 403, payload) } func (o *PcloudCloudinstancesGetForbidden) GetPayload() *models.Error { @@ -381,11 +390,13 @@ func (o *PcloudCloudinstancesGetNotFound) Code() int { } func (o *PcloudCloudinstancesGetNotFound) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}][%d] pcloudCloudinstancesGetNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}][%d] pcloudCloudinstancesGetNotFound %s", 404, payload) } func (o *PcloudCloudinstancesGetNotFound) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}][%d] pcloudCloudinstancesGetNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}][%d] pcloudCloudinstancesGetNotFound %s", 404, payload) } func (o *PcloudCloudinstancesGetNotFound) GetPayload() *models.Error { @@ -449,11 +460,13 @@ func (o *PcloudCloudinstancesGetInternalServerError) Code() int { } func (o *PcloudCloudinstancesGetInternalServerError) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}][%d] pcloudCloudinstancesGetInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}][%d] pcloudCloudinstancesGetInternalServerError %s", 500, payload) } func (o *PcloudCloudinstancesGetInternalServerError) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}][%d] pcloudCloudinstancesGetInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}][%d] pcloudCloudinstancesGetInternalServerError %s", 500, payload) } func (o *PcloudCloudinstancesGetInternalServerError) GetPayload() *models.Error { diff --git a/power/client/p_cloud_instances/pcloud_cloudinstances_put_responses.go b/power/client/p_cloud_instances/pcloud_cloudinstances_put_responses.go index 23f5465c..98f67611 100644 --- a/power/client/p_cloud_instances/pcloud_cloudinstances_put_responses.go +++ b/power/client/p_cloud_instances/pcloud_cloudinstances_put_responses.go @@ -6,6 +6,7 @@ package p_cloud_instances // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -115,11 +116,13 @@ func (o *PcloudCloudinstancesPutOK) Code() int { } func (o *PcloudCloudinstancesPutOK) Error() string { - return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}][%d] pcloudCloudinstancesPutOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}][%d] pcloudCloudinstancesPutOK %s", 200, payload) } func (o *PcloudCloudinstancesPutOK) String() string { - return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}][%d] pcloudCloudinstancesPutOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}][%d] pcloudCloudinstancesPutOK %s", 200, payload) } func (o *PcloudCloudinstancesPutOK) GetPayload() *models.CloudInstance { @@ -183,11 +186,13 @@ func (o *PcloudCloudinstancesPutBadRequest) Code() int { } func (o *PcloudCloudinstancesPutBadRequest) Error() string { - return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}][%d] pcloudCloudinstancesPutBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}][%d] pcloudCloudinstancesPutBadRequest %s", 400, payload) } func (o *PcloudCloudinstancesPutBadRequest) String() string { - return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}][%d] pcloudCloudinstancesPutBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}][%d] pcloudCloudinstancesPutBadRequest %s", 400, payload) } func (o *PcloudCloudinstancesPutBadRequest) GetPayload() *models.Error { @@ -251,11 +256,13 @@ func (o *PcloudCloudinstancesPutUnauthorized) Code() int { } func (o *PcloudCloudinstancesPutUnauthorized) Error() string { - return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}][%d] pcloudCloudinstancesPutUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}][%d] pcloudCloudinstancesPutUnauthorized %s", 401, payload) } func (o *PcloudCloudinstancesPutUnauthorized) String() string { - return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}][%d] pcloudCloudinstancesPutUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}][%d] pcloudCloudinstancesPutUnauthorized %s", 401, payload) } func (o *PcloudCloudinstancesPutUnauthorized) GetPayload() *models.Error { @@ -319,11 +326,13 @@ func (o *PcloudCloudinstancesPutForbidden) Code() int { } func (o *PcloudCloudinstancesPutForbidden) Error() string { - return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}][%d] pcloudCloudinstancesPutForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}][%d] pcloudCloudinstancesPutForbidden %s", 403, payload) } func (o *PcloudCloudinstancesPutForbidden) String() string { - return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}][%d] pcloudCloudinstancesPutForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}][%d] pcloudCloudinstancesPutForbidden %s", 403, payload) } func (o *PcloudCloudinstancesPutForbidden) GetPayload() *models.Error { @@ -387,11 +396,13 @@ func (o *PcloudCloudinstancesPutNotFound) Code() int { } func (o *PcloudCloudinstancesPutNotFound) Error() string { - return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}][%d] pcloudCloudinstancesPutNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}][%d] pcloudCloudinstancesPutNotFound %s", 404, payload) } func (o *PcloudCloudinstancesPutNotFound) String() string { - return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}][%d] pcloudCloudinstancesPutNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}][%d] pcloudCloudinstancesPutNotFound %s", 404, payload) } func (o *PcloudCloudinstancesPutNotFound) GetPayload() *models.Error { @@ -455,11 +466,13 @@ func (o *PcloudCloudinstancesPutUnprocessableEntity) Code() int { } func (o *PcloudCloudinstancesPutUnprocessableEntity) Error() string { - return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}][%d] pcloudCloudinstancesPutUnprocessableEntity %+v", 422, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}][%d] pcloudCloudinstancesPutUnprocessableEntity %s", 422, payload) } func (o *PcloudCloudinstancesPutUnprocessableEntity) String() string { - return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}][%d] pcloudCloudinstancesPutUnprocessableEntity %+v", 422, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}][%d] pcloudCloudinstancesPutUnprocessableEntity %s", 422, payload) } func (o *PcloudCloudinstancesPutUnprocessableEntity) GetPayload() *models.Error { @@ -523,11 +536,13 @@ func (o *PcloudCloudinstancesPutInternalServerError) Code() int { } func (o *PcloudCloudinstancesPutInternalServerError) Error() string { - return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}][%d] pcloudCloudinstancesPutInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}][%d] pcloudCloudinstancesPutInternalServerError %s", 500, payload) } func (o *PcloudCloudinstancesPutInternalServerError) String() string { - return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}][%d] pcloudCloudinstancesPutInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}][%d] pcloudCloudinstancesPutInternalServerError %s", 500, payload) } func (o *PcloudCloudinstancesPutInternalServerError) GetPayload() *models.Error { diff --git a/power/client/p_cloud_jobs/p_cloud_jobs_client.go b/power/client/p_cloud_jobs/p_cloud_jobs_client.go index 37612074..d0231988 100644 --- a/power/client/p_cloud_jobs/p_cloud_jobs_client.go +++ b/power/client/p_cloud_jobs/p_cloud_jobs_client.go @@ -9,6 +9,7 @@ import ( "fmt" "github.com/go-openapi/runtime" + httptransport "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" ) @@ -17,6 +18,31 @@ func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientServi return &Client{transport: transport, formats: formats} } +// New creates a new p cloud jobs API client with basic auth credentials. +// It takes the following parameters: +// - host: http host (github.com). +// - basePath: any base path for the API client ("/v1", "/v3"). +// - scheme: http scheme ("http", "https"). +// - user: user for basic authentication header. +// - password: password for basic authentication header. +func NewClientWithBasicAuth(host, basePath, scheme, user, password string) ClientService { + transport := httptransport.New(host, basePath, []string{scheme}) + transport.DefaultAuthentication = httptransport.BasicAuth(user, password) + return &Client{transport: transport, formats: strfmt.Default} +} + +// New creates a new p cloud jobs API client with a bearer token for authentication. +// It takes the following parameters: +// - host: http host (github.com). +// - basePath: any base path for the API client ("/v1", "/v3"). +// - scheme: http scheme ("http", "https"). +// - bearerToken: bearer token for Bearer authentication header. +func NewClientWithBearerToken(host, basePath, scheme, bearerToken string) ClientService { + transport := httptransport.New(host, basePath, []string{scheme}) + transport.DefaultAuthentication = httptransport.BearerToken(bearerToken) + return &Client{transport: transport, formats: strfmt.Default} +} + /* Client for p cloud jobs API */ @@ -25,7 +51,7 @@ type Client struct { formats strfmt.Registry } -// ClientOption is the option for Client methods +// ClientOption may be used to customize the behavior of Client methods. type ClientOption func(*runtime.ClientOperation) // ClientService is the interface for Client methods diff --git a/power/client/p_cloud_jobs/pcloud_cloudinstances_jobs_delete_responses.go b/power/client/p_cloud_jobs/pcloud_cloudinstances_jobs_delete_responses.go index eac90dc7..615f8e86 100644 --- a/power/client/p_cloud_jobs/pcloud_cloudinstances_jobs_delete_responses.go +++ b/power/client/p_cloud_jobs/pcloud_cloudinstances_jobs_delete_responses.go @@ -6,6 +6,7 @@ package p_cloud_jobs // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -115,11 +116,13 @@ func (o *PcloudCloudinstancesJobsDeleteOK) Code() int { } func (o *PcloudCloudinstancesJobsDeleteOK) Error() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/jobs/{job_id}][%d] pcloudCloudinstancesJobsDeleteOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/jobs/{job_id}][%d] pcloudCloudinstancesJobsDeleteOK %s", 200, payload) } func (o *PcloudCloudinstancesJobsDeleteOK) String() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/jobs/{job_id}][%d] pcloudCloudinstancesJobsDeleteOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/jobs/{job_id}][%d] pcloudCloudinstancesJobsDeleteOK %s", 200, payload) } func (o *PcloudCloudinstancesJobsDeleteOK) GetPayload() models.Object { @@ -181,11 +184,13 @@ func (o *PcloudCloudinstancesJobsDeleteBadRequest) Code() int { } func (o *PcloudCloudinstancesJobsDeleteBadRequest) Error() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/jobs/{job_id}][%d] pcloudCloudinstancesJobsDeleteBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/jobs/{job_id}][%d] pcloudCloudinstancesJobsDeleteBadRequest %s", 400, payload) } func (o *PcloudCloudinstancesJobsDeleteBadRequest) String() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/jobs/{job_id}][%d] pcloudCloudinstancesJobsDeleteBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/jobs/{job_id}][%d] pcloudCloudinstancesJobsDeleteBadRequest %s", 400, payload) } func (o *PcloudCloudinstancesJobsDeleteBadRequest) GetPayload() *models.Error { @@ -249,11 +254,13 @@ func (o *PcloudCloudinstancesJobsDeleteUnauthorized) Code() int { } func (o *PcloudCloudinstancesJobsDeleteUnauthorized) Error() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/jobs/{job_id}][%d] pcloudCloudinstancesJobsDeleteUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/jobs/{job_id}][%d] pcloudCloudinstancesJobsDeleteUnauthorized %s", 401, payload) } func (o *PcloudCloudinstancesJobsDeleteUnauthorized) String() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/jobs/{job_id}][%d] pcloudCloudinstancesJobsDeleteUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/jobs/{job_id}][%d] pcloudCloudinstancesJobsDeleteUnauthorized %s", 401, payload) } func (o *PcloudCloudinstancesJobsDeleteUnauthorized) GetPayload() *models.Error { @@ -317,11 +324,13 @@ func (o *PcloudCloudinstancesJobsDeleteForbidden) Code() int { } func (o *PcloudCloudinstancesJobsDeleteForbidden) Error() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/jobs/{job_id}][%d] pcloudCloudinstancesJobsDeleteForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/jobs/{job_id}][%d] pcloudCloudinstancesJobsDeleteForbidden %s", 403, payload) } func (o *PcloudCloudinstancesJobsDeleteForbidden) String() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/jobs/{job_id}][%d] pcloudCloudinstancesJobsDeleteForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/jobs/{job_id}][%d] pcloudCloudinstancesJobsDeleteForbidden %s", 403, payload) } func (o *PcloudCloudinstancesJobsDeleteForbidden) GetPayload() *models.Error { @@ -385,11 +394,13 @@ func (o *PcloudCloudinstancesJobsDeleteNotFound) Code() int { } func (o *PcloudCloudinstancesJobsDeleteNotFound) Error() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/jobs/{job_id}][%d] pcloudCloudinstancesJobsDeleteNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/jobs/{job_id}][%d] pcloudCloudinstancesJobsDeleteNotFound %s", 404, payload) } func (o *PcloudCloudinstancesJobsDeleteNotFound) String() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/jobs/{job_id}][%d] pcloudCloudinstancesJobsDeleteNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/jobs/{job_id}][%d] pcloudCloudinstancesJobsDeleteNotFound %s", 404, payload) } func (o *PcloudCloudinstancesJobsDeleteNotFound) GetPayload() *models.Error { @@ -453,11 +464,13 @@ func (o *PcloudCloudinstancesJobsDeleteConflict) Code() int { } func (o *PcloudCloudinstancesJobsDeleteConflict) Error() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/jobs/{job_id}][%d] pcloudCloudinstancesJobsDeleteConflict %+v", 409, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/jobs/{job_id}][%d] pcloudCloudinstancesJobsDeleteConflict %s", 409, payload) } func (o *PcloudCloudinstancesJobsDeleteConflict) String() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/jobs/{job_id}][%d] pcloudCloudinstancesJobsDeleteConflict %+v", 409, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/jobs/{job_id}][%d] pcloudCloudinstancesJobsDeleteConflict %s", 409, payload) } func (o *PcloudCloudinstancesJobsDeleteConflict) GetPayload() *models.Error { @@ -521,11 +534,13 @@ func (o *PcloudCloudinstancesJobsDeleteInternalServerError) Code() int { } func (o *PcloudCloudinstancesJobsDeleteInternalServerError) Error() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/jobs/{job_id}][%d] pcloudCloudinstancesJobsDeleteInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/jobs/{job_id}][%d] pcloudCloudinstancesJobsDeleteInternalServerError %s", 500, payload) } func (o *PcloudCloudinstancesJobsDeleteInternalServerError) String() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/jobs/{job_id}][%d] pcloudCloudinstancesJobsDeleteInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/jobs/{job_id}][%d] pcloudCloudinstancesJobsDeleteInternalServerError %s", 500, payload) } func (o *PcloudCloudinstancesJobsDeleteInternalServerError) GetPayload() *models.Error { diff --git a/power/client/p_cloud_jobs/pcloud_cloudinstances_jobs_get_responses.go b/power/client/p_cloud_jobs/pcloud_cloudinstances_jobs_get_responses.go index 06a8875f..21e1563b 100644 --- a/power/client/p_cloud_jobs/pcloud_cloudinstances_jobs_get_responses.go +++ b/power/client/p_cloud_jobs/pcloud_cloudinstances_jobs_get_responses.go @@ -6,6 +6,7 @@ package p_cloud_jobs // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -109,11 +110,13 @@ func (o *PcloudCloudinstancesJobsGetOK) Code() int { } func (o *PcloudCloudinstancesJobsGetOK) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/jobs/{job_id}][%d] pcloudCloudinstancesJobsGetOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/jobs/{job_id}][%d] pcloudCloudinstancesJobsGetOK %s", 200, payload) } func (o *PcloudCloudinstancesJobsGetOK) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/jobs/{job_id}][%d] pcloudCloudinstancesJobsGetOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/jobs/{job_id}][%d] pcloudCloudinstancesJobsGetOK %s", 200, payload) } func (o *PcloudCloudinstancesJobsGetOK) GetPayload() *models.Job { @@ -177,11 +180,13 @@ func (o *PcloudCloudinstancesJobsGetBadRequest) Code() int { } func (o *PcloudCloudinstancesJobsGetBadRequest) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/jobs/{job_id}][%d] pcloudCloudinstancesJobsGetBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/jobs/{job_id}][%d] pcloudCloudinstancesJobsGetBadRequest %s", 400, payload) } func (o *PcloudCloudinstancesJobsGetBadRequest) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/jobs/{job_id}][%d] pcloudCloudinstancesJobsGetBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/jobs/{job_id}][%d] pcloudCloudinstancesJobsGetBadRequest %s", 400, payload) } func (o *PcloudCloudinstancesJobsGetBadRequest) GetPayload() *models.Error { @@ -245,11 +250,13 @@ func (o *PcloudCloudinstancesJobsGetUnauthorized) Code() int { } func (o *PcloudCloudinstancesJobsGetUnauthorized) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/jobs/{job_id}][%d] pcloudCloudinstancesJobsGetUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/jobs/{job_id}][%d] pcloudCloudinstancesJobsGetUnauthorized %s", 401, payload) } func (o *PcloudCloudinstancesJobsGetUnauthorized) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/jobs/{job_id}][%d] pcloudCloudinstancesJobsGetUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/jobs/{job_id}][%d] pcloudCloudinstancesJobsGetUnauthorized %s", 401, payload) } func (o *PcloudCloudinstancesJobsGetUnauthorized) GetPayload() *models.Error { @@ -313,11 +320,13 @@ func (o *PcloudCloudinstancesJobsGetForbidden) Code() int { } func (o *PcloudCloudinstancesJobsGetForbidden) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/jobs/{job_id}][%d] pcloudCloudinstancesJobsGetForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/jobs/{job_id}][%d] pcloudCloudinstancesJobsGetForbidden %s", 403, payload) } func (o *PcloudCloudinstancesJobsGetForbidden) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/jobs/{job_id}][%d] pcloudCloudinstancesJobsGetForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/jobs/{job_id}][%d] pcloudCloudinstancesJobsGetForbidden %s", 403, payload) } func (o *PcloudCloudinstancesJobsGetForbidden) GetPayload() *models.Error { @@ -381,11 +390,13 @@ func (o *PcloudCloudinstancesJobsGetNotFound) Code() int { } func (o *PcloudCloudinstancesJobsGetNotFound) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/jobs/{job_id}][%d] pcloudCloudinstancesJobsGetNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/jobs/{job_id}][%d] pcloudCloudinstancesJobsGetNotFound %s", 404, payload) } func (o *PcloudCloudinstancesJobsGetNotFound) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/jobs/{job_id}][%d] pcloudCloudinstancesJobsGetNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/jobs/{job_id}][%d] pcloudCloudinstancesJobsGetNotFound %s", 404, payload) } func (o *PcloudCloudinstancesJobsGetNotFound) GetPayload() *models.Error { @@ -449,11 +460,13 @@ func (o *PcloudCloudinstancesJobsGetInternalServerError) Code() int { } func (o *PcloudCloudinstancesJobsGetInternalServerError) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/jobs/{job_id}][%d] pcloudCloudinstancesJobsGetInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/jobs/{job_id}][%d] pcloudCloudinstancesJobsGetInternalServerError %s", 500, payload) } func (o *PcloudCloudinstancesJobsGetInternalServerError) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/jobs/{job_id}][%d] pcloudCloudinstancesJobsGetInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/jobs/{job_id}][%d] pcloudCloudinstancesJobsGetInternalServerError %s", 500, payload) } func (o *PcloudCloudinstancesJobsGetInternalServerError) GetPayload() *models.Error { diff --git a/power/client/p_cloud_jobs/pcloud_cloudinstances_jobs_getall_responses.go b/power/client/p_cloud_jobs/pcloud_cloudinstances_jobs_getall_responses.go index 543855da..c5dfea04 100644 --- a/power/client/p_cloud_jobs/pcloud_cloudinstances_jobs_getall_responses.go +++ b/power/client/p_cloud_jobs/pcloud_cloudinstances_jobs_getall_responses.go @@ -6,6 +6,7 @@ package p_cloud_jobs // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -109,11 +110,13 @@ func (o *PcloudCloudinstancesJobsGetallOK) Code() int { } func (o *PcloudCloudinstancesJobsGetallOK) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/jobs][%d] pcloudCloudinstancesJobsGetallOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/jobs][%d] pcloudCloudinstancesJobsGetallOK %s", 200, payload) } func (o *PcloudCloudinstancesJobsGetallOK) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/jobs][%d] pcloudCloudinstancesJobsGetallOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/jobs][%d] pcloudCloudinstancesJobsGetallOK %s", 200, payload) } func (o *PcloudCloudinstancesJobsGetallOK) GetPayload() *models.Jobs { @@ -177,11 +180,13 @@ func (o *PcloudCloudinstancesJobsGetallBadRequest) Code() int { } func (o *PcloudCloudinstancesJobsGetallBadRequest) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/jobs][%d] pcloudCloudinstancesJobsGetallBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/jobs][%d] pcloudCloudinstancesJobsGetallBadRequest %s", 400, payload) } func (o *PcloudCloudinstancesJobsGetallBadRequest) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/jobs][%d] pcloudCloudinstancesJobsGetallBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/jobs][%d] pcloudCloudinstancesJobsGetallBadRequest %s", 400, payload) } func (o *PcloudCloudinstancesJobsGetallBadRequest) GetPayload() *models.Error { @@ -245,11 +250,13 @@ func (o *PcloudCloudinstancesJobsGetallUnauthorized) Code() int { } func (o *PcloudCloudinstancesJobsGetallUnauthorized) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/jobs][%d] pcloudCloudinstancesJobsGetallUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/jobs][%d] pcloudCloudinstancesJobsGetallUnauthorized %s", 401, payload) } func (o *PcloudCloudinstancesJobsGetallUnauthorized) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/jobs][%d] pcloudCloudinstancesJobsGetallUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/jobs][%d] pcloudCloudinstancesJobsGetallUnauthorized %s", 401, payload) } func (o *PcloudCloudinstancesJobsGetallUnauthorized) GetPayload() *models.Error { @@ -313,11 +320,13 @@ func (o *PcloudCloudinstancesJobsGetallForbidden) Code() int { } func (o *PcloudCloudinstancesJobsGetallForbidden) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/jobs][%d] pcloudCloudinstancesJobsGetallForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/jobs][%d] pcloudCloudinstancesJobsGetallForbidden %s", 403, payload) } func (o *PcloudCloudinstancesJobsGetallForbidden) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/jobs][%d] pcloudCloudinstancesJobsGetallForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/jobs][%d] pcloudCloudinstancesJobsGetallForbidden %s", 403, payload) } func (o *PcloudCloudinstancesJobsGetallForbidden) GetPayload() *models.Error { @@ -381,11 +390,13 @@ func (o *PcloudCloudinstancesJobsGetallNotFound) Code() int { } func (o *PcloudCloudinstancesJobsGetallNotFound) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/jobs][%d] pcloudCloudinstancesJobsGetallNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/jobs][%d] pcloudCloudinstancesJobsGetallNotFound %s", 404, payload) } func (o *PcloudCloudinstancesJobsGetallNotFound) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/jobs][%d] pcloudCloudinstancesJobsGetallNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/jobs][%d] pcloudCloudinstancesJobsGetallNotFound %s", 404, payload) } func (o *PcloudCloudinstancesJobsGetallNotFound) GetPayload() *models.Error { @@ -449,11 +460,13 @@ func (o *PcloudCloudinstancesJobsGetallInternalServerError) Code() int { } func (o *PcloudCloudinstancesJobsGetallInternalServerError) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/jobs][%d] pcloudCloudinstancesJobsGetallInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/jobs][%d] pcloudCloudinstancesJobsGetallInternalServerError %s", 500, payload) } func (o *PcloudCloudinstancesJobsGetallInternalServerError) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/jobs][%d] pcloudCloudinstancesJobsGetallInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/jobs][%d] pcloudCloudinstancesJobsGetallInternalServerError %s", 500, payload) } func (o *PcloudCloudinstancesJobsGetallInternalServerError) GetPayload() *models.Error { diff --git a/power/client/p_cloud_networks/p_cloud_networks_client.go b/power/client/p_cloud_networks/p_cloud_networks_client.go index 438b0652..3b57844d 100644 --- a/power/client/p_cloud_networks/p_cloud_networks_client.go +++ b/power/client/p_cloud_networks/p_cloud_networks_client.go @@ -9,6 +9,7 @@ import ( "fmt" "github.com/go-openapi/runtime" + httptransport "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" ) @@ -17,6 +18,31 @@ func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientServi return &Client{transport: transport, formats: formats} } +// New creates a new p cloud networks API client with basic auth credentials. +// It takes the following parameters: +// - host: http host (github.com). +// - basePath: any base path for the API client ("/v1", "/v3"). +// - scheme: http scheme ("http", "https"). +// - user: user for basic authentication header. +// - password: password for basic authentication header. +func NewClientWithBasicAuth(host, basePath, scheme, user, password string) ClientService { + transport := httptransport.New(host, basePath, []string{scheme}) + transport.DefaultAuthentication = httptransport.BasicAuth(user, password) + return &Client{transport: transport, formats: strfmt.Default} +} + +// New creates a new p cloud networks API client with a bearer token for authentication. +// It takes the following parameters: +// - host: http host (github.com). +// - basePath: any base path for the API client ("/v1", "/v3"). +// - scheme: http scheme ("http", "https"). +// - bearerToken: bearer token for Bearer authentication header. +func NewClientWithBearerToken(host, basePath, scheme, bearerToken string) ClientService { + transport := httptransport.New(host, basePath, []string{scheme}) + transport.DefaultAuthentication = httptransport.BearerToken(bearerToken) + return &Client{transport: transport, formats: strfmt.Default} +} + /* Client for p cloud networks API */ @@ -25,7 +51,7 @@ type Client struct { formats strfmt.Registry } -// ClientOption is the option for Client methods +// ClientOption may be used to customize the behavior of Client methods. type ClientOption func(*runtime.ClientOperation) // ClientService is the interface for Client methods diff --git a/power/client/p_cloud_networks/pcloud_networks_delete_responses.go b/power/client/p_cloud_networks/pcloud_networks_delete_responses.go index 817554ec..e16ec779 100644 --- a/power/client/p_cloud_networks/pcloud_networks_delete_responses.go +++ b/power/client/p_cloud_networks/pcloud_networks_delete_responses.go @@ -6,6 +6,7 @@ package p_cloud_networks // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -115,11 +116,13 @@ func (o *PcloudNetworksDeleteOK) Code() int { } func (o *PcloudNetworksDeleteOK) Error() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}][%d] pcloudNetworksDeleteOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}][%d] pcloudNetworksDeleteOK %s", 200, payload) } func (o *PcloudNetworksDeleteOK) String() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}][%d] pcloudNetworksDeleteOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}][%d] pcloudNetworksDeleteOK %s", 200, payload) } func (o *PcloudNetworksDeleteOK) GetPayload() models.Object { @@ -181,11 +184,13 @@ func (o *PcloudNetworksDeleteBadRequest) Code() int { } func (o *PcloudNetworksDeleteBadRequest) Error() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}][%d] pcloudNetworksDeleteBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}][%d] pcloudNetworksDeleteBadRequest %s", 400, payload) } func (o *PcloudNetworksDeleteBadRequest) String() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}][%d] pcloudNetworksDeleteBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}][%d] pcloudNetworksDeleteBadRequest %s", 400, payload) } func (o *PcloudNetworksDeleteBadRequest) GetPayload() *models.Error { @@ -249,11 +254,13 @@ func (o *PcloudNetworksDeleteUnauthorized) Code() int { } func (o *PcloudNetworksDeleteUnauthorized) Error() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}][%d] pcloudNetworksDeleteUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}][%d] pcloudNetworksDeleteUnauthorized %s", 401, payload) } func (o *PcloudNetworksDeleteUnauthorized) String() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}][%d] pcloudNetworksDeleteUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}][%d] pcloudNetworksDeleteUnauthorized %s", 401, payload) } func (o *PcloudNetworksDeleteUnauthorized) GetPayload() *models.Error { @@ -317,11 +324,13 @@ func (o *PcloudNetworksDeleteForbidden) Code() int { } func (o *PcloudNetworksDeleteForbidden) Error() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}][%d] pcloudNetworksDeleteForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}][%d] pcloudNetworksDeleteForbidden %s", 403, payload) } func (o *PcloudNetworksDeleteForbidden) String() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}][%d] pcloudNetworksDeleteForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}][%d] pcloudNetworksDeleteForbidden %s", 403, payload) } func (o *PcloudNetworksDeleteForbidden) GetPayload() *models.Error { @@ -385,11 +394,13 @@ func (o *PcloudNetworksDeleteNotFound) Code() int { } func (o *PcloudNetworksDeleteNotFound) Error() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}][%d] pcloudNetworksDeleteNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}][%d] pcloudNetworksDeleteNotFound %s", 404, payload) } func (o *PcloudNetworksDeleteNotFound) String() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}][%d] pcloudNetworksDeleteNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}][%d] pcloudNetworksDeleteNotFound %s", 404, payload) } func (o *PcloudNetworksDeleteNotFound) GetPayload() *models.Error { @@ -453,11 +464,13 @@ func (o *PcloudNetworksDeleteGone) Code() int { } func (o *PcloudNetworksDeleteGone) Error() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}][%d] pcloudNetworksDeleteGone %+v", 410, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}][%d] pcloudNetworksDeleteGone %s", 410, payload) } func (o *PcloudNetworksDeleteGone) String() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}][%d] pcloudNetworksDeleteGone %+v", 410, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}][%d] pcloudNetworksDeleteGone %s", 410, payload) } func (o *PcloudNetworksDeleteGone) GetPayload() *models.Error { @@ -521,11 +534,13 @@ func (o *PcloudNetworksDeleteInternalServerError) Code() int { } func (o *PcloudNetworksDeleteInternalServerError) Error() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}][%d] pcloudNetworksDeleteInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}][%d] pcloudNetworksDeleteInternalServerError %s", 500, payload) } func (o *PcloudNetworksDeleteInternalServerError) String() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}][%d] pcloudNetworksDeleteInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}][%d] pcloudNetworksDeleteInternalServerError %s", 500, payload) } func (o *PcloudNetworksDeleteInternalServerError) GetPayload() *models.Error { diff --git a/power/client/p_cloud_networks/pcloud_networks_get_responses.go b/power/client/p_cloud_networks/pcloud_networks_get_responses.go index 246ae8e3..ab247e2e 100644 --- a/power/client/p_cloud_networks/pcloud_networks_get_responses.go +++ b/power/client/p_cloud_networks/pcloud_networks_get_responses.go @@ -6,6 +6,7 @@ package p_cloud_networks // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -109,11 +110,13 @@ func (o *PcloudNetworksGetOK) Code() int { } func (o *PcloudNetworksGetOK) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}][%d] pcloudNetworksGetOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}][%d] pcloudNetworksGetOK %s", 200, payload) } func (o *PcloudNetworksGetOK) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}][%d] pcloudNetworksGetOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}][%d] pcloudNetworksGetOK %s", 200, payload) } func (o *PcloudNetworksGetOK) GetPayload() *models.Network { @@ -177,11 +180,13 @@ func (o *PcloudNetworksGetBadRequest) Code() int { } func (o *PcloudNetworksGetBadRequest) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}][%d] pcloudNetworksGetBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}][%d] pcloudNetworksGetBadRequest %s", 400, payload) } func (o *PcloudNetworksGetBadRequest) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}][%d] pcloudNetworksGetBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}][%d] pcloudNetworksGetBadRequest %s", 400, payload) } func (o *PcloudNetworksGetBadRequest) GetPayload() *models.Error { @@ -245,11 +250,13 @@ func (o *PcloudNetworksGetUnauthorized) Code() int { } func (o *PcloudNetworksGetUnauthorized) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}][%d] pcloudNetworksGetUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}][%d] pcloudNetworksGetUnauthorized %s", 401, payload) } func (o *PcloudNetworksGetUnauthorized) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}][%d] pcloudNetworksGetUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}][%d] pcloudNetworksGetUnauthorized %s", 401, payload) } func (o *PcloudNetworksGetUnauthorized) GetPayload() *models.Error { @@ -313,11 +320,13 @@ func (o *PcloudNetworksGetForbidden) Code() int { } func (o *PcloudNetworksGetForbidden) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}][%d] pcloudNetworksGetForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}][%d] pcloudNetworksGetForbidden %s", 403, payload) } func (o *PcloudNetworksGetForbidden) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}][%d] pcloudNetworksGetForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}][%d] pcloudNetworksGetForbidden %s", 403, payload) } func (o *PcloudNetworksGetForbidden) GetPayload() *models.Error { @@ -381,11 +390,13 @@ func (o *PcloudNetworksGetNotFound) Code() int { } func (o *PcloudNetworksGetNotFound) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}][%d] pcloudNetworksGetNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}][%d] pcloudNetworksGetNotFound %s", 404, payload) } func (o *PcloudNetworksGetNotFound) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}][%d] pcloudNetworksGetNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}][%d] pcloudNetworksGetNotFound %s", 404, payload) } func (o *PcloudNetworksGetNotFound) GetPayload() *models.Error { @@ -449,11 +460,13 @@ func (o *PcloudNetworksGetInternalServerError) Code() int { } func (o *PcloudNetworksGetInternalServerError) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}][%d] pcloudNetworksGetInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}][%d] pcloudNetworksGetInternalServerError %s", 500, payload) } func (o *PcloudNetworksGetInternalServerError) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}][%d] pcloudNetworksGetInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}][%d] pcloudNetworksGetInternalServerError %s", 500, payload) } func (o *PcloudNetworksGetInternalServerError) GetPayload() *models.Error { diff --git a/power/client/p_cloud_networks/pcloud_networks_getall_responses.go b/power/client/p_cloud_networks/pcloud_networks_getall_responses.go index 4be69f48..fbb2e47c 100644 --- a/power/client/p_cloud_networks/pcloud_networks_getall_responses.go +++ b/power/client/p_cloud_networks/pcloud_networks_getall_responses.go @@ -6,6 +6,7 @@ package p_cloud_networks // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -109,11 +110,13 @@ func (o *PcloudNetworksGetallOK) Code() int { } func (o *PcloudNetworksGetallOK) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/networks][%d] pcloudNetworksGetallOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/networks][%d] pcloudNetworksGetallOK %s", 200, payload) } func (o *PcloudNetworksGetallOK) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/networks][%d] pcloudNetworksGetallOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/networks][%d] pcloudNetworksGetallOK %s", 200, payload) } func (o *PcloudNetworksGetallOK) GetPayload() *models.Networks { @@ -177,11 +180,13 @@ func (o *PcloudNetworksGetallBadRequest) Code() int { } func (o *PcloudNetworksGetallBadRequest) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/networks][%d] pcloudNetworksGetallBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/networks][%d] pcloudNetworksGetallBadRequest %s", 400, payload) } func (o *PcloudNetworksGetallBadRequest) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/networks][%d] pcloudNetworksGetallBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/networks][%d] pcloudNetworksGetallBadRequest %s", 400, payload) } func (o *PcloudNetworksGetallBadRequest) GetPayload() *models.Error { @@ -245,11 +250,13 @@ func (o *PcloudNetworksGetallUnauthorized) Code() int { } func (o *PcloudNetworksGetallUnauthorized) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/networks][%d] pcloudNetworksGetallUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/networks][%d] pcloudNetworksGetallUnauthorized %s", 401, payload) } func (o *PcloudNetworksGetallUnauthorized) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/networks][%d] pcloudNetworksGetallUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/networks][%d] pcloudNetworksGetallUnauthorized %s", 401, payload) } func (o *PcloudNetworksGetallUnauthorized) GetPayload() *models.Error { @@ -313,11 +320,13 @@ func (o *PcloudNetworksGetallForbidden) Code() int { } func (o *PcloudNetworksGetallForbidden) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/networks][%d] pcloudNetworksGetallForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/networks][%d] pcloudNetworksGetallForbidden %s", 403, payload) } func (o *PcloudNetworksGetallForbidden) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/networks][%d] pcloudNetworksGetallForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/networks][%d] pcloudNetworksGetallForbidden %s", 403, payload) } func (o *PcloudNetworksGetallForbidden) GetPayload() *models.Error { @@ -381,11 +390,13 @@ func (o *PcloudNetworksGetallNotFound) Code() int { } func (o *PcloudNetworksGetallNotFound) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/networks][%d] pcloudNetworksGetallNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/networks][%d] pcloudNetworksGetallNotFound %s", 404, payload) } func (o *PcloudNetworksGetallNotFound) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/networks][%d] pcloudNetworksGetallNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/networks][%d] pcloudNetworksGetallNotFound %s", 404, payload) } func (o *PcloudNetworksGetallNotFound) GetPayload() *models.Error { @@ -449,11 +460,13 @@ func (o *PcloudNetworksGetallInternalServerError) Code() int { } func (o *PcloudNetworksGetallInternalServerError) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/networks][%d] pcloudNetworksGetallInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/networks][%d] pcloudNetworksGetallInternalServerError %s", 500, payload) } func (o *PcloudNetworksGetallInternalServerError) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/networks][%d] pcloudNetworksGetallInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/networks][%d] pcloudNetworksGetallInternalServerError %s", 500, payload) } func (o *PcloudNetworksGetallInternalServerError) GetPayload() *models.Error { diff --git a/power/client/p_cloud_networks/pcloud_networks_ports_delete_responses.go b/power/client/p_cloud_networks/pcloud_networks_ports_delete_responses.go index fbfd8646..dad8ee6a 100644 --- a/power/client/p_cloud_networks/pcloud_networks_ports_delete_responses.go +++ b/power/client/p_cloud_networks/pcloud_networks_ports_delete_responses.go @@ -6,6 +6,7 @@ package p_cloud_networks // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -115,11 +116,13 @@ func (o *PcloudNetworksPortsDeleteOK) Code() int { } func (o *PcloudNetworksPortsDeleteOK) Error() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}/ports/{port_id}][%d] pcloudNetworksPortsDeleteOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}/ports/{port_id}][%d] pcloudNetworksPortsDeleteOK %s", 200, payload) } func (o *PcloudNetworksPortsDeleteOK) String() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}/ports/{port_id}][%d] pcloudNetworksPortsDeleteOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}/ports/{port_id}][%d] pcloudNetworksPortsDeleteOK %s", 200, payload) } func (o *PcloudNetworksPortsDeleteOK) GetPayload() models.Object { @@ -181,11 +184,13 @@ func (o *PcloudNetworksPortsDeleteBadRequest) Code() int { } func (o *PcloudNetworksPortsDeleteBadRequest) Error() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}/ports/{port_id}][%d] pcloudNetworksPortsDeleteBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}/ports/{port_id}][%d] pcloudNetworksPortsDeleteBadRequest %s", 400, payload) } func (o *PcloudNetworksPortsDeleteBadRequest) String() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}/ports/{port_id}][%d] pcloudNetworksPortsDeleteBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}/ports/{port_id}][%d] pcloudNetworksPortsDeleteBadRequest %s", 400, payload) } func (o *PcloudNetworksPortsDeleteBadRequest) GetPayload() *models.Error { @@ -249,11 +254,13 @@ func (o *PcloudNetworksPortsDeleteUnauthorized) Code() int { } func (o *PcloudNetworksPortsDeleteUnauthorized) Error() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}/ports/{port_id}][%d] pcloudNetworksPortsDeleteUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}/ports/{port_id}][%d] pcloudNetworksPortsDeleteUnauthorized %s", 401, payload) } func (o *PcloudNetworksPortsDeleteUnauthorized) String() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}/ports/{port_id}][%d] pcloudNetworksPortsDeleteUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}/ports/{port_id}][%d] pcloudNetworksPortsDeleteUnauthorized %s", 401, payload) } func (o *PcloudNetworksPortsDeleteUnauthorized) GetPayload() *models.Error { @@ -317,11 +324,13 @@ func (o *PcloudNetworksPortsDeleteForbidden) Code() int { } func (o *PcloudNetworksPortsDeleteForbidden) Error() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}/ports/{port_id}][%d] pcloudNetworksPortsDeleteForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}/ports/{port_id}][%d] pcloudNetworksPortsDeleteForbidden %s", 403, payload) } func (o *PcloudNetworksPortsDeleteForbidden) String() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}/ports/{port_id}][%d] pcloudNetworksPortsDeleteForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}/ports/{port_id}][%d] pcloudNetworksPortsDeleteForbidden %s", 403, payload) } func (o *PcloudNetworksPortsDeleteForbidden) GetPayload() *models.Error { @@ -385,11 +394,13 @@ func (o *PcloudNetworksPortsDeleteNotFound) Code() int { } func (o *PcloudNetworksPortsDeleteNotFound) Error() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}/ports/{port_id}][%d] pcloudNetworksPortsDeleteNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}/ports/{port_id}][%d] pcloudNetworksPortsDeleteNotFound %s", 404, payload) } func (o *PcloudNetworksPortsDeleteNotFound) String() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}/ports/{port_id}][%d] pcloudNetworksPortsDeleteNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}/ports/{port_id}][%d] pcloudNetworksPortsDeleteNotFound %s", 404, payload) } func (o *PcloudNetworksPortsDeleteNotFound) GetPayload() *models.Error { @@ -453,11 +464,13 @@ func (o *PcloudNetworksPortsDeleteGone) Code() int { } func (o *PcloudNetworksPortsDeleteGone) Error() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}/ports/{port_id}][%d] pcloudNetworksPortsDeleteGone %+v", 410, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}/ports/{port_id}][%d] pcloudNetworksPortsDeleteGone %s", 410, payload) } func (o *PcloudNetworksPortsDeleteGone) String() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}/ports/{port_id}][%d] pcloudNetworksPortsDeleteGone %+v", 410, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}/ports/{port_id}][%d] pcloudNetworksPortsDeleteGone %s", 410, payload) } func (o *PcloudNetworksPortsDeleteGone) GetPayload() *models.Error { @@ -521,11 +534,13 @@ func (o *PcloudNetworksPortsDeleteInternalServerError) Code() int { } func (o *PcloudNetworksPortsDeleteInternalServerError) Error() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}/ports/{port_id}][%d] pcloudNetworksPortsDeleteInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}/ports/{port_id}][%d] pcloudNetworksPortsDeleteInternalServerError %s", 500, payload) } func (o *PcloudNetworksPortsDeleteInternalServerError) String() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}/ports/{port_id}][%d] pcloudNetworksPortsDeleteInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}/ports/{port_id}][%d] pcloudNetworksPortsDeleteInternalServerError %s", 500, payload) } func (o *PcloudNetworksPortsDeleteInternalServerError) GetPayload() *models.Error { diff --git a/power/client/p_cloud_networks/pcloud_networks_ports_get_responses.go b/power/client/p_cloud_networks/pcloud_networks_ports_get_responses.go index 23eef77d..f9591f57 100644 --- a/power/client/p_cloud_networks/pcloud_networks_ports_get_responses.go +++ b/power/client/p_cloud_networks/pcloud_networks_ports_get_responses.go @@ -6,6 +6,7 @@ package p_cloud_networks // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -109,11 +110,13 @@ func (o *PcloudNetworksPortsGetOK) Code() int { } func (o *PcloudNetworksPortsGetOK) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}/ports/{port_id}][%d] pcloudNetworksPortsGetOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}/ports/{port_id}][%d] pcloudNetworksPortsGetOK %s", 200, payload) } func (o *PcloudNetworksPortsGetOK) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}/ports/{port_id}][%d] pcloudNetworksPortsGetOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}/ports/{port_id}][%d] pcloudNetworksPortsGetOK %s", 200, payload) } func (o *PcloudNetworksPortsGetOK) GetPayload() *models.NetworkPort { @@ -177,11 +180,13 @@ func (o *PcloudNetworksPortsGetBadRequest) Code() int { } func (o *PcloudNetworksPortsGetBadRequest) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}/ports/{port_id}][%d] pcloudNetworksPortsGetBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}/ports/{port_id}][%d] pcloudNetworksPortsGetBadRequest %s", 400, payload) } func (o *PcloudNetworksPortsGetBadRequest) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}/ports/{port_id}][%d] pcloudNetworksPortsGetBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}/ports/{port_id}][%d] pcloudNetworksPortsGetBadRequest %s", 400, payload) } func (o *PcloudNetworksPortsGetBadRequest) GetPayload() *models.Error { @@ -245,11 +250,13 @@ func (o *PcloudNetworksPortsGetUnauthorized) Code() int { } func (o *PcloudNetworksPortsGetUnauthorized) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}/ports/{port_id}][%d] pcloudNetworksPortsGetUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}/ports/{port_id}][%d] pcloudNetworksPortsGetUnauthorized %s", 401, payload) } func (o *PcloudNetworksPortsGetUnauthorized) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}/ports/{port_id}][%d] pcloudNetworksPortsGetUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}/ports/{port_id}][%d] pcloudNetworksPortsGetUnauthorized %s", 401, payload) } func (o *PcloudNetworksPortsGetUnauthorized) GetPayload() *models.Error { @@ -313,11 +320,13 @@ func (o *PcloudNetworksPortsGetForbidden) Code() int { } func (o *PcloudNetworksPortsGetForbidden) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}/ports/{port_id}][%d] pcloudNetworksPortsGetForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}/ports/{port_id}][%d] pcloudNetworksPortsGetForbidden %s", 403, payload) } func (o *PcloudNetworksPortsGetForbidden) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}/ports/{port_id}][%d] pcloudNetworksPortsGetForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}/ports/{port_id}][%d] pcloudNetworksPortsGetForbidden %s", 403, payload) } func (o *PcloudNetworksPortsGetForbidden) GetPayload() *models.Error { @@ -381,11 +390,13 @@ func (o *PcloudNetworksPortsGetNotFound) Code() int { } func (o *PcloudNetworksPortsGetNotFound) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}/ports/{port_id}][%d] pcloudNetworksPortsGetNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}/ports/{port_id}][%d] pcloudNetworksPortsGetNotFound %s", 404, payload) } func (o *PcloudNetworksPortsGetNotFound) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}/ports/{port_id}][%d] pcloudNetworksPortsGetNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}/ports/{port_id}][%d] pcloudNetworksPortsGetNotFound %s", 404, payload) } func (o *PcloudNetworksPortsGetNotFound) GetPayload() *models.Error { @@ -449,11 +460,13 @@ func (o *PcloudNetworksPortsGetInternalServerError) Code() int { } func (o *PcloudNetworksPortsGetInternalServerError) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}/ports/{port_id}][%d] pcloudNetworksPortsGetInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}/ports/{port_id}][%d] pcloudNetworksPortsGetInternalServerError %s", 500, payload) } func (o *PcloudNetworksPortsGetInternalServerError) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}/ports/{port_id}][%d] pcloudNetworksPortsGetInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}/ports/{port_id}][%d] pcloudNetworksPortsGetInternalServerError %s", 500, payload) } func (o *PcloudNetworksPortsGetInternalServerError) GetPayload() *models.Error { diff --git a/power/client/p_cloud_networks/pcloud_networks_ports_getall_responses.go b/power/client/p_cloud_networks/pcloud_networks_ports_getall_responses.go index ffe3498c..0c8c6165 100644 --- a/power/client/p_cloud_networks/pcloud_networks_ports_getall_responses.go +++ b/power/client/p_cloud_networks/pcloud_networks_ports_getall_responses.go @@ -6,6 +6,7 @@ package p_cloud_networks // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -109,11 +110,13 @@ func (o *PcloudNetworksPortsGetallOK) Code() int { } func (o *PcloudNetworksPortsGetallOK) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}/ports][%d] pcloudNetworksPortsGetallOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}/ports][%d] pcloudNetworksPortsGetallOK %s", 200, payload) } func (o *PcloudNetworksPortsGetallOK) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}/ports][%d] pcloudNetworksPortsGetallOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}/ports][%d] pcloudNetworksPortsGetallOK %s", 200, payload) } func (o *PcloudNetworksPortsGetallOK) GetPayload() *models.NetworkPorts { @@ -177,11 +180,13 @@ func (o *PcloudNetworksPortsGetallBadRequest) Code() int { } func (o *PcloudNetworksPortsGetallBadRequest) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}/ports][%d] pcloudNetworksPortsGetallBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}/ports][%d] pcloudNetworksPortsGetallBadRequest %s", 400, payload) } func (o *PcloudNetworksPortsGetallBadRequest) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}/ports][%d] pcloudNetworksPortsGetallBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}/ports][%d] pcloudNetworksPortsGetallBadRequest %s", 400, payload) } func (o *PcloudNetworksPortsGetallBadRequest) GetPayload() *models.Error { @@ -245,11 +250,13 @@ func (o *PcloudNetworksPortsGetallUnauthorized) Code() int { } func (o *PcloudNetworksPortsGetallUnauthorized) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}/ports][%d] pcloudNetworksPortsGetallUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}/ports][%d] pcloudNetworksPortsGetallUnauthorized %s", 401, payload) } func (o *PcloudNetworksPortsGetallUnauthorized) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}/ports][%d] pcloudNetworksPortsGetallUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}/ports][%d] pcloudNetworksPortsGetallUnauthorized %s", 401, payload) } func (o *PcloudNetworksPortsGetallUnauthorized) GetPayload() *models.Error { @@ -313,11 +320,13 @@ func (o *PcloudNetworksPortsGetallForbidden) Code() int { } func (o *PcloudNetworksPortsGetallForbidden) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}/ports][%d] pcloudNetworksPortsGetallForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}/ports][%d] pcloudNetworksPortsGetallForbidden %s", 403, payload) } func (o *PcloudNetworksPortsGetallForbidden) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}/ports][%d] pcloudNetworksPortsGetallForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}/ports][%d] pcloudNetworksPortsGetallForbidden %s", 403, payload) } func (o *PcloudNetworksPortsGetallForbidden) GetPayload() *models.Error { @@ -381,11 +390,13 @@ func (o *PcloudNetworksPortsGetallNotFound) Code() int { } func (o *PcloudNetworksPortsGetallNotFound) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}/ports][%d] pcloudNetworksPortsGetallNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}/ports][%d] pcloudNetworksPortsGetallNotFound %s", 404, payload) } func (o *PcloudNetworksPortsGetallNotFound) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}/ports][%d] pcloudNetworksPortsGetallNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}/ports][%d] pcloudNetworksPortsGetallNotFound %s", 404, payload) } func (o *PcloudNetworksPortsGetallNotFound) GetPayload() *models.Error { @@ -449,11 +460,13 @@ func (o *PcloudNetworksPortsGetallInternalServerError) Code() int { } func (o *PcloudNetworksPortsGetallInternalServerError) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}/ports][%d] pcloudNetworksPortsGetallInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}/ports][%d] pcloudNetworksPortsGetallInternalServerError %s", 500, payload) } func (o *PcloudNetworksPortsGetallInternalServerError) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}/ports][%d] pcloudNetworksPortsGetallInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}/ports][%d] pcloudNetworksPortsGetallInternalServerError %s", 500, payload) } func (o *PcloudNetworksPortsGetallInternalServerError) GetPayload() *models.Error { diff --git a/power/client/p_cloud_networks/pcloud_networks_ports_post_responses.go b/power/client/p_cloud_networks/pcloud_networks_ports_post_responses.go index 05a8818d..b5965769 100644 --- a/power/client/p_cloud_networks/pcloud_networks_ports_post_responses.go +++ b/power/client/p_cloud_networks/pcloud_networks_ports_post_responses.go @@ -6,6 +6,7 @@ package p_cloud_networks // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -121,11 +122,13 @@ func (o *PcloudNetworksPortsPostCreated) Code() int { } func (o *PcloudNetworksPortsPostCreated) Error() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}/ports][%d] pcloudNetworksPortsPostCreated %+v", 201, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}/ports][%d] pcloudNetworksPortsPostCreated %s", 201, payload) } func (o *PcloudNetworksPortsPostCreated) String() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}/ports][%d] pcloudNetworksPortsPostCreated %+v", 201, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}/ports][%d] pcloudNetworksPortsPostCreated %s", 201, payload) } func (o *PcloudNetworksPortsPostCreated) GetPayload() *models.NetworkPort { @@ -189,11 +192,13 @@ func (o *PcloudNetworksPortsPostBadRequest) Code() int { } func (o *PcloudNetworksPortsPostBadRequest) Error() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}/ports][%d] pcloudNetworksPortsPostBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}/ports][%d] pcloudNetworksPortsPostBadRequest %s", 400, payload) } func (o *PcloudNetworksPortsPostBadRequest) String() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}/ports][%d] pcloudNetworksPortsPostBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}/ports][%d] pcloudNetworksPortsPostBadRequest %s", 400, payload) } func (o *PcloudNetworksPortsPostBadRequest) GetPayload() *models.Error { @@ -257,11 +262,13 @@ func (o *PcloudNetworksPortsPostUnauthorized) Code() int { } func (o *PcloudNetworksPortsPostUnauthorized) Error() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}/ports][%d] pcloudNetworksPortsPostUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}/ports][%d] pcloudNetworksPortsPostUnauthorized %s", 401, payload) } func (o *PcloudNetworksPortsPostUnauthorized) String() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}/ports][%d] pcloudNetworksPortsPostUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}/ports][%d] pcloudNetworksPortsPostUnauthorized %s", 401, payload) } func (o *PcloudNetworksPortsPostUnauthorized) GetPayload() *models.Error { @@ -325,11 +332,13 @@ func (o *PcloudNetworksPortsPostForbidden) Code() int { } func (o *PcloudNetworksPortsPostForbidden) Error() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}/ports][%d] pcloudNetworksPortsPostForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}/ports][%d] pcloudNetworksPortsPostForbidden %s", 403, payload) } func (o *PcloudNetworksPortsPostForbidden) String() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}/ports][%d] pcloudNetworksPortsPostForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}/ports][%d] pcloudNetworksPortsPostForbidden %s", 403, payload) } func (o *PcloudNetworksPortsPostForbidden) GetPayload() *models.Error { @@ -393,11 +402,13 @@ func (o *PcloudNetworksPortsPostNotFound) Code() int { } func (o *PcloudNetworksPortsPostNotFound) Error() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}/ports][%d] pcloudNetworksPortsPostNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}/ports][%d] pcloudNetworksPortsPostNotFound %s", 404, payload) } func (o *PcloudNetworksPortsPostNotFound) String() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}/ports][%d] pcloudNetworksPortsPostNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}/ports][%d] pcloudNetworksPortsPostNotFound %s", 404, payload) } func (o *PcloudNetworksPortsPostNotFound) GetPayload() *models.Error { @@ -461,11 +472,13 @@ func (o *PcloudNetworksPortsPostConflict) Code() int { } func (o *PcloudNetworksPortsPostConflict) Error() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}/ports][%d] pcloudNetworksPortsPostConflict %+v", 409, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}/ports][%d] pcloudNetworksPortsPostConflict %s", 409, payload) } func (o *PcloudNetworksPortsPostConflict) String() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}/ports][%d] pcloudNetworksPortsPostConflict %+v", 409, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}/ports][%d] pcloudNetworksPortsPostConflict %s", 409, payload) } func (o *PcloudNetworksPortsPostConflict) GetPayload() *models.Error { @@ -529,11 +542,13 @@ func (o *PcloudNetworksPortsPostUnprocessableEntity) Code() int { } func (o *PcloudNetworksPortsPostUnprocessableEntity) Error() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}/ports][%d] pcloudNetworksPortsPostUnprocessableEntity %+v", 422, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}/ports][%d] pcloudNetworksPortsPostUnprocessableEntity %s", 422, payload) } func (o *PcloudNetworksPortsPostUnprocessableEntity) String() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}/ports][%d] pcloudNetworksPortsPostUnprocessableEntity %+v", 422, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}/ports][%d] pcloudNetworksPortsPostUnprocessableEntity %s", 422, payload) } func (o *PcloudNetworksPortsPostUnprocessableEntity) GetPayload() *models.Error { @@ -597,11 +612,13 @@ func (o *PcloudNetworksPortsPostInternalServerError) Code() int { } func (o *PcloudNetworksPortsPostInternalServerError) Error() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}/ports][%d] pcloudNetworksPortsPostInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}/ports][%d] pcloudNetworksPortsPostInternalServerError %s", 500, payload) } func (o *PcloudNetworksPortsPostInternalServerError) String() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}/ports][%d] pcloudNetworksPortsPostInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}/ports][%d] pcloudNetworksPortsPostInternalServerError %s", 500, payload) } func (o *PcloudNetworksPortsPostInternalServerError) GetPayload() *models.Error { diff --git a/power/client/p_cloud_networks/pcloud_networks_ports_put_responses.go b/power/client/p_cloud_networks/pcloud_networks_ports_put_responses.go index 0d18d785..28ef8ea0 100644 --- a/power/client/p_cloud_networks/pcloud_networks_ports_put_responses.go +++ b/power/client/p_cloud_networks/pcloud_networks_ports_put_responses.go @@ -6,6 +6,7 @@ package p_cloud_networks // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -115,11 +116,13 @@ func (o *PcloudNetworksPortsPutOK) Code() int { } func (o *PcloudNetworksPortsPutOK) Error() string { - return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}/ports/{port_id}][%d] pcloudNetworksPortsPutOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}/ports/{port_id}][%d] pcloudNetworksPortsPutOK %s", 200, payload) } func (o *PcloudNetworksPortsPutOK) String() string { - return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}/ports/{port_id}][%d] pcloudNetworksPortsPutOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}/ports/{port_id}][%d] pcloudNetworksPortsPutOK %s", 200, payload) } func (o *PcloudNetworksPortsPutOK) GetPayload() *models.NetworkPort { @@ -183,11 +186,13 @@ func (o *PcloudNetworksPortsPutBadRequest) Code() int { } func (o *PcloudNetworksPortsPutBadRequest) Error() string { - return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}/ports/{port_id}][%d] pcloudNetworksPortsPutBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}/ports/{port_id}][%d] pcloudNetworksPortsPutBadRequest %s", 400, payload) } func (o *PcloudNetworksPortsPutBadRequest) String() string { - return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}/ports/{port_id}][%d] pcloudNetworksPortsPutBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}/ports/{port_id}][%d] pcloudNetworksPortsPutBadRequest %s", 400, payload) } func (o *PcloudNetworksPortsPutBadRequest) GetPayload() *models.Error { @@ -251,11 +256,13 @@ func (o *PcloudNetworksPortsPutUnauthorized) Code() int { } func (o *PcloudNetworksPortsPutUnauthorized) Error() string { - return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}/ports/{port_id}][%d] pcloudNetworksPortsPutUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}/ports/{port_id}][%d] pcloudNetworksPortsPutUnauthorized %s", 401, payload) } func (o *PcloudNetworksPortsPutUnauthorized) String() string { - return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}/ports/{port_id}][%d] pcloudNetworksPortsPutUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}/ports/{port_id}][%d] pcloudNetworksPortsPutUnauthorized %s", 401, payload) } func (o *PcloudNetworksPortsPutUnauthorized) GetPayload() *models.Error { @@ -319,11 +326,13 @@ func (o *PcloudNetworksPortsPutForbidden) Code() int { } func (o *PcloudNetworksPortsPutForbidden) Error() string { - return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}/ports/{port_id}][%d] pcloudNetworksPortsPutForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}/ports/{port_id}][%d] pcloudNetworksPortsPutForbidden %s", 403, payload) } func (o *PcloudNetworksPortsPutForbidden) String() string { - return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}/ports/{port_id}][%d] pcloudNetworksPortsPutForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}/ports/{port_id}][%d] pcloudNetworksPortsPutForbidden %s", 403, payload) } func (o *PcloudNetworksPortsPutForbidden) GetPayload() *models.Error { @@ -387,11 +396,13 @@ func (o *PcloudNetworksPortsPutNotFound) Code() int { } func (o *PcloudNetworksPortsPutNotFound) Error() string { - return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}/ports/{port_id}][%d] pcloudNetworksPortsPutNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}/ports/{port_id}][%d] pcloudNetworksPortsPutNotFound %s", 404, payload) } func (o *PcloudNetworksPortsPutNotFound) String() string { - return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}/ports/{port_id}][%d] pcloudNetworksPortsPutNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}/ports/{port_id}][%d] pcloudNetworksPortsPutNotFound %s", 404, payload) } func (o *PcloudNetworksPortsPutNotFound) GetPayload() *models.Error { @@ -455,11 +466,13 @@ func (o *PcloudNetworksPortsPutUnprocessableEntity) Code() int { } func (o *PcloudNetworksPortsPutUnprocessableEntity) Error() string { - return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}/ports/{port_id}][%d] pcloudNetworksPortsPutUnprocessableEntity %+v", 422, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}/ports/{port_id}][%d] pcloudNetworksPortsPutUnprocessableEntity %s", 422, payload) } func (o *PcloudNetworksPortsPutUnprocessableEntity) String() string { - return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}/ports/{port_id}][%d] pcloudNetworksPortsPutUnprocessableEntity %+v", 422, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}/ports/{port_id}][%d] pcloudNetworksPortsPutUnprocessableEntity %s", 422, payload) } func (o *PcloudNetworksPortsPutUnprocessableEntity) GetPayload() *models.Error { @@ -523,11 +536,13 @@ func (o *PcloudNetworksPortsPutInternalServerError) Code() int { } func (o *PcloudNetworksPortsPutInternalServerError) Error() string { - return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}/ports/{port_id}][%d] pcloudNetworksPortsPutInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}/ports/{port_id}][%d] pcloudNetworksPortsPutInternalServerError %s", 500, payload) } func (o *PcloudNetworksPortsPutInternalServerError) String() string { - return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}/ports/{port_id}][%d] pcloudNetworksPortsPutInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}/ports/{port_id}][%d] pcloudNetworksPortsPutInternalServerError %s", 500, payload) } func (o *PcloudNetworksPortsPutInternalServerError) GetPayload() *models.Error { diff --git a/power/client/p_cloud_networks/pcloud_networks_post_responses.go b/power/client/p_cloud_networks/pcloud_networks_post_responses.go index a71af6ef..982c363e 100644 --- a/power/client/p_cloud_networks/pcloud_networks_post_responses.go +++ b/power/client/p_cloud_networks/pcloud_networks_post_responses.go @@ -6,6 +6,7 @@ package p_cloud_networks // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -133,11 +134,13 @@ func (o *PcloudNetworksPostOK) Code() int { } func (o *PcloudNetworksPostOK) Error() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/networks][%d] pcloudNetworksPostOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/networks][%d] pcloudNetworksPostOK %s", 200, payload) } func (o *PcloudNetworksPostOK) String() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/networks][%d] pcloudNetworksPostOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/networks][%d] pcloudNetworksPostOK %s", 200, payload) } func (o *PcloudNetworksPostOK) GetPayload() *models.Network { @@ -201,11 +204,13 @@ func (o *PcloudNetworksPostCreated) Code() int { } func (o *PcloudNetworksPostCreated) Error() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/networks][%d] pcloudNetworksPostCreated %+v", 201, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/networks][%d] pcloudNetworksPostCreated %s", 201, payload) } func (o *PcloudNetworksPostCreated) String() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/networks][%d] pcloudNetworksPostCreated %+v", 201, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/networks][%d] pcloudNetworksPostCreated %s", 201, payload) } func (o *PcloudNetworksPostCreated) GetPayload() *models.Network { @@ -269,11 +274,13 @@ func (o *PcloudNetworksPostBadRequest) Code() int { } func (o *PcloudNetworksPostBadRequest) Error() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/networks][%d] pcloudNetworksPostBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/networks][%d] pcloudNetworksPostBadRequest %s", 400, payload) } func (o *PcloudNetworksPostBadRequest) String() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/networks][%d] pcloudNetworksPostBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/networks][%d] pcloudNetworksPostBadRequest %s", 400, payload) } func (o *PcloudNetworksPostBadRequest) GetPayload() *models.Error { @@ -337,11 +344,13 @@ func (o *PcloudNetworksPostUnauthorized) Code() int { } func (o *PcloudNetworksPostUnauthorized) Error() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/networks][%d] pcloudNetworksPostUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/networks][%d] pcloudNetworksPostUnauthorized %s", 401, payload) } func (o *PcloudNetworksPostUnauthorized) String() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/networks][%d] pcloudNetworksPostUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/networks][%d] pcloudNetworksPostUnauthorized %s", 401, payload) } func (o *PcloudNetworksPostUnauthorized) GetPayload() *models.Error { @@ -405,11 +414,13 @@ func (o *PcloudNetworksPostForbidden) Code() int { } func (o *PcloudNetworksPostForbidden) Error() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/networks][%d] pcloudNetworksPostForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/networks][%d] pcloudNetworksPostForbidden %s", 403, payload) } func (o *PcloudNetworksPostForbidden) String() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/networks][%d] pcloudNetworksPostForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/networks][%d] pcloudNetworksPostForbidden %s", 403, payload) } func (o *PcloudNetworksPostForbidden) GetPayload() *models.Error { @@ -473,11 +484,13 @@ func (o *PcloudNetworksPostNotFound) Code() int { } func (o *PcloudNetworksPostNotFound) Error() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/networks][%d] pcloudNetworksPostNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/networks][%d] pcloudNetworksPostNotFound %s", 404, payload) } func (o *PcloudNetworksPostNotFound) String() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/networks][%d] pcloudNetworksPostNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/networks][%d] pcloudNetworksPostNotFound %s", 404, payload) } func (o *PcloudNetworksPostNotFound) GetPayload() *models.Error { @@ -541,11 +554,13 @@ func (o *PcloudNetworksPostConflict) Code() int { } func (o *PcloudNetworksPostConflict) Error() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/networks][%d] pcloudNetworksPostConflict %+v", 409, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/networks][%d] pcloudNetworksPostConflict %s", 409, payload) } func (o *PcloudNetworksPostConflict) String() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/networks][%d] pcloudNetworksPostConflict %+v", 409, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/networks][%d] pcloudNetworksPostConflict %s", 409, payload) } func (o *PcloudNetworksPostConflict) GetPayload() *models.Error { @@ -609,11 +624,13 @@ func (o *PcloudNetworksPostUnprocessableEntity) Code() int { } func (o *PcloudNetworksPostUnprocessableEntity) Error() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/networks][%d] pcloudNetworksPostUnprocessableEntity %+v", 422, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/networks][%d] pcloudNetworksPostUnprocessableEntity %s", 422, payload) } func (o *PcloudNetworksPostUnprocessableEntity) String() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/networks][%d] pcloudNetworksPostUnprocessableEntity %+v", 422, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/networks][%d] pcloudNetworksPostUnprocessableEntity %s", 422, payload) } func (o *PcloudNetworksPostUnprocessableEntity) GetPayload() *models.Error { @@ -677,11 +694,13 @@ func (o *PcloudNetworksPostInternalServerError) Code() int { } func (o *PcloudNetworksPostInternalServerError) Error() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/networks][%d] pcloudNetworksPostInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/networks][%d] pcloudNetworksPostInternalServerError %s", 500, payload) } func (o *PcloudNetworksPostInternalServerError) String() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/networks][%d] pcloudNetworksPostInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/networks][%d] pcloudNetworksPostInternalServerError %s", 500, payload) } func (o *PcloudNetworksPostInternalServerError) GetPayload() *models.Error { @@ -745,11 +764,13 @@ func (o *PcloudNetworksPostStatus550) Code() int { } func (o *PcloudNetworksPostStatus550) Error() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/networks][%d] pcloudNetworksPostStatus550 %+v", 550, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/networks][%d] pcloudNetworksPostStatus550 %s", 550, payload) } func (o *PcloudNetworksPostStatus550) String() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/networks][%d] pcloudNetworksPostStatus550 %+v", 550, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/networks][%d] pcloudNetworksPostStatus550 %s", 550, payload) } func (o *PcloudNetworksPostStatus550) GetPayload() *models.Error { diff --git a/power/client/p_cloud_networks/pcloud_networks_put_responses.go b/power/client/p_cloud_networks/pcloud_networks_put_responses.go index 5fe0c1fa..406d09f8 100644 --- a/power/client/p_cloud_networks/pcloud_networks_put_responses.go +++ b/power/client/p_cloud_networks/pcloud_networks_put_responses.go @@ -6,6 +6,7 @@ package p_cloud_networks // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -115,11 +116,13 @@ func (o *PcloudNetworksPutOK) Code() int { } func (o *PcloudNetworksPutOK) Error() string { - return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}][%d] pcloudNetworksPutOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}][%d] pcloudNetworksPutOK %s", 200, payload) } func (o *PcloudNetworksPutOK) String() string { - return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}][%d] pcloudNetworksPutOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}][%d] pcloudNetworksPutOK %s", 200, payload) } func (o *PcloudNetworksPutOK) GetPayload() *models.Network { @@ -183,11 +186,13 @@ func (o *PcloudNetworksPutBadRequest) Code() int { } func (o *PcloudNetworksPutBadRequest) Error() string { - return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}][%d] pcloudNetworksPutBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}][%d] pcloudNetworksPutBadRequest %s", 400, payload) } func (o *PcloudNetworksPutBadRequest) String() string { - return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}][%d] pcloudNetworksPutBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}][%d] pcloudNetworksPutBadRequest %s", 400, payload) } func (o *PcloudNetworksPutBadRequest) GetPayload() *models.Error { @@ -251,11 +256,13 @@ func (o *PcloudNetworksPutUnauthorized) Code() int { } func (o *PcloudNetworksPutUnauthorized) Error() string { - return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}][%d] pcloudNetworksPutUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}][%d] pcloudNetworksPutUnauthorized %s", 401, payload) } func (o *PcloudNetworksPutUnauthorized) String() string { - return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}][%d] pcloudNetworksPutUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}][%d] pcloudNetworksPutUnauthorized %s", 401, payload) } func (o *PcloudNetworksPutUnauthorized) GetPayload() *models.Error { @@ -319,11 +326,13 @@ func (o *PcloudNetworksPutForbidden) Code() int { } func (o *PcloudNetworksPutForbidden) Error() string { - return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}][%d] pcloudNetworksPutForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}][%d] pcloudNetworksPutForbidden %s", 403, payload) } func (o *PcloudNetworksPutForbidden) String() string { - return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}][%d] pcloudNetworksPutForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}][%d] pcloudNetworksPutForbidden %s", 403, payload) } func (o *PcloudNetworksPutForbidden) GetPayload() *models.Error { @@ -387,11 +396,13 @@ func (o *PcloudNetworksPutNotFound) Code() int { } func (o *PcloudNetworksPutNotFound) Error() string { - return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}][%d] pcloudNetworksPutNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}][%d] pcloudNetworksPutNotFound %s", 404, payload) } func (o *PcloudNetworksPutNotFound) String() string { - return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}][%d] pcloudNetworksPutNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}][%d] pcloudNetworksPutNotFound %s", 404, payload) } func (o *PcloudNetworksPutNotFound) GetPayload() *models.Error { @@ -455,11 +466,13 @@ func (o *PcloudNetworksPutUnprocessableEntity) Code() int { } func (o *PcloudNetworksPutUnprocessableEntity) Error() string { - return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}][%d] pcloudNetworksPutUnprocessableEntity %+v", 422, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}][%d] pcloudNetworksPutUnprocessableEntity %s", 422, payload) } func (o *PcloudNetworksPutUnprocessableEntity) String() string { - return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}][%d] pcloudNetworksPutUnprocessableEntity %+v", 422, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}][%d] pcloudNetworksPutUnprocessableEntity %s", 422, payload) } func (o *PcloudNetworksPutUnprocessableEntity) GetPayload() *models.Error { @@ -523,11 +536,13 @@ func (o *PcloudNetworksPutInternalServerError) Code() int { } func (o *PcloudNetworksPutInternalServerError) Error() string { - return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}][%d] pcloudNetworksPutInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}][%d] pcloudNetworksPutInternalServerError %s", 500, payload) } func (o *PcloudNetworksPutInternalServerError) String() string { - return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}][%d] pcloudNetworksPutInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}][%d] pcloudNetworksPutInternalServerError %s", 500, payload) } func (o *PcloudNetworksPutInternalServerError) GetPayload() *models.Error { diff --git a/power/client/p_cloud_p_vm_instances/p_cloudp_vm_instances_client.go b/power/client/p_cloud_p_vm_instances/p_cloudp_vm_instances_client.go index f21fbd2d..c97ac93a 100644 --- a/power/client/p_cloud_p_vm_instances/p_cloudp_vm_instances_client.go +++ b/power/client/p_cloud_p_vm_instances/p_cloudp_vm_instances_client.go @@ -9,6 +9,7 @@ import ( "fmt" "github.com/go-openapi/runtime" + httptransport "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" ) @@ -17,6 +18,31 @@ func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientServi return &Client{transport: transport, formats: formats} } +// New creates a new p cloud p vm instances API client with basic auth credentials. +// It takes the following parameters: +// - host: http host (github.com). +// - basePath: any base path for the API client ("/v1", "/v3"). +// - scheme: http scheme ("http", "https"). +// - user: user for basic authentication header. +// - password: password for basic authentication header. +func NewClientWithBasicAuth(host, basePath, scheme, user, password string) ClientService { + transport := httptransport.New(host, basePath, []string{scheme}) + transport.DefaultAuthentication = httptransport.BasicAuth(user, password) + return &Client{transport: transport, formats: strfmt.Default} +} + +// New creates a new p cloud p vm instances API client with a bearer token for authentication. +// It takes the following parameters: +// - host: http host (github.com). +// - basePath: any base path for the API client ("/v1", "/v3"). +// - scheme: http scheme ("http", "https"). +// - bearerToken: bearer token for Bearer authentication header. +func NewClientWithBearerToken(host, basePath, scheme, bearerToken string) ClientService { + transport := httptransport.New(host, basePath, []string{scheme}) + transport.DefaultAuthentication = httptransport.BearerToken(bearerToken) + return &Client{transport: transport, formats: strfmt.Default} +} + /* Client for p cloud p vm instances API */ @@ -25,7 +51,7 @@ type Client struct { formats strfmt.Registry } -// ClientOption is the option for Client methods +// ClientOption may be used to customize the behavior of Client methods. type ClientOption func(*runtime.ClientOperation) // ClientService is the interface for Client methods @@ -78,7 +104,9 @@ type ClientService interface { } /* -PcloudPvminstancesActionPost performs an action start stop reboot immediate shutdown reset on a p VM instance +PcloudPvminstancesActionPost performs an action on a p VM instance + +Corresponding actions are 'start', 'stop', 'reboot', 'immediate-shutdown', 'reset' */ func (a *Client) PcloudPvminstancesActionPost(params *PcloudPvminstancesActionPostParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudPvminstancesActionPostOK, error) { // TODO: Validate the params before sending diff --git a/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_action_post_responses.go b/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_action_post_responses.go index 88ba6f9a..e97e8aed 100644 --- a/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_action_post_responses.go +++ b/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_action_post_responses.go @@ -6,6 +6,7 @@ package p_cloud_p_vm_instances // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -115,11 +116,13 @@ func (o *PcloudPvminstancesActionPostOK) Code() int { } func (o *PcloudPvminstancesActionPostOK) Error() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/action][%d] pcloudPvminstancesActionPostOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/action][%d] pcloudPvminstancesActionPostOK %s", 200, payload) } func (o *PcloudPvminstancesActionPostOK) String() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/action][%d] pcloudPvminstancesActionPostOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/action][%d] pcloudPvminstancesActionPostOK %s", 200, payload) } func (o *PcloudPvminstancesActionPostOK) GetPayload() models.Object { @@ -181,11 +184,13 @@ func (o *PcloudPvminstancesActionPostBadRequest) Code() int { } func (o *PcloudPvminstancesActionPostBadRequest) Error() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/action][%d] pcloudPvminstancesActionPostBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/action][%d] pcloudPvminstancesActionPostBadRequest %s", 400, payload) } func (o *PcloudPvminstancesActionPostBadRequest) String() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/action][%d] pcloudPvminstancesActionPostBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/action][%d] pcloudPvminstancesActionPostBadRequest %s", 400, payload) } func (o *PcloudPvminstancesActionPostBadRequest) GetPayload() *models.Error { @@ -249,11 +254,13 @@ func (o *PcloudPvminstancesActionPostUnauthorized) Code() int { } func (o *PcloudPvminstancesActionPostUnauthorized) Error() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/action][%d] pcloudPvminstancesActionPostUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/action][%d] pcloudPvminstancesActionPostUnauthorized %s", 401, payload) } func (o *PcloudPvminstancesActionPostUnauthorized) String() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/action][%d] pcloudPvminstancesActionPostUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/action][%d] pcloudPvminstancesActionPostUnauthorized %s", 401, payload) } func (o *PcloudPvminstancesActionPostUnauthorized) GetPayload() *models.Error { @@ -317,11 +324,13 @@ func (o *PcloudPvminstancesActionPostForbidden) Code() int { } func (o *PcloudPvminstancesActionPostForbidden) Error() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/action][%d] pcloudPvminstancesActionPostForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/action][%d] pcloudPvminstancesActionPostForbidden %s", 403, payload) } func (o *PcloudPvminstancesActionPostForbidden) String() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/action][%d] pcloudPvminstancesActionPostForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/action][%d] pcloudPvminstancesActionPostForbidden %s", 403, payload) } func (o *PcloudPvminstancesActionPostForbidden) GetPayload() *models.Error { @@ -385,11 +394,13 @@ func (o *PcloudPvminstancesActionPostNotFound) Code() int { } func (o *PcloudPvminstancesActionPostNotFound) Error() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/action][%d] pcloudPvminstancesActionPostNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/action][%d] pcloudPvminstancesActionPostNotFound %s", 404, payload) } func (o *PcloudPvminstancesActionPostNotFound) String() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/action][%d] pcloudPvminstancesActionPostNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/action][%d] pcloudPvminstancesActionPostNotFound %s", 404, payload) } func (o *PcloudPvminstancesActionPostNotFound) GetPayload() *models.Error { @@ -453,11 +464,13 @@ func (o *PcloudPvminstancesActionPostConflict) Code() int { } func (o *PcloudPvminstancesActionPostConflict) Error() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/action][%d] pcloudPvminstancesActionPostConflict %+v", 409, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/action][%d] pcloudPvminstancesActionPostConflict %s", 409, payload) } func (o *PcloudPvminstancesActionPostConflict) String() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/action][%d] pcloudPvminstancesActionPostConflict %+v", 409, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/action][%d] pcloudPvminstancesActionPostConflict %s", 409, payload) } func (o *PcloudPvminstancesActionPostConflict) GetPayload() *models.Error { @@ -521,11 +534,13 @@ func (o *PcloudPvminstancesActionPostInternalServerError) Code() int { } func (o *PcloudPvminstancesActionPostInternalServerError) Error() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/action][%d] pcloudPvminstancesActionPostInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/action][%d] pcloudPvminstancesActionPostInternalServerError %s", 500, payload) } func (o *PcloudPvminstancesActionPostInternalServerError) String() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/action][%d] pcloudPvminstancesActionPostInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/action][%d] pcloudPvminstancesActionPostInternalServerError %s", 500, payload) } func (o *PcloudPvminstancesActionPostInternalServerError) GetPayload() *models.Error { diff --git a/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_capture_post_responses.go b/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_capture_post_responses.go index 01c675d5..388681e0 100644 --- a/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_capture_post_responses.go +++ b/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_capture_post_responses.go @@ -6,6 +6,7 @@ package p_cloud_p_vm_instances // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -121,11 +122,13 @@ func (o *PcloudPvminstancesCapturePostOK) Code() int { } func (o *PcloudPvminstancesCapturePostOK) Error() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/capture][%d] pcloudPvminstancesCapturePostOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/capture][%d] pcloudPvminstancesCapturePostOK %s", 200, payload) } func (o *PcloudPvminstancesCapturePostOK) String() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/capture][%d] pcloudPvminstancesCapturePostOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/capture][%d] pcloudPvminstancesCapturePostOK %s", 200, payload) } func (o *PcloudPvminstancesCapturePostOK) GetPayload() models.Object { @@ -187,11 +190,13 @@ func (o *PcloudPvminstancesCapturePostAccepted) Code() int { } func (o *PcloudPvminstancesCapturePostAccepted) Error() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/capture][%d] pcloudPvminstancesCapturePostAccepted %+v", 202, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/capture][%d] pcloudPvminstancesCapturePostAccepted %s", 202, payload) } func (o *PcloudPvminstancesCapturePostAccepted) String() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/capture][%d] pcloudPvminstancesCapturePostAccepted %+v", 202, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/capture][%d] pcloudPvminstancesCapturePostAccepted %s", 202, payload) } func (o *PcloudPvminstancesCapturePostAccepted) GetPayload() models.Object { @@ -253,11 +258,13 @@ func (o *PcloudPvminstancesCapturePostBadRequest) Code() int { } func (o *PcloudPvminstancesCapturePostBadRequest) Error() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/capture][%d] pcloudPvminstancesCapturePostBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/capture][%d] pcloudPvminstancesCapturePostBadRequest %s", 400, payload) } func (o *PcloudPvminstancesCapturePostBadRequest) String() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/capture][%d] pcloudPvminstancesCapturePostBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/capture][%d] pcloudPvminstancesCapturePostBadRequest %s", 400, payload) } func (o *PcloudPvminstancesCapturePostBadRequest) GetPayload() *models.Error { @@ -321,11 +328,13 @@ func (o *PcloudPvminstancesCapturePostUnauthorized) Code() int { } func (o *PcloudPvminstancesCapturePostUnauthorized) Error() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/capture][%d] pcloudPvminstancesCapturePostUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/capture][%d] pcloudPvminstancesCapturePostUnauthorized %s", 401, payload) } func (o *PcloudPvminstancesCapturePostUnauthorized) String() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/capture][%d] pcloudPvminstancesCapturePostUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/capture][%d] pcloudPvminstancesCapturePostUnauthorized %s", 401, payload) } func (o *PcloudPvminstancesCapturePostUnauthorized) GetPayload() *models.Error { @@ -389,11 +398,13 @@ func (o *PcloudPvminstancesCapturePostForbidden) Code() int { } func (o *PcloudPvminstancesCapturePostForbidden) Error() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/capture][%d] pcloudPvminstancesCapturePostForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/capture][%d] pcloudPvminstancesCapturePostForbidden %s", 403, payload) } func (o *PcloudPvminstancesCapturePostForbidden) String() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/capture][%d] pcloudPvminstancesCapturePostForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/capture][%d] pcloudPvminstancesCapturePostForbidden %s", 403, payload) } func (o *PcloudPvminstancesCapturePostForbidden) GetPayload() *models.Error { @@ -457,11 +468,13 @@ func (o *PcloudPvminstancesCapturePostNotFound) Code() int { } func (o *PcloudPvminstancesCapturePostNotFound) Error() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/capture][%d] pcloudPvminstancesCapturePostNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/capture][%d] pcloudPvminstancesCapturePostNotFound %s", 404, payload) } func (o *PcloudPvminstancesCapturePostNotFound) String() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/capture][%d] pcloudPvminstancesCapturePostNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/capture][%d] pcloudPvminstancesCapturePostNotFound %s", 404, payload) } func (o *PcloudPvminstancesCapturePostNotFound) GetPayload() *models.Error { @@ -525,11 +538,13 @@ func (o *PcloudPvminstancesCapturePostUnprocessableEntity) Code() int { } func (o *PcloudPvminstancesCapturePostUnprocessableEntity) Error() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/capture][%d] pcloudPvminstancesCapturePostUnprocessableEntity %+v", 422, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/capture][%d] pcloudPvminstancesCapturePostUnprocessableEntity %s", 422, payload) } func (o *PcloudPvminstancesCapturePostUnprocessableEntity) String() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/capture][%d] pcloudPvminstancesCapturePostUnprocessableEntity %+v", 422, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/capture][%d] pcloudPvminstancesCapturePostUnprocessableEntity %s", 422, payload) } func (o *PcloudPvminstancesCapturePostUnprocessableEntity) GetPayload() *models.Error { @@ -593,11 +608,13 @@ func (o *PcloudPvminstancesCapturePostInternalServerError) Code() int { } func (o *PcloudPvminstancesCapturePostInternalServerError) Error() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/capture][%d] pcloudPvminstancesCapturePostInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/capture][%d] pcloudPvminstancesCapturePostInternalServerError %s", 500, payload) } func (o *PcloudPvminstancesCapturePostInternalServerError) String() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/capture][%d] pcloudPvminstancesCapturePostInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/capture][%d] pcloudPvminstancesCapturePostInternalServerError %s", 500, payload) } func (o *PcloudPvminstancesCapturePostInternalServerError) GetPayload() *models.Error { diff --git a/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_clone_post_responses.go b/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_clone_post_responses.go index c7ded07d..c1c3e716 100644 --- a/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_clone_post_responses.go +++ b/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_clone_post_responses.go @@ -6,6 +6,7 @@ package p_cloud_p_vm_instances // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -121,11 +122,13 @@ func (o *PcloudPvminstancesClonePostAccepted) Code() int { } func (o *PcloudPvminstancesClonePostAccepted) Error() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/clone][%d] pcloudPvminstancesClonePostAccepted %+v", 202, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/clone][%d] pcloudPvminstancesClonePostAccepted %s", 202, payload) } func (o *PcloudPvminstancesClonePostAccepted) String() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/clone][%d] pcloudPvminstancesClonePostAccepted %+v", 202, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/clone][%d] pcloudPvminstancesClonePostAccepted %s", 202, payload) } func (o *PcloudPvminstancesClonePostAccepted) GetPayload() *models.PVMInstance { @@ -189,11 +192,13 @@ func (o *PcloudPvminstancesClonePostBadRequest) Code() int { } func (o *PcloudPvminstancesClonePostBadRequest) Error() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/clone][%d] pcloudPvminstancesClonePostBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/clone][%d] pcloudPvminstancesClonePostBadRequest %s", 400, payload) } func (o *PcloudPvminstancesClonePostBadRequest) String() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/clone][%d] pcloudPvminstancesClonePostBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/clone][%d] pcloudPvminstancesClonePostBadRequest %s", 400, payload) } func (o *PcloudPvminstancesClonePostBadRequest) GetPayload() *models.Error { @@ -257,11 +262,13 @@ func (o *PcloudPvminstancesClonePostUnauthorized) Code() int { } func (o *PcloudPvminstancesClonePostUnauthorized) Error() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/clone][%d] pcloudPvminstancesClonePostUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/clone][%d] pcloudPvminstancesClonePostUnauthorized %s", 401, payload) } func (o *PcloudPvminstancesClonePostUnauthorized) String() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/clone][%d] pcloudPvminstancesClonePostUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/clone][%d] pcloudPvminstancesClonePostUnauthorized %s", 401, payload) } func (o *PcloudPvminstancesClonePostUnauthorized) GetPayload() *models.Error { @@ -325,11 +332,13 @@ func (o *PcloudPvminstancesClonePostForbidden) Code() int { } func (o *PcloudPvminstancesClonePostForbidden) Error() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/clone][%d] pcloudPvminstancesClonePostForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/clone][%d] pcloudPvminstancesClonePostForbidden %s", 403, payload) } func (o *PcloudPvminstancesClonePostForbidden) String() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/clone][%d] pcloudPvminstancesClonePostForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/clone][%d] pcloudPvminstancesClonePostForbidden %s", 403, payload) } func (o *PcloudPvminstancesClonePostForbidden) GetPayload() *models.Error { @@ -393,11 +402,13 @@ func (o *PcloudPvminstancesClonePostNotFound) Code() int { } func (o *PcloudPvminstancesClonePostNotFound) Error() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/clone][%d] pcloudPvminstancesClonePostNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/clone][%d] pcloudPvminstancesClonePostNotFound %s", 404, payload) } func (o *PcloudPvminstancesClonePostNotFound) String() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/clone][%d] pcloudPvminstancesClonePostNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/clone][%d] pcloudPvminstancesClonePostNotFound %s", 404, payload) } func (o *PcloudPvminstancesClonePostNotFound) GetPayload() *models.Error { @@ -461,11 +472,13 @@ func (o *PcloudPvminstancesClonePostConflict) Code() int { } func (o *PcloudPvminstancesClonePostConflict) Error() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/clone][%d] pcloudPvminstancesClonePostConflict %+v", 409, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/clone][%d] pcloudPvminstancesClonePostConflict %s", 409, payload) } func (o *PcloudPvminstancesClonePostConflict) String() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/clone][%d] pcloudPvminstancesClonePostConflict %+v", 409, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/clone][%d] pcloudPvminstancesClonePostConflict %s", 409, payload) } func (o *PcloudPvminstancesClonePostConflict) GetPayload() *models.Error { @@ -529,11 +542,13 @@ func (o *PcloudPvminstancesClonePostUnprocessableEntity) Code() int { } func (o *PcloudPvminstancesClonePostUnprocessableEntity) Error() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/clone][%d] pcloudPvminstancesClonePostUnprocessableEntity %+v", 422, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/clone][%d] pcloudPvminstancesClonePostUnprocessableEntity %s", 422, payload) } func (o *PcloudPvminstancesClonePostUnprocessableEntity) String() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/clone][%d] pcloudPvminstancesClonePostUnprocessableEntity %+v", 422, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/clone][%d] pcloudPvminstancesClonePostUnprocessableEntity %s", 422, payload) } func (o *PcloudPvminstancesClonePostUnprocessableEntity) GetPayload() *models.Error { @@ -597,11 +612,13 @@ func (o *PcloudPvminstancesClonePostInternalServerError) Code() int { } func (o *PcloudPvminstancesClonePostInternalServerError) Error() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/clone][%d] pcloudPvminstancesClonePostInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/clone][%d] pcloudPvminstancesClonePostInternalServerError %s", 500, payload) } func (o *PcloudPvminstancesClonePostInternalServerError) String() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/clone][%d] pcloudPvminstancesClonePostInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/clone][%d] pcloudPvminstancesClonePostInternalServerError %s", 500, payload) } func (o *PcloudPvminstancesClonePostInternalServerError) GetPayload() *models.Error { diff --git a/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_console_get_responses.go b/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_console_get_responses.go index 77ef3346..85083359 100644 --- a/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_console_get_responses.go +++ b/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_console_get_responses.go @@ -6,6 +6,7 @@ package p_cloud_p_vm_instances // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -109,11 +110,13 @@ func (o *PcloudPvminstancesConsoleGetOK) Code() int { } func (o *PcloudPvminstancesConsoleGetOK) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/console][%d] pcloudPvminstancesConsoleGetOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/console][%d] pcloudPvminstancesConsoleGetOK %s", 200, payload) } func (o *PcloudPvminstancesConsoleGetOK) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/console][%d] pcloudPvminstancesConsoleGetOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/console][%d] pcloudPvminstancesConsoleGetOK %s", 200, payload) } func (o *PcloudPvminstancesConsoleGetOK) GetPayload() *models.ConsoleLanguages { @@ -177,11 +180,13 @@ func (o *PcloudPvminstancesConsoleGetBadRequest) Code() int { } func (o *PcloudPvminstancesConsoleGetBadRequest) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/console][%d] pcloudPvminstancesConsoleGetBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/console][%d] pcloudPvminstancesConsoleGetBadRequest %s", 400, payload) } func (o *PcloudPvminstancesConsoleGetBadRequest) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/console][%d] pcloudPvminstancesConsoleGetBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/console][%d] pcloudPvminstancesConsoleGetBadRequest %s", 400, payload) } func (o *PcloudPvminstancesConsoleGetBadRequest) GetPayload() *models.Error { @@ -245,11 +250,13 @@ func (o *PcloudPvminstancesConsoleGetUnauthorized) Code() int { } func (o *PcloudPvminstancesConsoleGetUnauthorized) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/console][%d] pcloudPvminstancesConsoleGetUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/console][%d] pcloudPvminstancesConsoleGetUnauthorized %s", 401, payload) } func (o *PcloudPvminstancesConsoleGetUnauthorized) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/console][%d] pcloudPvminstancesConsoleGetUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/console][%d] pcloudPvminstancesConsoleGetUnauthorized %s", 401, payload) } func (o *PcloudPvminstancesConsoleGetUnauthorized) GetPayload() *models.Error { @@ -313,11 +320,13 @@ func (o *PcloudPvminstancesConsoleGetForbidden) Code() int { } func (o *PcloudPvminstancesConsoleGetForbidden) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/console][%d] pcloudPvminstancesConsoleGetForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/console][%d] pcloudPvminstancesConsoleGetForbidden %s", 403, payload) } func (o *PcloudPvminstancesConsoleGetForbidden) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/console][%d] pcloudPvminstancesConsoleGetForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/console][%d] pcloudPvminstancesConsoleGetForbidden %s", 403, payload) } func (o *PcloudPvminstancesConsoleGetForbidden) GetPayload() *models.Error { @@ -381,11 +390,13 @@ func (o *PcloudPvminstancesConsoleGetNotFound) Code() int { } func (o *PcloudPvminstancesConsoleGetNotFound) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/console][%d] pcloudPvminstancesConsoleGetNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/console][%d] pcloudPvminstancesConsoleGetNotFound %s", 404, payload) } func (o *PcloudPvminstancesConsoleGetNotFound) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/console][%d] pcloudPvminstancesConsoleGetNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/console][%d] pcloudPvminstancesConsoleGetNotFound %s", 404, payload) } func (o *PcloudPvminstancesConsoleGetNotFound) GetPayload() *models.Error { @@ -449,11 +460,13 @@ func (o *PcloudPvminstancesConsoleGetInternalServerError) Code() int { } func (o *PcloudPvminstancesConsoleGetInternalServerError) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/console][%d] pcloudPvminstancesConsoleGetInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/console][%d] pcloudPvminstancesConsoleGetInternalServerError %s", 500, payload) } func (o *PcloudPvminstancesConsoleGetInternalServerError) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/console][%d] pcloudPvminstancesConsoleGetInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/console][%d] pcloudPvminstancesConsoleGetInternalServerError %s", 500, payload) } func (o *PcloudPvminstancesConsoleGetInternalServerError) GetPayload() *models.Error { diff --git a/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_console_post_responses.go b/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_console_post_responses.go index dab7e80c..7248603c 100644 --- a/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_console_post_responses.go +++ b/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_console_post_responses.go @@ -6,6 +6,7 @@ package p_cloud_p_vm_instances // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -115,11 +116,13 @@ func (o *PcloudPvminstancesConsolePostCreated) Code() int { } func (o *PcloudPvminstancesConsolePostCreated) Error() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/console][%d] pcloudPvminstancesConsolePostCreated %+v", 201, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/console][%d] pcloudPvminstancesConsolePostCreated %s", 201, payload) } func (o *PcloudPvminstancesConsolePostCreated) String() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/console][%d] pcloudPvminstancesConsolePostCreated %+v", 201, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/console][%d] pcloudPvminstancesConsolePostCreated %s", 201, payload) } func (o *PcloudPvminstancesConsolePostCreated) GetPayload() *models.PVMInstanceConsole { @@ -183,11 +186,13 @@ func (o *PcloudPvminstancesConsolePostBadRequest) Code() int { } func (o *PcloudPvminstancesConsolePostBadRequest) Error() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/console][%d] pcloudPvminstancesConsolePostBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/console][%d] pcloudPvminstancesConsolePostBadRequest %s", 400, payload) } func (o *PcloudPvminstancesConsolePostBadRequest) String() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/console][%d] pcloudPvminstancesConsolePostBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/console][%d] pcloudPvminstancesConsolePostBadRequest %s", 400, payload) } func (o *PcloudPvminstancesConsolePostBadRequest) GetPayload() *models.Error { @@ -251,11 +256,13 @@ func (o *PcloudPvminstancesConsolePostUnauthorized) Code() int { } func (o *PcloudPvminstancesConsolePostUnauthorized) Error() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/console][%d] pcloudPvminstancesConsolePostUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/console][%d] pcloudPvminstancesConsolePostUnauthorized %s", 401, payload) } func (o *PcloudPvminstancesConsolePostUnauthorized) String() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/console][%d] pcloudPvminstancesConsolePostUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/console][%d] pcloudPvminstancesConsolePostUnauthorized %s", 401, payload) } func (o *PcloudPvminstancesConsolePostUnauthorized) GetPayload() *models.Error { @@ -319,11 +326,13 @@ func (o *PcloudPvminstancesConsolePostForbidden) Code() int { } func (o *PcloudPvminstancesConsolePostForbidden) Error() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/console][%d] pcloudPvminstancesConsolePostForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/console][%d] pcloudPvminstancesConsolePostForbidden %s", 403, payload) } func (o *PcloudPvminstancesConsolePostForbidden) String() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/console][%d] pcloudPvminstancesConsolePostForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/console][%d] pcloudPvminstancesConsolePostForbidden %s", 403, payload) } func (o *PcloudPvminstancesConsolePostForbidden) GetPayload() *models.Error { @@ -387,11 +396,13 @@ func (o *PcloudPvminstancesConsolePostNotFound) Code() int { } func (o *PcloudPvminstancesConsolePostNotFound) Error() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/console][%d] pcloudPvminstancesConsolePostNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/console][%d] pcloudPvminstancesConsolePostNotFound %s", 404, payload) } func (o *PcloudPvminstancesConsolePostNotFound) String() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/console][%d] pcloudPvminstancesConsolePostNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/console][%d] pcloudPvminstancesConsolePostNotFound %s", 404, payload) } func (o *PcloudPvminstancesConsolePostNotFound) GetPayload() *models.Error { @@ -455,11 +466,13 @@ func (o *PcloudPvminstancesConsolePostUnprocessableEntity) Code() int { } func (o *PcloudPvminstancesConsolePostUnprocessableEntity) Error() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/console][%d] pcloudPvminstancesConsolePostUnprocessableEntity %+v", 422, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/console][%d] pcloudPvminstancesConsolePostUnprocessableEntity %s", 422, payload) } func (o *PcloudPvminstancesConsolePostUnprocessableEntity) String() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/console][%d] pcloudPvminstancesConsolePostUnprocessableEntity %+v", 422, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/console][%d] pcloudPvminstancesConsolePostUnprocessableEntity %s", 422, payload) } func (o *PcloudPvminstancesConsolePostUnprocessableEntity) GetPayload() *models.Error { @@ -523,11 +536,13 @@ func (o *PcloudPvminstancesConsolePostInternalServerError) Code() int { } func (o *PcloudPvminstancesConsolePostInternalServerError) Error() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/console][%d] pcloudPvminstancesConsolePostInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/console][%d] pcloudPvminstancesConsolePostInternalServerError %s", 500, payload) } func (o *PcloudPvminstancesConsolePostInternalServerError) String() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/console][%d] pcloudPvminstancesConsolePostInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/console][%d] pcloudPvminstancesConsolePostInternalServerError %s", 500, payload) } func (o *PcloudPvminstancesConsolePostInternalServerError) GetPayload() *models.Error { diff --git a/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_console_put_responses.go b/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_console_put_responses.go index bd5a3f1d..d734098d 100644 --- a/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_console_put_responses.go +++ b/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_console_put_responses.go @@ -6,6 +6,7 @@ package p_cloud_p_vm_instances // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -109,11 +110,13 @@ func (o *PcloudPvminstancesConsolePutOK) Code() int { } func (o *PcloudPvminstancesConsolePutOK) Error() string { - return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/console][%d] pcloudPvminstancesConsolePutOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/console][%d] pcloudPvminstancesConsolePutOK %s", 200, payload) } func (o *PcloudPvminstancesConsolePutOK) String() string { - return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/console][%d] pcloudPvminstancesConsolePutOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/console][%d] pcloudPvminstancesConsolePutOK %s", 200, payload) } func (o *PcloudPvminstancesConsolePutOK) GetPayload() *models.ConsoleLanguage { @@ -177,11 +180,13 @@ func (o *PcloudPvminstancesConsolePutBadRequest) Code() int { } func (o *PcloudPvminstancesConsolePutBadRequest) Error() string { - return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/console][%d] pcloudPvminstancesConsolePutBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/console][%d] pcloudPvminstancesConsolePutBadRequest %s", 400, payload) } func (o *PcloudPvminstancesConsolePutBadRequest) String() string { - return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/console][%d] pcloudPvminstancesConsolePutBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/console][%d] pcloudPvminstancesConsolePutBadRequest %s", 400, payload) } func (o *PcloudPvminstancesConsolePutBadRequest) GetPayload() *models.Error { @@ -245,11 +250,13 @@ func (o *PcloudPvminstancesConsolePutUnauthorized) Code() int { } func (o *PcloudPvminstancesConsolePutUnauthorized) Error() string { - return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/console][%d] pcloudPvminstancesConsolePutUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/console][%d] pcloudPvminstancesConsolePutUnauthorized %s", 401, payload) } func (o *PcloudPvminstancesConsolePutUnauthorized) String() string { - return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/console][%d] pcloudPvminstancesConsolePutUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/console][%d] pcloudPvminstancesConsolePutUnauthorized %s", 401, payload) } func (o *PcloudPvminstancesConsolePutUnauthorized) GetPayload() *models.Error { @@ -313,11 +320,13 @@ func (o *PcloudPvminstancesConsolePutForbidden) Code() int { } func (o *PcloudPvminstancesConsolePutForbidden) Error() string { - return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/console][%d] pcloudPvminstancesConsolePutForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/console][%d] pcloudPvminstancesConsolePutForbidden %s", 403, payload) } func (o *PcloudPvminstancesConsolePutForbidden) String() string { - return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/console][%d] pcloudPvminstancesConsolePutForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/console][%d] pcloudPvminstancesConsolePutForbidden %s", 403, payload) } func (o *PcloudPvminstancesConsolePutForbidden) GetPayload() *models.Error { @@ -381,11 +390,13 @@ func (o *PcloudPvminstancesConsolePutNotFound) Code() int { } func (o *PcloudPvminstancesConsolePutNotFound) Error() string { - return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/console][%d] pcloudPvminstancesConsolePutNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/console][%d] pcloudPvminstancesConsolePutNotFound %s", 404, payload) } func (o *PcloudPvminstancesConsolePutNotFound) String() string { - return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/console][%d] pcloudPvminstancesConsolePutNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/console][%d] pcloudPvminstancesConsolePutNotFound %s", 404, payload) } func (o *PcloudPvminstancesConsolePutNotFound) GetPayload() *models.Error { @@ -449,11 +460,13 @@ func (o *PcloudPvminstancesConsolePutInternalServerError) Code() int { } func (o *PcloudPvminstancesConsolePutInternalServerError) Error() string { - return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/console][%d] pcloudPvminstancesConsolePutInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/console][%d] pcloudPvminstancesConsolePutInternalServerError %s", 500, payload) } func (o *PcloudPvminstancesConsolePutInternalServerError) String() string { - return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/console][%d] pcloudPvminstancesConsolePutInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/console][%d] pcloudPvminstancesConsolePutInternalServerError %s", 500, payload) } func (o *PcloudPvminstancesConsolePutInternalServerError) GetPayload() *models.Error { diff --git a/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_delete_responses.go b/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_delete_responses.go index cd3481f0..6caed9ae 100644 --- a/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_delete_responses.go +++ b/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_delete_responses.go @@ -6,6 +6,7 @@ package p_cloud_p_vm_instances // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -115,11 +116,13 @@ func (o *PcloudPvminstancesDeleteOK) Code() int { } func (o *PcloudPvminstancesDeleteOK) Error() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}][%d] pcloudPvminstancesDeleteOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}][%d] pcloudPvminstancesDeleteOK %s", 200, payload) } func (o *PcloudPvminstancesDeleteOK) String() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}][%d] pcloudPvminstancesDeleteOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}][%d] pcloudPvminstancesDeleteOK %s", 200, payload) } func (o *PcloudPvminstancesDeleteOK) GetPayload() models.Object { @@ -181,11 +184,13 @@ func (o *PcloudPvminstancesDeleteBadRequest) Code() int { } func (o *PcloudPvminstancesDeleteBadRequest) Error() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}][%d] pcloudPvminstancesDeleteBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}][%d] pcloudPvminstancesDeleteBadRequest %s", 400, payload) } func (o *PcloudPvminstancesDeleteBadRequest) String() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}][%d] pcloudPvminstancesDeleteBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}][%d] pcloudPvminstancesDeleteBadRequest %s", 400, payload) } func (o *PcloudPvminstancesDeleteBadRequest) GetPayload() *models.Error { @@ -249,11 +254,13 @@ func (o *PcloudPvminstancesDeleteUnauthorized) Code() int { } func (o *PcloudPvminstancesDeleteUnauthorized) Error() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}][%d] pcloudPvminstancesDeleteUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}][%d] pcloudPvminstancesDeleteUnauthorized %s", 401, payload) } func (o *PcloudPvminstancesDeleteUnauthorized) String() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}][%d] pcloudPvminstancesDeleteUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}][%d] pcloudPvminstancesDeleteUnauthorized %s", 401, payload) } func (o *PcloudPvminstancesDeleteUnauthorized) GetPayload() *models.Error { @@ -317,11 +324,13 @@ func (o *PcloudPvminstancesDeleteForbidden) Code() int { } func (o *PcloudPvminstancesDeleteForbidden) Error() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}][%d] pcloudPvminstancesDeleteForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}][%d] pcloudPvminstancesDeleteForbidden %s", 403, payload) } func (o *PcloudPvminstancesDeleteForbidden) String() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}][%d] pcloudPvminstancesDeleteForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}][%d] pcloudPvminstancesDeleteForbidden %s", 403, payload) } func (o *PcloudPvminstancesDeleteForbidden) GetPayload() *models.Error { @@ -385,11 +394,13 @@ func (o *PcloudPvminstancesDeleteNotFound) Code() int { } func (o *PcloudPvminstancesDeleteNotFound) Error() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}][%d] pcloudPvminstancesDeleteNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}][%d] pcloudPvminstancesDeleteNotFound %s", 404, payload) } func (o *PcloudPvminstancesDeleteNotFound) String() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}][%d] pcloudPvminstancesDeleteNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}][%d] pcloudPvminstancesDeleteNotFound %s", 404, payload) } func (o *PcloudPvminstancesDeleteNotFound) GetPayload() *models.Error { @@ -453,11 +464,13 @@ func (o *PcloudPvminstancesDeleteGone) Code() int { } func (o *PcloudPvminstancesDeleteGone) Error() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}][%d] pcloudPvminstancesDeleteGone %+v", 410, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}][%d] pcloudPvminstancesDeleteGone %s", 410, payload) } func (o *PcloudPvminstancesDeleteGone) String() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}][%d] pcloudPvminstancesDeleteGone %+v", 410, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}][%d] pcloudPvminstancesDeleteGone %s", 410, payload) } func (o *PcloudPvminstancesDeleteGone) GetPayload() *models.Error { @@ -521,11 +534,13 @@ func (o *PcloudPvminstancesDeleteInternalServerError) Code() int { } func (o *PcloudPvminstancesDeleteInternalServerError) Error() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}][%d] pcloudPvminstancesDeleteInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}][%d] pcloudPvminstancesDeleteInternalServerError %s", 500, payload) } func (o *PcloudPvminstancesDeleteInternalServerError) String() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}][%d] pcloudPvminstancesDeleteInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}][%d] pcloudPvminstancesDeleteInternalServerError %s", 500, payload) } func (o *PcloudPvminstancesDeleteInternalServerError) GetPayload() *models.Error { diff --git a/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_get_responses.go b/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_get_responses.go index e651c345..c520c6c9 100644 --- a/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_get_responses.go +++ b/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_get_responses.go @@ -6,6 +6,7 @@ package p_cloud_p_vm_instances // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -109,11 +110,13 @@ func (o *PcloudPvminstancesGetOK) Code() int { } func (o *PcloudPvminstancesGetOK) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}][%d] pcloudPvminstancesGetOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}][%d] pcloudPvminstancesGetOK %s", 200, payload) } func (o *PcloudPvminstancesGetOK) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}][%d] pcloudPvminstancesGetOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}][%d] pcloudPvminstancesGetOK %s", 200, payload) } func (o *PcloudPvminstancesGetOK) GetPayload() *models.PVMInstance { @@ -177,11 +180,13 @@ func (o *PcloudPvminstancesGetBadRequest) Code() int { } func (o *PcloudPvminstancesGetBadRequest) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}][%d] pcloudPvminstancesGetBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}][%d] pcloudPvminstancesGetBadRequest %s", 400, payload) } func (o *PcloudPvminstancesGetBadRequest) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}][%d] pcloudPvminstancesGetBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}][%d] pcloudPvminstancesGetBadRequest %s", 400, payload) } func (o *PcloudPvminstancesGetBadRequest) GetPayload() *models.Error { @@ -245,11 +250,13 @@ func (o *PcloudPvminstancesGetUnauthorized) Code() int { } func (o *PcloudPvminstancesGetUnauthorized) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}][%d] pcloudPvminstancesGetUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}][%d] pcloudPvminstancesGetUnauthorized %s", 401, payload) } func (o *PcloudPvminstancesGetUnauthorized) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}][%d] pcloudPvminstancesGetUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}][%d] pcloudPvminstancesGetUnauthorized %s", 401, payload) } func (o *PcloudPvminstancesGetUnauthorized) GetPayload() *models.Error { @@ -313,11 +320,13 @@ func (o *PcloudPvminstancesGetForbidden) Code() int { } func (o *PcloudPvminstancesGetForbidden) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}][%d] pcloudPvminstancesGetForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}][%d] pcloudPvminstancesGetForbidden %s", 403, payload) } func (o *PcloudPvminstancesGetForbidden) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}][%d] pcloudPvminstancesGetForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}][%d] pcloudPvminstancesGetForbidden %s", 403, payload) } func (o *PcloudPvminstancesGetForbidden) GetPayload() *models.Error { @@ -381,11 +390,13 @@ func (o *PcloudPvminstancesGetNotFound) Code() int { } func (o *PcloudPvminstancesGetNotFound) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}][%d] pcloudPvminstancesGetNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}][%d] pcloudPvminstancesGetNotFound %s", 404, payload) } func (o *PcloudPvminstancesGetNotFound) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}][%d] pcloudPvminstancesGetNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}][%d] pcloudPvminstancesGetNotFound %s", 404, payload) } func (o *PcloudPvminstancesGetNotFound) GetPayload() *models.Error { @@ -449,11 +460,13 @@ func (o *PcloudPvminstancesGetInternalServerError) Code() int { } func (o *PcloudPvminstancesGetInternalServerError) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}][%d] pcloudPvminstancesGetInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}][%d] pcloudPvminstancesGetInternalServerError %s", 500, payload) } func (o *PcloudPvminstancesGetInternalServerError) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}][%d] pcloudPvminstancesGetInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}][%d] pcloudPvminstancesGetInternalServerError %s", 500, payload) } func (o *PcloudPvminstancesGetInternalServerError) GetPayload() *models.Error { diff --git a/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_getall_responses.go b/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_getall_responses.go index 02ff99af..411ef74b 100644 --- a/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_getall_responses.go +++ b/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_getall_responses.go @@ -6,6 +6,7 @@ package p_cloud_p_vm_instances // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -115,11 +116,13 @@ func (o *PcloudPvminstancesGetallOK) Code() int { } func (o *PcloudPvminstancesGetallOK) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances][%d] pcloudPvminstancesGetallOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances][%d] pcloudPvminstancesGetallOK %s", 200, payload) } func (o *PcloudPvminstancesGetallOK) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances][%d] pcloudPvminstancesGetallOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances][%d] pcloudPvminstancesGetallOK %s", 200, payload) } func (o *PcloudPvminstancesGetallOK) GetPayload() *models.PVMInstances { @@ -183,11 +186,13 @@ func (o *PcloudPvminstancesGetallBadRequest) Code() int { } func (o *PcloudPvminstancesGetallBadRequest) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances][%d] pcloudPvminstancesGetallBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances][%d] pcloudPvminstancesGetallBadRequest %s", 400, payload) } func (o *PcloudPvminstancesGetallBadRequest) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances][%d] pcloudPvminstancesGetallBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances][%d] pcloudPvminstancesGetallBadRequest %s", 400, payload) } func (o *PcloudPvminstancesGetallBadRequest) GetPayload() *models.Error { @@ -251,11 +256,13 @@ func (o *PcloudPvminstancesGetallUnauthorized) Code() int { } func (o *PcloudPvminstancesGetallUnauthorized) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances][%d] pcloudPvminstancesGetallUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances][%d] pcloudPvminstancesGetallUnauthorized %s", 401, payload) } func (o *PcloudPvminstancesGetallUnauthorized) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances][%d] pcloudPvminstancesGetallUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances][%d] pcloudPvminstancesGetallUnauthorized %s", 401, payload) } func (o *PcloudPvminstancesGetallUnauthorized) GetPayload() *models.Error { @@ -319,11 +326,13 @@ func (o *PcloudPvminstancesGetallForbidden) Code() int { } func (o *PcloudPvminstancesGetallForbidden) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances][%d] pcloudPvminstancesGetallForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances][%d] pcloudPvminstancesGetallForbidden %s", 403, payload) } func (o *PcloudPvminstancesGetallForbidden) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances][%d] pcloudPvminstancesGetallForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances][%d] pcloudPvminstancesGetallForbidden %s", 403, payload) } func (o *PcloudPvminstancesGetallForbidden) GetPayload() *models.Error { @@ -387,11 +396,13 @@ func (o *PcloudPvminstancesGetallNotFound) Code() int { } func (o *PcloudPvminstancesGetallNotFound) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances][%d] pcloudPvminstancesGetallNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances][%d] pcloudPvminstancesGetallNotFound %s", 404, payload) } func (o *PcloudPvminstancesGetallNotFound) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances][%d] pcloudPvminstancesGetallNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances][%d] pcloudPvminstancesGetallNotFound %s", 404, payload) } func (o *PcloudPvminstancesGetallNotFound) GetPayload() *models.Error { @@ -455,11 +466,13 @@ func (o *PcloudPvminstancesGetallRequestTimeout) Code() int { } func (o *PcloudPvminstancesGetallRequestTimeout) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances][%d] pcloudPvminstancesGetallRequestTimeout %+v", 408, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances][%d] pcloudPvminstancesGetallRequestTimeout %s", 408, payload) } func (o *PcloudPvminstancesGetallRequestTimeout) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances][%d] pcloudPvminstancesGetallRequestTimeout %+v", 408, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances][%d] pcloudPvminstancesGetallRequestTimeout %s", 408, payload) } func (o *PcloudPvminstancesGetallRequestTimeout) GetPayload() *models.Error { @@ -523,11 +536,13 @@ func (o *PcloudPvminstancesGetallInternalServerError) Code() int { } func (o *PcloudPvminstancesGetallInternalServerError) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances][%d] pcloudPvminstancesGetallInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances][%d] pcloudPvminstancesGetallInternalServerError %s", 500, payload) } func (o *PcloudPvminstancesGetallInternalServerError) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances][%d] pcloudPvminstancesGetallInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances][%d] pcloudPvminstancesGetallInternalServerError %s", 500, payload) } func (o *PcloudPvminstancesGetallInternalServerError) GetPayload() *models.Error { diff --git a/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_networks_delete_responses.go b/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_networks_delete_responses.go index 8cab7f44..47fc0990 100644 --- a/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_networks_delete_responses.go +++ b/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_networks_delete_responses.go @@ -6,6 +6,7 @@ package p_cloud_p_vm_instances // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -115,11 +116,13 @@ func (o *PcloudPvminstancesNetworksDeleteOK) Code() int { } func (o *PcloudPvminstancesNetworksDeleteOK) Error() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/networks/{network_id}][%d] pcloudPvminstancesNetworksDeleteOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/networks/{network_id}][%d] pcloudPvminstancesNetworksDeleteOK %s", 200, payload) } func (o *PcloudPvminstancesNetworksDeleteOK) String() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/networks/{network_id}][%d] pcloudPvminstancesNetworksDeleteOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/networks/{network_id}][%d] pcloudPvminstancesNetworksDeleteOK %s", 200, payload) } func (o *PcloudPvminstancesNetworksDeleteOK) GetPayload() models.Object { @@ -181,11 +184,13 @@ func (o *PcloudPvminstancesNetworksDeleteBadRequest) Code() int { } func (o *PcloudPvminstancesNetworksDeleteBadRequest) Error() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/networks/{network_id}][%d] pcloudPvminstancesNetworksDeleteBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/networks/{network_id}][%d] pcloudPvminstancesNetworksDeleteBadRequest %s", 400, payload) } func (o *PcloudPvminstancesNetworksDeleteBadRequest) String() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/networks/{network_id}][%d] pcloudPvminstancesNetworksDeleteBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/networks/{network_id}][%d] pcloudPvminstancesNetworksDeleteBadRequest %s", 400, payload) } func (o *PcloudPvminstancesNetworksDeleteBadRequest) GetPayload() *models.Error { @@ -249,11 +254,13 @@ func (o *PcloudPvminstancesNetworksDeleteUnauthorized) Code() int { } func (o *PcloudPvminstancesNetworksDeleteUnauthorized) Error() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/networks/{network_id}][%d] pcloudPvminstancesNetworksDeleteUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/networks/{network_id}][%d] pcloudPvminstancesNetworksDeleteUnauthorized %s", 401, payload) } func (o *PcloudPvminstancesNetworksDeleteUnauthorized) String() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/networks/{network_id}][%d] pcloudPvminstancesNetworksDeleteUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/networks/{network_id}][%d] pcloudPvminstancesNetworksDeleteUnauthorized %s", 401, payload) } func (o *PcloudPvminstancesNetworksDeleteUnauthorized) GetPayload() *models.Error { @@ -317,11 +324,13 @@ func (o *PcloudPvminstancesNetworksDeleteForbidden) Code() int { } func (o *PcloudPvminstancesNetworksDeleteForbidden) Error() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/networks/{network_id}][%d] pcloudPvminstancesNetworksDeleteForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/networks/{network_id}][%d] pcloudPvminstancesNetworksDeleteForbidden %s", 403, payload) } func (o *PcloudPvminstancesNetworksDeleteForbidden) String() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/networks/{network_id}][%d] pcloudPvminstancesNetworksDeleteForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/networks/{network_id}][%d] pcloudPvminstancesNetworksDeleteForbidden %s", 403, payload) } func (o *PcloudPvminstancesNetworksDeleteForbidden) GetPayload() *models.Error { @@ -385,11 +394,13 @@ func (o *PcloudPvminstancesNetworksDeleteNotFound) Code() int { } func (o *PcloudPvminstancesNetworksDeleteNotFound) Error() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/networks/{network_id}][%d] pcloudPvminstancesNetworksDeleteNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/networks/{network_id}][%d] pcloudPvminstancesNetworksDeleteNotFound %s", 404, payload) } func (o *PcloudPvminstancesNetworksDeleteNotFound) String() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/networks/{network_id}][%d] pcloudPvminstancesNetworksDeleteNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/networks/{network_id}][%d] pcloudPvminstancesNetworksDeleteNotFound %s", 404, payload) } func (o *PcloudPvminstancesNetworksDeleteNotFound) GetPayload() *models.Error { @@ -453,11 +464,13 @@ func (o *PcloudPvminstancesNetworksDeleteGone) Code() int { } func (o *PcloudPvminstancesNetworksDeleteGone) Error() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/networks/{network_id}][%d] pcloudPvminstancesNetworksDeleteGone %+v", 410, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/networks/{network_id}][%d] pcloudPvminstancesNetworksDeleteGone %s", 410, payload) } func (o *PcloudPvminstancesNetworksDeleteGone) String() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/networks/{network_id}][%d] pcloudPvminstancesNetworksDeleteGone %+v", 410, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/networks/{network_id}][%d] pcloudPvminstancesNetworksDeleteGone %s", 410, payload) } func (o *PcloudPvminstancesNetworksDeleteGone) GetPayload() *models.Error { @@ -521,11 +534,13 @@ func (o *PcloudPvminstancesNetworksDeleteInternalServerError) Code() int { } func (o *PcloudPvminstancesNetworksDeleteInternalServerError) Error() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/networks/{network_id}][%d] pcloudPvminstancesNetworksDeleteInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/networks/{network_id}][%d] pcloudPvminstancesNetworksDeleteInternalServerError %s", 500, payload) } func (o *PcloudPvminstancesNetworksDeleteInternalServerError) String() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/networks/{network_id}][%d] pcloudPvminstancesNetworksDeleteInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/networks/{network_id}][%d] pcloudPvminstancesNetworksDeleteInternalServerError %s", 500, payload) } func (o *PcloudPvminstancesNetworksDeleteInternalServerError) GetPayload() *models.Error { diff --git a/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_networks_get_responses.go b/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_networks_get_responses.go index 531951a0..066032b9 100644 --- a/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_networks_get_responses.go +++ b/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_networks_get_responses.go @@ -6,6 +6,7 @@ package p_cloud_p_vm_instances // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -109,11 +110,13 @@ func (o *PcloudPvminstancesNetworksGetOK) Code() int { } func (o *PcloudPvminstancesNetworksGetOK) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/networks/{network_id}][%d] pcloudPvminstancesNetworksGetOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/networks/{network_id}][%d] pcloudPvminstancesNetworksGetOK %s", 200, payload) } func (o *PcloudPvminstancesNetworksGetOK) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/networks/{network_id}][%d] pcloudPvminstancesNetworksGetOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/networks/{network_id}][%d] pcloudPvminstancesNetworksGetOK %s", 200, payload) } func (o *PcloudPvminstancesNetworksGetOK) GetPayload() *models.PVMInstanceNetworks { @@ -177,11 +180,13 @@ func (o *PcloudPvminstancesNetworksGetBadRequest) Code() int { } func (o *PcloudPvminstancesNetworksGetBadRequest) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/networks/{network_id}][%d] pcloudPvminstancesNetworksGetBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/networks/{network_id}][%d] pcloudPvminstancesNetworksGetBadRequest %s", 400, payload) } func (o *PcloudPvminstancesNetworksGetBadRequest) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/networks/{network_id}][%d] pcloudPvminstancesNetworksGetBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/networks/{network_id}][%d] pcloudPvminstancesNetworksGetBadRequest %s", 400, payload) } func (o *PcloudPvminstancesNetworksGetBadRequest) GetPayload() *models.Error { @@ -245,11 +250,13 @@ func (o *PcloudPvminstancesNetworksGetUnauthorized) Code() int { } func (o *PcloudPvminstancesNetworksGetUnauthorized) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/networks/{network_id}][%d] pcloudPvminstancesNetworksGetUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/networks/{network_id}][%d] pcloudPvminstancesNetworksGetUnauthorized %s", 401, payload) } func (o *PcloudPvminstancesNetworksGetUnauthorized) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/networks/{network_id}][%d] pcloudPvminstancesNetworksGetUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/networks/{network_id}][%d] pcloudPvminstancesNetworksGetUnauthorized %s", 401, payload) } func (o *PcloudPvminstancesNetworksGetUnauthorized) GetPayload() *models.Error { @@ -313,11 +320,13 @@ func (o *PcloudPvminstancesNetworksGetForbidden) Code() int { } func (o *PcloudPvminstancesNetworksGetForbidden) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/networks/{network_id}][%d] pcloudPvminstancesNetworksGetForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/networks/{network_id}][%d] pcloudPvminstancesNetworksGetForbidden %s", 403, payload) } func (o *PcloudPvminstancesNetworksGetForbidden) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/networks/{network_id}][%d] pcloudPvminstancesNetworksGetForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/networks/{network_id}][%d] pcloudPvminstancesNetworksGetForbidden %s", 403, payload) } func (o *PcloudPvminstancesNetworksGetForbidden) GetPayload() *models.Error { @@ -381,11 +390,13 @@ func (o *PcloudPvminstancesNetworksGetNotFound) Code() int { } func (o *PcloudPvminstancesNetworksGetNotFound) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/networks/{network_id}][%d] pcloudPvminstancesNetworksGetNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/networks/{network_id}][%d] pcloudPvminstancesNetworksGetNotFound %s", 404, payload) } func (o *PcloudPvminstancesNetworksGetNotFound) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/networks/{network_id}][%d] pcloudPvminstancesNetworksGetNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/networks/{network_id}][%d] pcloudPvminstancesNetworksGetNotFound %s", 404, payload) } func (o *PcloudPvminstancesNetworksGetNotFound) GetPayload() *models.Error { @@ -449,11 +460,13 @@ func (o *PcloudPvminstancesNetworksGetInternalServerError) Code() int { } func (o *PcloudPvminstancesNetworksGetInternalServerError) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/networks/{network_id}][%d] pcloudPvminstancesNetworksGetInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/networks/{network_id}][%d] pcloudPvminstancesNetworksGetInternalServerError %s", 500, payload) } func (o *PcloudPvminstancesNetworksGetInternalServerError) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/networks/{network_id}][%d] pcloudPvminstancesNetworksGetInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/networks/{network_id}][%d] pcloudPvminstancesNetworksGetInternalServerError %s", 500, payload) } func (o *PcloudPvminstancesNetworksGetInternalServerError) GetPayload() *models.Error { diff --git a/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_networks_getall_responses.go b/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_networks_getall_responses.go index 5ec15c71..1c6a6f10 100644 --- a/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_networks_getall_responses.go +++ b/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_networks_getall_responses.go @@ -6,6 +6,7 @@ package p_cloud_p_vm_instances // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -109,11 +110,13 @@ func (o *PcloudPvminstancesNetworksGetallOK) Code() int { } func (o *PcloudPvminstancesNetworksGetallOK) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/networks][%d] pcloudPvminstancesNetworksGetallOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/networks][%d] pcloudPvminstancesNetworksGetallOK %s", 200, payload) } func (o *PcloudPvminstancesNetworksGetallOK) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/networks][%d] pcloudPvminstancesNetworksGetallOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/networks][%d] pcloudPvminstancesNetworksGetallOK %s", 200, payload) } func (o *PcloudPvminstancesNetworksGetallOK) GetPayload() *models.PVMInstanceNetworks { @@ -177,11 +180,13 @@ func (o *PcloudPvminstancesNetworksGetallBadRequest) Code() int { } func (o *PcloudPvminstancesNetworksGetallBadRequest) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/networks][%d] pcloudPvminstancesNetworksGetallBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/networks][%d] pcloudPvminstancesNetworksGetallBadRequest %s", 400, payload) } func (o *PcloudPvminstancesNetworksGetallBadRequest) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/networks][%d] pcloudPvminstancesNetworksGetallBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/networks][%d] pcloudPvminstancesNetworksGetallBadRequest %s", 400, payload) } func (o *PcloudPvminstancesNetworksGetallBadRequest) GetPayload() *models.Error { @@ -245,11 +250,13 @@ func (o *PcloudPvminstancesNetworksGetallUnauthorized) Code() int { } func (o *PcloudPvminstancesNetworksGetallUnauthorized) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/networks][%d] pcloudPvminstancesNetworksGetallUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/networks][%d] pcloudPvminstancesNetworksGetallUnauthorized %s", 401, payload) } func (o *PcloudPvminstancesNetworksGetallUnauthorized) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/networks][%d] pcloudPvminstancesNetworksGetallUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/networks][%d] pcloudPvminstancesNetworksGetallUnauthorized %s", 401, payload) } func (o *PcloudPvminstancesNetworksGetallUnauthorized) GetPayload() *models.Error { @@ -313,11 +320,13 @@ func (o *PcloudPvminstancesNetworksGetallForbidden) Code() int { } func (o *PcloudPvminstancesNetworksGetallForbidden) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/networks][%d] pcloudPvminstancesNetworksGetallForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/networks][%d] pcloudPvminstancesNetworksGetallForbidden %s", 403, payload) } func (o *PcloudPvminstancesNetworksGetallForbidden) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/networks][%d] pcloudPvminstancesNetworksGetallForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/networks][%d] pcloudPvminstancesNetworksGetallForbidden %s", 403, payload) } func (o *PcloudPvminstancesNetworksGetallForbidden) GetPayload() *models.Error { @@ -381,11 +390,13 @@ func (o *PcloudPvminstancesNetworksGetallNotFound) Code() int { } func (o *PcloudPvminstancesNetworksGetallNotFound) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/networks][%d] pcloudPvminstancesNetworksGetallNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/networks][%d] pcloudPvminstancesNetworksGetallNotFound %s", 404, payload) } func (o *PcloudPvminstancesNetworksGetallNotFound) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/networks][%d] pcloudPvminstancesNetworksGetallNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/networks][%d] pcloudPvminstancesNetworksGetallNotFound %s", 404, payload) } func (o *PcloudPvminstancesNetworksGetallNotFound) GetPayload() *models.Error { @@ -449,11 +460,13 @@ func (o *PcloudPvminstancesNetworksGetallInternalServerError) Code() int { } func (o *PcloudPvminstancesNetworksGetallInternalServerError) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/networks][%d] pcloudPvminstancesNetworksGetallInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/networks][%d] pcloudPvminstancesNetworksGetallInternalServerError %s", 500, payload) } func (o *PcloudPvminstancesNetworksGetallInternalServerError) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/networks][%d] pcloudPvminstancesNetworksGetallInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/networks][%d] pcloudPvminstancesNetworksGetallInternalServerError %s", 500, payload) } func (o *PcloudPvminstancesNetworksGetallInternalServerError) GetPayload() *models.Error { diff --git a/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_networks_post_responses.go b/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_networks_post_responses.go index 59404682..9048edee 100644 --- a/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_networks_post_responses.go +++ b/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_networks_post_responses.go @@ -6,6 +6,7 @@ package p_cloud_p_vm_instances // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -121,11 +122,13 @@ func (o *PcloudPvminstancesNetworksPostCreated) Code() int { } func (o *PcloudPvminstancesNetworksPostCreated) Error() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/networks][%d] pcloudPvminstancesNetworksPostCreated %+v", 201, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/networks][%d] pcloudPvminstancesNetworksPostCreated %s", 201, payload) } func (o *PcloudPvminstancesNetworksPostCreated) String() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/networks][%d] pcloudPvminstancesNetworksPostCreated %+v", 201, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/networks][%d] pcloudPvminstancesNetworksPostCreated %s", 201, payload) } func (o *PcloudPvminstancesNetworksPostCreated) GetPayload() *models.PVMInstanceNetwork { @@ -189,11 +192,13 @@ func (o *PcloudPvminstancesNetworksPostBadRequest) Code() int { } func (o *PcloudPvminstancesNetworksPostBadRequest) Error() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/networks][%d] pcloudPvminstancesNetworksPostBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/networks][%d] pcloudPvminstancesNetworksPostBadRequest %s", 400, payload) } func (o *PcloudPvminstancesNetworksPostBadRequest) String() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/networks][%d] pcloudPvminstancesNetworksPostBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/networks][%d] pcloudPvminstancesNetworksPostBadRequest %s", 400, payload) } func (o *PcloudPvminstancesNetworksPostBadRequest) GetPayload() *models.Error { @@ -257,11 +262,13 @@ func (o *PcloudPvminstancesNetworksPostUnauthorized) Code() int { } func (o *PcloudPvminstancesNetworksPostUnauthorized) Error() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/networks][%d] pcloudPvminstancesNetworksPostUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/networks][%d] pcloudPvminstancesNetworksPostUnauthorized %s", 401, payload) } func (o *PcloudPvminstancesNetworksPostUnauthorized) String() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/networks][%d] pcloudPvminstancesNetworksPostUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/networks][%d] pcloudPvminstancesNetworksPostUnauthorized %s", 401, payload) } func (o *PcloudPvminstancesNetworksPostUnauthorized) GetPayload() *models.Error { @@ -325,11 +332,13 @@ func (o *PcloudPvminstancesNetworksPostForbidden) Code() int { } func (o *PcloudPvminstancesNetworksPostForbidden) Error() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/networks][%d] pcloudPvminstancesNetworksPostForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/networks][%d] pcloudPvminstancesNetworksPostForbidden %s", 403, payload) } func (o *PcloudPvminstancesNetworksPostForbidden) String() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/networks][%d] pcloudPvminstancesNetworksPostForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/networks][%d] pcloudPvminstancesNetworksPostForbidden %s", 403, payload) } func (o *PcloudPvminstancesNetworksPostForbidden) GetPayload() *models.Error { @@ -393,11 +402,13 @@ func (o *PcloudPvminstancesNetworksPostNotFound) Code() int { } func (o *PcloudPvminstancesNetworksPostNotFound) Error() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/networks][%d] pcloudPvminstancesNetworksPostNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/networks][%d] pcloudPvminstancesNetworksPostNotFound %s", 404, payload) } func (o *PcloudPvminstancesNetworksPostNotFound) String() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/networks][%d] pcloudPvminstancesNetworksPostNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/networks][%d] pcloudPvminstancesNetworksPostNotFound %s", 404, payload) } func (o *PcloudPvminstancesNetworksPostNotFound) GetPayload() *models.Error { @@ -461,11 +472,13 @@ func (o *PcloudPvminstancesNetworksPostConflict) Code() int { } func (o *PcloudPvminstancesNetworksPostConflict) Error() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/networks][%d] pcloudPvminstancesNetworksPostConflict %+v", 409, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/networks][%d] pcloudPvminstancesNetworksPostConflict %s", 409, payload) } func (o *PcloudPvminstancesNetworksPostConflict) String() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/networks][%d] pcloudPvminstancesNetworksPostConflict %+v", 409, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/networks][%d] pcloudPvminstancesNetworksPostConflict %s", 409, payload) } func (o *PcloudPvminstancesNetworksPostConflict) GetPayload() *models.Error { @@ -529,11 +542,13 @@ func (o *PcloudPvminstancesNetworksPostUnprocessableEntity) Code() int { } func (o *PcloudPvminstancesNetworksPostUnprocessableEntity) Error() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/networks][%d] pcloudPvminstancesNetworksPostUnprocessableEntity %+v", 422, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/networks][%d] pcloudPvminstancesNetworksPostUnprocessableEntity %s", 422, payload) } func (o *PcloudPvminstancesNetworksPostUnprocessableEntity) String() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/networks][%d] pcloudPvminstancesNetworksPostUnprocessableEntity %+v", 422, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/networks][%d] pcloudPvminstancesNetworksPostUnprocessableEntity %s", 422, payload) } func (o *PcloudPvminstancesNetworksPostUnprocessableEntity) GetPayload() *models.Error { @@ -597,11 +612,13 @@ func (o *PcloudPvminstancesNetworksPostInternalServerError) Code() int { } func (o *PcloudPvminstancesNetworksPostInternalServerError) Error() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/networks][%d] pcloudPvminstancesNetworksPostInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/networks][%d] pcloudPvminstancesNetworksPostInternalServerError %s", 500, payload) } func (o *PcloudPvminstancesNetworksPostInternalServerError) String() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/networks][%d] pcloudPvminstancesNetworksPostInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/networks][%d] pcloudPvminstancesNetworksPostInternalServerError %s", 500, payload) } func (o *PcloudPvminstancesNetworksPostInternalServerError) GetPayload() *models.Error { diff --git a/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_operations_post_responses.go b/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_operations_post_responses.go index b02cae3f..e89f047d 100644 --- a/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_operations_post_responses.go +++ b/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_operations_post_responses.go @@ -6,6 +6,7 @@ package p_cloud_p_vm_instances // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -115,11 +116,13 @@ func (o *PcloudPvminstancesOperationsPostOK) Code() int { } func (o *PcloudPvminstancesOperationsPostOK) Error() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/operations][%d] pcloudPvminstancesOperationsPostOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/operations][%d] pcloudPvminstancesOperationsPostOK %s", 200, payload) } func (o *PcloudPvminstancesOperationsPostOK) String() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/operations][%d] pcloudPvminstancesOperationsPostOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/operations][%d] pcloudPvminstancesOperationsPostOK %s", 200, payload) } func (o *PcloudPvminstancesOperationsPostOK) GetPayload() models.Object { @@ -181,11 +184,13 @@ func (o *PcloudPvminstancesOperationsPostBadRequest) Code() int { } func (o *PcloudPvminstancesOperationsPostBadRequest) Error() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/operations][%d] pcloudPvminstancesOperationsPostBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/operations][%d] pcloudPvminstancesOperationsPostBadRequest %s", 400, payload) } func (o *PcloudPvminstancesOperationsPostBadRequest) String() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/operations][%d] pcloudPvminstancesOperationsPostBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/operations][%d] pcloudPvminstancesOperationsPostBadRequest %s", 400, payload) } func (o *PcloudPvminstancesOperationsPostBadRequest) GetPayload() *models.Error { @@ -249,11 +254,13 @@ func (o *PcloudPvminstancesOperationsPostUnauthorized) Code() int { } func (o *PcloudPvminstancesOperationsPostUnauthorized) Error() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/operations][%d] pcloudPvminstancesOperationsPostUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/operations][%d] pcloudPvminstancesOperationsPostUnauthorized %s", 401, payload) } func (o *PcloudPvminstancesOperationsPostUnauthorized) String() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/operations][%d] pcloudPvminstancesOperationsPostUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/operations][%d] pcloudPvminstancesOperationsPostUnauthorized %s", 401, payload) } func (o *PcloudPvminstancesOperationsPostUnauthorized) GetPayload() *models.Error { @@ -317,11 +324,13 @@ func (o *PcloudPvminstancesOperationsPostForbidden) Code() int { } func (o *PcloudPvminstancesOperationsPostForbidden) Error() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/operations][%d] pcloudPvminstancesOperationsPostForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/operations][%d] pcloudPvminstancesOperationsPostForbidden %s", 403, payload) } func (o *PcloudPvminstancesOperationsPostForbidden) String() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/operations][%d] pcloudPvminstancesOperationsPostForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/operations][%d] pcloudPvminstancesOperationsPostForbidden %s", 403, payload) } func (o *PcloudPvminstancesOperationsPostForbidden) GetPayload() *models.Error { @@ -385,11 +394,13 @@ func (o *PcloudPvminstancesOperationsPostNotFound) Code() int { } func (o *PcloudPvminstancesOperationsPostNotFound) Error() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/operations][%d] pcloudPvminstancesOperationsPostNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/operations][%d] pcloudPvminstancesOperationsPostNotFound %s", 404, payload) } func (o *PcloudPvminstancesOperationsPostNotFound) String() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/operations][%d] pcloudPvminstancesOperationsPostNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/operations][%d] pcloudPvminstancesOperationsPostNotFound %s", 404, payload) } func (o *PcloudPvminstancesOperationsPostNotFound) GetPayload() *models.Error { @@ -453,11 +464,13 @@ func (o *PcloudPvminstancesOperationsPostUnprocessableEntity) Code() int { } func (o *PcloudPvminstancesOperationsPostUnprocessableEntity) Error() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/operations][%d] pcloudPvminstancesOperationsPostUnprocessableEntity %+v", 422, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/operations][%d] pcloudPvminstancesOperationsPostUnprocessableEntity %s", 422, payload) } func (o *PcloudPvminstancesOperationsPostUnprocessableEntity) String() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/operations][%d] pcloudPvminstancesOperationsPostUnprocessableEntity %+v", 422, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/operations][%d] pcloudPvminstancesOperationsPostUnprocessableEntity %s", 422, payload) } func (o *PcloudPvminstancesOperationsPostUnprocessableEntity) GetPayload() *models.Error { @@ -521,11 +534,13 @@ func (o *PcloudPvminstancesOperationsPostInternalServerError) Code() int { } func (o *PcloudPvminstancesOperationsPostInternalServerError) Error() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/operations][%d] pcloudPvminstancesOperationsPostInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/operations][%d] pcloudPvminstancesOperationsPostInternalServerError %s", 500, payload) } func (o *PcloudPvminstancesOperationsPostInternalServerError) String() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/operations][%d] pcloudPvminstancesOperationsPostInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/operations][%d] pcloudPvminstancesOperationsPostInternalServerError %s", 500, payload) } func (o *PcloudPvminstancesOperationsPostInternalServerError) GetPayload() *models.Error { diff --git a/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_post_responses.go b/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_post_responses.go index 1e9b1628..16e556e5 100644 --- a/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_post_responses.go +++ b/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_post_responses.go @@ -6,6 +6,7 @@ package p_cloud_p_vm_instances // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -139,11 +140,13 @@ func (o *PcloudPvminstancesPostOK) Code() int { } func (o *PcloudPvminstancesPostOK) Error() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances][%d] pcloudPvminstancesPostOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances][%d] pcloudPvminstancesPostOK %s", 200, payload) } func (o *PcloudPvminstancesPostOK) String() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances][%d] pcloudPvminstancesPostOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances][%d] pcloudPvminstancesPostOK %s", 200, payload) } func (o *PcloudPvminstancesPostOK) GetPayload() models.PVMInstanceList { @@ -205,11 +208,13 @@ func (o *PcloudPvminstancesPostCreated) Code() int { } func (o *PcloudPvminstancesPostCreated) Error() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances][%d] pcloudPvminstancesPostCreated %+v", 201, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances][%d] pcloudPvminstancesPostCreated %s", 201, payload) } func (o *PcloudPvminstancesPostCreated) String() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances][%d] pcloudPvminstancesPostCreated %+v", 201, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances][%d] pcloudPvminstancesPostCreated %s", 201, payload) } func (o *PcloudPvminstancesPostCreated) GetPayload() models.PVMInstanceList { @@ -271,11 +276,13 @@ func (o *PcloudPvminstancesPostAccepted) Code() int { } func (o *PcloudPvminstancesPostAccepted) Error() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances][%d] pcloudPvminstancesPostAccepted %+v", 202, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances][%d] pcloudPvminstancesPostAccepted %s", 202, payload) } func (o *PcloudPvminstancesPostAccepted) String() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances][%d] pcloudPvminstancesPostAccepted %+v", 202, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances][%d] pcloudPvminstancesPostAccepted %s", 202, payload) } func (o *PcloudPvminstancesPostAccepted) GetPayload() models.PVMInstanceList { @@ -337,11 +344,13 @@ func (o *PcloudPvminstancesPostBadRequest) Code() int { } func (o *PcloudPvminstancesPostBadRequest) Error() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances][%d] pcloudPvminstancesPostBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances][%d] pcloudPvminstancesPostBadRequest %s", 400, payload) } func (o *PcloudPvminstancesPostBadRequest) String() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances][%d] pcloudPvminstancesPostBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances][%d] pcloudPvminstancesPostBadRequest %s", 400, payload) } func (o *PcloudPvminstancesPostBadRequest) GetPayload() *models.Error { @@ -405,11 +414,13 @@ func (o *PcloudPvminstancesPostUnauthorized) Code() int { } func (o *PcloudPvminstancesPostUnauthorized) Error() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances][%d] pcloudPvminstancesPostUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances][%d] pcloudPvminstancesPostUnauthorized %s", 401, payload) } func (o *PcloudPvminstancesPostUnauthorized) String() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances][%d] pcloudPvminstancesPostUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances][%d] pcloudPvminstancesPostUnauthorized %s", 401, payload) } func (o *PcloudPvminstancesPostUnauthorized) GetPayload() *models.Error { @@ -473,11 +484,13 @@ func (o *PcloudPvminstancesPostForbidden) Code() int { } func (o *PcloudPvminstancesPostForbidden) Error() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances][%d] pcloudPvminstancesPostForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances][%d] pcloudPvminstancesPostForbidden %s", 403, payload) } func (o *PcloudPvminstancesPostForbidden) String() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances][%d] pcloudPvminstancesPostForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances][%d] pcloudPvminstancesPostForbidden %s", 403, payload) } func (o *PcloudPvminstancesPostForbidden) GetPayload() *models.Error { @@ -541,11 +554,13 @@ func (o *PcloudPvminstancesPostNotFound) Code() int { } func (o *PcloudPvminstancesPostNotFound) Error() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances][%d] pcloudPvminstancesPostNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances][%d] pcloudPvminstancesPostNotFound %s", 404, payload) } func (o *PcloudPvminstancesPostNotFound) String() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances][%d] pcloudPvminstancesPostNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances][%d] pcloudPvminstancesPostNotFound %s", 404, payload) } func (o *PcloudPvminstancesPostNotFound) GetPayload() *models.Error { @@ -609,11 +624,13 @@ func (o *PcloudPvminstancesPostConflict) Code() int { } func (o *PcloudPvminstancesPostConflict) Error() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances][%d] pcloudPvminstancesPostConflict %+v", 409, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances][%d] pcloudPvminstancesPostConflict %s", 409, payload) } func (o *PcloudPvminstancesPostConflict) String() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances][%d] pcloudPvminstancesPostConflict %+v", 409, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances][%d] pcloudPvminstancesPostConflict %s", 409, payload) } func (o *PcloudPvminstancesPostConflict) GetPayload() *models.Error { @@ -677,11 +694,13 @@ func (o *PcloudPvminstancesPostUnprocessableEntity) Code() int { } func (o *PcloudPvminstancesPostUnprocessableEntity) Error() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances][%d] pcloudPvminstancesPostUnprocessableEntity %+v", 422, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances][%d] pcloudPvminstancesPostUnprocessableEntity %s", 422, payload) } func (o *PcloudPvminstancesPostUnprocessableEntity) String() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances][%d] pcloudPvminstancesPostUnprocessableEntity %+v", 422, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances][%d] pcloudPvminstancesPostUnprocessableEntity %s", 422, payload) } func (o *PcloudPvminstancesPostUnprocessableEntity) GetPayload() *models.Error { @@ -745,11 +764,13 @@ func (o *PcloudPvminstancesPostInternalServerError) Code() int { } func (o *PcloudPvminstancesPostInternalServerError) Error() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances][%d] pcloudPvminstancesPostInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances][%d] pcloudPvminstancesPostInternalServerError %s", 500, payload) } func (o *PcloudPvminstancesPostInternalServerError) String() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances][%d] pcloudPvminstancesPostInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances][%d] pcloudPvminstancesPostInternalServerError %s", 500, payload) } func (o *PcloudPvminstancesPostInternalServerError) GetPayload() *models.Error { @@ -813,11 +834,13 @@ func (o *PcloudPvminstancesPostGatewayTimeout) Code() int { } func (o *PcloudPvminstancesPostGatewayTimeout) Error() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances][%d] pcloudPvminstancesPostGatewayTimeout %+v", 504, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances][%d] pcloudPvminstancesPostGatewayTimeout %s", 504, payload) } func (o *PcloudPvminstancesPostGatewayTimeout) String() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances][%d] pcloudPvminstancesPostGatewayTimeout %+v", 504, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances][%d] pcloudPvminstancesPostGatewayTimeout %s", 504, payload) } func (o *PcloudPvminstancesPostGatewayTimeout) GetPayload() *models.Error { diff --git a/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_put_responses.go b/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_put_responses.go index 7147f35d..36e26e92 100644 --- a/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_put_responses.go +++ b/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_put_responses.go @@ -6,6 +6,7 @@ package p_cloud_p_vm_instances // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -115,11 +116,13 @@ func (o *PcloudPvminstancesPutAccepted) Code() int { } func (o *PcloudPvminstancesPutAccepted) Error() string { - return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}][%d] pcloudPvminstancesPutAccepted %+v", 202, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}][%d] pcloudPvminstancesPutAccepted %s", 202, payload) } func (o *PcloudPvminstancesPutAccepted) String() string { - return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}][%d] pcloudPvminstancesPutAccepted %+v", 202, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}][%d] pcloudPvminstancesPutAccepted %s", 202, payload) } func (o *PcloudPvminstancesPutAccepted) GetPayload() *models.PVMInstanceUpdateResponse { @@ -183,11 +186,13 @@ func (o *PcloudPvminstancesPutBadRequest) Code() int { } func (o *PcloudPvminstancesPutBadRequest) Error() string { - return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}][%d] pcloudPvminstancesPutBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}][%d] pcloudPvminstancesPutBadRequest %s", 400, payload) } func (o *PcloudPvminstancesPutBadRequest) String() string { - return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}][%d] pcloudPvminstancesPutBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}][%d] pcloudPvminstancesPutBadRequest %s", 400, payload) } func (o *PcloudPvminstancesPutBadRequest) GetPayload() *models.Error { @@ -251,11 +256,13 @@ func (o *PcloudPvminstancesPutUnauthorized) Code() int { } func (o *PcloudPvminstancesPutUnauthorized) Error() string { - return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}][%d] pcloudPvminstancesPutUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}][%d] pcloudPvminstancesPutUnauthorized %s", 401, payload) } func (o *PcloudPvminstancesPutUnauthorized) String() string { - return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}][%d] pcloudPvminstancesPutUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}][%d] pcloudPvminstancesPutUnauthorized %s", 401, payload) } func (o *PcloudPvminstancesPutUnauthorized) GetPayload() *models.Error { @@ -319,11 +326,13 @@ func (o *PcloudPvminstancesPutForbidden) Code() int { } func (o *PcloudPvminstancesPutForbidden) Error() string { - return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}][%d] pcloudPvminstancesPutForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}][%d] pcloudPvminstancesPutForbidden %s", 403, payload) } func (o *PcloudPvminstancesPutForbidden) String() string { - return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}][%d] pcloudPvminstancesPutForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}][%d] pcloudPvminstancesPutForbidden %s", 403, payload) } func (o *PcloudPvminstancesPutForbidden) GetPayload() *models.Error { @@ -387,11 +396,13 @@ func (o *PcloudPvminstancesPutNotFound) Code() int { } func (o *PcloudPvminstancesPutNotFound) Error() string { - return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}][%d] pcloudPvminstancesPutNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}][%d] pcloudPvminstancesPutNotFound %s", 404, payload) } func (o *PcloudPvminstancesPutNotFound) String() string { - return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}][%d] pcloudPvminstancesPutNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}][%d] pcloudPvminstancesPutNotFound %s", 404, payload) } func (o *PcloudPvminstancesPutNotFound) GetPayload() *models.Error { @@ -455,11 +466,13 @@ func (o *PcloudPvminstancesPutUnprocessableEntity) Code() int { } func (o *PcloudPvminstancesPutUnprocessableEntity) Error() string { - return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}][%d] pcloudPvminstancesPutUnprocessableEntity %+v", 422, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}][%d] pcloudPvminstancesPutUnprocessableEntity %s", 422, payload) } func (o *PcloudPvminstancesPutUnprocessableEntity) String() string { - return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}][%d] pcloudPvminstancesPutUnprocessableEntity %+v", 422, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}][%d] pcloudPvminstancesPutUnprocessableEntity %s", 422, payload) } func (o *PcloudPvminstancesPutUnprocessableEntity) GetPayload() *models.Error { @@ -523,11 +536,13 @@ func (o *PcloudPvminstancesPutInternalServerError) Code() int { } func (o *PcloudPvminstancesPutInternalServerError) Error() string { - return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}][%d] pcloudPvminstancesPutInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}][%d] pcloudPvminstancesPutInternalServerError %s", 500, payload) } func (o *PcloudPvminstancesPutInternalServerError) String() string { - return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}][%d] pcloudPvminstancesPutInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}][%d] pcloudPvminstancesPutInternalServerError %s", 500, payload) } func (o *PcloudPvminstancesPutInternalServerError) GetPayload() *models.Error { diff --git a/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_snapshots_getall_responses.go b/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_snapshots_getall_responses.go index 3a6236eb..f093e030 100644 --- a/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_snapshots_getall_responses.go +++ b/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_snapshots_getall_responses.go @@ -6,6 +6,7 @@ package p_cloud_p_vm_instances // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -109,11 +110,13 @@ func (o *PcloudPvminstancesSnapshotsGetallOK) Code() int { } func (o *PcloudPvminstancesSnapshotsGetallOK) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/snapshots][%d] pcloudPvminstancesSnapshotsGetallOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/snapshots][%d] pcloudPvminstancesSnapshotsGetallOK %s", 200, payload) } func (o *PcloudPvminstancesSnapshotsGetallOK) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/snapshots][%d] pcloudPvminstancesSnapshotsGetallOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/snapshots][%d] pcloudPvminstancesSnapshotsGetallOK %s", 200, payload) } func (o *PcloudPvminstancesSnapshotsGetallOK) GetPayload() *models.Snapshots { @@ -177,11 +180,13 @@ func (o *PcloudPvminstancesSnapshotsGetallBadRequest) Code() int { } func (o *PcloudPvminstancesSnapshotsGetallBadRequest) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/snapshots][%d] pcloudPvminstancesSnapshotsGetallBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/snapshots][%d] pcloudPvminstancesSnapshotsGetallBadRequest %s", 400, payload) } func (o *PcloudPvminstancesSnapshotsGetallBadRequest) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/snapshots][%d] pcloudPvminstancesSnapshotsGetallBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/snapshots][%d] pcloudPvminstancesSnapshotsGetallBadRequest %s", 400, payload) } func (o *PcloudPvminstancesSnapshotsGetallBadRequest) GetPayload() *models.Error { @@ -245,11 +250,13 @@ func (o *PcloudPvminstancesSnapshotsGetallUnauthorized) Code() int { } func (o *PcloudPvminstancesSnapshotsGetallUnauthorized) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/snapshots][%d] pcloudPvminstancesSnapshotsGetallUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/snapshots][%d] pcloudPvminstancesSnapshotsGetallUnauthorized %s", 401, payload) } func (o *PcloudPvminstancesSnapshotsGetallUnauthorized) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/snapshots][%d] pcloudPvminstancesSnapshotsGetallUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/snapshots][%d] pcloudPvminstancesSnapshotsGetallUnauthorized %s", 401, payload) } func (o *PcloudPvminstancesSnapshotsGetallUnauthorized) GetPayload() *models.Error { @@ -313,11 +320,13 @@ func (o *PcloudPvminstancesSnapshotsGetallForbidden) Code() int { } func (o *PcloudPvminstancesSnapshotsGetallForbidden) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/snapshots][%d] pcloudPvminstancesSnapshotsGetallForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/snapshots][%d] pcloudPvminstancesSnapshotsGetallForbidden %s", 403, payload) } func (o *PcloudPvminstancesSnapshotsGetallForbidden) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/snapshots][%d] pcloudPvminstancesSnapshotsGetallForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/snapshots][%d] pcloudPvminstancesSnapshotsGetallForbidden %s", 403, payload) } func (o *PcloudPvminstancesSnapshotsGetallForbidden) GetPayload() *models.Error { @@ -381,11 +390,13 @@ func (o *PcloudPvminstancesSnapshotsGetallNotFound) Code() int { } func (o *PcloudPvminstancesSnapshotsGetallNotFound) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/snapshots][%d] pcloudPvminstancesSnapshotsGetallNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/snapshots][%d] pcloudPvminstancesSnapshotsGetallNotFound %s", 404, payload) } func (o *PcloudPvminstancesSnapshotsGetallNotFound) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/snapshots][%d] pcloudPvminstancesSnapshotsGetallNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/snapshots][%d] pcloudPvminstancesSnapshotsGetallNotFound %s", 404, payload) } func (o *PcloudPvminstancesSnapshotsGetallNotFound) GetPayload() *models.Error { @@ -449,11 +460,13 @@ func (o *PcloudPvminstancesSnapshotsGetallInternalServerError) Code() int { } func (o *PcloudPvminstancesSnapshotsGetallInternalServerError) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/snapshots][%d] pcloudPvminstancesSnapshotsGetallInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/snapshots][%d] pcloudPvminstancesSnapshotsGetallInternalServerError %s", 500, payload) } func (o *PcloudPvminstancesSnapshotsGetallInternalServerError) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/snapshots][%d] pcloudPvminstancesSnapshotsGetallInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/snapshots][%d] pcloudPvminstancesSnapshotsGetallInternalServerError %s", 500, payload) } func (o *PcloudPvminstancesSnapshotsGetallInternalServerError) GetPayload() *models.Error { diff --git a/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_snapshots_post_responses.go b/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_snapshots_post_responses.go index bd53af99..94ef37d9 100644 --- a/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_snapshots_post_responses.go +++ b/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_snapshots_post_responses.go @@ -6,6 +6,7 @@ package p_cloud_p_vm_instances // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -121,11 +122,13 @@ func (o *PcloudPvminstancesSnapshotsPostAccepted) Code() int { } func (o *PcloudPvminstancesSnapshotsPostAccepted) Error() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/snapshots][%d] pcloudPvminstancesSnapshotsPostAccepted %+v", 202, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/snapshots][%d] pcloudPvminstancesSnapshotsPostAccepted %s", 202, payload) } func (o *PcloudPvminstancesSnapshotsPostAccepted) String() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/snapshots][%d] pcloudPvminstancesSnapshotsPostAccepted %+v", 202, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/snapshots][%d] pcloudPvminstancesSnapshotsPostAccepted %s", 202, payload) } func (o *PcloudPvminstancesSnapshotsPostAccepted) GetPayload() *models.SnapshotCreateResponse { @@ -189,11 +192,13 @@ func (o *PcloudPvminstancesSnapshotsPostBadRequest) Code() int { } func (o *PcloudPvminstancesSnapshotsPostBadRequest) Error() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/snapshots][%d] pcloudPvminstancesSnapshotsPostBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/snapshots][%d] pcloudPvminstancesSnapshotsPostBadRequest %s", 400, payload) } func (o *PcloudPvminstancesSnapshotsPostBadRequest) String() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/snapshots][%d] pcloudPvminstancesSnapshotsPostBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/snapshots][%d] pcloudPvminstancesSnapshotsPostBadRequest %s", 400, payload) } func (o *PcloudPvminstancesSnapshotsPostBadRequest) GetPayload() *models.Error { @@ -257,11 +262,13 @@ func (o *PcloudPvminstancesSnapshotsPostUnauthorized) Code() int { } func (o *PcloudPvminstancesSnapshotsPostUnauthorized) Error() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/snapshots][%d] pcloudPvminstancesSnapshotsPostUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/snapshots][%d] pcloudPvminstancesSnapshotsPostUnauthorized %s", 401, payload) } func (o *PcloudPvminstancesSnapshotsPostUnauthorized) String() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/snapshots][%d] pcloudPvminstancesSnapshotsPostUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/snapshots][%d] pcloudPvminstancesSnapshotsPostUnauthorized %s", 401, payload) } func (o *PcloudPvminstancesSnapshotsPostUnauthorized) GetPayload() *models.Error { @@ -325,11 +332,13 @@ func (o *PcloudPvminstancesSnapshotsPostForbidden) Code() int { } func (o *PcloudPvminstancesSnapshotsPostForbidden) Error() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/snapshots][%d] pcloudPvminstancesSnapshotsPostForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/snapshots][%d] pcloudPvminstancesSnapshotsPostForbidden %s", 403, payload) } func (o *PcloudPvminstancesSnapshotsPostForbidden) String() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/snapshots][%d] pcloudPvminstancesSnapshotsPostForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/snapshots][%d] pcloudPvminstancesSnapshotsPostForbidden %s", 403, payload) } func (o *PcloudPvminstancesSnapshotsPostForbidden) GetPayload() *models.Error { @@ -393,11 +402,13 @@ func (o *PcloudPvminstancesSnapshotsPostNotFound) Code() int { } func (o *PcloudPvminstancesSnapshotsPostNotFound) Error() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/snapshots][%d] pcloudPvminstancesSnapshotsPostNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/snapshots][%d] pcloudPvminstancesSnapshotsPostNotFound %s", 404, payload) } func (o *PcloudPvminstancesSnapshotsPostNotFound) String() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/snapshots][%d] pcloudPvminstancesSnapshotsPostNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/snapshots][%d] pcloudPvminstancesSnapshotsPostNotFound %s", 404, payload) } func (o *PcloudPvminstancesSnapshotsPostNotFound) GetPayload() *models.Error { @@ -461,11 +472,13 @@ func (o *PcloudPvminstancesSnapshotsPostConflict) Code() int { } func (o *PcloudPvminstancesSnapshotsPostConflict) Error() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/snapshots][%d] pcloudPvminstancesSnapshotsPostConflict %+v", 409, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/snapshots][%d] pcloudPvminstancesSnapshotsPostConflict %s", 409, payload) } func (o *PcloudPvminstancesSnapshotsPostConflict) String() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/snapshots][%d] pcloudPvminstancesSnapshotsPostConflict %+v", 409, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/snapshots][%d] pcloudPvminstancesSnapshotsPostConflict %s", 409, payload) } func (o *PcloudPvminstancesSnapshotsPostConflict) GetPayload() *models.Error { @@ -529,11 +542,13 @@ func (o *PcloudPvminstancesSnapshotsPostInternalServerError) Code() int { } func (o *PcloudPvminstancesSnapshotsPostInternalServerError) Error() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/snapshots][%d] pcloudPvminstancesSnapshotsPostInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/snapshots][%d] pcloudPvminstancesSnapshotsPostInternalServerError %s", 500, payload) } func (o *PcloudPvminstancesSnapshotsPostInternalServerError) String() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/snapshots][%d] pcloudPvminstancesSnapshotsPostInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/snapshots][%d] pcloudPvminstancesSnapshotsPostInternalServerError %s", 500, payload) } func (o *PcloudPvminstancesSnapshotsPostInternalServerError) GetPayload() *models.Error { @@ -597,11 +612,13 @@ func (o *PcloudPvminstancesSnapshotsPostGatewayTimeout) Code() int { } func (o *PcloudPvminstancesSnapshotsPostGatewayTimeout) Error() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/snapshots][%d] pcloudPvminstancesSnapshotsPostGatewayTimeout %+v", 504, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/snapshots][%d] pcloudPvminstancesSnapshotsPostGatewayTimeout %s", 504, payload) } func (o *PcloudPvminstancesSnapshotsPostGatewayTimeout) String() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/snapshots][%d] pcloudPvminstancesSnapshotsPostGatewayTimeout %+v", 504, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/snapshots][%d] pcloudPvminstancesSnapshotsPostGatewayTimeout %s", 504, payload) } func (o *PcloudPvminstancesSnapshotsPostGatewayTimeout) GetPayload() *models.Error { diff --git a/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_snapshots_restore_post_responses.go b/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_snapshots_restore_post_responses.go index a8670faa..1ceae2e9 100644 --- a/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_snapshots_restore_post_responses.go +++ b/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_snapshots_restore_post_responses.go @@ -6,6 +6,7 @@ package p_cloud_p_vm_instances // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -115,11 +116,13 @@ func (o *PcloudPvminstancesSnapshotsRestorePostAccepted) Code() int { } func (o *PcloudPvminstancesSnapshotsRestorePostAccepted) Error() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/snapshots/{snapshot_id}/restore][%d] pcloudPvminstancesSnapshotsRestorePostAccepted %+v", 202, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/snapshots/{snapshot_id}/restore][%d] pcloudPvminstancesSnapshotsRestorePostAccepted %s", 202, payload) } func (o *PcloudPvminstancesSnapshotsRestorePostAccepted) String() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/snapshots/{snapshot_id}/restore][%d] pcloudPvminstancesSnapshotsRestorePostAccepted %+v", 202, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/snapshots/{snapshot_id}/restore][%d] pcloudPvminstancesSnapshotsRestorePostAccepted %s", 202, payload) } func (o *PcloudPvminstancesSnapshotsRestorePostAccepted) GetPayload() *models.Snapshot { @@ -183,11 +186,13 @@ func (o *PcloudPvminstancesSnapshotsRestorePostBadRequest) Code() int { } func (o *PcloudPvminstancesSnapshotsRestorePostBadRequest) Error() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/snapshots/{snapshot_id}/restore][%d] pcloudPvminstancesSnapshotsRestorePostBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/snapshots/{snapshot_id}/restore][%d] pcloudPvminstancesSnapshotsRestorePostBadRequest %s", 400, payload) } func (o *PcloudPvminstancesSnapshotsRestorePostBadRequest) String() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/snapshots/{snapshot_id}/restore][%d] pcloudPvminstancesSnapshotsRestorePostBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/snapshots/{snapshot_id}/restore][%d] pcloudPvminstancesSnapshotsRestorePostBadRequest %s", 400, payload) } func (o *PcloudPvminstancesSnapshotsRestorePostBadRequest) GetPayload() *models.Error { @@ -251,11 +256,13 @@ func (o *PcloudPvminstancesSnapshotsRestorePostUnauthorized) Code() int { } func (o *PcloudPvminstancesSnapshotsRestorePostUnauthorized) Error() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/snapshots/{snapshot_id}/restore][%d] pcloudPvminstancesSnapshotsRestorePostUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/snapshots/{snapshot_id}/restore][%d] pcloudPvminstancesSnapshotsRestorePostUnauthorized %s", 401, payload) } func (o *PcloudPvminstancesSnapshotsRestorePostUnauthorized) String() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/snapshots/{snapshot_id}/restore][%d] pcloudPvminstancesSnapshotsRestorePostUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/snapshots/{snapshot_id}/restore][%d] pcloudPvminstancesSnapshotsRestorePostUnauthorized %s", 401, payload) } func (o *PcloudPvminstancesSnapshotsRestorePostUnauthorized) GetPayload() *models.Error { @@ -319,11 +326,13 @@ func (o *PcloudPvminstancesSnapshotsRestorePostForbidden) Code() int { } func (o *PcloudPvminstancesSnapshotsRestorePostForbidden) Error() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/snapshots/{snapshot_id}/restore][%d] pcloudPvminstancesSnapshotsRestorePostForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/snapshots/{snapshot_id}/restore][%d] pcloudPvminstancesSnapshotsRestorePostForbidden %s", 403, payload) } func (o *PcloudPvminstancesSnapshotsRestorePostForbidden) String() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/snapshots/{snapshot_id}/restore][%d] pcloudPvminstancesSnapshotsRestorePostForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/snapshots/{snapshot_id}/restore][%d] pcloudPvminstancesSnapshotsRestorePostForbidden %s", 403, payload) } func (o *PcloudPvminstancesSnapshotsRestorePostForbidden) GetPayload() *models.Error { @@ -387,11 +396,13 @@ func (o *PcloudPvminstancesSnapshotsRestorePostNotFound) Code() int { } func (o *PcloudPvminstancesSnapshotsRestorePostNotFound) Error() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/snapshots/{snapshot_id}/restore][%d] pcloudPvminstancesSnapshotsRestorePostNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/snapshots/{snapshot_id}/restore][%d] pcloudPvminstancesSnapshotsRestorePostNotFound %s", 404, payload) } func (o *PcloudPvminstancesSnapshotsRestorePostNotFound) String() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/snapshots/{snapshot_id}/restore][%d] pcloudPvminstancesSnapshotsRestorePostNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/snapshots/{snapshot_id}/restore][%d] pcloudPvminstancesSnapshotsRestorePostNotFound %s", 404, payload) } func (o *PcloudPvminstancesSnapshotsRestorePostNotFound) GetPayload() *models.Error { @@ -455,11 +466,13 @@ func (o *PcloudPvminstancesSnapshotsRestorePostConflict) Code() int { } func (o *PcloudPvminstancesSnapshotsRestorePostConflict) Error() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/snapshots/{snapshot_id}/restore][%d] pcloudPvminstancesSnapshotsRestorePostConflict %+v", 409, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/snapshots/{snapshot_id}/restore][%d] pcloudPvminstancesSnapshotsRestorePostConflict %s", 409, payload) } func (o *PcloudPvminstancesSnapshotsRestorePostConflict) String() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/snapshots/{snapshot_id}/restore][%d] pcloudPvminstancesSnapshotsRestorePostConflict %+v", 409, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/snapshots/{snapshot_id}/restore][%d] pcloudPvminstancesSnapshotsRestorePostConflict %s", 409, payload) } func (o *PcloudPvminstancesSnapshotsRestorePostConflict) GetPayload() *models.Error { @@ -523,11 +536,13 @@ func (o *PcloudPvminstancesSnapshotsRestorePostInternalServerError) Code() int { } func (o *PcloudPvminstancesSnapshotsRestorePostInternalServerError) Error() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/snapshots/{snapshot_id}/restore][%d] pcloudPvminstancesSnapshotsRestorePostInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/snapshots/{snapshot_id}/restore][%d] pcloudPvminstancesSnapshotsRestorePostInternalServerError %s", 500, payload) } func (o *PcloudPvminstancesSnapshotsRestorePostInternalServerError) String() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/snapshots/{snapshot_id}/restore][%d] pcloudPvminstancesSnapshotsRestorePostInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/snapshots/{snapshot_id}/restore][%d] pcloudPvminstancesSnapshotsRestorePostInternalServerError %s", 500, payload) } func (o *PcloudPvminstancesSnapshotsRestorePostInternalServerError) GetPayload() *models.Error { diff --git a/power/client/p_cloud_p_vm_instances/pcloud_v2_pvminstances_capture_get_responses.go b/power/client/p_cloud_p_vm_instances/pcloud_v2_pvminstances_capture_get_responses.go index fe4f0293..b438eef9 100644 --- a/power/client/p_cloud_p_vm_instances/pcloud_v2_pvminstances_capture_get_responses.go +++ b/power/client/p_cloud_p_vm_instances/pcloud_v2_pvminstances_capture_get_responses.go @@ -6,6 +6,7 @@ package p_cloud_p_vm_instances // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -109,11 +110,13 @@ func (o *PcloudV2PvminstancesCaptureGetOK) Code() int { } func (o *PcloudV2PvminstancesCaptureGetOK) Error() string { - return fmt.Sprintf("[GET /pcloud/v2/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/capture][%d] pcloudV2PvminstancesCaptureGetOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v2/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/capture][%d] pcloudV2PvminstancesCaptureGetOK %s", 200, payload) } func (o *PcloudV2PvminstancesCaptureGetOK) String() string { - return fmt.Sprintf("[GET /pcloud/v2/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/capture][%d] pcloudV2PvminstancesCaptureGetOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v2/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/capture][%d] pcloudV2PvminstancesCaptureGetOK %s", 200, payload) } func (o *PcloudV2PvminstancesCaptureGetOK) GetPayload() *models.Job { @@ -177,11 +180,13 @@ func (o *PcloudV2PvminstancesCaptureGetBadRequest) Code() int { } func (o *PcloudV2PvminstancesCaptureGetBadRequest) Error() string { - return fmt.Sprintf("[GET /pcloud/v2/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/capture][%d] pcloudV2PvminstancesCaptureGetBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v2/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/capture][%d] pcloudV2PvminstancesCaptureGetBadRequest %s", 400, payload) } func (o *PcloudV2PvminstancesCaptureGetBadRequest) String() string { - return fmt.Sprintf("[GET /pcloud/v2/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/capture][%d] pcloudV2PvminstancesCaptureGetBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v2/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/capture][%d] pcloudV2PvminstancesCaptureGetBadRequest %s", 400, payload) } func (o *PcloudV2PvminstancesCaptureGetBadRequest) GetPayload() *models.Error { @@ -245,11 +250,13 @@ func (o *PcloudV2PvminstancesCaptureGetUnauthorized) Code() int { } func (o *PcloudV2PvminstancesCaptureGetUnauthorized) Error() string { - return fmt.Sprintf("[GET /pcloud/v2/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/capture][%d] pcloudV2PvminstancesCaptureGetUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v2/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/capture][%d] pcloudV2PvminstancesCaptureGetUnauthorized %s", 401, payload) } func (o *PcloudV2PvminstancesCaptureGetUnauthorized) String() string { - return fmt.Sprintf("[GET /pcloud/v2/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/capture][%d] pcloudV2PvminstancesCaptureGetUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v2/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/capture][%d] pcloudV2PvminstancesCaptureGetUnauthorized %s", 401, payload) } func (o *PcloudV2PvminstancesCaptureGetUnauthorized) GetPayload() *models.Error { @@ -313,11 +320,13 @@ func (o *PcloudV2PvminstancesCaptureGetForbidden) Code() int { } func (o *PcloudV2PvminstancesCaptureGetForbidden) Error() string { - return fmt.Sprintf("[GET /pcloud/v2/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/capture][%d] pcloudV2PvminstancesCaptureGetForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v2/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/capture][%d] pcloudV2PvminstancesCaptureGetForbidden %s", 403, payload) } func (o *PcloudV2PvminstancesCaptureGetForbidden) String() string { - return fmt.Sprintf("[GET /pcloud/v2/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/capture][%d] pcloudV2PvminstancesCaptureGetForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v2/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/capture][%d] pcloudV2PvminstancesCaptureGetForbidden %s", 403, payload) } func (o *PcloudV2PvminstancesCaptureGetForbidden) GetPayload() *models.Error { @@ -381,11 +390,13 @@ func (o *PcloudV2PvminstancesCaptureGetNotFound) Code() int { } func (o *PcloudV2PvminstancesCaptureGetNotFound) Error() string { - return fmt.Sprintf("[GET /pcloud/v2/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/capture][%d] pcloudV2PvminstancesCaptureGetNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v2/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/capture][%d] pcloudV2PvminstancesCaptureGetNotFound %s", 404, payload) } func (o *PcloudV2PvminstancesCaptureGetNotFound) String() string { - return fmt.Sprintf("[GET /pcloud/v2/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/capture][%d] pcloudV2PvminstancesCaptureGetNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v2/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/capture][%d] pcloudV2PvminstancesCaptureGetNotFound %s", 404, payload) } func (o *PcloudV2PvminstancesCaptureGetNotFound) GetPayload() *models.Error { @@ -449,11 +460,13 @@ func (o *PcloudV2PvminstancesCaptureGetInternalServerError) Code() int { } func (o *PcloudV2PvminstancesCaptureGetInternalServerError) Error() string { - return fmt.Sprintf("[GET /pcloud/v2/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/capture][%d] pcloudV2PvminstancesCaptureGetInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v2/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/capture][%d] pcloudV2PvminstancesCaptureGetInternalServerError %s", 500, payload) } func (o *PcloudV2PvminstancesCaptureGetInternalServerError) String() string { - return fmt.Sprintf("[GET /pcloud/v2/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/capture][%d] pcloudV2PvminstancesCaptureGetInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v2/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/capture][%d] pcloudV2PvminstancesCaptureGetInternalServerError %s", 500, payload) } func (o *PcloudV2PvminstancesCaptureGetInternalServerError) GetPayload() *models.Error { diff --git a/power/client/p_cloud_p_vm_instances/pcloud_v2_pvminstances_capture_post_responses.go b/power/client/p_cloud_p_vm_instances/pcloud_v2_pvminstances_capture_post_responses.go index 362a6173..1213c38b 100644 --- a/power/client/p_cloud_p_vm_instances/pcloud_v2_pvminstances_capture_post_responses.go +++ b/power/client/p_cloud_p_vm_instances/pcloud_v2_pvminstances_capture_post_responses.go @@ -6,6 +6,7 @@ package p_cloud_p_vm_instances // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -121,11 +122,13 @@ func (o *PcloudV2PvminstancesCapturePostAccepted) Code() int { } func (o *PcloudV2PvminstancesCapturePostAccepted) Error() string { - return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/capture][%d] pcloudV2PvminstancesCapturePostAccepted %+v", 202, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/capture][%d] pcloudV2PvminstancesCapturePostAccepted %s", 202, payload) } func (o *PcloudV2PvminstancesCapturePostAccepted) String() string { - return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/capture][%d] pcloudV2PvminstancesCapturePostAccepted %+v", 202, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/capture][%d] pcloudV2PvminstancesCapturePostAccepted %s", 202, payload) } func (o *PcloudV2PvminstancesCapturePostAccepted) GetPayload() *models.JobReference { @@ -189,11 +192,13 @@ func (o *PcloudV2PvminstancesCapturePostBadRequest) Code() int { } func (o *PcloudV2PvminstancesCapturePostBadRequest) Error() string { - return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/capture][%d] pcloudV2PvminstancesCapturePostBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/capture][%d] pcloudV2PvminstancesCapturePostBadRequest %s", 400, payload) } func (o *PcloudV2PvminstancesCapturePostBadRequest) String() string { - return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/capture][%d] pcloudV2PvminstancesCapturePostBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/capture][%d] pcloudV2PvminstancesCapturePostBadRequest %s", 400, payload) } func (o *PcloudV2PvminstancesCapturePostBadRequest) GetPayload() *models.Error { @@ -257,11 +262,13 @@ func (o *PcloudV2PvminstancesCapturePostUnauthorized) Code() int { } func (o *PcloudV2PvminstancesCapturePostUnauthorized) Error() string { - return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/capture][%d] pcloudV2PvminstancesCapturePostUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/capture][%d] pcloudV2PvminstancesCapturePostUnauthorized %s", 401, payload) } func (o *PcloudV2PvminstancesCapturePostUnauthorized) String() string { - return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/capture][%d] pcloudV2PvminstancesCapturePostUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/capture][%d] pcloudV2PvminstancesCapturePostUnauthorized %s", 401, payload) } func (o *PcloudV2PvminstancesCapturePostUnauthorized) GetPayload() *models.Error { @@ -325,11 +332,13 @@ func (o *PcloudV2PvminstancesCapturePostForbidden) Code() int { } func (o *PcloudV2PvminstancesCapturePostForbidden) Error() string { - return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/capture][%d] pcloudV2PvminstancesCapturePostForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/capture][%d] pcloudV2PvminstancesCapturePostForbidden %s", 403, payload) } func (o *PcloudV2PvminstancesCapturePostForbidden) String() string { - return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/capture][%d] pcloudV2PvminstancesCapturePostForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/capture][%d] pcloudV2PvminstancesCapturePostForbidden %s", 403, payload) } func (o *PcloudV2PvminstancesCapturePostForbidden) GetPayload() *models.Error { @@ -393,11 +402,13 @@ func (o *PcloudV2PvminstancesCapturePostNotFound) Code() int { } func (o *PcloudV2PvminstancesCapturePostNotFound) Error() string { - return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/capture][%d] pcloudV2PvminstancesCapturePostNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/capture][%d] pcloudV2PvminstancesCapturePostNotFound %s", 404, payload) } func (o *PcloudV2PvminstancesCapturePostNotFound) String() string { - return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/capture][%d] pcloudV2PvminstancesCapturePostNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/capture][%d] pcloudV2PvminstancesCapturePostNotFound %s", 404, payload) } func (o *PcloudV2PvminstancesCapturePostNotFound) GetPayload() *models.Error { @@ -461,11 +472,13 @@ func (o *PcloudV2PvminstancesCapturePostConflict) Code() int { } func (o *PcloudV2PvminstancesCapturePostConflict) Error() string { - return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/capture][%d] pcloudV2PvminstancesCapturePostConflict %+v", 409, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/capture][%d] pcloudV2PvminstancesCapturePostConflict %s", 409, payload) } func (o *PcloudV2PvminstancesCapturePostConflict) String() string { - return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/capture][%d] pcloudV2PvminstancesCapturePostConflict %+v", 409, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/capture][%d] pcloudV2PvminstancesCapturePostConflict %s", 409, payload) } func (o *PcloudV2PvminstancesCapturePostConflict) GetPayload() *models.Error { @@ -529,11 +542,13 @@ func (o *PcloudV2PvminstancesCapturePostUnprocessableEntity) Code() int { } func (o *PcloudV2PvminstancesCapturePostUnprocessableEntity) Error() string { - return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/capture][%d] pcloudV2PvminstancesCapturePostUnprocessableEntity %+v", 422, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/capture][%d] pcloudV2PvminstancesCapturePostUnprocessableEntity %s", 422, payload) } func (o *PcloudV2PvminstancesCapturePostUnprocessableEntity) String() string { - return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/capture][%d] pcloudV2PvminstancesCapturePostUnprocessableEntity %+v", 422, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/capture][%d] pcloudV2PvminstancesCapturePostUnprocessableEntity %s", 422, payload) } func (o *PcloudV2PvminstancesCapturePostUnprocessableEntity) GetPayload() *models.Error { @@ -597,11 +612,13 @@ func (o *PcloudV2PvminstancesCapturePostInternalServerError) Code() int { } func (o *PcloudV2PvminstancesCapturePostInternalServerError) Error() string { - return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/capture][%d] pcloudV2PvminstancesCapturePostInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/capture][%d] pcloudV2PvminstancesCapturePostInternalServerError %s", 500, payload) } func (o *PcloudV2PvminstancesCapturePostInternalServerError) String() string { - return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/capture][%d] pcloudV2PvminstancesCapturePostInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/capture][%d] pcloudV2PvminstancesCapturePostInternalServerError %s", 500, payload) } func (o *PcloudV2PvminstancesCapturePostInternalServerError) GetPayload() *models.Error { diff --git a/power/client/p_cloud_p_vm_instances/pcloud_v2_pvminstances_getall_responses.go b/power/client/p_cloud_p_vm_instances/pcloud_v2_pvminstances_getall_responses.go index cc9bce59..52f5842a 100644 --- a/power/client/p_cloud_p_vm_instances/pcloud_v2_pvminstances_getall_responses.go +++ b/power/client/p_cloud_p_vm_instances/pcloud_v2_pvminstances_getall_responses.go @@ -6,6 +6,7 @@ package p_cloud_p_vm_instances // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -115,11 +116,13 @@ func (o *PcloudV2PvminstancesGetallOK) Code() int { } func (o *PcloudV2PvminstancesGetallOK) Error() string { - return fmt.Sprintf("[GET /pcloud/v2/cloud-instances/{cloud_instance_id}/pvm-instances][%d] pcloudV2PvminstancesGetallOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v2/cloud-instances/{cloud_instance_id}/pvm-instances][%d] pcloudV2PvminstancesGetallOK %s", 200, payload) } func (o *PcloudV2PvminstancesGetallOK) String() string { - return fmt.Sprintf("[GET /pcloud/v2/cloud-instances/{cloud_instance_id}/pvm-instances][%d] pcloudV2PvminstancesGetallOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v2/cloud-instances/{cloud_instance_id}/pvm-instances][%d] pcloudV2PvminstancesGetallOK %s", 200, payload) } func (o *PcloudV2PvminstancesGetallOK) GetPayload() *models.PVMInstancesV2 { @@ -183,11 +186,13 @@ func (o *PcloudV2PvminstancesGetallBadRequest) Code() int { } func (o *PcloudV2PvminstancesGetallBadRequest) Error() string { - return fmt.Sprintf("[GET /pcloud/v2/cloud-instances/{cloud_instance_id}/pvm-instances][%d] pcloudV2PvminstancesGetallBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v2/cloud-instances/{cloud_instance_id}/pvm-instances][%d] pcloudV2PvminstancesGetallBadRequest %s", 400, payload) } func (o *PcloudV2PvminstancesGetallBadRequest) String() string { - return fmt.Sprintf("[GET /pcloud/v2/cloud-instances/{cloud_instance_id}/pvm-instances][%d] pcloudV2PvminstancesGetallBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v2/cloud-instances/{cloud_instance_id}/pvm-instances][%d] pcloudV2PvminstancesGetallBadRequest %s", 400, payload) } func (o *PcloudV2PvminstancesGetallBadRequest) GetPayload() *models.Error { @@ -251,11 +256,13 @@ func (o *PcloudV2PvminstancesGetallUnauthorized) Code() int { } func (o *PcloudV2PvminstancesGetallUnauthorized) Error() string { - return fmt.Sprintf("[GET /pcloud/v2/cloud-instances/{cloud_instance_id}/pvm-instances][%d] pcloudV2PvminstancesGetallUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v2/cloud-instances/{cloud_instance_id}/pvm-instances][%d] pcloudV2PvminstancesGetallUnauthorized %s", 401, payload) } func (o *PcloudV2PvminstancesGetallUnauthorized) String() string { - return fmt.Sprintf("[GET /pcloud/v2/cloud-instances/{cloud_instance_id}/pvm-instances][%d] pcloudV2PvminstancesGetallUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v2/cloud-instances/{cloud_instance_id}/pvm-instances][%d] pcloudV2PvminstancesGetallUnauthorized %s", 401, payload) } func (o *PcloudV2PvminstancesGetallUnauthorized) GetPayload() *models.Error { @@ -319,11 +326,13 @@ func (o *PcloudV2PvminstancesGetallForbidden) Code() int { } func (o *PcloudV2PvminstancesGetallForbidden) Error() string { - return fmt.Sprintf("[GET /pcloud/v2/cloud-instances/{cloud_instance_id}/pvm-instances][%d] pcloudV2PvminstancesGetallForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v2/cloud-instances/{cloud_instance_id}/pvm-instances][%d] pcloudV2PvminstancesGetallForbidden %s", 403, payload) } func (o *PcloudV2PvminstancesGetallForbidden) String() string { - return fmt.Sprintf("[GET /pcloud/v2/cloud-instances/{cloud_instance_id}/pvm-instances][%d] pcloudV2PvminstancesGetallForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v2/cloud-instances/{cloud_instance_id}/pvm-instances][%d] pcloudV2PvminstancesGetallForbidden %s", 403, payload) } func (o *PcloudV2PvminstancesGetallForbidden) GetPayload() *models.Error { @@ -387,11 +396,13 @@ func (o *PcloudV2PvminstancesGetallNotFound) Code() int { } func (o *PcloudV2PvminstancesGetallNotFound) Error() string { - return fmt.Sprintf("[GET /pcloud/v2/cloud-instances/{cloud_instance_id}/pvm-instances][%d] pcloudV2PvminstancesGetallNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v2/cloud-instances/{cloud_instance_id}/pvm-instances][%d] pcloudV2PvminstancesGetallNotFound %s", 404, payload) } func (o *PcloudV2PvminstancesGetallNotFound) String() string { - return fmt.Sprintf("[GET /pcloud/v2/cloud-instances/{cloud_instance_id}/pvm-instances][%d] pcloudV2PvminstancesGetallNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v2/cloud-instances/{cloud_instance_id}/pvm-instances][%d] pcloudV2PvminstancesGetallNotFound %s", 404, payload) } func (o *PcloudV2PvminstancesGetallNotFound) GetPayload() *models.Error { @@ -455,11 +466,13 @@ func (o *PcloudV2PvminstancesGetallRequestTimeout) Code() int { } func (o *PcloudV2PvminstancesGetallRequestTimeout) Error() string { - return fmt.Sprintf("[GET /pcloud/v2/cloud-instances/{cloud_instance_id}/pvm-instances][%d] pcloudV2PvminstancesGetallRequestTimeout %+v", 408, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v2/cloud-instances/{cloud_instance_id}/pvm-instances][%d] pcloudV2PvminstancesGetallRequestTimeout %s", 408, payload) } func (o *PcloudV2PvminstancesGetallRequestTimeout) String() string { - return fmt.Sprintf("[GET /pcloud/v2/cloud-instances/{cloud_instance_id}/pvm-instances][%d] pcloudV2PvminstancesGetallRequestTimeout %+v", 408, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v2/cloud-instances/{cloud_instance_id}/pvm-instances][%d] pcloudV2PvminstancesGetallRequestTimeout %s", 408, payload) } func (o *PcloudV2PvminstancesGetallRequestTimeout) GetPayload() *models.Error { @@ -523,11 +536,13 @@ func (o *PcloudV2PvminstancesGetallInternalServerError) Code() int { } func (o *PcloudV2PvminstancesGetallInternalServerError) Error() string { - return fmt.Sprintf("[GET /pcloud/v2/cloud-instances/{cloud_instance_id}/pvm-instances][%d] pcloudV2PvminstancesGetallInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v2/cloud-instances/{cloud_instance_id}/pvm-instances][%d] pcloudV2PvminstancesGetallInternalServerError %s", 500, payload) } func (o *PcloudV2PvminstancesGetallInternalServerError) String() string { - return fmt.Sprintf("[GET /pcloud/v2/cloud-instances/{cloud_instance_id}/pvm-instances][%d] pcloudV2PvminstancesGetallInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v2/cloud-instances/{cloud_instance_id}/pvm-instances][%d] pcloudV2PvminstancesGetallInternalServerError %s", 500, payload) } func (o *PcloudV2PvminstancesGetallInternalServerError) GetPayload() *models.Error { diff --git a/power/client/p_cloud_placement_groups/p_cloud_placement_groups_client.go b/power/client/p_cloud_placement_groups/p_cloud_placement_groups_client.go index 801e58e2..7ed0532a 100644 --- a/power/client/p_cloud_placement_groups/p_cloud_placement_groups_client.go +++ b/power/client/p_cloud_placement_groups/p_cloud_placement_groups_client.go @@ -9,6 +9,7 @@ import ( "fmt" "github.com/go-openapi/runtime" + httptransport "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" ) @@ -17,6 +18,31 @@ func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientServi return &Client{transport: transport, formats: formats} } +// New creates a new p cloud placement groups API client with basic auth credentials. +// It takes the following parameters: +// - host: http host (github.com). +// - basePath: any base path for the API client ("/v1", "/v3"). +// - scheme: http scheme ("http", "https"). +// - user: user for basic authentication header. +// - password: password for basic authentication header. +func NewClientWithBasicAuth(host, basePath, scheme, user, password string) ClientService { + transport := httptransport.New(host, basePath, []string{scheme}) + transport.DefaultAuthentication = httptransport.BasicAuth(user, password) + return &Client{transport: transport, formats: strfmt.Default} +} + +// New creates a new p cloud placement groups API client with a bearer token for authentication. +// It takes the following parameters: +// - host: http host (github.com). +// - basePath: any base path for the API client ("/v1", "/v3"). +// - scheme: http scheme ("http", "https"). +// - bearerToken: bearer token for Bearer authentication header. +func NewClientWithBearerToken(host, basePath, scheme, bearerToken string) ClientService { + transport := httptransport.New(host, basePath, []string{scheme}) + transport.DefaultAuthentication = httptransport.BearerToken(bearerToken) + return &Client{transport: transport, formats: strfmt.Default} +} + /* Client for p cloud placement groups API */ @@ -25,7 +51,7 @@ type Client struct { formats strfmt.Registry } -// ClientOption is the option for Client methods +// ClientOption may be used to customize the behavior of Client methods. type ClientOption func(*runtime.ClientOperation) // ClientService is the interface for Client methods diff --git a/power/client/p_cloud_placement_groups/pcloud_placementgroups_delete_responses.go b/power/client/p_cloud_placement_groups/pcloud_placementgroups_delete_responses.go index de762b14..69ec152f 100644 --- a/power/client/p_cloud_placement_groups/pcloud_placementgroups_delete_responses.go +++ b/power/client/p_cloud_placement_groups/pcloud_placementgroups_delete_responses.go @@ -6,6 +6,7 @@ package p_cloud_placement_groups // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -109,11 +110,13 @@ func (o *PcloudPlacementgroupsDeleteOK) Code() int { } func (o *PcloudPlacementgroupsDeleteOK) Error() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/placement-groups/{placement_group_id}][%d] pcloudPlacementgroupsDeleteOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/placement-groups/{placement_group_id}][%d] pcloudPlacementgroupsDeleteOK %s", 200, payload) } func (o *PcloudPlacementgroupsDeleteOK) String() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/placement-groups/{placement_group_id}][%d] pcloudPlacementgroupsDeleteOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/placement-groups/{placement_group_id}][%d] pcloudPlacementgroupsDeleteOK %s", 200, payload) } func (o *PcloudPlacementgroupsDeleteOK) GetPayload() models.Object { @@ -175,11 +178,13 @@ func (o *PcloudPlacementgroupsDeleteBadRequest) Code() int { } func (o *PcloudPlacementgroupsDeleteBadRequest) Error() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/placement-groups/{placement_group_id}][%d] pcloudPlacementgroupsDeleteBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/placement-groups/{placement_group_id}][%d] pcloudPlacementgroupsDeleteBadRequest %s", 400, payload) } func (o *PcloudPlacementgroupsDeleteBadRequest) String() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/placement-groups/{placement_group_id}][%d] pcloudPlacementgroupsDeleteBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/placement-groups/{placement_group_id}][%d] pcloudPlacementgroupsDeleteBadRequest %s", 400, payload) } func (o *PcloudPlacementgroupsDeleteBadRequest) GetPayload() *models.Error { @@ -243,11 +248,13 @@ func (o *PcloudPlacementgroupsDeleteUnauthorized) Code() int { } func (o *PcloudPlacementgroupsDeleteUnauthorized) Error() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/placement-groups/{placement_group_id}][%d] pcloudPlacementgroupsDeleteUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/placement-groups/{placement_group_id}][%d] pcloudPlacementgroupsDeleteUnauthorized %s", 401, payload) } func (o *PcloudPlacementgroupsDeleteUnauthorized) String() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/placement-groups/{placement_group_id}][%d] pcloudPlacementgroupsDeleteUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/placement-groups/{placement_group_id}][%d] pcloudPlacementgroupsDeleteUnauthorized %s", 401, payload) } func (o *PcloudPlacementgroupsDeleteUnauthorized) GetPayload() *models.Error { @@ -311,11 +318,13 @@ func (o *PcloudPlacementgroupsDeleteForbidden) Code() int { } func (o *PcloudPlacementgroupsDeleteForbidden) Error() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/placement-groups/{placement_group_id}][%d] pcloudPlacementgroupsDeleteForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/placement-groups/{placement_group_id}][%d] pcloudPlacementgroupsDeleteForbidden %s", 403, payload) } func (o *PcloudPlacementgroupsDeleteForbidden) String() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/placement-groups/{placement_group_id}][%d] pcloudPlacementgroupsDeleteForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/placement-groups/{placement_group_id}][%d] pcloudPlacementgroupsDeleteForbidden %s", 403, payload) } func (o *PcloudPlacementgroupsDeleteForbidden) GetPayload() *models.Error { @@ -379,11 +388,13 @@ func (o *PcloudPlacementgroupsDeleteNotFound) Code() int { } func (o *PcloudPlacementgroupsDeleteNotFound) Error() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/placement-groups/{placement_group_id}][%d] pcloudPlacementgroupsDeleteNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/placement-groups/{placement_group_id}][%d] pcloudPlacementgroupsDeleteNotFound %s", 404, payload) } func (o *PcloudPlacementgroupsDeleteNotFound) String() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/placement-groups/{placement_group_id}][%d] pcloudPlacementgroupsDeleteNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/placement-groups/{placement_group_id}][%d] pcloudPlacementgroupsDeleteNotFound %s", 404, payload) } func (o *PcloudPlacementgroupsDeleteNotFound) GetPayload() *models.Error { @@ -447,11 +458,13 @@ func (o *PcloudPlacementgroupsDeleteInternalServerError) Code() int { } func (o *PcloudPlacementgroupsDeleteInternalServerError) Error() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/placement-groups/{placement_group_id}][%d] pcloudPlacementgroupsDeleteInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/placement-groups/{placement_group_id}][%d] pcloudPlacementgroupsDeleteInternalServerError %s", 500, payload) } func (o *PcloudPlacementgroupsDeleteInternalServerError) String() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/placement-groups/{placement_group_id}][%d] pcloudPlacementgroupsDeleteInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/placement-groups/{placement_group_id}][%d] pcloudPlacementgroupsDeleteInternalServerError %s", 500, payload) } func (o *PcloudPlacementgroupsDeleteInternalServerError) GetPayload() *models.Error { diff --git a/power/client/p_cloud_placement_groups/pcloud_placementgroups_get_responses.go b/power/client/p_cloud_placement_groups/pcloud_placementgroups_get_responses.go index 5a9b0ee8..df2c047f 100644 --- a/power/client/p_cloud_placement_groups/pcloud_placementgroups_get_responses.go +++ b/power/client/p_cloud_placement_groups/pcloud_placementgroups_get_responses.go @@ -6,6 +6,7 @@ package p_cloud_placement_groups // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -109,11 +110,13 @@ func (o *PcloudPlacementgroupsGetOK) Code() int { } func (o *PcloudPlacementgroupsGetOK) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/placement-groups/{placement_group_id}][%d] pcloudPlacementgroupsGetOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/placement-groups/{placement_group_id}][%d] pcloudPlacementgroupsGetOK %s", 200, payload) } func (o *PcloudPlacementgroupsGetOK) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/placement-groups/{placement_group_id}][%d] pcloudPlacementgroupsGetOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/placement-groups/{placement_group_id}][%d] pcloudPlacementgroupsGetOK %s", 200, payload) } func (o *PcloudPlacementgroupsGetOK) GetPayload() *models.PlacementGroup { @@ -177,11 +180,13 @@ func (o *PcloudPlacementgroupsGetBadRequest) Code() int { } func (o *PcloudPlacementgroupsGetBadRequest) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/placement-groups/{placement_group_id}][%d] pcloudPlacementgroupsGetBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/placement-groups/{placement_group_id}][%d] pcloudPlacementgroupsGetBadRequest %s", 400, payload) } func (o *PcloudPlacementgroupsGetBadRequest) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/placement-groups/{placement_group_id}][%d] pcloudPlacementgroupsGetBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/placement-groups/{placement_group_id}][%d] pcloudPlacementgroupsGetBadRequest %s", 400, payload) } func (o *PcloudPlacementgroupsGetBadRequest) GetPayload() *models.Error { @@ -245,11 +250,13 @@ func (o *PcloudPlacementgroupsGetUnauthorized) Code() int { } func (o *PcloudPlacementgroupsGetUnauthorized) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/placement-groups/{placement_group_id}][%d] pcloudPlacementgroupsGetUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/placement-groups/{placement_group_id}][%d] pcloudPlacementgroupsGetUnauthorized %s", 401, payload) } func (o *PcloudPlacementgroupsGetUnauthorized) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/placement-groups/{placement_group_id}][%d] pcloudPlacementgroupsGetUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/placement-groups/{placement_group_id}][%d] pcloudPlacementgroupsGetUnauthorized %s", 401, payload) } func (o *PcloudPlacementgroupsGetUnauthorized) GetPayload() *models.Error { @@ -313,11 +320,13 @@ func (o *PcloudPlacementgroupsGetForbidden) Code() int { } func (o *PcloudPlacementgroupsGetForbidden) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/placement-groups/{placement_group_id}][%d] pcloudPlacementgroupsGetForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/placement-groups/{placement_group_id}][%d] pcloudPlacementgroupsGetForbidden %s", 403, payload) } func (o *PcloudPlacementgroupsGetForbidden) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/placement-groups/{placement_group_id}][%d] pcloudPlacementgroupsGetForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/placement-groups/{placement_group_id}][%d] pcloudPlacementgroupsGetForbidden %s", 403, payload) } func (o *PcloudPlacementgroupsGetForbidden) GetPayload() *models.Error { @@ -381,11 +390,13 @@ func (o *PcloudPlacementgroupsGetNotFound) Code() int { } func (o *PcloudPlacementgroupsGetNotFound) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/placement-groups/{placement_group_id}][%d] pcloudPlacementgroupsGetNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/placement-groups/{placement_group_id}][%d] pcloudPlacementgroupsGetNotFound %s", 404, payload) } func (o *PcloudPlacementgroupsGetNotFound) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/placement-groups/{placement_group_id}][%d] pcloudPlacementgroupsGetNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/placement-groups/{placement_group_id}][%d] pcloudPlacementgroupsGetNotFound %s", 404, payload) } func (o *PcloudPlacementgroupsGetNotFound) GetPayload() *models.Error { @@ -449,11 +460,13 @@ func (o *PcloudPlacementgroupsGetInternalServerError) Code() int { } func (o *PcloudPlacementgroupsGetInternalServerError) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/placement-groups/{placement_group_id}][%d] pcloudPlacementgroupsGetInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/placement-groups/{placement_group_id}][%d] pcloudPlacementgroupsGetInternalServerError %s", 500, payload) } func (o *PcloudPlacementgroupsGetInternalServerError) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/placement-groups/{placement_group_id}][%d] pcloudPlacementgroupsGetInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/placement-groups/{placement_group_id}][%d] pcloudPlacementgroupsGetInternalServerError %s", 500, payload) } func (o *PcloudPlacementgroupsGetInternalServerError) GetPayload() *models.Error { diff --git a/power/client/p_cloud_placement_groups/pcloud_placementgroups_getall_responses.go b/power/client/p_cloud_placement_groups/pcloud_placementgroups_getall_responses.go index ce497c95..d0016366 100644 --- a/power/client/p_cloud_placement_groups/pcloud_placementgroups_getall_responses.go +++ b/power/client/p_cloud_placement_groups/pcloud_placementgroups_getall_responses.go @@ -6,6 +6,7 @@ package p_cloud_placement_groups // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -109,11 +110,13 @@ func (o *PcloudPlacementgroupsGetallOK) Code() int { } func (o *PcloudPlacementgroupsGetallOK) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/placement-groups][%d] pcloudPlacementgroupsGetallOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/placement-groups][%d] pcloudPlacementgroupsGetallOK %s", 200, payload) } func (o *PcloudPlacementgroupsGetallOK) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/placement-groups][%d] pcloudPlacementgroupsGetallOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/placement-groups][%d] pcloudPlacementgroupsGetallOK %s", 200, payload) } func (o *PcloudPlacementgroupsGetallOK) GetPayload() *models.PlacementGroups { @@ -177,11 +180,13 @@ func (o *PcloudPlacementgroupsGetallBadRequest) Code() int { } func (o *PcloudPlacementgroupsGetallBadRequest) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/placement-groups][%d] pcloudPlacementgroupsGetallBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/placement-groups][%d] pcloudPlacementgroupsGetallBadRequest %s", 400, payload) } func (o *PcloudPlacementgroupsGetallBadRequest) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/placement-groups][%d] pcloudPlacementgroupsGetallBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/placement-groups][%d] pcloudPlacementgroupsGetallBadRequest %s", 400, payload) } func (o *PcloudPlacementgroupsGetallBadRequest) GetPayload() *models.Error { @@ -245,11 +250,13 @@ func (o *PcloudPlacementgroupsGetallUnauthorized) Code() int { } func (o *PcloudPlacementgroupsGetallUnauthorized) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/placement-groups][%d] pcloudPlacementgroupsGetallUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/placement-groups][%d] pcloudPlacementgroupsGetallUnauthorized %s", 401, payload) } func (o *PcloudPlacementgroupsGetallUnauthorized) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/placement-groups][%d] pcloudPlacementgroupsGetallUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/placement-groups][%d] pcloudPlacementgroupsGetallUnauthorized %s", 401, payload) } func (o *PcloudPlacementgroupsGetallUnauthorized) GetPayload() *models.Error { @@ -313,11 +320,13 @@ func (o *PcloudPlacementgroupsGetallForbidden) Code() int { } func (o *PcloudPlacementgroupsGetallForbidden) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/placement-groups][%d] pcloudPlacementgroupsGetallForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/placement-groups][%d] pcloudPlacementgroupsGetallForbidden %s", 403, payload) } func (o *PcloudPlacementgroupsGetallForbidden) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/placement-groups][%d] pcloudPlacementgroupsGetallForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/placement-groups][%d] pcloudPlacementgroupsGetallForbidden %s", 403, payload) } func (o *PcloudPlacementgroupsGetallForbidden) GetPayload() *models.Error { @@ -381,11 +390,13 @@ func (o *PcloudPlacementgroupsGetallNotFound) Code() int { } func (o *PcloudPlacementgroupsGetallNotFound) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/placement-groups][%d] pcloudPlacementgroupsGetallNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/placement-groups][%d] pcloudPlacementgroupsGetallNotFound %s", 404, payload) } func (o *PcloudPlacementgroupsGetallNotFound) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/placement-groups][%d] pcloudPlacementgroupsGetallNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/placement-groups][%d] pcloudPlacementgroupsGetallNotFound %s", 404, payload) } func (o *PcloudPlacementgroupsGetallNotFound) GetPayload() *models.Error { @@ -449,11 +460,13 @@ func (o *PcloudPlacementgroupsGetallInternalServerError) Code() int { } func (o *PcloudPlacementgroupsGetallInternalServerError) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/placement-groups][%d] pcloudPlacementgroupsGetallInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/placement-groups][%d] pcloudPlacementgroupsGetallInternalServerError %s", 500, payload) } func (o *PcloudPlacementgroupsGetallInternalServerError) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/placement-groups][%d] pcloudPlacementgroupsGetallInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/placement-groups][%d] pcloudPlacementgroupsGetallInternalServerError %s", 500, payload) } func (o *PcloudPlacementgroupsGetallInternalServerError) GetPayload() *models.Error { diff --git a/power/client/p_cloud_placement_groups/pcloud_placementgroups_members_delete_responses.go b/power/client/p_cloud_placement_groups/pcloud_placementgroups_members_delete_responses.go index f7e58a2e..617f9ce0 100644 --- a/power/client/p_cloud_placement_groups/pcloud_placementgroups_members_delete_responses.go +++ b/power/client/p_cloud_placement_groups/pcloud_placementgroups_members_delete_responses.go @@ -6,6 +6,7 @@ package p_cloud_placement_groups // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -121,11 +122,13 @@ func (o *PcloudPlacementgroupsMembersDeleteOK) Code() int { } func (o *PcloudPlacementgroupsMembersDeleteOK) Error() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/placement-groups/{placement_group_id}/members][%d] pcloudPlacementgroupsMembersDeleteOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/placement-groups/{placement_group_id}/members][%d] pcloudPlacementgroupsMembersDeleteOK %s", 200, payload) } func (o *PcloudPlacementgroupsMembersDeleteOK) String() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/placement-groups/{placement_group_id}/members][%d] pcloudPlacementgroupsMembersDeleteOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/placement-groups/{placement_group_id}/members][%d] pcloudPlacementgroupsMembersDeleteOK %s", 200, payload) } func (o *PcloudPlacementgroupsMembersDeleteOK) GetPayload() *models.PlacementGroup { @@ -189,11 +192,13 @@ func (o *PcloudPlacementgroupsMembersDeleteBadRequest) Code() int { } func (o *PcloudPlacementgroupsMembersDeleteBadRequest) Error() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/placement-groups/{placement_group_id}/members][%d] pcloudPlacementgroupsMembersDeleteBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/placement-groups/{placement_group_id}/members][%d] pcloudPlacementgroupsMembersDeleteBadRequest %s", 400, payload) } func (o *PcloudPlacementgroupsMembersDeleteBadRequest) String() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/placement-groups/{placement_group_id}/members][%d] pcloudPlacementgroupsMembersDeleteBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/placement-groups/{placement_group_id}/members][%d] pcloudPlacementgroupsMembersDeleteBadRequest %s", 400, payload) } func (o *PcloudPlacementgroupsMembersDeleteBadRequest) GetPayload() *models.Error { @@ -257,11 +262,13 @@ func (o *PcloudPlacementgroupsMembersDeleteUnauthorized) Code() int { } func (o *PcloudPlacementgroupsMembersDeleteUnauthorized) Error() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/placement-groups/{placement_group_id}/members][%d] pcloudPlacementgroupsMembersDeleteUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/placement-groups/{placement_group_id}/members][%d] pcloudPlacementgroupsMembersDeleteUnauthorized %s", 401, payload) } func (o *PcloudPlacementgroupsMembersDeleteUnauthorized) String() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/placement-groups/{placement_group_id}/members][%d] pcloudPlacementgroupsMembersDeleteUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/placement-groups/{placement_group_id}/members][%d] pcloudPlacementgroupsMembersDeleteUnauthorized %s", 401, payload) } func (o *PcloudPlacementgroupsMembersDeleteUnauthorized) GetPayload() *models.Error { @@ -325,11 +332,13 @@ func (o *PcloudPlacementgroupsMembersDeleteForbidden) Code() int { } func (o *PcloudPlacementgroupsMembersDeleteForbidden) Error() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/placement-groups/{placement_group_id}/members][%d] pcloudPlacementgroupsMembersDeleteForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/placement-groups/{placement_group_id}/members][%d] pcloudPlacementgroupsMembersDeleteForbidden %s", 403, payload) } func (o *PcloudPlacementgroupsMembersDeleteForbidden) String() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/placement-groups/{placement_group_id}/members][%d] pcloudPlacementgroupsMembersDeleteForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/placement-groups/{placement_group_id}/members][%d] pcloudPlacementgroupsMembersDeleteForbidden %s", 403, payload) } func (o *PcloudPlacementgroupsMembersDeleteForbidden) GetPayload() *models.Error { @@ -393,11 +402,13 @@ func (o *PcloudPlacementgroupsMembersDeleteNotFound) Code() int { } func (o *PcloudPlacementgroupsMembersDeleteNotFound) Error() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/placement-groups/{placement_group_id}/members][%d] pcloudPlacementgroupsMembersDeleteNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/placement-groups/{placement_group_id}/members][%d] pcloudPlacementgroupsMembersDeleteNotFound %s", 404, payload) } func (o *PcloudPlacementgroupsMembersDeleteNotFound) String() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/placement-groups/{placement_group_id}/members][%d] pcloudPlacementgroupsMembersDeleteNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/placement-groups/{placement_group_id}/members][%d] pcloudPlacementgroupsMembersDeleteNotFound %s", 404, payload) } func (o *PcloudPlacementgroupsMembersDeleteNotFound) GetPayload() *models.Error { @@ -461,11 +472,13 @@ func (o *PcloudPlacementgroupsMembersDeleteConflict) Code() int { } func (o *PcloudPlacementgroupsMembersDeleteConflict) Error() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/placement-groups/{placement_group_id}/members][%d] pcloudPlacementgroupsMembersDeleteConflict %+v", 409, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/placement-groups/{placement_group_id}/members][%d] pcloudPlacementgroupsMembersDeleteConflict %s", 409, payload) } func (o *PcloudPlacementgroupsMembersDeleteConflict) String() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/placement-groups/{placement_group_id}/members][%d] pcloudPlacementgroupsMembersDeleteConflict %+v", 409, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/placement-groups/{placement_group_id}/members][%d] pcloudPlacementgroupsMembersDeleteConflict %s", 409, payload) } func (o *PcloudPlacementgroupsMembersDeleteConflict) GetPayload() *models.Error { @@ -529,11 +542,13 @@ func (o *PcloudPlacementgroupsMembersDeleteUnprocessableEntity) Code() int { } func (o *PcloudPlacementgroupsMembersDeleteUnprocessableEntity) Error() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/placement-groups/{placement_group_id}/members][%d] pcloudPlacementgroupsMembersDeleteUnprocessableEntity %+v", 422, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/placement-groups/{placement_group_id}/members][%d] pcloudPlacementgroupsMembersDeleteUnprocessableEntity %s", 422, payload) } func (o *PcloudPlacementgroupsMembersDeleteUnprocessableEntity) String() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/placement-groups/{placement_group_id}/members][%d] pcloudPlacementgroupsMembersDeleteUnprocessableEntity %+v", 422, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/placement-groups/{placement_group_id}/members][%d] pcloudPlacementgroupsMembersDeleteUnprocessableEntity %s", 422, payload) } func (o *PcloudPlacementgroupsMembersDeleteUnprocessableEntity) GetPayload() *models.Error { @@ -597,11 +612,13 @@ func (o *PcloudPlacementgroupsMembersDeleteInternalServerError) Code() int { } func (o *PcloudPlacementgroupsMembersDeleteInternalServerError) Error() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/placement-groups/{placement_group_id}/members][%d] pcloudPlacementgroupsMembersDeleteInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/placement-groups/{placement_group_id}/members][%d] pcloudPlacementgroupsMembersDeleteInternalServerError %s", 500, payload) } func (o *PcloudPlacementgroupsMembersDeleteInternalServerError) String() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/placement-groups/{placement_group_id}/members][%d] pcloudPlacementgroupsMembersDeleteInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/placement-groups/{placement_group_id}/members][%d] pcloudPlacementgroupsMembersDeleteInternalServerError %s", 500, payload) } func (o *PcloudPlacementgroupsMembersDeleteInternalServerError) GetPayload() *models.Error { diff --git a/power/client/p_cloud_placement_groups/pcloud_placementgroups_members_post_responses.go b/power/client/p_cloud_placement_groups/pcloud_placementgroups_members_post_responses.go index 5c0e64d8..c15ea979 100644 --- a/power/client/p_cloud_placement_groups/pcloud_placementgroups_members_post_responses.go +++ b/power/client/p_cloud_placement_groups/pcloud_placementgroups_members_post_responses.go @@ -6,6 +6,7 @@ package p_cloud_placement_groups // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -121,11 +122,13 @@ func (o *PcloudPlacementgroupsMembersPostOK) Code() int { } func (o *PcloudPlacementgroupsMembersPostOK) Error() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/placement-groups/{placement_group_id}/members][%d] pcloudPlacementgroupsMembersPostOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/placement-groups/{placement_group_id}/members][%d] pcloudPlacementgroupsMembersPostOK %s", 200, payload) } func (o *PcloudPlacementgroupsMembersPostOK) String() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/placement-groups/{placement_group_id}/members][%d] pcloudPlacementgroupsMembersPostOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/placement-groups/{placement_group_id}/members][%d] pcloudPlacementgroupsMembersPostOK %s", 200, payload) } func (o *PcloudPlacementgroupsMembersPostOK) GetPayload() *models.PlacementGroup { @@ -189,11 +192,13 @@ func (o *PcloudPlacementgroupsMembersPostBadRequest) Code() int { } func (o *PcloudPlacementgroupsMembersPostBadRequest) Error() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/placement-groups/{placement_group_id}/members][%d] pcloudPlacementgroupsMembersPostBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/placement-groups/{placement_group_id}/members][%d] pcloudPlacementgroupsMembersPostBadRequest %s", 400, payload) } func (o *PcloudPlacementgroupsMembersPostBadRequest) String() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/placement-groups/{placement_group_id}/members][%d] pcloudPlacementgroupsMembersPostBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/placement-groups/{placement_group_id}/members][%d] pcloudPlacementgroupsMembersPostBadRequest %s", 400, payload) } func (o *PcloudPlacementgroupsMembersPostBadRequest) GetPayload() *models.Error { @@ -257,11 +262,13 @@ func (o *PcloudPlacementgroupsMembersPostUnauthorized) Code() int { } func (o *PcloudPlacementgroupsMembersPostUnauthorized) Error() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/placement-groups/{placement_group_id}/members][%d] pcloudPlacementgroupsMembersPostUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/placement-groups/{placement_group_id}/members][%d] pcloudPlacementgroupsMembersPostUnauthorized %s", 401, payload) } func (o *PcloudPlacementgroupsMembersPostUnauthorized) String() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/placement-groups/{placement_group_id}/members][%d] pcloudPlacementgroupsMembersPostUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/placement-groups/{placement_group_id}/members][%d] pcloudPlacementgroupsMembersPostUnauthorized %s", 401, payload) } func (o *PcloudPlacementgroupsMembersPostUnauthorized) GetPayload() *models.Error { @@ -325,11 +332,13 @@ func (o *PcloudPlacementgroupsMembersPostForbidden) Code() int { } func (o *PcloudPlacementgroupsMembersPostForbidden) Error() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/placement-groups/{placement_group_id}/members][%d] pcloudPlacementgroupsMembersPostForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/placement-groups/{placement_group_id}/members][%d] pcloudPlacementgroupsMembersPostForbidden %s", 403, payload) } func (o *PcloudPlacementgroupsMembersPostForbidden) String() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/placement-groups/{placement_group_id}/members][%d] pcloudPlacementgroupsMembersPostForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/placement-groups/{placement_group_id}/members][%d] pcloudPlacementgroupsMembersPostForbidden %s", 403, payload) } func (o *PcloudPlacementgroupsMembersPostForbidden) GetPayload() *models.Error { @@ -393,11 +402,13 @@ func (o *PcloudPlacementgroupsMembersPostNotFound) Code() int { } func (o *PcloudPlacementgroupsMembersPostNotFound) Error() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/placement-groups/{placement_group_id}/members][%d] pcloudPlacementgroupsMembersPostNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/placement-groups/{placement_group_id}/members][%d] pcloudPlacementgroupsMembersPostNotFound %s", 404, payload) } func (o *PcloudPlacementgroupsMembersPostNotFound) String() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/placement-groups/{placement_group_id}/members][%d] pcloudPlacementgroupsMembersPostNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/placement-groups/{placement_group_id}/members][%d] pcloudPlacementgroupsMembersPostNotFound %s", 404, payload) } func (o *PcloudPlacementgroupsMembersPostNotFound) GetPayload() *models.Error { @@ -461,11 +472,13 @@ func (o *PcloudPlacementgroupsMembersPostConflict) Code() int { } func (o *PcloudPlacementgroupsMembersPostConflict) Error() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/placement-groups/{placement_group_id}/members][%d] pcloudPlacementgroupsMembersPostConflict %+v", 409, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/placement-groups/{placement_group_id}/members][%d] pcloudPlacementgroupsMembersPostConflict %s", 409, payload) } func (o *PcloudPlacementgroupsMembersPostConflict) String() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/placement-groups/{placement_group_id}/members][%d] pcloudPlacementgroupsMembersPostConflict %+v", 409, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/placement-groups/{placement_group_id}/members][%d] pcloudPlacementgroupsMembersPostConflict %s", 409, payload) } func (o *PcloudPlacementgroupsMembersPostConflict) GetPayload() *models.Error { @@ -529,11 +542,13 @@ func (o *PcloudPlacementgroupsMembersPostUnprocessableEntity) Code() int { } func (o *PcloudPlacementgroupsMembersPostUnprocessableEntity) Error() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/placement-groups/{placement_group_id}/members][%d] pcloudPlacementgroupsMembersPostUnprocessableEntity %+v", 422, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/placement-groups/{placement_group_id}/members][%d] pcloudPlacementgroupsMembersPostUnprocessableEntity %s", 422, payload) } func (o *PcloudPlacementgroupsMembersPostUnprocessableEntity) String() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/placement-groups/{placement_group_id}/members][%d] pcloudPlacementgroupsMembersPostUnprocessableEntity %+v", 422, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/placement-groups/{placement_group_id}/members][%d] pcloudPlacementgroupsMembersPostUnprocessableEntity %s", 422, payload) } func (o *PcloudPlacementgroupsMembersPostUnprocessableEntity) GetPayload() *models.Error { @@ -597,11 +612,13 @@ func (o *PcloudPlacementgroupsMembersPostInternalServerError) Code() int { } func (o *PcloudPlacementgroupsMembersPostInternalServerError) Error() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/placement-groups/{placement_group_id}/members][%d] pcloudPlacementgroupsMembersPostInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/placement-groups/{placement_group_id}/members][%d] pcloudPlacementgroupsMembersPostInternalServerError %s", 500, payload) } func (o *PcloudPlacementgroupsMembersPostInternalServerError) String() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/placement-groups/{placement_group_id}/members][%d] pcloudPlacementgroupsMembersPostInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/placement-groups/{placement_group_id}/members][%d] pcloudPlacementgroupsMembersPostInternalServerError %s", 500, payload) } func (o *PcloudPlacementgroupsMembersPostInternalServerError) GetPayload() *models.Error { diff --git a/power/client/p_cloud_placement_groups/pcloud_placementgroups_post_responses.go b/power/client/p_cloud_placement_groups/pcloud_placementgroups_post_responses.go index 71a5a918..0e908cf1 100644 --- a/power/client/p_cloud_placement_groups/pcloud_placementgroups_post_responses.go +++ b/power/client/p_cloud_placement_groups/pcloud_placementgroups_post_responses.go @@ -6,6 +6,7 @@ package p_cloud_placement_groups // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -121,11 +122,13 @@ func (o *PcloudPlacementgroupsPostOK) Code() int { } func (o *PcloudPlacementgroupsPostOK) Error() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/placement-groups][%d] pcloudPlacementgroupsPostOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/placement-groups][%d] pcloudPlacementgroupsPostOK %s", 200, payload) } func (o *PcloudPlacementgroupsPostOK) String() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/placement-groups][%d] pcloudPlacementgroupsPostOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/placement-groups][%d] pcloudPlacementgroupsPostOK %s", 200, payload) } func (o *PcloudPlacementgroupsPostOK) GetPayload() *models.PlacementGroup { @@ -189,11 +192,13 @@ func (o *PcloudPlacementgroupsPostBadRequest) Code() int { } func (o *PcloudPlacementgroupsPostBadRequest) Error() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/placement-groups][%d] pcloudPlacementgroupsPostBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/placement-groups][%d] pcloudPlacementgroupsPostBadRequest %s", 400, payload) } func (o *PcloudPlacementgroupsPostBadRequest) String() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/placement-groups][%d] pcloudPlacementgroupsPostBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/placement-groups][%d] pcloudPlacementgroupsPostBadRequest %s", 400, payload) } func (o *PcloudPlacementgroupsPostBadRequest) GetPayload() *models.Error { @@ -257,11 +262,13 @@ func (o *PcloudPlacementgroupsPostUnauthorized) Code() int { } func (o *PcloudPlacementgroupsPostUnauthorized) Error() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/placement-groups][%d] pcloudPlacementgroupsPostUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/placement-groups][%d] pcloudPlacementgroupsPostUnauthorized %s", 401, payload) } func (o *PcloudPlacementgroupsPostUnauthorized) String() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/placement-groups][%d] pcloudPlacementgroupsPostUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/placement-groups][%d] pcloudPlacementgroupsPostUnauthorized %s", 401, payload) } func (o *PcloudPlacementgroupsPostUnauthorized) GetPayload() *models.Error { @@ -325,11 +332,13 @@ func (o *PcloudPlacementgroupsPostForbidden) Code() int { } func (o *PcloudPlacementgroupsPostForbidden) Error() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/placement-groups][%d] pcloudPlacementgroupsPostForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/placement-groups][%d] pcloudPlacementgroupsPostForbidden %s", 403, payload) } func (o *PcloudPlacementgroupsPostForbidden) String() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/placement-groups][%d] pcloudPlacementgroupsPostForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/placement-groups][%d] pcloudPlacementgroupsPostForbidden %s", 403, payload) } func (o *PcloudPlacementgroupsPostForbidden) GetPayload() *models.Error { @@ -393,11 +402,13 @@ func (o *PcloudPlacementgroupsPostNotFound) Code() int { } func (o *PcloudPlacementgroupsPostNotFound) Error() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/placement-groups][%d] pcloudPlacementgroupsPostNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/placement-groups][%d] pcloudPlacementgroupsPostNotFound %s", 404, payload) } func (o *PcloudPlacementgroupsPostNotFound) String() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/placement-groups][%d] pcloudPlacementgroupsPostNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/placement-groups][%d] pcloudPlacementgroupsPostNotFound %s", 404, payload) } func (o *PcloudPlacementgroupsPostNotFound) GetPayload() *models.Error { @@ -461,11 +472,13 @@ func (o *PcloudPlacementgroupsPostConflict) Code() int { } func (o *PcloudPlacementgroupsPostConflict) Error() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/placement-groups][%d] pcloudPlacementgroupsPostConflict %+v", 409, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/placement-groups][%d] pcloudPlacementgroupsPostConflict %s", 409, payload) } func (o *PcloudPlacementgroupsPostConflict) String() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/placement-groups][%d] pcloudPlacementgroupsPostConflict %+v", 409, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/placement-groups][%d] pcloudPlacementgroupsPostConflict %s", 409, payload) } func (o *PcloudPlacementgroupsPostConflict) GetPayload() *models.Error { @@ -529,11 +542,13 @@ func (o *PcloudPlacementgroupsPostUnprocessableEntity) Code() int { } func (o *PcloudPlacementgroupsPostUnprocessableEntity) Error() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/placement-groups][%d] pcloudPlacementgroupsPostUnprocessableEntity %+v", 422, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/placement-groups][%d] pcloudPlacementgroupsPostUnprocessableEntity %s", 422, payload) } func (o *PcloudPlacementgroupsPostUnprocessableEntity) String() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/placement-groups][%d] pcloudPlacementgroupsPostUnprocessableEntity %+v", 422, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/placement-groups][%d] pcloudPlacementgroupsPostUnprocessableEntity %s", 422, payload) } func (o *PcloudPlacementgroupsPostUnprocessableEntity) GetPayload() *models.Error { @@ -597,11 +612,13 @@ func (o *PcloudPlacementgroupsPostInternalServerError) Code() int { } func (o *PcloudPlacementgroupsPostInternalServerError) Error() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/placement-groups][%d] pcloudPlacementgroupsPostInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/placement-groups][%d] pcloudPlacementgroupsPostInternalServerError %s", 500, payload) } func (o *PcloudPlacementgroupsPostInternalServerError) String() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/placement-groups][%d] pcloudPlacementgroupsPostInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/placement-groups][%d] pcloudPlacementgroupsPostInternalServerError %s", 500, payload) } func (o *PcloudPlacementgroupsPostInternalServerError) GetPayload() *models.Error { diff --git a/power/client/p_cloud_pod_capacity/p_cloud_pod_capacity_client.go b/power/client/p_cloud_pod_capacity/p_cloud_pod_capacity_client.go index c1782ac2..65c17f94 100644 --- a/power/client/p_cloud_pod_capacity/p_cloud_pod_capacity_client.go +++ b/power/client/p_cloud_pod_capacity/p_cloud_pod_capacity_client.go @@ -9,6 +9,7 @@ import ( "fmt" "github.com/go-openapi/runtime" + httptransport "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" ) @@ -17,6 +18,31 @@ func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientServi return &Client{transport: transport, formats: formats} } +// New creates a new p cloud pod capacity API client with basic auth credentials. +// It takes the following parameters: +// - host: http host (github.com). +// - basePath: any base path for the API client ("/v1", "/v3"). +// - scheme: http scheme ("http", "https"). +// - user: user for basic authentication header. +// - password: password for basic authentication header. +func NewClientWithBasicAuth(host, basePath, scheme, user, password string) ClientService { + transport := httptransport.New(host, basePath, []string{scheme}) + transport.DefaultAuthentication = httptransport.BasicAuth(user, password) + return &Client{transport: transport, formats: strfmt.Default} +} + +// New creates a new p cloud pod capacity API client with a bearer token for authentication. +// It takes the following parameters: +// - host: http host (github.com). +// - basePath: any base path for the API client ("/v1", "/v3"). +// - scheme: http scheme ("http", "https"). +// - bearerToken: bearer token for Bearer authentication header. +func NewClientWithBearerToken(host, basePath, scheme, bearerToken string) ClientService { + transport := httptransport.New(host, basePath, []string{scheme}) + transport.DefaultAuthentication = httptransport.BearerToken(bearerToken) + return &Client{transport: transport, formats: strfmt.Default} +} + /* Client for p cloud pod capacity API */ @@ -25,7 +51,7 @@ type Client struct { formats strfmt.Registry } -// ClientOption is the option for Client methods +// ClientOption may be used to customize the behavior of Client methods. type ClientOption func(*runtime.ClientOperation) // ClientService is the interface for Client methods @@ -37,6 +63,8 @@ type ClientService interface { /* PcloudPodcapacityGet lists of available resources within a particular pod + +Applicable to satellite locations only. */ func (a *Client) PcloudPodcapacityGet(params *PcloudPodcapacityGetParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudPodcapacityGetOK, error) { // TODO: Validate the params before sending diff --git a/power/client/p_cloud_pod_capacity/pcloud_podcapacity_get_responses.go b/power/client/p_cloud_pod_capacity/pcloud_podcapacity_get_responses.go index 681badbb..d8e7f262 100644 --- a/power/client/p_cloud_pod_capacity/pcloud_podcapacity_get_responses.go +++ b/power/client/p_cloud_pod_capacity/pcloud_podcapacity_get_responses.go @@ -6,6 +6,7 @@ package p_cloud_pod_capacity // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -109,11 +110,13 @@ func (o *PcloudPodcapacityGetOK) Code() int { } func (o *PcloudPodcapacityGetOK) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pod-capacity][%d] pcloudPodcapacityGetOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pod-capacity][%d] pcloudPodcapacityGetOK %s", 200, payload) } func (o *PcloudPodcapacityGetOK) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pod-capacity][%d] pcloudPodcapacityGetOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pod-capacity][%d] pcloudPodcapacityGetOK %s", 200, payload) } func (o *PcloudPodcapacityGetOK) GetPayload() *models.PodCapacity { @@ -177,11 +180,13 @@ func (o *PcloudPodcapacityGetBadRequest) Code() int { } func (o *PcloudPodcapacityGetBadRequest) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pod-capacity][%d] pcloudPodcapacityGetBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pod-capacity][%d] pcloudPodcapacityGetBadRequest %s", 400, payload) } func (o *PcloudPodcapacityGetBadRequest) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pod-capacity][%d] pcloudPodcapacityGetBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pod-capacity][%d] pcloudPodcapacityGetBadRequest %s", 400, payload) } func (o *PcloudPodcapacityGetBadRequest) GetPayload() *models.Error { @@ -245,11 +250,13 @@ func (o *PcloudPodcapacityGetUnauthorized) Code() int { } func (o *PcloudPodcapacityGetUnauthorized) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pod-capacity][%d] pcloudPodcapacityGetUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pod-capacity][%d] pcloudPodcapacityGetUnauthorized %s", 401, payload) } func (o *PcloudPodcapacityGetUnauthorized) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pod-capacity][%d] pcloudPodcapacityGetUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pod-capacity][%d] pcloudPodcapacityGetUnauthorized %s", 401, payload) } func (o *PcloudPodcapacityGetUnauthorized) GetPayload() *models.Error { @@ -313,11 +320,13 @@ func (o *PcloudPodcapacityGetForbidden) Code() int { } func (o *PcloudPodcapacityGetForbidden) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pod-capacity][%d] pcloudPodcapacityGetForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pod-capacity][%d] pcloudPodcapacityGetForbidden %s", 403, payload) } func (o *PcloudPodcapacityGetForbidden) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pod-capacity][%d] pcloudPodcapacityGetForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pod-capacity][%d] pcloudPodcapacityGetForbidden %s", 403, payload) } func (o *PcloudPodcapacityGetForbidden) GetPayload() *models.Error { @@ -381,11 +390,13 @@ func (o *PcloudPodcapacityGetNotFound) Code() int { } func (o *PcloudPodcapacityGetNotFound) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pod-capacity][%d] pcloudPodcapacityGetNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pod-capacity][%d] pcloudPodcapacityGetNotFound %s", 404, payload) } func (o *PcloudPodcapacityGetNotFound) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pod-capacity][%d] pcloudPodcapacityGetNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pod-capacity][%d] pcloudPodcapacityGetNotFound %s", 404, payload) } func (o *PcloudPodcapacityGetNotFound) GetPayload() *models.Error { @@ -449,11 +460,13 @@ func (o *PcloudPodcapacityGetInternalServerError) Code() int { } func (o *PcloudPodcapacityGetInternalServerError) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pod-capacity][%d] pcloudPodcapacityGetInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pod-capacity][%d] pcloudPodcapacityGetInternalServerError %s", 500, payload) } func (o *PcloudPodcapacityGetInternalServerError) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pod-capacity][%d] pcloudPodcapacityGetInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pod-capacity][%d] pcloudPodcapacityGetInternalServerError %s", 500, payload) } func (o *PcloudPodcapacityGetInternalServerError) GetPayload() *models.Error { diff --git a/power/client/p_cloud_s_a_p/p_cloudsap_client.go b/power/client/p_cloud_s_a_p/p_cloudsap_client.go index 917e5395..f5433f52 100644 --- a/power/client/p_cloud_s_a_p/p_cloudsap_client.go +++ b/power/client/p_cloud_s_a_p/p_cloudsap_client.go @@ -9,6 +9,7 @@ import ( "fmt" "github.com/go-openapi/runtime" + httptransport "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" ) @@ -17,6 +18,31 @@ func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientServi return &Client{transport: transport, formats: formats} } +// New creates a new p cloud s a p API client with basic auth credentials. +// It takes the following parameters: +// - host: http host (github.com). +// - basePath: any base path for the API client ("/v1", "/v3"). +// - scheme: http scheme ("http", "https"). +// - user: user for basic authentication header. +// - password: password for basic authentication header. +func NewClientWithBasicAuth(host, basePath, scheme, user, password string) ClientService { + transport := httptransport.New(host, basePath, []string{scheme}) + transport.DefaultAuthentication = httptransport.BasicAuth(user, password) + return &Client{transport: transport, formats: strfmt.Default} +} + +// New creates a new p cloud s a p API client with a bearer token for authentication. +// It takes the following parameters: +// - host: http host (github.com). +// - basePath: any base path for the API client ("/v1", "/v3"). +// - scheme: http scheme ("http", "https"). +// - bearerToken: bearer token for Bearer authentication header. +func NewClientWithBearerToken(host, basePath, scheme, bearerToken string) ClientService { + transport := httptransport.New(host, basePath, []string{scheme}) + transport.DefaultAuthentication = httptransport.BearerToken(bearerToken) + return &Client{transport: transport, formats: strfmt.Default} +} + /* Client for p cloud s a p API */ @@ -25,7 +51,7 @@ type Client struct { formats strfmt.Registry } -// ClientOption is the option for Client methods +// ClientOption may be used to customize the behavior of Client methods. type ClientOption func(*runtime.ClientOperation) // ClientService is the interface for Client methods diff --git a/power/client/p_cloud_s_a_p/pcloud_sap_get_responses.go b/power/client/p_cloud_s_a_p/pcloud_sap_get_responses.go index ec80f3bd..d0be31ba 100644 --- a/power/client/p_cloud_s_a_p/pcloud_sap_get_responses.go +++ b/power/client/p_cloud_s_a_p/pcloud_sap_get_responses.go @@ -6,6 +6,7 @@ package p_cloud_s_a_p // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -109,11 +110,13 @@ func (o *PcloudSapGetOK) Code() int { } func (o *PcloudSapGetOK) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/sap/{sap_profile_id}][%d] pcloudSapGetOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/sap/{sap_profile_id}][%d] pcloudSapGetOK %s", 200, payload) } func (o *PcloudSapGetOK) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/sap/{sap_profile_id}][%d] pcloudSapGetOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/sap/{sap_profile_id}][%d] pcloudSapGetOK %s", 200, payload) } func (o *PcloudSapGetOK) GetPayload() *models.SAPProfile { @@ -177,11 +180,13 @@ func (o *PcloudSapGetBadRequest) Code() int { } func (o *PcloudSapGetBadRequest) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/sap/{sap_profile_id}][%d] pcloudSapGetBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/sap/{sap_profile_id}][%d] pcloudSapGetBadRequest %s", 400, payload) } func (o *PcloudSapGetBadRequest) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/sap/{sap_profile_id}][%d] pcloudSapGetBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/sap/{sap_profile_id}][%d] pcloudSapGetBadRequest %s", 400, payload) } func (o *PcloudSapGetBadRequest) GetPayload() *models.Error { @@ -245,11 +250,13 @@ func (o *PcloudSapGetUnauthorized) Code() int { } func (o *PcloudSapGetUnauthorized) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/sap/{sap_profile_id}][%d] pcloudSapGetUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/sap/{sap_profile_id}][%d] pcloudSapGetUnauthorized %s", 401, payload) } func (o *PcloudSapGetUnauthorized) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/sap/{sap_profile_id}][%d] pcloudSapGetUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/sap/{sap_profile_id}][%d] pcloudSapGetUnauthorized %s", 401, payload) } func (o *PcloudSapGetUnauthorized) GetPayload() *models.Error { @@ -313,11 +320,13 @@ func (o *PcloudSapGetForbidden) Code() int { } func (o *PcloudSapGetForbidden) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/sap/{sap_profile_id}][%d] pcloudSapGetForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/sap/{sap_profile_id}][%d] pcloudSapGetForbidden %s", 403, payload) } func (o *PcloudSapGetForbidden) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/sap/{sap_profile_id}][%d] pcloudSapGetForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/sap/{sap_profile_id}][%d] pcloudSapGetForbidden %s", 403, payload) } func (o *PcloudSapGetForbidden) GetPayload() *models.Error { @@ -381,11 +390,13 @@ func (o *PcloudSapGetNotFound) Code() int { } func (o *PcloudSapGetNotFound) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/sap/{sap_profile_id}][%d] pcloudSapGetNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/sap/{sap_profile_id}][%d] pcloudSapGetNotFound %s", 404, payload) } func (o *PcloudSapGetNotFound) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/sap/{sap_profile_id}][%d] pcloudSapGetNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/sap/{sap_profile_id}][%d] pcloudSapGetNotFound %s", 404, payload) } func (o *PcloudSapGetNotFound) GetPayload() *models.Error { @@ -449,11 +460,13 @@ func (o *PcloudSapGetInternalServerError) Code() int { } func (o *PcloudSapGetInternalServerError) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/sap/{sap_profile_id}][%d] pcloudSapGetInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/sap/{sap_profile_id}][%d] pcloudSapGetInternalServerError %s", 500, payload) } func (o *PcloudSapGetInternalServerError) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/sap/{sap_profile_id}][%d] pcloudSapGetInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/sap/{sap_profile_id}][%d] pcloudSapGetInternalServerError %s", 500, payload) } func (o *PcloudSapGetInternalServerError) GetPayload() *models.Error { diff --git a/power/client/p_cloud_s_a_p/pcloud_sap_getall_responses.go b/power/client/p_cloud_s_a_p/pcloud_sap_getall_responses.go index 52684d05..e69d9995 100644 --- a/power/client/p_cloud_s_a_p/pcloud_sap_getall_responses.go +++ b/power/client/p_cloud_s_a_p/pcloud_sap_getall_responses.go @@ -6,6 +6,7 @@ package p_cloud_s_a_p // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -109,11 +110,13 @@ func (o *PcloudSapGetallOK) Code() int { } func (o *PcloudSapGetallOK) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/sap][%d] pcloudSapGetallOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/sap][%d] pcloudSapGetallOK %s", 200, payload) } func (o *PcloudSapGetallOK) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/sap][%d] pcloudSapGetallOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/sap][%d] pcloudSapGetallOK %s", 200, payload) } func (o *PcloudSapGetallOK) GetPayload() *models.SAPProfiles { @@ -177,11 +180,13 @@ func (o *PcloudSapGetallBadRequest) Code() int { } func (o *PcloudSapGetallBadRequest) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/sap][%d] pcloudSapGetallBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/sap][%d] pcloudSapGetallBadRequest %s", 400, payload) } func (o *PcloudSapGetallBadRequest) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/sap][%d] pcloudSapGetallBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/sap][%d] pcloudSapGetallBadRequest %s", 400, payload) } func (o *PcloudSapGetallBadRequest) GetPayload() *models.Error { @@ -245,11 +250,13 @@ func (o *PcloudSapGetallUnauthorized) Code() int { } func (o *PcloudSapGetallUnauthorized) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/sap][%d] pcloudSapGetallUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/sap][%d] pcloudSapGetallUnauthorized %s", 401, payload) } func (o *PcloudSapGetallUnauthorized) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/sap][%d] pcloudSapGetallUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/sap][%d] pcloudSapGetallUnauthorized %s", 401, payload) } func (o *PcloudSapGetallUnauthorized) GetPayload() *models.Error { @@ -313,11 +320,13 @@ func (o *PcloudSapGetallForbidden) Code() int { } func (o *PcloudSapGetallForbidden) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/sap][%d] pcloudSapGetallForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/sap][%d] pcloudSapGetallForbidden %s", 403, payload) } func (o *PcloudSapGetallForbidden) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/sap][%d] pcloudSapGetallForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/sap][%d] pcloudSapGetallForbidden %s", 403, payload) } func (o *PcloudSapGetallForbidden) GetPayload() *models.Error { @@ -381,11 +390,13 @@ func (o *PcloudSapGetallNotFound) Code() int { } func (o *PcloudSapGetallNotFound) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/sap][%d] pcloudSapGetallNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/sap][%d] pcloudSapGetallNotFound %s", 404, payload) } func (o *PcloudSapGetallNotFound) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/sap][%d] pcloudSapGetallNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/sap][%d] pcloudSapGetallNotFound %s", 404, payload) } func (o *PcloudSapGetallNotFound) GetPayload() *models.Error { @@ -449,11 +460,13 @@ func (o *PcloudSapGetallInternalServerError) Code() int { } func (o *PcloudSapGetallInternalServerError) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/sap][%d] pcloudSapGetallInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/sap][%d] pcloudSapGetallInternalServerError %s", 500, payload) } func (o *PcloudSapGetallInternalServerError) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/sap][%d] pcloudSapGetallInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/sap][%d] pcloudSapGetallInternalServerError %s", 500, payload) } func (o *PcloudSapGetallInternalServerError) GetPayload() *models.Error { diff --git a/power/client/p_cloud_s_a_p/pcloud_sap_post_responses.go b/power/client/p_cloud_s_a_p/pcloud_sap_post_responses.go index f68c030e..cb808bed 100644 --- a/power/client/p_cloud_s_a_p/pcloud_sap_post_responses.go +++ b/power/client/p_cloud_s_a_p/pcloud_sap_post_responses.go @@ -6,6 +6,7 @@ package p_cloud_s_a_p // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -133,11 +134,13 @@ func (o *PcloudSapPostOK) Code() int { } func (o *PcloudSapPostOK) Error() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/sap][%d] pcloudSapPostOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/sap][%d] pcloudSapPostOK %s", 200, payload) } func (o *PcloudSapPostOK) String() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/sap][%d] pcloudSapPostOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/sap][%d] pcloudSapPostOK %s", 200, payload) } func (o *PcloudSapPostOK) GetPayload() models.PVMInstanceList { @@ -199,11 +202,13 @@ func (o *PcloudSapPostCreated) Code() int { } func (o *PcloudSapPostCreated) Error() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/sap][%d] pcloudSapPostCreated %+v", 201, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/sap][%d] pcloudSapPostCreated %s", 201, payload) } func (o *PcloudSapPostCreated) String() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/sap][%d] pcloudSapPostCreated %+v", 201, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/sap][%d] pcloudSapPostCreated %s", 201, payload) } func (o *PcloudSapPostCreated) GetPayload() models.PVMInstanceList { @@ -265,11 +270,13 @@ func (o *PcloudSapPostAccepted) Code() int { } func (o *PcloudSapPostAccepted) Error() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/sap][%d] pcloudSapPostAccepted %+v", 202, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/sap][%d] pcloudSapPostAccepted %s", 202, payload) } func (o *PcloudSapPostAccepted) String() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/sap][%d] pcloudSapPostAccepted %+v", 202, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/sap][%d] pcloudSapPostAccepted %s", 202, payload) } func (o *PcloudSapPostAccepted) GetPayload() models.PVMInstanceList { @@ -331,11 +338,13 @@ func (o *PcloudSapPostBadRequest) Code() int { } func (o *PcloudSapPostBadRequest) Error() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/sap][%d] pcloudSapPostBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/sap][%d] pcloudSapPostBadRequest %s", 400, payload) } func (o *PcloudSapPostBadRequest) String() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/sap][%d] pcloudSapPostBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/sap][%d] pcloudSapPostBadRequest %s", 400, payload) } func (o *PcloudSapPostBadRequest) GetPayload() *models.Error { @@ -399,11 +408,13 @@ func (o *PcloudSapPostUnauthorized) Code() int { } func (o *PcloudSapPostUnauthorized) Error() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/sap][%d] pcloudSapPostUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/sap][%d] pcloudSapPostUnauthorized %s", 401, payload) } func (o *PcloudSapPostUnauthorized) String() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/sap][%d] pcloudSapPostUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/sap][%d] pcloudSapPostUnauthorized %s", 401, payload) } func (o *PcloudSapPostUnauthorized) GetPayload() *models.Error { @@ -467,11 +478,13 @@ func (o *PcloudSapPostForbidden) Code() int { } func (o *PcloudSapPostForbidden) Error() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/sap][%d] pcloudSapPostForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/sap][%d] pcloudSapPostForbidden %s", 403, payload) } func (o *PcloudSapPostForbidden) String() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/sap][%d] pcloudSapPostForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/sap][%d] pcloudSapPostForbidden %s", 403, payload) } func (o *PcloudSapPostForbidden) GetPayload() *models.Error { @@ -535,11 +548,13 @@ func (o *PcloudSapPostNotFound) Code() int { } func (o *PcloudSapPostNotFound) Error() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/sap][%d] pcloudSapPostNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/sap][%d] pcloudSapPostNotFound %s", 404, payload) } func (o *PcloudSapPostNotFound) String() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/sap][%d] pcloudSapPostNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/sap][%d] pcloudSapPostNotFound %s", 404, payload) } func (o *PcloudSapPostNotFound) GetPayload() *models.Error { @@ -603,11 +618,13 @@ func (o *PcloudSapPostConflict) Code() int { } func (o *PcloudSapPostConflict) Error() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/sap][%d] pcloudSapPostConflict %+v", 409, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/sap][%d] pcloudSapPostConflict %s", 409, payload) } func (o *PcloudSapPostConflict) String() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/sap][%d] pcloudSapPostConflict %+v", 409, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/sap][%d] pcloudSapPostConflict %s", 409, payload) } func (o *PcloudSapPostConflict) GetPayload() *models.Error { @@ -671,11 +688,13 @@ func (o *PcloudSapPostUnprocessableEntity) Code() int { } func (o *PcloudSapPostUnprocessableEntity) Error() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/sap][%d] pcloudSapPostUnprocessableEntity %+v", 422, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/sap][%d] pcloudSapPostUnprocessableEntity %s", 422, payload) } func (o *PcloudSapPostUnprocessableEntity) String() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/sap][%d] pcloudSapPostUnprocessableEntity %+v", 422, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/sap][%d] pcloudSapPostUnprocessableEntity %s", 422, payload) } func (o *PcloudSapPostUnprocessableEntity) GetPayload() *models.Error { @@ -739,11 +758,13 @@ func (o *PcloudSapPostInternalServerError) Code() int { } func (o *PcloudSapPostInternalServerError) Error() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/sap][%d] pcloudSapPostInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/sap][%d] pcloudSapPostInternalServerError %s", 500, payload) } func (o *PcloudSapPostInternalServerError) String() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/sap][%d] pcloudSapPostInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/sap][%d] pcloudSapPostInternalServerError %s", 500, payload) } func (o *PcloudSapPostInternalServerError) GetPayload() *models.Error { diff --git a/power/client/p_cloud_s_p_p_placement_groups/p_cloudspp_placement_groups_client.go b/power/client/p_cloud_s_p_p_placement_groups/p_cloudspp_placement_groups_client.go index 6407002a..e37b93ae 100644 --- a/power/client/p_cloud_s_p_p_placement_groups/p_cloudspp_placement_groups_client.go +++ b/power/client/p_cloud_s_p_p_placement_groups/p_cloudspp_placement_groups_client.go @@ -9,6 +9,7 @@ import ( "fmt" "github.com/go-openapi/runtime" + httptransport "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" ) @@ -17,6 +18,31 @@ func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientServi return &Client{transport: transport, formats: formats} } +// New creates a new p cloud s p p placement groups API client with basic auth credentials. +// It takes the following parameters: +// - host: http host (github.com). +// - basePath: any base path for the API client ("/v1", "/v3"). +// - scheme: http scheme ("http", "https"). +// - user: user for basic authentication header. +// - password: password for basic authentication header. +func NewClientWithBasicAuth(host, basePath, scheme, user, password string) ClientService { + transport := httptransport.New(host, basePath, []string{scheme}) + transport.DefaultAuthentication = httptransport.BasicAuth(user, password) + return &Client{transport: transport, formats: strfmt.Default} +} + +// New creates a new p cloud s p p placement groups API client with a bearer token for authentication. +// It takes the following parameters: +// - host: http host (github.com). +// - basePath: any base path for the API client ("/v1", "/v3"). +// - scheme: http scheme ("http", "https"). +// - bearerToken: bearer token for Bearer authentication header. +func NewClientWithBearerToken(host, basePath, scheme, bearerToken string) ClientService { + transport := httptransport.New(host, basePath, []string{scheme}) + transport.DefaultAuthentication = httptransport.BearerToken(bearerToken) + return &Client{transport: transport, formats: strfmt.Default} +} + /* Client for p cloud s p p placement groups API */ @@ -25,7 +51,7 @@ type Client struct { formats strfmt.Registry } -// ClientOption is the option for Client methods +// ClientOption may be used to customize the behavior of Client methods. type ClientOption func(*runtime.ClientOperation) // ClientService is the interface for Client methods diff --git a/power/client/p_cloud_s_p_p_placement_groups/pcloud_sppplacementgroups_delete_responses.go b/power/client/p_cloud_s_p_p_placement_groups/pcloud_sppplacementgroups_delete_responses.go index 107bbf09..b3865e6c 100644 --- a/power/client/p_cloud_s_p_p_placement_groups/pcloud_sppplacementgroups_delete_responses.go +++ b/power/client/p_cloud_s_p_p_placement_groups/pcloud_sppplacementgroups_delete_responses.go @@ -6,6 +6,7 @@ package p_cloud_s_p_p_placement_groups // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -115,11 +116,13 @@ func (o *PcloudSppplacementgroupsDeleteOK) Code() int { } func (o *PcloudSppplacementgroupsDeleteOK) Error() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/spp-placement-groups/{spp_placement_group_id}][%d] pcloudSppplacementgroupsDeleteOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/spp-placement-groups/{spp_placement_group_id}][%d] pcloudSppplacementgroupsDeleteOK %s", 200, payload) } func (o *PcloudSppplacementgroupsDeleteOK) String() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/spp-placement-groups/{spp_placement_group_id}][%d] pcloudSppplacementgroupsDeleteOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/spp-placement-groups/{spp_placement_group_id}][%d] pcloudSppplacementgroupsDeleteOK %s", 200, payload) } func (o *PcloudSppplacementgroupsDeleteOK) GetPayload() models.Object { @@ -181,11 +184,13 @@ func (o *PcloudSppplacementgroupsDeleteBadRequest) Code() int { } func (o *PcloudSppplacementgroupsDeleteBadRequest) Error() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/spp-placement-groups/{spp_placement_group_id}][%d] pcloudSppplacementgroupsDeleteBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/spp-placement-groups/{spp_placement_group_id}][%d] pcloudSppplacementgroupsDeleteBadRequest %s", 400, payload) } func (o *PcloudSppplacementgroupsDeleteBadRequest) String() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/spp-placement-groups/{spp_placement_group_id}][%d] pcloudSppplacementgroupsDeleteBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/spp-placement-groups/{spp_placement_group_id}][%d] pcloudSppplacementgroupsDeleteBadRequest %s", 400, payload) } func (o *PcloudSppplacementgroupsDeleteBadRequest) GetPayload() *models.Error { @@ -249,11 +254,13 @@ func (o *PcloudSppplacementgroupsDeleteUnauthorized) Code() int { } func (o *PcloudSppplacementgroupsDeleteUnauthorized) Error() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/spp-placement-groups/{spp_placement_group_id}][%d] pcloudSppplacementgroupsDeleteUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/spp-placement-groups/{spp_placement_group_id}][%d] pcloudSppplacementgroupsDeleteUnauthorized %s", 401, payload) } func (o *PcloudSppplacementgroupsDeleteUnauthorized) String() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/spp-placement-groups/{spp_placement_group_id}][%d] pcloudSppplacementgroupsDeleteUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/spp-placement-groups/{spp_placement_group_id}][%d] pcloudSppplacementgroupsDeleteUnauthorized %s", 401, payload) } func (o *PcloudSppplacementgroupsDeleteUnauthorized) GetPayload() *models.Error { @@ -317,11 +324,13 @@ func (o *PcloudSppplacementgroupsDeleteForbidden) Code() int { } func (o *PcloudSppplacementgroupsDeleteForbidden) Error() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/spp-placement-groups/{spp_placement_group_id}][%d] pcloudSppplacementgroupsDeleteForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/spp-placement-groups/{spp_placement_group_id}][%d] pcloudSppplacementgroupsDeleteForbidden %s", 403, payload) } func (o *PcloudSppplacementgroupsDeleteForbidden) String() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/spp-placement-groups/{spp_placement_group_id}][%d] pcloudSppplacementgroupsDeleteForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/spp-placement-groups/{spp_placement_group_id}][%d] pcloudSppplacementgroupsDeleteForbidden %s", 403, payload) } func (o *PcloudSppplacementgroupsDeleteForbidden) GetPayload() *models.Error { @@ -385,11 +394,13 @@ func (o *PcloudSppplacementgroupsDeleteNotFound) Code() int { } func (o *PcloudSppplacementgroupsDeleteNotFound) Error() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/spp-placement-groups/{spp_placement_group_id}][%d] pcloudSppplacementgroupsDeleteNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/spp-placement-groups/{spp_placement_group_id}][%d] pcloudSppplacementgroupsDeleteNotFound %s", 404, payload) } func (o *PcloudSppplacementgroupsDeleteNotFound) String() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/spp-placement-groups/{spp_placement_group_id}][%d] pcloudSppplacementgroupsDeleteNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/spp-placement-groups/{spp_placement_group_id}][%d] pcloudSppplacementgroupsDeleteNotFound %s", 404, payload) } func (o *PcloudSppplacementgroupsDeleteNotFound) GetPayload() *models.Error { @@ -453,11 +464,13 @@ func (o *PcloudSppplacementgroupsDeleteConflict) Code() int { } func (o *PcloudSppplacementgroupsDeleteConflict) Error() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/spp-placement-groups/{spp_placement_group_id}][%d] pcloudSppplacementgroupsDeleteConflict %+v", 409, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/spp-placement-groups/{spp_placement_group_id}][%d] pcloudSppplacementgroupsDeleteConflict %s", 409, payload) } func (o *PcloudSppplacementgroupsDeleteConflict) String() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/spp-placement-groups/{spp_placement_group_id}][%d] pcloudSppplacementgroupsDeleteConflict %+v", 409, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/spp-placement-groups/{spp_placement_group_id}][%d] pcloudSppplacementgroupsDeleteConflict %s", 409, payload) } func (o *PcloudSppplacementgroupsDeleteConflict) GetPayload() *models.Error { @@ -521,11 +534,13 @@ func (o *PcloudSppplacementgroupsDeleteInternalServerError) Code() int { } func (o *PcloudSppplacementgroupsDeleteInternalServerError) Error() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/spp-placement-groups/{spp_placement_group_id}][%d] pcloudSppplacementgroupsDeleteInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/spp-placement-groups/{spp_placement_group_id}][%d] pcloudSppplacementgroupsDeleteInternalServerError %s", 500, payload) } func (o *PcloudSppplacementgroupsDeleteInternalServerError) String() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/spp-placement-groups/{spp_placement_group_id}][%d] pcloudSppplacementgroupsDeleteInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/spp-placement-groups/{spp_placement_group_id}][%d] pcloudSppplacementgroupsDeleteInternalServerError %s", 500, payload) } func (o *PcloudSppplacementgroupsDeleteInternalServerError) GetPayload() *models.Error { diff --git a/power/client/p_cloud_s_p_p_placement_groups/pcloud_sppplacementgroups_get_responses.go b/power/client/p_cloud_s_p_p_placement_groups/pcloud_sppplacementgroups_get_responses.go index 07a983d3..f624ee83 100644 --- a/power/client/p_cloud_s_p_p_placement_groups/pcloud_sppplacementgroups_get_responses.go +++ b/power/client/p_cloud_s_p_p_placement_groups/pcloud_sppplacementgroups_get_responses.go @@ -6,6 +6,7 @@ package p_cloud_s_p_p_placement_groups // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -109,11 +110,13 @@ func (o *PcloudSppplacementgroupsGetOK) Code() int { } func (o *PcloudSppplacementgroupsGetOK) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/spp-placement-groups/{spp_placement_group_id}][%d] pcloudSppplacementgroupsGetOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/spp-placement-groups/{spp_placement_group_id}][%d] pcloudSppplacementgroupsGetOK %s", 200, payload) } func (o *PcloudSppplacementgroupsGetOK) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/spp-placement-groups/{spp_placement_group_id}][%d] pcloudSppplacementgroupsGetOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/spp-placement-groups/{spp_placement_group_id}][%d] pcloudSppplacementgroupsGetOK %s", 200, payload) } func (o *PcloudSppplacementgroupsGetOK) GetPayload() *models.SPPPlacementGroup { @@ -177,11 +180,13 @@ func (o *PcloudSppplacementgroupsGetBadRequest) Code() int { } func (o *PcloudSppplacementgroupsGetBadRequest) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/spp-placement-groups/{spp_placement_group_id}][%d] pcloudSppplacementgroupsGetBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/spp-placement-groups/{spp_placement_group_id}][%d] pcloudSppplacementgroupsGetBadRequest %s", 400, payload) } func (o *PcloudSppplacementgroupsGetBadRequest) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/spp-placement-groups/{spp_placement_group_id}][%d] pcloudSppplacementgroupsGetBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/spp-placement-groups/{spp_placement_group_id}][%d] pcloudSppplacementgroupsGetBadRequest %s", 400, payload) } func (o *PcloudSppplacementgroupsGetBadRequest) GetPayload() *models.Error { @@ -245,11 +250,13 @@ func (o *PcloudSppplacementgroupsGetUnauthorized) Code() int { } func (o *PcloudSppplacementgroupsGetUnauthorized) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/spp-placement-groups/{spp_placement_group_id}][%d] pcloudSppplacementgroupsGetUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/spp-placement-groups/{spp_placement_group_id}][%d] pcloudSppplacementgroupsGetUnauthorized %s", 401, payload) } func (o *PcloudSppplacementgroupsGetUnauthorized) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/spp-placement-groups/{spp_placement_group_id}][%d] pcloudSppplacementgroupsGetUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/spp-placement-groups/{spp_placement_group_id}][%d] pcloudSppplacementgroupsGetUnauthorized %s", 401, payload) } func (o *PcloudSppplacementgroupsGetUnauthorized) GetPayload() *models.Error { @@ -313,11 +320,13 @@ func (o *PcloudSppplacementgroupsGetForbidden) Code() int { } func (o *PcloudSppplacementgroupsGetForbidden) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/spp-placement-groups/{spp_placement_group_id}][%d] pcloudSppplacementgroupsGetForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/spp-placement-groups/{spp_placement_group_id}][%d] pcloudSppplacementgroupsGetForbidden %s", 403, payload) } func (o *PcloudSppplacementgroupsGetForbidden) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/spp-placement-groups/{spp_placement_group_id}][%d] pcloudSppplacementgroupsGetForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/spp-placement-groups/{spp_placement_group_id}][%d] pcloudSppplacementgroupsGetForbidden %s", 403, payload) } func (o *PcloudSppplacementgroupsGetForbidden) GetPayload() *models.Error { @@ -381,11 +390,13 @@ func (o *PcloudSppplacementgroupsGetNotFound) Code() int { } func (o *PcloudSppplacementgroupsGetNotFound) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/spp-placement-groups/{spp_placement_group_id}][%d] pcloudSppplacementgroupsGetNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/spp-placement-groups/{spp_placement_group_id}][%d] pcloudSppplacementgroupsGetNotFound %s", 404, payload) } func (o *PcloudSppplacementgroupsGetNotFound) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/spp-placement-groups/{spp_placement_group_id}][%d] pcloudSppplacementgroupsGetNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/spp-placement-groups/{spp_placement_group_id}][%d] pcloudSppplacementgroupsGetNotFound %s", 404, payload) } func (o *PcloudSppplacementgroupsGetNotFound) GetPayload() *models.Error { @@ -449,11 +460,13 @@ func (o *PcloudSppplacementgroupsGetInternalServerError) Code() int { } func (o *PcloudSppplacementgroupsGetInternalServerError) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/spp-placement-groups/{spp_placement_group_id}][%d] pcloudSppplacementgroupsGetInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/spp-placement-groups/{spp_placement_group_id}][%d] pcloudSppplacementgroupsGetInternalServerError %s", 500, payload) } func (o *PcloudSppplacementgroupsGetInternalServerError) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/spp-placement-groups/{spp_placement_group_id}][%d] pcloudSppplacementgroupsGetInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/spp-placement-groups/{spp_placement_group_id}][%d] pcloudSppplacementgroupsGetInternalServerError %s", 500, payload) } func (o *PcloudSppplacementgroupsGetInternalServerError) GetPayload() *models.Error { diff --git a/power/client/p_cloud_s_p_p_placement_groups/pcloud_sppplacementgroups_getall_responses.go b/power/client/p_cloud_s_p_p_placement_groups/pcloud_sppplacementgroups_getall_responses.go index 5c8c36c6..e29b8593 100644 --- a/power/client/p_cloud_s_p_p_placement_groups/pcloud_sppplacementgroups_getall_responses.go +++ b/power/client/p_cloud_s_p_p_placement_groups/pcloud_sppplacementgroups_getall_responses.go @@ -6,6 +6,7 @@ package p_cloud_s_p_p_placement_groups // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -109,11 +110,13 @@ func (o *PcloudSppplacementgroupsGetallOK) Code() int { } func (o *PcloudSppplacementgroupsGetallOK) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/spp-placement-groups][%d] pcloudSppplacementgroupsGetallOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/spp-placement-groups][%d] pcloudSppplacementgroupsGetallOK %s", 200, payload) } func (o *PcloudSppplacementgroupsGetallOK) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/spp-placement-groups][%d] pcloudSppplacementgroupsGetallOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/spp-placement-groups][%d] pcloudSppplacementgroupsGetallOK %s", 200, payload) } func (o *PcloudSppplacementgroupsGetallOK) GetPayload() *models.SPPPlacementGroups { @@ -177,11 +180,13 @@ func (o *PcloudSppplacementgroupsGetallBadRequest) Code() int { } func (o *PcloudSppplacementgroupsGetallBadRequest) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/spp-placement-groups][%d] pcloudSppplacementgroupsGetallBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/spp-placement-groups][%d] pcloudSppplacementgroupsGetallBadRequest %s", 400, payload) } func (o *PcloudSppplacementgroupsGetallBadRequest) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/spp-placement-groups][%d] pcloudSppplacementgroupsGetallBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/spp-placement-groups][%d] pcloudSppplacementgroupsGetallBadRequest %s", 400, payload) } func (o *PcloudSppplacementgroupsGetallBadRequest) GetPayload() *models.Error { @@ -245,11 +250,13 @@ func (o *PcloudSppplacementgroupsGetallUnauthorized) Code() int { } func (o *PcloudSppplacementgroupsGetallUnauthorized) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/spp-placement-groups][%d] pcloudSppplacementgroupsGetallUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/spp-placement-groups][%d] pcloudSppplacementgroupsGetallUnauthorized %s", 401, payload) } func (o *PcloudSppplacementgroupsGetallUnauthorized) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/spp-placement-groups][%d] pcloudSppplacementgroupsGetallUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/spp-placement-groups][%d] pcloudSppplacementgroupsGetallUnauthorized %s", 401, payload) } func (o *PcloudSppplacementgroupsGetallUnauthorized) GetPayload() *models.Error { @@ -313,11 +320,13 @@ func (o *PcloudSppplacementgroupsGetallForbidden) Code() int { } func (o *PcloudSppplacementgroupsGetallForbidden) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/spp-placement-groups][%d] pcloudSppplacementgroupsGetallForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/spp-placement-groups][%d] pcloudSppplacementgroupsGetallForbidden %s", 403, payload) } func (o *PcloudSppplacementgroupsGetallForbidden) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/spp-placement-groups][%d] pcloudSppplacementgroupsGetallForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/spp-placement-groups][%d] pcloudSppplacementgroupsGetallForbidden %s", 403, payload) } func (o *PcloudSppplacementgroupsGetallForbidden) GetPayload() *models.Error { @@ -381,11 +390,13 @@ func (o *PcloudSppplacementgroupsGetallNotFound) Code() int { } func (o *PcloudSppplacementgroupsGetallNotFound) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/spp-placement-groups][%d] pcloudSppplacementgroupsGetallNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/spp-placement-groups][%d] pcloudSppplacementgroupsGetallNotFound %s", 404, payload) } func (o *PcloudSppplacementgroupsGetallNotFound) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/spp-placement-groups][%d] pcloudSppplacementgroupsGetallNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/spp-placement-groups][%d] pcloudSppplacementgroupsGetallNotFound %s", 404, payload) } func (o *PcloudSppplacementgroupsGetallNotFound) GetPayload() *models.Error { @@ -449,11 +460,13 @@ func (o *PcloudSppplacementgroupsGetallInternalServerError) Code() int { } func (o *PcloudSppplacementgroupsGetallInternalServerError) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/spp-placement-groups][%d] pcloudSppplacementgroupsGetallInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/spp-placement-groups][%d] pcloudSppplacementgroupsGetallInternalServerError %s", 500, payload) } func (o *PcloudSppplacementgroupsGetallInternalServerError) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/spp-placement-groups][%d] pcloudSppplacementgroupsGetallInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/spp-placement-groups][%d] pcloudSppplacementgroupsGetallInternalServerError %s", 500, payload) } func (o *PcloudSppplacementgroupsGetallInternalServerError) GetPayload() *models.Error { diff --git a/power/client/p_cloud_s_p_p_placement_groups/pcloud_sppplacementgroups_members_delete_responses.go b/power/client/p_cloud_s_p_p_placement_groups/pcloud_sppplacementgroups_members_delete_responses.go index 6e06c8b7..e7c542a6 100644 --- a/power/client/p_cloud_s_p_p_placement_groups/pcloud_sppplacementgroups_members_delete_responses.go +++ b/power/client/p_cloud_s_p_p_placement_groups/pcloud_sppplacementgroups_members_delete_responses.go @@ -6,6 +6,7 @@ package p_cloud_s_p_p_placement_groups // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -115,11 +116,13 @@ func (o *PcloudSppplacementgroupsMembersDeleteOK) Code() int { } func (o *PcloudSppplacementgroupsMembersDeleteOK) Error() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/spp-placement-groups/{spp_placement_group_id}/members/{shared_processor_pool_id}][%d] pcloudSppplacementgroupsMembersDeleteOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/spp-placement-groups/{spp_placement_group_id}/members/{shared_processor_pool_id}][%d] pcloudSppplacementgroupsMembersDeleteOK %s", 200, payload) } func (o *PcloudSppplacementgroupsMembersDeleteOK) String() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/spp-placement-groups/{spp_placement_group_id}/members/{shared_processor_pool_id}][%d] pcloudSppplacementgroupsMembersDeleteOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/spp-placement-groups/{spp_placement_group_id}/members/{shared_processor_pool_id}][%d] pcloudSppplacementgroupsMembersDeleteOK %s", 200, payload) } func (o *PcloudSppplacementgroupsMembersDeleteOK) GetPayload() *models.SPPPlacementGroup { @@ -183,11 +186,13 @@ func (o *PcloudSppplacementgroupsMembersDeleteBadRequest) Code() int { } func (o *PcloudSppplacementgroupsMembersDeleteBadRequest) Error() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/spp-placement-groups/{spp_placement_group_id}/members/{shared_processor_pool_id}][%d] pcloudSppplacementgroupsMembersDeleteBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/spp-placement-groups/{spp_placement_group_id}/members/{shared_processor_pool_id}][%d] pcloudSppplacementgroupsMembersDeleteBadRequest %s", 400, payload) } func (o *PcloudSppplacementgroupsMembersDeleteBadRequest) String() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/spp-placement-groups/{spp_placement_group_id}/members/{shared_processor_pool_id}][%d] pcloudSppplacementgroupsMembersDeleteBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/spp-placement-groups/{spp_placement_group_id}/members/{shared_processor_pool_id}][%d] pcloudSppplacementgroupsMembersDeleteBadRequest %s", 400, payload) } func (o *PcloudSppplacementgroupsMembersDeleteBadRequest) GetPayload() *models.Error { @@ -251,11 +256,13 @@ func (o *PcloudSppplacementgroupsMembersDeleteUnauthorized) Code() int { } func (o *PcloudSppplacementgroupsMembersDeleteUnauthorized) Error() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/spp-placement-groups/{spp_placement_group_id}/members/{shared_processor_pool_id}][%d] pcloudSppplacementgroupsMembersDeleteUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/spp-placement-groups/{spp_placement_group_id}/members/{shared_processor_pool_id}][%d] pcloudSppplacementgroupsMembersDeleteUnauthorized %s", 401, payload) } func (o *PcloudSppplacementgroupsMembersDeleteUnauthorized) String() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/spp-placement-groups/{spp_placement_group_id}/members/{shared_processor_pool_id}][%d] pcloudSppplacementgroupsMembersDeleteUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/spp-placement-groups/{spp_placement_group_id}/members/{shared_processor_pool_id}][%d] pcloudSppplacementgroupsMembersDeleteUnauthorized %s", 401, payload) } func (o *PcloudSppplacementgroupsMembersDeleteUnauthorized) GetPayload() *models.Error { @@ -319,11 +326,13 @@ func (o *PcloudSppplacementgroupsMembersDeleteForbidden) Code() int { } func (o *PcloudSppplacementgroupsMembersDeleteForbidden) Error() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/spp-placement-groups/{spp_placement_group_id}/members/{shared_processor_pool_id}][%d] pcloudSppplacementgroupsMembersDeleteForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/spp-placement-groups/{spp_placement_group_id}/members/{shared_processor_pool_id}][%d] pcloudSppplacementgroupsMembersDeleteForbidden %s", 403, payload) } func (o *PcloudSppplacementgroupsMembersDeleteForbidden) String() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/spp-placement-groups/{spp_placement_group_id}/members/{shared_processor_pool_id}][%d] pcloudSppplacementgroupsMembersDeleteForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/spp-placement-groups/{spp_placement_group_id}/members/{shared_processor_pool_id}][%d] pcloudSppplacementgroupsMembersDeleteForbidden %s", 403, payload) } func (o *PcloudSppplacementgroupsMembersDeleteForbidden) GetPayload() *models.Error { @@ -387,11 +396,13 @@ func (o *PcloudSppplacementgroupsMembersDeleteNotFound) Code() int { } func (o *PcloudSppplacementgroupsMembersDeleteNotFound) Error() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/spp-placement-groups/{spp_placement_group_id}/members/{shared_processor_pool_id}][%d] pcloudSppplacementgroupsMembersDeleteNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/spp-placement-groups/{spp_placement_group_id}/members/{shared_processor_pool_id}][%d] pcloudSppplacementgroupsMembersDeleteNotFound %s", 404, payload) } func (o *PcloudSppplacementgroupsMembersDeleteNotFound) String() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/spp-placement-groups/{spp_placement_group_id}/members/{shared_processor_pool_id}][%d] pcloudSppplacementgroupsMembersDeleteNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/spp-placement-groups/{spp_placement_group_id}/members/{shared_processor_pool_id}][%d] pcloudSppplacementgroupsMembersDeleteNotFound %s", 404, payload) } func (o *PcloudSppplacementgroupsMembersDeleteNotFound) GetPayload() *models.Error { @@ -455,11 +466,13 @@ func (o *PcloudSppplacementgroupsMembersDeleteConflict) Code() int { } func (o *PcloudSppplacementgroupsMembersDeleteConflict) Error() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/spp-placement-groups/{spp_placement_group_id}/members/{shared_processor_pool_id}][%d] pcloudSppplacementgroupsMembersDeleteConflict %+v", 409, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/spp-placement-groups/{spp_placement_group_id}/members/{shared_processor_pool_id}][%d] pcloudSppplacementgroupsMembersDeleteConflict %s", 409, payload) } func (o *PcloudSppplacementgroupsMembersDeleteConflict) String() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/spp-placement-groups/{spp_placement_group_id}/members/{shared_processor_pool_id}][%d] pcloudSppplacementgroupsMembersDeleteConflict %+v", 409, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/spp-placement-groups/{spp_placement_group_id}/members/{shared_processor_pool_id}][%d] pcloudSppplacementgroupsMembersDeleteConflict %s", 409, payload) } func (o *PcloudSppplacementgroupsMembersDeleteConflict) GetPayload() *models.Error { @@ -523,11 +536,13 @@ func (o *PcloudSppplacementgroupsMembersDeleteInternalServerError) Code() int { } func (o *PcloudSppplacementgroupsMembersDeleteInternalServerError) Error() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/spp-placement-groups/{spp_placement_group_id}/members/{shared_processor_pool_id}][%d] pcloudSppplacementgroupsMembersDeleteInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/spp-placement-groups/{spp_placement_group_id}/members/{shared_processor_pool_id}][%d] pcloudSppplacementgroupsMembersDeleteInternalServerError %s", 500, payload) } func (o *PcloudSppplacementgroupsMembersDeleteInternalServerError) String() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/spp-placement-groups/{spp_placement_group_id}/members/{shared_processor_pool_id}][%d] pcloudSppplacementgroupsMembersDeleteInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/spp-placement-groups/{spp_placement_group_id}/members/{shared_processor_pool_id}][%d] pcloudSppplacementgroupsMembersDeleteInternalServerError %s", 500, payload) } func (o *PcloudSppplacementgroupsMembersDeleteInternalServerError) GetPayload() *models.Error { diff --git a/power/client/p_cloud_s_p_p_placement_groups/pcloud_sppplacementgroups_members_post_responses.go b/power/client/p_cloud_s_p_p_placement_groups/pcloud_sppplacementgroups_members_post_responses.go index b9b3f437..e1c89983 100644 --- a/power/client/p_cloud_s_p_p_placement_groups/pcloud_sppplacementgroups_members_post_responses.go +++ b/power/client/p_cloud_s_p_p_placement_groups/pcloud_sppplacementgroups_members_post_responses.go @@ -6,6 +6,7 @@ package p_cloud_s_p_p_placement_groups // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -121,11 +122,13 @@ func (o *PcloudSppplacementgroupsMembersPostOK) Code() int { } func (o *PcloudSppplacementgroupsMembersPostOK) Error() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/spp-placement-groups/{spp_placement_group_id}/members/{shared_processor_pool_id}][%d] pcloudSppplacementgroupsMembersPostOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/spp-placement-groups/{spp_placement_group_id}/members/{shared_processor_pool_id}][%d] pcloudSppplacementgroupsMembersPostOK %s", 200, payload) } func (o *PcloudSppplacementgroupsMembersPostOK) String() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/spp-placement-groups/{spp_placement_group_id}/members/{shared_processor_pool_id}][%d] pcloudSppplacementgroupsMembersPostOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/spp-placement-groups/{spp_placement_group_id}/members/{shared_processor_pool_id}][%d] pcloudSppplacementgroupsMembersPostOK %s", 200, payload) } func (o *PcloudSppplacementgroupsMembersPostOK) GetPayload() *models.SPPPlacementGroup { @@ -189,11 +192,13 @@ func (o *PcloudSppplacementgroupsMembersPostBadRequest) Code() int { } func (o *PcloudSppplacementgroupsMembersPostBadRequest) Error() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/spp-placement-groups/{spp_placement_group_id}/members/{shared_processor_pool_id}][%d] pcloudSppplacementgroupsMembersPostBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/spp-placement-groups/{spp_placement_group_id}/members/{shared_processor_pool_id}][%d] pcloudSppplacementgroupsMembersPostBadRequest %s", 400, payload) } func (o *PcloudSppplacementgroupsMembersPostBadRequest) String() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/spp-placement-groups/{spp_placement_group_id}/members/{shared_processor_pool_id}][%d] pcloudSppplacementgroupsMembersPostBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/spp-placement-groups/{spp_placement_group_id}/members/{shared_processor_pool_id}][%d] pcloudSppplacementgroupsMembersPostBadRequest %s", 400, payload) } func (o *PcloudSppplacementgroupsMembersPostBadRequest) GetPayload() *models.Error { @@ -257,11 +262,13 @@ func (o *PcloudSppplacementgroupsMembersPostUnauthorized) Code() int { } func (o *PcloudSppplacementgroupsMembersPostUnauthorized) Error() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/spp-placement-groups/{spp_placement_group_id}/members/{shared_processor_pool_id}][%d] pcloudSppplacementgroupsMembersPostUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/spp-placement-groups/{spp_placement_group_id}/members/{shared_processor_pool_id}][%d] pcloudSppplacementgroupsMembersPostUnauthorized %s", 401, payload) } func (o *PcloudSppplacementgroupsMembersPostUnauthorized) String() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/spp-placement-groups/{spp_placement_group_id}/members/{shared_processor_pool_id}][%d] pcloudSppplacementgroupsMembersPostUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/spp-placement-groups/{spp_placement_group_id}/members/{shared_processor_pool_id}][%d] pcloudSppplacementgroupsMembersPostUnauthorized %s", 401, payload) } func (o *PcloudSppplacementgroupsMembersPostUnauthorized) GetPayload() *models.Error { @@ -325,11 +332,13 @@ func (o *PcloudSppplacementgroupsMembersPostForbidden) Code() int { } func (o *PcloudSppplacementgroupsMembersPostForbidden) Error() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/spp-placement-groups/{spp_placement_group_id}/members/{shared_processor_pool_id}][%d] pcloudSppplacementgroupsMembersPostForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/spp-placement-groups/{spp_placement_group_id}/members/{shared_processor_pool_id}][%d] pcloudSppplacementgroupsMembersPostForbidden %s", 403, payload) } func (o *PcloudSppplacementgroupsMembersPostForbidden) String() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/spp-placement-groups/{spp_placement_group_id}/members/{shared_processor_pool_id}][%d] pcloudSppplacementgroupsMembersPostForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/spp-placement-groups/{spp_placement_group_id}/members/{shared_processor_pool_id}][%d] pcloudSppplacementgroupsMembersPostForbidden %s", 403, payload) } func (o *PcloudSppplacementgroupsMembersPostForbidden) GetPayload() *models.Error { @@ -393,11 +402,13 @@ func (o *PcloudSppplacementgroupsMembersPostNotFound) Code() int { } func (o *PcloudSppplacementgroupsMembersPostNotFound) Error() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/spp-placement-groups/{spp_placement_group_id}/members/{shared_processor_pool_id}][%d] pcloudSppplacementgroupsMembersPostNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/spp-placement-groups/{spp_placement_group_id}/members/{shared_processor_pool_id}][%d] pcloudSppplacementgroupsMembersPostNotFound %s", 404, payload) } func (o *PcloudSppplacementgroupsMembersPostNotFound) String() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/spp-placement-groups/{spp_placement_group_id}/members/{shared_processor_pool_id}][%d] pcloudSppplacementgroupsMembersPostNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/spp-placement-groups/{spp_placement_group_id}/members/{shared_processor_pool_id}][%d] pcloudSppplacementgroupsMembersPostNotFound %s", 404, payload) } func (o *PcloudSppplacementgroupsMembersPostNotFound) GetPayload() *models.Error { @@ -461,11 +472,13 @@ func (o *PcloudSppplacementgroupsMembersPostConflict) Code() int { } func (o *PcloudSppplacementgroupsMembersPostConflict) Error() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/spp-placement-groups/{spp_placement_group_id}/members/{shared_processor_pool_id}][%d] pcloudSppplacementgroupsMembersPostConflict %+v", 409, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/spp-placement-groups/{spp_placement_group_id}/members/{shared_processor_pool_id}][%d] pcloudSppplacementgroupsMembersPostConflict %s", 409, payload) } func (o *PcloudSppplacementgroupsMembersPostConflict) String() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/spp-placement-groups/{spp_placement_group_id}/members/{shared_processor_pool_id}][%d] pcloudSppplacementgroupsMembersPostConflict %+v", 409, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/spp-placement-groups/{spp_placement_group_id}/members/{shared_processor_pool_id}][%d] pcloudSppplacementgroupsMembersPostConflict %s", 409, payload) } func (o *PcloudSppplacementgroupsMembersPostConflict) GetPayload() *models.Error { @@ -529,11 +542,13 @@ func (o *PcloudSppplacementgroupsMembersPostUnprocessableEntity) Code() int { } func (o *PcloudSppplacementgroupsMembersPostUnprocessableEntity) Error() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/spp-placement-groups/{spp_placement_group_id}/members/{shared_processor_pool_id}][%d] pcloudSppplacementgroupsMembersPostUnprocessableEntity %+v", 422, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/spp-placement-groups/{spp_placement_group_id}/members/{shared_processor_pool_id}][%d] pcloudSppplacementgroupsMembersPostUnprocessableEntity %s", 422, payload) } func (o *PcloudSppplacementgroupsMembersPostUnprocessableEntity) String() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/spp-placement-groups/{spp_placement_group_id}/members/{shared_processor_pool_id}][%d] pcloudSppplacementgroupsMembersPostUnprocessableEntity %+v", 422, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/spp-placement-groups/{spp_placement_group_id}/members/{shared_processor_pool_id}][%d] pcloudSppplacementgroupsMembersPostUnprocessableEntity %s", 422, payload) } func (o *PcloudSppplacementgroupsMembersPostUnprocessableEntity) GetPayload() *models.Error { @@ -597,11 +612,13 @@ func (o *PcloudSppplacementgroupsMembersPostInternalServerError) Code() int { } func (o *PcloudSppplacementgroupsMembersPostInternalServerError) Error() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/spp-placement-groups/{spp_placement_group_id}/members/{shared_processor_pool_id}][%d] pcloudSppplacementgroupsMembersPostInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/spp-placement-groups/{spp_placement_group_id}/members/{shared_processor_pool_id}][%d] pcloudSppplacementgroupsMembersPostInternalServerError %s", 500, payload) } func (o *PcloudSppplacementgroupsMembersPostInternalServerError) String() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/spp-placement-groups/{spp_placement_group_id}/members/{shared_processor_pool_id}][%d] pcloudSppplacementgroupsMembersPostInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/spp-placement-groups/{spp_placement_group_id}/members/{shared_processor_pool_id}][%d] pcloudSppplacementgroupsMembersPostInternalServerError %s", 500, payload) } func (o *PcloudSppplacementgroupsMembersPostInternalServerError) GetPayload() *models.Error { diff --git a/power/client/p_cloud_s_p_p_placement_groups/pcloud_sppplacementgroups_post_responses.go b/power/client/p_cloud_s_p_p_placement_groups/pcloud_sppplacementgroups_post_responses.go index d11ee16e..d6344967 100644 --- a/power/client/p_cloud_s_p_p_placement_groups/pcloud_sppplacementgroups_post_responses.go +++ b/power/client/p_cloud_s_p_p_placement_groups/pcloud_sppplacementgroups_post_responses.go @@ -6,6 +6,7 @@ package p_cloud_s_p_p_placement_groups // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -121,11 +122,13 @@ func (o *PcloudSppplacementgroupsPostOK) Code() int { } func (o *PcloudSppplacementgroupsPostOK) Error() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/spp-placement-groups][%d] pcloudSppplacementgroupsPostOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/spp-placement-groups][%d] pcloudSppplacementgroupsPostOK %s", 200, payload) } func (o *PcloudSppplacementgroupsPostOK) String() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/spp-placement-groups][%d] pcloudSppplacementgroupsPostOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/spp-placement-groups][%d] pcloudSppplacementgroupsPostOK %s", 200, payload) } func (o *PcloudSppplacementgroupsPostOK) GetPayload() *models.SPPPlacementGroup { @@ -189,11 +192,13 @@ func (o *PcloudSppplacementgroupsPostBadRequest) Code() int { } func (o *PcloudSppplacementgroupsPostBadRequest) Error() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/spp-placement-groups][%d] pcloudSppplacementgroupsPostBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/spp-placement-groups][%d] pcloudSppplacementgroupsPostBadRequest %s", 400, payload) } func (o *PcloudSppplacementgroupsPostBadRequest) String() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/spp-placement-groups][%d] pcloudSppplacementgroupsPostBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/spp-placement-groups][%d] pcloudSppplacementgroupsPostBadRequest %s", 400, payload) } func (o *PcloudSppplacementgroupsPostBadRequest) GetPayload() *models.Error { @@ -257,11 +262,13 @@ func (o *PcloudSppplacementgroupsPostUnauthorized) Code() int { } func (o *PcloudSppplacementgroupsPostUnauthorized) Error() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/spp-placement-groups][%d] pcloudSppplacementgroupsPostUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/spp-placement-groups][%d] pcloudSppplacementgroupsPostUnauthorized %s", 401, payload) } func (o *PcloudSppplacementgroupsPostUnauthorized) String() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/spp-placement-groups][%d] pcloudSppplacementgroupsPostUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/spp-placement-groups][%d] pcloudSppplacementgroupsPostUnauthorized %s", 401, payload) } func (o *PcloudSppplacementgroupsPostUnauthorized) GetPayload() *models.Error { @@ -325,11 +332,13 @@ func (o *PcloudSppplacementgroupsPostForbidden) Code() int { } func (o *PcloudSppplacementgroupsPostForbidden) Error() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/spp-placement-groups][%d] pcloudSppplacementgroupsPostForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/spp-placement-groups][%d] pcloudSppplacementgroupsPostForbidden %s", 403, payload) } func (o *PcloudSppplacementgroupsPostForbidden) String() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/spp-placement-groups][%d] pcloudSppplacementgroupsPostForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/spp-placement-groups][%d] pcloudSppplacementgroupsPostForbidden %s", 403, payload) } func (o *PcloudSppplacementgroupsPostForbidden) GetPayload() *models.Error { @@ -393,11 +402,13 @@ func (o *PcloudSppplacementgroupsPostNotFound) Code() int { } func (o *PcloudSppplacementgroupsPostNotFound) Error() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/spp-placement-groups][%d] pcloudSppplacementgroupsPostNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/spp-placement-groups][%d] pcloudSppplacementgroupsPostNotFound %s", 404, payload) } func (o *PcloudSppplacementgroupsPostNotFound) String() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/spp-placement-groups][%d] pcloudSppplacementgroupsPostNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/spp-placement-groups][%d] pcloudSppplacementgroupsPostNotFound %s", 404, payload) } func (o *PcloudSppplacementgroupsPostNotFound) GetPayload() *models.Error { @@ -461,11 +472,13 @@ func (o *PcloudSppplacementgroupsPostConflict) Code() int { } func (o *PcloudSppplacementgroupsPostConflict) Error() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/spp-placement-groups][%d] pcloudSppplacementgroupsPostConflict %+v", 409, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/spp-placement-groups][%d] pcloudSppplacementgroupsPostConflict %s", 409, payload) } func (o *PcloudSppplacementgroupsPostConflict) String() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/spp-placement-groups][%d] pcloudSppplacementgroupsPostConflict %+v", 409, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/spp-placement-groups][%d] pcloudSppplacementgroupsPostConflict %s", 409, payload) } func (o *PcloudSppplacementgroupsPostConflict) GetPayload() *models.Error { @@ -529,11 +542,13 @@ func (o *PcloudSppplacementgroupsPostUnprocessableEntity) Code() int { } func (o *PcloudSppplacementgroupsPostUnprocessableEntity) Error() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/spp-placement-groups][%d] pcloudSppplacementgroupsPostUnprocessableEntity %+v", 422, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/spp-placement-groups][%d] pcloudSppplacementgroupsPostUnprocessableEntity %s", 422, payload) } func (o *PcloudSppplacementgroupsPostUnprocessableEntity) String() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/spp-placement-groups][%d] pcloudSppplacementgroupsPostUnprocessableEntity %+v", 422, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/spp-placement-groups][%d] pcloudSppplacementgroupsPostUnprocessableEntity %s", 422, payload) } func (o *PcloudSppplacementgroupsPostUnprocessableEntity) GetPayload() *models.Error { @@ -597,11 +612,13 @@ func (o *PcloudSppplacementgroupsPostInternalServerError) Code() int { } func (o *PcloudSppplacementgroupsPostInternalServerError) Error() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/spp-placement-groups][%d] pcloudSppplacementgroupsPostInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/spp-placement-groups][%d] pcloudSppplacementgroupsPostInternalServerError %s", 500, payload) } func (o *PcloudSppplacementgroupsPostInternalServerError) String() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/spp-placement-groups][%d] pcloudSppplacementgroupsPostInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/spp-placement-groups][%d] pcloudSppplacementgroupsPostInternalServerError %s", 500, payload) } func (o *PcloudSppplacementgroupsPostInternalServerError) GetPayload() *models.Error { diff --git a/power/client/p_cloud_service_d_h_c_p/p_cloud_servicedhcp_client.go b/power/client/p_cloud_service_d_h_c_p/p_cloud_servicedhcp_client.go index 4c13670f..7200abcd 100644 --- a/power/client/p_cloud_service_d_h_c_p/p_cloud_servicedhcp_client.go +++ b/power/client/p_cloud_service_d_h_c_p/p_cloud_servicedhcp_client.go @@ -9,6 +9,7 @@ import ( "fmt" "github.com/go-openapi/runtime" + httptransport "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" ) @@ -17,6 +18,31 @@ func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientServi return &Client{transport: transport, formats: formats} } +// New creates a new p cloud service d h c p API client with basic auth credentials. +// It takes the following parameters: +// - host: http host (github.com). +// - basePath: any base path for the API client ("/v1", "/v3"). +// - scheme: http scheme ("http", "https"). +// - user: user for basic authentication header. +// - password: password for basic authentication header. +func NewClientWithBasicAuth(host, basePath, scheme, user, password string) ClientService { + transport := httptransport.New(host, basePath, []string{scheme}) + transport.DefaultAuthentication = httptransport.BasicAuth(user, password) + return &Client{transport: transport, formats: strfmt.Default} +} + +// New creates a new p cloud service d h c p API client with a bearer token for authentication. +// It takes the following parameters: +// - host: http host (github.com). +// - basePath: any base path for the API client ("/v1", "/v3"). +// - scheme: http scheme ("http", "https"). +// - bearerToken: bearer token for Bearer authentication header. +func NewClientWithBearerToken(host, basePath, scheme, bearerToken string) ClientService { + transport := httptransport.New(host, basePath, []string{scheme}) + transport.DefaultAuthentication = httptransport.BearerToken(bearerToken) + return &Client{transport: transport, formats: strfmt.Default} +} + /* Client for p cloud service d h c p API */ @@ -25,7 +51,7 @@ type Client struct { formats strfmt.Registry } -// ClientOption is the option for Client methods +// ClientOption may be used to customize the behavior of Client methods. type ClientOption func(*runtime.ClientOperation) // ClientService is the interface for Client methods diff --git a/power/client/p_cloud_service_d_h_c_p/pcloud_dhcp_delete_responses.go b/power/client/p_cloud_service_d_h_c_p/pcloud_dhcp_delete_responses.go index d76cbd09..f23ea986 100644 --- a/power/client/p_cloud_service_d_h_c_p/pcloud_dhcp_delete_responses.go +++ b/power/client/p_cloud_service_d_h_c_p/pcloud_dhcp_delete_responses.go @@ -6,6 +6,7 @@ package p_cloud_service_d_h_c_p // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -103,11 +104,13 @@ func (o *PcloudDhcpDeleteAccepted) Code() int { } func (o *PcloudDhcpDeleteAccepted) Error() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/services/dhcp/{dhcp_id}][%d] pcloudDhcpDeleteAccepted %+v", 202, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/services/dhcp/{dhcp_id}][%d] pcloudDhcpDeleteAccepted %s", 202, payload) } func (o *PcloudDhcpDeleteAccepted) String() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/services/dhcp/{dhcp_id}][%d] pcloudDhcpDeleteAccepted %+v", 202, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/services/dhcp/{dhcp_id}][%d] pcloudDhcpDeleteAccepted %s", 202, payload) } func (o *PcloudDhcpDeleteAccepted) GetPayload() models.Object { @@ -169,11 +172,13 @@ func (o *PcloudDhcpDeleteBadRequest) Code() int { } func (o *PcloudDhcpDeleteBadRequest) Error() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/services/dhcp/{dhcp_id}][%d] pcloudDhcpDeleteBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/services/dhcp/{dhcp_id}][%d] pcloudDhcpDeleteBadRequest %s", 400, payload) } func (o *PcloudDhcpDeleteBadRequest) String() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/services/dhcp/{dhcp_id}][%d] pcloudDhcpDeleteBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/services/dhcp/{dhcp_id}][%d] pcloudDhcpDeleteBadRequest %s", 400, payload) } func (o *PcloudDhcpDeleteBadRequest) GetPayload() *models.Error { @@ -237,11 +242,13 @@ func (o *PcloudDhcpDeleteForbidden) Code() int { } func (o *PcloudDhcpDeleteForbidden) Error() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/services/dhcp/{dhcp_id}][%d] pcloudDhcpDeleteForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/services/dhcp/{dhcp_id}][%d] pcloudDhcpDeleteForbidden %s", 403, payload) } func (o *PcloudDhcpDeleteForbidden) String() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/services/dhcp/{dhcp_id}][%d] pcloudDhcpDeleteForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/services/dhcp/{dhcp_id}][%d] pcloudDhcpDeleteForbidden %s", 403, payload) } func (o *PcloudDhcpDeleteForbidden) GetPayload() *models.Error { @@ -305,11 +312,13 @@ func (o *PcloudDhcpDeleteNotFound) Code() int { } func (o *PcloudDhcpDeleteNotFound) Error() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/services/dhcp/{dhcp_id}][%d] pcloudDhcpDeleteNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/services/dhcp/{dhcp_id}][%d] pcloudDhcpDeleteNotFound %s", 404, payload) } func (o *PcloudDhcpDeleteNotFound) String() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/services/dhcp/{dhcp_id}][%d] pcloudDhcpDeleteNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/services/dhcp/{dhcp_id}][%d] pcloudDhcpDeleteNotFound %s", 404, payload) } func (o *PcloudDhcpDeleteNotFound) GetPayload() *models.Error { @@ -373,11 +382,13 @@ func (o *PcloudDhcpDeleteInternalServerError) Code() int { } func (o *PcloudDhcpDeleteInternalServerError) Error() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/services/dhcp/{dhcp_id}][%d] pcloudDhcpDeleteInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/services/dhcp/{dhcp_id}][%d] pcloudDhcpDeleteInternalServerError %s", 500, payload) } func (o *PcloudDhcpDeleteInternalServerError) String() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/services/dhcp/{dhcp_id}][%d] pcloudDhcpDeleteInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/services/dhcp/{dhcp_id}][%d] pcloudDhcpDeleteInternalServerError %s", 500, payload) } func (o *PcloudDhcpDeleteInternalServerError) GetPayload() *models.Error { diff --git a/power/client/p_cloud_service_d_h_c_p/pcloud_dhcp_get_responses.go b/power/client/p_cloud_service_d_h_c_p/pcloud_dhcp_get_responses.go index b8847e08..858df91a 100644 --- a/power/client/p_cloud_service_d_h_c_p/pcloud_dhcp_get_responses.go +++ b/power/client/p_cloud_service_d_h_c_p/pcloud_dhcp_get_responses.go @@ -6,6 +6,7 @@ package p_cloud_service_d_h_c_p // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -109,11 +110,13 @@ func (o *PcloudDhcpGetOK) Code() int { } func (o *PcloudDhcpGetOK) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/services/dhcp/{dhcp_id}][%d] pcloudDhcpGetOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/services/dhcp/{dhcp_id}][%d] pcloudDhcpGetOK %s", 200, payload) } func (o *PcloudDhcpGetOK) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/services/dhcp/{dhcp_id}][%d] pcloudDhcpGetOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/services/dhcp/{dhcp_id}][%d] pcloudDhcpGetOK %s", 200, payload) } func (o *PcloudDhcpGetOK) GetPayload() *models.DHCPServerDetail { @@ -177,11 +180,13 @@ func (o *PcloudDhcpGetBadRequest) Code() int { } func (o *PcloudDhcpGetBadRequest) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/services/dhcp/{dhcp_id}][%d] pcloudDhcpGetBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/services/dhcp/{dhcp_id}][%d] pcloudDhcpGetBadRequest %s", 400, payload) } func (o *PcloudDhcpGetBadRequest) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/services/dhcp/{dhcp_id}][%d] pcloudDhcpGetBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/services/dhcp/{dhcp_id}][%d] pcloudDhcpGetBadRequest %s", 400, payload) } func (o *PcloudDhcpGetBadRequest) GetPayload() *models.Error { @@ -245,11 +250,13 @@ func (o *PcloudDhcpGetUnauthorized) Code() int { } func (o *PcloudDhcpGetUnauthorized) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/services/dhcp/{dhcp_id}][%d] pcloudDhcpGetUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/services/dhcp/{dhcp_id}][%d] pcloudDhcpGetUnauthorized %s", 401, payload) } func (o *PcloudDhcpGetUnauthorized) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/services/dhcp/{dhcp_id}][%d] pcloudDhcpGetUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/services/dhcp/{dhcp_id}][%d] pcloudDhcpGetUnauthorized %s", 401, payload) } func (o *PcloudDhcpGetUnauthorized) GetPayload() *models.Error { @@ -313,11 +320,13 @@ func (o *PcloudDhcpGetForbidden) Code() int { } func (o *PcloudDhcpGetForbidden) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/services/dhcp/{dhcp_id}][%d] pcloudDhcpGetForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/services/dhcp/{dhcp_id}][%d] pcloudDhcpGetForbidden %s", 403, payload) } func (o *PcloudDhcpGetForbidden) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/services/dhcp/{dhcp_id}][%d] pcloudDhcpGetForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/services/dhcp/{dhcp_id}][%d] pcloudDhcpGetForbidden %s", 403, payload) } func (o *PcloudDhcpGetForbidden) GetPayload() *models.Error { @@ -381,11 +390,13 @@ func (o *PcloudDhcpGetNotFound) Code() int { } func (o *PcloudDhcpGetNotFound) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/services/dhcp/{dhcp_id}][%d] pcloudDhcpGetNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/services/dhcp/{dhcp_id}][%d] pcloudDhcpGetNotFound %s", 404, payload) } func (o *PcloudDhcpGetNotFound) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/services/dhcp/{dhcp_id}][%d] pcloudDhcpGetNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/services/dhcp/{dhcp_id}][%d] pcloudDhcpGetNotFound %s", 404, payload) } func (o *PcloudDhcpGetNotFound) GetPayload() *models.Error { @@ -449,11 +460,13 @@ func (o *PcloudDhcpGetInternalServerError) Code() int { } func (o *PcloudDhcpGetInternalServerError) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/services/dhcp/{dhcp_id}][%d] pcloudDhcpGetInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/services/dhcp/{dhcp_id}][%d] pcloudDhcpGetInternalServerError %s", 500, payload) } func (o *PcloudDhcpGetInternalServerError) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/services/dhcp/{dhcp_id}][%d] pcloudDhcpGetInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/services/dhcp/{dhcp_id}][%d] pcloudDhcpGetInternalServerError %s", 500, payload) } func (o *PcloudDhcpGetInternalServerError) GetPayload() *models.Error { diff --git a/power/client/p_cloud_service_d_h_c_p/pcloud_dhcp_getall_responses.go b/power/client/p_cloud_service_d_h_c_p/pcloud_dhcp_getall_responses.go index f90457a4..2354a68e 100644 --- a/power/client/p_cloud_service_d_h_c_p/pcloud_dhcp_getall_responses.go +++ b/power/client/p_cloud_service_d_h_c_p/pcloud_dhcp_getall_responses.go @@ -6,6 +6,7 @@ package p_cloud_service_d_h_c_p // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -109,11 +110,13 @@ func (o *PcloudDhcpGetallOK) Code() int { } func (o *PcloudDhcpGetallOK) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/services/dhcp][%d] pcloudDhcpGetallOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/services/dhcp][%d] pcloudDhcpGetallOK %s", 200, payload) } func (o *PcloudDhcpGetallOK) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/services/dhcp][%d] pcloudDhcpGetallOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/services/dhcp][%d] pcloudDhcpGetallOK %s", 200, payload) } func (o *PcloudDhcpGetallOK) GetPayload() models.DHCPServers { @@ -175,11 +178,13 @@ func (o *PcloudDhcpGetallBadRequest) Code() int { } func (o *PcloudDhcpGetallBadRequest) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/services/dhcp][%d] pcloudDhcpGetallBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/services/dhcp][%d] pcloudDhcpGetallBadRequest %s", 400, payload) } func (o *PcloudDhcpGetallBadRequest) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/services/dhcp][%d] pcloudDhcpGetallBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/services/dhcp][%d] pcloudDhcpGetallBadRequest %s", 400, payload) } func (o *PcloudDhcpGetallBadRequest) GetPayload() *models.Error { @@ -243,11 +248,13 @@ func (o *PcloudDhcpGetallUnauthorized) Code() int { } func (o *PcloudDhcpGetallUnauthorized) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/services/dhcp][%d] pcloudDhcpGetallUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/services/dhcp][%d] pcloudDhcpGetallUnauthorized %s", 401, payload) } func (o *PcloudDhcpGetallUnauthorized) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/services/dhcp][%d] pcloudDhcpGetallUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/services/dhcp][%d] pcloudDhcpGetallUnauthorized %s", 401, payload) } func (o *PcloudDhcpGetallUnauthorized) GetPayload() *models.Error { @@ -311,11 +318,13 @@ func (o *PcloudDhcpGetallForbidden) Code() int { } func (o *PcloudDhcpGetallForbidden) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/services/dhcp][%d] pcloudDhcpGetallForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/services/dhcp][%d] pcloudDhcpGetallForbidden %s", 403, payload) } func (o *PcloudDhcpGetallForbidden) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/services/dhcp][%d] pcloudDhcpGetallForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/services/dhcp][%d] pcloudDhcpGetallForbidden %s", 403, payload) } func (o *PcloudDhcpGetallForbidden) GetPayload() *models.Error { @@ -379,11 +388,13 @@ func (o *PcloudDhcpGetallNotFound) Code() int { } func (o *PcloudDhcpGetallNotFound) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/services/dhcp][%d] pcloudDhcpGetallNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/services/dhcp][%d] pcloudDhcpGetallNotFound %s", 404, payload) } func (o *PcloudDhcpGetallNotFound) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/services/dhcp][%d] pcloudDhcpGetallNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/services/dhcp][%d] pcloudDhcpGetallNotFound %s", 404, payload) } func (o *PcloudDhcpGetallNotFound) GetPayload() *models.Error { @@ -447,11 +458,13 @@ func (o *PcloudDhcpGetallInternalServerError) Code() int { } func (o *PcloudDhcpGetallInternalServerError) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/services/dhcp][%d] pcloudDhcpGetallInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/services/dhcp][%d] pcloudDhcpGetallInternalServerError %s", 500, payload) } func (o *PcloudDhcpGetallInternalServerError) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/services/dhcp][%d] pcloudDhcpGetallInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/services/dhcp][%d] pcloudDhcpGetallInternalServerError %s", 500, payload) } func (o *PcloudDhcpGetallInternalServerError) GetPayload() *models.Error { diff --git a/power/client/p_cloud_service_d_h_c_p/pcloud_dhcp_post_responses.go b/power/client/p_cloud_service_d_h_c_p/pcloud_dhcp_post_responses.go index 2578e70c..6c2181e7 100644 --- a/power/client/p_cloud_service_d_h_c_p/pcloud_dhcp_post_responses.go +++ b/power/client/p_cloud_service_d_h_c_p/pcloud_dhcp_post_responses.go @@ -6,6 +6,7 @@ package p_cloud_service_d_h_c_p // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -109,11 +110,13 @@ func (o *PcloudDhcpPostAccepted) Code() int { } func (o *PcloudDhcpPostAccepted) Error() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/services/dhcp][%d] pcloudDhcpPostAccepted %+v", 202, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/services/dhcp][%d] pcloudDhcpPostAccepted %s", 202, payload) } func (o *PcloudDhcpPostAccepted) String() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/services/dhcp][%d] pcloudDhcpPostAccepted %+v", 202, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/services/dhcp][%d] pcloudDhcpPostAccepted %s", 202, payload) } func (o *PcloudDhcpPostAccepted) GetPayload() *models.DHCPServer { @@ -177,11 +180,13 @@ func (o *PcloudDhcpPostBadRequest) Code() int { } func (o *PcloudDhcpPostBadRequest) Error() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/services/dhcp][%d] pcloudDhcpPostBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/services/dhcp][%d] pcloudDhcpPostBadRequest %s", 400, payload) } func (o *PcloudDhcpPostBadRequest) String() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/services/dhcp][%d] pcloudDhcpPostBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/services/dhcp][%d] pcloudDhcpPostBadRequest %s", 400, payload) } func (o *PcloudDhcpPostBadRequest) GetPayload() *models.Error { @@ -245,11 +250,13 @@ func (o *PcloudDhcpPostUnauthorized) Code() int { } func (o *PcloudDhcpPostUnauthorized) Error() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/services/dhcp][%d] pcloudDhcpPostUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/services/dhcp][%d] pcloudDhcpPostUnauthorized %s", 401, payload) } func (o *PcloudDhcpPostUnauthorized) String() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/services/dhcp][%d] pcloudDhcpPostUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/services/dhcp][%d] pcloudDhcpPostUnauthorized %s", 401, payload) } func (o *PcloudDhcpPostUnauthorized) GetPayload() *models.Error { @@ -313,11 +320,13 @@ func (o *PcloudDhcpPostForbidden) Code() int { } func (o *PcloudDhcpPostForbidden) Error() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/services/dhcp][%d] pcloudDhcpPostForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/services/dhcp][%d] pcloudDhcpPostForbidden %s", 403, payload) } func (o *PcloudDhcpPostForbidden) String() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/services/dhcp][%d] pcloudDhcpPostForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/services/dhcp][%d] pcloudDhcpPostForbidden %s", 403, payload) } func (o *PcloudDhcpPostForbidden) GetPayload() *models.Error { @@ -381,11 +390,13 @@ func (o *PcloudDhcpPostNotFound) Code() int { } func (o *PcloudDhcpPostNotFound) Error() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/services/dhcp][%d] pcloudDhcpPostNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/services/dhcp][%d] pcloudDhcpPostNotFound %s", 404, payload) } func (o *PcloudDhcpPostNotFound) String() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/services/dhcp][%d] pcloudDhcpPostNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/services/dhcp][%d] pcloudDhcpPostNotFound %s", 404, payload) } func (o *PcloudDhcpPostNotFound) GetPayload() *models.Error { @@ -449,11 +460,13 @@ func (o *PcloudDhcpPostInternalServerError) Code() int { } func (o *PcloudDhcpPostInternalServerError) Error() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/services/dhcp][%d] pcloudDhcpPostInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/services/dhcp][%d] pcloudDhcpPostInternalServerError %s", 500, payload) } func (o *PcloudDhcpPostInternalServerError) String() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/services/dhcp][%d] pcloudDhcpPostInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/services/dhcp][%d] pcloudDhcpPostInternalServerError %s", 500, payload) } func (o *PcloudDhcpPostInternalServerError) GetPayload() *models.Error { diff --git a/power/client/p_cloud_shared_processor_pools/p_cloud_shared_processor_pools_client.go b/power/client/p_cloud_shared_processor_pools/p_cloud_shared_processor_pools_client.go index 7c4e27a7..6e60de90 100644 --- a/power/client/p_cloud_shared_processor_pools/p_cloud_shared_processor_pools_client.go +++ b/power/client/p_cloud_shared_processor_pools/p_cloud_shared_processor_pools_client.go @@ -9,6 +9,7 @@ import ( "fmt" "github.com/go-openapi/runtime" + httptransport "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" ) @@ -17,6 +18,31 @@ func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientServi return &Client{transport: transport, formats: formats} } +// New creates a new p cloud shared processor pools API client with basic auth credentials. +// It takes the following parameters: +// - host: http host (github.com). +// - basePath: any base path for the API client ("/v1", "/v3"). +// - scheme: http scheme ("http", "https"). +// - user: user for basic authentication header. +// - password: password for basic authentication header. +func NewClientWithBasicAuth(host, basePath, scheme, user, password string) ClientService { + transport := httptransport.New(host, basePath, []string{scheme}) + transport.DefaultAuthentication = httptransport.BasicAuth(user, password) + return &Client{transport: transport, formats: strfmt.Default} +} + +// New creates a new p cloud shared processor pools API client with a bearer token for authentication. +// It takes the following parameters: +// - host: http host (github.com). +// - basePath: any base path for the API client ("/v1", "/v3"). +// - scheme: http scheme ("http", "https"). +// - bearerToken: bearer token for Bearer authentication header. +func NewClientWithBearerToken(host, basePath, scheme, bearerToken string) ClientService { + transport := httptransport.New(host, basePath, []string{scheme}) + transport.DefaultAuthentication = httptransport.BearerToken(bearerToken) + return &Client{transport: transport, formats: strfmt.Default} +} + /* Client for p cloud shared processor pools API */ @@ -25,7 +51,7 @@ type Client struct { formats strfmt.Registry } -// ClientOption is the option for Client methods +// ClientOption may be used to customize the behavior of Client methods. type ClientOption func(*runtime.ClientOperation) // ClientService is the interface for Client methods diff --git a/power/client/p_cloud_shared_processor_pools/pcloud_sharedprocessorpools_delete_responses.go b/power/client/p_cloud_shared_processor_pools/pcloud_sharedprocessorpools_delete_responses.go index 9ba1ffa5..376e3f8d 100644 --- a/power/client/p_cloud_shared_processor_pools/pcloud_sharedprocessorpools_delete_responses.go +++ b/power/client/p_cloud_shared_processor_pools/pcloud_sharedprocessorpools_delete_responses.go @@ -6,6 +6,7 @@ package p_cloud_shared_processor_pools // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -115,11 +116,13 @@ func (o *PcloudSharedprocessorpoolsDeleteOK) Code() int { } func (o *PcloudSharedprocessorpoolsDeleteOK) Error() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/shared-processor-pools/{shared_processor_pool_id}][%d] pcloudSharedprocessorpoolsDeleteOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/shared-processor-pools/{shared_processor_pool_id}][%d] pcloudSharedprocessorpoolsDeleteOK %s", 200, payload) } func (o *PcloudSharedprocessorpoolsDeleteOK) String() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/shared-processor-pools/{shared_processor_pool_id}][%d] pcloudSharedprocessorpoolsDeleteOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/shared-processor-pools/{shared_processor_pool_id}][%d] pcloudSharedprocessorpoolsDeleteOK %s", 200, payload) } func (o *PcloudSharedprocessorpoolsDeleteOK) GetPayload() models.Object { @@ -181,11 +184,13 @@ func (o *PcloudSharedprocessorpoolsDeleteBadRequest) Code() int { } func (o *PcloudSharedprocessorpoolsDeleteBadRequest) Error() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/shared-processor-pools/{shared_processor_pool_id}][%d] pcloudSharedprocessorpoolsDeleteBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/shared-processor-pools/{shared_processor_pool_id}][%d] pcloudSharedprocessorpoolsDeleteBadRequest %s", 400, payload) } func (o *PcloudSharedprocessorpoolsDeleteBadRequest) String() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/shared-processor-pools/{shared_processor_pool_id}][%d] pcloudSharedprocessorpoolsDeleteBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/shared-processor-pools/{shared_processor_pool_id}][%d] pcloudSharedprocessorpoolsDeleteBadRequest %s", 400, payload) } func (o *PcloudSharedprocessorpoolsDeleteBadRequest) GetPayload() *models.Error { @@ -249,11 +254,13 @@ func (o *PcloudSharedprocessorpoolsDeleteUnauthorized) Code() int { } func (o *PcloudSharedprocessorpoolsDeleteUnauthorized) Error() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/shared-processor-pools/{shared_processor_pool_id}][%d] pcloudSharedprocessorpoolsDeleteUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/shared-processor-pools/{shared_processor_pool_id}][%d] pcloudSharedprocessorpoolsDeleteUnauthorized %s", 401, payload) } func (o *PcloudSharedprocessorpoolsDeleteUnauthorized) String() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/shared-processor-pools/{shared_processor_pool_id}][%d] pcloudSharedprocessorpoolsDeleteUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/shared-processor-pools/{shared_processor_pool_id}][%d] pcloudSharedprocessorpoolsDeleteUnauthorized %s", 401, payload) } func (o *PcloudSharedprocessorpoolsDeleteUnauthorized) GetPayload() *models.Error { @@ -317,11 +324,13 @@ func (o *PcloudSharedprocessorpoolsDeleteForbidden) Code() int { } func (o *PcloudSharedprocessorpoolsDeleteForbidden) Error() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/shared-processor-pools/{shared_processor_pool_id}][%d] pcloudSharedprocessorpoolsDeleteForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/shared-processor-pools/{shared_processor_pool_id}][%d] pcloudSharedprocessorpoolsDeleteForbidden %s", 403, payload) } func (o *PcloudSharedprocessorpoolsDeleteForbidden) String() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/shared-processor-pools/{shared_processor_pool_id}][%d] pcloudSharedprocessorpoolsDeleteForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/shared-processor-pools/{shared_processor_pool_id}][%d] pcloudSharedprocessorpoolsDeleteForbidden %s", 403, payload) } func (o *PcloudSharedprocessorpoolsDeleteForbidden) GetPayload() *models.Error { @@ -385,11 +394,13 @@ func (o *PcloudSharedprocessorpoolsDeleteNotFound) Code() int { } func (o *PcloudSharedprocessorpoolsDeleteNotFound) Error() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/shared-processor-pools/{shared_processor_pool_id}][%d] pcloudSharedprocessorpoolsDeleteNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/shared-processor-pools/{shared_processor_pool_id}][%d] pcloudSharedprocessorpoolsDeleteNotFound %s", 404, payload) } func (o *PcloudSharedprocessorpoolsDeleteNotFound) String() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/shared-processor-pools/{shared_processor_pool_id}][%d] pcloudSharedprocessorpoolsDeleteNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/shared-processor-pools/{shared_processor_pool_id}][%d] pcloudSharedprocessorpoolsDeleteNotFound %s", 404, payload) } func (o *PcloudSharedprocessorpoolsDeleteNotFound) GetPayload() *models.Error { @@ -453,11 +464,13 @@ func (o *PcloudSharedprocessorpoolsDeleteConflict) Code() int { } func (o *PcloudSharedprocessorpoolsDeleteConflict) Error() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/shared-processor-pools/{shared_processor_pool_id}][%d] pcloudSharedprocessorpoolsDeleteConflict %+v", 409, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/shared-processor-pools/{shared_processor_pool_id}][%d] pcloudSharedprocessorpoolsDeleteConflict %s", 409, payload) } func (o *PcloudSharedprocessorpoolsDeleteConflict) String() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/shared-processor-pools/{shared_processor_pool_id}][%d] pcloudSharedprocessorpoolsDeleteConflict %+v", 409, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/shared-processor-pools/{shared_processor_pool_id}][%d] pcloudSharedprocessorpoolsDeleteConflict %s", 409, payload) } func (o *PcloudSharedprocessorpoolsDeleteConflict) GetPayload() *models.Error { @@ -521,11 +534,13 @@ func (o *PcloudSharedprocessorpoolsDeleteInternalServerError) Code() int { } func (o *PcloudSharedprocessorpoolsDeleteInternalServerError) Error() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/shared-processor-pools/{shared_processor_pool_id}][%d] pcloudSharedprocessorpoolsDeleteInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/shared-processor-pools/{shared_processor_pool_id}][%d] pcloudSharedprocessorpoolsDeleteInternalServerError %s", 500, payload) } func (o *PcloudSharedprocessorpoolsDeleteInternalServerError) String() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/shared-processor-pools/{shared_processor_pool_id}][%d] pcloudSharedprocessorpoolsDeleteInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/shared-processor-pools/{shared_processor_pool_id}][%d] pcloudSharedprocessorpoolsDeleteInternalServerError %s", 500, payload) } func (o *PcloudSharedprocessorpoolsDeleteInternalServerError) GetPayload() *models.Error { diff --git a/power/client/p_cloud_shared_processor_pools/pcloud_sharedprocessorpools_get_responses.go b/power/client/p_cloud_shared_processor_pools/pcloud_sharedprocessorpools_get_responses.go index 52cdaca5..9e650341 100644 --- a/power/client/p_cloud_shared_processor_pools/pcloud_sharedprocessorpools_get_responses.go +++ b/power/client/p_cloud_shared_processor_pools/pcloud_sharedprocessorpools_get_responses.go @@ -6,6 +6,7 @@ package p_cloud_shared_processor_pools // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -109,11 +110,13 @@ func (o *PcloudSharedprocessorpoolsGetOK) Code() int { } func (o *PcloudSharedprocessorpoolsGetOK) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/shared-processor-pools/{shared_processor_pool_id}][%d] pcloudSharedprocessorpoolsGetOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/shared-processor-pools/{shared_processor_pool_id}][%d] pcloudSharedprocessorpoolsGetOK %s", 200, payload) } func (o *PcloudSharedprocessorpoolsGetOK) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/shared-processor-pools/{shared_processor_pool_id}][%d] pcloudSharedprocessorpoolsGetOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/shared-processor-pools/{shared_processor_pool_id}][%d] pcloudSharedprocessorpoolsGetOK %s", 200, payload) } func (o *PcloudSharedprocessorpoolsGetOK) GetPayload() *models.SharedProcessorPoolDetail { @@ -177,11 +180,13 @@ func (o *PcloudSharedprocessorpoolsGetBadRequest) Code() int { } func (o *PcloudSharedprocessorpoolsGetBadRequest) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/shared-processor-pools/{shared_processor_pool_id}][%d] pcloudSharedprocessorpoolsGetBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/shared-processor-pools/{shared_processor_pool_id}][%d] pcloudSharedprocessorpoolsGetBadRequest %s", 400, payload) } func (o *PcloudSharedprocessorpoolsGetBadRequest) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/shared-processor-pools/{shared_processor_pool_id}][%d] pcloudSharedprocessorpoolsGetBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/shared-processor-pools/{shared_processor_pool_id}][%d] pcloudSharedprocessorpoolsGetBadRequest %s", 400, payload) } func (o *PcloudSharedprocessorpoolsGetBadRequest) GetPayload() *models.Error { @@ -245,11 +250,13 @@ func (o *PcloudSharedprocessorpoolsGetUnauthorized) Code() int { } func (o *PcloudSharedprocessorpoolsGetUnauthorized) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/shared-processor-pools/{shared_processor_pool_id}][%d] pcloudSharedprocessorpoolsGetUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/shared-processor-pools/{shared_processor_pool_id}][%d] pcloudSharedprocessorpoolsGetUnauthorized %s", 401, payload) } func (o *PcloudSharedprocessorpoolsGetUnauthorized) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/shared-processor-pools/{shared_processor_pool_id}][%d] pcloudSharedprocessorpoolsGetUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/shared-processor-pools/{shared_processor_pool_id}][%d] pcloudSharedprocessorpoolsGetUnauthorized %s", 401, payload) } func (o *PcloudSharedprocessorpoolsGetUnauthorized) GetPayload() *models.Error { @@ -313,11 +320,13 @@ func (o *PcloudSharedprocessorpoolsGetForbidden) Code() int { } func (o *PcloudSharedprocessorpoolsGetForbidden) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/shared-processor-pools/{shared_processor_pool_id}][%d] pcloudSharedprocessorpoolsGetForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/shared-processor-pools/{shared_processor_pool_id}][%d] pcloudSharedprocessorpoolsGetForbidden %s", 403, payload) } func (o *PcloudSharedprocessorpoolsGetForbidden) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/shared-processor-pools/{shared_processor_pool_id}][%d] pcloudSharedprocessorpoolsGetForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/shared-processor-pools/{shared_processor_pool_id}][%d] pcloudSharedprocessorpoolsGetForbidden %s", 403, payload) } func (o *PcloudSharedprocessorpoolsGetForbidden) GetPayload() *models.Error { @@ -381,11 +390,13 @@ func (o *PcloudSharedprocessorpoolsGetNotFound) Code() int { } func (o *PcloudSharedprocessorpoolsGetNotFound) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/shared-processor-pools/{shared_processor_pool_id}][%d] pcloudSharedprocessorpoolsGetNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/shared-processor-pools/{shared_processor_pool_id}][%d] pcloudSharedprocessorpoolsGetNotFound %s", 404, payload) } func (o *PcloudSharedprocessorpoolsGetNotFound) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/shared-processor-pools/{shared_processor_pool_id}][%d] pcloudSharedprocessorpoolsGetNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/shared-processor-pools/{shared_processor_pool_id}][%d] pcloudSharedprocessorpoolsGetNotFound %s", 404, payload) } func (o *PcloudSharedprocessorpoolsGetNotFound) GetPayload() *models.Error { @@ -449,11 +460,13 @@ func (o *PcloudSharedprocessorpoolsGetInternalServerError) Code() int { } func (o *PcloudSharedprocessorpoolsGetInternalServerError) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/shared-processor-pools/{shared_processor_pool_id}][%d] pcloudSharedprocessorpoolsGetInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/shared-processor-pools/{shared_processor_pool_id}][%d] pcloudSharedprocessorpoolsGetInternalServerError %s", 500, payload) } func (o *PcloudSharedprocessorpoolsGetInternalServerError) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/shared-processor-pools/{shared_processor_pool_id}][%d] pcloudSharedprocessorpoolsGetInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/shared-processor-pools/{shared_processor_pool_id}][%d] pcloudSharedprocessorpoolsGetInternalServerError %s", 500, payload) } func (o *PcloudSharedprocessorpoolsGetInternalServerError) GetPayload() *models.Error { diff --git a/power/client/p_cloud_shared_processor_pools/pcloud_sharedprocessorpools_getall_responses.go b/power/client/p_cloud_shared_processor_pools/pcloud_sharedprocessorpools_getall_responses.go index 6e6fb6c7..7d940969 100644 --- a/power/client/p_cloud_shared_processor_pools/pcloud_sharedprocessorpools_getall_responses.go +++ b/power/client/p_cloud_shared_processor_pools/pcloud_sharedprocessorpools_getall_responses.go @@ -6,6 +6,7 @@ package p_cloud_shared_processor_pools // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -109,11 +110,13 @@ func (o *PcloudSharedprocessorpoolsGetallOK) Code() int { } func (o *PcloudSharedprocessorpoolsGetallOK) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/shared-processor-pools][%d] pcloudSharedprocessorpoolsGetallOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/shared-processor-pools][%d] pcloudSharedprocessorpoolsGetallOK %s", 200, payload) } func (o *PcloudSharedprocessorpoolsGetallOK) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/shared-processor-pools][%d] pcloudSharedprocessorpoolsGetallOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/shared-processor-pools][%d] pcloudSharedprocessorpoolsGetallOK %s", 200, payload) } func (o *PcloudSharedprocessorpoolsGetallOK) GetPayload() *models.SharedProcessorPools { @@ -177,11 +180,13 @@ func (o *PcloudSharedprocessorpoolsGetallBadRequest) Code() int { } func (o *PcloudSharedprocessorpoolsGetallBadRequest) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/shared-processor-pools][%d] pcloudSharedprocessorpoolsGetallBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/shared-processor-pools][%d] pcloudSharedprocessorpoolsGetallBadRequest %s", 400, payload) } func (o *PcloudSharedprocessorpoolsGetallBadRequest) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/shared-processor-pools][%d] pcloudSharedprocessorpoolsGetallBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/shared-processor-pools][%d] pcloudSharedprocessorpoolsGetallBadRequest %s", 400, payload) } func (o *PcloudSharedprocessorpoolsGetallBadRequest) GetPayload() *models.Error { @@ -245,11 +250,13 @@ func (o *PcloudSharedprocessorpoolsGetallUnauthorized) Code() int { } func (o *PcloudSharedprocessorpoolsGetallUnauthorized) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/shared-processor-pools][%d] pcloudSharedprocessorpoolsGetallUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/shared-processor-pools][%d] pcloudSharedprocessorpoolsGetallUnauthorized %s", 401, payload) } func (o *PcloudSharedprocessorpoolsGetallUnauthorized) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/shared-processor-pools][%d] pcloudSharedprocessorpoolsGetallUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/shared-processor-pools][%d] pcloudSharedprocessorpoolsGetallUnauthorized %s", 401, payload) } func (o *PcloudSharedprocessorpoolsGetallUnauthorized) GetPayload() *models.Error { @@ -313,11 +320,13 @@ func (o *PcloudSharedprocessorpoolsGetallForbidden) Code() int { } func (o *PcloudSharedprocessorpoolsGetallForbidden) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/shared-processor-pools][%d] pcloudSharedprocessorpoolsGetallForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/shared-processor-pools][%d] pcloudSharedprocessorpoolsGetallForbidden %s", 403, payload) } func (o *PcloudSharedprocessorpoolsGetallForbidden) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/shared-processor-pools][%d] pcloudSharedprocessorpoolsGetallForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/shared-processor-pools][%d] pcloudSharedprocessorpoolsGetallForbidden %s", 403, payload) } func (o *PcloudSharedprocessorpoolsGetallForbidden) GetPayload() *models.Error { @@ -381,11 +390,13 @@ func (o *PcloudSharedprocessorpoolsGetallNotFound) Code() int { } func (o *PcloudSharedprocessorpoolsGetallNotFound) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/shared-processor-pools][%d] pcloudSharedprocessorpoolsGetallNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/shared-processor-pools][%d] pcloudSharedprocessorpoolsGetallNotFound %s", 404, payload) } func (o *PcloudSharedprocessorpoolsGetallNotFound) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/shared-processor-pools][%d] pcloudSharedprocessorpoolsGetallNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/shared-processor-pools][%d] pcloudSharedprocessorpoolsGetallNotFound %s", 404, payload) } func (o *PcloudSharedprocessorpoolsGetallNotFound) GetPayload() *models.Error { @@ -449,11 +460,13 @@ func (o *PcloudSharedprocessorpoolsGetallInternalServerError) Code() int { } func (o *PcloudSharedprocessorpoolsGetallInternalServerError) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/shared-processor-pools][%d] pcloudSharedprocessorpoolsGetallInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/shared-processor-pools][%d] pcloudSharedprocessorpoolsGetallInternalServerError %s", 500, payload) } func (o *PcloudSharedprocessorpoolsGetallInternalServerError) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/shared-processor-pools][%d] pcloudSharedprocessorpoolsGetallInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/shared-processor-pools][%d] pcloudSharedprocessorpoolsGetallInternalServerError %s", 500, payload) } func (o *PcloudSharedprocessorpoolsGetallInternalServerError) GetPayload() *models.Error { diff --git a/power/client/p_cloud_shared_processor_pools/pcloud_sharedprocessorpools_post_responses.go b/power/client/p_cloud_shared_processor_pools/pcloud_sharedprocessorpools_post_responses.go index 97d5f4ce..95e946fd 100644 --- a/power/client/p_cloud_shared_processor_pools/pcloud_sharedprocessorpools_post_responses.go +++ b/power/client/p_cloud_shared_processor_pools/pcloud_sharedprocessorpools_post_responses.go @@ -6,6 +6,7 @@ package p_cloud_shared_processor_pools // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -121,11 +122,13 @@ func (o *PcloudSharedprocessorpoolsPostAccepted) Code() int { } func (o *PcloudSharedprocessorpoolsPostAccepted) Error() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/shared-processor-pools][%d] pcloudSharedprocessorpoolsPostAccepted %+v", 202, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/shared-processor-pools][%d] pcloudSharedprocessorpoolsPostAccepted %s", 202, payload) } func (o *PcloudSharedprocessorpoolsPostAccepted) String() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/shared-processor-pools][%d] pcloudSharedprocessorpoolsPostAccepted %+v", 202, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/shared-processor-pools][%d] pcloudSharedprocessorpoolsPostAccepted %s", 202, payload) } func (o *PcloudSharedprocessorpoolsPostAccepted) GetPayload() *models.SharedProcessorPool { @@ -189,11 +192,13 @@ func (o *PcloudSharedprocessorpoolsPostBadRequest) Code() int { } func (o *PcloudSharedprocessorpoolsPostBadRequest) Error() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/shared-processor-pools][%d] pcloudSharedprocessorpoolsPostBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/shared-processor-pools][%d] pcloudSharedprocessorpoolsPostBadRequest %s", 400, payload) } func (o *PcloudSharedprocessorpoolsPostBadRequest) String() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/shared-processor-pools][%d] pcloudSharedprocessorpoolsPostBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/shared-processor-pools][%d] pcloudSharedprocessorpoolsPostBadRequest %s", 400, payload) } func (o *PcloudSharedprocessorpoolsPostBadRequest) GetPayload() *models.Error { @@ -257,11 +262,13 @@ func (o *PcloudSharedprocessorpoolsPostUnauthorized) Code() int { } func (o *PcloudSharedprocessorpoolsPostUnauthorized) Error() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/shared-processor-pools][%d] pcloudSharedprocessorpoolsPostUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/shared-processor-pools][%d] pcloudSharedprocessorpoolsPostUnauthorized %s", 401, payload) } func (o *PcloudSharedprocessorpoolsPostUnauthorized) String() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/shared-processor-pools][%d] pcloudSharedprocessorpoolsPostUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/shared-processor-pools][%d] pcloudSharedprocessorpoolsPostUnauthorized %s", 401, payload) } func (o *PcloudSharedprocessorpoolsPostUnauthorized) GetPayload() *models.Error { @@ -325,11 +332,13 @@ func (o *PcloudSharedprocessorpoolsPostForbidden) Code() int { } func (o *PcloudSharedprocessorpoolsPostForbidden) Error() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/shared-processor-pools][%d] pcloudSharedprocessorpoolsPostForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/shared-processor-pools][%d] pcloudSharedprocessorpoolsPostForbidden %s", 403, payload) } func (o *PcloudSharedprocessorpoolsPostForbidden) String() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/shared-processor-pools][%d] pcloudSharedprocessorpoolsPostForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/shared-processor-pools][%d] pcloudSharedprocessorpoolsPostForbidden %s", 403, payload) } func (o *PcloudSharedprocessorpoolsPostForbidden) GetPayload() *models.Error { @@ -393,11 +402,13 @@ func (o *PcloudSharedprocessorpoolsPostNotFound) Code() int { } func (o *PcloudSharedprocessorpoolsPostNotFound) Error() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/shared-processor-pools][%d] pcloudSharedprocessorpoolsPostNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/shared-processor-pools][%d] pcloudSharedprocessorpoolsPostNotFound %s", 404, payload) } func (o *PcloudSharedprocessorpoolsPostNotFound) String() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/shared-processor-pools][%d] pcloudSharedprocessorpoolsPostNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/shared-processor-pools][%d] pcloudSharedprocessorpoolsPostNotFound %s", 404, payload) } func (o *PcloudSharedprocessorpoolsPostNotFound) GetPayload() *models.Error { @@ -461,11 +472,13 @@ func (o *PcloudSharedprocessorpoolsPostConflict) Code() int { } func (o *PcloudSharedprocessorpoolsPostConflict) Error() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/shared-processor-pools][%d] pcloudSharedprocessorpoolsPostConflict %+v", 409, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/shared-processor-pools][%d] pcloudSharedprocessorpoolsPostConflict %s", 409, payload) } func (o *PcloudSharedprocessorpoolsPostConflict) String() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/shared-processor-pools][%d] pcloudSharedprocessorpoolsPostConflict %+v", 409, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/shared-processor-pools][%d] pcloudSharedprocessorpoolsPostConflict %s", 409, payload) } func (o *PcloudSharedprocessorpoolsPostConflict) GetPayload() *models.Error { @@ -529,11 +542,13 @@ func (o *PcloudSharedprocessorpoolsPostUnprocessableEntity) Code() int { } func (o *PcloudSharedprocessorpoolsPostUnprocessableEntity) Error() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/shared-processor-pools][%d] pcloudSharedprocessorpoolsPostUnprocessableEntity %+v", 422, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/shared-processor-pools][%d] pcloudSharedprocessorpoolsPostUnprocessableEntity %s", 422, payload) } func (o *PcloudSharedprocessorpoolsPostUnprocessableEntity) String() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/shared-processor-pools][%d] pcloudSharedprocessorpoolsPostUnprocessableEntity %+v", 422, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/shared-processor-pools][%d] pcloudSharedprocessorpoolsPostUnprocessableEntity %s", 422, payload) } func (o *PcloudSharedprocessorpoolsPostUnprocessableEntity) GetPayload() *models.Error { @@ -597,11 +612,13 @@ func (o *PcloudSharedprocessorpoolsPostInternalServerError) Code() int { } func (o *PcloudSharedprocessorpoolsPostInternalServerError) Error() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/shared-processor-pools][%d] pcloudSharedprocessorpoolsPostInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/shared-processor-pools][%d] pcloudSharedprocessorpoolsPostInternalServerError %s", 500, payload) } func (o *PcloudSharedprocessorpoolsPostInternalServerError) String() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/shared-processor-pools][%d] pcloudSharedprocessorpoolsPostInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/shared-processor-pools][%d] pcloudSharedprocessorpoolsPostInternalServerError %s", 500, payload) } func (o *PcloudSharedprocessorpoolsPostInternalServerError) GetPayload() *models.Error { diff --git a/power/client/p_cloud_shared_processor_pools/pcloud_sharedprocessorpools_put_responses.go b/power/client/p_cloud_shared_processor_pools/pcloud_sharedprocessorpools_put_responses.go index d19e776f..2ab1daef 100644 --- a/power/client/p_cloud_shared_processor_pools/pcloud_sharedprocessorpools_put_responses.go +++ b/power/client/p_cloud_shared_processor_pools/pcloud_sharedprocessorpools_put_responses.go @@ -6,6 +6,7 @@ package p_cloud_shared_processor_pools // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -109,11 +110,13 @@ func (o *PcloudSharedprocessorpoolsPutOK) Code() int { } func (o *PcloudSharedprocessorpoolsPutOK) Error() string { - return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/shared-processor-pools/{shared_processor_pool_id}][%d] pcloudSharedprocessorpoolsPutOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/shared-processor-pools/{shared_processor_pool_id}][%d] pcloudSharedprocessorpoolsPutOK %s", 200, payload) } func (o *PcloudSharedprocessorpoolsPutOK) String() string { - return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/shared-processor-pools/{shared_processor_pool_id}][%d] pcloudSharedprocessorpoolsPutOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/shared-processor-pools/{shared_processor_pool_id}][%d] pcloudSharedprocessorpoolsPutOK %s", 200, payload) } func (o *PcloudSharedprocessorpoolsPutOK) GetPayload() *models.SharedProcessorPool { @@ -177,11 +180,13 @@ func (o *PcloudSharedprocessorpoolsPutBadRequest) Code() int { } func (o *PcloudSharedprocessorpoolsPutBadRequest) Error() string { - return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/shared-processor-pools/{shared_processor_pool_id}][%d] pcloudSharedprocessorpoolsPutBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/shared-processor-pools/{shared_processor_pool_id}][%d] pcloudSharedprocessorpoolsPutBadRequest %s", 400, payload) } func (o *PcloudSharedprocessorpoolsPutBadRequest) String() string { - return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/shared-processor-pools/{shared_processor_pool_id}][%d] pcloudSharedprocessorpoolsPutBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/shared-processor-pools/{shared_processor_pool_id}][%d] pcloudSharedprocessorpoolsPutBadRequest %s", 400, payload) } func (o *PcloudSharedprocessorpoolsPutBadRequest) GetPayload() *models.Error { @@ -245,11 +250,13 @@ func (o *PcloudSharedprocessorpoolsPutUnauthorized) Code() int { } func (o *PcloudSharedprocessorpoolsPutUnauthorized) Error() string { - return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/shared-processor-pools/{shared_processor_pool_id}][%d] pcloudSharedprocessorpoolsPutUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/shared-processor-pools/{shared_processor_pool_id}][%d] pcloudSharedprocessorpoolsPutUnauthorized %s", 401, payload) } func (o *PcloudSharedprocessorpoolsPutUnauthorized) String() string { - return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/shared-processor-pools/{shared_processor_pool_id}][%d] pcloudSharedprocessorpoolsPutUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/shared-processor-pools/{shared_processor_pool_id}][%d] pcloudSharedprocessorpoolsPutUnauthorized %s", 401, payload) } func (o *PcloudSharedprocessorpoolsPutUnauthorized) GetPayload() *models.Error { @@ -313,11 +320,13 @@ func (o *PcloudSharedprocessorpoolsPutForbidden) Code() int { } func (o *PcloudSharedprocessorpoolsPutForbidden) Error() string { - return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/shared-processor-pools/{shared_processor_pool_id}][%d] pcloudSharedprocessorpoolsPutForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/shared-processor-pools/{shared_processor_pool_id}][%d] pcloudSharedprocessorpoolsPutForbidden %s", 403, payload) } func (o *PcloudSharedprocessorpoolsPutForbidden) String() string { - return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/shared-processor-pools/{shared_processor_pool_id}][%d] pcloudSharedprocessorpoolsPutForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/shared-processor-pools/{shared_processor_pool_id}][%d] pcloudSharedprocessorpoolsPutForbidden %s", 403, payload) } func (o *PcloudSharedprocessorpoolsPutForbidden) GetPayload() *models.Error { @@ -381,11 +390,13 @@ func (o *PcloudSharedprocessorpoolsPutNotFound) Code() int { } func (o *PcloudSharedprocessorpoolsPutNotFound) Error() string { - return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/shared-processor-pools/{shared_processor_pool_id}][%d] pcloudSharedprocessorpoolsPutNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/shared-processor-pools/{shared_processor_pool_id}][%d] pcloudSharedprocessorpoolsPutNotFound %s", 404, payload) } func (o *PcloudSharedprocessorpoolsPutNotFound) String() string { - return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/shared-processor-pools/{shared_processor_pool_id}][%d] pcloudSharedprocessorpoolsPutNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/shared-processor-pools/{shared_processor_pool_id}][%d] pcloudSharedprocessorpoolsPutNotFound %s", 404, payload) } func (o *PcloudSharedprocessorpoolsPutNotFound) GetPayload() *models.Error { @@ -449,11 +460,13 @@ func (o *PcloudSharedprocessorpoolsPutInternalServerError) Code() int { } func (o *PcloudSharedprocessorpoolsPutInternalServerError) Error() string { - return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/shared-processor-pools/{shared_processor_pool_id}][%d] pcloudSharedprocessorpoolsPutInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/shared-processor-pools/{shared_processor_pool_id}][%d] pcloudSharedprocessorpoolsPutInternalServerError %s", 500, payload) } func (o *PcloudSharedprocessorpoolsPutInternalServerError) String() string { - return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/shared-processor-pools/{shared_processor_pool_id}][%d] pcloudSharedprocessorpoolsPutInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/shared-processor-pools/{shared_processor_pool_id}][%d] pcloudSharedprocessorpoolsPutInternalServerError %s", 500, payload) } func (o *PcloudSharedprocessorpoolsPutInternalServerError) GetPayload() *models.Error { diff --git a/power/client/p_cloud_snapshots/p_cloud_snapshots_client.go b/power/client/p_cloud_snapshots/p_cloud_snapshots_client.go index cfadbbb1..c5f62564 100644 --- a/power/client/p_cloud_snapshots/p_cloud_snapshots_client.go +++ b/power/client/p_cloud_snapshots/p_cloud_snapshots_client.go @@ -9,6 +9,7 @@ import ( "fmt" "github.com/go-openapi/runtime" + httptransport "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" ) @@ -17,6 +18,31 @@ func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientServi return &Client{transport: transport, formats: formats} } +// New creates a new p cloud snapshots API client with basic auth credentials. +// It takes the following parameters: +// - host: http host (github.com). +// - basePath: any base path for the API client ("/v1", "/v3"). +// - scheme: http scheme ("http", "https"). +// - user: user for basic authentication header. +// - password: password for basic authentication header. +func NewClientWithBasicAuth(host, basePath, scheme, user, password string) ClientService { + transport := httptransport.New(host, basePath, []string{scheme}) + transport.DefaultAuthentication = httptransport.BasicAuth(user, password) + return &Client{transport: transport, formats: strfmt.Default} +} + +// New creates a new p cloud snapshots API client with a bearer token for authentication. +// It takes the following parameters: +// - host: http host (github.com). +// - basePath: any base path for the API client ("/v1", "/v3"). +// - scheme: http scheme ("http", "https"). +// - bearerToken: bearer token for Bearer authentication header. +func NewClientWithBearerToken(host, basePath, scheme, bearerToken string) ClientService { + transport := httptransport.New(host, basePath, []string{scheme}) + transport.DefaultAuthentication = httptransport.BearerToken(bearerToken) + return &Client{transport: transport, formats: strfmt.Default} +} + /* Client for p cloud snapshots API */ @@ -25,7 +51,7 @@ type Client struct { formats strfmt.Registry } -// ClientOption is the option for Client methods +// ClientOption may be used to customize the behavior of Client methods. type ClientOption func(*runtime.ClientOperation) // ClientService is the interface for Client methods diff --git a/power/client/p_cloud_snapshots/pcloud_cloudinstances_snapshots_delete_responses.go b/power/client/p_cloud_snapshots/pcloud_cloudinstances_snapshots_delete_responses.go index a920f110..85dd41fd 100644 --- a/power/client/p_cloud_snapshots/pcloud_cloudinstances_snapshots_delete_responses.go +++ b/power/client/p_cloud_snapshots/pcloud_cloudinstances_snapshots_delete_responses.go @@ -6,6 +6,7 @@ package p_cloud_snapshots // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -115,11 +116,13 @@ func (o *PcloudCloudinstancesSnapshotsDeleteAccepted) Code() int { } func (o *PcloudCloudinstancesSnapshotsDeleteAccepted) Error() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/snapshots/{snapshot_id}][%d] pcloudCloudinstancesSnapshotsDeleteAccepted %+v", 202, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/snapshots/{snapshot_id}][%d] pcloudCloudinstancesSnapshotsDeleteAccepted %s", 202, payload) } func (o *PcloudCloudinstancesSnapshotsDeleteAccepted) String() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/snapshots/{snapshot_id}][%d] pcloudCloudinstancesSnapshotsDeleteAccepted %+v", 202, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/snapshots/{snapshot_id}][%d] pcloudCloudinstancesSnapshotsDeleteAccepted %s", 202, payload) } func (o *PcloudCloudinstancesSnapshotsDeleteAccepted) GetPayload() models.Object { @@ -181,11 +184,13 @@ func (o *PcloudCloudinstancesSnapshotsDeleteBadRequest) Code() int { } func (o *PcloudCloudinstancesSnapshotsDeleteBadRequest) Error() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/snapshots/{snapshot_id}][%d] pcloudCloudinstancesSnapshotsDeleteBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/snapshots/{snapshot_id}][%d] pcloudCloudinstancesSnapshotsDeleteBadRequest %s", 400, payload) } func (o *PcloudCloudinstancesSnapshotsDeleteBadRequest) String() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/snapshots/{snapshot_id}][%d] pcloudCloudinstancesSnapshotsDeleteBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/snapshots/{snapshot_id}][%d] pcloudCloudinstancesSnapshotsDeleteBadRequest %s", 400, payload) } func (o *PcloudCloudinstancesSnapshotsDeleteBadRequest) GetPayload() *models.Error { @@ -249,11 +254,13 @@ func (o *PcloudCloudinstancesSnapshotsDeleteUnauthorized) Code() int { } func (o *PcloudCloudinstancesSnapshotsDeleteUnauthorized) Error() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/snapshots/{snapshot_id}][%d] pcloudCloudinstancesSnapshotsDeleteUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/snapshots/{snapshot_id}][%d] pcloudCloudinstancesSnapshotsDeleteUnauthorized %s", 401, payload) } func (o *PcloudCloudinstancesSnapshotsDeleteUnauthorized) String() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/snapshots/{snapshot_id}][%d] pcloudCloudinstancesSnapshotsDeleteUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/snapshots/{snapshot_id}][%d] pcloudCloudinstancesSnapshotsDeleteUnauthorized %s", 401, payload) } func (o *PcloudCloudinstancesSnapshotsDeleteUnauthorized) GetPayload() *models.Error { @@ -317,11 +324,13 @@ func (o *PcloudCloudinstancesSnapshotsDeleteForbidden) Code() int { } func (o *PcloudCloudinstancesSnapshotsDeleteForbidden) Error() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/snapshots/{snapshot_id}][%d] pcloudCloudinstancesSnapshotsDeleteForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/snapshots/{snapshot_id}][%d] pcloudCloudinstancesSnapshotsDeleteForbidden %s", 403, payload) } func (o *PcloudCloudinstancesSnapshotsDeleteForbidden) String() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/snapshots/{snapshot_id}][%d] pcloudCloudinstancesSnapshotsDeleteForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/snapshots/{snapshot_id}][%d] pcloudCloudinstancesSnapshotsDeleteForbidden %s", 403, payload) } func (o *PcloudCloudinstancesSnapshotsDeleteForbidden) GetPayload() *models.Error { @@ -385,11 +394,13 @@ func (o *PcloudCloudinstancesSnapshotsDeleteNotFound) Code() int { } func (o *PcloudCloudinstancesSnapshotsDeleteNotFound) Error() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/snapshots/{snapshot_id}][%d] pcloudCloudinstancesSnapshotsDeleteNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/snapshots/{snapshot_id}][%d] pcloudCloudinstancesSnapshotsDeleteNotFound %s", 404, payload) } func (o *PcloudCloudinstancesSnapshotsDeleteNotFound) String() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/snapshots/{snapshot_id}][%d] pcloudCloudinstancesSnapshotsDeleteNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/snapshots/{snapshot_id}][%d] pcloudCloudinstancesSnapshotsDeleteNotFound %s", 404, payload) } func (o *PcloudCloudinstancesSnapshotsDeleteNotFound) GetPayload() *models.Error { @@ -453,11 +464,13 @@ func (o *PcloudCloudinstancesSnapshotsDeleteGone) Code() int { } func (o *PcloudCloudinstancesSnapshotsDeleteGone) Error() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/snapshots/{snapshot_id}][%d] pcloudCloudinstancesSnapshotsDeleteGone %+v", 410, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/snapshots/{snapshot_id}][%d] pcloudCloudinstancesSnapshotsDeleteGone %s", 410, payload) } func (o *PcloudCloudinstancesSnapshotsDeleteGone) String() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/snapshots/{snapshot_id}][%d] pcloudCloudinstancesSnapshotsDeleteGone %+v", 410, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/snapshots/{snapshot_id}][%d] pcloudCloudinstancesSnapshotsDeleteGone %s", 410, payload) } func (o *PcloudCloudinstancesSnapshotsDeleteGone) GetPayload() *models.Error { @@ -521,11 +534,13 @@ func (o *PcloudCloudinstancesSnapshotsDeleteInternalServerError) Code() int { } func (o *PcloudCloudinstancesSnapshotsDeleteInternalServerError) Error() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/snapshots/{snapshot_id}][%d] pcloudCloudinstancesSnapshotsDeleteInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/snapshots/{snapshot_id}][%d] pcloudCloudinstancesSnapshotsDeleteInternalServerError %s", 500, payload) } func (o *PcloudCloudinstancesSnapshotsDeleteInternalServerError) String() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/snapshots/{snapshot_id}][%d] pcloudCloudinstancesSnapshotsDeleteInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/snapshots/{snapshot_id}][%d] pcloudCloudinstancesSnapshotsDeleteInternalServerError %s", 500, payload) } func (o *PcloudCloudinstancesSnapshotsDeleteInternalServerError) GetPayload() *models.Error { diff --git a/power/client/p_cloud_snapshots/pcloud_cloudinstances_snapshots_get_responses.go b/power/client/p_cloud_snapshots/pcloud_cloudinstances_snapshots_get_responses.go index 33653592..df567764 100644 --- a/power/client/p_cloud_snapshots/pcloud_cloudinstances_snapshots_get_responses.go +++ b/power/client/p_cloud_snapshots/pcloud_cloudinstances_snapshots_get_responses.go @@ -6,6 +6,7 @@ package p_cloud_snapshots // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -109,11 +110,13 @@ func (o *PcloudCloudinstancesSnapshotsGetOK) Code() int { } func (o *PcloudCloudinstancesSnapshotsGetOK) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/snapshots/{snapshot_id}][%d] pcloudCloudinstancesSnapshotsGetOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/snapshots/{snapshot_id}][%d] pcloudCloudinstancesSnapshotsGetOK %s", 200, payload) } func (o *PcloudCloudinstancesSnapshotsGetOK) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/snapshots/{snapshot_id}][%d] pcloudCloudinstancesSnapshotsGetOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/snapshots/{snapshot_id}][%d] pcloudCloudinstancesSnapshotsGetOK %s", 200, payload) } func (o *PcloudCloudinstancesSnapshotsGetOK) GetPayload() *models.Snapshot { @@ -177,11 +180,13 @@ func (o *PcloudCloudinstancesSnapshotsGetBadRequest) Code() int { } func (o *PcloudCloudinstancesSnapshotsGetBadRequest) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/snapshots/{snapshot_id}][%d] pcloudCloudinstancesSnapshotsGetBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/snapshots/{snapshot_id}][%d] pcloudCloudinstancesSnapshotsGetBadRequest %s", 400, payload) } func (o *PcloudCloudinstancesSnapshotsGetBadRequest) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/snapshots/{snapshot_id}][%d] pcloudCloudinstancesSnapshotsGetBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/snapshots/{snapshot_id}][%d] pcloudCloudinstancesSnapshotsGetBadRequest %s", 400, payload) } func (o *PcloudCloudinstancesSnapshotsGetBadRequest) GetPayload() *models.Error { @@ -245,11 +250,13 @@ func (o *PcloudCloudinstancesSnapshotsGetUnauthorized) Code() int { } func (o *PcloudCloudinstancesSnapshotsGetUnauthorized) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/snapshots/{snapshot_id}][%d] pcloudCloudinstancesSnapshotsGetUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/snapshots/{snapshot_id}][%d] pcloudCloudinstancesSnapshotsGetUnauthorized %s", 401, payload) } func (o *PcloudCloudinstancesSnapshotsGetUnauthorized) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/snapshots/{snapshot_id}][%d] pcloudCloudinstancesSnapshotsGetUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/snapshots/{snapshot_id}][%d] pcloudCloudinstancesSnapshotsGetUnauthorized %s", 401, payload) } func (o *PcloudCloudinstancesSnapshotsGetUnauthorized) GetPayload() *models.Error { @@ -313,11 +320,13 @@ func (o *PcloudCloudinstancesSnapshotsGetForbidden) Code() int { } func (o *PcloudCloudinstancesSnapshotsGetForbidden) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/snapshots/{snapshot_id}][%d] pcloudCloudinstancesSnapshotsGetForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/snapshots/{snapshot_id}][%d] pcloudCloudinstancesSnapshotsGetForbidden %s", 403, payload) } func (o *PcloudCloudinstancesSnapshotsGetForbidden) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/snapshots/{snapshot_id}][%d] pcloudCloudinstancesSnapshotsGetForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/snapshots/{snapshot_id}][%d] pcloudCloudinstancesSnapshotsGetForbidden %s", 403, payload) } func (o *PcloudCloudinstancesSnapshotsGetForbidden) GetPayload() *models.Error { @@ -381,11 +390,13 @@ func (o *PcloudCloudinstancesSnapshotsGetNotFound) Code() int { } func (o *PcloudCloudinstancesSnapshotsGetNotFound) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/snapshots/{snapshot_id}][%d] pcloudCloudinstancesSnapshotsGetNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/snapshots/{snapshot_id}][%d] pcloudCloudinstancesSnapshotsGetNotFound %s", 404, payload) } func (o *PcloudCloudinstancesSnapshotsGetNotFound) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/snapshots/{snapshot_id}][%d] pcloudCloudinstancesSnapshotsGetNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/snapshots/{snapshot_id}][%d] pcloudCloudinstancesSnapshotsGetNotFound %s", 404, payload) } func (o *PcloudCloudinstancesSnapshotsGetNotFound) GetPayload() *models.Error { @@ -449,11 +460,13 @@ func (o *PcloudCloudinstancesSnapshotsGetInternalServerError) Code() int { } func (o *PcloudCloudinstancesSnapshotsGetInternalServerError) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/snapshots/{snapshot_id}][%d] pcloudCloudinstancesSnapshotsGetInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/snapshots/{snapshot_id}][%d] pcloudCloudinstancesSnapshotsGetInternalServerError %s", 500, payload) } func (o *PcloudCloudinstancesSnapshotsGetInternalServerError) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/snapshots/{snapshot_id}][%d] pcloudCloudinstancesSnapshotsGetInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/snapshots/{snapshot_id}][%d] pcloudCloudinstancesSnapshotsGetInternalServerError %s", 500, payload) } func (o *PcloudCloudinstancesSnapshotsGetInternalServerError) GetPayload() *models.Error { diff --git a/power/client/p_cloud_snapshots/pcloud_cloudinstances_snapshots_getall_responses.go b/power/client/p_cloud_snapshots/pcloud_cloudinstances_snapshots_getall_responses.go index 5cf8680e..63d3af55 100644 --- a/power/client/p_cloud_snapshots/pcloud_cloudinstances_snapshots_getall_responses.go +++ b/power/client/p_cloud_snapshots/pcloud_cloudinstances_snapshots_getall_responses.go @@ -6,6 +6,7 @@ package p_cloud_snapshots // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -109,11 +110,13 @@ func (o *PcloudCloudinstancesSnapshotsGetallOK) Code() int { } func (o *PcloudCloudinstancesSnapshotsGetallOK) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/snapshots][%d] pcloudCloudinstancesSnapshotsGetallOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/snapshots][%d] pcloudCloudinstancesSnapshotsGetallOK %s", 200, payload) } func (o *PcloudCloudinstancesSnapshotsGetallOK) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/snapshots][%d] pcloudCloudinstancesSnapshotsGetallOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/snapshots][%d] pcloudCloudinstancesSnapshotsGetallOK %s", 200, payload) } func (o *PcloudCloudinstancesSnapshotsGetallOK) GetPayload() *models.Snapshots { @@ -177,11 +180,13 @@ func (o *PcloudCloudinstancesSnapshotsGetallBadRequest) Code() int { } func (o *PcloudCloudinstancesSnapshotsGetallBadRequest) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/snapshots][%d] pcloudCloudinstancesSnapshotsGetallBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/snapshots][%d] pcloudCloudinstancesSnapshotsGetallBadRequest %s", 400, payload) } func (o *PcloudCloudinstancesSnapshotsGetallBadRequest) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/snapshots][%d] pcloudCloudinstancesSnapshotsGetallBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/snapshots][%d] pcloudCloudinstancesSnapshotsGetallBadRequest %s", 400, payload) } func (o *PcloudCloudinstancesSnapshotsGetallBadRequest) GetPayload() *models.Error { @@ -245,11 +250,13 @@ func (o *PcloudCloudinstancesSnapshotsGetallUnauthorized) Code() int { } func (o *PcloudCloudinstancesSnapshotsGetallUnauthorized) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/snapshots][%d] pcloudCloudinstancesSnapshotsGetallUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/snapshots][%d] pcloudCloudinstancesSnapshotsGetallUnauthorized %s", 401, payload) } func (o *PcloudCloudinstancesSnapshotsGetallUnauthorized) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/snapshots][%d] pcloudCloudinstancesSnapshotsGetallUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/snapshots][%d] pcloudCloudinstancesSnapshotsGetallUnauthorized %s", 401, payload) } func (o *PcloudCloudinstancesSnapshotsGetallUnauthorized) GetPayload() *models.Error { @@ -313,11 +320,13 @@ func (o *PcloudCloudinstancesSnapshotsGetallForbidden) Code() int { } func (o *PcloudCloudinstancesSnapshotsGetallForbidden) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/snapshots][%d] pcloudCloudinstancesSnapshotsGetallForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/snapshots][%d] pcloudCloudinstancesSnapshotsGetallForbidden %s", 403, payload) } func (o *PcloudCloudinstancesSnapshotsGetallForbidden) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/snapshots][%d] pcloudCloudinstancesSnapshotsGetallForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/snapshots][%d] pcloudCloudinstancesSnapshotsGetallForbidden %s", 403, payload) } func (o *PcloudCloudinstancesSnapshotsGetallForbidden) GetPayload() *models.Error { @@ -381,11 +390,13 @@ func (o *PcloudCloudinstancesSnapshotsGetallNotFound) Code() int { } func (o *PcloudCloudinstancesSnapshotsGetallNotFound) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/snapshots][%d] pcloudCloudinstancesSnapshotsGetallNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/snapshots][%d] pcloudCloudinstancesSnapshotsGetallNotFound %s", 404, payload) } func (o *PcloudCloudinstancesSnapshotsGetallNotFound) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/snapshots][%d] pcloudCloudinstancesSnapshotsGetallNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/snapshots][%d] pcloudCloudinstancesSnapshotsGetallNotFound %s", 404, payload) } func (o *PcloudCloudinstancesSnapshotsGetallNotFound) GetPayload() *models.Error { @@ -449,11 +460,13 @@ func (o *PcloudCloudinstancesSnapshotsGetallInternalServerError) Code() int { } func (o *PcloudCloudinstancesSnapshotsGetallInternalServerError) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/snapshots][%d] pcloudCloudinstancesSnapshotsGetallInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/snapshots][%d] pcloudCloudinstancesSnapshotsGetallInternalServerError %s", 500, payload) } func (o *PcloudCloudinstancesSnapshotsGetallInternalServerError) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/snapshots][%d] pcloudCloudinstancesSnapshotsGetallInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/snapshots][%d] pcloudCloudinstancesSnapshotsGetallInternalServerError %s", 500, payload) } func (o *PcloudCloudinstancesSnapshotsGetallInternalServerError) GetPayload() *models.Error { diff --git a/power/client/p_cloud_snapshots/pcloud_cloudinstances_snapshots_put_responses.go b/power/client/p_cloud_snapshots/pcloud_cloudinstances_snapshots_put_responses.go index 322ef9e3..dcba5cb8 100644 --- a/power/client/p_cloud_snapshots/pcloud_cloudinstances_snapshots_put_responses.go +++ b/power/client/p_cloud_snapshots/pcloud_cloudinstances_snapshots_put_responses.go @@ -6,6 +6,7 @@ package p_cloud_snapshots // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -109,11 +110,13 @@ func (o *PcloudCloudinstancesSnapshotsPutOK) Code() int { } func (o *PcloudCloudinstancesSnapshotsPutOK) Error() string { - return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/snapshots/{snapshot_id}][%d] pcloudCloudinstancesSnapshotsPutOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/snapshots/{snapshot_id}][%d] pcloudCloudinstancesSnapshotsPutOK %s", 200, payload) } func (o *PcloudCloudinstancesSnapshotsPutOK) String() string { - return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/snapshots/{snapshot_id}][%d] pcloudCloudinstancesSnapshotsPutOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/snapshots/{snapshot_id}][%d] pcloudCloudinstancesSnapshotsPutOK %s", 200, payload) } func (o *PcloudCloudinstancesSnapshotsPutOK) GetPayload() models.Object { @@ -175,11 +178,13 @@ func (o *PcloudCloudinstancesSnapshotsPutBadRequest) Code() int { } func (o *PcloudCloudinstancesSnapshotsPutBadRequest) Error() string { - return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/snapshots/{snapshot_id}][%d] pcloudCloudinstancesSnapshotsPutBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/snapshots/{snapshot_id}][%d] pcloudCloudinstancesSnapshotsPutBadRequest %s", 400, payload) } func (o *PcloudCloudinstancesSnapshotsPutBadRequest) String() string { - return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/snapshots/{snapshot_id}][%d] pcloudCloudinstancesSnapshotsPutBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/snapshots/{snapshot_id}][%d] pcloudCloudinstancesSnapshotsPutBadRequest %s", 400, payload) } func (o *PcloudCloudinstancesSnapshotsPutBadRequest) GetPayload() *models.Error { @@ -243,11 +248,13 @@ func (o *PcloudCloudinstancesSnapshotsPutUnauthorized) Code() int { } func (o *PcloudCloudinstancesSnapshotsPutUnauthorized) Error() string { - return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/snapshots/{snapshot_id}][%d] pcloudCloudinstancesSnapshotsPutUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/snapshots/{snapshot_id}][%d] pcloudCloudinstancesSnapshotsPutUnauthorized %s", 401, payload) } func (o *PcloudCloudinstancesSnapshotsPutUnauthorized) String() string { - return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/snapshots/{snapshot_id}][%d] pcloudCloudinstancesSnapshotsPutUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/snapshots/{snapshot_id}][%d] pcloudCloudinstancesSnapshotsPutUnauthorized %s", 401, payload) } func (o *PcloudCloudinstancesSnapshotsPutUnauthorized) GetPayload() *models.Error { @@ -311,11 +318,13 @@ func (o *PcloudCloudinstancesSnapshotsPutForbidden) Code() int { } func (o *PcloudCloudinstancesSnapshotsPutForbidden) Error() string { - return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/snapshots/{snapshot_id}][%d] pcloudCloudinstancesSnapshotsPutForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/snapshots/{snapshot_id}][%d] pcloudCloudinstancesSnapshotsPutForbidden %s", 403, payload) } func (o *PcloudCloudinstancesSnapshotsPutForbidden) String() string { - return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/snapshots/{snapshot_id}][%d] pcloudCloudinstancesSnapshotsPutForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/snapshots/{snapshot_id}][%d] pcloudCloudinstancesSnapshotsPutForbidden %s", 403, payload) } func (o *PcloudCloudinstancesSnapshotsPutForbidden) GetPayload() *models.Error { @@ -379,11 +388,13 @@ func (o *PcloudCloudinstancesSnapshotsPutNotFound) Code() int { } func (o *PcloudCloudinstancesSnapshotsPutNotFound) Error() string { - return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/snapshots/{snapshot_id}][%d] pcloudCloudinstancesSnapshotsPutNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/snapshots/{snapshot_id}][%d] pcloudCloudinstancesSnapshotsPutNotFound %s", 404, payload) } func (o *PcloudCloudinstancesSnapshotsPutNotFound) String() string { - return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/snapshots/{snapshot_id}][%d] pcloudCloudinstancesSnapshotsPutNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/snapshots/{snapshot_id}][%d] pcloudCloudinstancesSnapshotsPutNotFound %s", 404, payload) } func (o *PcloudCloudinstancesSnapshotsPutNotFound) GetPayload() *models.Error { @@ -447,11 +458,13 @@ func (o *PcloudCloudinstancesSnapshotsPutInternalServerError) Code() int { } func (o *PcloudCloudinstancesSnapshotsPutInternalServerError) Error() string { - return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/snapshots/{snapshot_id}][%d] pcloudCloudinstancesSnapshotsPutInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/snapshots/{snapshot_id}][%d] pcloudCloudinstancesSnapshotsPutInternalServerError %s", 500, payload) } func (o *PcloudCloudinstancesSnapshotsPutInternalServerError) String() string { - return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/snapshots/{snapshot_id}][%d] pcloudCloudinstancesSnapshotsPutInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/snapshots/{snapshot_id}][%d] pcloudCloudinstancesSnapshotsPutInternalServerError %s", 500, payload) } func (o *PcloudCloudinstancesSnapshotsPutInternalServerError) GetPayload() *models.Error { diff --git a/power/client/p_cloud_storage_capacity/p_cloud_storage_capacity_client.go b/power/client/p_cloud_storage_capacity/p_cloud_storage_capacity_client.go index cd76cbf1..e2305a8a 100644 --- a/power/client/p_cloud_storage_capacity/p_cloud_storage_capacity_client.go +++ b/power/client/p_cloud_storage_capacity/p_cloud_storage_capacity_client.go @@ -9,6 +9,7 @@ import ( "fmt" "github.com/go-openapi/runtime" + httptransport "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" ) @@ -17,6 +18,31 @@ func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientServi return &Client{transport: transport, formats: formats} } +// New creates a new p cloud storage capacity API client with basic auth credentials. +// It takes the following parameters: +// - host: http host (github.com). +// - basePath: any base path for the API client ("/v1", "/v3"). +// - scheme: http scheme ("http", "https"). +// - user: user for basic authentication header. +// - password: password for basic authentication header. +func NewClientWithBasicAuth(host, basePath, scheme, user, password string) ClientService { + transport := httptransport.New(host, basePath, []string{scheme}) + transport.DefaultAuthentication = httptransport.BasicAuth(user, password) + return &Client{transport: transport, formats: strfmt.Default} +} + +// New creates a new p cloud storage capacity API client with a bearer token for authentication. +// It takes the following parameters: +// - host: http host (github.com). +// - basePath: any base path for the API client ("/v1", "/v3"). +// - scheme: http scheme ("http", "https"). +// - bearerToken: bearer token for Bearer authentication header. +func NewClientWithBearerToken(host, basePath, scheme, bearerToken string) ClientService { + transport := httptransport.New(host, basePath, []string{scheme}) + transport.DefaultAuthentication = httptransport.BearerToken(bearerToken) + return &Client{transport: transport, formats: strfmt.Default} +} + /* Client for p cloud storage capacity API */ @@ -25,7 +51,7 @@ type Client struct { formats strfmt.Registry } -// ClientOption is the option for Client methods +// ClientOption may be used to customize the behavior of Client methods. type ClientOption func(*runtime.ClientOperation) // ClientService is the interface for Client methods diff --git a/power/client/p_cloud_storage_capacity/pcloud_storagecapacity_pools_get_responses.go b/power/client/p_cloud_storage_capacity/pcloud_storagecapacity_pools_get_responses.go index 041ad0f2..7120965a 100644 --- a/power/client/p_cloud_storage_capacity/pcloud_storagecapacity_pools_get_responses.go +++ b/power/client/p_cloud_storage_capacity/pcloud_storagecapacity_pools_get_responses.go @@ -6,6 +6,7 @@ package p_cloud_storage_capacity // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -109,11 +110,13 @@ func (o *PcloudStoragecapacityPoolsGetOK) Code() int { } func (o *PcloudStoragecapacityPoolsGetOK) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/storage-capacity/storage-pools/{storage_pool_name}][%d] pcloudStoragecapacityPoolsGetOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/storage-capacity/storage-pools/{storage_pool_name}][%d] pcloudStoragecapacityPoolsGetOK %s", 200, payload) } func (o *PcloudStoragecapacityPoolsGetOK) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/storage-capacity/storage-pools/{storage_pool_name}][%d] pcloudStoragecapacityPoolsGetOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/storage-capacity/storage-pools/{storage_pool_name}][%d] pcloudStoragecapacityPoolsGetOK %s", 200, payload) } func (o *PcloudStoragecapacityPoolsGetOK) GetPayload() *models.StoragePoolCapacity { @@ -177,11 +180,13 @@ func (o *PcloudStoragecapacityPoolsGetBadRequest) Code() int { } func (o *PcloudStoragecapacityPoolsGetBadRequest) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/storage-capacity/storage-pools/{storage_pool_name}][%d] pcloudStoragecapacityPoolsGetBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/storage-capacity/storage-pools/{storage_pool_name}][%d] pcloudStoragecapacityPoolsGetBadRequest %s", 400, payload) } func (o *PcloudStoragecapacityPoolsGetBadRequest) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/storage-capacity/storage-pools/{storage_pool_name}][%d] pcloudStoragecapacityPoolsGetBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/storage-capacity/storage-pools/{storage_pool_name}][%d] pcloudStoragecapacityPoolsGetBadRequest %s", 400, payload) } func (o *PcloudStoragecapacityPoolsGetBadRequest) GetPayload() *models.Error { @@ -245,11 +250,13 @@ func (o *PcloudStoragecapacityPoolsGetUnauthorized) Code() int { } func (o *PcloudStoragecapacityPoolsGetUnauthorized) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/storage-capacity/storage-pools/{storage_pool_name}][%d] pcloudStoragecapacityPoolsGetUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/storage-capacity/storage-pools/{storage_pool_name}][%d] pcloudStoragecapacityPoolsGetUnauthorized %s", 401, payload) } func (o *PcloudStoragecapacityPoolsGetUnauthorized) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/storage-capacity/storage-pools/{storage_pool_name}][%d] pcloudStoragecapacityPoolsGetUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/storage-capacity/storage-pools/{storage_pool_name}][%d] pcloudStoragecapacityPoolsGetUnauthorized %s", 401, payload) } func (o *PcloudStoragecapacityPoolsGetUnauthorized) GetPayload() *models.Error { @@ -313,11 +320,13 @@ func (o *PcloudStoragecapacityPoolsGetForbidden) Code() int { } func (o *PcloudStoragecapacityPoolsGetForbidden) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/storage-capacity/storage-pools/{storage_pool_name}][%d] pcloudStoragecapacityPoolsGetForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/storage-capacity/storage-pools/{storage_pool_name}][%d] pcloudStoragecapacityPoolsGetForbidden %s", 403, payload) } func (o *PcloudStoragecapacityPoolsGetForbidden) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/storage-capacity/storage-pools/{storage_pool_name}][%d] pcloudStoragecapacityPoolsGetForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/storage-capacity/storage-pools/{storage_pool_name}][%d] pcloudStoragecapacityPoolsGetForbidden %s", 403, payload) } func (o *PcloudStoragecapacityPoolsGetForbidden) GetPayload() *models.Error { @@ -381,11 +390,13 @@ func (o *PcloudStoragecapacityPoolsGetNotFound) Code() int { } func (o *PcloudStoragecapacityPoolsGetNotFound) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/storage-capacity/storage-pools/{storage_pool_name}][%d] pcloudStoragecapacityPoolsGetNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/storage-capacity/storage-pools/{storage_pool_name}][%d] pcloudStoragecapacityPoolsGetNotFound %s", 404, payload) } func (o *PcloudStoragecapacityPoolsGetNotFound) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/storage-capacity/storage-pools/{storage_pool_name}][%d] pcloudStoragecapacityPoolsGetNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/storage-capacity/storage-pools/{storage_pool_name}][%d] pcloudStoragecapacityPoolsGetNotFound %s", 404, payload) } func (o *PcloudStoragecapacityPoolsGetNotFound) GetPayload() *models.Error { @@ -449,11 +460,13 @@ func (o *PcloudStoragecapacityPoolsGetInternalServerError) Code() int { } func (o *PcloudStoragecapacityPoolsGetInternalServerError) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/storage-capacity/storage-pools/{storage_pool_name}][%d] pcloudStoragecapacityPoolsGetInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/storage-capacity/storage-pools/{storage_pool_name}][%d] pcloudStoragecapacityPoolsGetInternalServerError %s", 500, payload) } func (o *PcloudStoragecapacityPoolsGetInternalServerError) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/storage-capacity/storage-pools/{storage_pool_name}][%d] pcloudStoragecapacityPoolsGetInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/storage-capacity/storage-pools/{storage_pool_name}][%d] pcloudStoragecapacityPoolsGetInternalServerError %s", 500, payload) } func (o *PcloudStoragecapacityPoolsGetInternalServerError) GetPayload() *models.Error { diff --git a/power/client/p_cloud_storage_capacity/pcloud_storagecapacity_pools_getall_responses.go b/power/client/p_cloud_storage_capacity/pcloud_storagecapacity_pools_getall_responses.go index 10087904..97ac829f 100644 --- a/power/client/p_cloud_storage_capacity/pcloud_storagecapacity_pools_getall_responses.go +++ b/power/client/p_cloud_storage_capacity/pcloud_storagecapacity_pools_getall_responses.go @@ -6,6 +6,7 @@ package p_cloud_storage_capacity // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -109,11 +110,13 @@ func (o *PcloudStoragecapacityPoolsGetallOK) Code() int { } func (o *PcloudStoragecapacityPoolsGetallOK) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/storage-capacity/storage-pools][%d] pcloudStoragecapacityPoolsGetallOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/storage-capacity/storage-pools][%d] pcloudStoragecapacityPoolsGetallOK %s", 200, payload) } func (o *PcloudStoragecapacityPoolsGetallOK) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/storage-capacity/storage-pools][%d] pcloudStoragecapacityPoolsGetallOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/storage-capacity/storage-pools][%d] pcloudStoragecapacityPoolsGetallOK %s", 200, payload) } func (o *PcloudStoragecapacityPoolsGetallOK) GetPayload() *models.StoragePoolsCapacity { @@ -177,11 +180,13 @@ func (o *PcloudStoragecapacityPoolsGetallBadRequest) Code() int { } func (o *PcloudStoragecapacityPoolsGetallBadRequest) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/storage-capacity/storage-pools][%d] pcloudStoragecapacityPoolsGetallBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/storage-capacity/storage-pools][%d] pcloudStoragecapacityPoolsGetallBadRequest %s", 400, payload) } func (o *PcloudStoragecapacityPoolsGetallBadRequest) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/storage-capacity/storage-pools][%d] pcloudStoragecapacityPoolsGetallBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/storage-capacity/storage-pools][%d] pcloudStoragecapacityPoolsGetallBadRequest %s", 400, payload) } func (o *PcloudStoragecapacityPoolsGetallBadRequest) GetPayload() *models.Error { @@ -245,11 +250,13 @@ func (o *PcloudStoragecapacityPoolsGetallUnauthorized) Code() int { } func (o *PcloudStoragecapacityPoolsGetallUnauthorized) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/storage-capacity/storage-pools][%d] pcloudStoragecapacityPoolsGetallUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/storage-capacity/storage-pools][%d] pcloudStoragecapacityPoolsGetallUnauthorized %s", 401, payload) } func (o *PcloudStoragecapacityPoolsGetallUnauthorized) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/storage-capacity/storage-pools][%d] pcloudStoragecapacityPoolsGetallUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/storage-capacity/storage-pools][%d] pcloudStoragecapacityPoolsGetallUnauthorized %s", 401, payload) } func (o *PcloudStoragecapacityPoolsGetallUnauthorized) GetPayload() *models.Error { @@ -313,11 +320,13 @@ func (o *PcloudStoragecapacityPoolsGetallForbidden) Code() int { } func (o *PcloudStoragecapacityPoolsGetallForbidden) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/storage-capacity/storage-pools][%d] pcloudStoragecapacityPoolsGetallForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/storage-capacity/storage-pools][%d] pcloudStoragecapacityPoolsGetallForbidden %s", 403, payload) } func (o *PcloudStoragecapacityPoolsGetallForbidden) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/storage-capacity/storage-pools][%d] pcloudStoragecapacityPoolsGetallForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/storage-capacity/storage-pools][%d] pcloudStoragecapacityPoolsGetallForbidden %s", 403, payload) } func (o *PcloudStoragecapacityPoolsGetallForbidden) GetPayload() *models.Error { @@ -381,11 +390,13 @@ func (o *PcloudStoragecapacityPoolsGetallNotFound) Code() int { } func (o *PcloudStoragecapacityPoolsGetallNotFound) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/storage-capacity/storage-pools][%d] pcloudStoragecapacityPoolsGetallNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/storage-capacity/storage-pools][%d] pcloudStoragecapacityPoolsGetallNotFound %s", 404, payload) } func (o *PcloudStoragecapacityPoolsGetallNotFound) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/storage-capacity/storage-pools][%d] pcloudStoragecapacityPoolsGetallNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/storage-capacity/storage-pools][%d] pcloudStoragecapacityPoolsGetallNotFound %s", 404, payload) } func (o *PcloudStoragecapacityPoolsGetallNotFound) GetPayload() *models.Error { @@ -449,11 +460,13 @@ func (o *PcloudStoragecapacityPoolsGetallInternalServerError) Code() int { } func (o *PcloudStoragecapacityPoolsGetallInternalServerError) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/storage-capacity/storage-pools][%d] pcloudStoragecapacityPoolsGetallInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/storage-capacity/storage-pools][%d] pcloudStoragecapacityPoolsGetallInternalServerError %s", 500, payload) } func (o *PcloudStoragecapacityPoolsGetallInternalServerError) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/storage-capacity/storage-pools][%d] pcloudStoragecapacityPoolsGetallInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/storage-capacity/storage-pools][%d] pcloudStoragecapacityPoolsGetallInternalServerError %s", 500, payload) } func (o *PcloudStoragecapacityPoolsGetallInternalServerError) GetPayload() *models.Error { diff --git a/power/client/p_cloud_storage_capacity/pcloud_storagecapacity_types_get_responses.go b/power/client/p_cloud_storage_capacity/pcloud_storagecapacity_types_get_responses.go index 9b491a30..229517d3 100644 --- a/power/client/p_cloud_storage_capacity/pcloud_storagecapacity_types_get_responses.go +++ b/power/client/p_cloud_storage_capacity/pcloud_storagecapacity_types_get_responses.go @@ -6,6 +6,7 @@ package p_cloud_storage_capacity // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -109,11 +110,13 @@ func (o *PcloudStoragecapacityTypesGetOK) Code() int { } func (o *PcloudStoragecapacityTypesGetOK) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/storage-capacity/storage-types/{storage_type_name}][%d] pcloudStoragecapacityTypesGetOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/storage-capacity/storage-types/{storage_type_name}][%d] pcloudStoragecapacityTypesGetOK %s", 200, payload) } func (o *PcloudStoragecapacityTypesGetOK) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/storage-capacity/storage-types/{storage_type_name}][%d] pcloudStoragecapacityTypesGetOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/storage-capacity/storage-types/{storage_type_name}][%d] pcloudStoragecapacityTypesGetOK %s", 200, payload) } func (o *PcloudStoragecapacityTypesGetOK) GetPayload() *models.StorageTypeCapacity { @@ -177,11 +180,13 @@ func (o *PcloudStoragecapacityTypesGetBadRequest) Code() int { } func (o *PcloudStoragecapacityTypesGetBadRequest) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/storage-capacity/storage-types/{storage_type_name}][%d] pcloudStoragecapacityTypesGetBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/storage-capacity/storage-types/{storage_type_name}][%d] pcloudStoragecapacityTypesGetBadRequest %s", 400, payload) } func (o *PcloudStoragecapacityTypesGetBadRequest) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/storage-capacity/storage-types/{storage_type_name}][%d] pcloudStoragecapacityTypesGetBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/storage-capacity/storage-types/{storage_type_name}][%d] pcloudStoragecapacityTypesGetBadRequest %s", 400, payload) } func (o *PcloudStoragecapacityTypesGetBadRequest) GetPayload() *models.Error { @@ -245,11 +250,13 @@ func (o *PcloudStoragecapacityTypesGetUnauthorized) Code() int { } func (o *PcloudStoragecapacityTypesGetUnauthorized) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/storage-capacity/storage-types/{storage_type_name}][%d] pcloudStoragecapacityTypesGetUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/storage-capacity/storage-types/{storage_type_name}][%d] pcloudStoragecapacityTypesGetUnauthorized %s", 401, payload) } func (o *PcloudStoragecapacityTypesGetUnauthorized) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/storage-capacity/storage-types/{storage_type_name}][%d] pcloudStoragecapacityTypesGetUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/storage-capacity/storage-types/{storage_type_name}][%d] pcloudStoragecapacityTypesGetUnauthorized %s", 401, payload) } func (o *PcloudStoragecapacityTypesGetUnauthorized) GetPayload() *models.Error { @@ -313,11 +320,13 @@ func (o *PcloudStoragecapacityTypesGetForbidden) Code() int { } func (o *PcloudStoragecapacityTypesGetForbidden) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/storage-capacity/storage-types/{storage_type_name}][%d] pcloudStoragecapacityTypesGetForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/storage-capacity/storage-types/{storage_type_name}][%d] pcloudStoragecapacityTypesGetForbidden %s", 403, payload) } func (o *PcloudStoragecapacityTypesGetForbidden) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/storage-capacity/storage-types/{storage_type_name}][%d] pcloudStoragecapacityTypesGetForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/storage-capacity/storage-types/{storage_type_name}][%d] pcloudStoragecapacityTypesGetForbidden %s", 403, payload) } func (o *PcloudStoragecapacityTypesGetForbidden) GetPayload() *models.Error { @@ -381,11 +390,13 @@ func (o *PcloudStoragecapacityTypesGetNotFound) Code() int { } func (o *PcloudStoragecapacityTypesGetNotFound) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/storage-capacity/storage-types/{storage_type_name}][%d] pcloudStoragecapacityTypesGetNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/storage-capacity/storage-types/{storage_type_name}][%d] pcloudStoragecapacityTypesGetNotFound %s", 404, payload) } func (o *PcloudStoragecapacityTypesGetNotFound) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/storage-capacity/storage-types/{storage_type_name}][%d] pcloudStoragecapacityTypesGetNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/storage-capacity/storage-types/{storage_type_name}][%d] pcloudStoragecapacityTypesGetNotFound %s", 404, payload) } func (o *PcloudStoragecapacityTypesGetNotFound) GetPayload() *models.Error { @@ -449,11 +460,13 @@ func (o *PcloudStoragecapacityTypesGetInternalServerError) Code() int { } func (o *PcloudStoragecapacityTypesGetInternalServerError) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/storage-capacity/storage-types/{storage_type_name}][%d] pcloudStoragecapacityTypesGetInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/storage-capacity/storage-types/{storage_type_name}][%d] pcloudStoragecapacityTypesGetInternalServerError %s", 500, payload) } func (o *PcloudStoragecapacityTypesGetInternalServerError) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/storage-capacity/storage-types/{storage_type_name}][%d] pcloudStoragecapacityTypesGetInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/storage-capacity/storage-types/{storage_type_name}][%d] pcloudStoragecapacityTypesGetInternalServerError %s", 500, payload) } func (o *PcloudStoragecapacityTypesGetInternalServerError) GetPayload() *models.Error { diff --git a/power/client/p_cloud_storage_capacity/pcloud_storagecapacity_types_getall_responses.go b/power/client/p_cloud_storage_capacity/pcloud_storagecapacity_types_getall_responses.go index 50173880..dba3624c 100644 --- a/power/client/p_cloud_storage_capacity/pcloud_storagecapacity_types_getall_responses.go +++ b/power/client/p_cloud_storage_capacity/pcloud_storagecapacity_types_getall_responses.go @@ -6,6 +6,7 @@ package p_cloud_storage_capacity // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -109,11 +110,13 @@ func (o *PcloudStoragecapacityTypesGetallOK) Code() int { } func (o *PcloudStoragecapacityTypesGetallOK) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/storage-capacity/storage-types][%d] pcloudStoragecapacityTypesGetallOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/storage-capacity/storage-types][%d] pcloudStoragecapacityTypesGetallOK %s", 200, payload) } func (o *PcloudStoragecapacityTypesGetallOK) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/storage-capacity/storage-types][%d] pcloudStoragecapacityTypesGetallOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/storage-capacity/storage-types][%d] pcloudStoragecapacityTypesGetallOK %s", 200, payload) } func (o *PcloudStoragecapacityTypesGetallOK) GetPayload() *models.StorageTypesCapacity { @@ -177,11 +180,13 @@ func (o *PcloudStoragecapacityTypesGetallBadRequest) Code() int { } func (o *PcloudStoragecapacityTypesGetallBadRequest) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/storage-capacity/storage-types][%d] pcloudStoragecapacityTypesGetallBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/storage-capacity/storage-types][%d] pcloudStoragecapacityTypesGetallBadRequest %s", 400, payload) } func (o *PcloudStoragecapacityTypesGetallBadRequest) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/storage-capacity/storage-types][%d] pcloudStoragecapacityTypesGetallBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/storage-capacity/storage-types][%d] pcloudStoragecapacityTypesGetallBadRequest %s", 400, payload) } func (o *PcloudStoragecapacityTypesGetallBadRequest) GetPayload() *models.Error { @@ -245,11 +250,13 @@ func (o *PcloudStoragecapacityTypesGetallUnauthorized) Code() int { } func (o *PcloudStoragecapacityTypesGetallUnauthorized) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/storage-capacity/storage-types][%d] pcloudStoragecapacityTypesGetallUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/storage-capacity/storage-types][%d] pcloudStoragecapacityTypesGetallUnauthorized %s", 401, payload) } func (o *PcloudStoragecapacityTypesGetallUnauthorized) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/storage-capacity/storage-types][%d] pcloudStoragecapacityTypesGetallUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/storage-capacity/storage-types][%d] pcloudStoragecapacityTypesGetallUnauthorized %s", 401, payload) } func (o *PcloudStoragecapacityTypesGetallUnauthorized) GetPayload() *models.Error { @@ -313,11 +320,13 @@ func (o *PcloudStoragecapacityTypesGetallForbidden) Code() int { } func (o *PcloudStoragecapacityTypesGetallForbidden) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/storage-capacity/storage-types][%d] pcloudStoragecapacityTypesGetallForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/storage-capacity/storage-types][%d] pcloudStoragecapacityTypesGetallForbidden %s", 403, payload) } func (o *PcloudStoragecapacityTypesGetallForbidden) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/storage-capacity/storage-types][%d] pcloudStoragecapacityTypesGetallForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/storage-capacity/storage-types][%d] pcloudStoragecapacityTypesGetallForbidden %s", 403, payload) } func (o *PcloudStoragecapacityTypesGetallForbidden) GetPayload() *models.Error { @@ -381,11 +390,13 @@ func (o *PcloudStoragecapacityTypesGetallNotFound) Code() int { } func (o *PcloudStoragecapacityTypesGetallNotFound) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/storage-capacity/storage-types][%d] pcloudStoragecapacityTypesGetallNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/storage-capacity/storage-types][%d] pcloudStoragecapacityTypesGetallNotFound %s", 404, payload) } func (o *PcloudStoragecapacityTypesGetallNotFound) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/storage-capacity/storage-types][%d] pcloudStoragecapacityTypesGetallNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/storage-capacity/storage-types][%d] pcloudStoragecapacityTypesGetallNotFound %s", 404, payload) } func (o *PcloudStoragecapacityTypesGetallNotFound) GetPayload() *models.Error { @@ -449,11 +460,13 @@ func (o *PcloudStoragecapacityTypesGetallInternalServerError) Code() int { } func (o *PcloudStoragecapacityTypesGetallInternalServerError) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/storage-capacity/storage-types][%d] pcloudStoragecapacityTypesGetallInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/storage-capacity/storage-types][%d] pcloudStoragecapacityTypesGetallInternalServerError %s", 500, payload) } func (o *PcloudStoragecapacityTypesGetallInternalServerError) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/storage-capacity/storage-types][%d] pcloudStoragecapacityTypesGetallInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/storage-capacity/storage-types][%d] pcloudStoragecapacityTypesGetallInternalServerError %s", 500, payload) } func (o *PcloudStoragecapacityTypesGetallInternalServerError) GetPayload() *models.Error { diff --git a/power/client/p_cloud_storage_tiers/p_cloud_storage_tiers_client.go b/power/client/p_cloud_storage_tiers/p_cloud_storage_tiers_client.go index b1185a8c..624d1915 100644 --- a/power/client/p_cloud_storage_tiers/p_cloud_storage_tiers_client.go +++ b/power/client/p_cloud_storage_tiers/p_cloud_storage_tiers_client.go @@ -9,6 +9,7 @@ import ( "fmt" "github.com/go-openapi/runtime" + httptransport "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" ) @@ -17,6 +18,31 @@ func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientServi return &Client{transport: transport, formats: formats} } +// New creates a new p cloud storage tiers API client with basic auth credentials. +// It takes the following parameters: +// - host: http host (github.com). +// - basePath: any base path for the API client ("/v1", "/v3"). +// - scheme: http scheme ("http", "https"). +// - user: user for basic authentication header. +// - password: password for basic authentication header. +func NewClientWithBasicAuth(host, basePath, scheme, user, password string) ClientService { + transport := httptransport.New(host, basePath, []string{scheme}) + transport.DefaultAuthentication = httptransport.BasicAuth(user, password) + return &Client{transport: transport, formats: strfmt.Default} +} + +// New creates a new p cloud storage tiers API client with a bearer token for authentication. +// It takes the following parameters: +// - host: http host (github.com). +// - basePath: any base path for the API client ("/v1", "/v3"). +// - scheme: http scheme ("http", "https"). +// - bearerToken: bearer token for Bearer authentication header. +func NewClientWithBearerToken(host, basePath, scheme, bearerToken string) ClientService { + transport := httptransport.New(host, basePath, []string{scheme}) + transport.DefaultAuthentication = httptransport.BearerToken(bearerToken) + return &Client{transport: transport, formats: strfmt.Default} +} + /* Client for p cloud storage tiers API */ @@ -25,7 +51,7 @@ type Client struct { formats strfmt.Registry } -// ClientOption is the option for Client methods +// ClientOption may be used to customize the behavior of Client methods. type ClientOption func(*runtime.ClientOperation) // ClientService is the interface for Client methods diff --git a/power/client/p_cloud_storage_tiers/pcloud_cloudinstances_storagetiers_getall_responses.go b/power/client/p_cloud_storage_tiers/pcloud_cloudinstances_storagetiers_getall_responses.go index e74971ae..6a033ad3 100644 --- a/power/client/p_cloud_storage_tiers/pcloud_cloudinstances_storagetiers_getall_responses.go +++ b/power/client/p_cloud_storage_tiers/pcloud_cloudinstances_storagetiers_getall_responses.go @@ -6,6 +6,7 @@ package p_cloud_storage_tiers // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -109,11 +110,13 @@ func (o *PcloudCloudinstancesStoragetiersGetallOK) Code() int { } func (o *PcloudCloudinstancesStoragetiersGetallOK) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/storage-tiers][%d] pcloudCloudinstancesStoragetiersGetallOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/storage-tiers][%d] pcloudCloudinstancesStoragetiersGetallOK %s", 200, payload) } func (o *PcloudCloudinstancesStoragetiersGetallOK) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/storage-tiers][%d] pcloudCloudinstancesStoragetiersGetallOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/storage-tiers][%d] pcloudCloudinstancesStoragetiersGetallOK %s", 200, payload) } func (o *PcloudCloudinstancesStoragetiersGetallOK) GetPayload() models.RegionStorageTiers { @@ -175,11 +178,13 @@ func (o *PcloudCloudinstancesStoragetiersGetallBadRequest) Code() int { } func (o *PcloudCloudinstancesStoragetiersGetallBadRequest) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/storage-tiers][%d] pcloudCloudinstancesStoragetiersGetallBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/storage-tiers][%d] pcloudCloudinstancesStoragetiersGetallBadRequest %s", 400, payload) } func (o *PcloudCloudinstancesStoragetiersGetallBadRequest) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/storage-tiers][%d] pcloudCloudinstancesStoragetiersGetallBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/storage-tiers][%d] pcloudCloudinstancesStoragetiersGetallBadRequest %s", 400, payload) } func (o *PcloudCloudinstancesStoragetiersGetallBadRequest) GetPayload() *models.Error { @@ -243,11 +248,13 @@ func (o *PcloudCloudinstancesStoragetiersGetallUnauthorized) Code() int { } func (o *PcloudCloudinstancesStoragetiersGetallUnauthorized) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/storage-tiers][%d] pcloudCloudinstancesStoragetiersGetallUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/storage-tiers][%d] pcloudCloudinstancesStoragetiersGetallUnauthorized %s", 401, payload) } func (o *PcloudCloudinstancesStoragetiersGetallUnauthorized) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/storage-tiers][%d] pcloudCloudinstancesStoragetiersGetallUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/storage-tiers][%d] pcloudCloudinstancesStoragetiersGetallUnauthorized %s", 401, payload) } func (o *PcloudCloudinstancesStoragetiersGetallUnauthorized) GetPayload() *models.Error { @@ -311,11 +318,13 @@ func (o *PcloudCloudinstancesStoragetiersGetallForbidden) Code() int { } func (o *PcloudCloudinstancesStoragetiersGetallForbidden) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/storage-tiers][%d] pcloudCloudinstancesStoragetiersGetallForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/storage-tiers][%d] pcloudCloudinstancesStoragetiersGetallForbidden %s", 403, payload) } func (o *PcloudCloudinstancesStoragetiersGetallForbidden) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/storage-tiers][%d] pcloudCloudinstancesStoragetiersGetallForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/storage-tiers][%d] pcloudCloudinstancesStoragetiersGetallForbidden %s", 403, payload) } func (o *PcloudCloudinstancesStoragetiersGetallForbidden) GetPayload() *models.Error { @@ -379,11 +388,13 @@ func (o *PcloudCloudinstancesStoragetiersGetallNotFound) Code() int { } func (o *PcloudCloudinstancesStoragetiersGetallNotFound) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/storage-tiers][%d] pcloudCloudinstancesStoragetiersGetallNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/storage-tiers][%d] pcloudCloudinstancesStoragetiersGetallNotFound %s", 404, payload) } func (o *PcloudCloudinstancesStoragetiersGetallNotFound) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/storage-tiers][%d] pcloudCloudinstancesStoragetiersGetallNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/storage-tiers][%d] pcloudCloudinstancesStoragetiersGetallNotFound %s", 404, payload) } func (o *PcloudCloudinstancesStoragetiersGetallNotFound) GetPayload() *models.Error { @@ -447,11 +458,13 @@ func (o *PcloudCloudinstancesStoragetiersGetallInternalServerError) Code() int { } func (o *PcloudCloudinstancesStoragetiersGetallInternalServerError) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/storage-tiers][%d] pcloudCloudinstancesStoragetiersGetallInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/storage-tiers][%d] pcloudCloudinstancesStoragetiersGetallInternalServerError %s", 500, payload) } func (o *PcloudCloudinstancesStoragetiersGetallInternalServerError) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/storage-tiers][%d] pcloudCloudinstancesStoragetiersGetallInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/storage-tiers][%d] pcloudCloudinstancesStoragetiersGetallInternalServerError %s", 500, payload) } func (o *PcloudCloudinstancesStoragetiersGetallInternalServerError) GetPayload() *models.Error { diff --git a/power/client/p_cloud_system_pools/p_cloud_system_pools_client.go b/power/client/p_cloud_system_pools/p_cloud_system_pools_client.go index a2c33346..63de58c2 100644 --- a/power/client/p_cloud_system_pools/p_cloud_system_pools_client.go +++ b/power/client/p_cloud_system_pools/p_cloud_system_pools_client.go @@ -9,6 +9,7 @@ import ( "fmt" "github.com/go-openapi/runtime" + httptransport "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" ) @@ -17,6 +18,31 @@ func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientServi return &Client{transport: transport, formats: formats} } +// New creates a new p cloud system pools API client with basic auth credentials. +// It takes the following parameters: +// - host: http host (github.com). +// - basePath: any base path for the API client ("/v1", "/v3"). +// - scheme: http scheme ("http", "https"). +// - user: user for basic authentication header. +// - password: password for basic authentication header. +func NewClientWithBasicAuth(host, basePath, scheme, user, password string) ClientService { + transport := httptransport.New(host, basePath, []string{scheme}) + transport.DefaultAuthentication = httptransport.BasicAuth(user, password) + return &Client{transport: transport, formats: strfmt.Default} +} + +// New creates a new p cloud system pools API client with a bearer token for authentication. +// It takes the following parameters: +// - host: http host (github.com). +// - basePath: any base path for the API client ("/v1", "/v3"). +// - scheme: http scheme ("http", "https"). +// - bearerToken: bearer token for Bearer authentication header. +func NewClientWithBearerToken(host, basePath, scheme, bearerToken string) ClientService { + transport := httptransport.New(host, basePath, []string{scheme}) + transport.DefaultAuthentication = httptransport.BearerToken(bearerToken) + return &Client{transport: transport, formats: strfmt.Default} +} + /* Client for p cloud system pools API */ @@ -25,7 +51,7 @@ type Client struct { formats strfmt.Registry } -// ClientOption is the option for Client methods +// ClientOption may be used to customize the behavior of Client methods. type ClientOption func(*runtime.ClientOperation) // ClientService is the interface for Client methods diff --git a/power/client/p_cloud_system_pools/pcloud_systempools_get_responses.go b/power/client/p_cloud_system_pools/pcloud_systempools_get_responses.go index f354158d..139f134d 100644 --- a/power/client/p_cloud_system_pools/pcloud_systempools_get_responses.go +++ b/power/client/p_cloud_system_pools/pcloud_systempools_get_responses.go @@ -6,6 +6,7 @@ package p_cloud_system_pools // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -109,11 +110,13 @@ func (o *PcloudSystempoolsGetOK) Code() int { } func (o *PcloudSystempoolsGetOK) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/system-pools][%d] pcloudSystempoolsGetOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/system-pools][%d] pcloudSystempoolsGetOK %s", 200, payload) } func (o *PcloudSystempoolsGetOK) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/system-pools][%d] pcloudSystempoolsGetOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/system-pools][%d] pcloudSystempoolsGetOK %s", 200, payload) } func (o *PcloudSystempoolsGetOK) GetPayload() models.SystemPools { @@ -175,11 +178,13 @@ func (o *PcloudSystempoolsGetBadRequest) Code() int { } func (o *PcloudSystempoolsGetBadRequest) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/system-pools][%d] pcloudSystempoolsGetBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/system-pools][%d] pcloudSystempoolsGetBadRequest %s", 400, payload) } func (o *PcloudSystempoolsGetBadRequest) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/system-pools][%d] pcloudSystempoolsGetBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/system-pools][%d] pcloudSystempoolsGetBadRequest %s", 400, payload) } func (o *PcloudSystempoolsGetBadRequest) GetPayload() *models.Error { @@ -243,11 +248,13 @@ func (o *PcloudSystempoolsGetUnauthorized) Code() int { } func (o *PcloudSystempoolsGetUnauthorized) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/system-pools][%d] pcloudSystempoolsGetUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/system-pools][%d] pcloudSystempoolsGetUnauthorized %s", 401, payload) } func (o *PcloudSystempoolsGetUnauthorized) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/system-pools][%d] pcloudSystempoolsGetUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/system-pools][%d] pcloudSystempoolsGetUnauthorized %s", 401, payload) } func (o *PcloudSystempoolsGetUnauthorized) GetPayload() *models.Error { @@ -311,11 +318,13 @@ func (o *PcloudSystempoolsGetForbidden) Code() int { } func (o *PcloudSystempoolsGetForbidden) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/system-pools][%d] pcloudSystempoolsGetForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/system-pools][%d] pcloudSystempoolsGetForbidden %s", 403, payload) } func (o *PcloudSystempoolsGetForbidden) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/system-pools][%d] pcloudSystempoolsGetForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/system-pools][%d] pcloudSystempoolsGetForbidden %s", 403, payload) } func (o *PcloudSystempoolsGetForbidden) GetPayload() *models.Error { @@ -379,11 +388,13 @@ func (o *PcloudSystempoolsGetNotFound) Code() int { } func (o *PcloudSystempoolsGetNotFound) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/system-pools][%d] pcloudSystempoolsGetNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/system-pools][%d] pcloudSystempoolsGetNotFound %s", 404, payload) } func (o *PcloudSystempoolsGetNotFound) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/system-pools][%d] pcloudSystempoolsGetNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/system-pools][%d] pcloudSystempoolsGetNotFound %s", 404, payload) } func (o *PcloudSystempoolsGetNotFound) GetPayload() *models.Error { @@ -447,11 +458,13 @@ func (o *PcloudSystempoolsGetInternalServerError) Code() int { } func (o *PcloudSystempoolsGetInternalServerError) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/system-pools][%d] pcloudSystempoolsGetInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/system-pools][%d] pcloudSystempoolsGetInternalServerError %s", 500, payload) } func (o *PcloudSystempoolsGetInternalServerError) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/system-pools][%d] pcloudSystempoolsGetInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/system-pools][%d] pcloudSystempoolsGetInternalServerError %s", 500, payload) } func (o *PcloudSystempoolsGetInternalServerError) GetPayload() *models.Error { diff --git a/power/client/p_cloud_tasks/p_cloud_tasks_client.go b/power/client/p_cloud_tasks/p_cloud_tasks_client.go index 9327245f..47b5fe5d 100644 --- a/power/client/p_cloud_tasks/p_cloud_tasks_client.go +++ b/power/client/p_cloud_tasks/p_cloud_tasks_client.go @@ -9,6 +9,7 @@ import ( "fmt" "github.com/go-openapi/runtime" + httptransport "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" ) @@ -17,6 +18,31 @@ func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientServi return &Client{transport: transport, formats: formats} } +// New creates a new p cloud tasks API client with basic auth credentials. +// It takes the following parameters: +// - host: http host (github.com). +// - basePath: any base path for the API client ("/v1", "/v3"). +// - scheme: http scheme ("http", "https"). +// - user: user for basic authentication header. +// - password: password for basic authentication header. +func NewClientWithBasicAuth(host, basePath, scheme, user, password string) ClientService { + transport := httptransport.New(host, basePath, []string{scheme}) + transport.DefaultAuthentication = httptransport.BasicAuth(user, password) + return &Client{transport: transport, formats: strfmt.Default} +} + +// New creates a new p cloud tasks API client with a bearer token for authentication. +// It takes the following parameters: +// - host: http host (github.com). +// - basePath: any base path for the API client ("/v1", "/v3"). +// - scheme: http scheme ("http", "https"). +// - bearerToken: bearer token for Bearer authentication header. +func NewClientWithBearerToken(host, basePath, scheme, bearerToken string) ClientService { + transport := httptransport.New(host, basePath, []string{scheme}) + transport.DefaultAuthentication = httptransport.BearerToken(bearerToken) + return &Client{transport: transport, formats: strfmt.Default} +} + /* Client for p cloud tasks API */ @@ -25,7 +51,7 @@ type Client struct { formats strfmt.Registry } -// ClientOption is the option for Client methods +// ClientOption may be used to customize the behavior of Client methods. type ClientOption func(*runtime.ClientOperation) // ClientService is the interface for Client methods diff --git a/power/client/p_cloud_tasks/pcloud_tasks_delete_responses.go b/power/client/p_cloud_tasks/pcloud_tasks_delete_responses.go index 2a53efc4..b98b472b 100644 --- a/power/client/p_cloud_tasks/pcloud_tasks_delete_responses.go +++ b/power/client/p_cloud_tasks/pcloud_tasks_delete_responses.go @@ -6,6 +6,7 @@ package p_cloud_tasks // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -115,11 +116,13 @@ func (o *PcloudTasksDeleteOK) Code() int { } func (o *PcloudTasksDeleteOK) Error() string { - return fmt.Sprintf("[DELETE /pcloud/v1/tasks/{task_id}][%d] pcloudTasksDeleteOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/tasks/{task_id}][%d] pcloudTasksDeleteOK %s", 200, payload) } func (o *PcloudTasksDeleteOK) String() string { - return fmt.Sprintf("[DELETE /pcloud/v1/tasks/{task_id}][%d] pcloudTasksDeleteOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/tasks/{task_id}][%d] pcloudTasksDeleteOK %s", 200, payload) } func (o *PcloudTasksDeleteOK) GetPayload() models.Object { @@ -181,11 +184,13 @@ func (o *PcloudTasksDeleteBadRequest) Code() int { } func (o *PcloudTasksDeleteBadRequest) Error() string { - return fmt.Sprintf("[DELETE /pcloud/v1/tasks/{task_id}][%d] pcloudTasksDeleteBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/tasks/{task_id}][%d] pcloudTasksDeleteBadRequest %s", 400, payload) } func (o *PcloudTasksDeleteBadRequest) String() string { - return fmt.Sprintf("[DELETE /pcloud/v1/tasks/{task_id}][%d] pcloudTasksDeleteBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/tasks/{task_id}][%d] pcloudTasksDeleteBadRequest %s", 400, payload) } func (o *PcloudTasksDeleteBadRequest) GetPayload() *models.Error { @@ -249,11 +254,13 @@ func (o *PcloudTasksDeleteUnauthorized) Code() int { } func (o *PcloudTasksDeleteUnauthorized) Error() string { - return fmt.Sprintf("[DELETE /pcloud/v1/tasks/{task_id}][%d] pcloudTasksDeleteUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/tasks/{task_id}][%d] pcloudTasksDeleteUnauthorized %s", 401, payload) } func (o *PcloudTasksDeleteUnauthorized) String() string { - return fmt.Sprintf("[DELETE /pcloud/v1/tasks/{task_id}][%d] pcloudTasksDeleteUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/tasks/{task_id}][%d] pcloudTasksDeleteUnauthorized %s", 401, payload) } func (o *PcloudTasksDeleteUnauthorized) GetPayload() *models.Error { @@ -317,11 +324,13 @@ func (o *PcloudTasksDeleteForbidden) Code() int { } func (o *PcloudTasksDeleteForbidden) Error() string { - return fmt.Sprintf("[DELETE /pcloud/v1/tasks/{task_id}][%d] pcloudTasksDeleteForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/tasks/{task_id}][%d] pcloudTasksDeleteForbidden %s", 403, payload) } func (o *PcloudTasksDeleteForbidden) String() string { - return fmt.Sprintf("[DELETE /pcloud/v1/tasks/{task_id}][%d] pcloudTasksDeleteForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/tasks/{task_id}][%d] pcloudTasksDeleteForbidden %s", 403, payload) } func (o *PcloudTasksDeleteForbidden) GetPayload() *models.Error { @@ -385,11 +394,13 @@ func (o *PcloudTasksDeleteNotFound) Code() int { } func (o *PcloudTasksDeleteNotFound) Error() string { - return fmt.Sprintf("[DELETE /pcloud/v1/tasks/{task_id}][%d] pcloudTasksDeleteNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/tasks/{task_id}][%d] pcloudTasksDeleteNotFound %s", 404, payload) } func (o *PcloudTasksDeleteNotFound) String() string { - return fmt.Sprintf("[DELETE /pcloud/v1/tasks/{task_id}][%d] pcloudTasksDeleteNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/tasks/{task_id}][%d] pcloudTasksDeleteNotFound %s", 404, payload) } func (o *PcloudTasksDeleteNotFound) GetPayload() *models.Error { @@ -453,11 +464,13 @@ func (o *PcloudTasksDeleteGone) Code() int { } func (o *PcloudTasksDeleteGone) Error() string { - return fmt.Sprintf("[DELETE /pcloud/v1/tasks/{task_id}][%d] pcloudTasksDeleteGone %+v", 410, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/tasks/{task_id}][%d] pcloudTasksDeleteGone %s", 410, payload) } func (o *PcloudTasksDeleteGone) String() string { - return fmt.Sprintf("[DELETE /pcloud/v1/tasks/{task_id}][%d] pcloudTasksDeleteGone %+v", 410, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/tasks/{task_id}][%d] pcloudTasksDeleteGone %s", 410, payload) } func (o *PcloudTasksDeleteGone) GetPayload() *models.Error { @@ -521,11 +534,13 @@ func (o *PcloudTasksDeleteInternalServerError) Code() int { } func (o *PcloudTasksDeleteInternalServerError) Error() string { - return fmt.Sprintf("[DELETE /pcloud/v1/tasks/{task_id}][%d] pcloudTasksDeleteInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/tasks/{task_id}][%d] pcloudTasksDeleteInternalServerError %s", 500, payload) } func (o *PcloudTasksDeleteInternalServerError) String() string { - return fmt.Sprintf("[DELETE /pcloud/v1/tasks/{task_id}][%d] pcloudTasksDeleteInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/tasks/{task_id}][%d] pcloudTasksDeleteInternalServerError %s", 500, payload) } func (o *PcloudTasksDeleteInternalServerError) GetPayload() *models.Error { diff --git a/power/client/p_cloud_tasks/pcloud_tasks_get_responses.go b/power/client/p_cloud_tasks/pcloud_tasks_get_responses.go index 801979a7..7d919787 100644 --- a/power/client/p_cloud_tasks/pcloud_tasks_get_responses.go +++ b/power/client/p_cloud_tasks/pcloud_tasks_get_responses.go @@ -6,6 +6,7 @@ package p_cloud_tasks // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -109,11 +110,13 @@ func (o *PcloudTasksGetOK) Code() int { } func (o *PcloudTasksGetOK) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/tasks/{task_id}][%d] pcloudTasksGetOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/tasks/{task_id}][%d] pcloudTasksGetOK %s", 200, payload) } func (o *PcloudTasksGetOK) String() string { - return fmt.Sprintf("[GET /pcloud/v1/tasks/{task_id}][%d] pcloudTasksGetOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/tasks/{task_id}][%d] pcloudTasksGetOK %s", 200, payload) } func (o *PcloudTasksGetOK) GetPayload() *models.Task { @@ -177,11 +180,13 @@ func (o *PcloudTasksGetBadRequest) Code() int { } func (o *PcloudTasksGetBadRequest) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/tasks/{task_id}][%d] pcloudTasksGetBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/tasks/{task_id}][%d] pcloudTasksGetBadRequest %s", 400, payload) } func (o *PcloudTasksGetBadRequest) String() string { - return fmt.Sprintf("[GET /pcloud/v1/tasks/{task_id}][%d] pcloudTasksGetBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/tasks/{task_id}][%d] pcloudTasksGetBadRequest %s", 400, payload) } func (o *PcloudTasksGetBadRequest) GetPayload() *models.Error { @@ -245,11 +250,13 @@ func (o *PcloudTasksGetUnauthorized) Code() int { } func (o *PcloudTasksGetUnauthorized) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/tasks/{task_id}][%d] pcloudTasksGetUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/tasks/{task_id}][%d] pcloudTasksGetUnauthorized %s", 401, payload) } func (o *PcloudTasksGetUnauthorized) String() string { - return fmt.Sprintf("[GET /pcloud/v1/tasks/{task_id}][%d] pcloudTasksGetUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/tasks/{task_id}][%d] pcloudTasksGetUnauthorized %s", 401, payload) } func (o *PcloudTasksGetUnauthorized) GetPayload() *models.Error { @@ -313,11 +320,13 @@ func (o *PcloudTasksGetForbidden) Code() int { } func (o *PcloudTasksGetForbidden) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/tasks/{task_id}][%d] pcloudTasksGetForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/tasks/{task_id}][%d] pcloudTasksGetForbidden %s", 403, payload) } func (o *PcloudTasksGetForbidden) String() string { - return fmt.Sprintf("[GET /pcloud/v1/tasks/{task_id}][%d] pcloudTasksGetForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/tasks/{task_id}][%d] pcloudTasksGetForbidden %s", 403, payload) } func (o *PcloudTasksGetForbidden) GetPayload() *models.Error { @@ -381,11 +390,13 @@ func (o *PcloudTasksGetNotFound) Code() int { } func (o *PcloudTasksGetNotFound) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/tasks/{task_id}][%d] pcloudTasksGetNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/tasks/{task_id}][%d] pcloudTasksGetNotFound %s", 404, payload) } func (o *PcloudTasksGetNotFound) String() string { - return fmt.Sprintf("[GET /pcloud/v1/tasks/{task_id}][%d] pcloudTasksGetNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/tasks/{task_id}][%d] pcloudTasksGetNotFound %s", 404, payload) } func (o *PcloudTasksGetNotFound) GetPayload() *models.Error { @@ -449,11 +460,13 @@ func (o *PcloudTasksGetInternalServerError) Code() int { } func (o *PcloudTasksGetInternalServerError) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/tasks/{task_id}][%d] pcloudTasksGetInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/tasks/{task_id}][%d] pcloudTasksGetInternalServerError %s", 500, payload) } func (o *PcloudTasksGetInternalServerError) String() string { - return fmt.Sprintf("[GET /pcloud/v1/tasks/{task_id}][%d] pcloudTasksGetInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/tasks/{task_id}][%d] pcloudTasksGetInternalServerError %s", 500, payload) } func (o *PcloudTasksGetInternalServerError) GetPayload() *models.Error { diff --git a/power/client/p_cloud_tenants/p_cloud_tenants_client.go b/power/client/p_cloud_tenants/p_cloud_tenants_client.go index 4d2b50aa..0813b7f8 100644 --- a/power/client/p_cloud_tenants/p_cloud_tenants_client.go +++ b/power/client/p_cloud_tenants/p_cloud_tenants_client.go @@ -9,6 +9,7 @@ import ( "fmt" "github.com/go-openapi/runtime" + httptransport "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" ) @@ -17,6 +18,31 @@ func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientServi return &Client{transport: transport, formats: formats} } +// New creates a new p cloud tenants API client with basic auth credentials. +// It takes the following parameters: +// - host: http host (github.com). +// - basePath: any base path for the API client ("/v1", "/v3"). +// - scheme: http scheme ("http", "https"). +// - user: user for basic authentication header. +// - password: password for basic authentication header. +func NewClientWithBasicAuth(host, basePath, scheme, user, password string) ClientService { + transport := httptransport.New(host, basePath, []string{scheme}) + transport.DefaultAuthentication = httptransport.BasicAuth(user, password) + return &Client{transport: transport, formats: strfmt.Default} +} + +// New creates a new p cloud tenants API client with a bearer token for authentication. +// It takes the following parameters: +// - host: http host (github.com). +// - basePath: any base path for the API client ("/v1", "/v3"). +// - scheme: http scheme ("http", "https"). +// - bearerToken: bearer token for Bearer authentication header. +func NewClientWithBearerToken(host, basePath, scheme, bearerToken string) ClientService { + transport := httptransport.New(host, basePath, []string{scheme}) + transport.DefaultAuthentication = httptransport.BearerToken(bearerToken) + return &Client{transport: transport, formats: strfmt.Default} +} + /* Client for p cloud tenants API */ @@ -25,7 +51,7 @@ type Client struct { formats strfmt.Registry } -// ClientOption is the option for Client methods +// ClientOption may be used to customize the behavior of Client methods. type ClientOption func(*runtime.ClientOperation) // ClientService is the interface for Client methods diff --git a/power/client/p_cloud_tenants/pcloud_tenants_get_responses.go b/power/client/p_cloud_tenants/pcloud_tenants_get_responses.go index a3644394..be445f73 100644 --- a/power/client/p_cloud_tenants/pcloud_tenants_get_responses.go +++ b/power/client/p_cloud_tenants/pcloud_tenants_get_responses.go @@ -6,6 +6,7 @@ package p_cloud_tenants // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -109,11 +110,13 @@ func (o *PcloudTenantsGetOK) Code() int { } func (o *PcloudTenantsGetOK) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/tenants/{tenant_id}][%d] pcloudTenantsGetOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/tenants/{tenant_id}][%d] pcloudTenantsGetOK %s", 200, payload) } func (o *PcloudTenantsGetOK) String() string { - return fmt.Sprintf("[GET /pcloud/v1/tenants/{tenant_id}][%d] pcloudTenantsGetOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/tenants/{tenant_id}][%d] pcloudTenantsGetOK %s", 200, payload) } func (o *PcloudTenantsGetOK) GetPayload() *models.Tenant { @@ -177,11 +180,13 @@ func (o *PcloudTenantsGetBadRequest) Code() int { } func (o *PcloudTenantsGetBadRequest) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/tenants/{tenant_id}][%d] pcloudTenantsGetBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/tenants/{tenant_id}][%d] pcloudTenantsGetBadRequest %s", 400, payload) } func (o *PcloudTenantsGetBadRequest) String() string { - return fmt.Sprintf("[GET /pcloud/v1/tenants/{tenant_id}][%d] pcloudTenantsGetBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/tenants/{tenant_id}][%d] pcloudTenantsGetBadRequest %s", 400, payload) } func (o *PcloudTenantsGetBadRequest) GetPayload() *models.Error { @@ -245,11 +250,13 @@ func (o *PcloudTenantsGetUnauthorized) Code() int { } func (o *PcloudTenantsGetUnauthorized) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/tenants/{tenant_id}][%d] pcloudTenantsGetUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/tenants/{tenant_id}][%d] pcloudTenantsGetUnauthorized %s", 401, payload) } func (o *PcloudTenantsGetUnauthorized) String() string { - return fmt.Sprintf("[GET /pcloud/v1/tenants/{tenant_id}][%d] pcloudTenantsGetUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/tenants/{tenant_id}][%d] pcloudTenantsGetUnauthorized %s", 401, payload) } func (o *PcloudTenantsGetUnauthorized) GetPayload() *models.Error { @@ -313,11 +320,13 @@ func (o *PcloudTenantsGetForbidden) Code() int { } func (o *PcloudTenantsGetForbidden) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/tenants/{tenant_id}][%d] pcloudTenantsGetForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/tenants/{tenant_id}][%d] pcloudTenantsGetForbidden %s", 403, payload) } func (o *PcloudTenantsGetForbidden) String() string { - return fmt.Sprintf("[GET /pcloud/v1/tenants/{tenant_id}][%d] pcloudTenantsGetForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/tenants/{tenant_id}][%d] pcloudTenantsGetForbidden %s", 403, payload) } func (o *PcloudTenantsGetForbidden) GetPayload() *models.Error { @@ -381,11 +390,13 @@ func (o *PcloudTenantsGetNotFound) Code() int { } func (o *PcloudTenantsGetNotFound) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/tenants/{tenant_id}][%d] pcloudTenantsGetNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/tenants/{tenant_id}][%d] pcloudTenantsGetNotFound %s", 404, payload) } func (o *PcloudTenantsGetNotFound) String() string { - return fmt.Sprintf("[GET /pcloud/v1/tenants/{tenant_id}][%d] pcloudTenantsGetNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/tenants/{tenant_id}][%d] pcloudTenantsGetNotFound %s", 404, payload) } func (o *PcloudTenantsGetNotFound) GetPayload() *models.Error { @@ -449,11 +460,13 @@ func (o *PcloudTenantsGetInternalServerError) Code() int { } func (o *PcloudTenantsGetInternalServerError) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/tenants/{tenant_id}][%d] pcloudTenantsGetInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/tenants/{tenant_id}][%d] pcloudTenantsGetInternalServerError %s", 500, payload) } func (o *PcloudTenantsGetInternalServerError) String() string { - return fmt.Sprintf("[GET /pcloud/v1/tenants/{tenant_id}][%d] pcloudTenantsGetInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/tenants/{tenant_id}][%d] pcloudTenantsGetInternalServerError %s", 500, payload) } func (o *PcloudTenantsGetInternalServerError) GetPayload() *models.Error { diff --git a/power/client/p_cloud_tenants/pcloud_tenants_put_responses.go b/power/client/p_cloud_tenants/pcloud_tenants_put_responses.go index a047d725..b91d00cf 100644 --- a/power/client/p_cloud_tenants/pcloud_tenants_put_responses.go +++ b/power/client/p_cloud_tenants/pcloud_tenants_put_responses.go @@ -6,6 +6,7 @@ package p_cloud_tenants // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -115,11 +116,13 @@ func (o *PcloudTenantsPutOK) Code() int { } func (o *PcloudTenantsPutOK) Error() string { - return fmt.Sprintf("[PUT /pcloud/v1/tenants/{tenant_id}][%d] pcloudTenantsPutOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/tenants/{tenant_id}][%d] pcloudTenantsPutOK %s", 200, payload) } func (o *PcloudTenantsPutOK) String() string { - return fmt.Sprintf("[PUT /pcloud/v1/tenants/{tenant_id}][%d] pcloudTenantsPutOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/tenants/{tenant_id}][%d] pcloudTenantsPutOK %s", 200, payload) } func (o *PcloudTenantsPutOK) GetPayload() *models.Tenant { @@ -183,11 +186,13 @@ func (o *PcloudTenantsPutBadRequest) Code() int { } func (o *PcloudTenantsPutBadRequest) Error() string { - return fmt.Sprintf("[PUT /pcloud/v1/tenants/{tenant_id}][%d] pcloudTenantsPutBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/tenants/{tenant_id}][%d] pcloudTenantsPutBadRequest %s", 400, payload) } func (o *PcloudTenantsPutBadRequest) String() string { - return fmt.Sprintf("[PUT /pcloud/v1/tenants/{tenant_id}][%d] pcloudTenantsPutBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/tenants/{tenant_id}][%d] pcloudTenantsPutBadRequest %s", 400, payload) } func (o *PcloudTenantsPutBadRequest) GetPayload() *models.Error { @@ -251,11 +256,13 @@ func (o *PcloudTenantsPutUnauthorized) Code() int { } func (o *PcloudTenantsPutUnauthorized) Error() string { - return fmt.Sprintf("[PUT /pcloud/v1/tenants/{tenant_id}][%d] pcloudTenantsPutUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/tenants/{tenant_id}][%d] pcloudTenantsPutUnauthorized %s", 401, payload) } func (o *PcloudTenantsPutUnauthorized) String() string { - return fmt.Sprintf("[PUT /pcloud/v1/tenants/{tenant_id}][%d] pcloudTenantsPutUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/tenants/{tenant_id}][%d] pcloudTenantsPutUnauthorized %s", 401, payload) } func (o *PcloudTenantsPutUnauthorized) GetPayload() *models.Error { @@ -319,11 +326,13 @@ func (o *PcloudTenantsPutForbidden) Code() int { } func (o *PcloudTenantsPutForbidden) Error() string { - return fmt.Sprintf("[PUT /pcloud/v1/tenants/{tenant_id}][%d] pcloudTenantsPutForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/tenants/{tenant_id}][%d] pcloudTenantsPutForbidden %s", 403, payload) } func (o *PcloudTenantsPutForbidden) String() string { - return fmt.Sprintf("[PUT /pcloud/v1/tenants/{tenant_id}][%d] pcloudTenantsPutForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/tenants/{tenant_id}][%d] pcloudTenantsPutForbidden %s", 403, payload) } func (o *PcloudTenantsPutForbidden) GetPayload() *models.Error { @@ -387,11 +396,13 @@ func (o *PcloudTenantsPutNotFound) Code() int { } func (o *PcloudTenantsPutNotFound) Error() string { - return fmt.Sprintf("[PUT /pcloud/v1/tenants/{tenant_id}][%d] pcloudTenantsPutNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/tenants/{tenant_id}][%d] pcloudTenantsPutNotFound %s", 404, payload) } func (o *PcloudTenantsPutNotFound) String() string { - return fmt.Sprintf("[PUT /pcloud/v1/tenants/{tenant_id}][%d] pcloudTenantsPutNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/tenants/{tenant_id}][%d] pcloudTenantsPutNotFound %s", 404, payload) } func (o *PcloudTenantsPutNotFound) GetPayload() *models.Error { @@ -455,11 +466,13 @@ func (o *PcloudTenantsPutUnprocessableEntity) Code() int { } func (o *PcloudTenantsPutUnprocessableEntity) Error() string { - return fmt.Sprintf("[PUT /pcloud/v1/tenants/{tenant_id}][%d] pcloudTenantsPutUnprocessableEntity %+v", 422, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/tenants/{tenant_id}][%d] pcloudTenantsPutUnprocessableEntity %s", 422, payload) } func (o *PcloudTenantsPutUnprocessableEntity) String() string { - return fmt.Sprintf("[PUT /pcloud/v1/tenants/{tenant_id}][%d] pcloudTenantsPutUnprocessableEntity %+v", 422, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/tenants/{tenant_id}][%d] pcloudTenantsPutUnprocessableEntity %s", 422, payload) } func (o *PcloudTenantsPutUnprocessableEntity) GetPayload() *models.Error { @@ -523,11 +536,13 @@ func (o *PcloudTenantsPutInternalServerError) Code() int { } func (o *PcloudTenantsPutInternalServerError) Error() string { - return fmt.Sprintf("[PUT /pcloud/v1/tenants/{tenant_id}][%d] pcloudTenantsPutInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/tenants/{tenant_id}][%d] pcloudTenantsPutInternalServerError %s", 500, payload) } func (o *PcloudTenantsPutInternalServerError) String() string { - return fmt.Sprintf("[PUT /pcloud/v1/tenants/{tenant_id}][%d] pcloudTenantsPutInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/tenants/{tenant_id}][%d] pcloudTenantsPutInternalServerError %s", 500, payload) } func (o *PcloudTenantsPutInternalServerError) GetPayload() *models.Error { diff --git a/power/client/p_cloud_tenants_ssh_keys/p_cloud_tenants_ssh_keys_client.go b/power/client/p_cloud_tenants_ssh_keys/p_cloud_tenants_ssh_keys_client.go index 90906d7e..441452be 100644 --- a/power/client/p_cloud_tenants_ssh_keys/p_cloud_tenants_ssh_keys_client.go +++ b/power/client/p_cloud_tenants_ssh_keys/p_cloud_tenants_ssh_keys_client.go @@ -9,6 +9,7 @@ import ( "fmt" "github.com/go-openapi/runtime" + httptransport "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" ) @@ -17,6 +18,31 @@ func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientServi return &Client{transport: transport, formats: formats} } +// New creates a new p cloud tenants ssh keys API client with basic auth credentials. +// It takes the following parameters: +// - host: http host (github.com). +// - basePath: any base path for the API client ("/v1", "/v3"). +// - scheme: http scheme ("http", "https"). +// - user: user for basic authentication header. +// - password: password for basic authentication header. +func NewClientWithBasicAuth(host, basePath, scheme, user, password string) ClientService { + transport := httptransport.New(host, basePath, []string{scheme}) + transport.DefaultAuthentication = httptransport.BasicAuth(user, password) + return &Client{transport: transport, formats: strfmt.Default} +} + +// New creates a new p cloud tenants ssh keys API client with a bearer token for authentication. +// It takes the following parameters: +// - host: http host (github.com). +// - basePath: any base path for the API client ("/v1", "/v3"). +// - scheme: http scheme ("http", "https"). +// - bearerToken: bearer token for Bearer authentication header. +func NewClientWithBearerToken(host, basePath, scheme, bearerToken string) ClientService { + transport := httptransport.New(host, basePath, []string{scheme}) + transport.DefaultAuthentication = httptransport.BearerToken(bearerToken) + return &Client{transport: transport, formats: strfmt.Default} +} + /* Client for p cloud tenants ssh keys API */ @@ -25,7 +51,7 @@ type Client struct { formats strfmt.Registry } -// ClientOption is the option for Client methods +// ClientOption may be used to customize the behavior of Client methods. type ClientOption func(*runtime.ClientOperation) // ClientService is the interface for Client methods diff --git a/power/client/p_cloud_tenants_ssh_keys/pcloud_tenants_sshkeys_delete_responses.go b/power/client/p_cloud_tenants_ssh_keys/pcloud_tenants_sshkeys_delete_responses.go index 55bf8338..b301a433 100644 --- a/power/client/p_cloud_tenants_ssh_keys/pcloud_tenants_sshkeys_delete_responses.go +++ b/power/client/p_cloud_tenants_ssh_keys/pcloud_tenants_sshkeys_delete_responses.go @@ -6,6 +6,7 @@ package p_cloud_tenants_ssh_keys // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -115,11 +116,13 @@ func (o *PcloudTenantsSshkeysDeleteOK) Code() int { } func (o *PcloudTenantsSshkeysDeleteOK) Error() string { - return fmt.Sprintf("[DELETE /pcloud/v1/tenants/{tenant_id}/sshkeys/{sshkey_name}][%d] pcloudTenantsSshkeysDeleteOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/tenants/{tenant_id}/sshkeys/{sshkey_name}][%d] pcloudTenantsSshkeysDeleteOK %s", 200, payload) } func (o *PcloudTenantsSshkeysDeleteOK) String() string { - return fmt.Sprintf("[DELETE /pcloud/v1/tenants/{tenant_id}/sshkeys/{sshkey_name}][%d] pcloudTenantsSshkeysDeleteOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/tenants/{tenant_id}/sshkeys/{sshkey_name}][%d] pcloudTenantsSshkeysDeleteOK %s", 200, payload) } func (o *PcloudTenantsSshkeysDeleteOK) GetPayload() models.Object { @@ -181,11 +184,13 @@ func (o *PcloudTenantsSshkeysDeleteBadRequest) Code() int { } func (o *PcloudTenantsSshkeysDeleteBadRequest) Error() string { - return fmt.Sprintf("[DELETE /pcloud/v1/tenants/{tenant_id}/sshkeys/{sshkey_name}][%d] pcloudTenantsSshkeysDeleteBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/tenants/{tenant_id}/sshkeys/{sshkey_name}][%d] pcloudTenantsSshkeysDeleteBadRequest %s", 400, payload) } func (o *PcloudTenantsSshkeysDeleteBadRequest) String() string { - return fmt.Sprintf("[DELETE /pcloud/v1/tenants/{tenant_id}/sshkeys/{sshkey_name}][%d] pcloudTenantsSshkeysDeleteBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/tenants/{tenant_id}/sshkeys/{sshkey_name}][%d] pcloudTenantsSshkeysDeleteBadRequest %s", 400, payload) } func (o *PcloudTenantsSshkeysDeleteBadRequest) GetPayload() *models.Error { @@ -249,11 +254,13 @@ func (o *PcloudTenantsSshkeysDeleteUnauthorized) Code() int { } func (o *PcloudTenantsSshkeysDeleteUnauthorized) Error() string { - return fmt.Sprintf("[DELETE /pcloud/v1/tenants/{tenant_id}/sshkeys/{sshkey_name}][%d] pcloudTenantsSshkeysDeleteUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/tenants/{tenant_id}/sshkeys/{sshkey_name}][%d] pcloudTenantsSshkeysDeleteUnauthorized %s", 401, payload) } func (o *PcloudTenantsSshkeysDeleteUnauthorized) String() string { - return fmt.Sprintf("[DELETE /pcloud/v1/tenants/{tenant_id}/sshkeys/{sshkey_name}][%d] pcloudTenantsSshkeysDeleteUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/tenants/{tenant_id}/sshkeys/{sshkey_name}][%d] pcloudTenantsSshkeysDeleteUnauthorized %s", 401, payload) } func (o *PcloudTenantsSshkeysDeleteUnauthorized) GetPayload() *models.Error { @@ -317,11 +324,13 @@ func (o *PcloudTenantsSshkeysDeleteForbidden) Code() int { } func (o *PcloudTenantsSshkeysDeleteForbidden) Error() string { - return fmt.Sprintf("[DELETE /pcloud/v1/tenants/{tenant_id}/sshkeys/{sshkey_name}][%d] pcloudTenantsSshkeysDeleteForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/tenants/{tenant_id}/sshkeys/{sshkey_name}][%d] pcloudTenantsSshkeysDeleteForbidden %s", 403, payload) } func (o *PcloudTenantsSshkeysDeleteForbidden) String() string { - return fmt.Sprintf("[DELETE /pcloud/v1/tenants/{tenant_id}/sshkeys/{sshkey_name}][%d] pcloudTenantsSshkeysDeleteForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/tenants/{tenant_id}/sshkeys/{sshkey_name}][%d] pcloudTenantsSshkeysDeleteForbidden %s", 403, payload) } func (o *PcloudTenantsSshkeysDeleteForbidden) GetPayload() *models.Error { @@ -385,11 +394,13 @@ func (o *PcloudTenantsSshkeysDeleteNotFound) Code() int { } func (o *PcloudTenantsSshkeysDeleteNotFound) Error() string { - return fmt.Sprintf("[DELETE /pcloud/v1/tenants/{tenant_id}/sshkeys/{sshkey_name}][%d] pcloudTenantsSshkeysDeleteNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/tenants/{tenant_id}/sshkeys/{sshkey_name}][%d] pcloudTenantsSshkeysDeleteNotFound %s", 404, payload) } func (o *PcloudTenantsSshkeysDeleteNotFound) String() string { - return fmt.Sprintf("[DELETE /pcloud/v1/tenants/{tenant_id}/sshkeys/{sshkey_name}][%d] pcloudTenantsSshkeysDeleteNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/tenants/{tenant_id}/sshkeys/{sshkey_name}][%d] pcloudTenantsSshkeysDeleteNotFound %s", 404, payload) } func (o *PcloudTenantsSshkeysDeleteNotFound) GetPayload() *models.Error { @@ -453,11 +464,13 @@ func (o *PcloudTenantsSshkeysDeleteGone) Code() int { } func (o *PcloudTenantsSshkeysDeleteGone) Error() string { - return fmt.Sprintf("[DELETE /pcloud/v1/tenants/{tenant_id}/sshkeys/{sshkey_name}][%d] pcloudTenantsSshkeysDeleteGone %+v", 410, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/tenants/{tenant_id}/sshkeys/{sshkey_name}][%d] pcloudTenantsSshkeysDeleteGone %s", 410, payload) } func (o *PcloudTenantsSshkeysDeleteGone) String() string { - return fmt.Sprintf("[DELETE /pcloud/v1/tenants/{tenant_id}/sshkeys/{sshkey_name}][%d] pcloudTenantsSshkeysDeleteGone %+v", 410, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/tenants/{tenant_id}/sshkeys/{sshkey_name}][%d] pcloudTenantsSshkeysDeleteGone %s", 410, payload) } func (o *PcloudTenantsSshkeysDeleteGone) GetPayload() *models.Error { @@ -521,11 +534,13 @@ func (o *PcloudTenantsSshkeysDeleteInternalServerError) Code() int { } func (o *PcloudTenantsSshkeysDeleteInternalServerError) Error() string { - return fmt.Sprintf("[DELETE /pcloud/v1/tenants/{tenant_id}/sshkeys/{sshkey_name}][%d] pcloudTenantsSshkeysDeleteInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/tenants/{tenant_id}/sshkeys/{sshkey_name}][%d] pcloudTenantsSshkeysDeleteInternalServerError %s", 500, payload) } func (o *PcloudTenantsSshkeysDeleteInternalServerError) String() string { - return fmt.Sprintf("[DELETE /pcloud/v1/tenants/{tenant_id}/sshkeys/{sshkey_name}][%d] pcloudTenantsSshkeysDeleteInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/tenants/{tenant_id}/sshkeys/{sshkey_name}][%d] pcloudTenantsSshkeysDeleteInternalServerError %s", 500, payload) } func (o *PcloudTenantsSshkeysDeleteInternalServerError) GetPayload() *models.Error { diff --git a/power/client/p_cloud_tenants_ssh_keys/pcloud_tenants_sshkeys_get_responses.go b/power/client/p_cloud_tenants_ssh_keys/pcloud_tenants_sshkeys_get_responses.go index 7b40732a..03d83f7f 100644 --- a/power/client/p_cloud_tenants_ssh_keys/pcloud_tenants_sshkeys_get_responses.go +++ b/power/client/p_cloud_tenants_ssh_keys/pcloud_tenants_sshkeys_get_responses.go @@ -6,6 +6,7 @@ package p_cloud_tenants_ssh_keys // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -109,11 +110,13 @@ func (o *PcloudTenantsSshkeysGetOK) Code() int { } func (o *PcloudTenantsSshkeysGetOK) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/tenants/{tenant_id}/sshkeys/{sshkey_name}][%d] pcloudTenantsSshkeysGetOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/tenants/{tenant_id}/sshkeys/{sshkey_name}][%d] pcloudTenantsSshkeysGetOK %s", 200, payload) } func (o *PcloudTenantsSshkeysGetOK) String() string { - return fmt.Sprintf("[GET /pcloud/v1/tenants/{tenant_id}/sshkeys/{sshkey_name}][%d] pcloudTenantsSshkeysGetOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/tenants/{tenant_id}/sshkeys/{sshkey_name}][%d] pcloudTenantsSshkeysGetOK %s", 200, payload) } func (o *PcloudTenantsSshkeysGetOK) GetPayload() *models.SSHKey { @@ -177,11 +180,13 @@ func (o *PcloudTenantsSshkeysGetBadRequest) Code() int { } func (o *PcloudTenantsSshkeysGetBadRequest) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/tenants/{tenant_id}/sshkeys/{sshkey_name}][%d] pcloudTenantsSshkeysGetBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/tenants/{tenant_id}/sshkeys/{sshkey_name}][%d] pcloudTenantsSshkeysGetBadRequest %s", 400, payload) } func (o *PcloudTenantsSshkeysGetBadRequest) String() string { - return fmt.Sprintf("[GET /pcloud/v1/tenants/{tenant_id}/sshkeys/{sshkey_name}][%d] pcloudTenantsSshkeysGetBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/tenants/{tenant_id}/sshkeys/{sshkey_name}][%d] pcloudTenantsSshkeysGetBadRequest %s", 400, payload) } func (o *PcloudTenantsSshkeysGetBadRequest) GetPayload() *models.Error { @@ -245,11 +250,13 @@ func (o *PcloudTenantsSshkeysGetUnauthorized) Code() int { } func (o *PcloudTenantsSshkeysGetUnauthorized) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/tenants/{tenant_id}/sshkeys/{sshkey_name}][%d] pcloudTenantsSshkeysGetUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/tenants/{tenant_id}/sshkeys/{sshkey_name}][%d] pcloudTenantsSshkeysGetUnauthorized %s", 401, payload) } func (o *PcloudTenantsSshkeysGetUnauthorized) String() string { - return fmt.Sprintf("[GET /pcloud/v1/tenants/{tenant_id}/sshkeys/{sshkey_name}][%d] pcloudTenantsSshkeysGetUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/tenants/{tenant_id}/sshkeys/{sshkey_name}][%d] pcloudTenantsSshkeysGetUnauthorized %s", 401, payload) } func (o *PcloudTenantsSshkeysGetUnauthorized) GetPayload() *models.Error { @@ -313,11 +320,13 @@ func (o *PcloudTenantsSshkeysGetForbidden) Code() int { } func (o *PcloudTenantsSshkeysGetForbidden) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/tenants/{tenant_id}/sshkeys/{sshkey_name}][%d] pcloudTenantsSshkeysGetForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/tenants/{tenant_id}/sshkeys/{sshkey_name}][%d] pcloudTenantsSshkeysGetForbidden %s", 403, payload) } func (o *PcloudTenantsSshkeysGetForbidden) String() string { - return fmt.Sprintf("[GET /pcloud/v1/tenants/{tenant_id}/sshkeys/{sshkey_name}][%d] pcloudTenantsSshkeysGetForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/tenants/{tenant_id}/sshkeys/{sshkey_name}][%d] pcloudTenantsSshkeysGetForbidden %s", 403, payload) } func (o *PcloudTenantsSshkeysGetForbidden) GetPayload() *models.Error { @@ -381,11 +390,13 @@ func (o *PcloudTenantsSshkeysGetNotFound) Code() int { } func (o *PcloudTenantsSshkeysGetNotFound) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/tenants/{tenant_id}/sshkeys/{sshkey_name}][%d] pcloudTenantsSshkeysGetNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/tenants/{tenant_id}/sshkeys/{sshkey_name}][%d] pcloudTenantsSshkeysGetNotFound %s", 404, payload) } func (o *PcloudTenantsSshkeysGetNotFound) String() string { - return fmt.Sprintf("[GET /pcloud/v1/tenants/{tenant_id}/sshkeys/{sshkey_name}][%d] pcloudTenantsSshkeysGetNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/tenants/{tenant_id}/sshkeys/{sshkey_name}][%d] pcloudTenantsSshkeysGetNotFound %s", 404, payload) } func (o *PcloudTenantsSshkeysGetNotFound) GetPayload() *models.Error { @@ -449,11 +460,13 @@ func (o *PcloudTenantsSshkeysGetInternalServerError) Code() int { } func (o *PcloudTenantsSshkeysGetInternalServerError) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/tenants/{tenant_id}/sshkeys/{sshkey_name}][%d] pcloudTenantsSshkeysGetInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/tenants/{tenant_id}/sshkeys/{sshkey_name}][%d] pcloudTenantsSshkeysGetInternalServerError %s", 500, payload) } func (o *PcloudTenantsSshkeysGetInternalServerError) String() string { - return fmt.Sprintf("[GET /pcloud/v1/tenants/{tenant_id}/sshkeys/{sshkey_name}][%d] pcloudTenantsSshkeysGetInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/tenants/{tenant_id}/sshkeys/{sshkey_name}][%d] pcloudTenantsSshkeysGetInternalServerError %s", 500, payload) } func (o *PcloudTenantsSshkeysGetInternalServerError) GetPayload() *models.Error { diff --git a/power/client/p_cloud_tenants_ssh_keys/pcloud_tenants_sshkeys_getall_responses.go b/power/client/p_cloud_tenants_ssh_keys/pcloud_tenants_sshkeys_getall_responses.go index fe2db9ec..6e339e1d 100644 --- a/power/client/p_cloud_tenants_ssh_keys/pcloud_tenants_sshkeys_getall_responses.go +++ b/power/client/p_cloud_tenants_ssh_keys/pcloud_tenants_sshkeys_getall_responses.go @@ -6,6 +6,7 @@ package p_cloud_tenants_ssh_keys // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -109,11 +110,13 @@ func (o *PcloudTenantsSshkeysGetallOK) Code() int { } func (o *PcloudTenantsSshkeysGetallOK) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/tenants/{tenant_id}/sshkeys][%d] pcloudTenantsSshkeysGetallOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/tenants/{tenant_id}/sshkeys][%d] pcloudTenantsSshkeysGetallOK %s", 200, payload) } func (o *PcloudTenantsSshkeysGetallOK) String() string { - return fmt.Sprintf("[GET /pcloud/v1/tenants/{tenant_id}/sshkeys][%d] pcloudTenantsSshkeysGetallOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/tenants/{tenant_id}/sshkeys][%d] pcloudTenantsSshkeysGetallOK %s", 200, payload) } func (o *PcloudTenantsSshkeysGetallOK) GetPayload() *models.SSHKeys { @@ -177,11 +180,13 @@ func (o *PcloudTenantsSshkeysGetallBadRequest) Code() int { } func (o *PcloudTenantsSshkeysGetallBadRequest) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/tenants/{tenant_id}/sshkeys][%d] pcloudTenantsSshkeysGetallBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/tenants/{tenant_id}/sshkeys][%d] pcloudTenantsSshkeysGetallBadRequest %s", 400, payload) } func (o *PcloudTenantsSshkeysGetallBadRequest) String() string { - return fmt.Sprintf("[GET /pcloud/v1/tenants/{tenant_id}/sshkeys][%d] pcloudTenantsSshkeysGetallBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/tenants/{tenant_id}/sshkeys][%d] pcloudTenantsSshkeysGetallBadRequest %s", 400, payload) } func (o *PcloudTenantsSshkeysGetallBadRequest) GetPayload() *models.Error { @@ -245,11 +250,13 @@ func (o *PcloudTenantsSshkeysGetallUnauthorized) Code() int { } func (o *PcloudTenantsSshkeysGetallUnauthorized) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/tenants/{tenant_id}/sshkeys][%d] pcloudTenantsSshkeysGetallUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/tenants/{tenant_id}/sshkeys][%d] pcloudTenantsSshkeysGetallUnauthorized %s", 401, payload) } func (o *PcloudTenantsSshkeysGetallUnauthorized) String() string { - return fmt.Sprintf("[GET /pcloud/v1/tenants/{tenant_id}/sshkeys][%d] pcloudTenantsSshkeysGetallUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/tenants/{tenant_id}/sshkeys][%d] pcloudTenantsSshkeysGetallUnauthorized %s", 401, payload) } func (o *PcloudTenantsSshkeysGetallUnauthorized) GetPayload() *models.Error { @@ -313,11 +320,13 @@ func (o *PcloudTenantsSshkeysGetallForbidden) Code() int { } func (o *PcloudTenantsSshkeysGetallForbidden) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/tenants/{tenant_id}/sshkeys][%d] pcloudTenantsSshkeysGetallForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/tenants/{tenant_id}/sshkeys][%d] pcloudTenantsSshkeysGetallForbidden %s", 403, payload) } func (o *PcloudTenantsSshkeysGetallForbidden) String() string { - return fmt.Sprintf("[GET /pcloud/v1/tenants/{tenant_id}/sshkeys][%d] pcloudTenantsSshkeysGetallForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/tenants/{tenant_id}/sshkeys][%d] pcloudTenantsSshkeysGetallForbidden %s", 403, payload) } func (o *PcloudTenantsSshkeysGetallForbidden) GetPayload() *models.Error { @@ -381,11 +390,13 @@ func (o *PcloudTenantsSshkeysGetallNotFound) Code() int { } func (o *PcloudTenantsSshkeysGetallNotFound) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/tenants/{tenant_id}/sshkeys][%d] pcloudTenantsSshkeysGetallNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/tenants/{tenant_id}/sshkeys][%d] pcloudTenantsSshkeysGetallNotFound %s", 404, payload) } func (o *PcloudTenantsSshkeysGetallNotFound) String() string { - return fmt.Sprintf("[GET /pcloud/v1/tenants/{tenant_id}/sshkeys][%d] pcloudTenantsSshkeysGetallNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/tenants/{tenant_id}/sshkeys][%d] pcloudTenantsSshkeysGetallNotFound %s", 404, payload) } func (o *PcloudTenantsSshkeysGetallNotFound) GetPayload() *models.Error { @@ -449,11 +460,13 @@ func (o *PcloudTenantsSshkeysGetallInternalServerError) Code() int { } func (o *PcloudTenantsSshkeysGetallInternalServerError) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/tenants/{tenant_id}/sshkeys][%d] pcloudTenantsSshkeysGetallInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/tenants/{tenant_id}/sshkeys][%d] pcloudTenantsSshkeysGetallInternalServerError %s", 500, payload) } func (o *PcloudTenantsSshkeysGetallInternalServerError) String() string { - return fmt.Sprintf("[GET /pcloud/v1/tenants/{tenant_id}/sshkeys][%d] pcloudTenantsSshkeysGetallInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/tenants/{tenant_id}/sshkeys][%d] pcloudTenantsSshkeysGetallInternalServerError %s", 500, payload) } func (o *PcloudTenantsSshkeysGetallInternalServerError) GetPayload() *models.Error { diff --git a/power/client/p_cloud_tenants_ssh_keys/pcloud_tenants_sshkeys_post_responses.go b/power/client/p_cloud_tenants_ssh_keys/pcloud_tenants_sshkeys_post_responses.go index 44d8ed2a..76dbebc9 100644 --- a/power/client/p_cloud_tenants_ssh_keys/pcloud_tenants_sshkeys_post_responses.go +++ b/power/client/p_cloud_tenants_ssh_keys/pcloud_tenants_sshkeys_post_responses.go @@ -6,6 +6,7 @@ package p_cloud_tenants_ssh_keys // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -127,11 +128,13 @@ func (o *PcloudTenantsSshkeysPostOK) Code() int { } func (o *PcloudTenantsSshkeysPostOK) Error() string { - return fmt.Sprintf("[POST /pcloud/v1/tenants/{tenant_id}/sshkeys][%d] pcloudTenantsSshkeysPostOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/tenants/{tenant_id}/sshkeys][%d] pcloudTenantsSshkeysPostOK %s", 200, payload) } func (o *PcloudTenantsSshkeysPostOK) String() string { - return fmt.Sprintf("[POST /pcloud/v1/tenants/{tenant_id}/sshkeys][%d] pcloudTenantsSshkeysPostOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/tenants/{tenant_id}/sshkeys][%d] pcloudTenantsSshkeysPostOK %s", 200, payload) } func (o *PcloudTenantsSshkeysPostOK) GetPayload() *models.SSHKey { @@ -195,11 +198,13 @@ func (o *PcloudTenantsSshkeysPostCreated) Code() int { } func (o *PcloudTenantsSshkeysPostCreated) Error() string { - return fmt.Sprintf("[POST /pcloud/v1/tenants/{tenant_id}/sshkeys][%d] pcloudTenantsSshkeysPostCreated %+v", 201, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/tenants/{tenant_id}/sshkeys][%d] pcloudTenantsSshkeysPostCreated %s", 201, payload) } func (o *PcloudTenantsSshkeysPostCreated) String() string { - return fmt.Sprintf("[POST /pcloud/v1/tenants/{tenant_id}/sshkeys][%d] pcloudTenantsSshkeysPostCreated %+v", 201, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/tenants/{tenant_id}/sshkeys][%d] pcloudTenantsSshkeysPostCreated %s", 201, payload) } func (o *PcloudTenantsSshkeysPostCreated) GetPayload() *models.SSHKey { @@ -263,11 +268,13 @@ func (o *PcloudTenantsSshkeysPostBadRequest) Code() int { } func (o *PcloudTenantsSshkeysPostBadRequest) Error() string { - return fmt.Sprintf("[POST /pcloud/v1/tenants/{tenant_id}/sshkeys][%d] pcloudTenantsSshkeysPostBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/tenants/{tenant_id}/sshkeys][%d] pcloudTenantsSshkeysPostBadRequest %s", 400, payload) } func (o *PcloudTenantsSshkeysPostBadRequest) String() string { - return fmt.Sprintf("[POST /pcloud/v1/tenants/{tenant_id}/sshkeys][%d] pcloudTenantsSshkeysPostBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/tenants/{tenant_id}/sshkeys][%d] pcloudTenantsSshkeysPostBadRequest %s", 400, payload) } func (o *PcloudTenantsSshkeysPostBadRequest) GetPayload() *models.Error { @@ -331,11 +338,13 @@ func (o *PcloudTenantsSshkeysPostUnauthorized) Code() int { } func (o *PcloudTenantsSshkeysPostUnauthorized) Error() string { - return fmt.Sprintf("[POST /pcloud/v1/tenants/{tenant_id}/sshkeys][%d] pcloudTenantsSshkeysPostUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/tenants/{tenant_id}/sshkeys][%d] pcloudTenantsSshkeysPostUnauthorized %s", 401, payload) } func (o *PcloudTenantsSshkeysPostUnauthorized) String() string { - return fmt.Sprintf("[POST /pcloud/v1/tenants/{tenant_id}/sshkeys][%d] pcloudTenantsSshkeysPostUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/tenants/{tenant_id}/sshkeys][%d] pcloudTenantsSshkeysPostUnauthorized %s", 401, payload) } func (o *PcloudTenantsSshkeysPostUnauthorized) GetPayload() *models.Error { @@ -399,11 +408,13 @@ func (o *PcloudTenantsSshkeysPostForbidden) Code() int { } func (o *PcloudTenantsSshkeysPostForbidden) Error() string { - return fmt.Sprintf("[POST /pcloud/v1/tenants/{tenant_id}/sshkeys][%d] pcloudTenantsSshkeysPostForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/tenants/{tenant_id}/sshkeys][%d] pcloudTenantsSshkeysPostForbidden %s", 403, payload) } func (o *PcloudTenantsSshkeysPostForbidden) String() string { - return fmt.Sprintf("[POST /pcloud/v1/tenants/{tenant_id}/sshkeys][%d] pcloudTenantsSshkeysPostForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/tenants/{tenant_id}/sshkeys][%d] pcloudTenantsSshkeysPostForbidden %s", 403, payload) } func (o *PcloudTenantsSshkeysPostForbidden) GetPayload() *models.Error { @@ -467,11 +478,13 @@ func (o *PcloudTenantsSshkeysPostNotFound) Code() int { } func (o *PcloudTenantsSshkeysPostNotFound) Error() string { - return fmt.Sprintf("[POST /pcloud/v1/tenants/{tenant_id}/sshkeys][%d] pcloudTenantsSshkeysPostNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/tenants/{tenant_id}/sshkeys][%d] pcloudTenantsSshkeysPostNotFound %s", 404, payload) } func (o *PcloudTenantsSshkeysPostNotFound) String() string { - return fmt.Sprintf("[POST /pcloud/v1/tenants/{tenant_id}/sshkeys][%d] pcloudTenantsSshkeysPostNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/tenants/{tenant_id}/sshkeys][%d] pcloudTenantsSshkeysPostNotFound %s", 404, payload) } func (o *PcloudTenantsSshkeysPostNotFound) GetPayload() *models.Error { @@ -535,11 +548,13 @@ func (o *PcloudTenantsSshkeysPostConflict) Code() int { } func (o *PcloudTenantsSshkeysPostConflict) Error() string { - return fmt.Sprintf("[POST /pcloud/v1/tenants/{tenant_id}/sshkeys][%d] pcloudTenantsSshkeysPostConflict %+v", 409, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/tenants/{tenant_id}/sshkeys][%d] pcloudTenantsSshkeysPostConflict %s", 409, payload) } func (o *PcloudTenantsSshkeysPostConflict) String() string { - return fmt.Sprintf("[POST /pcloud/v1/tenants/{tenant_id}/sshkeys][%d] pcloudTenantsSshkeysPostConflict %+v", 409, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/tenants/{tenant_id}/sshkeys][%d] pcloudTenantsSshkeysPostConflict %s", 409, payload) } func (o *PcloudTenantsSshkeysPostConflict) GetPayload() *models.Error { @@ -603,11 +618,13 @@ func (o *PcloudTenantsSshkeysPostUnprocessableEntity) Code() int { } func (o *PcloudTenantsSshkeysPostUnprocessableEntity) Error() string { - return fmt.Sprintf("[POST /pcloud/v1/tenants/{tenant_id}/sshkeys][%d] pcloudTenantsSshkeysPostUnprocessableEntity %+v", 422, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/tenants/{tenant_id}/sshkeys][%d] pcloudTenantsSshkeysPostUnprocessableEntity %s", 422, payload) } func (o *PcloudTenantsSshkeysPostUnprocessableEntity) String() string { - return fmt.Sprintf("[POST /pcloud/v1/tenants/{tenant_id}/sshkeys][%d] pcloudTenantsSshkeysPostUnprocessableEntity %+v", 422, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/tenants/{tenant_id}/sshkeys][%d] pcloudTenantsSshkeysPostUnprocessableEntity %s", 422, payload) } func (o *PcloudTenantsSshkeysPostUnprocessableEntity) GetPayload() *models.Error { @@ -671,11 +688,13 @@ func (o *PcloudTenantsSshkeysPostInternalServerError) Code() int { } func (o *PcloudTenantsSshkeysPostInternalServerError) Error() string { - return fmt.Sprintf("[POST /pcloud/v1/tenants/{tenant_id}/sshkeys][%d] pcloudTenantsSshkeysPostInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/tenants/{tenant_id}/sshkeys][%d] pcloudTenantsSshkeysPostInternalServerError %s", 500, payload) } func (o *PcloudTenantsSshkeysPostInternalServerError) String() string { - return fmt.Sprintf("[POST /pcloud/v1/tenants/{tenant_id}/sshkeys][%d] pcloudTenantsSshkeysPostInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/tenants/{tenant_id}/sshkeys][%d] pcloudTenantsSshkeysPostInternalServerError %s", 500, payload) } func (o *PcloudTenantsSshkeysPostInternalServerError) GetPayload() *models.Error { diff --git a/power/client/p_cloud_tenants_ssh_keys/pcloud_tenants_sshkeys_put_responses.go b/power/client/p_cloud_tenants_ssh_keys/pcloud_tenants_sshkeys_put_responses.go index 21beb65a..70026ead 100644 --- a/power/client/p_cloud_tenants_ssh_keys/pcloud_tenants_sshkeys_put_responses.go +++ b/power/client/p_cloud_tenants_ssh_keys/pcloud_tenants_sshkeys_put_responses.go @@ -6,6 +6,7 @@ package p_cloud_tenants_ssh_keys // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -115,11 +116,13 @@ func (o *PcloudTenantsSshkeysPutOK) Code() int { } func (o *PcloudTenantsSshkeysPutOK) Error() string { - return fmt.Sprintf("[PUT /pcloud/v1/tenants/{tenant_id}/sshkeys/{sshkey_name}][%d] pcloudTenantsSshkeysPutOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/tenants/{tenant_id}/sshkeys/{sshkey_name}][%d] pcloudTenantsSshkeysPutOK %s", 200, payload) } func (o *PcloudTenantsSshkeysPutOK) String() string { - return fmt.Sprintf("[PUT /pcloud/v1/tenants/{tenant_id}/sshkeys/{sshkey_name}][%d] pcloudTenantsSshkeysPutOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/tenants/{tenant_id}/sshkeys/{sshkey_name}][%d] pcloudTenantsSshkeysPutOK %s", 200, payload) } func (o *PcloudTenantsSshkeysPutOK) GetPayload() *models.SSHKey { @@ -183,11 +186,13 @@ func (o *PcloudTenantsSshkeysPutBadRequest) Code() int { } func (o *PcloudTenantsSshkeysPutBadRequest) Error() string { - return fmt.Sprintf("[PUT /pcloud/v1/tenants/{tenant_id}/sshkeys/{sshkey_name}][%d] pcloudTenantsSshkeysPutBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/tenants/{tenant_id}/sshkeys/{sshkey_name}][%d] pcloudTenantsSshkeysPutBadRequest %s", 400, payload) } func (o *PcloudTenantsSshkeysPutBadRequest) String() string { - return fmt.Sprintf("[PUT /pcloud/v1/tenants/{tenant_id}/sshkeys/{sshkey_name}][%d] pcloudTenantsSshkeysPutBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/tenants/{tenant_id}/sshkeys/{sshkey_name}][%d] pcloudTenantsSshkeysPutBadRequest %s", 400, payload) } func (o *PcloudTenantsSshkeysPutBadRequest) GetPayload() *models.Error { @@ -251,11 +256,13 @@ func (o *PcloudTenantsSshkeysPutUnauthorized) Code() int { } func (o *PcloudTenantsSshkeysPutUnauthorized) Error() string { - return fmt.Sprintf("[PUT /pcloud/v1/tenants/{tenant_id}/sshkeys/{sshkey_name}][%d] pcloudTenantsSshkeysPutUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/tenants/{tenant_id}/sshkeys/{sshkey_name}][%d] pcloudTenantsSshkeysPutUnauthorized %s", 401, payload) } func (o *PcloudTenantsSshkeysPutUnauthorized) String() string { - return fmt.Sprintf("[PUT /pcloud/v1/tenants/{tenant_id}/sshkeys/{sshkey_name}][%d] pcloudTenantsSshkeysPutUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/tenants/{tenant_id}/sshkeys/{sshkey_name}][%d] pcloudTenantsSshkeysPutUnauthorized %s", 401, payload) } func (o *PcloudTenantsSshkeysPutUnauthorized) GetPayload() *models.Error { @@ -319,11 +326,13 @@ func (o *PcloudTenantsSshkeysPutForbidden) Code() int { } func (o *PcloudTenantsSshkeysPutForbidden) Error() string { - return fmt.Sprintf("[PUT /pcloud/v1/tenants/{tenant_id}/sshkeys/{sshkey_name}][%d] pcloudTenantsSshkeysPutForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/tenants/{tenant_id}/sshkeys/{sshkey_name}][%d] pcloudTenantsSshkeysPutForbidden %s", 403, payload) } func (o *PcloudTenantsSshkeysPutForbidden) String() string { - return fmt.Sprintf("[PUT /pcloud/v1/tenants/{tenant_id}/sshkeys/{sshkey_name}][%d] pcloudTenantsSshkeysPutForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/tenants/{tenant_id}/sshkeys/{sshkey_name}][%d] pcloudTenantsSshkeysPutForbidden %s", 403, payload) } func (o *PcloudTenantsSshkeysPutForbidden) GetPayload() *models.Error { @@ -387,11 +396,13 @@ func (o *PcloudTenantsSshkeysPutNotFound) Code() int { } func (o *PcloudTenantsSshkeysPutNotFound) Error() string { - return fmt.Sprintf("[PUT /pcloud/v1/tenants/{tenant_id}/sshkeys/{sshkey_name}][%d] pcloudTenantsSshkeysPutNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/tenants/{tenant_id}/sshkeys/{sshkey_name}][%d] pcloudTenantsSshkeysPutNotFound %s", 404, payload) } func (o *PcloudTenantsSshkeysPutNotFound) String() string { - return fmt.Sprintf("[PUT /pcloud/v1/tenants/{tenant_id}/sshkeys/{sshkey_name}][%d] pcloudTenantsSshkeysPutNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/tenants/{tenant_id}/sshkeys/{sshkey_name}][%d] pcloudTenantsSshkeysPutNotFound %s", 404, payload) } func (o *PcloudTenantsSshkeysPutNotFound) GetPayload() *models.Error { @@ -455,11 +466,13 @@ func (o *PcloudTenantsSshkeysPutUnprocessableEntity) Code() int { } func (o *PcloudTenantsSshkeysPutUnprocessableEntity) Error() string { - return fmt.Sprintf("[PUT /pcloud/v1/tenants/{tenant_id}/sshkeys/{sshkey_name}][%d] pcloudTenantsSshkeysPutUnprocessableEntity %+v", 422, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/tenants/{tenant_id}/sshkeys/{sshkey_name}][%d] pcloudTenantsSshkeysPutUnprocessableEntity %s", 422, payload) } func (o *PcloudTenantsSshkeysPutUnprocessableEntity) String() string { - return fmt.Sprintf("[PUT /pcloud/v1/tenants/{tenant_id}/sshkeys/{sshkey_name}][%d] pcloudTenantsSshkeysPutUnprocessableEntity %+v", 422, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/tenants/{tenant_id}/sshkeys/{sshkey_name}][%d] pcloudTenantsSshkeysPutUnprocessableEntity %s", 422, payload) } func (o *PcloudTenantsSshkeysPutUnprocessableEntity) GetPayload() *models.Error { @@ -523,11 +536,13 @@ func (o *PcloudTenantsSshkeysPutInternalServerError) Code() int { } func (o *PcloudTenantsSshkeysPutInternalServerError) Error() string { - return fmt.Sprintf("[PUT /pcloud/v1/tenants/{tenant_id}/sshkeys/{sshkey_name}][%d] pcloudTenantsSshkeysPutInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/tenants/{tenant_id}/sshkeys/{sshkey_name}][%d] pcloudTenantsSshkeysPutInternalServerError %s", 500, payload) } func (o *PcloudTenantsSshkeysPutInternalServerError) String() string { - return fmt.Sprintf("[PUT /pcloud/v1/tenants/{tenant_id}/sshkeys/{sshkey_name}][%d] pcloudTenantsSshkeysPutInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/tenants/{tenant_id}/sshkeys/{sshkey_name}][%d] pcloudTenantsSshkeysPutInternalServerError %s", 500, payload) } func (o *PcloudTenantsSshkeysPutInternalServerError) GetPayload() *models.Error { diff --git a/power/client/p_cloud_v_p_n_connections/p_cloudvpn_connections_client.go b/power/client/p_cloud_v_p_n_connections/p_cloudvpn_connections_client.go index 33aac598..1d549c5a 100644 --- a/power/client/p_cloud_v_p_n_connections/p_cloudvpn_connections_client.go +++ b/power/client/p_cloud_v_p_n_connections/p_cloudvpn_connections_client.go @@ -9,6 +9,7 @@ import ( "fmt" "github.com/go-openapi/runtime" + httptransport "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" ) @@ -17,6 +18,31 @@ func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientServi return &Client{transport: transport, formats: formats} } +// New creates a new p cloud v p n connections API client with basic auth credentials. +// It takes the following parameters: +// - host: http host (github.com). +// - basePath: any base path for the API client ("/v1", "/v3"). +// - scheme: http scheme ("http", "https"). +// - user: user for basic authentication header. +// - password: password for basic authentication header. +func NewClientWithBasicAuth(host, basePath, scheme, user, password string) ClientService { + transport := httptransport.New(host, basePath, []string{scheme}) + transport.DefaultAuthentication = httptransport.BasicAuth(user, password) + return &Client{transport: transport, formats: strfmt.Default} +} + +// New creates a new p cloud v p n connections API client with a bearer token for authentication. +// It takes the following parameters: +// - host: http host (github.com). +// - basePath: any base path for the API client ("/v1", "/v3"). +// - scheme: http scheme ("http", "https"). +// - bearerToken: bearer token for Bearer authentication header. +func NewClientWithBearerToken(host, basePath, scheme, bearerToken string) ClientService { + transport := httptransport.New(host, basePath, []string{scheme}) + transport.DefaultAuthentication = httptransport.BearerToken(bearerToken) + return &Client{transport: transport, formats: strfmt.Default} +} + /* Client for p cloud v p n connections API */ @@ -25,7 +51,7 @@ type Client struct { formats strfmt.Registry } -// ClientOption is the option for Client methods +// ClientOption may be used to customize the behavior of Client methods. type ClientOption func(*runtime.ClientOperation) // ClientService is the interface for Client methods diff --git a/power/client/p_cloud_v_p_n_connections/pcloud_vpnconnections_delete_responses.go b/power/client/p_cloud_v_p_n_connections/pcloud_vpnconnections_delete_responses.go index 3ae8b3a6..c65485ab 100644 --- a/power/client/p_cloud_v_p_n_connections/pcloud_vpnconnections_delete_responses.go +++ b/power/client/p_cloud_v_p_n_connections/pcloud_vpnconnections_delete_responses.go @@ -6,6 +6,7 @@ package p_cloud_v_p_n_connections // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -109,11 +110,13 @@ func (o *PcloudVpnconnectionsDeleteAccepted) Code() int { } func (o *PcloudVpnconnectionsDeleteAccepted) Error() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}][%d] pcloudVpnconnectionsDeleteAccepted %+v", 202, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}][%d] pcloudVpnconnectionsDeleteAccepted %s", 202, payload) } func (o *PcloudVpnconnectionsDeleteAccepted) String() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}][%d] pcloudVpnconnectionsDeleteAccepted %+v", 202, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}][%d] pcloudVpnconnectionsDeleteAccepted %s", 202, payload) } func (o *PcloudVpnconnectionsDeleteAccepted) GetPayload() *models.JobReference { @@ -177,11 +180,13 @@ func (o *PcloudVpnconnectionsDeleteBadRequest) Code() int { } func (o *PcloudVpnconnectionsDeleteBadRequest) Error() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}][%d] pcloudVpnconnectionsDeleteBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}][%d] pcloudVpnconnectionsDeleteBadRequest %s", 400, payload) } func (o *PcloudVpnconnectionsDeleteBadRequest) String() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}][%d] pcloudVpnconnectionsDeleteBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}][%d] pcloudVpnconnectionsDeleteBadRequest %s", 400, payload) } func (o *PcloudVpnconnectionsDeleteBadRequest) GetPayload() *models.Error { @@ -245,11 +250,13 @@ func (o *PcloudVpnconnectionsDeleteUnauthorized) Code() int { } func (o *PcloudVpnconnectionsDeleteUnauthorized) Error() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}][%d] pcloudVpnconnectionsDeleteUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}][%d] pcloudVpnconnectionsDeleteUnauthorized %s", 401, payload) } func (o *PcloudVpnconnectionsDeleteUnauthorized) String() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}][%d] pcloudVpnconnectionsDeleteUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}][%d] pcloudVpnconnectionsDeleteUnauthorized %s", 401, payload) } func (o *PcloudVpnconnectionsDeleteUnauthorized) GetPayload() *models.Error { @@ -313,11 +320,13 @@ func (o *PcloudVpnconnectionsDeleteForbidden) Code() int { } func (o *PcloudVpnconnectionsDeleteForbidden) Error() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}][%d] pcloudVpnconnectionsDeleteForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}][%d] pcloudVpnconnectionsDeleteForbidden %s", 403, payload) } func (o *PcloudVpnconnectionsDeleteForbidden) String() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}][%d] pcloudVpnconnectionsDeleteForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}][%d] pcloudVpnconnectionsDeleteForbidden %s", 403, payload) } func (o *PcloudVpnconnectionsDeleteForbidden) GetPayload() *models.Error { @@ -381,11 +390,13 @@ func (o *PcloudVpnconnectionsDeleteNotFound) Code() int { } func (o *PcloudVpnconnectionsDeleteNotFound) Error() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}][%d] pcloudVpnconnectionsDeleteNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}][%d] pcloudVpnconnectionsDeleteNotFound %s", 404, payload) } func (o *PcloudVpnconnectionsDeleteNotFound) String() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}][%d] pcloudVpnconnectionsDeleteNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}][%d] pcloudVpnconnectionsDeleteNotFound %s", 404, payload) } func (o *PcloudVpnconnectionsDeleteNotFound) GetPayload() *models.Error { @@ -449,11 +460,13 @@ func (o *PcloudVpnconnectionsDeleteInternalServerError) Code() int { } func (o *PcloudVpnconnectionsDeleteInternalServerError) Error() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}][%d] pcloudVpnconnectionsDeleteInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}][%d] pcloudVpnconnectionsDeleteInternalServerError %s", 500, payload) } func (o *PcloudVpnconnectionsDeleteInternalServerError) String() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}][%d] pcloudVpnconnectionsDeleteInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}][%d] pcloudVpnconnectionsDeleteInternalServerError %s", 500, payload) } func (o *PcloudVpnconnectionsDeleteInternalServerError) GetPayload() *models.Error { diff --git a/power/client/p_cloud_v_p_n_connections/pcloud_vpnconnections_get_responses.go b/power/client/p_cloud_v_p_n_connections/pcloud_vpnconnections_get_responses.go index 0d4d0982..fcfd6dd0 100644 --- a/power/client/p_cloud_v_p_n_connections/pcloud_vpnconnections_get_responses.go +++ b/power/client/p_cloud_v_p_n_connections/pcloud_vpnconnections_get_responses.go @@ -6,6 +6,7 @@ package p_cloud_v_p_n_connections // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -115,11 +116,13 @@ func (o *PcloudVpnconnectionsGetOK) Code() int { } func (o *PcloudVpnconnectionsGetOK) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}][%d] pcloudVpnconnectionsGetOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}][%d] pcloudVpnconnectionsGetOK %s", 200, payload) } func (o *PcloudVpnconnectionsGetOK) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}][%d] pcloudVpnconnectionsGetOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}][%d] pcloudVpnconnectionsGetOK %s", 200, payload) } func (o *PcloudVpnconnectionsGetOK) GetPayload() *models.VPNConnection { @@ -183,11 +186,13 @@ func (o *PcloudVpnconnectionsGetBadRequest) Code() int { } func (o *PcloudVpnconnectionsGetBadRequest) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}][%d] pcloudVpnconnectionsGetBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}][%d] pcloudVpnconnectionsGetBadRequest %s", 400, payload) } func (o *PcloudVpnconnectionsGetBadRequest) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}][%d] pcloudVpnconnectionsGetBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}][%d] pcloudVpnconnectionsGetBadRequest %s", 400, payload) } func (o *PcloudVpnconnectionsGetBadRequest) GetPayload() *models.Error { @@ -251,11 +256,13 @@ func (o *PcloudVpnconnectionsGetUnauthorized) Code() int { } func (o *PcloudVpnconnectionsGetUnauthorized) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}][%d] pcloudVpnconnectionsGetUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}][%d] pcloudVpnconnectionsGetUnauthorized %s", 401, payload) } func (o *PcloudVpnconnectionsGetUnauthorized) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}][%d] pcloudVpnconnectionsGetUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}][%d] pcloudVpnconnectionsGetUnauthorized %s", 401, payload) } func (o *PcloudVpnconnectionsGetUnauthorized) GetPayload() *models.Error { @@ -319,11 +326,13 @@ func (o *PcloudVpnconnectionsGetForbidden) Code() int { } func (o *PcloudVpnconnectionsGetForbidden) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}][%d] pcloudVpnconnectionsGetForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}][%d] pcloudVpnconnectionsGetForbidden %s", 403, payload) } func (o *PcloudVpnconnectionsGetForbidden) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}][%d] pcloudVpnconnectionsGetForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}][%d] pcloudVpnconnectionsGetForbidden %s", 403, payload) } func (o *PcloudVpnconnectionsGetForbidden) GetPayload() *models.Error { @@ -387,11 +396,13 @@ func (o *PcloudVpnconnectionsGetNotFound) Code() int { } func (o *PcloudVpnconnectionsGetNotFound) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}][%d] pcloudVpnconnectionsGetNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}][%d] pcloudVpnconnectionsGetNotFound %s", 404, payload) } func (o *PcloudVpnconnectionsGetNotFound) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}][%d] pcloudVpnconnectionsGetNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}][%d] pcloudVpnconnectionsGetNotFound %s", 404, payload) } func (o *PcloudVpnconnectionsGetNotFound) GetPayload() *models.Error { @@ -455,11 +466,13 @@ func (o *PcloudVpnconnectionsGetUnprocessableEntity) Code() int { } func (o *PcloudVpnconnectionsGetUnprocessableEntity) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}][%d] pcloudVpnconnectionsGetUnprocessableEntity %+v", 422, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}][%d] pcloudVpnconnectionsGetUnprocessableEntity %s", 422, payload) } func (o *PcloudVpnconnectionsGetUnprocessableEntity) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}][%d] pcloudVpnconnectionsGetUnprocessableEntity %+v", 422, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}][%d] pcloudVpnconnectionsGetUnprocessableEntity %s", 422, payload) } func (o *PcloudVpnconnectionsGetUnprocessableEntity) GetPayload() *models.Error { @@ -523,11 +536,13 @@ func (o *PcloudVpnconnectionsGetInternalServerError) Code() int { } func (o *PcloudVpnconnectionsGetInternalServerError) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}][%d] pcloudVpnconnectionsGetInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}][%d] pcloudVpnconnectionsGetInternalServerError %s", 500, payload) } func (o *PcloudVpnconnectionsGetInternalServerError) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}][%d] pcloudVpnconnectionsGetInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}][%d] pcloudVpnconnectionsGetInternalServerError %s", 500, payload) } func (o *PcloudVpnconnectionsGetInternalServerError) GetPayload() *models.Error { diff --git a/power/client/p_cloud_v_p_n_connections/pcloud_vpnconnections_getall_responses.go b/power/client/p_cloud_v_p_n_connections/pcloud_vpnconnections_getall_responses.go index 6eda5280..30ec06a3 100644 --- a/power/client/p_cloud_v_p_n_connections/pcloud_vpnconnections_getall_responses.go +++ b/power/client/p_cloud_v_p_n_connections/pcloud_vpnconnections_getall_responses.go @@ -6,6 +6,7 @@ package p_cloud_v_p_n_connections // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -109,11 +110,13 @@ func (o *PcloudVpnconnectionsGetallOK) Code() int { } func (o *PcloudVpnconnectionsGetallOK) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections][%d] pcloudVpnconnectionsGetallOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections][%d] pcloudVpnconnectionsGetallOK %s", 200, payload) } func (o *PcloudVpnconnectionsGetallOK) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections][%d] pcloudVpnconnectionsGetallOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections][%d] pcloudVpnconnectionsGetallOK %s", 200, payload) } func (o *PcloudVpnconnectionsGetallOK) GetPayload() *models.VPNConnections { @@ -177,11 +180,13 @@ func (o *PcloudVpnconnectionsGetallBadRequest) Code() int { } func (o *PcloudVpnconnectionsGetallBadRequest) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections][%d] pcloudVpnconnectionsGetallBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections][%d] pcloudVpnconnectionsGetallBadRequest %s", 400, payload) } func (o *PcloudVpnconnectionsGetallBadRequest) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections][%d] pcloudVpnconnectionsGetallBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections][%d] pcloudVpnconnectionsGetallBadRequest %s", 400, payload) } func (o *PcloudVpnconnectionsGetallBadRequest) GetPayload() *models.Error { @@ -245,11 +250,13 @@ func (o *PcloudVpnconnectionsGetallUnauthorized) Code() int { } func (o *PcloudVpnconnectionsGetallUnauthorized) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections][%d] pcloudVpnconnectionsGetallUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections][%d] pcloudVpnconnectionsGetallUnauthorized %s", 401, payload) } func (o *PcloudVpnconnectionsGetallUnauthorized) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections][%d] pcloudVpnconnectionsGetallUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections][%d] pcloudVpnconnectionsGetallUnauthorized %s", 401, payload) } func (o *PcloudVpnconnectionsGetallUnauthorized) GetPayload() *models.Error { @@ -313,11 +320,13 @@ func (o *PcloudVpnconnectionsGetallForbidden) Code() int { } func (o *PcloudVpnconnectionsGetallForbidden) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections][%d] pcloudVpnconnectionsGetallForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections][%d] pcloudVpnconnectionsGetallForbidden %s", 403, payload) } func (o *PcloudVpnconnectionsGetallForbidden) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections][%d] pcloudVpnconnectionsGetallForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections][%d] pcloudVpnconnectionsGetallForbidden %s", 403, payload) } func (o *PcloudVpnconnectionsGetallForbidden) GetPayload() *models.Error { @@ -381,11 +390,13 @@ func (o *PcloudVpnconnectionsGetallNotFound) Code() int { } func (o *PcloudVpnconnectionsGetallNotFound) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections][%d] pcloudVpnconnectionsGetallNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections][%d] pcloudVpnconnectionsGetallNotFound %s", 404, payload) } func (o *PcloudVpnconnectionsGetallNotFound) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections][%d] pcloudVpnconnectionsGetallNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections][%d] pcloudVpnconnectionsGetallNotFound %s", 404, payload) } func (o *PcloudVpnconnectionsGetallNotFound) GetPayload() *models.Error { @@ -449,11 +460,13 @@ func (o *PcloudVpnconnectionsGetallInternalServerError) Code() int { } func (o *PcloudVpnconnectionsGetallInternalServerError) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections][%d] pcloudVpnconnectionsGetallInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections][%d] pcloudVpnconnectionsGetallInternalServerError %s", 500, payload) } func (o *PcloudVpnconnectionsGetallInternalServerError) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections][%d] pcloudVpnconnectionsGetallInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections][%d] pcloudVpnconnectionsGetallInternalServerError %s", 500, payload) } func (o *PcloudVpnconnectionsGetallInternalServerError) GetPayload() *models.Error { diff --git a/power/client/p_cloud_v_p_n_connections/pcloud_vpnconnections_networks_delete_responses.go b/power/client/p_cloud_v_p_n_connections/pcloud_vpnconnections_networks_delete_responses.go index 76f62a5a..8e465589 100644 --- a/power/client/p_cloud_v_p_n_connections/pcloud_vpnconnections_networks_delete_responses.go +++ b/power/client/p_cloud_v_p_n_connections/pcloud_vpnconnections_networks_delete_responses.go @@ -6,6 +6,7 @@ package p_cloud_v_p_n_connections // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -115,11 +116,13 @@ func (o *PcloudVpnconnectionsNetworksDeleteAccepted) Code() int { } func (o *PcloudVpnconnectionsNetworksDeleteAccepted) Error() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}/networks][%d] pcloudVpnconnectionsNetworksDeleteAccepted %+v", 202, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}/networks][%d] pcloudVpnconnectionsNetworksDeleteAccepted %s", 202, payload) } func (o *PcloudVpnconnectionsNetworksDeleteAccepted) String() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}/networks][%d] pcloudVpnconnectionsNetworksDeleteAccepted %+v", 202, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}/networks][%d] pcloudVpnconnectionsNetworksDeleteAccepted %s", 202, payload) } func (o *PcloudVpnconnectionsNetworksDeleteAccepted) GetPayload() *models.JobReference { @@ -183,11 +186,13 @@ func (o *PcloudVpnconnectionsNetworksDeleteBadRequest) Code() int { } func (o *PcloudVpnconnectionsNetworksDeleteBadRequest) Error() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}/networks][%d] pcloudVpnconnectionsNetworksDeleteBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}/networks][%d] pcloudVpnconnectionsNetworksDeleteBadRequest %s", 400, payload) } func (o *PcloudVpnconnectionsNetworksDeleteBadRequest) String() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}/networks][%d] pcloudVpnconnectionsNetworksDeleteBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}/networks][%d] pcloudVpnconnectionsNetworksDeleteBadRequest %s", 400, payload) } func (o *PcloudVpnconnectionsNetworksDeleteBadRequest) GetPayload() *models.Error { @@ -251,11 +256,13 @@ func (o *PcloudVpnconnectionsNetworksDeleteUnauthorized) Code() int { } func (o *PcloudVpnconnectionsNetworksDeleteUnauthorized) Error() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}/networks][%d] pcloudVpnconnectionsNetworksDeleteUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}/networks][%d] pcloudVpnconnectionsNetworksDeleteUnauthorized %s", 401, payload) } func (o *PcloudVpnconnectionsNetworksDeleteUnauthorized) String() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}/networks][%d] pcloudVpnconnectionsNetworksDeleteUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}/networks][%d] pcloudVpnconnectionsNetworksDeleteUnauthorized %s", 401, payload) } func (o *PcloudVpnconnectionsNetworksDeleteUnauthorized) GetPayload() *models.Error { @@ -319,11 +326,13 @@ func (o *PcloudVpnconnectionsNetworksDeleteForbidden) Code() int { } func (o *PcloudVpnconnectionsNetworksDeleteForbidden) Error() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}/networks][%d] pcloudVpnconnectionsNetworksDeleteForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}/networks][%d] pcloudVpnconnectionsNetworksDeleteForbidden %s", 403, payload) } func (o *PcloudVpnconnectionsNetworksDeleteForbidden) String() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}/networks][%d] pcloudVpnconnectionsNetworksDeleteForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}/networks][%d] pcloudVpnconnectionsNetworksDeleteForbidden %s", 403, payload) } func (o *PcloudVpnconnectionsNetworksDeleteForbidden) GetPayload() *models.Error { @@ -387,11 +396,13 @@ func (o *PcloudVpnconnectionsNetworksDeleteNotFound) Code() int { } func (o *PcloudVpnconnectionsNetworksDeleteNotFound) Error() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}/networks][%d] pcloudVpnconnectionsNetworksDeleteNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}/networks][%d] pcloudVpnconnectionsNetworksDeleteNotFound %s", 404, payload) } func (o *PcloudVpnconnectionsNetworksDeleteNotFound) String() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}/networks][%d] pcloudVpnconnectionsNetworksDeleteNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}/networks][%d] pcloudVpnconnectionsNetworksDeleteNotFound %s", 404, payload) } func (o *PcloudVpnconnectionsNetworksDeleteNotFound) GetPayload() *models.Error { @@ -455,11 +466,13 @@ func (o *PcloudVpnconnectionsNetworksDeleteUnprocessableEntity) Code() int { } func (o *PcloudVpnconnectionsNetworksDeleteUnprocessableEntity) Error() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}/networks][%d] pcloudVpnconnectionsNetworksDeleteUnprocessableEntity %+v", 422, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}/networks][%d] pcloudVpnconnectionsNetworksDeleteUnprocessableEntity %s", 422, payload) } func (o *PcloudVpnconnectionsNetworksDeleteUnprocessableEntity) String() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}/networks][%d] pcloudVpnconnectionsNetworksDeleteUnprocessableEntity %+v", 422, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}/networks][%d] pcloudVpnconnectionsNetworksDeleteUnprocessableEntity %s", 422, payload) } func (o *PcloudVpnconnectionsNetworksDeleteUnprocessableEntity) GetPayload() *models.Error { @@ -523,11 +536,13 @@ func (o *PcloudVpnconnectionsNetworksDeleteInternalServerError) Code() int { } func (o *PcloudVpnconnectionsNetworksDeleteInternalServerError) Error() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}/networks][%d] pcloudVpnconnectionsNetworksDeleteInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}/networks][%d] pcloudVpnconnectionsNetworksDeleteInternalServerError %s", 500, payload) } func (o *PcloudVpnconnectionsNetworksDeleteInternalServerError) String() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}/networks][%d] pcloudVpnconnectionsNetworksDeleteInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}/networks][%d] pcloudVpnconnectionsNetworksDeleteInternalServerError %s", 500, payload) } func (o *PcloudVpnconnectionsNetworksDeleteInternalServerError) GetPayload() *models.Error { diff --git a/power/client/p_cloud_v_p_n_connections/pcloud_vpnconnections_networks_get_responses.go b/power/client/p_cloud_v_p_n_connections/pcloud_vpnconnections_networks_get_responses.go index d7a825bb..4a496ffe 100644 --- a/power/client/p_cloud_v_p_n_connections/pcloud_vpnconnections_networks_get_responses.go +++ b/power/client/p_cloud_v_p_n_connections/pcloud_vpnconnections_networks_get_responses.go @@ -6,6 +6,7 @@ package p_cloud_v_p_n_connections // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -109,11 +110,13 @@ func (o *PcloudVpnconnectionsNetworksGetOK) Code() int { } func (o *PcloudVpnconnectionsNetworksGetOK) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}/networks][%d] pcloudVpnconnectionsNetworksGetOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}/networks][%d] pcloudVpnconnectionsNetworksGetOK %s", 200, payload) } func (o *PcloudVpnconnectionsNetworksGetOK) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}/networks][%d] pcloudVpnconnectionsNetworksGetOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}/networks][%d] pcloudVpnconnectionsNetworksGetOK %s", 200, payload) } func (o *PcloudVpnconnectionsNetworksGetOK) GetPayload() *models.NetworkIDs { @@ -177,11 +180,13 @@ func (o *PcloudVpnconnectionsNetworksGetBadRequest) Code() int { } func (o *PcloudVpnconnectionsNetworksGetBadRequest) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}/networks][%d] pcloudVpnconnectionsNetworksGetBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}/networks][%d] pcloudVpnconnectionsNetworksGetBadRequest %s", 400, payload) } func (o *PcloudVpnconnectionsNetworksGetBadRequest) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}/networks][%d] pcloudVpnconnectionsNetworksGetBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}/networks][%d] pcloudVpnconnectionsNetworksGetBadRequest %s", 400, payload) } func (o *PcloudVpnconnectionsNetworksGetBadRequest) GetPayload() *models.Error { @@ -245,11 +250,13 @@ func (o *PcloudVpnconnectionsNetworksGetUnauthorized) Code() int { } func (o *PcloudVpnconnectionsNetworksGetUnauthorized) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}/networks][%d] pcloudVpnconnectionsNetworksGetUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}/networks][%d] pcloudVpnconnectionsNetworksGetUnauthorized %s", 401, payload) } func (o *PcloudVpnconnectionsNetworksGetUnauthorized) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}/networks][%d] pcloudVpnconnectionsNetworksGetUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}/networks][%d] pcloudVpnconnectionsNetworksGetUnauthorized %s", 401, payload) } func (o *PcloudVpnconnectionsNetworksGetUnauthorized) GetPayload() *models.Error { @@ -313,11 +320,13 @@ func (o *PcloudVpnconnectionsNetworksGetForbidden) Code() int { } func (o *PcloudVpnconnectionsNetworksGetForbidden) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}/networks][%d] pcloudVpnconnectionsNetworksGetForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}/networks][%d] pcloudVpnconnectionsNetworksGetForbidden %s", 403, payload) } func (o *PcloudVpnconnectionsNetworksGetForbidden) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}/networks][%d] pcloudVpnconnectionsNetworksGetForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}/networks][%d] pcloudVpnconnectionsNetworksGetForbidden %s", 403, payload) } func (o *PcloudVpnconnectionsNetworksGetForbidden) GetPayload() *models.Error { @@ -381,11 +390,13 @@ func (o *PcloudVpnconnectionsNetworksGetNotFound) Code() int { } func (o *PcloudVpnconnectionsNetworksGetNotFound) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}/networks][%d] pcloudVpnconnectionsNetworksGetNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}/networks][%d] pcloudVpnconnectionsNetworksGetNotFound %s", 404, payload) } func (o *PcloudVpnconnectionsNetworksGetNotFound) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}/networks][%d] pcloudVpnconnectionsNetworksGetNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}/networks][%d] pcloudVpnconnectionsNetworksGetNotFound %s", 404, payload) } func (o *PcloudVpnconnectionsNetworksGetNotFound) GetPayload() *models.Error { @@ -449,11 +460,13 @@ func (o *PcloudVpnconnectionsNetworksGetInternalServerError) Code() int { } func (o *PcloudVpnconnectionsNetworksGetInternalServerError) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}/networks][%d] pcloudVpnconnectionsNetworksGetInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}/networks][%d] pcloudVpnconnectionsNetworksGetInternalServerError %s", 500, payload) } func (o *PcloudVpnconnectionsNetworksGetInternalServerError) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}/networks][%d] pcloudVpnconnectionsNetworksGetInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}/networks][%d] pcloudVpnconnectionsNetworksGetInternalServerError %s", 500, payload) } func (o *PcloudVpnconnectionsNetworksGetInternalServerError) GetPayload() *models.Error { diff --git a/power/client/p_cloud_v_p_n_connections/pcloud_vpnconnections_networks_put_responses.go b/power/client/p_cloud_v_p_n_connections/pcloud_vpnconnections_networks_put_responses.go index f88d9035..601d1d57 100644 --- a/power/client/p_cloud_v_p_n_connections/pcloud_vpnconnections_networks_put_responses.go +++ b/power/client/p_cloud_v_p_n_connections/pcloud_vpnconnections_networks_put_responses.go @@ -6,6 +6,7 @@ package p_cloud_v_p_n_connections // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -115,11 +116,13 @@ func (o *PcloudVpnconnectionsNetworksPutAccepted) Code() int { } func (o *PcloudVpnconnectionsNetworksPutAccepted) Error() string { - return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}/networks][%d] pcloudVpnconnectionsNetworksPutAccepted %+v", 202, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}/networks][%d] pcloudVpnconnectionsNetworksPutAccepted %s", 202, payload) } func (o *PcloudVpnconnectionsNetworksPutAccepted) String() string { - return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}/networks][%d] pcloudVpnconnectionsNetworksPutAccepted %+v", 202, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}/networks][%d] pcloudVpnconnectionsNetworksPutAccepted %s", 202, payload) } func (o *PcloudVpnconnectionsNetworksPutAccepted) GetPayload() *models.JobReference { @@ -183,11 +186,13 @@ func (o *PcloudVpnconnectionsNetworksPutBadRequest) Code() int { } func (o *PcloudVpnconnectionsNetworksPutBadRequest) Error() string { - return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}/networks][%d] pcloudVpnconnectionsNetworksPutBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}/networks][%d] pcloudVpnconnectionsNetworksPutBadRequest %s", 400, payload) } func (o *PcloudVpnconnectionsNetworksPutBadRequest) String() string { - return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}/networks][%d] pcloudVpnconnectionsNetworksPutBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}/networks][%d] pcloudVpnconnectionsNetworksPutBadRequest %s", 400, payload) } func (o *PcloudVpnconnectionsNetworksPutBadRequest) GetPayload() *models.Error { @@ -251,11 +256,13 @@ func (o *PcloudVpnconnectionsNetworksPutUnauthorized) Code() int { } func (o *PcloudVpnconnectionsNetworksPutUnauthorized) Error() string { - return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}/networks][%d] pcloudVpnconnectionsNetworksPutUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}/networks][%d] pcloudVpnconnectionsNetworksPutUnauthorized %s", 401, payload) } func (o *PcloudVpnconnectionsNetworksPutUnauthorized) String() string { - return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}/networks][%d] pcloudVpnconnectionsNetworksPutUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}/networks][%d] pcloudVpnconnectionsNetworksPutUnauthorized %s", 401, payload) } func (o *PcloudVpnconnectionsNetworksPutUnauthorized) GetPayload() *models.Error { @@ -319,11 +326,13 @@ func (o *PcloudVpnconnectionsNetworksPutForbidden) Code() int { } func (o *PcloudVpnconnectionsNetworksPutForbidden) Error() string { - return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}/networks][%d] pcloudVpnconnectionsNetworksPutForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}/networks][%d] pcloudVpnconnectionsNetworksPutForbidden %s", 403, payload) } func (o *PcloudVpnconnectionsNetworksPutForbidden) String() string { - return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}/networks][%d] pcloudVpnconnectionsNetworksPutForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}/networks][%d] pcloudVpnconnectionsNetworksPutForbidden %s", 403, payload) } func (o *PcloudVpnconnectionsNetworksPutForbidden) GetPayload() *models.Error { @@ -387,11 +396,13 @@ func (o *PcloudVpnconnectionsNetworksPutNotFound) Code() int { } func (o *PcloudVpnconnectionsNetworksPutNotFound) Error() string { - return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}/networks][%d] pcloudVpnconnectionsNetworksPutNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}/networks][%d] pcloudVpnconnectionsNetworksPutNotFound %s", 404, payload) } func (o *PcloudVpnconnectionsNetworksPutNotFound) String() string { - return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}/networks][%d] pcloudVpnconnectionsNetworksPutNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}/networks][%d] pcloudVpnconnectionsNetworksPutNotFound %s", 404, payload) } func (o *PcloudVpnconnectionsNetworksPutNotFound) GetPayload() *models.Error { @@ -455,11 +466,13 @@ func (o *PcloudVpnconnectionsNetworksPutUnprocessableEntity) Code() int { } func (o *PcloudVpnconnectionsNetworksPutUnprocessableEntity) Error() string { - return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}/networks][%d] pcloudVpnconnectionsNetworksPutUnprocessableEntity %+v", 422, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}/networks][%d] pcloudVpnconnectionsNetworksPutUnprocessableEntity %s", 422, payload) } func (o *PcloudVpnconnectionsNetworksPutUnprocessableEntity) String() string { - return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}/networks][%d] pcloudVpnconnectionsNetworksPutUnprocessableEntity %+v", 422, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}/networks][%d] pcloudVpnconnectionsNetworksPutUnprocessableEntity %s", 422, payload) } func (o *PcloudVpnconnectionsNetworksPutUnprocessableEntity) GetPayload() *models.Error { @@ -523,11 +536,13 @@ func (o *PcloudVpnconnectionsNetworksPutInternalServerError) Code() int { } func (o *PcloudVpnconnectionsNetworksPutInternalServerError) Error() string { - return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}/networks][%d] pcloudVpnconnectionsNetworksPutInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}/networks][%d] pcloudVpnconnectionsNetworksPutInternalServerError %s", 500, payload) } func (o *PcloudVpnconnectionsNetworksPutInternalServerError) String() string { - return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}/networks][%d] pcloudVpnconnectionsNetworksPutInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}/networks][%d] pcloudVpnconnectionsNetworksPutInternalServerError %s", 500, payload) } func (o *PcloudVpnconnectionsNetworksPutInternalServerError) GetPayload() *models.Error { diff --git a/power/client/p_cloud_v_p_n_connections/pcloud_vpnconnections_peersubnets_delete_responses.go b/power/client/p_cloud_v_p_n_connections/pcloud_vpnconnections_peersubnets_delete_responses.go index 7679711f..8ef0944e 100644 --- a/power/client/p_cloud_v_p_n_connections/pcloud_vpnconnections_peersubnets_delete_responses.go +++ b/power/client/p_cloud_v_p_n_connections/pcloud_vpnconnections_peersubnets_delete_responses.go @@ -6,6 +6,7 @@ package p_cloud_v_p_n_connections // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -115,11 +116,13 @@ func (o *PcloudVpnconnectionsPeersubnetsDeleteOK) Code() int { } func (o *PcloudVpnconnectionsPeersubnetsDeleteOK) Error() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}/peer-subnets][%d] pcloudVpnconnectionsPeersubnetsDeleteOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}/peer-subnets][%d] pcloudVpnconnectionsPeersubnetsDeleteOK %s", 200, payload) } func (o *PcloudVpnconnectionsPeersubnetsDeleteOK) String() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}/peer-subnets][%d] pcloudVpnconnectionsPeersubnetsDeleteOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}/peer-subnets][%d] pcloudVpnconnectionsPeersubnetsDeleteOK %s", 200, payload) } func (o *PcloudVpnconnectionsPeersubnetsDeleteOK) GetPayload() *models.PeerSubnets { @@ -183,11 +186,13 @@ func (o *PcloudVpnconnectionsPeersubnetsDeleteBadRequest) Code() int { } func (o *PcloudVpnconnectionsPeersubnetsDeleteBadRequest) Error() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}/peer-subnets][%d] pcloudVpnconnectionsPeersubnetsDeleteBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}/peer-subnets][%d] pcloudVpnconnectionsPeersubnetsDeleteBadRequest %s", 400, payload) } func (o *PcloudVpnconnectionsPeersubnetsDeleteBadRequest) String() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}/peer-subnets][%d] pcloudVpnconnectionsPeersubnetsDeleteBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}/peer-subnets][%d] pcloudVpnconnectionsPeersubnetsDeleteBadRequest %s", 400, payload) } func (o *PcloudVpnconnectionsPeersubnetsDeleteBadRequest) GetPayload() *models.Error { @@ -251,11 +256,13 @@ func (o *PcloudVpnconnectionsPeersubnetsDeleteUnauthorized) Code() int { } func (o *PcloudVpnconnectionsPeersubnetsDeleteUnauthorized) Error() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}/peer-subnets][%d] pcloudVpnconnectionsPeersubnetsDeleteUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}/peer-subnets][%d] pcloudVpnconnectionsPeersubnetsDeleteUnauthorized %s", 401, payload) } func (o *PcloudVpnconnectionsPeersubnetsDeleteUnauthorized) String() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}/peer-subnets][%d] pcloudVpnconnectionsPeersubnetsDeleteUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}/peer-subnets][%d] pcloudVpnconnectionsPeersubnetsDeleteUnauthorized %s", 401, payload) } func (o *PcloudVpnconnectionsPeersubnetsDeleteUnauthorized) GetPayload() *models.Error { @@ -319,11 +326,13 @@ func (o *PcloudVpnconnectionsPeersubnetsDeleteForbidden) Code() int { } func (o *PcloudVpnconnectionsPeersubnetsDeleteForbidden) Error() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}/peer-subnets][%d] pcloudVpnconnectionsPeersubnetsDeleteForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}/peer-subnets][%d] pcloudVpnconnectionsPeersubnetsDeleteForbidden %s", 403, payload) } func (o *PcloudVpnconnectionsPeersubnetsDeleteForbidden) String() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}/peer-subnets][%d] pcloudVpnconnectionsPeersubnetsDeleteForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}/peer-subnets][%d] pcloudVpnconnectionsPeersubnetsDeleteForbidden %s", 403, payload) } func (o *PcloudVpnconnectionsPeersubnetsDeleteForbidden) GetPayload() *models.Error { @@ -387,11 +396,13 @@ func (o *PcloudVpnconnectionsPeersubnetsDeleteNotFound) Code() int { } func (o *PcloudVpnconnectionsPeersubnetsDeleteNotFound) Error() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}/peer-subnets][%d] pcloudVpnconnectionsPeersubnetsDeleteNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}/peer-subnets][%d] pcloudVpnconnectionsPeersubnetsDeleteNotFound %s", 404, payload) } func (o *PcloudVpnconnectionsPeersubnetsDeleteNotFound) String() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}/peer-subnets][%d] pcloudVpnconnectionsPeersubnetsDeleteNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}/peer-subnets][%d] pcloudVpnconnectionsPeersubnetsDeleteNotFound %s", 404, payload) } func (o *PcloudVpnconnectionsPeersubnetsDeleteNotFound) GetPayload() *models.Error { @@ -455,11 +466,13 @@ func (o *PcloudVpnconnectionsPeersubnetsDeleteUnprocessableEntity) Code() int { } func (o *PcloudVpnconnectionsPeersubnetsDeleteUnprocessableEntity) Error() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}/peer-subnets][%d] pcloudVpnconnectionsPeersubnetsDeleteUnprocessableEntity %+v", 422, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}/peer-subnets][%d] pcloudVpnconnectionsPeersubnetsDeleteUnprocessableEntity %s", 422, payload) } func (o *PcloudVpnconnectionsPeersubnetsDeleteUnprocessableEntity) String() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}/peer-subnets][%d] pcloudVpnconnectionsPeersubnetsDeleteUnprocessableEntity %+v", 422, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}/peer-subnets][%d] pcloudVpnconnectionsPeersubnetsDeleteUnprocessableEntity %s", 422, payload) } func (o *PcloudVpnconnectionsPeersubnetsDeleteUnprocessableEntity) GetPayload() *models.Error { @@ -523,11 +536,13 @@ func (o *PcloudVpnconnectionsPeersubnetsDeleteInternalServerError) Code() int { } func (o *PcloudVpnconnectionsPeersubnetsDeleteInternalServerError) Error() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}/peer-subnets][%d] pcloudVpnconnectionsPeersubnetsDeleteInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}/peer-subnets][%d] pcloudVpnconnectionsPeersubnetsDeleteInternalServerError %s", 500, payload) } func (o *PcloudVpnconnectionsPeersubnetsDeleteInternalServerError) String() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}/peer-subnets][%d] pcloudVpnconnectionsPeersubnetsDeleteInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}/peer-subnets][%d] pcloudVpnconnectionsPeersubnetsDeleteInternalServerError %s", 500, payload) } func (o *PcloudVpnconnectionsPeersubnetsDeleteInternalServerError) GetPayload() *models.Error { diff --git a/power/client/p_cloud_v_p_n_connections/pcloud_vpnconnections_peersubnets_get_responses.go b/power/client/p_cloud_v_p_n_connections/pcloud_vpnconnections_peersubnets_get_responses.go index b441a2ad..6dd71e97 100644 --- a/power/client/p_cloud_v_p_n_connections/pcloud_vpnconnections_peersubnets_get_responses.go +++ b/power/client/p_cloud_v_p_n_connections/pcloud_vpnconnections_peersubnets_get_responses.go @@ -6,6 +6,7 @@ package p_cloud_v_p_n_connections // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -109,11 +110,13 @@ func (o *PcloudVpnconnectionsPeersubnetsGetOK) Code() int { } func (o *PcloudVpnconnectionsPeersubnetsGetOK) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}/peer-subnets][%d] pcloudVpnconnectionsPeersubnetsGetOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}/peer-subnets][%d] pcloudVpnconnectionsPeersubnetsGetOK %s", 200, payload) } func (o *PcloudVpnconnectionsPeersubnetsGetOK) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}/peer-subnets][%d] pcloudVpnconnectionsPeersubnetsGetOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}/peer-subnets][%d] pcloudVpnconnectionsPeersubnetsGetOK %s", 200, payload) } func (o *PcloudVpnconnectionsPeersubnetsGetOK) GetPayload() *models.PeerSubnets { @@ -177,11 +180,13 @@ func (o *PcloudVpnconnectionsPeersubnetsGetBadRequest) Code() int { } func (o *PcloudVpnconnectionsPeersubnetsGetBadRequest) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}/peer-subnets][%d] pcloudVpnconnectionsPeersubnetsGetBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}/peer-subnets][%d] pcloudVpnconnectionsPeersubnetsGetBadRequest %s", 400, payload) } func (o *PcloudVpnconnectionsPeersubnetsGetBadRequest) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}/peer-subnets][%d] pcloudVpnconnectionsPeersubnetsGetBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}/peer-subnets][%d] pcloudVpnconnectionsPeersubnetsGetBadRequest %s", 400, payload) } func (o *PcloudVpnconnectionsPeersubnetsGetBadRequest) GetPayload() *models.Error { @@ -245,11 +250,13 @@ func (o *PcloudVpnconnectionsPeersubnetsGetUnauthorized) Code() int { } func (o *PcloudVpnconnectionsPeersubnetsGetUnauthorized) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}/peer-subnets][%d] pcloudVpnconnectionsPeersubnetsGetUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}/peer-subnets][%d] pcloudVpnconnectionsPeersubnetsGetUnauthorized %s", 401, payload) } func (o *PcloudVpnconnectionsPeersubnetsGetUnauthorized) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}/peer-subnets][%d] pcloudVpnconnectionsPeersubnetsGetUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}/peer-subnets][%d] pcloudVpnconnectionsPeersubnetsGetUnauthorized %s", 401, payload) } func (o *PcloudVpnconnectionsPeersubnetsGetUnauthorized) GetPayload() *models.Error { @@ -313,11 +320,13 @@ func (o *PcloudVpnconnectionsPeersubnetsGetForbidden) Code() int { } func (o *PcloudVpnconnectionsPeersubnetsGetForbidden) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}/peer-subnets][%d] pcloudVpnconnectionsPeersubnetsGetForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}/peer-subnets][%d] pcloudVpnconnectionsPeersubnetsGetForbidden %s", 403, payload) } func (o *PcloudVpnconnectionsPeersubnetsGetForbidden) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}/peer-subnets][%d] pcloudVpnconnectionsPeersubnetsGetForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}/peer-subnets][%d] pcloudVpnconnectionsPeersubnetsGetForbidden %s", 403, payload) } func (o *PcloudVpnconnectionsPeersubnetsGetForbidden) GetPayload() *models.Error { @@ -381,11 +390,13 @@ func (o *PcloudVpnconnectionsPeersubnetsGetNotFound) Code() int { } func (o *PcloudVpnconnectionsPeersubnetsGetNotFound) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}/peer-subnets][%d] pcloudVpnconnectionsPeersubnetsGetNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}/peer-subnets][%d] pcloudVpnconnectionsPeersubnetsGetNotFound %s", 404, payload) } func (o *PcloudVpnconnectionsPeersubnetsGetNotFound) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}/peer-subnets][%d] pcloudVpnconnectionsPeersubnetsGetNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}/peer-subnets][%d] pcloudVpnconnectionsPeersubnetsGetNotFound %s", 404, payload) } func (o *PcloudVpnconnectionsPeersubnetsGetNotFound) GetPayload() *models.Error { @@ -449,11 +460,13 @@ func (o *PcloudVpnconnectionsPeersubnetsGetInternalServerError) Code() int { } func (o *PcloudVpnconnectionsPeersubnetsGetInternalServerError) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}/peer-subnets][%d] pcloudVpnconnectionsPeersubnetsGetInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}/peer-subnets][%d] pcloudVpnconnectionsPeersubnetsGetInternalServerError %s", 500, payload) } func (o *PcloudVpnconnectionsPeersubnetsGetInternalServerError) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}/peer-subnets][%d] pcloudVpnconnectionsPeersubnetsGetInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}/peer-subnets][%d] pcloudVpnconnectionsPeersubnetsGetInternalServerError %s", 500, payload) } func (o *PcloudVpnconnectionsPeersubnetsGetInternalServerError) GetPayload() *models.Error { diff --git a/power/client/p_cloud_v_p_n_connections/pcloud_vpnconnections_peersubnets_put_responses.go b/power/client/p_cloud_v_p_n_connections/pcloud_vpnconnections_peersubnets_put_responses.go index 76504c51..a2f6e873 100644 --- a/power/client/p_cloud_v_p_n_connections/pcloud_vpnconnections_peersubnets_put_responses.go +++ b/power/client/p_cloud_v_p_n_connections/pcloud_vpnconnections_peersubnets_put_responses.go @@ -6,6 +6,7 @@ package p_cloud_v_p_n_connections // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -115,11 +116,13 @@ func (o *PcloudVpnconnectionsPeersubnetsPutOK) Code() int { } func (o *PcloudVpnconnectionsPeersubnetsPutOK) Error() string { - return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}/peer-subnets][%d] pcloudVpnconnectionsPeersubnetsPutOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}/peer-subnets][%d] pcloudVpnconnectionsPeersubnetsPutOK %s", 200, payload) } func (o *PcloudVpnconnectionsPeersubnetsPutOK) String() string { - return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}/peer-subnets][%d] pcloudVpnconnectionsPeersubnetsPutOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}/peer-subnets][%d] pcloudVpnconnectionsPeersubnetsPutOK %s", 200, payload) } func (o *PcloudVpnconnectionsPeersubnetsPutOK) GetPayload() *models.PeerSubnets { @@ -183,11 +186,13 @@ func (o *PcloudVpnconnectionsPeersubnetsPutBadRequest) Code() int { } func (o *PcloudVpnconnectionsPeersubnetsPutBadRequest) Error() string { - return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}/peer-subnets][%d] pcloudVpnconnectionsPeersubnetsPutBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}/peer-subnets][%d] pcloudVpnconnectionsPeersubnetsPutBadRequest %s", 400, payload) } func (o *PcloudVpnconnectionsPeersubnetsPutBadRequest) String() string { - return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}/peer-subnets][%d] pcloudVpnconnectionsPeersubnetsPutBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}/peer-subnets][%d] pcloudVpnconnectionsPeersubnetsPutBadRequest %s", 400, payload) } func (o *PcloudVpnconnectionsPeersubnetsPutBadRequest) GetPayload() *models.Error { @@ -251,11 +256,13 @@ func (o *PcloudVpnconnectionsPeersubnetsPutUnauthorized) Code() int { } func (o *PcloudVpnconnectionsPeersubnetsPutUnauthorized) Error() string { - return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}/peer-subnets][%d] pcloudVpnconnectionsPeersubnetsPutUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}/peer-subnets][%d] pcloudVpnconnectionsPeersubnetsPutUnauthorized %s", 401, payload) } func (o *PcloudVpnconnectionsPeersubnetsPutUnauthorized) String() string { - return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}/peer-subnets][%d] pcloudVpnconnectionsPeersubnetsPutUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}/peer-subnets][%d] pcloudVpnconnectionsPeersubnetsPutUnauthorized %s", 401, payload) } func (o *PcloudVpnconnectionsPeersubnetsPutUnauthorized) GetPayload() *models.Error { @@ -319,11 +326,13 @@ func (o *PcloudVpnconnectionsPeersubnetsPutForbidden) Code() int { } func (o *PcloudVpnconnectionsPeersubnetsPutForbidden) Error() string { - return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}/peer-subnets][%d] pcloudVpnconnectionsPeersubnetsPutForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}/peer-subnets][%d] pcloudVpnconnectionsPeersubnetsPutForbidden %s", 403, payload) } func (o *PcloudVpnconnectionsPeersubnetsPutForbidden) String() string { - return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}/peer-subnets][%d] pcloudVpnconnectionsPeersubnetsPutForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}/peer-subnets][%d] pcloudVpnconnectionsPeersubnetsPutForbidden %s", 403, payload) } func (o *PcloudVpnconnectionsPeersubnetsPutForbidden) GetPayload() *models.Error { @@ -387,11 +396,13 @@ func (o *PcloudVpnconnectionsPeersubnetsPutNotFound) Code() int { } func (o *PcloudVpnconnectionsPeersubnetsPutNotFound) Error() string { - return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}/peer-subnets][%d] pcloudVpnconnectionsPeersubnetsPutNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}/peer-subnets][%d] pcloudVpnconnectionsPeersubnetsPutNotFound %s", 404, payload) } func (o *PcloudVpnconnectionsPeersubnetsPutNotFound) String() string { - return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}/peer-subnets][%d] pcloudVpnconnectionsPeersubnetsPutNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}/peer-subnets][%d] pcloudVpnconnectionsPeersubnetsPutNotFound %s", 404, payload) } func (o *PcloudVpnconnectionsPeersubnetsPutNotFound) GetPayload() *models.Error { @@ -455,11 +466,13 @@ func (o *PcloudVpnconnectionsPeersubnetsPutUnprocessableEntity) Code() int { } func (o *PcloudVpnconnectionsPeersubnetsPutUnprocessableEntity) Error() string { - return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}/peer-subnets][%d] pcloudVpnconnectionsPeersubnetsPutUnprocessableEntity %+v", 422, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}/peer-subnets][%d] pcloudVpnconnectionsPeersubnetsPutUnprocessableEntity %s", 422, payload) } func (o *PcloudVpnconnectionsPeersubnetsPutUnprocessableEntity) String() string { - return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}/peer-subnets][%d] pcloudVpnconnectionsPeersubnetsPutUnprocessableEntity %+v", 422, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}/peer-subnets][%d] pcloudVpnconnectionsPeersubnetsPutUnprocessableEntity %s", 422, payload) } func (o *PcloudVpnconnectionsPeersubnetsPutUnprocessableEntity) GetPayload() *models.Error { @@ -523,11 +536,13 @@ func (o *PcloudVpnconnectionsPeersubnetsPutInternalServerError) Code() int { } func (o *PcloudVpnconnectionsPeersubnetsPutInternalServerError) Error() string { - return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}/peer-subnets][%d] pcloudVpnconnectionsPeersubnetsPutInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}/peer-subnets][%d] pcloudVpnconnectionsPeersubnetsPutInternalServerError %s", 500, payload) } func (o *PcloudVpnconnectionsPeersubnetsPutInternalServerError) String() string { - return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}/peer-subnets][%d] pcloudVpnconnectionsPeersubnetsPutInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}/peer-subnets][%d] pcloudVpnconnectionsPeersubnetsPutInternalServerError %s", 500, payload) } func (o *PcloudVpnconnectionsPeersubnetsPutInternalServerError) GetPayload() *models.Error { diff --git a/power/client/p_cloud_v_p_n_connections/pcloud_vpnconnections_post_responses.go b/power/client/p_cloud_v_p_n_connections/pcloud_vpnconnections_post_responses.go index 8f25af04..7306c239 100644 --- a/power/client/p_cloud_v_p_n_connections/pcloud_vpnconnections_post_responses.go +++ b/power/client/p_cloud_v_p_n_connections/pcloud_vpnconnections_post_responses.go @@ -6,6 +6,7 @@ package p_cloud_v_p_n_connections // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -127,11 +128,13 @@ func (o *PcloudVpnconnectionsPostAccepted) Code() int { } func (o *PcloudVpnconnectionsPostAccepted) Error() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections][%d] pcloudVpnconnectionsPostAccepted %+v", 202, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections][%d] pcloudVpnconnectionsPostAccepted %s", 202, payload) } func (o *PcloudVpnconnectionsPostAccepted) String() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections][%d] pcloudVpnconnectionsPostAccepted %+v", 202, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections][%d] pcloudVpnconnectionsPostAccepted %s", 202, payload) } func (o *PcloudVpnconnectionsPostAccepted) GetPayload() *models.VPNConnectionCreateResponse { @@ -195,11 +198,13 @@ func (o *PcloudVpnconnectionsPostBadRequest) Code() int { } func (o *PcloudVpnconnectionsPostBadRequest) Error() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections][%d] pcloudVpnconnectionsPostBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections][%d] pcloudVpnconnectionsPostBadRequest %s", 400, payload) } func (o *PcloudVpnconnectionsPostBadRequest) String() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections][%d] pcloudVpnconnectionsPostBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections][%d] pcloudVpnconnectionsPostBadRequest %s", 400, payload) } func (o *PcloudVpnconnectionsPostBadRequest) GetPayload() *models.Error { @@ -263,11 +268,13 @@ func (o *PcloudVpnconnectionsPostUnauthorized) Code() int { } func (o *PcloudVpnconnectionsPostUnauthorized) Error() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections][%d] pcloudVpnconnectionsPostUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections][%d] pcloudVpnconnectionsPostUnauthorized %s", 401, payload) } func (o *PcloudVpnconnectionsPostUnauthorized) String() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections][%d] pcloudVpnconnectionsPostUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections][%d] pcloudVpnconnectionsPostUnauthorized %s", 401, payload) } func (o *PcloudVpnconnectionsPostUnauthorized) GetPayload() *models.Error { @@ -331,11 +338,13 @@ func (o *PcloudVpnconnectionsPostForbidden) Code() int { } func (o *PcloudVpnconnectionsPostForbidden) Error() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections][%d] pcloudVpnconnectionsPostForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections][%d] pcloudVpnconnectionsPostForbidden %s", 403, payload) } func (o *PcloudVpnconnectionsPostForbidden) String() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections][%d] pcloudVpnconnectionsPostForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections][%d] pcloudVpnconnectionsPostForbidden %s", 403, payload) } func (o *PcloudVpnconnectionsPostForbidden) GetPayload() *models.Error { @@ -399,11 +408,13 @@ func (o *PcloudVpnconnectionsPostNotFound) Code() int { } func (o *PcloudVpnconnectionsPostNotFound) Error() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections][%d] pcloudVpnconnectionsPostNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections][%d] pcloudVpnconnectionsPostNotFound %s", 404, payload) } func (o *PcloudVpnconnectionsPostNotFound) String() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections][%d] pcloudVpnconnectionsPostNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections][%d] pcloudVpnconnectionsPostNotFound %s", 404, payload) } func (o *PcloudVpnconnectionsPostNotFound) GetPayload() *models.Error { @@ -467,11 +478,13 @@ func (o *PcloudVpnconnectionsPostMethodNotAllowed) Code() int { } func (o *PcloudVpnconnectionsPostMethodNotAllowed) Error() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections][%d] pcloudVpnconnectionsPostMethodNotAllowed %+v", 405, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections][%d] pcloudVpnconnectionsPostMethodNotAllowed %s", 405, payload) } func (o *PcloudVpnconnectionsPostMethodNotAllowed) String() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections][%d] pcloudVpnconnectionsPostMethodNotAllowed %+v", 405, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections][%d] pcloudVpnconnectionsPostMethodNotAllowed %s", 405, payload) } func (o *PcloudVpnconnectionsPostMethodNotAllowed) GetPayload() *models.Error { @@ -535,11 +548,13 @@ func (o *PcloudVpnconnectionsPostConflict) Code() int { } func (o *PcloudVpnconnectionsPostConflict) Error() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections][%d] pcloudVpnconnectionsPostConflict %+v", 409, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections][%d] pcloudVpnconnectionsPostConflict %s", 409, payload) } func (o *PcloudVpnconnectionsPostConflict) String() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections][%d] pcloudVpnconnectionsPostConflict %+v", 409, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections][%d] pcloudVpnconnectionsPostConflict %s", 409, payload) } func (o *PcloudVpnconnectionsPostConflict) GetPayload() *models.Error { @@ -603,11 +618,13 @@ func (o *PcloudVpnconnectionsPostUnprocessableEntity) Code() int { } func (o *PcloudVpnconnectionsPostUnprocessableEntity) Error() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections][%d] pcloudVpnconnectionsPostUnprocessableEntity %+v", 422, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections][%d] pcloudVpnconnectionsPostUnprocessableEntity %s", 422, payload) } func (o *PcloudVpnconnectionsPostUnprocessableEntity) String() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections][%d] pcloudVpnconnectionsPostUnprocessableEntity %+v", 422, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections][%d] pcloudVpnconnectionsPostUnprocessableEntity %s", 422, payload) } func (o *PcloudVpnconnectionsPostUnprocessableEntity) GetPayload() *models.Error { @@ -671,11 +688,13 @@ func (o *PcloudVpnconnectionsPostInternalServerError) Code() int { } func (o *PcloudVpnconnectionsPostInternalServerError) Error() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections][%d] pcloudVpnconnectionsPostInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections][%d] pcloudVpnconnectionsPostInternalServerError %s", 500, payload) } func (o *PcloudVpnconnectionsPostInternalServerError) String() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections][%d] pcloudVpnconnectionsPostInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections][%d] pcloudVpnconnectionsPostInternalServerError %s", 500, payload) } func (o *PcloudVpnconnectionsPostInternalServerError) GetPayload() *models.Error { diff --git a/power/client/p_cloud_v_p_n_connections/pcloud_vpnconnections_put_responses.go b/power/client/p_cloud_v_p_n_connections/pcloud_vpnconnections_put_responses.go index d5e359eb..fd3b6409 100644 --- a/power/client/p_cloud_v_p_n_connections/pcloud_vpnconnections_put_responses.go +++ b/power/client/p_cloud_v_p_n_connections/pcloud_vpnconnections_put_responses.go @@ -6,6 +6,7 @@ package p_cloud_v_p_n_connections // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -115,11 +116,13 @@ func (o *PcloudVpnconnectionsPutOK) Code() int { } func (o *PcloudVpnconnectionsPutOK) Error() string { - return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}][%d] pcloudVpnconnectionsPutOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}][%d] pcloudVpnconnectionsPutOK %s", 200, payload) } func (o *PcloudVpnconnectionsPutOK) String() string { - return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}][%d] pcloudVpnconnectionsPutOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}][%d] pcloudVpnconnectionsPutOK %s", 200, payload) } func (o *PcloudVpnconnectionsPutOK) GetPayload() *models.VPNConnection { @@ -183,11 +186,13 @@ func (o *PcloudVpnconnectionsPutBadRequest) Code() int { } func (o *PcloudVpnconnectionsPutBadRequest) Error() string { - return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}][%d] pcloudVpnconnectionsPutBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}][%d] pcloudVpnconnectionsPutBadRequest %s", 400, payload) } func (o *PcloudVpnconnectionsPutBadRequest) String() string { - return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}][%d] pcloudVpnconnectionsPutBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}][%d] pcloudVpnconnectionsPutBadRequest %s", 400, payload) } func (o *PcloudVpnconnectionsPutBadRequest) GetPayload() *models.Error { @@ -251,11 +256,13 @@ func (o *PcloudVpnconnectionsPutUnauthorized) Code() int { } func (o *PcloudVpnconnectionsPutUnauthorized) Error() string { - return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}][%d] pcloudVpnconnectionsPutUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}][%d] pcloudVpnconnectionsPutUnauthorized %s", 401, payload) } func (o *PcloudVpnconnectionsPutUnauthorized) String() string { - return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}][%d] pcloudVpnconnectionsPutUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}][%d] pcloudVpnconnectionsPutUnauthorized %s", 401, payload) } func (o *PcloudVpnconnectionsPutUnauthorized) GetPayload() *models.Error { @@ -319,11 +326,13 @@ func (o *PcloudVpnconnectionsPutForbidden) Code() int { } func (o *PcloudVpnconnectionsPutForbidden) Error() string { - return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}][%d] pcloudVpnconnectionsPutForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}][%d] pcloudVpnconnectionsPutForbidden %s", 403, payload) } func (o *PcloudVpnconnectionsPutForbidden) String() string { - return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}][%d] pcloudVpnconnectionsPutForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}][%d] pcloudVpnconnectionsPutForbidden %s", 403, payload) } func (o *PcloudVpnconnectionsPutForbidden) GetPayload() *models.Error { @@ -387,11 +396,13 @@ func (o *PcloudVpnconnectionsPutNotFound) Code() int { } func (o *PcloudVpnconnectionsPutNotFound) Error() string { - return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}][%d] pcloudVpnconnectionsPutNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}][%d] pcloudVpnconnectionsPutNotFound %s", 404, payload) } func (o *PcloudVpnconnectionsPutNotFound) String() string { - return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}][%d] pcloudVpnconnectionsPutNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}][%d] pcloudVpnconnectionsPutNotFound %s", 404, payload) } func (o *PcloudVpnconnectionsPutNotFound) GetPayload() *models.Error { @@ -455,11 +466,13 @@ func (o *PcloudVpnconnectionsPutUnprocessableEntity) Code() int { } func (o *PcloudVpnconnectionsPutUnprocessableEntity) Error() string { - return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}][%d] pcloudVpnconnectionsPutUnprocessableEntity %+v", 422, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}][%d] pcloudVpnconnectionsPutUnprocessableEntity %s", 422, payload) } func (o *PcloudVpnconnectionsPutUnprocessableEntity) String() string { - return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}][%d] pcloudVpnconnectionsPutUnprocessableEntity %+v", 422, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}][%d] pcloudVpnconnectionsPutUnprocessableEntity %s", 422, payload) } func (o *PcloudVpnconnectionsPutUnprocessableEntity) GetPayload() *models.Error { @@ -523,11 +536,13 @@ func (o *PcloudVpnconnectionsPutInternalServerError) Code() int { } func (o *PcloudVpnconnectionsPutInternalServerError) Error() string { - return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}][%d] pcloudVpnconnectionsPutInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}][%d] pcloudVpnconnectionsPutInternalServerError %s", 500, payload) } func (o *PcloudVpnconnectionsPutInternalServerError) String() string { - return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}][%d] pcloudVpnconnectionsPutInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}][%d] pcloudVpnconnectionsPutInternalServerError %s", 500, payload) } func (o *PcloudVpnconnectionsPutInternalServerError) GetPayload() *models.Error { diff --git a/power/client/p_cloud_v_p_n_policies/p_cloudvpn_policies_client.go b/power/client/p_cloud_v_p_n_policies/p_cloudvpn_policies_client.go index 65300d6d..0184c9da 100644 --- a/power/client/p_cloud_v_p_n_policies/p_cloudvpn_policies_client.go +++ b/power/client/p_cloud_v_p_n_policies/p_cloudvpn_policies_client.go @@ -9,6 +9,7 @@ import ( "fmt" "github.com/go-openapi/runtime" + httptransport "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" ) @@ -17,6 +18,31 @@ func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientServi return &Client{transport: transport, formats: formats} } +// New creates a new p cloud v p n policies API client with basic auth credentials. +// It takes the following parameters: +// - host: http host (github.com). +// - basePath: any base path for the API client ("/v1", "/v3"). +// - scheme: http scheme ("http", "https"). +// - user: user for basic authentication header. +// - password: password for basic authentication header. +func NewClientWithBasicAuth(host, basePath, scheme, user, password string) ClientService { + transport := httptransport.New(host, basePath, []string{scheme}) + transport.DefaultAuthentication = httptransport.BasicAuth(user, password) + return &Client{transport: transport, formats: strfmt.Default} +} + +// New creates a new p cloud v p n policies API client with a bearer token for authentication. +// It takes the following parameters: +// - host: http host (github.com). +// - basePath: any base path for the API client ("/v1", "/v3"). +// - scheme: http scheme ("http", "https"). +// - bearerToken: bearer token for Bearer authentication header. +func NewClientWithBearerToken(host, basePath, scheme, bearerToken string) ClientService { + transport := httptransport.New(host, basePath, []string{scheme}) + transport.DefaultAuthentication = httptransport.BearerToken(bearerToken) + return &Client{transport: transport, formats: strfmt.Default} +} + /* Client for p cloud v p n policies API */ @@ -25,7 +51,7 @@ type Client struct { formats strfmt.Registry } -// ClientOption is the option for Client methods +// ClientOption may be used to customize the behavior of Client methods. type ClientOption func(*runtime.ClientOperation) // ClientService is the interface for Client methods diff --git a/power/client/p_cloud_v_p_n_policies/pcloud_ikepolicies_delete_responses.go b/power/client/p_cloud_v_p_n_policies/pcloud_ikepolicies_delete_responses.go index 353903c5..642873dc 100644 --- a/power/client/p_cloud_v_p_n_policies/pcloud_ikepolicies_delete_responses.go +++ b/power/client/p_cloud_v_p_n_policies/pcloud_ikepolicies_delete_responses.go @@ -6,6 +6,7 @@ package p_cloud_v_p_n_policies // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -109,11 +110,13 @@ func (o *PcloudIkepoliciesDeleteOK) Code() int { } func (o *PcloudIkepoliciesDeleteOK) Error() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ike-policies/{ike_policy_id}][%d] pcloudIkepoliciesDeleteOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ike-policies/{ike_policy_id}][%d] pcloudIkepoliciesDeleteOK %s", 200, payload) } func (o *PcloudIkepoliciesDeleteOK) String() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ike-policies/{ike_policy_id}][%d] pcloudIkepoliciesDeleteOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ike-policies/{ike_policy_id}][%d] pcloudIkepoliciesDeleteOK %s", 200, payload) } func (o *PcloudIkepoliciesDeleteOK) GetPayload() models.Object { @@ -175,11 +178,13 @@ func (o *PcloudIkepoliciesDeleteBadRequest) Code() int { } func (o *PcloudIkepoliciesDeleteBadRequest) Error() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ike-policies/{ike_policy_id}][%d] pcloudIkepoliciesDeleteBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ike-policies/{ike_policy_id}][%d] pcloudIkepoliciesDeleteBadRequest %s", 400, payload) } func (o *PcloudIkepoliciesDeleteBadRequest) String() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ike-policies/{ike_policy_id}][%d] pcloudIkepoliciesDeleteBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ike-policies/{ike_policy_id}][%d] pcloudIkepoliciesDeleteBadRequest %s", 400, payload) } func (o *PcloudIkepoliciesDeleteBadRequest) GetPayload() *models.Error { @@ -243,11 +248,13 @@ func (o *PcloudIkepoliciesDeleteUnauthorized) Code() int { } func (o *PcloudIkepoliciesDeleteUnauthorized) Error() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ike-policies/{ike_policy_id}][%d] pcloudIkepoliciesDeleteUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ike-policies/{ike_policy_id}][%d] pcloudIkepoliciesDeleteUnauthorized %s", 401, payload) } func (o *PcloudIkepoliciesDeleteUnauthorized) String() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ike-policies/{ike_policy_id}][%d] pcloudIkepoliciesDeleteUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ike-policies/{ike_policy_id}][%d] pcloudIkepoliciesDeleteUnauthorized %s", 401, payload) } func (o *PcloudIkepoliciesDeleteUnauthorized) GetPayload() *models.Error { @@ -311,11 +318,13 @@ func (o *PcloudIkepoliciesDeleteForbidden) Code() int { } func (o *PcloudIkepoliciesDeleteForbidden) Error() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ike-policies/{ike_policy_id}][%d] pcloudIkepoliciesDeleteForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ike-policies/{ike_policy_id}][%d] pcloudIkepoliciesDeleteForbidden %s", 403, payload) } func (o *PcloudIkepoliciesDeleteForbidden) String() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ike-policies/{ike_policy_id}][%d] pcloudIkepoliciesDeleteForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ike-policies/{ike_policy_id}][%d] pcloudIkepoliciesDeleteForbidden %s", 403, payload) } func (o *PcloudIkepoliciesDeleteForbidden) GetPayload() *models.Error { @@ -379,11 +388,13 @@ func (o *PcloudIkepoliciesDeleteNotFound) Code() int { } func (o *PcloudIkepoliciesDeleteNotFound) Error() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ike-policies/{ike_policy_id}][%d] pcloudIkepoliciesDeleteNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ike-policies/{ike_policy_id}][%d] pcloudIkepoliciesDeleteNotFound %s", 404, payload) } func (o *PcloudIkepoliciesDeleteNotFound) String() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ike-policies/{ike_policy_id}][%d] pcloudIkepoliciesDeleteNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ike-policies/{ike_policy_id}][%d] pcloudIkepoliciesDeleteNotFound %s", 404, payload) } func (o *PcloudIkepoliciesDeleteNotFound) GetPayload() *models.Error { @@ -447,11 +458,13 @@ func (o *PcloudIkepoliciesDeleteInternalServerError) Code() int { } func (o *PcloudIkepoliciesDeleteInternalServerError) Error() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ike-policies/{ike_policy_id}][%d] pcloudIkepoliciesDeleteInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ike-policies/{ike_policy_id}][%d] pcloudIkepoliciesDeleteInternalServerError %s", 500, payload) } func (o *PcloudIkepoliciesDeleteInternalServerError) String() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ike-policies/{ike_policy_id}][%d] pcloudIkepoliciesDeleteInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ike-policies/{ike_policy_id}][%d] pcloudIkepoliciesDeleteInternalServerError %s", 500, payload) } func (o *PcloudIkepoliciesDeleteInternalServerError) GetPayload() *models.Error { diff --git a/power/client/p_cloud_v_p_n_policies/pcloud_ikepolicies_get_responses.go b/power/client/p_cloud_v_p_n_policies/pcloud_ikepolicies_get_responses.go index b8cf3d12..48687437 100644 --- a/power/client/p_cloud_v_p_n_policies/pcloud_ikepolicies_get_responses.go +++ b/power/client/p_cloud_v_p_n_policies/pcloud_ikepolicies_get_responses.go @@ -6,6 +6,7 @@ package p_cloud_v_p_n_policies // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -115,11 +116,13 @@ func (o *PcloudIkepoliciesGetOK) Code() int { } func (o *PcloudIkepoliciesGetOK) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ike-policies/{ike_policy_id}][%d] pcloudIkepoliciesGetOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ike-policies/{ike_policy_id}][%d] pcloudIkepoliciesGetOK %s", 200, payload) } func (o *PcloudIkepoliciesGetOK) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ike-policies/{ike_policy_id}][%d] pcloudIkepoliciesGetOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ike-policies/{ike_policy_id}][%d] pcloudIkepoliciesGetOK %s", 200, payload) } func (o *PcloudIkepoliciesGetOK) GetPayload() *models.IKEPolicy { @@ -183,11 +186,13 @@ func (o *PcloudIkepoliciesGetBadRequest) Code() int { } func (o *PcloudIkepoliciesGetBadRequest) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ike-policies/{ike_policy_id}][%d] pcloudIkepoliciesGetBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ike-policies/{ike_policy_id}][%d] pcloudIkepoliciesGetBadRequest %s", 400, payload) } func (o *PcloudIkepoliciesGetBadRequest) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ike-policies/{ike_policy_id}][%d] pcloudIkepoliciesGetBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ike-policies/{ike_policy_id}][%d] pcloudIkepoliciesGetBadRequest %s", 400, payload) } func (o *PcloudIkepoliciesGetBadRequest) GetPayload() *models.Error { @@ -251,11 +256,13 @@ func (o *PcloudIkepoliciesGetUnauthorized) Code() int { } func (o *PcloudIkepoliciesGetUnauthorized) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ike-policies/{ike_policy_id}][%d] pcloudIkepoliciesGetUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ike-policies/{ike_policy_id}][%d] pcloudIkepoliciesGetUnauthorized %s", 401, payload) } func (o *PcloudIkepoliciesGetUnauthorized) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ike-policies/{ike_policy_id}][%d] pcloudIkepoliciesGetUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ike-policies/{ike_policy_id}][%d] pcloudIkepoliciesGetUnauthorized %s", 401, payload) } func (o *PcloudIkepoliciesGetUnauthorized) GetPayload() *models.Error { @@ -319,11 +326,13 @@ func (o *PcloudIkepoliciesGetForbidden) Code() int { } func (o *PcloudIkepoliciesGetForbidden) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ike-policies/{ike_policy_id}][%d] pcloudIkepoliciesGetForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ike-policies/{ike_policy_id}][%d] pcloudIkepoliciesGetForbidden %s", 403, payload) } func (o *PcloudIkepoliciesGetForbidden) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ike-policies/{ike_policy_id}][%d] pcloudIkepoliciesGetForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ike-policies/{ike_policy_id}][%d] pcloudIkepoliciesGetForbidden %s", 403, payload) } func (o *PcloudIkepoliciesGetForbidden) GetPayload() *models.Error { @@ -387,11 +396,13 @@ func (o *PcloudIkepoliciesGetNotFound) Code() int { } func (o *PcloudIkepoliciesGetNotFound) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ike-policies/{ike_policy_id}][%d] pcloudIkepoliciesGetNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ike-policies/{ike_policy_id}][%d] pcloudIkepoliciesGetNotFound %s", 404, payload) } func (o *PcloudIkepoliciesGetNotFound) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ike-policies/{ike_policy_id}][%d] pcloudIkepoliciesGetNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ike-policies/{ike_policy_id}][%d] pcloudIkepoliciesGetNotFound %s", 404, payload) } func (o *PcloudIkepoliciesGetNotFound) GetPayload() *models.Error { @@ -455,11 +466,13 @@ func (o *PcloudIkepoliciesGetUnprocessableEntity) Code() int { } func (o *PcloudIkepoliciesGetUnprocessableEntity) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ike-policies/{ike_policy_id}][%d] pcloudIkepoliciesGetUnprocessableEntity %+v", 422, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ike-policies/{ike_policy_id}][%d] pcloudIkepoliciesGetUnprocessableEntity %s", 422, payload) } func (o *PcloudIkepoliciesGetUnprocessableEntity) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ike-policies/{ike_policy_id}][%d] pcloudIkepoliciesGetUnprocessableEntity %+v", 422, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ike-policies/{ike_policy_id}][%d] pcloudIkepoliciesGetUnprocessableEntity %s", 422, payload) } func (o *PcloudIkepoliciesGetUnprocessableEntity) GetPayload() *models.Error { @@ -523,11 +536,13 @@ func (o *PcloudIkepoliciesGetInternalServerError) Code() int { } func (o *PcloudIkepoliciesGetInternalServerError) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ike-policies/{ike_policy_id}][%d] pcloudIkepoliciesGetInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ike-policies/{ike_policy_id}][%d] pcloudIkepoliciesGetInternalServerError %s", 500, payload) } func (o *PcloudIkepoliciesGetInternalServerError) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ike-policies/{ike_policy_id}][%d] pcloudIkepoliciesGetInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ike-policies/{ike_policy_id}][%d] pcloudIkepoliciesGetInternalServerError %s", 500, payload) } func (o *PcloudIkepoliciesGetInternalServerError) GetPayload() *models.Error { diff --git a/power/client/p_cloud_v_p_n_policies/pcloud_ikepolicies_getall_responses.go b/power/client/p_cloud_v_p_n_policies/pcloud_ikepolicies_getall_responses.go index 26fab728..ed9eeb0d 100644 --- a/power/client/p_cloud_v_p_n_policies/pcloud_ikepolicies_getall_responses.go +++ b/power/client/p_cloud_v_p_n_policies/pcloud_ikepolicies_getall_responses.go @@ -6,6 +6,7 @@ package p_cloud_v_p_n_policies // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -109,11 +110,13 @@ func (o *PcloudIkepoliciesGetallOK) Code() int { } func (o *PcloudIkepoliciesGetallOK) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ike-policies][%d] pcloudIkepoliciesGetallOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ike-policies][%d] pcloudIkepoliciesGetallOK %s", 200, payload) } func (o *PcloudIkepoliciesGetallOK) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ike-policies][%d] pcloudIkepoliciesGetallOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ike-policies][%d] pcloudIkepoliciesGetallOK %s", 200, payload) } func (o *PcloudIkepoliciesGetallOK) GetPayload() *models.IKEPolicies { @@ -177,11 +180,13 @@ func (o *PcloudIkepoliciesGetallBadRequest) Code() int { } func (o *PcloudIkepoliciesGetallBadRequest) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ike-policies][%d] pcloudIkepoliciesGetallBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ike-policies][%d] pcloudIkepoliciesGetallBadRequest %s", 400, payload) } func (o *PcloudIkepoliciesGetallBadRequest) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ike-policies][%d] pcloudIkepoliciesGetallBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ike-policies][%d] pcloudIkepoliciesGetallBadRequest %s", 400, payload) } func (o *PcloudIkepoliciesGetallBadRequest) GetPayload() *models.Error { @@ -245,11 +250,13 @@ func (o *PcloudIkepoliciesGetallUnauthorized) Code() int { } func (o *PcloudIkepoliciesGetallUnauthorized) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ike-policies][%d] pcloudIkepoliciesGetallUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ike-policies][%d] pcloudIkepoliciesGetallUnauthorized %s", 401, payload) } func (o *PcloudIkepoliciesGetallUnauthorized) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ike-policies][%d] pcloudIkepoliciesGetallUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ike-policies][%d] pcloudIkepoliciesGetallUnauthorized %s", 401, payload) } func (o *PcloudIkepoliciesGetallUnauthorized) GetPayload() *models.Error { @@ -313,11 +320,13 @@ func (o *PcloudIkepoliciesGetallForbidden) Code() int { } func (o *PcloudIkepoliciesGetallForbidden) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ike-policies][%d] pcloudIkepoliciesGetallForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ike-policies][%d] pcloudIkepoliciesGetallForbidden %s", 403, payload) } func (o *PcloudIkepoliciesGetallForbidden) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ike-policies][%d] pcloudIkepoliciesGetallForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ike-policies][%d] pcloudIkepoliciesGetallForbidden %s", 403, payload) } func (o *PcloudIkepoliciesGetallForbidden) GetPayload() *models.Error { @@ -381,11 +390,13 @@ func (o *PcloudIkepoliciesGetallNotFound) Code() int { } func (o *PcloudIkepoliciesGetallNotFound) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ike-policies][%d] pcloudIkepoliciesGetallNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ike-policies][%d] pcloudIkepoliciesGetallNotFound %s", 404, payload) } func (o *PcloudIkepoliciesGetallNotFound) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ike-policies][%d] pcloudIkepoliciesGetallNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ike-policies][%d] pcloudIkepoliciesGetallNotFound %s", 404, payload) } func (o *PcloudIkepoliciesGetallNotFound) GetPayload() *models.Error { @@ -449,11 +460,13 @@ func (o *PcloudIkepoliciesGetallInternalServerError) Code() int { } func (o *PcloudIkepoliciesGetallInternalServerError) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ike-policies][%d] pcloudIkepoliciesGetallInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ike-policies][%d] pcloudIkepoliciesGetallInternalServerError %s", 500, payload) } func (o *PcloudIkepoliciesGetallInternalServerError) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ike-policies][%d] pcloudIkepoliciesGetallInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ike-policies][%d] pcloudIkepoliciesGetallInternalServerError %s", 500, payload) } func (o *PcloudIkepoliciesGetallInternalServerError) GetPayload() *models.Error { diff --git a/power/client/p_cloud_v_p_n_policies/pcloud_ikepolicies_post_responses.go b/power/client/p_cloud_v_p_n_policies/pcloud_ikepolicies_post_responses.go index 99809353..119e2e5a 100644 --- a/power/client/p_cloud_v_p_n_policies/pcloud_ikepolicies_post_responses.go +++ b/power/client/p_cloud_v_p_n_policies/pcloud_ikepolicies_post_responses.go @@ -6,6 +6,7 @@ package p_cloud_v_p_n_policies // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -115,11 +116,13 @@ func (o *PcloudIkepoliciesPostOK) Code() int { } func (o *PcloudIkepoliciesPostOK) Error() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ike-policies][%d] pcloudIkepoliciesPostOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ike-policies][%d] pcloudIkepoliciesPostOK %s", 200, payload) } func (o *PcloudIkepoliciesPostOK) String() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ike-policies][%d] pcloudIkepoliciesPostOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ike-policies][%d] pcloudIkepoliciesPostOK %s", 200, payload) } func (o *PcloudIkepoliciesPostOK) GetPayload() *models.IKEPolicy { @@ -183,11 +186,13 @@ func (o *PcloudIkepoliciesPostBadRequest) Code() int { } func (o *PcloudIkepoliciesPostBadRequest) Error() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ike-policies][%d] pcloudIkepoliciesPostBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ike-policies][%d] pcloudIkepoliciesPostBadRequest %s", 400, payload) } func (o *PcloudIkepoliciesPostBadRequest) String() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ike-policies][%d] pcloudIkepoliciesPostBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ike-policies][%d] pcloudIkepoliciesPostBadRequest %s", 400, payload) } func (o *PcloudIkepoliciesPostBadRequest) GetPayload() *models.Error { @@ -251,11 +256,13 @@ func (o *PcloudIkepoliciesPostUnauthorized) Code() int { } func (o *PcloudIkepoliciesPostUnauthorized) Error() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ike-policies][%d] pcloudIkepoliciesPostUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ike-policies][%d] pcloudIkepoliciesPostUnauthorized %s", 401, payload) } func (o *PcloudIkepoliciesPostUnauthorized) String() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ike-policies][%d] pcloudIkepoliciesPostUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ike-policies][%d] pcloudIkepoliciesPostUnauthorized %s", 401, payload) } func (o *PcloudIkepoliciesPostUnauthorized) GetPayload() *models.Error { @@ -319,11 +326,13 @@ func (o *PcloudIkepoliciesPostForbidden) Code() int { } func (o *PcloudIkepoliciesPostForbidden) Error() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ike-policies][%d] pcloudIkepoliciesPostForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ike-policies][%d] pcloudIkepoliciesPostForbidden %s", 403, payload) } func (o *PcloudIkepoliciesPostForbidden) String() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ike-policies][%d] pcloudIkepoliciesPostForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ike-policies][%d] pcloudIkepoliciesPostForbidden %s", 403, payload) } func (o *PcloudIkepoliciesPostForbidden) GetPayload() *models.Error { @@ -387,11 +396,13 @@ func (o *PcloudIkepoliciesPostConflict) Code() int { } func (o *PcloudIkepoliciesPostConflict) Error() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ike-policies][%d] pcloudIkepoliciesPostConflict %+v", 409, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ike-policies][%d] pcloudIkepoliciesPostConflict %s", 409, payload) } func (o *PcloudIkepoliciesPostConflict) String() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ike-policies][%d] pcloudIkepoliciesPostConflict %+v", 409, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ike-policies][%d] pcloudIkepoliciesPostConflict %s", 409, payload) } func (o *PcloudIkepoliciesPostConflict) GetPayload() *models.Error { @@ -455,11 +466,13 @@ func (o *PcloudIkepoliciesPostUnprocessableEntity) Code() int { } func (o *PcloudIkepoliciesPostUnprocessableEntity) Error() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ike-policies][%d] pcloudIkepoliciesPostUnprocessableEntity %+v", 422, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ike-policies][%d] pcloudIkepoliciesPostUnprocessableEntity %s", 422, payload) } func (o *PcloudIkepoliciesPostUnprocessableEntity) String() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ike-policies][%d] pcloudIkepoliciesPostUnprocessableEntity %+v", 422, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ike-policies][%d] pcloudIkepoliciesPostUnprocessableEntity %s", 422, payload) } func (o *PcloudIkepoliciesPostUnprocessableEntity) GetPayload() *models.Error { @@ -523,11 +536,13 @@ func (o *PcloudIkepoliciesPostInternalServerError) Code() int { } func (o *PcloudIkepoliciesPostInternalServerError) Error() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ike-policies][%d] pcloudIkepoliciesPostInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ike-policies][%d] pcloudIkepoliciesPostInternalServerError %s", 500, payload) } func (o *PcloudIkepoliciesPostInternalServerError) String() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ike-policies][%d] pcloudIkepoliciesPostInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ike-policies][%d] pcloudIkepoliciesPostInternalServerError %s", 500, payload) } func (o *PcloudIkepoliciesPostInternalServerError) GetPayload() *models.Error { diff --git a/power/client/p_cloud_v_p_n_policies/pcloud_ikepolicies_put_responses.go b/power/client/p_cloud_v_p_n_policies/pcloud_ikepolicies_put_responses.go index ea4472aa..046ca51a 100644 --- a/power/client/p_cloud_v_p_n_policies/pcloud_ikepolicies_put_responses.go +++ b/power/client/p_cloud_v_p_n_policies/pcloud_ikepolicies_put_responses.go @@ -6,6 +6,7 @@ package p_cloud_v_p_n_policies // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -115,11 +116,13 @@ func (o *PcloudIkepoliciesPutOK) Code() int { } func (o *PcloudIkepoliciesPutOK) Error() string { - return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ike-policies/{ike_policy_id}][%d] pcloudIkepoliciesPutOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ike-policies/{ike_policy_id}][%d] pcloudIkepoliciesPutOK %s", 200, payload) } func (o *PcloudIkepoliciesPutOK) String() string { - return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ike-policies/{ike_policy_id}][%d] pcloudIkepoliciesPutOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ike-policies/{ike_policy_id}][%d] pcloudIkepoliciesPutOK %s", 200, payload) } func (o *PcloudIkepoliciesPutOK) GetPayload() *models.IKEPolicy { @@ -183,11 +186,13 @@ func (o *PcloudIkepoliciesPutBadRequest) Code() int { } func (o *PcloudIkepoliciesPutBadRequest) Error() string { - return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ike-policies/{ike_policy_id}][%d] pcloudIkepoliciesPutBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ike-policies/{ike_policy_id}][%d] pcloudIkepoliciesPutBadRequest %s", 400, payload) } func (o *PcloudIkepoliciesPutBadRequest) String() string { - return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ike-policies/{ike_policy_id}][%d] pcloudIkepoliciesPutBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ike-policies/{ike_policy_id}][%d] pcloudIkepoliciesPutBadRequest %s", 400, payload) } func (o *PcloudIkepoliciesPutBadRequest) GetPayload() *models.Error { @@ -251,11 +256,13 @@ func (o *PcloudIkepoliciesPutUnauthorized) Code() int { } func (o *PcloudIkepoliciesPutUnauthorized) Error() string { - return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ike-policies/{ike_policy_id}][%d] pcloudIkepoliciesPutUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ike-policies/{ike_policy_id}][%d] pcloudIkepoliciesPutUnauthorized %s", 401, payload) } func (o *PcloudIkepoliciesPutUnauthorized) String() string { - return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ike-policies/{ike_policy_id}][%d] pcloudIkepoliciesPutUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ike-policies/{ike_policy_id}][%d] pcloudIkepoliciesPutUnauthorized %s", 401, payload) } func (o *PcloudIkepoliciesPutUnauthorized) GetPayload() *models.Error { @@ -319,11 +326,13 @@ func (o *PcloudIkepoliciesPutForbidden) Code() int { } func (o *PcloudIkepoliciesPutForbidden) Error() string { - return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ike-policies/{ike_policy_id}][%d] pcloudIkepoliciesPutForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ike-policies/{ike_policy_id}][%d] pcloudIkepoliciesPutForbidden %s", 403, payload) } func (o *PcloudIkepoliciesPutForbidden) String() string { - return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ike-policies/{ike_policy_id}][%d] pcloudIkepoliciesPutForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ike-policies/{ike_policy_id}][%d] pcloudIkepoliciesPutForbidden %s", 403, payload) } func (o *PcloudIkepoliciesPutForbidden) GetPayload() *models.Error { @@ -387,11 +396,13 @@ func (o *PcloudIkepoliciesPutNotFound) Code() int { } func (o *PcloudIkepoliciesPutNotFound) Error() string { - return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ike-policies/{ike_policy_id}][%d] pcloudIkepoliciesPutNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ike-policies/{ike_policy_id}][%d] pcloudIkepoliciesPutNotFound %s", 404, payload) } func (o *PcloudIkepoliciesPutNotFound) String() string { - return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ike-policies/{ike_policy_id}][%d] pcloudIkepoliciesPutNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ike-policies/{ike_policy_id}][%d] pcloudIkepoliciesPutNotFound %s", 404, payload) } func (o *PcloudIkepoliciesPutNotFound) GetPayload() *models.Error { @@ -455,11 +466,13 @@ func (o *PcloudIkepoliciesPutUnprocessableEntity) Code() int { } func (o *PcloudIkepoliciesPutUnprocessableEntity) Error() string { - return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ike-policies/{ike_policy_id}][%d] pcloudIkepoliciesPutUnprocessableEntity %+v", 422, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ike-policies/{ike_policy_id}][%d] pcloudIkepoliciesPutUnprocessableEntity %s", 422, payload) } func (o *PcloudIkepoliciesPutUnprocessableEntity) String() string { - return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ike-policies/{ike_policy_id}][%d] pcloudIkepoliciesPutUnprocessableEntity %+v", 422, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ike-policies/{ike_policy_id}][%d] pcloudIkepoliciesPutUnprocessableEntity %s", 422, payload) } func (o *PcloudIkepoliciesPutUnprocessableEntity) GetPayload() *models.Error { @@ -523,11 +536,13 @@ func (o *PcloudIkepoliciesPutInternalServerError) Code() int { } func (o *PcloudIkepoliciesPutInternalServerError) Error() string { - return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ike-policies/{ike_policy_id}][%d] pcloudIkepoliciesPutInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ike-policies/{ike_policy_id}][%d] pcloudIkepoliciesPutInternalServerError %s", 500, payload) } func (o *PcloudIkepoliciesPutInternalServerError) String() string { - return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ike-policies/{ike_policy_id}][%d] pcloudIkepoliciesPutInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ike-policies/{ike_policy_id}][%d] pcloudIkepoliciesPutInternalServerError %s", 500, payload) } func (o *PcloudIkepoliciesPutInternalServerError) GetPayload() *models.Error { diff --git a/power/client/p_cloud_v_p_n_policies/pcloud_ipsecpolicies_delete_responses.go b/power/client/p_cloud_v_p_n_policies/pcloud_ipsecpolicies_delete_responses.go index b3728158..4b3ba8ec 100644 --- a/power/client/p_cloud_v_p_n_policies/pcloud_ipsecpolicies_delete_responses.go +++ b/power/client/p_cloud_v_p_n_policies/pcloud_ipsecpolicies_delete_responses.go @@ -6,6 +6,7 @@ package p_cloud_v_p_n_policies // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -109,11 +110,13 @@ func (o *PcloudIpsecpoliciesDeleteOK) Code() int { } func (o *PcloudIpsecpoliciesDeleteOK) Error() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ipsec-policies/{ipsec_policy_id}][%d] pcloudIpsecpoliciesDeleteOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ipsec-policies/{ipsec_policy_id}][%d] pcloudIpsecpoliciesDeleteOK %s", 200, payload) } func (o *PcloudIpsecpoliciesDeleteOK) String() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ipsec-policies/{ipsec_policy_id}][%d] pcloudIpsecpoliciesDeleteOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ipsec-policies/{ipsec_policy_id}][%d] pcloudIpsecpoliciesDeleteOK %s", 200, payload) } func (o *PcloudIpsecpoliciesDeleteOK) GetPayload() models.Object { @@ -175,11 +178,13 @@ func (o *PcloudIpsecpoliciesDeleteBadRequest) Code() int { } func (o *PcloudIpsecpoliciesDeleteBadRequest) Error() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ipsec-policies/{ipsec_policy_id}][%d] pcloudIpsecpoliciesDeleteBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ipsec-policies/{ipsec_policy_id}][%d] pcloudIpsecpoliciesDeleteBadRequest %s", 400, payload) } func (o *PcloudIpsecpoliciesDeleteBadRequest) String() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ipsec-policies/{ipsec_policy_id}][%d] pcloudIpsecpoliciesDeleteBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ipsec-policies/{ipsec_policy_id}][%d] pcloudIpsecpoliciesDeleteBadRequest %s", 400, payload) } func (o *PcloudIpsecpoliciesDeleteBadRequest) GetPayload() *models.Error { @@ -243,11 +248,13 @@ func (o *PcloudIpsecpoliciesDeleteUnauthorized) Code() int { } func (o *PcloudIpsecpoliciesDeleteUnauthorized) Error() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ipsec-policies/{ipsec_policy_id}][%d] pcloudIpsecpoliciesDeleteUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ipsec-policies/{ipsec_policy_id}][%d] pcloudIpsecpoliciesDeleteUnauthorized %s", 401, payload) } func (o *PcloudIpsecpoliciesDeleteUnauthorized) String() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ipsec-policies/{ipsec_policy_id}][%d] pcloudIpsecpoliciesDeleteUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ipsec-policies/{ipsec_policy_id}][%d] pcloudIpsecpoliciesDeleteUnauthorized %s", 401, payload) } func (o *PcloudIpsecpoliciesDeleteUnauthorized) GetPayload() *models.Error { @@ -311,11 +318,13 @@ func (o *PcloudIpsecpoliciesDeleteForbidden) Code() int { } func (o *PcloudIpsecpoliciesDeleteForbidden) Error() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ipsec-policies/{ipsec_policy_id}][%d] pcloudIpsecpoliciesDeleteForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ipsec-policies/{ipsec_policy_id}][%d] pcloudIpsecpoliciesDeleteForbidden %s", 403, payload) } func (o *PcloudIpsecpoliciesDeleteForbidden) String() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ipsec-policies/{ipsec_policy_id}][%d] pcloudIpsecpoliciesDeleteForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ipsec-policies/{ipsec_policy_id}][%d] pcloudIpsecpoliciesDeleteForbidden %s", 403, payload) } func (o *PcloudIpsecpoliciesDeleteForbidden) GetPayload() *models.Error { @@ -379,11 +388,13 @@ func (o *PcloudIpsecpoliciesDeleteNotFound) Code() int { } func (o *PcloudIpsecpoliciesDeleteNotFound) Error() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ipsec-policies/{ipsec_policy_id}][%d] pcloudIpsecpoliciesDeleteNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ipsec-policies/{ipsec_policy_id}][%d] pcloudIpsecpoliciesDeleteNotFound %s", 404, payload) } func (o *PcloudIpsecpoliciesDeleteNotFound) String() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ipsec-policies/{ipsec_policy_id}][%d] pcloudIpsecpoliciesDeleteNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ipsec-policies/{ipsec_policy_id}][%d] pcloudIpsecpoliciesDeleteNotFound %s", 404, payload) } func (o *PcloudIpsecpoliciesDeleteNotFound) GetPayload() *models.Error { @@ -447,11 +458,13 @@ func (o *PcloudIpsecpoliciesDeleteInternalServerError) Code() int { } func (o *PcloudIpsecpoliciesDeleteInternalServerError) Error() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ipsec-policies/{ipsec_policy_id}][%d] pcloudIpsecpoliciesDeleteInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ipsec-policies/{ipsec_policy_id}][%d] pcloudIpsecpoliciesDeleteInternalServerError %s", 500, payload) } func (o *PcloudIpsecpoliciesDeleteInternalServerError) String() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ipsec-policies/{ipsec_policy_id}][%d] pcloudIpsecpoliciesDeleteInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ipsec-policies/{ipsec_policy_id}][%d] pcloudIpsecpoliciesDeleteInternalServerError %s", 500, payload) } func (o *PcloudIpsecpoliciesDeleteInternalServerError) GetPayload() *models.Error { diff --git a/power/client/p_cloud_v_p_n_policies/pcloud_ipsecpolicies_get_responses.go b/power/client/p_cloud_v_p_n_policies/pcloud_ipsecpolicies_get_responses.go index a8c9bb3f..0aa1b208 100644 --- a/power/client/p_cloud_v_p_n_policies/pcloud_ipsecpolicies_get_responses.go +++ b/power/client/p_cloud_v_p_n_policies/pcloud_ipsecpolicies_get_responses.go @@ -6,6 +6,7 @@ package p_cloud_v_p_n_policies // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -115,11 +116,13 @@ func (o *PcloudIpsecpoliciesGetOK) Code() int { } func (o *PcloudIpsecpoliciesGetOK) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ipsec-policies/{ipsec_policy_id}][%d] pcloudIpsecpoliciesGetOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ipsec-policies/{ipsec_policy_id}][%d] pcloudIpsecpoliciesGetOK %s", 200, payload) } func (o *PcloudIpsecpoliciesGetOK) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ipsec-policies/{ipsec_policy_id}][%d] pcloudIpsecpoliciesGetOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ipsec-policies/{ipsec_policy_id}][%d] pcloudIpsecpoliciesGetOK %s", 200, payload) } func (o *PcloudIpsecpoliciesGetOK) GetPayload() *models.IPSecPolicy { @@ -183,11 +186,13 @@ func (o *PcloudIpsecpoliciesGetBadRequest) Code() int { } func (o *PcloudIpsecpoliciesGetBadRequest) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ipsec-policies/{ipsec_policy_id}][%d] pcloudIpsecpoliciesGetBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ipsec-policies/{ipsec_policy_id}][%d] pcloudIpsecpoliciesGetBadRequest %s", 400, payload) } func (o *PcloudIpsecpoliciesGetBadRequest) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ipsec-policies/{ipsec_policy_id}][%d] pcloudIpsecpoliciesGetBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ipsec-policies/{ipsec_policy_id}][%d] pcloudIpsecpoliciesGetBadRequest %s", 400, payload) } func (o *PcloudIpsecpoliciesGetBadRequest) GetPayload() *models.Error { @@ -251,11 +256,13 @@ func (o *PcloudIpsecpoliciesGetUnauthorized) Code() int { } func (o *PcloudIpsecpoliciesGetUnauthorized) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ipsec-policies/{ipsec_policy_id}][%d] pcloudIpsecpoliciesGetUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ipsec-policies/{ipsec_policy_id}][%d] pcloudIpsecpoliciesGetUnauthorized %s", 401, payload) } func (o *PcloudIpsecpoliciesGetUnauthorized) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ipsec-policies/{ipsec_policy_id}][%d] pcloudIpsecpoliciesGetUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ipsec-policies/{ipsec_policy_id}][%d] pcloudIpsecpoliciesGetUnauthorized %s", 401, payload) } func (o *PcloudIpsecpoliciesGetUnauthorized) GetPayload() *models.Error { @@ -319,11 +326,13 @@ func (o *PcloudIpsecpoliciesGetForbidden) Code() int { } func (o *PcloudIpsecpoliciesGetForbidden) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ipsec-policies/{ipsec_policy_id}][%d] pcloudIpsecpoliciesGetForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ipsec-policies/{ipsec_policy_id}][%d] pcloudIpsecpoliciesGetForbidden %s", 403, payload) } func (o *PcloudIpsecpoliciesGetForbidden) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ipsec-policies/{ipsec_policy_id}][%d] pcloudIpsecpoliciesGetForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ipsec-policies/{ipsec_policy_id}][%d] pcloudIpsecpoliciesGetForbidden %s", 403, payload) } func (o *PcloudIpsecpoliciesGetForbidden) GetPayload() *models.Error { @@ -387,11 +396,13 @@ func (o *PcloudIpsecpoliciesGetNotFound) Code() int { } func (o *PcloudIpsecpoliciesGetNotFound) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ipsec-policies/{ipsec_policy_id}][%d] pcloudIpsecpoliciesGetNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ipsec-policies/{ipsec_policy_id}][%d] pcloudIpsecpoliciesGetNotFound %s", 404, payload) } func (o *PcloudIpsecpoliciesGetNotFound) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ipsec-policies/{ipsec_policy_id}][%d] pcloudIpsecpoliciesGetNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ipsec-policies/{ipsec_policy_id}][%d] pcloudIpsecpoliciesGetNotFound %s", 404, payload) } func (o *PcloudIpsecpoliciesGetNotFound) GetPayload() *models.Error { @@ -455,11 +466,13 @@ func (o *PcloudIpsecpoliciesGetUnprocessableEntity) Code() int { } func (o *PcloudIpsecpoliciesGetUnprocessableEntity) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ipsec-policies/{ipsec_policy_id}][%d] pcloudIpsecpoliciesGetUnprocessableEntity %+v", 422, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ipsec-policies/{ipsec_policy_id}][%d] pcloudIpsecpoliciesGetUnprocessableEntity %s", 422, payload) } func (o *PcloudIpsecpoliciesGetUnprocessableEntity) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ipsec-policies/{ipsec_policy_id}][%d] pcloudIpsecpoliciesGetUnprocessableEntity %+v", 422, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ipsec-policies/{ipsec_policy_id}][%d] pcloudIpsecpoliciesGetUnprocessableEntity %s", 422, payload) } func (o *PcloudIpsecpoliciesGetUnprocessableEntity) GetPayload() *models.Error { @@ -523,11 +536,13 @@ func (o *PcloudIpsecpoliciesGetInternalServerError) Code() int { } func (o *PcloudIpsecpoliciesGetInternalServerError) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ipsec-policies/{ipsec_policy_id}][%d] pcloudIpsecpoliciesGetInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ipsec-policies/{ipsec_policy_id}][%d] pcloudIpsecpoliciesGetInternalServerError %s", 500, payload) } func (o *PcloudIpsecpoliciesGetInternalServerError) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ipsec-policies/{ipsec_policy_id}][%d] pcloudIpsecpoliciesGetInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ipsec-policies/{ipsec_policy_id}][%d] pcloudIpsecpoliciesGetInternalServerError %s", 500, payload) } func (o *PcloudIpsecpoliciesGetInternalServerError) GetPayload() *models.Error { diff --git a/power/client/p_cloud_v_p_n_policies/pcloud_ipsecpolicies_getall_responses.go b/power/client/p_cloud_v_p_n_policies/pcloud_ipsecpolicies_getall_responses.go index c717669f..d33c2905 100644 --- a/power/client/p_cloud_v_p_n_policies/pcloud_ipsecpolicies_getall_responses.go +++ b/power/client/p_cloud_v_p_n_policies/pcloud_ipsecpolicies_getall_responses.go @@ -6,6 +6,7 @@ package p_cloud_v_p_n_policies // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -109,11 +110,13 @@ func (o *PcloudIpsecpoliciesGetallOK) Code() int { } func (o *PcloudIpsecpoliciesGetallOK) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ipsec-policies][%d] pcloudIpsecpoliciesGetallOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ipsec-policies][%d] pcloudIpsecpoliciesGetallOK %s", 200, payload) } func (o *PcloudIpsecpoliciesGetallOK) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ipsec-policies][%d] pcloudIpsecpoliciesGetallOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ipsec-policies][%d] pcloudIpsecpoliciesGetallOK %s", 200, payload) } func (o *PcloudIpsecpoliciesGetallOK) GetPayload() *models.IPSecPolicies { @@ -177,11 +180,13 @@ func (o *PcloudIpsecpoliciesGetallBadRequest) Code() int { } func (o *PcloudIpsecpoliciesGetallBadRequest) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ipsec-policies][%d] pcloudIpsecpoliciesGetallBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ipsec-policies][%d] pcloudIpsecpoliciesGetallBadRequest %s", 400, payload) } func (o *PcloudIpsecpoliciesGetallBadRequest) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ipsec-policies][%d] pcloudIpsecpoliciesGetallBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ipsec-policies][%d] pcloudIpsecpoliciesGetallBadRequest %s", 400, payload) } func (o *PcloudIpsecpoliciesGetallBadRequest) GetPayload() *models.Error { @@ -245,11 +250,13 @@ func (o *PcloudIpsecpoliciesGetallUnauthorized) Code() int { } func (o *PcloudIpsecpoliciesGetallUnauthorized) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ipsec-policies][%d] pcloudIpsecpoliciesGetallUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ipsec-policies][%d] pcloudIpsecpoliciesGetallUnauthorized %s", 401, payload) } func (o *PcloudIpsecpoliciesGetallUnauthorized) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ipsec-policies][%d] pcloudIpsecpoliciesGetallUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ipsec-policies][%d] pcloudIpsecpoliciesGetallUnauthorized %s", 401, payload) } func (o *PcloudIpsecpoliciesGetallUnauthorized) GetPayload() *models.Error { @@ -313,11 +320,13 @@ func (o *PcloudIpsecpoliciesGetallForbidden) Code() int { } func (o *PcloudIpsecpoliciesGetallForbidden) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ipsec-policies][%d] pcloudIpsecpoliciesGetallForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ipsec-policies][%d] pcloudIpsecpoliciesGetallForbidden %s", 403, payload) } func (o *PcloudIpsecpoliciesGetallForbidden) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ipsec-policies][%d] pcloudIpsecpoliciesGetallForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ipsec-policies][%d] pcloudIpsecpoliciesGetallForbidden %s", 403, payload) } func (o *PcloudIpsecpoliciesGetallForbidden) GetPayload() *models.Error { @@ -381,11 +390,13 @@ func (o *PcloudIpsecpoliciesGetallNotFound) Code() int { } func (o *PcloudIpsecpoliciesGetallNotFound) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ipsec-policies][%d] pcloudIpsecpoliciesGetallNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ipsec-policies][%d] pcloudIpsecpoliciesGetallNotFound %s", 404, payload) } func (o *PcloudIpsecpoliciesGetallNotFound) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ipsec-policies][%d] pcloudIpsecpoliciesGetallNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ipsec-policies][%d] pcloudIpsecpoliciesGetallNotFound %s", 404, payload) } func (o *PcloudIpsecpoliciesGetallNotFound) GetPayload() *models.Error { @@ -449,11 +460,13 @@ func (o *PcloudIpsecpoliciesGetallInternalServerError) Code() int { } func (o *PcloudIpsecpoliciesGetallInternalServerError) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ipsec-policies][%d] pcloudIpsecpoliciesGetallInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ipsec-policies][%d] pcloudIpsecpoliciesGetallInternalServerError %s", 500, payload) } func (o *PcloudIpsecpoliciesGetallInternalServerError) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ipsec-policies][%d] pcloudIpsecpoliciesGetallInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ipsec-policies][%d] pcloudIpsecpoliciesGetallInternalServerError %s", 500, payload) } func (o *PcloudIpsecpoliciesGetallInternalServerError) GetPayload() *models.Error { diff --git a/power/client/p_cloud_v_p_n_policies/pcloud_ipsecpolicies_post_responses.go b/power/client/p_cloud_v_p_n_policies/pcloud_ipsecpolicies_post_responses.go index cc76168a..f7870d03 100644 --- a/power/client/p_cloud_v_p_n_policies/pcloud_ipsecpolicies_post_responses.go +++ b/power/client/p_cloud_v_p_n_policies/pcloud_ipsecpolicies_post_responses.go @@ -6,6 +6,7 @@ package p_cloud_v_p_n_policies // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -121,11 +122,13 @@ func (o *PcloudIpsecpoliciesPostOK) Code() int { } func (o *PcloudIpsecpoliciesPostOK) Error() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ipsec-policies][%d] pcloudIpsecpoliciesPostOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ipsec-policies][%d] pcloudIpsecpoliciesPostOK %s", 200, payload) } func (o *PcloudIpsecpoliciesPostOK) String() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ipsec-policies][%d] pcloudIpsecpoliciesPostOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ipsec-policies][%d] pcloudIpsecpoliciesPostOK %s", 200, payload) } func (o *PcloudIpsecpoliciesPostOK) GetPayload() *models.IPSecPolicy { @@ -189,11 +192,13 @@ func (o *PcloudIpsecpoliciesPostBadRequest) Code() int { } func (o *PcloudIpsecpoliciesPostBadRequest) Error() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ipsec-policies][%d] pcloudIpsecpoliciesPostBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ipsec-policies][%d] pcloudIpsecpoliciesPostBadRequest %s", 400, payload) } func (o *PcloudIpsecpoliciesPostBadRequest) String() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ipsec-policies][%d] pcloudIpsecpoliciesPostBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ipsec-policies][%d] pcloudIpsecpoliciesPostBadRequest %s", 400, payload) } func (o *PcloudIpsecpoliciesPostBadRequest) GetPayload() *models.Error { @@ -257,11 +262,13 @@ func (o *PcloudIpsecpoliciesPostUnauthorized) Code() int { } func (o *PcloudIpsecpoliciesPostUnauthorized) Error() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ipsec-policies][%d] pcloudIpsecpoliciesPostUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ipsec-policies][%d] pcloudIpsecpoliciesPostUnauthorized %s", 401, payload) } func (o *PcloudIpsecpoliciesPostUnauthorized) String() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ipsec-policies][%d] pcloudIpsecpoliciesPostUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ipsec-policies][%d] pcloudIpsecpoliciesPostUnauthorized %s", 401, payload) } func (o *PcloudIpsecpoliciesPostUnauthorized) GetPayload() *models.Error { @@ -325,11 +332,13 @@ func (o *PcloudIpsecpoliciesPostForbidden) Code() int { } func (o *PcloudIpsecpoliciesPostForbidden) Error() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ipsec-policies][%d] pcloudIpsecpoliciesPostForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ipsec-policies][%d] pcloudIpsecpoliciesPostForbidden %s", 403, payload) } func (o *PcloudIpsecpoliciesPostForbidden) String() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ipsec-policies][%d] pcloudIpsecpoliciesPostForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ipsec-policies][%d] pcloudIpsecpoliciesPostForbidden %s", 403, payload) } func (o *PcloudIpsecpoliciesPostForbidden) GetPayload() *models.Error { @@ -393,11 +402,13 @@ func (o *PcloudIpsecpoliciesPostNotFound) Code() int { } func (o *PcloudIpsecpoliciesPostNotFound) Error() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ipsec-policies][%d] pcloudIpsecpoliciesPostNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ipsec-policies][%d] pcloudIpsecpoliciesPostNotFound %s", 404, payload) } func (o *PcloudIpsecpoliciesPostNotFound) String() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ipsec-policies][%d] pcloudIpsecpoliciesPostNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ipsec-policies][%d] pcloudIpsecpoliciesPostNotFound %s", 404, payload) } func (o *PcloudIpsecpoliciesPostNotFound) GetPayload() *models.Error { @@ -461,11 +472,13 @@ func (o *PcloudIpsecpoliciesPostConflict) Code() int { } func (o *PcloudIpsecpoliciesPostConflict) Error() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ipsec-policies][%d] pcloudIpsecpoliciesPostConflict %+v", 409, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ipsec-policies][%d] pcloudIpsecpoliciesPostConflict %s", 409, payload) } func (o *PcloudIpsecpoliciesPostConflict) String() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ipsec-policies][%d] pcloudIpsecpoliciesPostConflict %+v", 409, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ipsec-policies][%d] pcloudIpsecpoliciesPostConflict %s", 409, payload) } func (o *PcloudIpsecpoliciesPostConflict) GetPayload() *models.Error { @@ -529,11 +542,13 @@ func (o *PcloudIpsecpoliciesPostUnprocessableEntity) Code() int { } func (o *PcloudIpsecpoliciesPostUnprocessableEntity) Error() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ipsec-policies][%d] pcloudIpsecpoliciesPostUnprocessableEntity %+v", 422, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ipsec-policies][%d] pcloudIpsecpoliciesPostUnprocessableEntity %s", 422, payload) } func (o *PcloudIpsecpoliciesPostUnprocessableEntity) String() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ipsec-policies][%d] pcloudIpsecpoliciesPostUnprocessableEntity %+v", 422, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ipsec-policies][%d] pcloudIpsecpoliciesPostUnprocessableEntity %s", 422, payload) } func (o *PcloudIpsecpoliciesPostUnprocessableEntity) GetPayload() *models.Error { @@ -597,11 +612,13 @@ func (o *PcloudIpsecpoliciesPostInternalServerError) Code() int { } func (o *PcloudIpsecpoliciesPostInternalServerError) Error() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ipsec-policies][%d] pcloudIpsecpoliciesPostInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ipsec-policies][%d] pcloudIpsecpoliciesPostInternalServerError %s", 500, payload) } func (o *PcloudIpsecpoliciesPostInternalServerError) String() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ipsec-policies][%d] pcloudIpsecpoliciesPostInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ipsec-policies][%d] pcloudIpsecpoliciesPostInternalServerError %s", 500, payload) } func (o *PcloudIpsecpoliciesPostInternalServerError) GetPayload() *models.Error { diff --git a/power/client/p_cloud_v_p_n_policies/pcloud_ipsecpolicies_put_responses.go b/power/client/p_cloud_v_p_n_policies/pcloud_ipsecpolicies_put_responses.go index d8cdbed6..b8626e3a 100644 --- a/power/client/p_cloud_v_p_n_policies/pcloud_ipsecpolicies_put_responses.go +++ b/power/client/p_cloud_v_p_n_policies/pcloud_ipsecpolicies_put_responses.go @@ -6,6 +6,7 @@ package p_cloud_v_p_n_policies // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -121,11 +122,13 @@ func (o *PcloudIpsecpoliciesPutOK) Code() int { } func (o *PcloudIpsecpoliciesPutOK) Error() string { - return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ipsec-policies/{ipsec_policy_id}][%d] pcloudIpsecpoliciesPutOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ipsec-policies/{ipsec_policy_id}][%d] pcloudIpsecpoliciesPutOK %s", 200, payload) } func (o *PcloudIpsecpoliciesPutOK) String() string { - return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ipsec-policies/{ipsec_policy_id}][%d] pcloudIpsecpoliciesPutOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ipsec-policies/{ipsec_policy_id}][%d] pcloudIpsecpoliciesPutOK %s", 200, payload) } func (o *PcloudIpsecpoliciesPutOK) GetPayload() *models.IPSecPolicy { @@ -189,11 +192,13 @@ func (o *PcloudIpsecpoliciesPutBadRequest) Code() int { } func (o *PcloudIpsecpoliciesPutBadRequest) Error() string { - return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ipsec-policies/{ipsec_policy_id}][%d] pcloudIpsecpoliciesPutBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ipsec-policies/{ipsec_policy_id}][%d] pcloudIpsecpoliciesPutBadRequest %s", 400, payload) } func (o *PcloudIpsecpoliciesPutBadRequest) String() string { - return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ipsec-policies/{ipsec_policy_id}][%d] pcloudIpsecpoliciesPutBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ipsec-policies/{ipsec_policy_id}][%d] pcloudIpsecpoliciesPutBadRequest %s", 400, payload) } func (o *PcloudIpsecpoliciesPutBadRequest) GetPayload() *models.Error { @@ -257,11 +262,13 @@ func (o *PcloudIpsecpoliciesPutUnauthorized) Code() int { } func (o *PcloudIpsecpoliciesPutUnauthorized) Error() string { - return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ipsec-policies/{ipsec_policy_id}][%d] pcloudIpsecpoliciesPutUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ipsec-policies/{ipsec_policy_id}][%d] pcloudIpsecpoliciesPutUnauthorized %s", 401, payload) } func (o *PcloudIpsecpoliciesPutUnauthorized) String() string { - return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ipsec-policies/{ipsec_policy_id}][%d] pcloudIpsecpoliciesPutUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ipsec-policies/{ipsec_policy_id}][%d] pcloudIpsecpoliciesPutUnauthorized %s", 401, payload) } func (o *PcloudIpsecpoliciesPutUnauthorized) GetPayload() *models.Error { @@ -325,11 +332,13 @@ func (o *PcloudIpsecpoliciesPutForbidden) Code() int { } func (o *PcloudIpsecpoliciesPutForbidden) Error() string { - return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ipsec-policies/{ipsec_policy_id}][%d] pcloudIpsecpoliciesPutForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ipsec-policies/{ipsec_policy_id}][%d] pcloudIpsecpoliciesPutForbidden %s", 403, payload) } func (o *PcloudIpsecpoliciesPutForbidden) String() string { - return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ipsec-policies/{ipsec_policy_id}][%d] pcloudIpsecpoliciesPutForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ipsec-policies/{ipsec_policy_id}][%d] pcloudIpsecpoliciesPutForbidden %s", 403, payload) } func (o *PcloudIpsecpoliciesPutForbidden) GetPayload() *models.Error { @@ -393,11 +402,13 @@ func (o *PcloudIpsecpoliciesPutNotFound) Code() int { } func (o *PcloudIpsecpoliciesPutNotFound) Error() string { - return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ipsec-policies/{ipsec_policy_id}][%d] pcloudIpsecpoliciesPutNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ipsec-policies/{ipsec_policy_id}][%d] pcloudIpsecpoliciesPutNotFound %s", 404, payload) } func (o *PcloudIpsecpoliciesPutNotFound) String() string { - return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ipsec-policies/{ipsec_policy_id}][%d] pcloudIpsecpoliciesPutNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ipsec-policies/{ipsec_policy_id}][%d] pcloudIpsecpoliciesPutNotFound %s", 404, payload) } func (o *PcloudIpsecpoliciesPutNotFound) GetPayload() *models.Error { @@ -461,11 +472,13 @@ func (o *PcloudIpsecpoliciesPutConflict) Code() int { } func (o *PcloudIpsecpoliciesPutConflict) Error() string { - return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ipsec-policies/{ipsec_policy_id}][%d] pcloudIpsecpoliciesPutConflict %+v", 409, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ipsec-policies/{ipsec_policy_id}][%d] pcloudIpsecpoliciesPutConflict %s", 409, payload) } func (o *PcloudIpsecpoliciesPutConflict) String() string { - return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ipsec-policies/{ipsec_policy_id}][%d] pcloudIpsecpoliciesPutConflict %+v", 409, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ipsec-policies/{ipsec_policy_id}][%d] pcloudIpsecpoliciesPutConflict %s", 409, payload) } func (o *PcloudIpsecpoliciesPutConflict) GetPayload() *models.Error { @@ -529,11 +542,13 @@ func (o *PcloudIpsecpoliciesPutUnprocessableEntity) Code() int { } func (o *PcloudIpsecpoliciesPutUnprocessableEntity) Error() string { - return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ipsec-policies/{ipsec_policy_id}][%d] pcloudIpsecpoliciesPutUnprocessableEntity %+v", 422, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ipsec-policies/{ipsec_policy_id}][%d] pcloudIpsecpoliciesPutUnprocessableEntity %s", 422, payload) } func (o *PcloudIpsecpoliciesPutUnprocessableEntity) String() string { - return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ipsec-policies/{ipsec_policy_id}][%d] pcloudIpsecpoliciesPutUnprocessableEntity %+v", 422, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ipsec-policies/{ipsec_policy_id}][%d] pcloudIpsecpoliciesPutUnprocessableEntity %s", 422, payload) } func (o *PcloudIpsecpoliciesPutUnprocessableEntity) GetPayload() *models.Error { @@ -597,11 +612,13 @@ func (o *PcloudIpsecpoliciesPutInternalServerError) Code() int { } func (o *PcloudIpsecpoliciesPutInternalServerError) Error() string { - return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ipsec-policies/{ipsec_policy_id}][%d] pcloudIpsecpoliciesPutInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ipsec-policies/{ipsec_policy_id}][%d] pcloudIpsecpoliciesPutInternalServerError %s", 500, payload) } func (o *PcloudIpsecpoliciesPutInternalServerError) String() string { - return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ipsec-policies/{ipsec_policy_id}][%d] pcloudIpsecpoliciesPutInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ipsec-policies/{ipsec_policy_id}][%d] pcloudIpsecpoliciesPutInternalServerError %s", 500, payload) } func (o *PcloudIpsecpoliciesPutInternalServerError) GetPayload() *models.Error { diff --git a/power/client/p_cloud_volume_groups/p_cloud_volume_groups_client.go b/power/client/p_cloud_volume_groups/p_cloud_volume_groups_client.go index 78d0d2bb..f307f596 100644 --- a/power/client/p_cloud_volume_groups/p_cloud_volume_groups_client.go +++ b/power/client/p_cloud_volume_groups/p_cloud_volume_groups_client.go @@ -9,6 +9,7 @@ import ( "fmt" "github.com/go-openapi/runtime" + httptransport "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" ) @@ -17,6 +18,31 @@ func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientServi return &Client{transport: transport, formats: formats} } +// New creates a new p cloud volume groups API client with basic auth credentials. +// It takes the following parameters: +// - host: http host (github.com). +// - basePath: any base path for the API client ("/v1", "/v3"). +// - scheme: http scheme ("http", "https"). +// - user: user for basic authentication header. +// - password: password for basic authentication header. +func NewClientWithBasicAuth(host, basePath, scheme, user, password string) ClientService { + transport := httptransport.New(host, basePath, []string{scheme}) + transport.DefaultAuthentication = httptransport.BasicAuth(user, password) + return &Client{transport: transport, formats: strfmt.Default} +} + +// New creates a new p cloud volume groups API client with a bearer token for authentication. +// It takes the following parameters: +// - host: http host (github.com). +// - basePath: any base path for the API client ("/v1", "/v3"). +// - scheme: http scheme ("http", "https"). +// - bearerToken: bearer token for Bearer authentication header. +func NewClientWithBearerToken(host, basePath, scheme, bearerToken string) ClientService { + transport := httptransport.New(host, basePath, []string{scheme}) + transport.DefaultAuthentication = httptransport.BearerToken(bearerToken) + return &Client{transport: transport, formats: strfmt.Default} +} + /* Client for p cloud volume groups API */ @@ -25,7 +51,7 @@ type Client struct { formats strfmt.Registry } -// ClientOption is the option for Client methods +// ClientOption may be used to customize the behavior of Client methods. type ClientOption func(*runtime.ClientOperation) // ClientService is the interface for Client methods @@ -54,7 +80,9 @@ type ClientService interface { } /* -PcloudVolumegroupsActionPost performs an action start stop reset on a volume group +PcloudVolumegroupsActionPost performs an action on a volume group + +Corresponding actions are 'start', 'stop', 'reset' */ func (a *Client) PcloudVolumegroupsActionPost(params *PcloudVolumegroupsActionPostParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudVolumegroupsActionPostAccepted, error) { // TODO: Validate the params before sending diff --git a/power/client/p_cloud_volume_groups/pcloud_volumegroups_action_post_responses.go b/power/client/p_cloud_volume_groups/pcloud_volumegroups_action_post_responses.go index 43eb6695..1bef9268 100644 --- a/power/client/p_cloud_volume_groups/pcloud_volumegroups_action_post_responses.go +++ b/power/client/p_cloud_volume_groups/pcloud_volumegroups_action_post_responses.go @@ -6,6 +6,7 @@ package p_cloud_volume_groups // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -115,11 +116,13 @@ func (o *PcloudVolumegroupsActionPostAccepted) Code() int { } func (o *PcloudVolumegroupsActionPostAccepted) Error() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/{volume_group_id}/action][%d] pcloudVolumegroupsActionPostAccepted %+v", 202, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/{volume_group_id}/action][%d] pcloudVolumegroupsActionPostAccepted %s", 202, payload) } func (o *PcloudVolumegroupsActionPostAccepted) String() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/{volume_group_id}/action][%d] pcloudVolumegroupsActionPostAccepted %+v", 202, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/{volume_group_id}/action][%d] pcloudVolumegroupsActionPostAccepted %s", 202, payload) } func (o *PcloudVolumegroupsActionPostAccepted) GetPayload() models.Object { @@ -181,11 +184,13 @@ func (o *PcloudVolumegroupsActionPostBadRequest) Code() int { } func (o *PcloudVolumegroupsActionPostBadRequest) Error() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/{volume_group_id}/action][%d] pcloudVolumegroupsActionPostBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/{volume_group_id}/action][%d] pcloudVolumegroupsActionPostBadRequest %s", 400, payload) } func (o *PcloudVolumegroupsActionPostBadRequest) String() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/{volume_group_id}/action][%d] pcloudVolumegroupsActionPostBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/{volume_group_id}/action][%d] pcloudVolumegroupsActionPostBadRequest %s", 400, payload) } func (o *PcloudVolumegroupsActionPostBadRequest) GetPayload() *models.Error { @@ -249,11 +254,13 @@ func (o *PcloudVolumegroupsActionPostUnauthorized) Code() int { } func (o *PcloudVolumegroupsActionPostUnauthorized) Error() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/{volume_group_id}/action][%d] pcloudVolumegroupsActionPostUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/{volume_group_id}/action][%d] pcloudVolumegroupsActionPostUnauthorized %s", 401, payload) } func (o *PcloudVolumegroupsActionPostUnauthorized) String() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/{volume_group_id}/action][%d] pcloudVolumegroupsActionPostUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/{volume_group_id}/action][%d] pcloudVolumegroupsActionPostUnauthorized %s", 401, payload) } func (o *PcloudVolumegroupsActionPostUnauthorized) GetPayload() *models.Error { @@ -317,11 +324,13 @@ func (o *PcloudVolumegroupsActionPostForbidden) Code() int { } func (o *PcloudVolumegroupsActionPostForbidden) Error() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/{volume_group_id}/action][%d] pcloudVolumegroupsActionPostForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/{volume_group_id}/action][%d] pcloudVolumegroupsActionPostForbidden %s", 403, payload) } func (o *PcloudVolumegroupsActionPostForbidden) String() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/{volume_group_id}/action][%d] pcloudVolumegroupsActionPostForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/{volume_group_id}/action][%d] pcloudVolumegroupsActionPostForbidden %s", 403, payload) } func (o *PcloudVolumegroupsActionPostForbidden) GetPayload() *models.Error { @@ -385,11 +394,13 @@ func (o *PcloudVolumegroupsActionPostNotFound) Code() int { } func (o *PcloudVolumegroupsActionPostNotFound) Error() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/{volume_group_id}/action][%d] pcloudVolumegroupsActionPostNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/{volume_group_id}/action][%d] pcloudVolumegroupsActionPostNotFound %s", 404, payload) } func (o *PcloudVolumegroupsActionPostNotFound) String() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/{volume_group_id}/action][%d] pcloudVolumegroupsActionPostNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/{volume_group_id}/action][%d] pcloudVolumegroupsActionPostNotFound %s", 404, payload) } func (o *PcloudVolumegroupsActionPostNotFound) GetPayload() *models.Error { @@ -453,11 +464,13 @@ func (o *PcloudVolumegroupsActionPostUnprocessableEntity) Code() int { } func (o *PcloudVolumegroupsActionPostUnprocessableEntity) Error() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/{volume_group_id}/action][%d] pcloudVolumegroupsActionPostUnprocessableEntity %+v", 422, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/{volume_group_id}/action][%d] pcloudVolumegroupsActionPostUnprocessableEntity %s", 422, payload) } func (o *PcloudVolumegroupsActionPostUnprocessableEntity) String() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/{volume_group_id}/action][%d] pcloudVolumegroupsActionPostUnprocessableEntity %+v", 422, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/{volume_group_id}/action][%d] pcloudVolumegroupsActionPostUnprocessableEntity %s", 422, payload) } func (o *PcloudVolumegroupsActionPostUnprocessableEntity) GetPayload() *models.Error { @@ -521,11 +534,13 @@ func (o *PcloudVolumegroupsActionPostInternalServerError) Code() int { } func (o *PcloudVolumegroupsActionPostInternalServerError) Error() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/{volume_group_id}/action][%d] pcloudVolumegroupsActionPostInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/{volume_group_id}/action][%d] pcloudVolumegroupsActionPostInternalServerError %s", 500, payload) } func (o *PcloudVolumegroupsActionPostInternalServerError) String() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/{volume_group_id}/action][%d] pcloudVolumegroupsActionPostInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/{volume_group_id}/action][%d] pcloudVolumegroupsActionPostInternalServerError %s", 500, payload) } func (o *PcloudVolumegroupsActionPostInternalServerError) GetPayload() *models.Error { diff --git a/power/client/p_cloud_volume_groups/pcloud_volumegroups_delete_responses.go b/power/client/p_cloud_volume_groups/pcloud_volumegroups_delete_responses.go index d1c02fdc..259bec92 100644 --- a/power/client/p_cloud_volume_groups/pcloud_volumegroups_delete_responses.go +++ b/power/client/p_cloud_volume_groups/pcloud_volumegroups_delete_responses.go @@ -6,6 +6,7 @@ package p_cloud_volume_groups // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -109,11 +110,13 @@ func (o *PcloudVolumegroupsDeleteAccepted) Code() int { } func (o *PcloudVolumegroupsDeleteAccepted) Error() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/{volume_group_id}][%d] pcloudVolumegroupsDeleteAccepted %+v", 202, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/{volume_group_id}][%d] pcloudVolumegroupsDeleteAccepted %s", 202, payload) } func (o *PcloudVolumegroupsDeleteAccepted) String() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/{volume_group_id}][%d] pcloudVolumegroupsDeleteAccepted %+v", 202, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/{volume_group_id}][%d] pcloudVolumegroupsDeleteAccepted %s", 202, payload) } func (o *PcloudVolumegroupsDeleteAccepted) GetPayload() models.Object { @@ -175,11 +178,13 @@ func (o *PcloudVolumegroupsDeleteBadRequest) Code() int { } func (o *PcloudVolumegroupsDeleteBadRequest) Error() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/{volume_group_id}][%d] pcloudVolumegroupsDeleteBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/{volume_group_id}][%d] pcloudVolumegroupsDeleteBadRequest %s", 400, payload) } func (o *PcloudVolumegroupsDeleteBadRequest) String() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/{volume_group_id}][%d] pcloudVolumegroupsDeleteBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/{volume_group_id}][%d] pcloudVolumegroupsDeleteBadRequest %s", 400, payload) } func (o *PcloudVolumegroupsDeleteBadRequest) GetPayload() *models.Error { @@ -243,11 +248,13 @@ func (o *PcloudVolumegroupsDeleteUnauthorized) Code() int { } func (o *PcloudVolumegroupsDeleteUnauthorized) Error() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/{volume_group_id}][%d] pcloudVolumegroupsDeleteUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/{volume_group_id}][%d] pcloudVolumegroupsDeleteUnauthorized %s", 401, payload) } func (o *PcloudVolumegroupsDeleteUnauthorized) String() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/{volume_group_id}][%d] pcloudVolumegroupsDeleteUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/{volume_group_id}][%d] pcloudVolumegroupsDeleteUnauthorized %s", 401, payload) } func (o *PcloudVolumegroupsDeleteUnauthorized) GetPayload() *models.Error { @@ -311,11 +318,13 @@ func (o *PcloudVolumegroupsDeleteForbidden) Code() int { } func (o *PcloudVolumegroupsDeleteForbidden) Error() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/{volume_group_id}][%d] pcloudVolumegroupsDeleteForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/{volume_group_id}][%d] pcloudVolumegroupsDeleteForbidden %s", 403, payload) } func (o *PcloudVolumegroupsDeleteForbidden) String() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/{volume_group_id}][%d] pcloudVolumegroupsDeleteForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/{volume_group_id}][%d] pcloudVolumegroupsDeleteForbidden %s", 403, payload) } func (o *PcloudVolumegroupsDeleteForbidden) GetPayload() *models.Error { @@ -379,11 +388,13 @@ func (o *PcloudVolumegroupsDeleteNotFound) Code() int { } func (o *PcloudVolumegroupsDeleteNotFound) Error() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/{volume_group_id}][%d] pcloudVolumegroupsDeleteNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/{volume_group_id}][%d] pcloudVolumegroupsDeleteNotFound %s", 404, payload) } func (o *PcloudVolumegroupsDeleteNotFound) String() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/{volume_group_id}][%d] pcloudVolumegroupsDeleteNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/{volume_group_id}][%d] pcloudVolumegroupsDeleteNotFound %s", 404, payload) } func (o *PcloudVolumegroupsDeleteNotFound) GetPayload() *models.Error { @@ -447,11 +458,13 @@ func (o *PcloudVolumegroupsDeleteInternalServerError) Code() int { } func (o *PcloudVolumegroupsDeleteInternalServerError) Error() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/{volume_group_id}][%d] pcloudVolumegroupsDeleteInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/{volume_group_id}][%d] pcloudVolumegroupsDeleteInternalServerError %s", 500, payload) } func (o *PcloudVolumegroupsDeleteInternalServerError) String() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/{volume_group_id}][%d] pcloudVolumegroupsDeleteInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/{volume_group_id}][%d] pcloudVolumegroupsDeleteInternalServerError %s", 500, payload) } func (o *PcloudVolumegroupsDeleteInternalServerError) GetPayload() *models.Error { diff --git a/power/client/p_cloud_volume_groups/pcloud_volumegroups_get_details_responses.go b/power/client/p_cloud_volume_groups/pcloud_volumegroups_get_details_responses.go index 8f99d2ed..e44337c2 100644 --- a/power/client/p_cloud_volume_groups/pcloud_volumegroups_get_details_responses.go +++ b/power/client/p_cloud_volume_groups/pcloud_volumegroups_get_details_responses.go @@ -6,6 +6,7 @@ package p_cloud_volume_groups // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -109,11 +110,13 @@ func (o *PcloudVolumegroupsGetDetailsOK) Code() int { } func (o *PcloudVolumegroupsGetDetailsOK) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/{volume_group_id}/details][%d] pcloudVolumegroupsGetDetailsOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/{volume_group_id}/details][%d] pcloudVolumegroupsGetDetailsOK %s", 200, payload) } func (o *PcloudVolumegroupsGetDetailsOK) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/{volume_group_id}/details][%d] pcloudVolumegroupsGetDetailsOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/{volume_group_id}/details][%d] pcloudVolumegroupsGetDetailsOK %s", 200, payload) } func (o *PcloudVolumegroupsGetDetailsOK) GetPayload() *models.VolumeGroupDetails { @@ -177,11 +180,13 @@ func (o *PcloudVolumegroupsGetDetailsBadRequest) Code() int { } func (o *PcloudVolumegroupsGetDetailsBadRequest) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/{volume_group_id}/details][%d] pcloudVolumegroupsGetDetailsBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/{volume_group_id}/details][%d] pcloudVolumegroupsGetDetailsBadRequest %s", 400, payload) } func (o *PcloudVolumegroupsGetDetailsBadRequest) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/{volume_group_id}/details][%d] pcloudVolumegroupsGetDetailsBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/{volume_group_id}/details][%d] pcloudVolumegroupsGetDetailsBadRequest %s", 400, payload) } func (o *PcloudVolumegroupsGetDetailsBadRequest) GetPayload() *models.Error { @@ -245,11 +250,13 @@ func (o *PcloudVolumegroupsGetDetailsUnauthorized) Code() int { } func (o *PcloudVolumegroupsGetDetailsUnauthorized) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/{volume_group_id}/details][%d] pcloudVolumegroupsGetDetailsUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/{volume_group_id}/details][%d] pcloudVolumegroupsGetDetailsUnauthorized %s", 401, payload) } func (o *PcloudVolumegroupsGetDetailsUnauthorized) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/{volume_group_id}/details][%d] pcloudVolumegroupsGetDetailsUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/{volume_group_id}/details][%d] pcloudVolumegroupsGetDetailsUnauthorized %s", 401, payload) } func (o *PcloudVolumegroupsGetDetailsUnauthorized) GetPayload() *models.Error { @@ -313,11 +320,13 @@ func (o *PcloudVolumegroupsGetDetailsForbidden) Code() int { } func (o *PcloudVolumegroupsGetDetailsForbidden) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/{volume_group_id}/details][%d] pcloudVolumegroupsGetDetailsForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/{volume_group_id}/details][%d] pcloudVolumegroupsGetDetailsForbidden %s", 403, payload) } func (o *PcloudVolumegroupsGetDetailsForbidden) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/{volume_group_id}/details][%d] pcloudVolumegroupsGetDetailsForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/{volume_group_id}/details][%d] pcloudVolumegroupsGetDetailsForbidden %s", 403, payload) } func (o *PcloudVolumegroupsGetDetailsForbidden) GetPayload() *models.Error { @@ -381,11 +390,13 @@ func (o *PcloudVolumegroupsGetDetailsNotFound) Code() int { } func (o *PcloudVolumegroupsGetDetailsNotFound) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/{volume_group_id}/details][%d] pcloudVolumegroupsGetDetailsNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/{volume_group_id}/details][%d] pcloudVolumegroupsGetDetailsNotFound %s", 404, payload) } func (o *PcloudVolumegroupsGetDetailsNotFound) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/{volume_group_id}/details][%d] pcloudVolumegroupsGetDetailsNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/{volume_group_id}/details][%d] pcloudVolumegroupsGetDetailsNotFound %s", 404, payload) } func (o *PcloudVolumegroupsGetDetailsNotFound) GetPayload() *models.Error { @@ -449,11 +460,13 @@ func (o *PcloudVolumegroupsGetDetailsInternalServerError) Code() int { } func (o *PcloudVolumegroupsGetDetailsInternalServerError) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/{volume_group_id}/details][%d] pcloudVolumegroupsGetDetailsInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/{volume_group_id}/details][%d] pcloudVolumegroupsGetDetailsInternalServerError %s", 500, payload) } func (o *PcloudVolumegroupsGetDetailsInternalServerError) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/{volume_group_id}/details][%d] pcloudVolumegroupsGetDetailsInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/{volume_group_id}/details][%d] pcloudVolumegroupsGetDetailsInternalServerError %s", 500, payload) } func (o *PcloudVolumegroupsGetDetailsInternalServerError) GetPayload() *models.Error { diff --git a/power/client/p_cloud_volume_groups/pcloud_volumegroups_get_responses.go b/power/client/p_cloud_volume_groups/pcloud_volumegroups_get_responses.go index e2efcd04..38e74072 100644 --- a/power/client/p_cloud_volume_groups/pcloud_volumegroups_get_responses.go +++ b/power/client/p_cloud_volume_groups/pcloud_volumegroups_get_responses.go @@ -6,6 +6,7 @@ package p_cloud_volume_groups // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -109,11 +110,13 @@ func (o *PcloudVolumegroupsGetOK) Code() int { } func (o *PcloudVolumegroupsGetOK) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/{volume_group_id}][%d] pcloudVolumegroupsGetOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/{volume_group_id}][%d] pcloudVolumegroupsGetOK %s", 200, payload) } func (o *PcloudVolumegroupsGetOK) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/{volume_group_id}][%d] pcloudVolumegroupsGetOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/{volume_group_id}][%d] pcloudVolumegroupsGetOK %s", 200, payload) } func (o *PcloudVolumegroupsGetOK) GetPayload() *models.VolumeGroup { @@ -177,11 +180,13 @@ func (o *PcloudVolumegroupsGetBadRequest) Code() int { } func (o *PcloudVolumegroupsGetBadRequest) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/{volume_group_id}][%d] pcloudVolumegroupsGetBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/{volume_group_id}][%d] pcloudVolumegroupsGetBadRequest %s", 400, payload) } func (o *PcloudVolumegroupsGetBadRequest) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/{volume_group_id}][%d] pcloudVolumegroupsGetBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/{volume_group_id}][%d] pcloudVolumegroupsGetBadRequest %s", 400, payload) } func (o *PcloudVolumegroupsGetBadRequest) GetPayload() *models.Error { @@ -245,11 +250,13 @@ func (o *PcloudVolumegroupsGetUnauthorized) Code() int { } func (o *PcloudVolumegroupsGetUnauthorized) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/{volume_group_id}][%d] pcloudVolumegroupsGetUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/{volume_group_id}][%d] pcloudVolumegroupsGetUnauthorized %s", 401, payload) } func (o *PcloudVolumegroupsGetUnauthorized) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/{volume_group_id}][%d] pcloudVolumegroupsGetUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/{volume_group_id}][%d] pcloudVolumegroupsGetUnauthorized %s", 401, payload) } func (o *PcloudVolumegroupsGetUnauthorized) GetPayload() *models.Error { @@ -313,11 +320,13 @@ func (o *PcloudVolumegroupsGetForbidden) Code() int { } func (o *PcloudVolumegroupsGetForbidden) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/{volume_group_id}][%d] pcloudVolumegroupsGetForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/{volume_group_id}][%d] pcloudVolumegroupsGetForbidden %s", 403, payload) } func (o *PcloudVolumegroupsGetForbidden) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/{volume_group_id}][%d] pcloudVolumegroupsGetForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/{volume_group_id}][%d] pcloudVolumegroupsGetForbidden %s", 403, payload) } func (o *PcloudVolumegroupsGetForbidden) GetPayload() *models.Error { @@ -381,11 +390,13 @@ func (o *PcloudVolumegroupsGetNotFound) Code() int { } func (o *PcloudVolumegroupsGetNotFound) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/{volume_group_id}][%d] pcloudVolumegroupsGetNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/{volume_group_id}][%d] pcloudVolumegroupsGetNotFound %s", 404, payload) } func (o *PcloudVolumegroupsGetNotFound) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/{volume_group_id}][%d] pcloudVolumegroupsGetNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/{volume_group_id}][%d] pcloudVolumegroupsGetNotFound %s", 404, payload) } func (o *PcloudVolumegroupsGetNotFound) GetPayload() *models.Error { @@ -449,11 +460,13 @@ func (o *PcloudVolumegroupsGetInternalServerError) Code() int { } func (o *PcloudVolumegroupsGetInternalServerError) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/{volume_group_id}][%d] pcloudVolumegroupsGetInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/{volume_group_id}][%d] pcloudVolumegroupsGetInternalServerError %s", 500, payload) } func (o *PcloudVolumegroupsGetInternalServerError) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/{volume_group_id}][%d] pcloudVolumegroupsGetInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/{volume_group_id}][%d] pcloudVolumegroupsGetInternalServerError %s", 500, payload) } func (o *PcloudVolumegroupsGetInternalServerError) GetPayload() *models.Error { diff --git a/power/client/p_cloud_volume_groups/pcloud_volumegroups_getall_details_responses.go b/power/client/p_cloud_volume_groups/pcloud_volumegroups_getall_details_responses.go index 4397ec85..bc076a04 100644 --- a/power/client/p_cloud_volume_groups/pcloud_volumegroups_getall_details_responses.go +++ b/power/client/p_cloud_volume_groups/pcloud_volumegroups_getall_details_responses.go @@ -6,6 +6,7 @@ package p_cloud_volume_groups // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -109,11 +110,13 @@ func (o *PcloudVolumegroupsGetallDetailsOK) Code() int { } func (o *PcloudVolumegroupsGetallDetailsOK) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/details][%d] pcloudVolumegroupsGetallDetailsOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/details][%d] pcloudVolumegroupsGetallDetailsOK %s", 200, payload) } func (o *PcloudVolumegroupsGetallDetailsOK) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/details][%d] pcloudVolumegroupsGetallDetailsOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/details][%d] pcloudVolumegroupsGetallDetailsOK %s", 200, payload) } func (o *PcloudVolumegroupsGetallDetailsOK) GetPayload() *models.VolumeGroupsDetails { @@ -177,11 +180,13 @@ func (o *PcloudVolumegroupsGetallDetailsBadRequest) Code() int { } func (o *PcloudVolumegroupsGetallDetailsBadRequest) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/details][%d] pcloudVolumegroupsGetallDetailsBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/details][%d] pcloudVolumegroupsGetallDetailsBadRequest %s", 400, payload) } func (o *PcloudVolumegroupsGetallDetailsBadRequest) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/details][%d] pcloudVolumegroupsGetallDetailsBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/details][%d] pcloudVolumegroupsGetallDetailsBadRequest %s", 400, payload) } func (o *PcloudVolumegroupsGetallDetailsBadRequest) GetPayload() *models.Error { @@ -245,11 +250,13 @@ func (o *PcloudVolumegroupsGetallDetailsUnauthorized) Code() int { } func (o *PcloudVolumegroupsGetallDetailsUnauthorized) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/details][%d] pcloudVolumegroupsGetallDetailsUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/details][%d] pcloudVolumegroupsGetallDetailsUnauthorized %s", 401, payload) } func (o *PcloudVolumegroupsGetallDetailsUnauthorized) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/details][%d] pcloudVolumegroupsGetallDetailsUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/details][%d] pcloudVolumegroupsGetallDetailsUnauthorized %s", 401, payload) } func (o *PcloudVolumegroupsGetallDetailsUnauthorized) GetPayload() *models.Error { @@ -313,11 +320,13 @@ func (o *PcloudVolumegroupsGetallDetailsForbidden) Code() int { } func (o *PcloudVolumegroupsGetallDetailsForbidden) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/details][%d] pcloudVolumegroupsGetallDetailsForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/details][%d] pcloudVolumegroupsGetallDetailsForbidden %s", 403, payload) } func (o *PcloudVolumegroupsGetallDetailsForbidden) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/details][%d] pcloudVolumegroupsGetallDetailsForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/details][%d] pcloudVolumegroupsGetallDetailsForbidden %s", 403, payload) } func (o *PcloudVolumegroupsGetallDetailsForbidden) GetPayload() *models.Error { @@ -381,11 +390,13 @@ func (o *PcloudVolumegroupsGetallDetailsNotFound) Code() int { } func (o *PcloudVolumegroupsGetallDetailsNotFound) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/details][%d] pcloudVolumegroupsGetallDetailsNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/details][%d] pcloudVolumegroupsGetallDetailsNotFound %s", 404, payload) } func (o *PcloudVolumegroupsGetallDetailsNotFound) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/details][%d] pcloudVolumegroupsGetallDetailsNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/details][%d] pcloudVolumegroupsGetallDetailsNotFound %s", 404, payload) } func (o *PcloudVolumegroupsGetallDetailsNotFound) GetPayload() *models.Error { @@ -449,11 +460,13 @@ func (o *PcloudVolumegroupsGetallDetailsInternalServerError) Code() int { } func (o *PcloudVolumegroupsGetallDetailsInternalServerError) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/details][%d] pcloudVolumegroupsGetallDetailsInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/details][%d] pcloudVolumegroupsGetallDetailsInternalServerError %s", 500, payload) } func (o *PcloudVolumegroupsGetallDetailsInternalServerError) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/details][%d] pcloudVolumegroupsGetallDetailsInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/details][%d] pcloudVolumegroupsGetallDetailsInternalServerError %s", 500, payload) } func (o *PcloudVolumegroupsGetallDetailsInternalServerError) GetPayload() *models.Error { diff --git a/power/client/p_cloud_volume_groups/pcloud_volumegroups_getall_responses.go b/power/client/p_cloud_volume_groups/pcloud_volumegroups_getall_responses.go index f488e4dd..d8b1a7a2 100644 --- a/power/client/p_cloud_volume_groups/pcloud_volumegroups_getall_responses.go +++ b/power/client/p_cloud_volume_groups/pcloud_volumegroups_getall_responses.go @@ -6,6 +6,7 @@ package p_cloud_volume_groups // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -109,11 +110,13 @@ func (o *PcloudVolumegroupsGetallOK) Code() int { } func (o *PcloudVolumegroupsGetallOK) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups][%d] pcloudVolumegroupsGetallOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups][%d] pcloudVolumegroupsGetallOK %s", 200, payload) } func (o *PcloudVolumegroupsGetallOK) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups][%d] pcloudVolumegroupsGetallOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups][%d] pcloudVolumegroupsGetallOK %s", 200, payload) } func (o *PcloudVolumegroupsGetallOK) GetPayload() *models.VolumeGroups { @@ -177,11 +180,13 @@ func (o *PcloudVolumegroupsGetallBadRequest) Code() int { } func (o *PcloudVolumegroupsGetallBadRequest) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups][%d] pcloudVolumegroupsGetallBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups][%d] pcloudVolumegroupsGetallBadRequest %s", 400, payload) } func (o *PcloudVolumegroupsGetallBadRequest) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups][%d] pcloudVolumegroupsGetallBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups][%d] pcloudVolumegroupsGetallBadRequest %s", 400, payload) } func (o *PcloudVolumegroupsGetallBadRequest) GetPayload() *models.Error { @@ -245,11 +250,13 @@ func (o *PcloudVolumegroupsGetallUnauthorized) Code() int { } func (o *PcloudVolumegroupsGetallUnauthorized) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups][%d] pcloudVolumegroupsGetallUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups][%d] pcloudVolumegroupsGetallUnauthorized %s", 401, payload) } func (o *PcloudVolumegroupsGetallUnauthorized) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups][%d] pcloudVolumegroupsGetallUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups][%d] pcloudVolumegroupsGetallUnauthorized %s", 401, payload) } func (o *PcloudVolumegroupsGetallUnauthorized) GetPayload() *models.Error { @@ -313,11 +320,13 @@ func (o *PcloudVolumegroupsGetallForbidden) Code() int { } func (o *PcloudVolumegroupsGetallForbidden) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups][%d] pcloudVolumegroupsGetallForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups][%d] pcloudVolumegroupsGetallForbidden %s", 403, payload) } func (o *PcloudVolumegroupsGetallForbidden) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups][%d] pcloudVolumegroupsGetallForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups][%d] pcloudVolumegroupsGetallForbidden %s", 403, payload) } func (o *PcloudVolumegroupsGetallForbidden) GetPayload() *models.Error { @@ -381,11 +390,13 @@ func (o *PcloudVolumegroupsGetallNotFound) Code() int { } func (o *PcloudVolumegroupsGetallNotFound) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups][%d] pcloudVolumegroupsGetallNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups][%d] pcloudVolumegroupsGetallNotFound %s", 404, payload) } func (o *PcloudVolumegroupsGetallNotFound) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups][%d] pcloudVolumegroupsGetallNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups][%d] pcloudVolumegroupsGetallNotFound %s", 404, payload) } func (o *PcloudVolumegroupsGetallNotFound) GetPayload() *models.Error { @@ -449,11 +460,13 @@ func (o *PcloudVolumegroupsGetallInternalServerError) Code() int { } func (o *PcloudVolumegroupsGetallInternalServerError) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups][%d] pcloudVolumegroupsGetallInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups][%d] pcloudVolumegroupsGetallInternalServerError %s", 500, payload) } func (o *PcloudVolumegroupsGetallInternalServerError) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups][%d] pcloudVolumegroupsGetallInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups][%d] pcloudVolumegroupsGetallInternalServerError %s", 500, payload) } func (o *PcloudVolumegroupsGetallInternalServerError) GetPayload() *models.Error { diff --git a/power/client/p_cloud_volume_groups/pcloud_volumegroups_post_responses.go b/power/client/p_cloud_volume_groups/pcloud_volumegroups_post_responses.go index a5f9b46d..731fc036 100644 --- a/power/client/p_cloud_volume_groups/pcloud_volumegroups_post_responses.go +++ b/power/client/p_cloud_volume_groups/pcloud_volumegroups_post_responses.go @@ -6,6 +6,7 @@ package p_cloud_volume_groups // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -133,11 +134,13 @@ func (o *PcloudVolumegroupsPostAccepted) Code() int { } func (o *PcloudVolumegroupsPostAccepted) Error() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups][%d] pcloudVolumegroupsPostAccepted %+v", 202, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups][%d] pcloudVolumegroupsPostAccepted %s", 202, payload) } func (o *PcloudVolumegroupsPostAccepted) String() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups][%d] pcloudVolumegroupsPostAccepted %+v", 202, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups][%d] pcloudVolumegroupsPostAccepted %s", 202, payload) } func (o *PcloudVolumegroupsPostAccepted) GetPayload() *models.VolumeGroupCreateResponse { @@ -201,11 +204,13 @@ func (o *PcloudVolumegroupsPostPartialContent) Code() int { } func (o *PcloudVolumegroupsPostPartialContent) Error() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups][%d] pcloudVolumegroupsPostPartialContent %+v", 206, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups][%d] pcloudVolumegroupsPostPartialContent %s", 206, payload) } func (o *PcloudVolumegroupsPostPartialContent) String() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups][%d] pcloudVolumegroupsPostPartialContent %+v", 206, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups][%d] pcloudVolumegroupsPostPartialContent %s", 206, payload) } func (o *PcloudVolumegroupsPostPartialContent) GetPayload() *models.VolumeGroupCreateResponse { @@ -269,11 +274,13 @@ func (o *PcloudVolumegroupsPostBadRequest) Code() int { } func (o *PcloudVolumegroupsPostBadRequest) Error() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups][%d] pcloudVolumegroupsPostBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups][%d] pcloudVolumegroupsPostBadRequest %s", 400, payload) } func (o *PcloudVolumegroupsPostBadRequest) String() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups][%d] pcloudVolumegroupsPostBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups][%d] pcloudVolumegroupsPostBadRequest %s", 400, payload) } func (o *PcloudVolumegroupsPostBadRequest) GetPayload() *models.Error { @@ -337,11 +344,13 @@ func (o *PcloudVolumegroupsPostUnauthorized) Code() int { } func (o *PcloudVolumegroupsPostUnauthorized) Error() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups][%d] pcloudVolumegroupsPostUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups][%d] pcloudVolumegroupsPostUnauthorized %s", 401, payload) } func (o *PcloudVolumegroupsPostUnauthorized) String() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups][%d] pcloudVolumegroupsPostUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups][%d] pcloudVolumegroupsPostUnauthorized %s", 401, payload) } func (o *PcloudVolumegroupsPostUnauthorized) GetPayload() *models.Error { @@ -405,11 +414,13 @@ func (o *PcloudVolumegroupsPostForbidden) Code() int { } func (o *PcloudVolumegroupsPostForbidden) Error() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups][%d] pcloudVolumegroupsPostForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups][%d] pcloudVolumegroupsPostForbidden %s", 403, payload) } func (o *PcloudVolumegroupsPostForbidden) String() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups][%d] pcloudVolumegroupsPostForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups][%d] pcloudVolumegroupsPostForbidden %s", 403, payload) } func (o *PcloudVolumegroupsPostForbidden) GetPayload() *models.Error { @@ -473,11 +484,13 @@ func (o *PcloudVolumegroupsPostNotFound) Code() int { } func (o *PcloudVolumegroupsPostNotFound) Error() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups][%d] pcloudVolumegroupsPostNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups][%d] pcloudVolumegroupsPostNotFound %s", 404, payload) } func (o *PcloudVolumegroupsPostNotFound) String() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups][%d] pcloudVolumegroupsPostNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups][%d] pcloudVolumegroupsPostNotFound %s", 404, payload) } func (o *PcloudVolumegroupsPostNotFound) GetPayload() *models.Error { @@ -541,11 +554,13 @@ func (o *PcloudVolumegroupsPostConflict) Code() int { } func (o *PcloudVolumegroupsPostConflict) Error() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups][%d] pcloudVolumegroupsPostConflict %+v", 409, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups][%d] pcloudVolumegroupsPostConflict %s", 409, payload) } func (o *PcloudVolumegroupsPostConflict) String() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups][%d] pcloudVolumegroupsPostConflict %+v", 409, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups][%d] pcloudVolumegroupsPostConflict %s", 409, payload) } func (o *PcloudVolumegroupsPostConflict) GetPayload() *models.Error { @@ -609,11 +624,13 @@ func (o *PcloudVolumegroupsPostUnprocessableEntity) Code() int { } func (o *PcloudVolumegroupsPostUnprocessableEntity) Error() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups][%d] pcloudVolumegroupsPostUnprocessableEntity %+v", 422, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups][%d] pcloudVolumegroupsPostUnprocessableEntity %s", 422, payload) } func (o *PcloudVolumegroupsPostUnprocessableEntity) String() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups][%d] pcloudVolumegroupsPostUnprocessableEntity %+v", 422, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups][%d] pcloudVolumegroupsPostUnprocessableEntity %s", 422, payload) } func (o *PcloudVolumegroupsPostUnprocessableEntity) GetPayload() *models.Error { @@ -677,11 +694,13 @@ func (o *PcloudVolumegroupsPostInternalServerError) Code() int { } func (o *PcloudVolumegroupsPostInternalServerError) Error() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups][%d] pcloudVolumegroupsPostInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups][%d] pcloudVolumegroupsPostInternalServerError %s", 500, payload) } func (o *PcloudVolumegroupsPostInternalServerError) String() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups][%d] pcloudVolumegroupsPostInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups][%d] pcloudVolumegroupsPostInternalServerError %s", 500, payload) } func (o *PcloudVolumegroupsPostInternalServerError) GetPayload() *models.Error { @@ -745,11 +764,13 @@ func (o *PcloudVolumegroupsPostGatewayTimeout) Code() int { } func (o *PcloudVolumegroupsPostGatewayTimeout) Error() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups][%d] pcloudVolumegroupsPostGatewayTimeout %+v", 504, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups][%d] pcloudVolumegroupsPostGatewayTimeout %s", 504, payload) } func (o *PcloudVolumegroupsPostGatewayTimeout) String() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups][%d] pcloudVolumegroupsPostGatewayTimeout %+v", 504, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups][%d] pcloudVolumegroupsPostGatewayTimeout %s", 504, payload) } func (o *PcloudVolumegroupsPostGatewayTimeout) GetPayload() *models.Error { diff --git a/power/client/p_cloud_volume_groups/pcloud_volumegroups_put_responses.go b/power/client/p_cloud_volume_groups/pcloud_volumegroups_put_responses.go index 121a977d..4ed822ba 100644 --- a/power/client/p_cloud_volume_groups/pcloud_volumegroups_put_responses.go +++ b/power/client/p_cloud_volume_groups/pcloud_volumegroups_put_responses.go @@ -6,6 +6,7 @@ package p_cloud_volume_groups // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -121,11 +122,13 @@ func (o *PcloudVolumegroupsPutAccepted) Code() int { } func (o *PcloudVolumegroupsPutAccepted) Error() string { - return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/{volume_group_id}][%d] pcloudVolumegroupsPutAccepted %+v", 202, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/{volume_group_id}][%d] pcloudVolumegroupsPutAccepted %s", 202, payload) } func (o *PcloudVolumegroupsPutAccepted) String() string { - return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/{volume_group_id}][%d] pcloudVolumegroupsPutAccepted %+v", 202, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/{volume_group_id}][%d] pcloudVolumegroupsPutAccepted %s", 202, payload) } func (o *PcloudVolumegroupsPutAccepted) GetPayload() models.Object { @@ -187,11 +190,13 @@ func (o *PcloudVolumegroupsPutBadRequest) Code() int { } func (o *PcloudVolumegroupsPutBadRequest) Error() string { - return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/{volume_group_id}][%d] pcloudVolumegroupsPutBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/{volume_group_id}][%d] pcloudVolumegroupsPutBadRequest %s", 400, payload) } func (o *PcloudVolumegroupsPutBadRequest) String() string { - return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/{volume_group_id}][%d] pcloudVolumegroupsPutBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/{volume_group_id}][%d] pcloudVolumegroupsPutBadRequest %s", 400, payload) } func (o *PcloudVolumegroupsPutBadRequest) GetPayload() *models.Error { @@ -255,11 +260,13 @@ func (o *PcloudVolumegroupsPutUnauthorized) Code() int { } func (o *PcloudVolumegroupsPutUnauthorized) Error() string { - return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/{volume_group_id}][%d] pcloudVolumegroupsPutUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/{volume_group_id}][%d] pcloudVolumegroupsPutUnauthorized %s", 401, payload) } func (o *PcloudVolumegroupsPutUnauthorized) String() string { - return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/{volume_group_id}][%d] pcloudVolumegroupsPutUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/{volume_group_id}][%d] pcloudVolumegroupsPutUnauthorized %s", 401, payload) } func (o *PcloudVolumegroupsPutUnauthorized) GetPayload() *models.Error { @@ -323,11 +330,13 @@ func (o *PcloudVolumegroupsPutForbidden) Code() int { } func (o *PcloudVolumegroupsPutForbidden) Error() string { - return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/{volume_group_id}][%d] pcloudVolumegroupsPutForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/{volume_group_id}][%d] pcloudVolumegroupsPutForbidden %s", 403, payload) } func (o *PcloudVolumegroupsPutForbidden) String() string { - return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/{volume_group_id}][%d] pcloudVolumegroupsPutForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/{volume_group_id}][%d] pcloudVolumegroupsPutForbidden %s", 403, payload) } func (o *PcloudVolumegroupsPutForbidden) GetPayload() *models.Error { @@ -391,11 +400,13 @@ func (o *PcloudVolumegroupsPutNotFound) Code() int { } func (o *PcloudVolumegroupsPutNotFound) Error() string { - return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/{volume_group_id}][%d] pcloudVolumegroupsPutNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/{volume_group_id}][%d] pcloudVolumegroupsPutNotFound %s", 404, payload) } func (o *PcloudVolumegroupsPutNotFound) String() string { - return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/{volume_group_id}][%d] pcloudVolumegroupsPutNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/{volume_group_id}][%d] pcloudVolumegroupsPutNotFound %s", 404, payload) } func (o *PcloudVolumegroupsPutNotFound) GetPayload() *models.Error { @@ -459,11 +470,13 @@ func (o *PcloudVolumegroupsPutConflict) Code() int { } func (o *PcloudVolumegroupsPutConflict) Error() string { - return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/{volume_group_id}][%d] pcloudVolumegroupsPutConflict %+v", 409, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/{volume_group_id}][%d] pcloudVolumegroupsPutConflict %s", 409, payload) } func (o *PcloudVolumegroupsPutConflict) String() string { - return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/{volume_group_id}][%d] pcloudVolumegroupsPutConflict %+v", 409, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/{volume_group_id}][%d] pcloudVolumegroupsPutConflict %s", 409, payload) } func (o *PcloudVolumegroupsPutConflict) GetPayload() *models.Error { @@ -527,11 +540,13 @@ func (o *PcloudVolumegroupsPutUnprocessableEntity) Code() int { } func (o *PcloudVolumegroupsPutUnprocessableEntity) Error() string { - return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/{volume_group_id}][%d] pcloudVolumegroupsPutUnprocessableEntity %+v", 422, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/{volume_group_id}][%d] pcloudVolumegroupsPutUnprocessableEntity %s", 422, payload) } func (o *PcloudVolumegroupsPutUnprocessableEntity) String() string { - return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/{volume_group_id}][%d] pcloudVolumegroupsPutUnprocessableEntity %+v", 422, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/{volume_group_id}][%d] pcloudVolumegroupsPutUnprocessableEntity %s", 422, payload) } func (o *PcloudVolumegroupsPutUnprocessableEntity) GetPayload() *models.Error { @@ -595,11 +610,13 @@ func (o *PcloudVolumegroupsPutInternalServerError) Code() int { } func (o *PcloudVolumegroupsPutInternalServerError) Error() string { - return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/{volume_group_id}][%d] pcloudVolumegroupsPutInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/{volume_group_id}][%d] pcloudVolumegroupsPutInternalServerError %s", 500, payload) } func (o *PcloudVolumegroupsPutInternalServerError) String() string { - return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/{volume_group_id}][%d] pcloudVolumegroupsPutInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/{volume_group_id}][%d] pcloudVolumegroupsPutInternalServerError %s", 500, payload) } func (o *PcloudVolumegroupsPutInternalServerError) GetPayload() *models.Error { diff --git a/power/client/p_cloud_volume_groups/pcloud_volumegroups_remote_copy_relationships_get_responses.go b/power/client/p_cloud_volume_groups/pcloud_volumegroups_remote_copy_relationships_get_responses.go index e3092d6b..17163b57 100644 --- a/power/client/p_cloud_volume_groups/pcloud_volumegroups_remote_copy_relationships_get_responses.go +++ b/power/client/p_cloud_volume_groups/pcloud_volumegroups_remote_copy_relationships_get_responses.go @@ -6,6 +6,7 @@ package p_cloud_volume_groups // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -115,11 +116,13 @@ func (o *PcloudVolumegroupsRemoteCopyRelationshipsGetOK) Code() int { } func (o *PcloudVolumegroupsRemoteCopyRelationshipsGetOK) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/{volume_group_id}/remote-copy-relationships][%d] pcloudVolumegroupsRemoteCopyRelationshipsGetOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/{volume_group_id}/remote-copy-relationships][%d] pcloudVolumegroupsRemoteCopyRelationshipsGetOK %s", 200, payload) } func (o *PcloudVolumegroupsRemoteCopyRelationshipsGetOK) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/{volume_group_id}/remote-copy-relationships][%d] pcloudVolumegroupsRemoteCopyRelationshipsGetOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/{volume_group_id}/remote-copy-relationships][%d] pcloudVolumegroupsRemoteCopyRelationshipsGetOK %s", 200, payload) } func (o *PcloudVolumegroupsRemoteCopyRelationshipsGetOK) GetPayload() *models.VolumeGroupRemoteCopyRelationships { @@ -183,11 +186,13 @@ func (o *PcloudVolumegroupsRemoteCopyRelationshipsGetBadRequest) Code() int { } func (o *PcloudVolumegroupsRemoteCopyRelationshipsGetBadRequest) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/{volume_group_id}/remote-copy-relationships][%d] pcloudVolumegroupsRemoteCopyRelationshipsGetBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/{volume_group_id}/remote-copy-relationships][%d] pcloudVolumegroupsRemoteCopyRelationshipsGetBadRequest %s", 400, payload) } func (o *PcloudVolumegroupsRemoteCopyRelationshipsGetBadRequest) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/{volume_group_id}/remote-copy-relationships][%d] pcloudVolumegroupsRemoteCopyRelationshipsGetBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/{volume_group_id}/remote-copy-relationships][%d] pcloudVolumegroupsRemoteCopyRelationshipsGetBadRequest %s", 400, payload) } func (o *PcloudVolumegroupsRemoteCopyRelationshipsGetBadRequest) GetPayload() *models.Error { @@ -251,11 +256,13 @@ func (o *PcloudVolumegroupsRemoteCopyRelationshipsGetUnauthorized) Code() int { } func (o *PcloudVolumegroupsRemoteCopyRelationshipsGetUnauthorized) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/{volume_group_id}/remote-copy-relationships][%d] pcloudVolumegroupsRemoteCopyRelationshipsGetUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/{volume_group_id}/remote-copy-relationships][%d] pcloudVolumegroupsRemoteCopyRelationshipsGetUnauthorized %s", 401, payload) } func (o *PcloudVolumegroupsRemoteCopyRelationshipsGetUnauthorized) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/{volume_group_id}/remote-copy-relationships][%d] pcloudVolumegroupsRemoteCopyRelationshipsGetUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/{volume_group_id}/remote-copy-relationships][%d] pcloudVolumegroupsRemoteCopyRelationshipsGetUnauthorized %s", 401, payload) } func (o *PcloudVolumegroupsRemoteCopyRelationshipsGetUnauthorized) GetPayload() *models.Error { @@ -319,11 +326,13 @@ func (o *PcloudVolumegroupsRemoteCopyRelationshipsGetForbidden) Code() int { } func (o *PcloudVolumegroupsRemoteCopyRelationshipsGetForbidden) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/{volume_group_id}/remote-copy-relationships][%d] pcloudVolumegroupsRemoteCopyRelationshipsGetForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/{volume_group_id}/remote-copy-relationships][%d] pcloudVolumegroupsRemoteCopyRelationshipsGetForbidden %s", 403, payload) } func (o *PcloudVolumegroupsRemoteCopyRelationshipsGetForbidden) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/{volume_group_id}/remote-copy-relationships][%d] pcloudVolumegroupsRemoteCopyRelationshipsGetForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/{volume_group_id}/remote-copy-relationships][%d] pcloudVolumegroupsRemoteCopyRelationshipsGetForbidden %s", 403, payload) } func (o *PcloudVolumegroupsRemoteCopyRelationshipsGetForbidden) GetPayload() *models.Error { @@ -387,11 +396,13 @@ func (o *PcloudVolumegroupsRemoteCopyRelationshipsGetNotFound) Code() int { } func (o *PcloudVolumegroupsRemoteCopyRelationshipsGetNotFound) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/{volume_group_id}/remote-copy-relationships][%d] pcloudVolumegroupsRemoteCopyRelationshipsGetNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/{volume_group_id}/remote-copy-relationships][%d] pcloudVolumegroupsRemoteCopyRelationshipsGetNotFound %s", 404, payload) } func (o *PcloudVolumegroupsRemoteCopyRelationshipsGetNotFound) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/{volume_group_id}/remote-copy-relationships][%d] pcloudVolumegroupsRemoteCopyRelationshipsGetNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/{volume_group_id}/remote-copy-relationships][%d] pcloudVolumegroupsRemoteCopyRelationshipsGetNotFound %s", 404, payload) } func (o *PcloudVolumegroupsRemoteCopyRelationshipsGetNotFound) GetPayload() *models.Error { @@ -455,11 +466,13 @@ func (o *PcloudVolumegroupsRemoteCopyRelationshipsGetTooManyRequests) Code() int } func (o *PcloudVolumegroupsRemoteCopyRelationshipsGetTooManyRequests) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/{volume_group_id}/remote-copy-relationships][%d] pcloudVolumegroupsRemoteCopyRelationshipsGetTooManyRequests %+v", 429, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/{volume_group_id}/remote-copy-relationships][%d] pcloudVolumegroupsRemoteCopyRelationshipsGetTooManyRequests %s", 429, payload) } func (o *PcloudVolumegroupsRemoteCopyRelationshipsGetTooManyRequests) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/{volume_group_id}/remote-copy-relationships][%d] pcloudVolumegroupsRemoteCopyRelationshipsGetTooManyRequests %+v", 429, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/{volume_group_id}/remote-copy-relationships][%d] pcloudVolumegroupsRemoteCopyRelationshipsGetTooManyRequests %s", 429, payload) } func (o *PcloudVolumegroupsRemoteCopyRelationshipsGetTooManyRequests) GetPayload() *models.Error { @@ -523,11 +536,13 @@ func (o *PcloudVolumegroupsRemoteCopyRelationshipsGetInternalServerError) Code() } func (o *PcloudVolumegroupsRemoteCopyRelationshipsGetInternalServerError) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/{volume_group_id}/remote-copy-relationships][%d] pcloudVolumegroupsRemoteCopyRelationshipsGetInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/{volume_group_id}/remote-copy-relationships][%d] pcloudVolumegroupsRemoteCopyRelationshipsGetInternalServerError %s", 500, payload) } func (o *PcloudVolumegroupsRemoteCopyRelationshipsGetInternalServerError) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/{volume_group_id}/remote-copy-relationships][%d] pcloudVolumegroupsRemoteCopyRelationshipsGetInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/{volume_group_id}/remote-copy-relationships][%d] pcloudVolumegroupsRemoteCopyRelationshipsGetInternalServerError %s", 500, payload) } func (o *PcloudVolumegroupsRemoteCopyRelationshipsGetInternalServerError) GetPayload() *models.Error { diff --git a/power/client/p_cloud_volume_groups/pcloud_volumegroups_storage_details_get_responses.go b/power/client/p_cloud_volume_groups/pcloud_volumegroups_storage_details_get_responses.go index 6d39a07e..54136c93 100644 --- a/power/client/p_cloud_volume_groups/pcloud_volumegroups_storage_details_get_responses.go +++ b/power/client/p_cloud_volume_groups/pcloud_volumegroups_storage_details_get_responses.go @@ -6,6 +6,7 @@ package p_cloud_volume_groups // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -115,11 +116,13 @@ func (o *PcloudVolumegroupsStorageDetailsGetOK) Code() int { } func (o *PcloudVolumegroupsStorageDetailsGetOK) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/{volume_group_id}/storage-details][%d] pcloudVolumegroupsStorageDetailsGetOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/{volume_group_id}/storage-details][%d] pcloudVolumegroupsStorageDetailsGetOK %s", 200, payload) } func (o *PcloudVolumegroupsStorageDetailsGetOK) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/{volume_group_id}/storage-details][%d] pcloudVolumegroupsStorageDetailsGetOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/{volume_group_id}/storage-details][%d] pcloudVolumegroupsStorageDetailsGetOK %s", 200, payload) } func (o *PcloudVolumegroupsStorageDetailsGetOK) GetPayload() *models.VolumeGroupStorageDetails { @@ -183,11 +186,13 @@ func (o *PcloudVolumegroupsStorageDetailsGetBadRequest) Code() int { } func (o *PcloudVolumegroupsStorageDetailsGetBadRequest) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/{volume_group_id}/storage-details][%d] pcloudVolumegroupsStorageDetailsGetBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/{volume_group_id}/storage-details][%d] pcloudVolumegroupsStorageDetailsGetBadRequest %s", 400, payload) } func (o *PcloudVolumegroupsStorageDetailsGetBadRequest) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/{volume_group_id}/storage-details][%d] pcloudVolumegroupsStorageDetailsGetBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/{volume_group_id}/storage-details][%d] pcloudVolumegroupsStorageDetailsGetBadRequest %s", 400, payload) } func (o *PcloudVolumegroupsStorageDetailsGetBadRequest) GetPayload() *models.Error { @@ -251,11 +256,13 @@ func (o *PcloudVolumegroupsStorageDetailsGetUnauthorized) Code() int { } func (o *PcloudVolumegroupsStorageDetailsGetUnauthorized) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/{volume_group_id}/storage-details][%d] pcloudVolumegroupsStorageDetailsGetUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/{volume_group_id}/storage-details][%d] pcloudVolumegroupsStorageDetailsGetUnauthorized %s", 401, payload) } func (o *PcloudVolumegroupsStorageDetailsGetUnauthorized) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/{volume_group_id}/storage-details][%d] pcloudVolumegroupsStorageDetailsGetUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/{volume_group_id}/storage-details][%d] pcloudVolumegroupsStorageDetailsGetUnauthorized %s", 401, payload) } func (o *PcloudVolumegroupsStorageDetailsGetUnauthorized) GetPayload() *models.Error { @@ -319,11 +326,13 @@ func (o *PcloudVolumegroupsStorageDetailsGetForbidden) Code() int { } func (o *PcloudVolumegroupsStorageDetailsGetForbidden) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/{volume_group_id}/storage-details][%d] pcloudVolumegroupsStorageDetailsGetForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/{volume_group_id}/storage-details][%d] pcloudVolumegroupsStorageDetailsGetForbidden %s", 403, payload) } func (o *PcloudVolumegroupsStorageDetailsGetForbidden) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/{volume_group_id}/storage-details][%d] pcloudVolumegroupsStorageDetailsGetForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/{volume_group_id}/storage-details][%d] pcloudVolumegroupsStorageDetailsGetForbidden %s", 403, payload) } func (o *PcloudVolumegroupsStorageDetailsGetForbidden) GetPayload() *models.Error { @@ -387,11 +396,13 @@ func (o *PcloudVolumegroupsStorageDetailsGetNotFound) Code() int { } func (o *PcloudVolumegroupsStorageDetailsGetNotFound) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/{volume_group_id}/storage-details][%d] pcloudVolumegroupsStorageDetailsGetNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/{volume_group_id}/storage-details][%d] pcloudVolumegroupsStorageDetailsGetNotFound %s", 404, payload) } func (o *PcloudVolumegroupsStorageDetailsGetNotFound) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/{volume_group_id}/storage-details][%d] pcloudVolumegroupsStorageDetailsGetNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/{volume_group_id}/storage-details][%d] pcloudVolumegroupsStorageDetailsGetNotFound %s", 404, payload) } func (o *PcloudVolumegroupsStorageDetailsGetNotFound) GetPayload() *models.Error { @@ -455,11 +466,13 @@ func (o *PcloudVolumegroupsStorageDetailsGetTooManyRequests) Code() int { } func (o *PcloudVolumegroupsStorageDetailsGetTooManyRequests) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/{volume_group_id}/storage-details][%d] pcloudVolumegroupsStorageDetailsGetTooManyRequests %+v", 429, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/{volume_group_id}/storage-details][%d] pcloudVolumegroupsStorageDetailsGetTooManyRequests %s", 429, payload) } func (o *PcloudVolumegroupsStorageDetailsGetTooManyRequests) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/{volume_group_id}/storage-details][%d] pcloudVolumegroupsStorageDetailsGetTooManyRequests %+v", 429, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/{volume_group_id}/storage-details][%d] pcloudVolumegroupsStorageDetailsGetTooManyRequests %s", 429, payload) } func (o *PcloudVolumegroupsStorageDetailsGetTooManyRequests) GetPayload() *models.Error { @@ -523,11 +536,13 @@ func (o *PcloudVolumegroupsStorageDetailsGetInternalServerError) Code() int { } func (o *PcloudVolumegroupsStorageDetailsGetInternalServerError) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/{volume_group_id}/storage-details][%d] pcloudVolumegroupsStorageDetailsGetInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/{volume_group_id}/storage-details][%d] pcloudVolumegroupsStorageDetailsGetInternalServerError %s", 500, payload) } func (o *PcloudVolumegroupsStorageDetailsGetInternalServerError) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/{volume_group_id}/storage-details][%d] pcloudVolumegroupsStorageDetailsGetInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/{volume_group_id}/storage-details][%d] pcloudVolumegroupsStorageDetailsGetInternalServerError %s", 500, payload) } func (o *PcloudVolumegroupsStorageDetailsGetInternalServerError) GetPayload() *models.Error { diff --git a/power/client/p_cloud_volume_onboarding/p_cloud_volume_onboarding_client.go b/power/client/p_cloud_volume_onboarding/p_cloud_volume_onboarding_client.go index 5e84664f..9b7bfb39 100644 --- a/power/client/p_cloud_volume_onboarding/p_cloud_volume_onboarding_client.go +++ b/power/client/p_cloud_volume_onboarding/p_cloud_volume_onboarding_client.go @@ -9,6 +9,7 @@ import ( "fmt" "github.com/go-openapi/runtime" + httptransport "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" ) @@ -17,6 +18,31 @@ func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientServi return &Client{transport: transport, formats: formats} } +// New creates a new p cloud volume onboarding API client with basic auth credentials. +// It takes the following parameters: +// - host: http host (github.com). +// - basePath: any base path for the API client ("/v1", "/v3"). +// - scheme: http scheme ("http", "https"). +// - user: user for basic authentication header. +// - password: password for basic authentication header. +func NewClientWithBasicAuth(host, basePath, scheme, user, password string) ClientService { + transport := httptransport.New(host, basePath, []string{scheme}) + transport.DefaultAuthentication = httptransport.BasicAuth(user, password) + return &Client{transport: transport, formats: strfmt.Default} +} + +// New creates a new p cloud volume onboarding API client with a bearer token for authentication. +// It takes the following parameters: +// - host: http host (github.com). +// - basePath: any base path for the API client ("/v1", "/v3"). +// - scheme: http scheme ("http", "https"). +// - bearerToken: bearer token for Bearer authentication header. +func NewClientWithBearerToken(host, basePath, scheme, bearerToken string) ClientService { + transport := httptransport.New(host, basePath, []string{scheme}) + transport.DefaultAuthentication = httptransport.BearerToken(bearerToken) + return &Client{transport: transport, formats: strfmt.Default} +} + /* Client for p cloud volume onboarding API */ @@ -25,7 +51,7 @@ type Client struct { formats strfmt.Registry } -// ClientOption is the option for Client methods +// ClientOption may be used to customize the behavior of Client methods. type ClientOption func(*runtime.ClientOperation) // ClientService is the interface for Client methods diff --git a/power/client/p_cloud_volume_onboarding/pcloud_volume_onboarding_get_responses.go b/power/client/p_cloud_volume_onboarding/pcloud_volume_onboarding_get_responses.go index 5e485da4..7f28d3c8 100644 --- a/power/client/p_cloud_volume_onboarding/pcloud_volume_onboarding_get_responses.go +++ b/power/client/p_cloud_volume_onboarding/pcloud_volume_onboarding_get_responses.go @@ -6,6 +6,7 @@ package p_cloud_volume_onboarding // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -109,11 +110,13 @@ func (o *PcloudVolumeOnboardingGetOK) Code() int { } func (o *PcloudVolumeOnboardingGetOK) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/onboarding/{volume_onboarding_id}][%d] pcloudVolumeOnboardingGetOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/onboarding/{volume_onboarding_id}][%d] pcloudVolumeOnboardingGetOK %s", 200, payload) } func (o *PcloudVolumeOnboardingGetOK) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/onboarding/{volume_onboarding_id}][%d] pcloudVolumeOnboardingGetOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/onboarding/{volume_onboarding_id}][%d] pcloudVolumeOnboardingGetOK %s", 200, payload) } func (o *PcloudVolumeOnboardingGetOK) GetPayload() *models.VolumeOnboarding { @@ -177,11 +180,13 @@ func (o *PcloudVolumeOnboardingGetBadRequest) Code() int { } func (o *PcloudVolumeOnboardingGetBadRequest) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/onboarding/{volume_onboarding_id}][%d] pcloudVolumeOnboardingGetBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/onboarding/{volume_onboarding_id}][%d] pcloudVolumeOnboardingGetBadRequest %s", 400, payload) } func (o *PcloudVolumeOnboardingGetBadRequest) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/onboarding/{volume_onboarding_id}][%d] pcloudVolumeOnboardingGetBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/onboarding/{volume_onboarding_id}][%d] pcloudVolumeOnboardingGetBadRequest %s", 400, payload) } func (o *PcloudVolumeOnboardingGetBadRequest) GetPayload() *models.Error { @@ -245,11 +250,13 @@ func (o *PcloudVolumeOnboardingGetUnauthorized) Code() int { } func (o *PcloudVolumeOnboardingGetUnauthorized) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/onboarding/{volume_onboarding_id}][%d] pcloudVolumeOnboardingGetUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/onboarding/{volume_onboarding_id}][%d] pcloudVolumeOnboardingGetUnauthorized %s", 401, payload) } func (o *PcloudVolumeOnboardingGetUnauthorized) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/onboarding/{volume_onboarding_id}][%d] pcloudVolumeOnboardingGetUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/onboarding/{volume_onboarding_id}][%d] pcloudVolumeOnboardingGetUnauthorized %s", 401, payload) } func (o *PcloudVolumeOnboardingGetUnauthorized) GetPayload() *models.Error { @@ -313,11 +320,13 @@ func (o *PcloudVolumeOnboardingGetForbidden) Code() int { } func (o *PcloudVolumeOnboardingGetForbidden) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/onboarding/{volume_onboarding_id}][%d] pcloudVolumeOnboardingGetForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/onboarding/{volume_onboarding_id}][%d] pcloudVolumeOnboardingGetForbidden %s", 403, payload) } func (o *PcloudVolumeOnboardingGetForbidden) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/onboarding/{volume_onboarding_id}][%d] pcloudVolumeOnboardingGetForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/onboarding/{volume_onboarding_id}][%d] pcloudVolumeOnboardingGetForbidden %s", 403, payload) } func (o *PcloudVolumeOnboardingGetForbidden) GetPayload() *models.Error { @@ -381,11 +390,13 @@ func (o *PcloudVolumeOnboardingGetNotFound) Code() int { } func (o *PcloudVolumeOnboardingGetNotFound) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/onboarding/{volume_onboarding_id}][%d] pcloudVolumeOnboardingGetNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/onboarding/{volume_onboarding_id}][%d] pcloudVolumeOnboardingGetNotFound %s", 404, payload) } func (o *PcloudVolumeOnboardingGetNotFound) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/onboarding/{volume_onboarding_id}][%d] pcloudVolumeOnboardingGetNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/onboarding/{volume_onboarding_id}][%d] pcloudVolumeOnboardingGetNotFound %s", 404, payload) } func (o *PcloudVolumeOnboardingGetNotFound) GetPayload() *models.Error { @@ -449,11 +460,13 @@ func (o *PcloudVolumeOnboardingGetInternalServerError) Code() int { } func (o *PcloudVolumeOnboardingGetInternalServerError) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/onboarding/{volume_onboarding_id}][%d] pcloudVolumeOnboardingGetInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/onboarding/{volume_onboarding_id}][%d] pcloudVolumeOnboardingGetInternalServerError %s", 500, payload) } func (o *PcloudVolumeOnboardingGetInternalServerError) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/onboarding/{volume_onboarding_id}][%d] pcloudVolumeOnboardingGetInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/onboarding/{volume_onboarding_id}][%d] pcloudVolumeOnboardingGetInternalServerError %s", 500, payload) } func (o *PcloudVolumeOnboardingGetInternalServerError) GetPayload() *models.Error { diff --git a/power/client/p_cloud_volume_onboarding/pcloud_volume_onboarding_getall_responses.go b/power/client/p_cloud_volume_onboarding/pcloud_volume_onboarding_getall_responses.go index 1108621d..59968522 100644 --- a/power/client/p_cloud_volume_onboarding/pcloud_volume_onboarding_getall_responses.go +++ b/power/client/p_cloud_volume_onboarding/pcloud_volume_onboarding_getall_responses.go @@ -6,6 +6,7 @@ package p_cloud_volume_onboarding // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -109,11 +110,13 @@ func (o *PcloudVolumeOnboardingGetallOK) Code() int { } func (o *PcloudVolumeOnboardingGetallOK) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/onboarding][%d] pcloudVolumeOnboardingGetallOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/onboarding][%d] pcloudVolumeOnboardingGetallOK %s", 200, payload) } func (o *PcloudVolumeOnboardingGetallOK) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/onboarding][%d] pcloudVolumeOnboardingGetallOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/onboarding][%d] pcloudVolumeOnboardingGetallOK %s", 200, payload) } func (o *PcloudVolumeOnboardingGetallOK) GetPayload() *models.VolumeOnboardings { @@ -177,11 +180,13 @@ func (o *PcloudVolumeOnboardingGetallBadRequest) Code() int { } func (o *PcloudVolumeOnboardingGetallBadRequest) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/onboarding][%d] pcloudVolumeOnboardingGetallBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/onboarding][%d] pcloudVolumeOnboardingGetallBadRequest %s", 400, payload) } func (o *PcloudVolumeOnboardingGetallBadRequest) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/onboarding][%d] pcloudVolumeOnboardingGetallBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/onboarding][%d] pcloudVolumeOnboardingGetallBadRequest %s", 400, payload) } func (o *PcloudVolumeOnboardingGetallBadRequest) GetPayload() *models.Error { @@ -245,11 +250,13 @@ func (o *PcloudVolumeOnboardingGetallUnauthorized) Code() int { } func (o *PcloudVolumeOnboardingGetallUnauthorized) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/onboarding][%d] pcloudVolumeOnboardingGetallUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/onboarding][%d] pcloudVolumeOnboardingGetallUnauthorized %s", 401, payload) } func (o *PcloudVolumeOnboardingGetallUnauthorized) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/onboarding][%d] pcloudVolumeOnboardingGetallUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/onboarding][%d] pcloudVolumeOnboardingGetallUnauthorized %s", 401, payload) } func (o *PcloudVolumeOnboardingGetallUnauthorized) GetPayload() *models.Error { @@ -313,11 +320,13 @@ func (o *PcloudVolumeOnboardingGetallForbidden) Code() int { } func (o *PcloudVolumeOnboardingGetallForbidden) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/onboarding][%d] pcloudVolumeOnboardingGetallForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/onboarding][%d] pcloudVolumeOnboardingGetallForbidden %s", 403, payload) } func (o *PcloudVolumeOnboardingGetallForbidden) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/onboarding][%d] pcloudVolumeOnboardingGetallForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/onboarding][%d] pcloudVolumeOnboardingGetallForbidden %s", 403, payload) } func (o *PcloudVolumeOnboardingGetallForbidden) GetPayload() *models.Error { @@ -381,11 +390,13 @@ func (o *PcloudVolumeOnboardingGetallNotFound) Code() int { } func (o *PcloudVolumeOnboardingGetallNotFound) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/onboarding][%d] pcloudVolumeOnboardingGetallNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/onboarding][%d] pcloudVolumeOnboardingGetallNotFound %s", 404, payload) } func (o *PcloudVolumeOnboardingGetallNotFound) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/onboarding][%d] pcloudVolumeOnboardingGetallNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/onboarding][%d] pcloudVolumeOnboardingGetallNotFound %s", 404, payload) } func (o *PcloudVolumeOnboardingGetallNotFound) GetPayload() *models.Error { @@ -449,11 +460,13 @@ func (o *PcloudVolumeOnboardingGetallInternalServerError) Code() int { } func (o *PcloudVolumeOnboardingGetallInternalServerError) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/onboarding][%d] pcloudVolumeOnboardingGetallInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/onboarding][%d] pcloudVolumeOnboardingGetallInternalServerError %s", 500, payload) } func (o *PcloudVolumeOnboardingGetallInternalServerError) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/onboarding][%d] pcloudVolumeOnboardingGetallInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/onboarding][%d] pcloudVolumeOnboardingGetallInternalServerError %s", 500, payload) } func (o *PcloudVolumeOnboardingGetallInternalServerError) GetPayload() *models.Error { diff --git a/power/client/p_cloud_volume_onboarding/pcloud_volume_onboarding_post_responses.go b/power/client/p_cloud_volume_onboarding/pcloud_volume_onboarding_post_responses.go index 3e728d57..801df4b4 100644 --- a/power/client/p_cloud_volume_onboarding/pcloud_volume_onboarding_post_responses.go +++ b/power/client/p_cloud_volume_onboarding/pcloud_volume_onboarding_post_responses.go @@ -6,6 +6,7 @@ package p_cloud_volume_onboarding // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -115,11 +116,13 @@ func (o *PcloudVolumeOnboardingPostAccepted) Code() int { } func (o *PcloudVolumeOnboardingPostAccepted) Error() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/onboarding][%d] pcloudVolumeOnboardingPostAccepted %+v", 202, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/onboarding][%d] pcloudVolumeOnboardingPostAccepted %s", 202, payload) } func (o *PcloudVolumeOnboardingPostAccepted) String() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/onboarding][%d] pcloudVolumeOnboardingPostAccepted %+v", 202, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/onboarding][%d] pcloudVolumeOnboardingPostAccepted %s", 202, payload) } func (o *PcloudVolumeOnboardingPostAccepted) GetPayload() *models.VolumeOnboardingCreateResponse { @@ -183,11 +186,13 @@ func (o *PcloudVolumeOnboardingPostBadRequest) Code() int { } func (o *PcloudVolumeOnboardingPostBadRequest) Error() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/onboarding][%d] pcloudVolumeOnboardingPostBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/onboarding][%d] pcloudVolumeOnboardingPostBadRequest %s", 400, payload) } func (o *PcloudVolumeOnboardingPostBadRequest) String() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/onboarding][%d] pcloudVolumeOnboardingPostBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/onboarding][%d] pcloudVolumeOnboardingPostBadRequest %s", 400, payload) } func (o *PcloudVolumeOnboardingPostBadRequest) GetPayload() *models.Error { @@ -251,11 +256,13 @@ func (o *PcloudVolumeOnboardingPostUnauthorized) Code() int { } func (o *PcloudVolumeOnboardingPostUnauthorized) Error() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/onboarding][%d] pcloudVolumeOnboardingPostUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/onboarding][%d] pcloudVolumeOnboardingPostUnauthorized %s", 401, payload) } func (o *PcloudVolumeOnboardingPostUnauthorized) String() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/onboarding][%d] pcloudVolumeOnboardingPostUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/onboarding][%d] pcloudVolumeOnboardingPostUnauthorized %s", 401, payload) } func (o *PcloudVolumeOnboardingPostUnauthorized) GetPayload() *models.Error { @@ -319,11 +326,13 @@ func (o *PcloudVolumeOnboardingPostForbidden) Code() int { } func (o *PcloudVolumeOnboardingPostForbidden) Error() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/onboarding][%d] pcloudVolumeOnboardingPostForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/onboarding][%d] pcloudVolumeOnboardingPostForbidden %s", 403, payload) } func (o *PcloudVolumeOnboardingPostForbidden) String() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/onboarding][%d] pcloudVolumeOnboardingPostForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/onboarding][%d] pcloudVolumeOnboardingPostForbidden %s", 403, payload) } func (o *PcloudVolumeOnboardingPostForbidden) GetPayload() *models.Error { @@ -387,11 +396,13 @@ func (o *PcloudVolumeOnboardingPostNotFound) Code() int { } func (o *PcloudVolumeOnboardingPostNotFound) Error() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/onboarding][%d] pcloudVolumeOnboardingPostNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/onboarding][%d] pcloudVolumeOnboardingPostNotFound %s", 404, payload) } func (o *PcloudVolumeOnboardingPostNotFound) String() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/onboarding][%d] pcloudVolumeOnboardingPostNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/onboarding][%d] pcloudVolumeOnboardingPostNotFound %s", 404, payload) } func (o *PcloudVolumeOnboardingPostNotFound) GetPayload() *models.Error { @@ -455,11 +466,13 @@ func (o *PcloudVolumeOnboardingPostConflict) Code() int { } func (o *PcloudVolumeOnboardingPostConflict) Error() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/onboarding][%d] pcloudVolumeOnboardingPostConflict %+v", 409, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/onboarding][%d] pcloudVolumeOnboardingPostConflict %s", 409, payload) } func (o *PcloudVolumeOnboardingPostConflict) String() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/onboarding][%d] pcloudVolumeOnboardingPostConflict %+v", 409, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/onboarding][%d] pcloudVolumeOnboardingPostConflict %s", 409, payload) } func (o *PcloudVolumeOnboardingPostConflict) GetPayload() *models.Error { @@ -523,11 +536,13 @@ func (o *PcloudVolumeOnboardingPostInternalServerError) Code() int { } func (o *PcloudVolumeOnboardingPostInternalServerError) Error() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/onboarding][%d] pcloudVolumeOnboardingPostInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/onboarding][%d] pcloudVolumeOnboardingPostInternalServerError %s", 500, payload) } func (o *PcloudVolumeOnboardingPostInternalServerError) String() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/onboarding][%d] pcloudVolumeOnboardingPostInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/onboarding][%d] pcloudVolumeOnboardingPostInternalServerError %s", 500, payload) } func (o *PcloudVolumeOnboardingPostInternalServerError) GetPayload() *models.Error { diff --git a/power/client/p_cloud_volumes/p_cloud_volumes_client.go b/power/client/p_cloud_volumes/p_cloud_volumes_client.go index c662828e..e2bc42c7 100644 --- a/power/client/p_cloud_volumes/p_cloud_volumes_client.go +++ b/power/client/p_cloud_volumes/p_cloud_volumes_client.go @@ -9,6 +9,7 @@ import ( "fmt" "github.com/go-openapi/runtime" + httptransport "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" ) @@ -17,6 +18,31 @@ func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientServi return &Client{transport: transport, formats: formats} } +// New creates a new p cloud volumes API client with basic auth credentials. +// It takes the following parameters: +// - host: http host (github.com). +// - basePath: any base path for the API client ("/v1", "/v3"). +// - scheme: http scheme ("http", "https"). +// - user: user for basic authentication header. +// - password: password for basic authentication header. +func NewClientWithBasicAuth(host, basePath, scheme, user, password string) ClientService { + transport := httptransport.New(host, basePath, []string{scheme}) + transport.DefaultAuthentication = httptransport.BasicAuth(user, password) + return &Client{transport: transport, formats: strfmt.Default} +} + +// New creates a new p cloud volumes API client with a bearer token for authentication. +// It takes the following parameters: +// - host: http host (github.com). +// - basePath: any base path for the API client ("/v1", "/v3"). +// - scheme: http scheme ("http", "https"). +// - bearerToken: bearer token for Bearer authentication header. +func NewClientWithBearerToken(host, basePath, scheme, bearerToken string) ClientService { + transport := httptransport.New(host, basePath, []string{scheme}) + transport.DefaultAuthentication = httptransport.BearerToken(bearerToken) + return &Client{transport: transport, formats: strfmt.Default} +} + /* Client for p cloud volumes API */ @@ -25,7 +51,7 @@ type Client struct { formats strfmt.Registry } -// ClientOption is the option for Client methods +// ClientOption may be used to customize the behavior of Client methods. type ClientOption func(*runtime.ClientOperation) // ClientService is the interface for Client methods @@ -519,7 +545,11 @@ func (a *Client) PcloudPvminstancesVolumesGetall(params *PcloudPvminstancesVolum } /* -PcloudPvminstancesVolumesPost attaches a volume to a p VM instance + PcloudPvminstancesVolumesPost attaches a volume to a p VM instance + + Attach a volume to a PVMInstance. + +>**Note**: Recommended for attaching data volumes. In the case of VMRM, it is recommended to use the 'Attach all volumes to a PVM instance' API for attaching the first boot volume. */ func (a *Client) PcloudPvminstancesVolumesPost(params *PcloudPvminstancesVolumesPostParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudPvminstancesVolumesPostOK, error) { // TODO: Validate the params before sending @@ -597,7 +627,11 @@ func (a *Client) PcloudPvminstancesVolumesPut(params *PcloudPvminstancesVolumesP } /* -PcloudPvminstancesVolumesSetbootPut sets the p VM instance volume as the boot volume + PcloudPvminstancesVolumesSetbootPut sets the p VM instance volume as the boot volume + + Set the PVMInstance volume as the boot volume. + +>**Note**: If a non-bootable volume is provided, it will be converted to a bootable volume and then attached. */ func (a *Client) PcloudPvminstancesVolumesSetbootPut(params *PcloudPvminstancesVolumesSetbootPutParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudPvminstancesVolumesSetbootPutOK, error) { // TODO: Validate the params before sending @@ -675,7 +709,11 @@ func (a *Client) PcloudV2PvminstancesVolumesDelete(params *PcloudV2PvminstancesV } /* -PcloudV2PvminstancesVolumesPost attaches all volumes to a p VM instance + PcloudV2PvminstancesVolumesPost attaches all volumes to a p VM instance + + Attach all volumes to a PVMInstance. + +>**Note**: In the case of VMRM, if a single volume ID is provided in the 'volumeIDs' field, that volume will be converted to a bootable volume and then attached. */ func (a *Client) PcloudV2PvminstancesVolumesPost(params *PcloudV2PvminstancesVolumesPostParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudV2PvminstancesVolumesPostAccepted, error) { // TODO: Validate the params before sending diff --git a/power/client/p_cloud_volumes/pcloud_cloudinstances_volumes_action_post_responses.go b/power/client/p_cloud_volumes/pcloud_cloudinstances_volumes_action_post_responses.go index f59bc76a..6be188ce 100644 --- a/power/client/p_cloud_volumes/pcloud_cloudinstances_volumes_action_post_responses.go +++ b/power/client/p_cloud_volumes/pcloud_cloudinstances_volumes_action_post_responses.go @@ -6,6 +6,7 @@ package p_cloud_volumes // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -115,11 +116,13 @@ func (o *PcloudCloudinstancesVolumesActionPostAccepted) Code() int { } func (o *PcloudCloudinstancesVolumesActionPostAccepted) Error() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/{volume_id}/action][%d] pcloudCloudinstancesVolumesActionPostAccepted %+v", 202, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/{volume_id}/action][%d] pcloudCloudinstancesVolumesActionPostAccepted %s", 202, payload) } func (o *PcloudCloudinstancesVolumesActionPostAccepted) String() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/{volume_id}/action][%d] pcloudCloudinstancesVolumesActionPostAccepted %+v", 202, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/{volume_id}/action][%d] pcloudCloudinstancesVolumesActionPostAccepted %s", 202, payload) } func (o *PcloudCloudinstancesVolumesActionPostAccepted) GetPayload() models.Object { @@ -181,11 +184,13 @@ func (o *PcloudCloudinstancesVolumesActionPostBadRequest) Code() int { } func (o *PcloudCloudinstancesVolumesActionPostBadRequest) Error() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/{volume_id}/action][%d] pcloudCloudinstancesVolumesActionPostBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/{volume_id}/action][%d] pcloudCloudinstancesVolumesActionPostBadRequest %s", 400, payload) } func (o *PcloudCloudinstancesVolumesActionPostBadRequest) String() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/{volume_id}/action][%d] pcloudCloudinstancesVolumesActionPostBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/{volume_id}/action][%d] pcloudCloudinstancesVolumesActionPostBadRequest %s", 400, payload) } func (o *PcloudCloudinstancesVolumesActionPostBadRequest) GetPayload() *models.Error { @@ -249,11 +254,13 @@ func (o *PcloudCloudinstancesVolumesActionPostUnauthorized) Code() int { } func (o *PcloudCloudinstancesVolumesActionPostUnauthorized) Error() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/{volume_id}/action][%d] pcloudCloudinstancesVolumesActionPostUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/{volume_id}/action][%d] pcloudCloudinstancesVolumesActionPostUnauthorized %s", 401, payload) } func (o *PcloudCloudinstancesVolumesActionPostUnauthorized) String() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/{volume_id}/action][%d] pcloudCloudinstancesVolumesActionPostUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/{volume_id}/action][%d] pcloudCloudinstancesVolumesActionPostUnauthorized %s", 401, payload) } func (o *PcloudCloudinstancesVolumesActionPostUnauthorized) GetPayload() *models.Error { @@ -317,11 +324,13 @@ func (o *PcloudCloudinstancesVolumesActionPostForbidden) Code() int { } func (o *PcloudCloudinstancesVolumesActionPostForbidden) Error() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/{volume_id}/action][%d] pcloudCloudinstancesVolumesActionPostForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/{volume_id}/action][%d] pcloudCloudinstancesVolumesActionPostForbidden %s", 403, payload) } func (o *PcloudCloudinstancesVolumesActionPostForbidden) String() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/{volume_id}/action][%d] pcloudCloudinstancesVolumesActionPostForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/{volume_id}/action][%d] pcloudCloudinstancesVolumesActionPostForbidden %s", 403, payload) } func (o *PcloudCloudinstancesVolumesActionPostForbidden) GetPayload() *models.Error { @@ -385,11 +394,13 @@ func (o *PcloudCloudinstancesVolumesActionPostNotFound) Code() int { } func (o *PcloudCloudinstancesVolumesActionPostNotFound) Error() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/{volume_id}/action][%d] pcloudCloudinstancesVolumesActionPostNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/{volume_id}/action][%d] pcloudCloudinstancesVolumesActionPostNotFound %s", 404, payload) } func (o *PcloudCloudinstancesVolumesActionPostNotFound) String() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/{volume_id}/action][%d] pcloudCloudinstancesVolumesActionPostNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/{volume_id}/action][%d] pcloudCloudinstancesVolumesActionPostNotFound %s", 404, payload) } func (o *PcloudCloudinstancesVolumesActionPostNotFound) GetPayload() *models.Error { @@ -453,11 +464,13 @@ func (o *PcloudCloudinstancesVolumesActionPostConflict) Code() int { } func (o *PcloudCloudinstancesVolumesActionPostConflict) Error() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/{volume_id}/action][%d] pcloudCloudinstancesVolumesActionPostConflict %+v", 409, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/{volume_id}/action][%d] pcloudCloudinstancesVolumesActionPostConflict %s", 409, payload) } func (o *PcloudCloudinstancesVolumesActionPostConflict) String() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/{volume_id}/action][%d] pcloudCloudinstancesVolumesActionPostConflict %+v", 409, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/{volume_id}/action][%d] pcloudCloudinstancesVolumesActionPostConflict %s", 409, payload) } func (o *PcloudCloudinstancesVolumesActionPostConflict) GetPayload() *models.Error { @@ -521,11 +534,13 @@ func (o *PcloudCloudinstancesVolumesActionPostInternalServerError) Code() int { } func (o *PcloudCloudinstancesVolumesActionPostInternalServerError) Error() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/{volume_id}/action][%d] pcloudCloudinstancesVolumesActionPostInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/{volume_id}/action][%d] pcloudCloudinstancesVolumesActionPostInternalServerError %s", 500, payload) } func (o *PcloudCloudinstancesVolumesActionPostInternalServerError) String() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/{volume_id}/action][%d] pcloudCloudinstancesVolumesActionPostInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/{volume_id}/action][%d] pcloudCloudinstancesVolumesActionPostInternalServerError %s", 500, payload) } func (o *PcloudCloudinstancesVolumesActionPostInternalServerError) GetPayload() *models.Error { diff --git a/power/client/p_cloud_volumes/pcloud_cloudinstances_volumes_delete_responses.go b/power/client/p_cloud_volumes/pcloud_cloudinstances_volumes_delete_responses.go index 5ff94957..55000c60 100644 --- a/power/client/p_cloud_volumes/pcloud_cloudinstances_volumes_delete_responses.go +++ b/power/client/p_cloud_volumes/pcloud_cloudinstances_volumes_delete_responses.go @@ -6,6 +6,7 @@ package p_cloud_volumes // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -115,11 +116,13 @@ func (o *PcloudCloudinstancesVolumesDeleteOK) Code() int { } func (o *PcloudCloudinstancesVolumesDeleteOK) Error() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/{volume_id}][%d] pcloudCloudinstancesVolumesDeleteOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/{volume_id}][%d] pcloudCloudinstancesVolumesDeleteOK %s", 200, payload) } func (o *PcloudCloudinstancesVolumesDeleteOK) String() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/{volume_id}][%d] pcloudCloudinstancesVolumesDeleteOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/{volume_id}][%d] pcloudCloudinstancesVolumesDeleteOK %s", 200, payload) } func (o *PcloudCloudinstancesVolumesDeleteOK) GetPayload() models.Object { @@ -181,11 +184,13 @@ func (o *PcloudCloudinstancesVolumesDeleteBadRequest) Code() int { } func (o *PcloudCloudinstancesVolumesDeleteBadRequest) Error() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/{volume_id}][%d] pcloudCloudinstancesVolumesDeleteBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/{volume_id}][%d] pcloudCloudinstancesVolumesDeleteBadRequest %s", 400, payload) } func (o *PcloudCloudinstancesVolumesDeleteBadRequest) String() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/{volume_id}][%d] pcloudCloudinstancesVolumesDeleteBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/{volume_id}][%d] pcloudCloudinstancesVolumesDeleteBadRequest %s", 400, payload) } func (o *PcloudCloudinstancesVolumesDeleteBadRequest) GetPayload() *models.Error { @@ -249,11 +254,13 @@ func (o *PcloudCloudinstancesVolumesDeleteUnauthorized) Code() int { } func (o *PcloudCloudinstancesVolumesDeleteUnauthorized) Error() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/{volume_id}][%d] pcloudCloudinstancesVolumesDeleteUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/{volume_id}][%d] pcloudCloudinstancesVolumesDeleteUnauthorized %s", 401, payload) } func (o *PcloudCloudinstancesVolumesDeleteUnauthorized) String() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/{volume_id}][%d] pcloudCloudinstancesVolumesDeleteUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/{volume_id}][%d] pcloudCloudinstancesVolumesDeleteUnauthorized %s", 401, payload) } func (o *PcloudCloudinstancesVolumesDeleteUnauthorized) GetPayload() *models.Error { @@ -317,11 +324,13 @@ func (o *PcloudCloudinstancesVolumesDeleteForbidden) Code() int { } func (o *PcloudCloudinstancesVolumesDeleteForbidden) Error() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/{volume_id}][%d] pcloudCloudinstancesVolumesDeleteForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/{volume_id}][%d] pcloudCloudinstancesVolumesDeleteForbidden %s", 403, payload) } func (o *PcloudCloudinstancesVolumesDeleteForbidden) String() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/{volume_id}][%d] pcloudCloudinstancesVolumesDeleteForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/{volume_id}][%d] pcloudCloudinstancesVolumesDeleteForbidden %s", 403, payload) } func (o *PcloudCloudinstancesVolumesDeleteForbidden) GetPayload() *models.Error { @@ -385,11 +394,13 @@ func (o *PcloudCloudinstancesVolumesDeleteNotFound) Code() int { } func (o *PcloudCloudinstancesVolumesDeleteNotFound) Error() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/{volume_id}][%d] pcloudCloudinstancesVolumesDeleteNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/{volume_id}][%d] pcloudCloudinstancesVolumesDeleteNotFound %s", 404, payload) } func (o *PcloudCloudinstancesVolumesDeleteNotFound) String() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/{volume_id}][%d] pcloudCloudinstancesVolumesDeleteNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/{volume_id}][%d] pcloudCloudinstancesVolumesDeleteNotFound %s", 404, payload) } func (o *PcloudCloudinstancesVolumesDeleteNotFound) GetPayload() *models.Error { @@ -453,11 +464,13 @@ func (o *PcloudCloudinstancesVolumesDeleteGone) Code() int { } func (o *PcloudCloudinstancesVolumesDeleteGone) Error() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/{volume_id}][%d] pcloudCloudinstancesVolumesDeleteGone %+v", 410, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/{volume_id}][%d] pcloudCloudinstancesVolumesDeleteGone %s", 410, payload) } func (o *PcloudCloudinstancesVolumesDeleteGone) String() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/{volume_id}][%d] pcloudCloudinstancesVolumesDeleteGone %+v", 410, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/{volume_id}][%d] pcloudCloudinstancesVolumesDeleteGone %s", 410, payload) } func (o *PcloudCloudinstancesVolumesDeleteGone) GetPayload() *models.Error { @@ -521,11 +534,13 @@ func (o *PcloudCloudinstancesVolumesDeleteInternalServerError) Code() int { } func (o *PcloudCloudinstancesVolumesDeleteInternalServerError) Error() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/{volume_id}][%d] pcloudCloudinstancesVolumesDeleteInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/{volume_id}][%d] pcloudCloudinstancesVolumesDeleteInternalServerError %s", 500, payload) } func (o *PcloudCloudinstancesVolumesDeleteInternalServerError) String() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/{volume_id}][%d] pcloudCloudinstancesVolumesDeleteInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/{volume_id}][%d] pcloudCloudinstancesVolumesDeleteInternalServerError %s", 500, payload) } func (o *PcloudCloudinstancesVolumesDeleteInternalServerError) GetPayload() *models.Error { diff --git a/power/client/p_cloud_volumes/pcloud_cloudinstances_volumes_flash_copy_mappings_get_responses.go b/power/client/p_cloud_volumes/pcloud_cloudinstances_volumes_flash_copy_mappings_get_responses.go index 2df0879b..150b2a2c 100644 --- a/power/client/p_cloud_volumes/pcloud_cloudinstances_volumes_flash_copy_mappings_get_responses.go +++ b/power/client/p_cloud_volumes/pcloud_cloudinstances_volumes_flash_copy_mappings_get_responses.go @@ -6,6 +6,7 @@ package p_cloud_volumes // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -115,11 +116,13 @@ func (o *PcloudCloudinstancesVolumesFlashCopyMappingsGetOK) Code() int { } func (o *PcloudCloudinstancesVolumesFlashCopyMappingsGetOK) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/{volume_id}/flash-copy-mappings][%d] pcloudCloudinstancesVolumesFlashCopyMappingsGetOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/{volume_id}/flash-copy-mappings][%d] pcloudCloudinstancesVolumesFlashCopyMappingsGetOK %s", 200, payload) } func (o *PcloudCloudinstancesVolumesFlashCopyMappingsGetOK) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/{volume_id}/flash-copy-mappings][%d] pcloudCloudinstancesVolumesFlashCopyMappingsGetOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/{volume_id}/flash-copy-mappings][%d] pcloudCloudinstancesVolumesFlashCopyMappingsGetOK %s", 200, payload) } func (o *PcloudCloudinstancesVolumesFlashCopyMappingsGetOK) GetPayload() models.FlashCopyMappings { @@ -181,11 +184,13 @@ func (o *PcloudCloudinstancesVolumesFlashCopyMappingsGetBadRequest) Code() int { } func (o *PcloudCloudinstancesVolumesFlashCopyMappingsGetBadRequest) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/{volume_id}/flash-copy-mappings][%d] pcloudCloudinstancesVolumesFlashCopyMappingsGetBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/{volume_id}/flash-copy-mappings][%d] pcloudCloudinstancesVolumesFlashCopyMappingsGetBadRequest %s", 400, payload) } func (o *PcloudCloudinstancesVolumesFlashCopyMappingsGetBadRequest) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/{volume_id}/flash-copy-mappings][%d] pcloudCloudinstancesVolumesFlashCopyMappingsGetBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/{volume_id}/flash-copy-mappings][%d] pcloudCloudinstancesVolumesFlashCopyMappingsGetBadRequest %s", 400, payload) } func (o *PcloudCloudinstancesVolumesFlashCopyMappingsGetBadRequest) GetPayload() *models.Error { @@ -249,11 +254,13 @@ func (o *PcloudCloudinstancesVolumesFlashCopyMappingsGetUnauthorized) Code() int } func (o *PcloudCloudinstancesVolumesFlashCopyMappingsGetUnauthorized) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/{volume_id}/flash-copy-mappings][%d] pcloudCloudinstancesVolumesFlashCopyMappingsGetUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/{volume_id}/flash-copy-mappings][%d] pcloudCloudinstancesVolumesFlashCopyMappingsGetUnauthorized %s", 401, payload) } func (o *PcloudCloudinstancesVolumesFlashCopyMappingsGetUnauthorized) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/{volume_id}/flash-copy-mappings][%d] pcloudCloudinstancesVolumesFlashCopyMappingsGetUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/{volume_id}/flash-copy-mappings][%d] pcloudCloudinstancesVolumesFlashCopyMappingsGetUnauthorized %s", 401, payload) } func (o *PcloudCloudinstancesVolumesFlashCopyMappingsGetUnauthorized) GetPayload() *models.Error { @@ -317,11 +324,13 @@ func (o *PcloudCloudinstancesVolumesFlashCopyMappingsGetForbidden) Code() int { } func (o *PcloudCloudinstancesVolumesFlashCopyMappingsGetForbidden) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/{volume_id}/flash-copy-mappings][%d] pcloudCloudinstancesVolumesFlashCopyMappingsGetForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/{volume_id}/flash-copy-mappings][%d] pcloudCloudinstancesVolumesFlashCopyMappingsGetForbidden %s", 403, payload) } func (o *PcloudCloudinstancesVolumesFlashCopyMappingsGetForbidden) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/{volume_id}/flash-copy-mappings][%d] pcloudCloudinstancesVolumesFlashCopyMappingsGetForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/{volume_id}/flash-copy-mappings][%d] pcloudCloudinstancesVolumesFlashCopyMappingsGetForbidden %s", 403, payload) } func (o *PcloudCloudinstancesVolumesFlashCopyMappingsGetForbidden) GetPayload() *models.Error { @@ -385,11 +394,13 @@ func (o *PcloudCloudinstancesVolumesFlashCopyMappingsGetNotFound) Code() int { } func (o *PcloudCloudinstancesVolumesFlashCopyMappingsGetNotFound) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/{volume_id}/flash-copy-mappings][%d] pcloudCloudinstancesVolumesFlashCopyMappingsGetNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/{volume_id}/flash-copy-mappings][%d] pcloudCloudinstancesVolumesFlashCopyMappingsGetNotFound %s", 404, payload) } func (o *PcloudCloudinstancesVolumesFlashCopyMappingsGetNotFound) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/{volume_id}/flash-copy-mappings][%d] pcloudCloudinstancesVolumesFlashCopyMappingsGetNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/{volume_id}/flash-copy-mappings][%d] pcloudCloudinstancesVolumesFlashCopyMappingsGetNotFound %s", 404, payload) } func (o *PcloudCloudinstancesVolumesFlashCopyMappingsGetNotFound) GetPayload() *models.Error { @@ -453,11 +464,13 @@ func (o *PcloudCloudinstancesVolumesFlashCopyMappingsGetTooManyRequests) Code() } func (o *PcloudCloudinstancesVolumesFlashCopyMappingsGetTooManyRequests) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/{volume_id}/flash-copy-mappings][%d] pcloudCloudinstancesVolumesFlashCopyMappingsGetTooManyRequests %+v", 429, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/{volume_id}/flash-copy-mappings][%d] pcloudCloudinstancesVolumesFlashCopyMappingsGetTooManyRequests %s", 429, payload) } func (o *PcloudCloudinstancesVolumesFlashCopyMappingsGetTooManyRequests) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/{volume_id}/flash-copy-mappings][%d] pcloudCloudinstancesVolumesFlashCopyMappingsGetTooManyRequests %+v", 429, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/{volume_id}/flash-copy-mappings][%d] pcloudCloudinstancesVolumesFlashCopyMappingsGetTooManyRequests %s", 429, payload) } func (o *PcloudCloudinstancesVolumesFlashCopyMappingsGetTooManyRequests) GetPayload() *models.Error { @@ -521,11 +534,13 @@ func (o *PcloudCloudinstancesVolumesFlashCopyMappingsGetInternalServerError) Cod } func (o *PcloudCloudinstancesVolumesFlashCopyMappingsGetInternalServerError) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/{volume_id}/flash-copy-mappings][%d] pcloudCloudinstancesVolumesFlashCopyMappingsGetInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/{volume_id}/flash-copy-mappings][%d] pcloudCloudinstancesVolumesFlashCopyMappingsGetInternalServerError %s", 500, payload) } func (o *PcloudCloudinstancesVolumesFlashCopyMappingsGetInternalServerError) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/{volume_id}/flash-copy-mappings][%d] pcloudCloudinstancesVolumesFlashCopyMappingsGetInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/{volume_id}/flash-copy-mappings][%d] pcloudCloudinstancesVolumesFlashCopyMappingsGetInternalServerError %s", 500, payload) } func (o *PcloudCloudinstancesVolumesFlashCopyMappingsGetInternalServerError) GetPayload() *models.Error { diff --git a/power/client/p_cloud_volumes/pcloud_cloudinstances_volumes_get_responses.go b/power/client/p_cloud_volumes/pcloud_cloudinstances_volumes_get_responses.go index fb9dd473..7bbc8dda 100644 --- a/power/client/p_cloud_volumes/pcloud_cloudinstances_volumes_get_responses.go +++ b/power/client/p_cloud_volumes/pcloud_cloudinstances_volumes_get_responses.go @@ -6,6 +6,7 @@ package p_cloud_volumes // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -109,11 +110,13 @@ func (o *PcloudCloudinstancesVolumesGetOK) Code() int { } func (o *PcloudCloudinstancesVolumesGetOK) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/{volume_id}][%d] pcloudCloudinstancesVolumesGetOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/{volume_id}][%d] pcloudCloudinstancesVolumesGetOK %s", 200, payload) } func (o *PcloudCloudinstancesVolumesGetOK) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/{volume_id}][%d] pcloudCloudinstancesVolumesGetOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/{volume_id}][%d] pcloudCloudinstancesVolumesGetOK %s", 200, payload) } func (o *PcloudCloudinstancesVolumesGetOK) GetPayload() *models.Volume { @@ -177,11 +180,13 @@ func (o *PcloudCloudinstancesVolumesGetBadRequest) Code() int { } func (o *PcloudCloudinstancesVolumesGetBadRequest) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/{volume_id}][%d] pcloudCloudinstancesVolumesGetBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/{volume_id}][%d] pcloudCloudinstancesVolumesGetBadRequest %s", 400, payload) } func (o *PcloudCloudinstancesVolumesGetBadRequest) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/{volume_id}][%d] pcloudCloudinstancesVolumesGetBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/{volume_id}][%d] pcloudCloudinstancesVolumesGetBadRequest %s", 400, payload) } func (o *PcloudCloudinstancesVolumesGetBadRequest) GetPayload() *models.Error { @@ -245,11 +250,13 @@ func (o *PcloudCloudinstancesVolumesGetUnauthorized) Code() int { } func (o *PcloudCloudinstancesVolumesGetUnauthorized) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/{volume_id}][%d] pcloudCloudinstancesVolumesGetUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/{volume_id}][%d] pcloudCloudinstancesVolumesGetUnauthorized %s", 401, payload) } func (o *PcloudCloudinstancesVolumesGetUnauthorized) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/{volume_id}][%d] pcloudCloudinstancesVolumesGetUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/{volume_id}][%d] pcloudCloudinstancesVolumesGetUnauthorized %s", 401, payload) } func (o *PcloudCloudinstancesVolumesGetUnauthorized) GetPayload() *models.Error { @@ -313,11 +320,13 @@ func (o *PcloudCloudinstancesVolumesGetForbidden) Code() int { } func (o *PcloudCloudinstancesVolumesGetForbidden) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/{volume_id}][%d] pcloudCloudinstancesVolumesGetForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/{volume_id}][%d] pcloudCloudinstancesVolumesGetForbidden %s", 403, payload) } func (o *PcloudCloudinstancesVolumesGetForbidden) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/{volume_id}][%d] pcloudCloudinstancesVolumesGetForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/{volume_id}][%d] pcloudCloudinstancesVolumesGetForbidden %s", 403, payload) } func (o *PcloudCloudinstancesVolumesGetForbidden) GetPayload() *models.Error { @@ -381,11 +390,13 @@ func (o *PcloudCloudinstancesVolumesGetNotFound) Code() int { } func (o *PcloudCloudinstancesVolumesGetNotFound) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/{volume_id}][%d] pcloudCloudinstancesVolumesGetNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/{volume_id}][%d] pcloudCloudinstancesVolumesGetNotFound %s", 404, payload) } func (o *PcloudCloudinstancesVolumesGetNotFound) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/{volume_id}][%d] pcloudCloudinstancesVolumesGetNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/{volume_id}][%d] pcloudCloudinstancesVolumesGetNotFound %s", 404, payload) } func (o *PcloudCloudinstancesVolumesGetNotFound) GetPayload() *models.Error { @@ -449,11 +460,13 @@ func (o *PcloudCloudinstancesVolumesGetInternalServerError) Code() int { } func (o *PcloudCloudinstancesVolumesGetInternalServerError) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/{volume_id}][%d] pcloudCloudinstancesVolumesGetInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/{volume_id}][%d] pcloudCloudinstancesVolumesGetInternalServerError %s", 500, payload) } func (o *PcloudCloudinstancesVolumesGetInternalServerError) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/{volume_id}][%d] pcloudCloudinstancesVolumesGetInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/{volume_id}][%d] pcloudCloudinstancesVolumesGetInternalServerError %s", 500, payload) } func (o *PcloudCloudinstancesVolumesGetInternalServerError) GetPayload() *models.Error { diff --git a/power/client/p_cloud_volumes/pcloud_cloudinstances_volumes_getall_responses.go b/power/client/p_cloud_volumes/pcloud_cloudinstances_volumes_getall_responses.go index ed6c3532..82c90d1c 100644 --- a/power/client/p_cloud_volumes/pcloud_cloudinstances_volumes_getall_responses.go +++ b/power/client/p_cloud_volumes/pcloud_cloudinstances_volumes_getall_responses.go @@ -6,6 +6,7 @@ package p_cloud_volumes // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -109,11 +110,13 @@ func (o *PcloudCloudinstancesVolumesGetallOK) Code() int { } func (o *PcloudCloudinstancesVolumesGetallOK) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes][%d] pcloudCloudinstancesVolumesGetallOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes][%d] pcloudCloudinstancesVolumesGetallOK %s", 200, payload) } func (o *PcloudCloudinstancesVolumesGetallOK) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes][%d] pcloudCloudinstancesVolumesGetallOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes][%d] pcloudCloudinstancesVolumesGetallOK %s", 200, payload) } func (o *PcloudCloudinstancesVolumesGetallOK) GetPayload() *models.Volumes { @@ -177,11 +180,13 @@ func (o *PcloudCloudinstancesVolumesGetallBadRequest) Code() int { } func (o *PcloudCloudinstancesVolumesGetallBadRequest) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes][%d] pcloudCloudinstancesVolumesGetallBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes][%d] pcloudCloudinstancesVolumesGetallBadRequest %s", 400, payload) } func (o *PcloudCloudinstancesVolumesGetallBadRequest) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes][%d] pcloudCloudinstancesVolumesGetallBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes][%d] pcloudCloudinstancesVolumesGetallBadRequest %s", 400, payload) } func (o *PcloudCloudinstancesVolumesGetallBadRequest) GetPayload() *models.Error { @@ -245,11 +250,13 @@ func (o *PcloudCloudinstancesVolumesGetallUnauthorized) Code() int { } func (o *PcloudCloudinstancesVolumesGetallUnauthorized) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes][%d] pcloudCloudinstancesVolumesGetallUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes][%d] pcloudCloudinstancesVolumesGetallUnauthorized %s", 401, payload) } func (o *PcloudCloudinstancesVolumesGetallUnauthorized) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes][%d] pcloudCloudinstancesVolumesGetallUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes][%d] pcloudCloudinstancesVolumesGetallUnauthorized %s", 401, payload) } func (o *PcloudCloudinstancesVolumesGetallUnauthorized) GetPayload() *models.Error { @@ -313,11 +320,13 @@ func (o *PcloudCloudinstancesVolumesGetallForbidden) Code() int { } func (o *PcloudCloudinstancesVolumesGetallForbidden) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes][%d] pcloudCloudinstancesVolumesGetallForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes][%d] pcloudCloudinstancesVolumesGetallForbidden %s", 403, payload) } func (o *PcloudCloudinstancesVolumesGetallForbidden) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes][%d] pcloudCloudinstancesVolumesGetallForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes][%d] pcloudCloudinstancesVolumesGetallForbidden %s", 403, payload) } func (o *PcloudCloudinstancesVolumesGetallForbidden) GetPayload() *models.Error { @@ -381,11 +390,13 @@ func (o *PcloudCloudinstancesVolumesGetallNotFound) Code() int { } func (o *PcloudCloudinstancesVolumesGetallNotFound) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes][%d] pcloudCloudinstancesVolumesGetallNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes][%d] pcloudCloudinstancesVolumesGetallNotFound %s", 404, payload) } func (o *PcloudCloudinstancesVolumesGetallNotFound) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes][%d] pcloudCloudinstancesVolumesGetallNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes][%d] pcloudCloudinstancesVolumesGetallNotFound %s", 404, payload) } func (o *PcloudCloudinstancesVolumesGetallNotFound) GetPayload() *models.Error { @@ -449,11 +460,13 @@ func (o *PcloudCloudinstancesVolumesGetallInternalServerError) Code() int { } func (o *PcloudCloudinstancesVolumesGetallInternalServerError) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes][%d] pcloudCloudinstancesVolumesGetallInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes][%d] pcloudCloudinstancesVolumesGetallInternalServerError %s", 500, payload) } func (o *PcloudCloudinstancesVolumesGetallInternalServerError) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes][%d] pcloudCloudinstancesVolumesGetallInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes][%d] pcloudCloudinstancesVolumesGetallInternalServerError %s", 500, payload) } func (o *PcloudCloudinstancesVolumesGetallInternalServerError) GetPayload() *models.Error { diff --git a/power/client/p_cloud_volumes/pcloud_cloudinstances_volumes_post_responses.go b/power/client/p_cloud_volumes/pcloud_cloudinstances_volumes_post_responses.go index ce16de98..907ef618 100644 --- a/power/client/p_cloud_volumes/pcloud_cloudinstances_volumes_post_responses.go +++ b/power/client/p_cloud_volumes/pcloud_cloudinstances_volumes_post_responses.go @@ -6,6 +6,7 @@ package p_cloud_volumes // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -121,11 +122,13 @@ func (o *PcloudCloudinstancesVolumesPostAccepted) Code() int { } func (o *PcloudCloudinstancesVolumesPostAccepted) Error() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes][%d] pcloudCloudinstancesVolumesPostAccepted %+v", 202, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes][%d] pcloudCloudinstancesVolumesPostAccepted %s", 202, payload) } func (o *PcloudCloudinstancesVolumesPostAccepted) String() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes][%d] pcloudCloudinstancesVolumesPostAccepted %+v", 202, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes][%d] pcloudCloudinstancesVolumesPostAccepted %s", 202, payload) } func (o *PcloudCloudinstancesVolumesPostAccepted) GetPayload() *models.Volume { @@ -189,11 +192,13 @@ func (o *PcloudCloudinstancesVolumesPostBadRequest) Code() int { } func (o *PcloudCloudinstancesVolumesPostBadRequest) Error() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes][%d] pcloudCloudinstancesVolumesPostBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes][%d] pcloudCloudinstancesVolumesPostBadRequest %s", 400, payload) } func (o *PcloudCloudinstancesVolumesPostBadRequest) String() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes][%d] pcloudCloudinstancesVolumesPostBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes][%d] pcloudCloudinstancesVolumesPostBadRequest %s", 400, payload) } func (o *PcloudCloudinstancesVolumesPostBadRequest) GetPayload() *models.Error { @@ -257,11 +262,13 @@ func (o *PcloudCloudinstancesVolumesPostUnauthorized) Code() int { } func (o *PcloudCloudinstancesVolumesPostUnauthorized) Error() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes][%d] pcloudCloudinstancesVolumesPostUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes][%d] pcloudCloudinstancesVolumesPostUnauthorized %s", 401, payload) } func (o *PcloudCloudinstancesVolumesPostUnauthorized) String() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes][%d] pcloudCloudinstancesVolumesPostUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes][%d] pcloudCloudinstancesVolumesPostUnauthorized %s", 401, payload) } func (o *PcloudCloudinstancesVolumesPostUnauthorized) GetPayload() *models.Error { @@ -325,11 +332,13 @@ func (o *PcloudCloudinstancesVolumesPostForbidden) Code() int { } func (o *PcloudCloudinstancesVolumesPostForbidden) Error() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes][%d] pcloudCloudinstancesVolumesPostForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes][%d] pcloudCloudinstancesVolumesPostForbidden %s", 403, payload) } func (o *PcloudCloudinstancesVolumesPostForbidden) String() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes][%d] pcloudCloudinstancesVolumesPostForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes][%d] pcloudCloudinstancesVolumesPostForbidden %s", 403, payload) } func (o *PcloudCloudinstancesVolumesPostForbidden) GetPayload() *models.Error { @@ -393,11 +402,13 @@ func (o *PcloudCloudinstancesVolumesPostNotFound) Code() int { } func (o *PcloudCloudinstancesVolumesPostNotFound) Error() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes][%d] pcloudCloudinstancesVolumesPostNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes][%d] pcloudCloudinstancesVolumesPostNotFound %s", 404, payload) } func (o *PcloudCloudinstancesVolumesPostNotFound) String() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes][%d] pcloudCloudinstancesVolumesPostNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes][%d] pcloudCloudinstancesVolumesPostNotFound %s", 404, payload) } func (o *PcloudCloudinstancesVolumesPostNotFound) GetPayload() *models.Error { @@ -461,11 +472,13 @@ func (o *PcloudCloudinstancesVolumesPostConflict) Code() int { } func (o *PcloudCloudinstancesVolumesPostConflict) Error() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes][%d] pcloudCloudinstancesVolumesPostConflict %+v", 409, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes][%d] pcloudCloudinstancesVolumesPostConflict %s", 409, payload) } func (o *PcloudCloudinstancesVolumesPostConflict) String() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes][%d] pcloudCloudinstancesVolumesPostConflict %+v", 409, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes][%d] pcloudCloudinstancesVolumesPostConflict %s", 409, payload) } func (o *PcloudCloudinstancesVolumesPostConflict) GetPayload() *models.Error { @@ -529,11 +542,13 @@ func (o *PcloudCloudinstancesVolumesPostUnprocessableEntity) Code() int { } func (o *PcloudCloudinstancesVolumesPostUnprocessableEntity) Error() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes][%d] pcloudCloudinstancesVolumesPostUnprocessableEntity %+v", 422, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes][%d] pcloudCloudinstancesVolumesPostUnprocessableEntity %s", 422, payload) } func (o *PcloudCloudinstancesVolumesPostUnprocessableEntity) String() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes][%d] pcloudCloudinstancesVolumesPostUnprocessableEntity %+v", 422, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes][%d] pcloudCloudinstancesVolumesPostUnprocessableEntity %s", 422, payload) } func (o *PcloudCloudinstancesVolumesPostUnprocessableEntity) GetPayload() *models.Error { @@ -597,11 +612,13 @@ func (o *PcloudCloudinstancesVolumesPostInternalServerError) Code() int { } func (o *PcloudCloudinstancesVolumesPostInternalServerError) Error() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes][%d] pcloudCloudinstancesVolumesPostInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes][%d] pcloudCloudinstancesVolumesPostInternalServerError %s", 500, payload) } func (o *PcloudCloudinstancesVolumesPostInternalServerError) String() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes][%d] pcloudCloudinstancesVolumesPostInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes][%d] pcloudCloudinstancesVolumesPostInternalServerError %s", 500, payload) } func (o *PcloudCloudinstancesVolumesPostInternalServerError) GetPayload() *models.Error { diff --git a/power/client/p_cloud_volumes/pcloud_cloudinstances_volumes_put_responses.go b/power/client/p_cloud_volumes/pcloud_cloudinstances_volumes_put_responses.go index 77932ec8..ae40c474 100644 --- a/power/client/p_cloud_volumes/pcloud_cloudinstances_volumes_put_responses.go +++ b/power/client/p_cloud_volumes/pcloud_cloudinstances_volumes_put_responses.go @@ -6,6 +6,7 @@ package p_cloud_volumes // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -121,11 +122,13 @@ func (o *PcloudCloudinstancesVolumesPutOK) Code() int { } func (o *PcloudCloudinstancesVolumesPutOK) Error() string { - return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/{volume_id}][%d] pcloudCloudinstancesVolumesPutOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/{volume_id}][%d] pcloudCloudinstancesVolumesPutOK %s", 200, payload) } func (o *PcloudCloudinstancesVolumesPutOK) String() string { - return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/{volume_id}][%d] pcloudCloudinstancesVolumesPutOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/{volume_id}][%d] pcloudCloudinstancesVolumesPutOK %s", 200, payload) } func (o *PcloudCloudinstancesVolumesPutOK) GetPayload() *models.Volume { @@ -189,11 +192,13 @@ func (o *PcloudCloudinstancesVolumesPutBadRequest) Code() int { } func (o *PcloudCloudinstancesVolumesPutBadRequest) Error() string { - return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/{volume_id}][%d] pcloudCloudinstancesVolumesPutBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/{volume_id}][%d] pcloudCloudinstancesVolumesPutBadRequest %s", 400, payload) } func (o *PcloudCloudinstancesVolumesPutBadRequest) String() string { - return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/{volume_id}][%d] pcloudCloudinstancesVolumesPutBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/{volume_id}][%d] pcloudCloudinstancesVolumesPutBadRequest %s", 400, payload) } func (o *PcloudCloudinstancesVolumesPutBadRequest) GetPayload() *models.Error { @@ -257,11 +262,13 @@ func (o *PcloudCloudinstancesVolumesPutUnauthorized) Code() int { } func (o *PcloudCloudinstancesVolumesPutUnauthorized) Error() string { - return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/{volume_id}][%d] pcloudCloudinstancesVolumesPutUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/{volume_id}][%d] pcloudCloudinstancesVolumesPutUnauthorized %s", 401, payload) } func (o *PcloudCloudinstancesVolumesPutUnauthorized) String() string { - return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/{volume_id}][%d] pcloudCloudinstancesVolumesPutUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/{volume_id}][%d] pcloudCloudinstancesVolumesPutUnauthorized %s", 401, payload) } func (o *PcloudCloudinstancesVolumesPutUnauthorized) GetPayload() *models.Error { @@ -325,11 +332,13 @@ func (o *PcloudCloudinstancesVolumesPutForbidden) Code() int { } func (o *PcloudCloudinstancesVolumesPutForbidden) Error() string { - return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/{volume_id}][%d] pcloudCloudinstancesVolumesPutForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/{volume_id}][%d] pcloudCloudinstancesVolumesPutForbidden %s", 403, payload) } func (o *PcloudCloudinstancesVolumesPutForbidden) String() string { - return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/{volume_id}][%d] pcloudCloudinstancesVolumesPutForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/{volume_id}][%d] pcloudCloudinstancesVolumesPutForbidden %s", 403, payload) } func (o *PcloudCloudinstancesVolumesPutForbidden) GetPayload() *models.Error { @@ -393,11 +402,13 @@ func (o *PcloudCloudinstancesVolumesPutNotFound) Code() int { } func (o *PcloudCloudinstancesVolumesPutNotFound) Error() string { - return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/{volume_id}][%d] pcloudCloudinstancesVolumesPutNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/{volume_id}][%d] pcloudCloudinstancesVolumesPutNotFound %s", 404, payload) } func (o *PcloudCloudinstancesVolumesPutNotFound) String() string { - return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/{volume_id}][%d] pcloudCloudinstancesVolumesPutNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/{volume_id}][%d] pcloudCloudinstancesVolumesPutNotFound %s", 404, payload) } func (o *PcloudCloudinstancesVolumesPutNotFound) GetPayload() *models.Error { @@ -461,11 +472,13 @@ func (o *PcloudCloudinstancesVolumesPutConflict) Code() int { } func (o *PcloudCloudinstancesVolumesPutConflict) Error() string { - return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/{volume_id}][%d] pcloudCloudinstancesVolumesPutConflict %+v", 409, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/{volume_id}][%d] pcloudCloudinstancesVolumesPutConflict %s", 409, payload) } func (o *PcloudCloudinstancesVolumesPutConflict) String() string { - return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/{volume_id}][%d] pcloudCloudinstancesVolumesPutConflict %+v", 409, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/{volume_id}][%d] pcloudCloudinstancesVolumesPutConflict %s", 409, payload) } func (o *PcloudCloudinstancesVolumesPutConflict) GetPayload() *models.Error { @@ -529,11 +542,13 @@ func (o *PcloudCloudinstancesVolumesPutUnprocessableEntity) Code() int { } func (o *PcloudCloudinstancesVolumesPutUnprocessableEntity) Error() string { - return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/{volume_id}][%d] pcloudCloudinstancesVolumesPutUnprocessableEntity %+v", 422, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/{volume_id}][%d] pcloudCloudinstancesVolumesPutUnprocessableEntity %s", 422, payload) } func (o *PcloudCloudinstancesVolumesPutUnprocessableEntity) String() string { - return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/{volume_id}][%d] pcloudCloudinstancesVolumesPutUnprocessableEntity %+v", 422, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/{volume_id}][%d] pcloudCloudinstancesVolumesPutUnprocessableEntity %s", 422, payload) } func (o *PcloudCloudinstancesVolumesPutUnprocessableEntity) GetPayload() *models.Error { @@ -597,11 +612,13 @@ func (o *PcloudCloudinstancesVolumesPutInternalServerError) Code() int { } func (o *PcloudCloudinstancesVolumesPutInternalServerError) Error() string { - return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/{volume_id}][%d] pcloudCloudinstancesVolumesPutInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/{volume_id}][%d] pcloudCloudinstancesVolumesPutInternalServerError %s", 500, payload) } func (o *PcloudCloudinstancesVolumesPutInternalServerError) String() string { - return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/{volume_id}][%d] pcloudCloudinstancesVolumesPutInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/{volume_id}][%d] pcloudCloudinstancesVolumesPutInternalServerError %s", 500, payload) } func (o *PcloudCloudinstancesVolumesPutInternalServerError) GetPayload() *models.Error { diff --git a/power/client/p_cloud_volumes/pcloud_cloudinstances_volumes_remote_copy_relationship_get_responses.go b/power/client/p_cloud_volumes/pcloud_cloudinstances_volumes_remote_copy_relationship_get_responses.go index 6f173caf..4ff63893 100644 --- a/power/client/p_cloud_volumes/pcloud_cloudinstances_volumes_remote_copy_relationship_get_responses.go +++ b/power/client/p_cloud_volumes/pcloud_cloudinstances_volumes_remote_copy_relationship_get_responses.go @@ -6,6 +6,7 @@ package p_cloud_volumes // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -115,11 +116,13 @@ func (o *PcloudCloudinstancesVolumesRemoteCopyRelationshipGetOK) Code() int { } func (o *PcloudCloudinstancesVolumesRemoteCopyRelationshipGetOK) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/{volume_id}/remote-copy][%d] pcloudCloudinstancesVolumesRemoteCopyRelationshipGetOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/{volume_id}/remote-copy][%d] pcloudCloudinstancesVolumesRemoteCopyRelationshipGetOK %s", 200, payload) } func (o *PcloudCloudinstancesVolumesRemoteCopyRelationshipGetOK) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/{volume_id}/remote-copy][%d] pcloudCloudinstancesVolumesRemoteCopyRelationshipGetOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/{volume_id}/remote-copy][%d] pcloudCloudinstancesVolumesRemoteCopyRelationshipGetOK %s", 200, payload) } func (o *PcloudCloudinstancesVolumesRemoteCopyRelationshipGetOK) GetPayload() *models.VolumeRemoteCopyRelationship { @@ -183,11 +186,13 @@ func (o *PcloudCloudinstancesVolumesRemoteCopyRelationshipGetBadRequest) Code() } func (o *PcloudCloudinstancesVolumesRemoteCopyRelationshipGetBadRequest) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/{volume_id}/remote-copy][%d] pcloudCloudinstancesVolumesRemoteCopyRelationshipGetBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/{volume_id}/remote-copy][%d] pcloudCloudinstancesVolumesRemoteCopyRelationshipGetBadRequest %s", 400, payload) } func (o *PcloudCloudinstancesVolumesRemoteCopyRelationshipGetBadRequest) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/{volume_id}/remote-copy][%d] pcloudCloudinstancesVolumesRemoteCopyRelationshipGetBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/{volume_id}/remote-copy][%d] pcloudCloudinstancesVolumesRemoteCopyRelationshipGetBadRequest %s", 400, payload) } func (o *PcloudCloudinstancesVolumesRemoteCopyRelationshipGetBadRequest) GetPayload() *models.Error { @@ -251,11 +256,13 @@ func (o *PcloudCloudinstancesVolumesRemoteCopyRelationshipGetUnauthorized) Code( } func (o *PcloudCloudinstancesVolumesRemoteCopyRelationshipGetUnauthorized) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/{volume_id}/remote-copy][%d] pcloudCloudinstancesVolumesRemoteCopyRelationshipGetUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/{volume_id}/remote-copy][%d] pcloudCloudinstancesVolumesRemoteCopyRelationshipGetUnauthorized %s", 401, payload) } func (o *PcloudCloudinstancesVolumesRemoteCopyRelationshipGetUnauthorized) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/{volume_id}/remote-copy][%d] pcloudCloudinstancesVolumesRemoteCopyRelationshipGetUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/{volume_id}/remote-copy][%d] pcloudCloudinstancesVolumesRemoteCopyRelationshipGetUnauthorized %s", 401, payload) } func (o *PcloudCloudinstancesVolumesRemoteCopyRelationshipGetUnauthorized) GetPayload() *models.Error { @@ -319,11 +326,13 @@ func (o *PcloudCloudinstancesVolumesRemoteCopyRelationshipGetForbidden) Code() i } func (o *PcloudCloudinstancesVolumesRemoteCopyRelationshipGetForbidden) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/{volume_id}/remote-copy][%d] pcloudCloudinstancesVolumesRemoteCopyRelationshipGetForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/{volume_id}/remote-copy][%d] pcloudCloudinstancesVolumesRemoteCopyRelationshipGetForbidden %s", 403, payload) } func (o *PcloudCloudinstancesVolumesRemoteCopyRelationshipGetForbidden) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/{volume_id}/remote-copy][%d] pcloudCloudinstancesVolumesRemoteCopyRelationshipGetForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/{volume_id}/remote-copy][%d] pcloudCloudinstancesVolumesRemoteCopyRelationshipGetForbidden %s", 403, payload) } func (o *PcloudCloudinstancesVolumesRemoteCopyRelationshipGetForbidden) GetPayload() *models.Error { @@ -387,11 +396,13 @@ func (o *PcloudCloudinstancesVolumesRemoteCopyRelationshipGetNotFound) Code() in } func (o *PcloudCloudinstancesVolumesRemoteCopyRelationshipGetNotFound) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/{volume_id}/remote-copy][%d] pcloudCloudinstancesVolumesRemoteCopyRelationshipGetNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/{volume_id}/remote-copy][%d] pcloudCloudinstancesVolumesRemoteCopyRelationshipGetNotFound %s", 404, payload) } func (o *PcloudCloudinstancesVolumesRemoteCopyRelationshipGetNotFound) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/{volume_id}/remote-copy][%d] pcloudCloudinstancesVolumesRemoteCopyRelationshipGetNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/{volume_id}/remote-copy][%d] pcloudCloudinstancesVolumesRemoteCopyRelationshipGetNotFound %s", 404, payload) } func (o *PcloudCloudinstancesVolumesRemoteCopyRelationshipGetNotFound) GetPayload() *models.Error { @@ -455,11 +466,13 @@ func (o *PcloudCloudinstancesVolumesRemoteCopyRelationshipGetTooManyRequests) Co } func (o *PcloudCloudinstancesVolumesRemoteCopyRelationshipGetTooManyRequests) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/{volume_id}/remote-copy][%d] pcloudCloudinstancesVolumesRemoteCopyRelationshipGetTooManyRequests %+v", 429, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/{volume_id}/remote-copy][%d] pcloudCloudinstancesVolumesRemoteCopyRelationshipGetTooManyRequests %s", 429, payload) } func (o *PcloudCloudinstancesVolumesRemoteCopyRelationshipGetTooManyRequests) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/{volume_id}/remote-copy][%d] pcloudCloudinstancesVolumesRemoteCopyRelationshipGetTooManyRequests %+v", 429, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/{volume_id}/remote-copy][%d] pcloudCloudinstancesVolumesRemoteCopyRelationshipGetTooManyRequests %s", 429, payload) } func (o *PcloudCloudinstancesVolumesRemoteCopyRelationshipGetTooManyRequests) GetPayload() *models.Error { @@ -523,11 +536,13 @@ func (o *PcloudCloudinstancesVolumesRemoteCopyRelationshipGetInternalServerError } func (o *PcloudCloudinstancesVolumesRemoteCopyRelationshipGetInternalServerError) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/{volume_id}/remote-copy][%d] pcloudCloudinstancesVolumesRemoteCopyRelationshipGetInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/{volume_id}/remote-copy][%d] pcloudCloudinstancesVolumesRemoteCopyRelationshipGetInternalServerError %s", 500, payload) } func (o *PcloudCloudinstancesVolumesRemoteCopyRelationshipGetInternalServerError) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/{volume_id}/remote-copy][%d] pcloudCloudinstancesVolumesRemoteCopyRelationshipGetInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/{volume_id}/remote-copy][%d] pcloudCloudinstancesVolumesRemoteCopyRelationshipGetInternalServerError %s", 500, payload) } func (o *PcloudCloudinstancesVolumesRemoteCopyRelationshipGetInternalServerError) GetPayload() *models.Error { diff --git a/power/client/p_cloud_volumes/pcloud_pvminstances_volumes_delete_responses.go b/power/client/p_cloud_volumes/pcloud_pvminstances_volumes_delete_responses.go index e475c5d0..b29535e9 100644 --- a/power/client/p_cloud_volumes/pcloud_pvminstances_volumes_delete_responses.go +++ b/power/client/p_cloud_volumes/pcloud_pvminstances_volumes_delete_responses.go @@ -6,6 +6,7 @@ package p_cloud_volumes // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -115,11 +116,13 @@ func (o *PcloudPvminstancesVolumesDeleteAccepted) Code() int { } func (o *PcloudPvminstancesVolumesDeleteAccepted) Error() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes/{volume_id}][%d] pcloudPvminstancesVolumesDeleteAccepted %+v", 202, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes/{volume_id}][%d] pcloudPvminstancesVolumesDeleteAccepted %s", 202, payload) } func (o *PcloudPvminstancesVolumesDeleteAccepted) String() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes/{volume_id}][%d] pcloudPvminstancesVolumesDeleteAccepted %+v", 202, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes/{volume_id}][%d] pcloudPvminstancesVolumesDeleteAccepted %s", 202, payload) } func (o *PcloudPvminstancesVolumesDeleteAccepted) GetPayload() models.Object { @@ -181,11 +184,13 @@ func (o *PcloudPvminstancesVolumesDeleteBadRequest) Code() int { } func (o *PcloudPvminstancesVolumesDeleteBadRequest) Error() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes/{volume_id}][%d] pcloudPvminstancesVolumesDeleteBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes/{volume_id}][%d] pcloudPvminstancesVolumesDeleteBadRequest %s", 400, payload) } func (o *PcloudPvminstancesVolumesDeleteBadRequest) String() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes/{volume_id}][%d] pcloudPvminstancesVolumesDeleteBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes/{volume_id}][%d] pcloudPvminstancesVolumesDeleteBadRequest %s", 400, payload) } func (o *PcloudPvminstancesVolumesDeleteBadRequest) GetPayload() *models.Error { @@ -249,11 +254,13 @@ func (o *PcloudPvminstancesVolumesDeleteUnauthorized) Code() int { } func (o *PcloudPvminstancesVolumesDeleteUnauthorized) Error() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes/{volume_id}][%d] pcloudPvminstancesVolumesDeleteUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes/{volume_id}][%d] pcloudPvminstancesVolumesDeleteUnauthorized %s", 401, payload) } func (o *PcloudPvminstancesVolumesDeleteUnauthorized) String() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes/{volume_id}][%d] pcloudPvminstancesVolumesDeleteUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes/{volume_id}][%d] pcloudPvminstancesVolumesDeleteUnauthorized %s", 401, payload) } func (o *PcloudPvminstancesVolumesDeleteUnauthorized) GetPayload() *models.Error { @@ -317,11 +324,13 @@ func (o *PcloudPvminstancesVolumesDeleteForbidden) Code() int { } func (o *PcloudPvminstancesVolumesDeleteForbidden) Error() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes/{volume_id}][%d] pcloudPvminstancesVolumesDeleteForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes/{volume_id}][%d] pcloudPvminstancesVolumesDeleteForbidden %s", 403, payload) } func (o *PcloudPvminstancesVolumesDeleteForbidden) String() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes/{volume_id}][%d] pcloudPvminstancesVolumesDeleteForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes/{volume_id}][%d] pcloudPvminstancesVolumesDeleteForbidden %s", 403, payload) } func (o *PcloudPvminstancesVolumesDeleteForbidden) GetPayload() *models.Error { @@ -385,11 +394,13 @@ func (o *PcloudPvminstancesVolumesDeleteNotFound) Code() int { } func (o *PcloudPvminstancesVolumesDeleteNotFound) Error() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes/{volume_id}][%d] pcloudPvminstancesVolumesDeleteNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes/{volume_id}][%d] pcloudPvminstancesVolumesDeleteNotFound %s", 404, payload) } func (o *PcloudPvminstancesVolumesDeleteNotFound) String() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes/{volume_id}][%d] pcloudPvminstancesVolumesDeleteNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes/{volume_id}][%d] pcloudPvminstancesVolumesDeleteNotFound %s", 404, payload) } func (o *PcloudPvminstancesVolumesDeleteNotFound) GetPayload() *models.Error { @@ -453,11 +464,13 @@ func (o *PcloudPvminstancesVolumesDeleteConflict) Code() int { } func (o *PcloudPvminstancesVolumesDeleteConflict) Error() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes/{volume_id}][%d] pcloudPvminstancesVolumesDeleteConflict %+v", 409, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes/{volume_id}][%d] pcloudPvminstancesVolumesDeleteConflict %s", 409, payload) } func (o *PcloudPvminstancesVolumesDeleteConflict) String() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes/{volume_id}][%d] pcloudPvminstancesVolumesDeleteConflict %+v", 409, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes/{volume_id}][%d] pcloudPvminstancesVolumesDeleteConflict %s", 409, payload) } func (o *PcloudPvminstancesVolumesDeleteConflict) GetPayload() *models.Error { @@ -521,11 +534,13 @@ func (o *PcloudPvminstancesVolumesDeleteInternalServerError) Code() int { } func (o *PcloudPvminstancesVolumesDeleteInternalServerError) Error() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes/{volume_id}][%d] pcloudPvminstancesVolumesDeleteInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes/{volume_id}][%d] pcloudPvminstancesVolumesDeleteInternalServerError %s", 500, payload) } func (o *PcloudPvminstancesVolumesDeleteInternalServerError) String() string { - return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes/{volume_id}][%d] pcloudPvminstancesVolumesDeleteInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes/{volume_id}][%d] pcloudPvminstancesVolumesDeleteInternalServerError %s", 500, payload) } func (o *PcloudPvminstancesVolumesDeleteInternalServerError) GetPayload() *models.Error { diff --git a/power/client/p_cloud_volumes/pcloud_pvminstances_volumes_get_responses.go b/power/client/p_cloud_volumes/pcloud_pvminstances_volumes_get_responses.go index fe063e85..c495c925 100644 --- a/power/client/p_cloud_volumes/pcloud_pvminstances_volumes_get_responses.go +++ b/power/client/p_cloud_volumes/pcloud_pvminstances_volumes_get_responses.go @@ -6,6 +6,7 @@ package p_cloud_volumes // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -109,11 +110,13 @@ func (o *PcloudPvminstancesVolumesGetOK) Code() int { } func (o *PcloudPvminstancesVolumesGetOK) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes/{volume_id}][%d] pcloudPvminstancesVolumesGetOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes/{volume_id}][%d] pcloudPvminstancesVolumesGetOK %s", 200, payload) } func (o *PcloudPvminstancesVolumesGetOK) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes/{volume_id}][%d] pcloudPvminstancesVolumesGetOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes/{volume_id}][%d] pcloudPvminstancesVolumesGetOK %s", 200, payload) } func (o *PcloudPvminstancesVolumesGetOK) GetPayload() *models.Volume { @@ -177,11 +180,13 @@ func (o *PcloudPvminstancesVolumesGetBadRequest) Code() int { } func (o *PcloudPvminstancesVolumesGetBadRequest) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes/{volume_id}][%d] pcloudPvminstancesVolumesGetBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes/{volume_id}][%d] pcloudPvminstancesVolumesGetBadRequest %s", 400, payload) } func (o *PcloudPvminstancesVolumesGetBadRequest) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes/{volume_id}][%d] pcloudPvminstancesVolumesGetBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes/{volume_id}][%d] pcloudPvminstancesVolumesGetBadRequest %s", 400, payload) } func (o *PcloudPvminstancesVolumesGetBadRequest) GetPayload() *models.Error { @@ -245,11 +250,13 @@ func (o *PcloudPvminstancesVolumesGetUnauthorized) Code() int { } func (o *PcloudPvminstancesVolumesGetUnauthorized) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes/{volume_id}][%d] pcloudPvminstancesVolumesGetUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes/{volume_id}][%d] pcloudPvminstancesVolumesGetUnauthorized %s", 401, payload) } func (o *PcloudPvminstancesVolumesGetUnauthorized) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes/{volume_id}][%d] pcloudPvminstancesVolumesGetUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes/{volume_id}][%d] pcloudPvminstancesVolumesGetUnauthorized %s", 401, payload) } func (o *PcloudPvminstancesVolumesGetUnauthorized) GetPayload() *models.Error { @@ -313,11 +320,13 @@ func (o *PcloudPvminstancesVolumesGetForbidden) Code() int { } func (o *PcloudPvminstancesVolumesGetForbidden) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes/{volume_id}][%d] pcloudPvminstancesVolumesGetForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes/{volume_id}][%d] pcloudPvminstancesVolumesGetForbidden %s", 403, payload) } func (o *PcloudPvminstancesVolumesGetForbidden) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes/{volume_id}][%d] pcloudPvminstancesVolumesGetForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes/{volume_id}][%d] pcloudPvminstancesVolumesGetForbidden %s", 403, payload) } func (o *PcloudPvminstancesVolumesGetForbidden) GetPayload() *models.Error { @@ -381,11 +390,13 @@ func (o *PcloudPvminstancesVolumesGetNotFound) Code() int { } func (o *PcloudPvminstancesVolumesGetNotFound) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes/{volume_id}][%d] pcloudPvminstancesVolumesGetNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes/{volume_id}][%d] pcloudPvminstancesVolumesGetNotFound %s", 404, payload) } func (o *PcloudPvminstancesVolumesGetNotFound) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes/{volume_id}][%d] pcloudPvminstancesVolumesGetNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes/{volume_id}][%d] pcloudPvminstancesVolumesGetNotFound %s", 404, payload) } func (o *PcloudPvminstancesVolumesGetNotFound) GetPayload() *models.Error { @@ -449,11 +460,13 @@ func (o *PcloudPvminstancesVolumesGetInternalServerError) Code() int { } func (o *PcloudPvminstancesVolumesGetInternalServerError) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes/{volume_id}][%d] pcloudPvminstancesVolumesGetInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes/{volume_id}][%d] pcloudPvminstancesVolumesGetInternalServerError %s", 500, payload) } func (o *PcloudPvminstancesVolumesGetInternalServerError) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes/{volume_id}][%d] pcloudPvminstancesVolumesGetInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes/{volume_id}][%d] pcloudPvminstancesVolumesGetInternalServerError %s", 500, payload) } func (o *PcloudPvminstancesVolumesGetInternalServerError) GetPayload() *models.Error { diff --git a/power/client/p_cloud_volumes/pcloud_pvminstances_volumes_getall_responses.go b/power/client/p_cloud_volumes/pcloud_pvminstances_volumes_getall_responses.go index 515b0baa..d81c92f5 100644 --- a/power/client/p_cloud_volumes/pcloud_pvminstances_volumes_getall_responses.go +++ b/power/client/p_cloud_volumes/pcloud_pvminstances_volumes_getall_responses.go @@ -6,6 +6,7 @@ package p_cloud_volumes // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -109,11 +110,13 @@ func (o *PcloudPvminstancesVolumesGetallOK) Code() int { } func (o *PcloudPvminstancesVolumesGetallOK) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes][%d] pcloudPvminstancesVolumesGetallOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes][%d] pcloudPvminstancesVolumesGetallOK %s", 200, payload) } func (o *PcloudPvminstancesVolumesGetallOK) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes][%d] pcloudPvminstancesVolumesGetallOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes][%d] pcloudPvminstancesVolumesGetallOK %s", 200, payload) } func (o *PcloudPvminstancesVolumesGetallOK) GetPayload() *models.Volumes { @@ -177,11 +180,13 @@ func (o *PcloudPvminstancesVolumesGetallBadRequest) Code() int { } func (o *PcloudPvminstancesVolumesGetallBadRequest) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes][%d] pcloudPvminstancesVolumesGetallBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes][%d] pcloudPvminstancesVolumesGetallBadRequest %s", 400, payload) } func (o *PcloudPvminstancesVolumesGetallBadRequest) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes][%d] pcloudPvminstancesVolumesGetallBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes][%d] pcloudPvminstancesVolumesGetallBadRequest %s", 400, payload) } func (o *PcloudPvminstancesVolumesGetallBadRequest) GetPayload() *models.Error { @@ -245,11 +250,13 @@ func (o *PcloudPvminstancesVolumesGetallUnauthorized) Code() int { } func (o *PcloudPvminstancesVolumesGetallUnauthorized) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes][%d] pcloudPvminstancesVolumesGetallUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes][%d] pcloudPvminstancesVolumesGetallUnauthorized %s", 401, payload) } func (o *PcloudPvminstancesVolumesGetallUnauthorized) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes][%d] pcloudPvminstancesVolumesGetallUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes][%d] pcloudPvminstancesVolumesGetallUnauthorized %s", 401, payload) } func (o *PcloudPvminstancesVolumesGetallUnauthorized) GetPayload() *models.Error { @@ -313,11 +320,13 @@ func (o *PcloudPvminstancesVolumesGetallForbidden) Code() int { } func (o *PcloudPvminstancesVolumesGetallForbidden) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes][%d] pcloudPvminstancesVolumesGetallForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes][%d] pcloudPvminstancesVolumesGetallForbidden %s", 403, payload) } func (o *PcloudPvminstancesVolumesGetallForbidden) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes][%d] pcloudPvminstancesVolumesGetallForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes][%d] pcloudPvminstancesVolumesGetallForbidden %s", 403, payload) } func (o *PcloudPvminstancesVolumesGetallForbidden) GetPayload() *models.Error { @@ -381,11 +390,13 @@ func (o *PcloudPvminstancesVolumesGetallNotFound) Code() int { } func (o *PcloudPvminstancesVolumesGetallNotFound) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes][%d] pcloudPvminstancesVolumesGetallNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes][%d] pcloudPvminstancesVolumesGetallNotFound %s", 404, payload) } func (o *PcloudPvminstancesVolumesGetallNotFound) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes][%d] pcloudPvminstancesVolumesGetallNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes][%d] pcloudPvminstancesVolumesGetallNotFound %s", 404, payload) } func (o *PcloudPvminstancesVolumesGetallNotFound) GetPayload() *models.Error { @@ -449,11 +460,13 @@ func (o *PcloudPvminstancesVolumesGetallInternalServerError) Code() int { } func (o *PcloudPvminstancesVolumesGetallInternalServerError) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes][%d] pcloudPvminstancesVolumesGetallInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes][%d] pcloudPvminstancesVolumesGetallInternalServerError %s", 500, payload) } func (o *PcloudPvminstancesVolumesGetallInternalServerError) String() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes][%d] pcloudPvminstancesVolumesGetallInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes][%d] pcloudPvminstancesVolumesGetallInternalServerError %s", 500, payload) } func (o *PcloudPvminstancesVolumesGetallInternalServerError) GetPayload() *models.Error { diff --git a/power/client/p_cloud_volumes/pcloud_pvminstances_volumes_post_responses.go b/power/client/p_cloud_volumes/pcloud_pvminstances_volumes_post_responses.go index 48d58e9a..add3acda 100644 --- a/power/client/p_cloud_volumes/pcloud_pvminstances_volumes_post_responses.go +++ b/power/client/p_cloud_volumes/pcloud_pvminstances_volumes_post_responses.go @@ -6,6 +6,7 @@ package p_cloud_volumes // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -115,11 +116,13 @@ func (o *PcloudPvminstancesVolumesPostOK) Code() int { } func (o *PcloudPvminstancesVolumesPostOK) Error() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes/{volume_id}][%d] pcloudPvminstancesVolumesPostOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes/{volume_id}][%d] pcloudPvminstancesVolumesPostOK %s", 200, payload) } func (o *PcloudPvminstancesVolumesPostOK) String() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes/{volume_id}][%d] pcloudPvminstancesVolumesPostOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes/{volume_id}][%d] pcloudPvminstancesVolumesPostOK %s", 200, payload) } func (o *PcloudPvminstancesVolumesPostOK) GetPayload() models.Object { @@ -181,11 +184,13 @@ func (o *PcloudPvminstancesVolumesPostBadRequest) Code() int { } func (o *PcloudPvminstancesVolumesPostBadRequest) Error() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes/{volume_id}][%d] pcloudPvminstancesVolumesPostBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes/{volume_id}][%d] pcloudPvminstancesVolumesPostBadRequest %s", 400, payload) } func (o *PcloudPvminstancesVolumesPostBadRequest) String() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes/{volume_id}][%d] pcloudPvminstancesVolumesPostBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes/{volume_id}][%d] pcloudPvminstancesVolumesPostBadRequest %s", 400, payload) } func (o *PcloudPvminstancesVolumesPostBadRequest) GetPayload() *models.Error { @@ -249,11 +254,13 @@ func (o *PcloudPvminstancesVolumesPostUnauthorized) Code() int { } func (o *PcloudPvminstancesVolumesPostUnauthorized) Error() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes/{volume_id}][%d] pcloudPvminstancesVolumesPostUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes/{volume_id}][%d] pcloudPvminstancesVolumesPostUnauthorized %s", 401, payload) } func (o *PcloudPvminstancesVolumesPostUnauthorized) String() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes/{volume_id}][%d] pcloudPvminstancesVolumesPostUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes/{volume_id}][%d] pcloudPvminstancesVolumesPostUnauthorized %s", 401, payload) } func (o *PcloudPvminstancesVolumesPostUnauthorized) GetPayload() *models.Error { @@ -317,11 +324,13 @@ func (o *PcloudPvminstancesVolumesPostForbidden) Code() int { } func (o *PcloudPvminstancesVolumesPostForbidden) Error() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes/{volume_id}][%d] pcloudPvminstancesVolumesPostForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes/{volume_id}][%d] pcloudPvminstancesVolumesPostForbidden %s", 403, payload) } func (o *PcloudPvminstancesVolumesPostForbidden) String() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes/{volume_id}][%d] pcloudPvminstancesVolumesPostForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes/{volume_id}][%d] pcloudPvminstancesVolumesPostForbidden %s", 403, payload) } func (o *PcloudPvminstancesVolumesPostForbidden) GetPayload() *models.Error { @@ -385,11 +394,13 @@ func (o *PcloudPvminstancesVolumesPostNotFound) Code() int { } func (o *PcloudPvminstancesVolumesPostNotFound) Error() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes/{volume_id}][%d] pcloudPvminstancesVolumesPostNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes/{volume_id}][%d] pcloudPvminstancesVolumesPostNotFound %s", 404, payload) } func (o *PcloudPvminstancesVolumesPostNotFound) String() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes/{volume_id}][%d] pcloudPvminstancesVolumesPostNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes/{volume_id}][%d] pcloudPvminstancesVolumesPostNotFound %s", 404, payload) } func (o *PcloudPvminstancesVolumesPostNotFound) GetPayload() *models.Error { @@ -453,11 +464,13 @@ func (o *PcloudPvminstancesVolumesPostConflict) Code() int { } func (o *PcloudPvminstancesVolumesPostConflict) Error() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes/{volume_id}][%d] pcloudPvminstancesVolumesPostConflict %+v", 409, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes/{volume_id}][%d] pcloudPvminstancesVolumesPostConflict %s", 409, payload) } func (o *PcloudPvminstancesVolumesPostConflict) String() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes/{volume_id}][%d] pcloudPvminstancesVolumesPostConflict %+v", 409, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes/{volume_id}][%d] pcloudPvminstancesVolumesPostConflict %s", 409, payload) } func (o *PcloudPvminstancesVolumesPostConflict) GetPayload() *models.Error { @@ -521,11 +534,13 @@ func (o *PcloudPvminstancesVolumesPostInternalServerError) Code() int { } func (o *PcloudPvminstancesVolumesPostInternalServerError) Error() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes/{volume_id}][%d] pcloudPvminstancesVolumesPostInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes/{volume_id}][%d] pcloudPvminstancesVolumesPostInternalServerError %s", 500, payload) } func (o *PcloudPvminstancesVolumesPostInternalServerError) String() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes/{volume_id}][%d] pcloudPvminstancesVolumesPostInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes/{volume_id}][%d] pcloudPvminstancesVolumesPostInternalServerError %s", 500, payload) } func (o *PcloudPvminstancesVolumesPostInternalServerError) GetPayload() *models.Error { diff --git a/power/client/p_cloud_volumes/pcloud_pvminstances_volumes_put_responses.go b/power/client/p_cloud_volumes/pcloud_pvminstances_volumes_put_responses.go index bcdd7318..7c4bccd6 100644 --- a/power/client/p_cloud_volumes/pcloud_pvminstances_volumes_put_responses.go +++ b/power/client/p_cloud_volumes/pcloud_pvminstances_volumes_put_responses.go @@ -6,6 +6,7 @@ package p_cloud_volumes // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -109,11 +110,13 @@ func (o *PcloudPvminstancesVolumesPutOK) Code() int { } func (o *PcloudPvminstancesVolumesPutOK) Error() string { - return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes/{volume_id}][%d] pcloudPvminstancesVolumesPutOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes/{volume_id}][%d] pcloudPvminstancesVolumesPutOK %s", 200, payload) } func (o *PcloudPvminstancesVolumesPutOK) String() string { - return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes/{volume_id}][%d] pcloudPvminstancesVolumesPutOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes/{volume_id}][%d] pcloudPvminstancesVolumesPutOK %s", 200, payload) } func (o *PcloudPvminstancesVolumesPutOK) GetPayload() models.Object { @@ -175,11 +178,13 @@ func (o *PcloudPvminstancesVolumesPutBadRequest) Code() int { } func (o *PcloudPvminstancesVolumesPutBadRequest) Error() string { - return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes/{volume_id}][%d] pcloudPvminstancesVolumesPutBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes/{volume_id}][%d] pcloudPvminstancesVolumesPutBadRequest %s", 400, payload) } func (o *PcloudPvminstancesVolumesPutBadRequest) String() string { - return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes/{volume_id}][%d] pcloudPvminstancesVolumesPutBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes/{volume_id}][%d] pcloudPvminstancesVolumesPutBadRequest %s", 400, payload) } func (o *PcloudPvminstancesVolumesPutBadRequest) GetPayload() *models.Error { @@ -243,11 +248,13 @@ func (o *PcloudPvminstancesVolumesPutUnauthorized) Code() int { } func (o *PcloudPvminstancesVolumesPutUnauthorized) Error() string { - return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes/{volume_id}][%d] pcloudPvminstancesVolumesPutUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes/{volume_id}][%d] pcloudPvminstancesVolumesPutUnauthorized %s", 401, payload) } func (o *PcloudPvminstancesVolumesPutUnauthorized) String() string { - return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes/{volume_id}][%d] pcloudPvminstancesVolumesPutUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes/{volume_id}][%d] pcloudPvminstancesVolumesPutUnauthorized %s", 401, payload) } func (o *PcloudPvminstancesVolumesPutUnauthorized) GetPayload() *models.Error { @@ -311,11 +318,13 @@ func (o *PcloudPvminstancesVolumesPutForbidden) Code() int { } func (o *PcloudPvminstancesVolumesPutForbidden) Error() string { - return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes/{volume_id}][%d] pcloudPvminstancesVolumesPutForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes/{volume_id}][%d] pcloudPvminstancesVolumesPutForbidden %s", 403, payload) } func (o *PcloudPvminstancesVolumesPutForbidden) String() string { - return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes/{volume_id}][%d] pcloudPvminstancesVolumesPutForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes/{volume_id}][%d] pcloudPvminstancesVolumesPutForbidden %s", 403, payload) } func (o *PcloudPvminstancesVolumesPutForbidden) GetPayload() *models.Error { @@ -379,11 +388,13 @@ func (o *PcloudPvminstancesVolumesPutNotFound) Code() int { } func (o *PcloudPvminstancesVolumesPutNotFound) Error() string { - return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes/{volume_id}][%d] pcloudPvminstancesVolumesPutNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes/{volume_id}][%d] pcloudPvminstancesVolumesPutNotFound %s", 404, payload) } func (o *PcloudPvminstancesVolumesPutNotFound) String() string { - return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes/{volume_id}][%d] pcloudPvminstancesVolumesPutNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes/{volume_id}][%d] pcloudPvminstancesVolumesPutNotFound %s", 404, payload) } func (o *PcloudPvminstancesVolumesPutNotFound) GetPayload() *models.Error { @@ -447,11 +458,13 @@ func (o *PcloudPvminstancesVolumesPutInternalServerError) Code() int { } func (o *PcloudPvminstancesVolumesPutInternalServerError) Error() string { - return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes/{volume_id}][%d] pcloudPvminstancesVolumesPutInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes/{volume_id}][%d] pcloudPvminstancesVolumesPutInternalServerError %s", 500, payload) } func (o *PcloudPvminstancesVolumesPutInternalServerError) String() string { - return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes/{volume_id}][%d] pcloudPvminstancesVolumesPutInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes/{volume_id}][%d] pcloudPvminstancesVolumesPutInternalServerError %s", 500, payload) } func (o *PcloudPvminstancesVolumesPutInternalServerError) GetPayload() *models.Error { diff --git a/power/client/p_cloud_volumes/pcloud_pvminstances_volumes_setboot_put_responses.go b/power/client/p_cloud_volumes/pcloud_pvminstances_volumes_setboot_put_responses.go index 9f0d836b..f6569fee 100644 --- a/power/client/p_cloud_volumes/pcloud_pvminstances_volumes_setboot_put_responses.go +++ b/power/client/p_cloud_volumes/pcloud_pvminstances_volumes_setboot_put_responses.go @@ -6,6 +6,7 @@ package p_cloud_volumes // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -109,11 +110,13 @@ func (o *PcloudPvminstancesVolumesSetbootPutOK) Code() int { } func (o *PcloudPvminstancesVolumesSetbootPutOK) Error() string { - return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes/{volume_id}/setboot][%d] pcloudPvminstancesVolumesSetbootPutOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes/{volume_id}/setboot][%d] pcloudPvminstancesVolumesSetbootPutOK %s", 200, payload) } func (o *PcloudPvminstancesVolumesSetbootPutOK) String() string { - return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes/{volume_id}/setboot][%d] pcloudPvminstancesVolumesSetbootPutOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes/{volume_id}/setboot][%d] pcloudPvminstancesVolumesSetbootPutOK %s", 200, payload) } func (o *PcloudPvminstancesVolumesSetbootPutOK) GetPayload() models.Object { @@ -175,11 +178,13 @@ func (o *PcloudPvminstancesVolumesSetbootPutBadRequest) Code() int { } func (o *PcloudPvminstancesVolumesSetbootPutBadRequest) Error() string { - return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes/{volume_id}/setboot][%d] pcloudPvminstancesVolumesSetbootPutBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes/{volume_id}/setboot][%d] pcloudPvminstancesVolumesSetbootPutBadRequest %s", 400, payload) } func (o *PcloudPvminstancesVolumesSetbootPutBadRequest) String() string { - return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes/{volume_id}/setboot][%d] pcloudPvminstancesVolumesSetbootPutBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes/{volume_id}/setboot][%d] pcloudPvminstancesVolumesSetbootPutBadRequest %s", 400, payload) } func (o *PcloudPvminstancesVolumesSetbootPutBadRequest) GetPayload() *models.Error { @@ -243,11 +248,13 @@ func (o *PcloudPvminstancesVolumesSetbootPutUnauthorized) Code() int { } func (o *PcloudPvminstancesVolumesSetbootPutUnauthorized) Error() string { - return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes/{volume_id}/setboot][%d] pcloudPvminstancesVolumesSetbootPutUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes/{volume_id}/setboot][%d] pcloudPvminstancesVolumesSetbootPutUnauthorized %s", 401, payload) } func (o *PcloudPvminstancesVolumesSetbootPutUnauthorized) String() string { - return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes/{volume_id}/setboot][%d] pcloudPvminstancesVolumesSetbootPutUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes/{volume_id}/setboot][%d] pcloudPvminstancesVolumesSetbootPutUnauthorized %s", 401, payload) } func (o *PcloudPvminstancesVolumesSetbootPutUnauthorized) GetPayload() *models.Error { @@ -311,11 +318,13 @@ func (o *PcloudPvminstancesVolumesSetbootPutForbidden) Code() int { } func (o *PcloudPvminstancesVolumesSetbootPutForbidden) Error() string { - return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes/{volume_id}/setboot][%d] pcloudPvminstancesVolumesSetbootPutForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes/{volume_id}/setboot][%d] pcloudPvminstancesVolumesSetbootPutForbidden %s", 403, payload) } func (o *PcloudPvminstancesVolumesSetbootPutForbidden) String() string { - return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes/{volume_id}/setboot][%d] pcloudPvminstancesVolumesSetbootPutForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes/{volume_id}/setboot][%d] pcloudPvminstancesVolumesSetbootPutForbidden %s", 403, payload) } func (o *PcloudPvminstancesVolumesSetbootPutForbidden) GetPayload() *models.Error { @@ -379,11 +388,13 @@ func (o *PcloudPvminstancesVolumesSetbootPutNotFound) Code() int { } func (o *PcloudPvminstancesVolumesSetbootPutNotFound) Error() string { - return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes/{volume_id}/setboot][%d] pcloudPvminstancesVolumesSetbootPutNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes/{volume_id}/setboot][%d] pcloudPvminstancesVolumesSetbootPutNotFound %s", 404, payload) } func (o *PcloudPvminstancesVolumesSetbootPutNotFound) String() string { - return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes/{volume_id}/setboot][%d] pcloudPvminstancesVolumesSetbootPutNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes/{volume_id}/setboot][%d] pcloudPvminstancesVolumesSetbootPutNotFound %s", 404, payload) } func (o *PcloudPvminstancesVolumesSetbootPutNotFound) GetPayload() *models.Error { @@ -447,11 +458,13 @@ func (o *PcloudPvminstancesVolumesSetbootPutInternalServerError) Code() int { } func (o *PcloudPvminstancesVolumesSetbootPutInternalServerError) Error() string { - return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes/{volume_id}/setboot][%d] pcloudPvminstancesVolumesSetbootPutInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes/{volume_id}/setboot][%d] pcloudPvminstancesVolumesSetbootPutInternalServerError %s", 500, payload) } func (o *PcloudPvminstancesVolumesSetbootPutInternalServerError) String() string { - return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes/{volume_id}/setboot][%d] pcloudPvminstancesVolumesSetbootPutInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes/{volume_id}/setboot][%d] pcloudPvminstancesVolumesSetbootPutInternalServerError %s", 500, payload) } func (o *PcloudPvminstancesVolumesSetbootPutInternalServerError) GetPayload() *models.Error { diff --git a/power/client/p_cloud_volumes/pcloud_v2_pvminstances_volumes_delete_responses.go b/power/client/p_cloud_volumes/pcloud_v2_pvminstances_volumes_delete_responses.go index 54dca395..21ab2278 100644 --- a/power/client/p_cloud_volumes/pcloud_v2_pvminstances_volumes_delete_responses.go +++ b/power/client/p_cloud_volumes/pcloud_v2_pvminstances_volumes_delete_responses.go @@ -6,6 +6,7 @@ package p_cloud_volumes // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -115,11 +116,13 @@ func (o *PcloudV2PvminstancesVolumesDeleteAccepted) Code() int { } func (o *PcloudV2PvminstancesVolumesDeleteAccepted) Error() string { - return fmt.Sprintf("[DELETE /pcloud/v2/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes][%d] pcloudV2PvminstancesVolumesDeleteAccepted %+v", 202, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v2/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes][%d] pcloudV2PvminstancesVolumesDeleteAccepted %s", 202, payload) } func (o *PcloudV2PvminstancesVolumesDeleteAccepted) String() string { - return fmt.Sprintf("[DELETE /pcloud/v2/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes][%d] pcloudV2PvminstancesVolumesDeleteAccepted %+v", 202, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v2/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes][%d] pcloudV2PvminstancesVolumesDeleteAccepted %s", 202, payload) } func (o *PcloudV2PvminstancesVolumesDeleteAccepted) GetPayload() *models.VolumesDetachmentResponse { @@ -183,11 +186,13 @@ func (o *PcloudV2PvminstancesVolumesDeleteBadRequest) Code() int { } func (o *PcloudV2PvminstancesVolumesDeleteBadRequest) Error() string { - return fmt.Sprintf("[DELETE /pcloud/v2/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes][%d] pcloudV2PvminstancesVolumesDeleteBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v2/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes][%d] pcloudV2PvminstancesVolumesDeleteBadRequest %s", 400, payload) } func (o *PcloudV2PvminstancesVolumesDeleteBadRequest) String() string { - return fmt.Sprintf("[DELETE /pcloud/v2/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes][%d] pcloudV2PvminstancesVolumesDeleteBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v2/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes][%d] pcloudV2PvminstancesVolumesDeleteBadRequest %s", 400, payload) } func (o *PcloudV2PvminstancesVolumesDeleteBadRequest) GetPayload() *models.Error { @@ -251,11 +256,13 @@ func (o *PcloudV2PvminstancesVolumesDeleteUnauthorized) Code() int { } func (o *PcloudV2PvminstancesVolumesDeleteUnauthorized) Error() string { - return fmt.Sprintf("[DELETE /pcloud/v2/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes][%d] pcloudV2PvminstancesVolumesDeleteUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v2/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes][%d] pcloudV2PvminstancesVolumesDeleteUnauthorized %s", 401, payload) } func (o *PcloudV2PvminstancesVolumesDeleteUnauthorized) String() string { - return fmt.Sprintf("[DELETE /pcloud/v2/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes][%d] pcloudV2PvminstancesVolumesDeleteUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v2/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes][%d] pcloudV2PvminstancesVolumesDeleteUnauthorized %s", 401, payload) } func (o *PcloudV2PvminstancesVolumesDeleteUnauthorized) GetPayload() *models.Error { @@ -319,11 +326,13 @@ func (o *PcloudV2PvminstancesVolumesDeleteForbidden) Code() int { } func (o *PcloudV2PvminstancesVolumesDeleteForbidden) Error() string { - return fmt.Sprintf("[DELETE /pcloud/v2/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes][%d] pcloudV2PvminstancesVolumesDeleteForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v2/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes][%d] pcloudV2PvminstancesVolumesDeleteForbidden %s", 403, payload) } func (o *PcloudV2PvminstancesVolumesDeleteForbidden) String() string { - return fmt.Sprintf("[DELETE /pcloud/v2/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes][%d] pcloudV2PvminstancesVolumesDeleteForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v2/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes][%d] pcloudV2PvminstancesVolumesDeleteForbidden %s", 403, payload) } func (o *PcloudV2PvminstancesVolumesDeleteForbidden) GetPayload() *models.Error { @@ -387,11 +396,13 @@ func (o *PcloudV2PvminstancesVolumesDeleteNotFound) Code() int { } func (o *PcloudV2PvminstancesVolumesDeleteNotFound) Error() string { - return fmt.Sprintf("[DELETE /pcloud/v2/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes][%d] pcloudV2PvminstancesVolumesDeleteNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v2/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes][%d] pcloudV2PvminstancesVolumesDeleteNotFound %s", 404, payload) } func (o *PcloudV2PvminstancesVolumesDeleteNotFound) String() string { - return fmt.Sprintf("[DELETE /pcloud/v2/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes][%d] pcloudV2PvminstancesVolumesDeleteNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v2/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes][%d] pcloudV2PvminstancesVolumesDeleteNotFound %s", 404, payload) } func (o *PcloudV2PvminstancesVolumesDeleteNotFound) GetPayload() *models.Error { @@ -455,11 +466,13 @@ func (o *PcloudV2PvminstancesVolumesDeleteConflict) Code() int { } func (o *PcloudV2PvminstancesVolumesDeleteConflict) Error() string { - return fmt.Sprintf("[DELETE /pcloud/v2/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes][%d] pcloudV2PvminstancesVolumesDeleteConflict %+v", 409, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v2/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes][%d] pcloudV2PvminstancesVolumesDeleteConflict %s", 409, payload) } func (o *PcloudV2PvminstancesVolumesDeleteConflict) String() string { - return fmt.Sprintf("[DELETE /pcloud/v2/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes][%d] pcloudV2PvminstancesVolumesDeleteConflict %+v", 409, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v2/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes][%d] pcloudV2PvminstancesVolumesDeleteConflict %s", 409, payload) } func (o *PcloudV2PvminstancesVolumesDeleteConflict) GetPayload() *models.Error { @@ -523,11 +536,13 @@ func (o *PcloudV2PvminstancesVolumesDeleteInternalServerError) Code() int { } func (o *PcloudV2PvminstancesVolumesDeleteInternalServerError) Error() string { - return fmt.Sprintf("[DELETE /pcloud/v2/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes][%d] pcloudV2PvminstancesVolumesDeleteInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v2/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes][%d] pcloudV2PvminstancesVolumesDeleteInternalServerError %s", 500, payload) } func (o *PcloudV2PvminstancesVolumesDeleteInternalServerError) String() string { - return fmt.Sprintf("[DELETE /pcloud/v2/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes][%d] pcloudV2PvminstancesVolumesDeleteInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v2/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes][%d] pcloudV2PvminstancesVolumesDeleteInternalServerError %s", 500, payload) } func (o *PcloudV2PvminstancesVolumesDeleteInternalServerError) GetPayload() *models.Error { diff --git a/power/client/p_cloud_volumes/pcloud_v2_pvminstances_volumes_post_responses.go b/power/client/p_cloud_volumes/pcloud_v2_pvminstances_volumes_post_responses.go index 53e98942..4ead4295 100644 --- a/power/client/p_cloud_volumes/pcloud_v2_pvminstances_volumes_post_responses.go +++ b/power/client/p_cloud_volumes/pcloud_v2_pvminstances_volumes_post_responses.go @@ -6,6 +6,7 @@ package p_cloud_volumes // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -115,11 +116,13 @@ func (o *PcloudV2PvminstancesVolumesPostAccepted) Code() int { } func (o *PcloudV2PvminstancesVolumesPostAccepted) Error() string { - return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes][%d] pcloudV2PvminstancesVolumesPostAccepted %+v", 202, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes][%d] pcloudV2PvminstancesVolumesPostAccepted %s", 202, payload) } func (o *PcloudV2PvminstancesVolumesPostAccepted) String() string { - return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes][%d] pcloudV2PvminstancesVolumesPostAccepted %+v", 202, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes][%d] pcloudV2PvminstancesVolumesPostAccepted %s", 202, payload) } func (o *PcloudV2PvminstancesVolumesPostAccepted) GetPayload() *models.VolumesAttachmentResponse { @@ -183,11 +186,13 @@ func (o *PcloudV2PvminstancesVolumesPostBadRequest) Code() int { } func (o *PcloudV2PvminstancesVolumesPostBadRequest) Error() string { - return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes][%d] pcloudV2PvminstancesVolumesPostBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes][%d] pcloudV2PvminstancesVolumesPostBadRequest %s", 400, payload) } func (o *PcloudV2PvminstancesVolumesPostBadRequest) String() string { - return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes][%d] pcloudV2PvminstancesVolumesPostBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes][%d] pcloudV2PvminstancesVolumesPostBadRequest %s", 400, payload) } func (o *PcloudV2PvminstancesVolumesPostBadRequest) GetPayload() *models.Error { @@ -251,11 +256,13 @@ func (o *PcloudV2PvminstancesVolumesPostUnauthorized) Code() int { } func (o *PcloudV2PvminstancesVolumesPostUnauthorized) Error() string { - return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes][%d] pcloudV2PvminstancesVolumesPostUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes][%d] pcloudV2PvminstancesVolumesPostUnauthorized %s", 401, payload) } func (o *PcloudV2PvminstancesVolumesPostUnauthorized) String() string { - return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes][%d] pcloudV2PvminstancesVolumesPostUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes][%d] pcloudV2PvminstancesVolumesPostUnauthorized %s", 401, payload) } func (o *PcloudV2PvminstancesVolumesPostUnauthorized) GetPayload() *models.Error { @@ -319,11 +326,13 @@ func (o *PcloudV2PvminstancesVolumesPostForbidden) Code() int { } func (o *PcloudV2PvminstancesVolumesPostForbidden) Error() string { - return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes][%d] pcloudV2PvminstancesVolumesPostForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes][%d] pcloudV2PvminstancesVolumesPostForbidden %s", 403, payload) } func (o *PcloudV2PvminstancesVolumesPostForbidden) String() string { - return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes][%d] pcloudV2PvminstancesVolumesPostForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes][%d] pcloudV2PvminstancesVolumesPostForbidden %s", 403, payload) } func (o *PcloudV2PvminstancesVolumesPostForbidden) GetPayload() *models.Error { @@ -387,11 +396,13 @@ func (o *PcloudV2PvminstancesVolumesPostNotFound) Code() int { } func (o *PcloudV2PvminstancesVolumesPostNotFound) Error() string { - return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes][%d] pcloudV2PvminstancesVolumesPostNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes][%d] pcloudV2PvminstancesVolumesPostNotFound %s", 404, payload) } func (o *PcloudV2PvminstancesVolumesPostNotFound) String() string { - return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes][%d] pcloudV2PvminstancesVolumesPostNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes][%d] pcloudV2PvminstancesVolumesPostNotFound %s", 404, payload) } func (o *PcloudV2PvminstancesVolumesPostNotFound) GetPayload() *models.Error { @@ -455,11 +466,13 @@ func (o *PcloudV2PvminstancesVolumesPostConflict) Code() int { } func (o *PcloudV2PvminstancesVolumesPostConflict) Error() string { - return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes][%d] pcloudV2PvminstancesVolumesPostConflict %+v", 409, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes][%d] pcloudV2PvminstancesVolumesPostConflict %s", 409, payload) } func (o *PcloudV2PvminstancesVolumesPostConflict) String() string { - return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes][%d] pcloudV2PvminstancesVolumesPostConflict %+v", 409, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes][%d] pcloudV2PvminstancesVolumesPostConflict %s", 409, payload) } func (o *PcloudV2PvminstancesVolumesPostConflict) GetPayload() *models.Error { @@ -523,11 +536,13 @@ func (o *PcloudV2PvminstancesVolumesPostInternalServerError) Code() int { } func (o *PcloudV2PvminstancesVolumesPostInternalServerError) Error() string { - return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes][%d] pcloudV2PvminstancesVolumesPostInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes][%d] pcloudV2PvminstancesVolumesPostInternalServerError %s", 500, payload) } func (o *PcloudV2PvminstancesVolumesPostInternalServerError) String() string { - return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes][%d] pcloudV2PvminstancesVolumesPostInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes][%d] pcloudV2PvminstancesVolumesPostInternalServerError %s", 500, payload) } func (o *PcloudV2PvminstancesVolumesPostInternalServerError) GetPayload() *models.Error { diff --git a/power/client/p_cloud_volumes/pcloud_v2_volumes_clone_post_responses.go b/power/client/p_cloud_volumes/pcloud_v2_volumes_clone_post_responses.go index 3fe2f5ec..c5622485 100644 --- a/power/client/p_cloud_volumes/pcloud_v2_volumes_clone_post_responses.go +++ b/power/client/p_cloud_volumes/pcloud_v2_volumes_clone_post_responses.go @@ -6,6 +6,7 @@ package p_cloud_volumes // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -109,11 +110,13 @@ func (o *PcloudV2VolumesClonePostAccepted) Code() int { } func (o *PcloudV2VolumesClonePostAccepted) Error() string { - return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes/clone][%d] pcloudV2VolumesClonePostAccepted %+v", 202, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes/clone][%d] pcloudV2VolumesClonePostAccepted %s", 202, payload) } func (o *PcloudV2VolumesClonePostAccepted) String() string { - return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes/clone][%d] pcloudV2VolumesClonePostAccepted %+v", 202, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes/clone][%d] pcloudV2VolumesClonePostAccepted %s", 202, payload) } func (o *PcloudV2VolumesClonePostAccepted) GetPayload() *models.CloneTaskReference { @@ -177,11 +180,13 @@ func (o *PcloudV2VolumesClonePostBadRequest) Code() int { } func (o *PcloudV2VolumesClonePostBadRequest) Error() string { - return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes/clone][%d] pcloudV2VolumesClonePostBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes/clone][%d] pcloudV2VolumesClonePostBadRequest %s", 400, payload) } func (o *PcloudV2VolumesClonePostBadRequest) String() string { - return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes/clone][%d] pcloudV2VolumesClonePostBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes/clone][%d] pcloudV2VolumesClonePostBadRequest %s", 400, payload) } func (o *PcloudV2VolumesClonePostBadRequest) GetPayload() *models.Error { @@ -245,11 +250,13 @@ func (o *PcloudV2VolumesClonePostUnauthorized) Code() int { } func (o *PcloudV2VolumesClonePostUnauthorized) Error() string { - return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes/clone][%d] pcloudV2VolumesClonePostUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes/clone][%d] pcloudV2VolumesClonePostUnauthorized %s", 401, payload) } func (o *PcloudV2VolumesClonePostUnauthorized) String() string { - return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes/clone][%d] pcloudV2VolumesClonePostUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes/clone][%d] pcloudV2VolumesClonePostUnauthorized %s", 401, payload) } func (o *PcloudV2VolumesClonePostUnauthorized) GetPayload() *models.Error { @@ -313,11 +320,13 @@ func (o *PcloudV2VolumesClonePostForbidden) Code() int { } func (o *PcloudV2VolumesClonePostForbidden) Error() string { - return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes/clone][%d] pcloudV2VolumesClonePostForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes/clone][%d] pcloudV2VolumesClonePostForbidden %s", 403, payload) } func (o *PcloudV2VolumesClonePostForbidden) String() string { - return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes/clone][%d] pcloudV2VolumesClonePostForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes/clone][%d] pcloudV2VolumesClonePostForbidden %s", 403, payload) } func (o *PcloudV2VolumesClonePostForbidden) GetPayload() *models.Error { @@ -381,11 +390,13 @@ func (o *PcloudV2VolumesClonePostNotFound) Code() int { } func (o *PcloudV2VolumesClonePostNotFound) Error() string { - return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes/clone][%d] pcloudV2VolumesClonePostNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes/clone][%d] pcloudV2VolumesClonePostNotFound %s", 404, payload) } func (o *PcloudV2VolumesClonePostNotFound) String() string { - return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes/clone][%d] pcloudV2VolumesClonePostNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes/clone][%d] pcloudV2VolumesClonePostNotFound %s", 404, payload) } func (o *PcloudV2VolumesClonePostNotFound) GetPayload() *models.Error { @@ -449,11 +460,13 @@ func (o *PcloudV2VolumesClonePostInternalServerError) Code() int { } func (o *PcloudV2VolumesClonePostInternalServerError) Error() string { - return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes/clone][%d] pcloudV2VolumesClonePostInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes/clone][%d] pcloudV2VolumesClonePostInternalServerError %s", 500, payload) } func (o *PcloudV2VolumesClonePostInternalServerError) String() string { - return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes/clone][%d] pcloudV2VolumesClonePostInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes/clone][%d] pcloudV2VolumesClonePostInternalServerError %s", 500, payload) } func (o *PcloudV2VolumesClonePostInternalServerError) GetPayload() *models.Error { diff --git a/power/client/p_cloud_volumes/pcloud_v2_volumes_clonetasks_get_responses.go b/power/client/p_cloud_volumes/pcloud_v2_volumes_clonetasks_get_responses.go index 3f308b61..1efc53ca 100644 --- a/power/client/p_cloud_volumes/pcloud_v2_volumes_clonetasks_get_responses.go +++ b/power/client/p_cloud_volumes/pcloud_v2_volumes_clonetasks_get_responses.go @@ -6,6 +6,7 @@ package p_cloud_volumes // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -115,11 +116,13 @@ func (o *PcloudV2VolumesClonetasksGetOK) Code() int { } func (o *PcloudV2VolumesClonetasksGetOK) Error() string { - return fmt.Sprintf("[GET /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes/clone-tasks/{clone_task_id}][%d] pcloudV2VolumesClonetasksGetOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes/clone-tasks/{clone_task_id}][%d] pcloudV2VolumesClonetasksGetOK %s", 200, payload) } func (o *PcloudV2VolumesClonetasksGetOK) String() string { - return fmt.Sprintf("[GET /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes/clone-tasks/{clone_task_id}][%d] pcloudV2VolumesClonetasksGetOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes/clone-tasks/{clone_task_id}][%d] pcloudV2VolumesClonetasksGetOK %s", 200, payload) } func (o *PcloudV2VolumesClonetasksGetOK) GetPayload() *models.CloneTaskStatus { @@ -183,11 +186,13 @@ func (o *PcloudV2VolumesClonetasksGetBadRequest) Code() int { } func (o *PcloudV2VolumesClonetasksGetBadRequest) Error() string { - return fmt.Sprintf("[GET /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes/clone-tasks/{clone_task_id}][%d] pcloudV2VolumesClonetasksGetBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes/clone-tasks/{clone_task_id}][%d] pcloudV2VolumesClonetasksGetBadRequest %s", 400, payload) } func (o *PcloudV2VolumesClonetasksGetBadRequest) String() string { - return fmt.Sprintf("[GET /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes/clone-tasks/{clone_task_id}][%d] pcloudV2VolumesClonetasksGetBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes/clone-tasks/{clone_task_id}][%d] pcloudV2VolumesClonetasksGetBadRequest %s", 400, payload) } func (o *PcloudV2VolumesClonetasksGetBadRequest) GetPayload() *models.Error { @@ -251,11 +256,13 @@ func (o *PcloudV2VolumesClonetasksGetUnauthorized) Code() int { } func (o *PcloudV2VolumesClonetasksGetUnauthorized) Error() string { - return fmt.Sprintf("[GET /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes/clone-tasks/{clone_task_id}][%d] pcloudV2VolumesClonetasksGetUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes/clone-tasks/{clone_task_id}][%d] pcloudV2VolumesClonetasksGetUnauthorized %s", 401, payload) } func (o *PcloudV2VolumesClonetasksGetUnauthorized) String() string { - return fmt.Sprintf("[GET /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes/clone-tasks/{clone_task_id}][%d] pcloudV2VolumesClonetasksGetUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes/clone-tasks/{clone_task_id}][%d] pcloudV2VolumesClonetasksGetUnauthorized %s", 401, payload) } func (o *PcloudV2VolumesClonetasksGetUnauthorized) GetPayload() *models.Error { @@ -319,11 +326,13 @@ func (o *PcloudV2VolumesClonetasksGetForbidden) Code() int { } func (o *PcloudV2VolumesClonetasksGetForbidden) Error() string { - return fmt.Sprintf("[GET /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes/clone-tasks/{clone_task_id}][%d] pcloudV2VolumesClonetasksGetForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes/clone-tasks/{clone_task_id}][%d] pcloudV2VolumesClonetasksGetForbidden %s", 403, payload) } func (o *PcloudV2VolumesClonetasksGetForbidden) String() string { - return fmt.Sprintf("[GET /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes/clone-tasks/{clone_task_id}][%d] pcloudV2VolumesClonetasksGetForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes/clone-tasks/{clone_task_id}][%d] pcloudV2VolumesClonetasksGetForbidden %s", 403, payload) } func (o *PcloudV2VolumesClonetasksGetForbidden) GetPayload() *models.Error { @@ -387,11 +396,13 @@ func (o *PcloudV2VolumesClonetasksGetNotFound) Code() int { } func (o *PcloudV2VolumesClonetasksGetNotFound) Error() string { - return fmt.Sprintf("[GET /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes/clone-tasks/{clone_task_id}][%d] pcloudV2VolumesClonetasksGetNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes/clone-tasks/{clone_task_id}][%d] pcloudV2VolumesClonetasksGetNotFound %s", 404, payload) } func (o *PcloudV2VolumesClonetasksGetNotFound) String() string { - return fmt.Sprintf("[GET /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes/clone-tasks/{clone_task_id}][%d] pcloudV2VolumesClonetasksGetNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes/clone-tasks/{clone_task_id}][%d] pcloudV2VolumesClonetasksGetNotFound %s", 404, payload) } func (o *PcloudV2VolumesClonetasksGetNotFound) GetPayload() *models.Error { @@ -455,11 +466,13 @@ func (o *PcloudV2VolumesClonetasksGetConflict) Code() int { } func (o *PcloudV2VolumesClonetasksGetConflict) Error() string { - return fmt.Sprintf("[GET /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes/clone-tasks/{clone_task_id}][%d] pcloudV2VolumesClonetasksGetConflict %+v", 409, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes/clone-tasks/{clone_task_id}][%d] pcloudV2VolumesClonetasksGetConflict %s", 409, payload) } func (o *PcloudV2VolumesClonetasksGetConflict) String() string { - return fmt.Sprintf("[GET /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes/clone-tasks/{clone_task_id}][%d] pcloudV2VolumesClonetasksGetConflict %+v", 409, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes/clone-tasks/{clone_task_id}][%d] pcloudV2VolumesClonetasksGetConflict %s", 409, payload) } func (o *PcloudV2VolumesClonetasksGetConflict) GetPayload() *models.Error { @@ -523,11 +536,13 @@ func (o *PcloudV2VolumesClonetasksGetInternalServerError) Code() int { } func (o *PcloudV2VolumesClonetasksGetInternalServerError) Error() string { - return fmt.Sprintf("[GET /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes/clone-tasks/{clone_task_id}][%d] pcloudV2VolumesClonetasksGetInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes/clone-tasks/{clone_task_id}][%d] pcloudV2VolumesClonetasksGetInternalServerError %s", 500, payload) } func (o *PcloudV2VolumesClonetasksGetInternalServerError) String() string { - return fmt.Sprintf("[GET /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes/clone-tasks/{clone_task_id}][%d] pcloudV2VolumesClonetasksGetInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes/clone-tasks/{clone_task_id}][%d] pcloudV2VolumesClonetasksGetInternalServerError %s", 500, payload) } func (o *PcloudV2VolumesClonetasksGetInternalServerError) GetPayload() *models.Error { diff --git a/power/client/p_cloud_volumes/pcloud_v2_volumes_delete_responses.go b/power/client/p_cloud_volumes/pcloud_v2_volumes_delete_responses.go index 927d2514..822c9e95 100644 --- a/power/client/p_cloud_volumes/pcloud_v2_volumes_delete_responses.go +++ b/power/client/p_cloud_volumes/pcloud_v2_volumes_delete_responses.go @@ -6,6 +6,7 @@ package p_cloud_volumes // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -121,11 +122,13 @@ func (o *PcloudV2VolumesDeleteAccepted) Code() int { } func (o *PcloudV2VolumesDeleteAccepted) Error() string { - return fmt.Sprintf("[DELETE /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes][%d] pcloudV2VolumesDeleteAccepted %+v", 202, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes][%d] pcloudV2VolumesDeleteAccepted %s", 202, payload) } func (o *PcloudV2VolumesDeleteAccepted) String() string { - return fmt.Sprintf("[DELETE /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes][%d] pcloudV2VolumesDeleteAccepted %+v", 202, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes][%d] pcloudV2VolumesDeleteAccepted %s", 202, payload) } func (o *PcloudV2VolumesDeleteAccepted) GetPayload() *models.VolumesDeleteResponse { @@ -189,11 +192,13 @@ func (o *PcloudV2VolumesDeletePartialContent) Code() int { } func (o *PcloudV2VolumesDeletePartialContent) Error() string { - return fmt.Sprintf("[DELETE /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes][%d] pcloudV2VolumesDeletePartialContent %+v", 206, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes][%d] pcloudV2VolumesDeletePartialContent %s", 206, payload) } func (o *PcloudV2VolumesDeletePartialContent) String() string { - return fmt.Sprintf("[DELETE /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes][%d] pcloudV2VolumesDeletePartialContent %+v", 206, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes][%d] pcloudV2VolumesDeletePartialContent %s", 206, payload) } func (o *PcloudV2VolumesDeletePartialContent) GetPayload() *models.VolumesDeleteResponse { @@ -257,11 +262,13 @@ func (o *PcloudV2VolumesDeleteBadRequest) Code() int { } func (o *PcloudV2VolumesDeleteBadRequest) Error() string { - return fmt.Sprintf("[DELETE /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes][%d] pcloudV2VolumesDeleteBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes][%d] pcloudV2VolumesDeleteBadRequest %s", 400, payload) } func (o *PcloudV2VolumesDeleteBadRequest) String() string { - return fmt.Sprintf("[DELETE /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes][%d] pcloudV2VolumesDeleteBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes][%d] pcloudV2VolumesDeleteBadRequest %s", 400, payload) } func (o *PcloudV2VolumesDeleteBadRequest) GetPayload() *models.Error { @@ -325,11 +332,13 @@ func (o *PcloudV2VolumesDeleteUnauthorized) Code() int { } func (o *PcloudV2VolumesDeleteUnauthorized) Error() string { - return fmt.Sprintf("[DELETE /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes][%d] pcloudV2VolumesDeleteUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes][%d] pcloudV2VolumesDeleteUnauthorized %s", 401, payload) } func (o *PcloudV2VolumesDeleteUnauthorized) String() string { - return fmt.Sprintf("[DELETE /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes][%d] pcloudV2VolumesDeleteUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes][%d] pcloudV2VolumesDeleteUnauthorized %s", 401, payload) } func (o *PcloudV2VolumesDeleteUnauthorized) GetPayload() *models.Error { @@ -393,11 +402,13 @@ func (o *PcloudV2VolumesDeleteNotFound) Code() int { } func (o *PcloudV2VolumesDeleteNotFound) Error() string { - return fmt.Sprintf("[DELETE /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes][%d] pcloudV2VolumesDeleteNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes][%d] pcloudV2VolumesDeleteNotFound %s", 404, payload) } func (o *PcloudV2VolumesDeleteNotFound) String() string { - return fmt.Sprintf("[DELETE /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes][%d] pcloudV2VolumesDeleteNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes][%d] pcloudV2VolumesDeleteNotFound %s", 404, payload) } func (o *PcloudV2VolumesDeleteNotFound) GetPayload() *models.Error { @@ -461,11 +472,13 @@ func (o *PcloudV2VolumesDeleteRequestTimeout) Code() int { } func (o *PcloudV2VolumesDeleteRequestTimeout) Error() string { - return fmt.Sprintf("[DELETE /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes][%d] pcloudV2VolumesDeleteRequestTimeout %+v", 408, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes][%d] pcloudV2VolumesDeleteRequestTimeout %s", 408, payload) } func (o *PcloudV2VolumesDeleteRequestTimeout) String() string { - return fmt.Sprintf("[DELETE /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes][%d] pcloudV2VolumesDeleteRequestTimeout %+v", 408, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes][%d] pcloudV2VolumesDeleteRequestTimeout %s", 408, payload) } func (o *PcloudV2VolumesDeleteRequestTimeout) GetPayload() *models.Error { @@ -529,11 +542,13 @@ func (o *PcloudV2VolumesDeleteTooManyRequests) Code() int { } func (o *PcloudV2VolumesDeleteTooManyRequests) Error() string { - return fmt.Sprintf("[DELETE /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes][%d] pcloudV2VolumesDeleteTooManyRequests %+v", 429, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes][%d] pcloudV2VolumesDeleteTooManyRequests %s", 429, payload) } func (o *PcloudV2VolumesDeleteTooManyRequests) String() string { - return fmt.Sprintf("[DELETE /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes][%d] pcloudV2VolumesDeleteTooManyRequests %+v", 429, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes][%d] pcloudV2VolumesDeleteTooManyRequests %s", 429, payload) } func (o *PcloudV2VolumesDeleteTooManyRequests) GetPayload() *models.Error { @@ -597,11 +612,13 @@ func (o *PcloudV2VolumesDeleteInternalServerError) Code() int { } func (o *PcloudV2VolumesDeleteInternalServerError) Error() string { - return fmt.Sprintf("[DELETE /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes][%d] pcloudV2VolumesDeleteInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes][%d] pcloudV2VolumesDeleteInternalServerError %s", 500, payload) } func (o *PcloudV2VolumesDeleteInternalServerError) String() string { - return fmt.Sprintf("[DELETE /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes][%d] pcloudV2VolumesDeleteInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes][%d] pcloudV2VolumesDeleteInternalServerError %s", 500, payload) } func (o *PcloudV2VolumesDeleteInternalServerError) GetPayload() *models.Error { diff --git a/power/client/p_cloud_volumes/pcloud_v2_volumes_post_responses.go b/power/client/p_cloud_volumes/pcloud_v2_volumes_post_responses.go index 55821f6b..6febceb2 100644 --- a/power/client/p_cloud_volumes/pcloud_v2_volumes_post_responses.go +++ b/power/client/p_cloud_volumes/pcloud_v2_volumes_post_responses.go @@ -6,6 +6,7 @@ package p_cloud_volumes // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -121,11 +122,13 @@ func (o *PcloudV2VolumesPostCreated) Code() int { } func (o *PcloudV2VolumesPostCreated) Error() string { - return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes][%d] pcloudV2VolumesPostCreated %+v", 201, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes][%d] pcloudV2VolumesPostCreated %s", 201, payload) } func (o *PcloudV2VolumesPostCreated) String() string { - return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes][%d] pcloudV2VolumesPostCreated %+v", 201, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes][%d] pcloudV2VolumesPostCreated %s", 201, payload) } func (o *PcloudV2VolumesPostCreated) GetPayload() *models.Volumes { @@ -189,11 +192,13 @@ func (o *PcloudV2VolumesPostBadRequest) Code() int { } func (o *PcloudV2VolumesPostBadRequest) Error() string { - return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes][%d] pcloudV2VolumesPostBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes][%d] pcloudV2VolumesPostBadRequest %s", 400, payload) } func (o *PcloudV2VolumesPostBadRequest) String() string { - return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes][%d] pcloudV2VolumesPostBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes][%d] pcloudV2VolumesPostBadRequest %s", 400, payload) } func (o *PcloudV2VolumesPostBadRequest) GetPayload() *models.Error { @@ -257,11 +262,13 @@ func (o *PcloudV2VolumesPostUnauthorized) Code() int { } func (o *PcloudV2VolumesPostUnauthorized) Error() string { - return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes][%d] pcloudV2VolumesPostUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes][%d] pcloudV2VolumesPostUnauthorized %s", 401, payload) } func (o *PcloudV2VolumesPostUnauthorized) String() string { - return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes][%d] pcloudV2VolumesPostUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes][%d] pcloudV2VolumesPostUnauthorized %s", 401, payload) } func (o *PcloudV2VolumesPostUnauthorized) GetPayload() *models.Error { @@ -325,11 +332,13 @@ func (o *PcloudV2VolumesPostForbidden) Code() int { } func (o *PcloudV2VolumesPostForbidden) Error() string { - return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes][%d] pcloudV2VolumesPostForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes][%d] pcloudV2VolumesPostForbidden %s", 403, payload) } func (o *PcloudV2VolumesPostForbidden) String() string { - return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes][%d] pcloudV2VolumesPostForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes][%d] pcloudV2VolumesPostForbidden %s", 403, payload) } func (o *PcloudV2VolumesPostForbidden) GetPayload() *models.Error { @@ -393,11 +402,13 @@ func (o *PcloudV2VolumesPostNotFound) Code() int { } func (o *PcloudV2VolumesPostNotFound) Error() string { - return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes][%d] pcloudV2VolumesPostNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes][%d] pcloudV2VolumesPostNotFound %s", 404, payload) } func (o *PcloudV2VolumesPostNotFound) String() string { - return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes][%d] pcloudV2VolumesPostNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes][%d] pcloudV2VolumesPostNotFound %s", 404, payload) } func (o *PcloudV2VolumesPostNotFound) GetPayload() *models.Error { @@ -461,11 +472,13 @@ func (o *PcloudV2VolumesPostConflict) Code() int { } func (o *PcloudV2VolumesPostConflict) Error() string { - return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes][%d] pcloudV2VolumesPostConflict %+v", 409, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes][%d] pcloudV2VolumesPostConflict %s", 409, payload) } func (o *PcloudV2VolumesPostConflict) String() string { - return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes][%d] pcloudV2VolumesPostConflict %+v", 409, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes][%d] pcloudV2VolumesPostConflict %s", 409, payload) } func (o *PcloudV2VolumesPostConflict) GetPayload() *models.Error { @@ -529,11 +542,13 @@ func (o *PcloudV2VolumesPostUnprocessableEntity) Code() int { } func (o *PcloudV2VolumesPostUnprocessableEntity) Error() string { - return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes][%d] pcloudV2VolumesPostUnprocessableEntity %+v", 422, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes][%d] pcloudV2VolumesPostUnprocessableEntity %s", 422, payload) } func (o *PcloudV2VolumesPostUnprocessableEntity) String() string { - return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes][%d] pcloudV2VolumesPostUnprocessableEntity %+v", 422, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes][%d] pcloudV2VolumesPostUnprocessableEntity %s", 422, payload) } func (o *PcloudV2VolumesPostUnprocessableEntity) GetPayload() *models.Error { @@ -597,11 +612,13 @@ func (o *PcloudV2VolumesPostInternalServerError) Code() int { } func (o *PcloudV2VolumesPostInternalServerError) Error() string { - return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes][%d] pcloudV2VolumesPostInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes][%d] pcloudV2VolumesPostInternalServerError %s", 500, payload) } func (o *PcloudV2VolumesPostInternalServerError) String() string { - return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes][%d] pcloudV2VolumesPostInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes][%d] pcloudV2VolumesPostInternalServerError %s", 500, payload) } func (o *PcloudV2VolumesPostInternalServerError) GetPayload() *models.Error { diff --git a/power/client/p_cloud_volumes/pcloud_v2_volumesclone_cancel_post_responses.go b/power/client/p_cloud_volumes/pcloud_v2_volumesclone_cancel_post_responses.go index f02784f0..0ed0b806 100644 --- a/power/client/p_cloud_volumes/pcloud_v2_volumesclone_cancel_post_responses.go +++ b/power/client/p_cloud_volumes/pcloud_v2_volumesclone_cancel_post_responses.go @@ -6,6 +6,7 @@ package p_cloud_volumes // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -109,11 +110,13 @@ func (o *PcloudV2VolumescloneCancelPostAccepted) Code() int { } func (o *PcloudV2VolumescloneCancelPostAccepted) Error() string { - return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone/{volumes_clone_id}/cancel][%d] pcloudV2VolumescloneCancelPostAccepted %+v", 202, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone/{volumes_clone_id}/cancel][%d] pcloudV2VolumescloneCancelPostAccepted %s", 202, payload) } func (o *PcloudV2VolumescloneCancelPostAccepted) String() string { - return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone/{volumes_clone_id}/cancel][%d] pcloudV2VolumescloneCancelPostAccepted %+v", 202, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone/{volumes_clone_id}/cancel][%d] pcloudV2VolumescloneCancelPostAccepted %s", 202, payload) } func (o *PcloudV2VolumescloneCancelPostAccepted) GetPayload() *models.VolumesClone { @@ -177,11 +180,13 @@ func (o *PcloudV2VolumescloneCancelPostBadRequest) Code() int { } func (o *PcloudV2VolumescloneCancelPostBadRequest) Error() string { - return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone/{volumes_clone_id}/cancel][%d] pcloudV2VolumescloneCancelPostBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone/{volumes_clone_id}/cancel][%d] pcloudV2VolumescloneCancelPostBadRequest %s", 400, payload) } func (o *PcloudV2VolumescloneCancelPostBadRequest) String() string { - return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone/{volumes_clone_id}/cancel][%d] pcloudV2VolumescloneCancelPostBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone/{volumes_clone_id}/cancel][%d] pcloudV2VolumescloneCancelPostBadRequest %s", 400, payload) } func (o *PcloudV2VolumescloneCancelPostBadRequest) GetPayload() *models.Error { @@ -245,11 +250,13 @@ func (o *PcloudV2VolumescloneCancelPostUnauthorized) Code() int { } func (o *PcloudV2VolumescloneCancelPostUnauthorized) Error() string { - return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone/{volumes_clone_id}/cancel][%d] pcloudV2VolumescloneCancelPostUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone/{volumes_clone_id}/cancel][%d] pcloudV2VolumescloneCancelPostUnauthorized %s", 401, payload) } func (o *PcloudV2VolumescloneCancelPostUnauthorized) String() string { - return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone/{volumes_clone_id}/cancel][%d] pcloudV2VolumescloneCancelPostUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone/{volumes_clone_id}/cancel][%d] pcloudV2VolumescloneCancelPostUnauthorized %s", 401, payload) } func (o *PcloudV2VolumescloneCancelPostUnauthorized) GetPayload() *models.Error { @@ -313,11 +320,13 @@ func (o *PcloudV2VolumescloneCancelPostForbidden) Code() int { } func (o *PcloudV2VolumescloneCancelPostForbidden) Error() string { - return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone/{volumes_clone_id}/cancel][%d] pcloudV2VolumescloneCancelPostForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone/{volumes_clone_id}/cancel][%d] pcloudV2VolumescloneCancelPostForbidden %s", 403, payload) } func (o *PcloudV2VolumescloneCancelPostForbidden) String() string { - return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone/{volumes_clone_id}/cancel][%d] pcloudV2VolumescloneCancelPostForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone/{volumes_clone_id}/cancel][%d] pcloudV2VolumescloneCancelPostForbidden %s", 403, payload) } func (o *PcloudV2VolumescloneCancelPostForbidden) GetPayload() *models.Error { @@ -381,11 +390,13 @@ func (o *PcloudV2VolumescloneCancelPostNotFound) Code() int { } func (o *PcloudV2VolumescloneCancelPostNotFound) Error() string { - return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone/{volumes_clone_id}/cancel][%d] pcloudV2VolumescloneCancelPostNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone/{volumes_clone_id}/cancel][%d] pcloudV2VolumescloneCancelPostNotFound %s", 404, payload) } func (o *PcloudV2VolumescloneCancelPostNotFound) String() string { - return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone/{volumes_clone_id}/cancel][%d] pcloudV2VolumescloneCancelPostNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone/{volumes_clone_id}/cancel][%d] pcloudV2VolumescloneCancelPostNotFound %s", 404, payload) } func (o *PcloudV2VolumescloneCancelPostNotFound) GetPayload() *models.Error { @@ -449,11 +460,13 @@ func (o *PcloudV2VolumescloneCancelPostInternalServerError) Code() int { } func (o *PcloudV2VolumescloneCancelPostInternalServerError) Error() string { - return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone/{volumes_clone_id}/cancel][%d] pcloudV2VolumescloneCancelPostInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone/{volumes_clone_id}/cancel][%d] pcloudV2VolumescloneCancelPostInternalServerError %s", 500, payload) } func (o *PcloudV2VolumescloneCancelPostInternalServerError) String() string { - return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone/{volumes_clone_id}/cancel][%d] pcloudV2VolumescloneCancelPostInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone/{volumes_clone_id}/cancel][%d] pcloudV2VolumescloneCancelPostInternalServerError %s", 500, payload) } func (o *PcloudV2VolumescloneCancelPostInternalServerError) GetPayload() *models.Error { diff --git a/power/client/p_cloud_volumes/pcloud_v2_volumesclone_delete_responses.go b/power/client/p_cloud_volumes/pcloud_v2_volumesclone_delete_responses.go index 70e6f6ce..b5ca513a 100644 --- a/power/client/p_cloud_volumes/pcloud_v2_volumesclone_delete_responses.go +++ b/power/client/p_cloud_volumes/pcloud_v2_volumesclone_delete_responses.go @@ -6,6 +6,7 @@ package p_cloud_volumes // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -109,11 +110,13 @@ func (o *PcloudV2VolumescloneDeleteOK) Code() int { } func (o *PcloudV2VolumescloneDeleteOK) Error() string { - return fmt.Sprintf("[DELETE /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone/{volumes_clone_id}][%d] pcloudV2VolumescloneDeleteOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone/{volumes_clone_id}][%d] pcloudV2VolumescloneDeleteOK %s", 200, payload) } func (o *PcloudV2VolumescloneDeleteOK) String() string { - return fmt.Sprintf("[DELETE /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone/{volumes_clone_id}][%d] pcloudV2VolumescloneDeleteOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone/{volumes_clone_id}][%d] pcloudV2VolumescloneDeleteOK %s", 200, payload) } func (o *PcloudV2VolumescloneDeleteOK) GetPayload() models.Object { @@ -175,11 +178,13 @@ func (o *PcloudV2VolumescloneDeleteBadRequest) Code() int { } func (o *PcloudV2VolumescloneDeleteBadRequest) Error() string { - return fmt.Sprintf("[DELETE /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone/{volumes_clone_id}][%d] pcloudV2VolumescloneDeleteBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone/{volumes_clone_id}][%d] pcloudV2VolumescloneDeleteBadRequest %s", 400, payload) } func (o *PcloudV2VolumescloneDeleteBadRequest) String() string { - return fmt.Sprintf("[DELETE /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone/{volumes_clone_id}][%d] pcloudV2VolumescloneDeleteBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone/{volumes_clone_id}][%d] pcloudV2VolumescloneDeleteBadRequest %s", 400, payload) } func (o *PcloudV2VolumescloneDeleteBadRequest) GetPayload() *models.Error { @@ -243,11 +248,13 @@ func (o *PcloudV2VolumescloneDeleteUnauthorized) Code() int { } func (o *PcloudV2VolumescloneDeleteUnauthorized) Error() string { - return fmt.Sprintf("[DELETE /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone/{volumes_clone_id}][%d] pcloudV2VolumescloneDeleteUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone/{volumes_clone_id}][%d] pcloudV2VolumescloneDeleteUnauthorized %s", 401, payload) } func (o *PcloudV2VolumescloneDeleteUnauthorized) String() string { - return fmt.Sprintf("[DELETE /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone/{volumes_clone_id}][%d] pcloudV2VolumescloneDeleteUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone/{volumes_clone_id}][%d] pcloudV2VolumescloneDeleteUnauthorized %s", 401, payload) } func (o *PcloudV2VolumescloneDeleteUnauthorized) GetPayload() *models.Error { @@ -311,11 +318,13 @@ func (o *PcloudV2VolumescloneDeleteForbidden) Code() int { } func (o *PcloudV2VolumescloneDeleteForbidden) Error() string { - return fmt.Sprintf("[DELETE /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone/{volumes_clone_id}][%d] pcloudV2VolumescloneDeleteForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone/{volumes_clone_id}][%d] pcloudV2VolumescloneDeleteForbidden %s", 403, payload) } func (o *PcloudV2VolumescloneDeleteForbidden) String() string { - return fmt.Sprintf("[DELETE /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone/{volumes_clone_id}][%d] pcloudV2VolumescloneDeleteForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone/{volumes_clone_id}][%d] pcloudV2VolumescloneDeleteForbidden %s", 403, payload) } func (o *PcloudV2VolumescloneDeleteForbidden) GetPayload() *models.Error { @@ -379,11 +388,13 @@ func (o *PcloudV2VolumescloneDeleteNotFound) Code() int { } func (o *PcloudV2VolumescloneDeleteNotFound) Error() string { - return fmt.Sprintf("[DELETE /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone/{volumes_clone_id}][%d] pcloudV2VolumescloneDeleteNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone/{volumes_clone_id}][%d] pcloudV2VolumescloneDeleteNotFound %s", 404, payload) } func (o *PcloudV2VolumescloneDeleteNotFound) String() string { - return fmt.Sprintf("[DELETE /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone/{volumes_clone_id}][%d] pcloudV2VolumescloneDeleteNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone/{volumes_clone_id}][%d] pcloudV2VolumescloneDeleteNotFound %s", 404, payload) } func (o *PcloudV2VolumescloneDeleteNotFound) GetPayload() *models.Error { @@ -447,11 +458,13 @@ func (o *PcloudV2VolumescloneDeleteInternalServerError) Code() int { } func (o *PcloudV2VolumescloneDeleteInternalServerError) Error() string { - return fmt.Sprintf("[DELETE /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone/{volumes_clone_id}][%d] pcloudV2VolumescloneDeleteInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone/{volumes_clone_id}][%d] pcloudV2VolumescloneDeleteInternalServerError %s", 500, payload) } func (o *PcloudV2VolumescloneDeleteInternalServerError) String() string { - return fmt.Sprintf("[DELETE /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone/{volumes_clone_id}][%d] pcloudV2VolumescloneDeleteInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone/{volumes_clone_id}][%d] pcloudV2VolumescloneDeleteInternalServerError %s", 500, payload) } func (o *PcloudV2VolumescloneDeleteInternalServerError) GetPayload() *models.Error { diff --git a/power/client/p_cloud_volumes/pcloud_v2_volumesclone_execute_post_responses.go b/power/client/p_cloud_volumes/pcloud_v2_volumesclone_execute_post_responses.go index 388a45b4..0d09798c 100644 --- a/power/client/p_cloud_volumes/pcloud_v2_volumesclone_execute_post_responses.go +++ b/power/client/p_cloud_volumes/pcloud_v2_volumesclone_execute_post_responses.go @@ -6,6 +6,7 @@ package p_cloud_volumes // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -109,11 +110,13 @@ func (o *PcloudV2VolumescloneExecutePostAccepted) Code() int { } func (o *PcloudV2VolumescloneExecutePostAccepted) Error() string { - return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone/{volumes_clone_id}/execute][%d] pcloudV2VolumescloneExecutePostAccepted %+v", 202, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone/{volumes_clone_id}/execute][%d] pcloudV2VolumescloneExecutePostAccepted %s", 202, payload) } func (o *PcloudV2VolumescloneExecutePostAccepted) String() string { - return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone/{volumes_clone_id}/execute][%d] pcloudV2VolumescloneExecutePostAccepted %+v", 202, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone/{volumes_clone_id}/execute][%d] pcloudV2VolumescloneExecutePostAccepted %s", 202, payload) } func (o *PcloudV2VolumescloneExecutePostAccepted) GetPayload() *models.VolumesClone { @@ -177,11 +180,13 @@ func (o *PcloudV2VolumescloneExecutePostBadRequest) Code() int { } func (o *PcloudV2VolumescloneExecutePostBadRequest) Error() string { - return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone/{volumes_clone_id}/execute][%d] pcloudV2VolumescloneExecutePostBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone/{volumes_clone_id}/execute][%d] pcloudV2VolumescloneExecutePostBadRequest %s", 400, payload) } func (o *PcloudV2VolumescloneExecutePostBadRequest) String() string { - return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone/{volumes_clone_id}/execute][%d] pcloudV2VolumescloneExecutePostBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone/{volumes_clone_id}/execute][%d] pcloudV2VolumescloneExecutePostBadRequest %s", 400, payload) } func (o *PcloudV2VolumescloneExecutePostBadRequest) GetPayload() *models.Error { @@ -245,11 +250,13 @@ func (o *PcloudV2VolumescloneExecutePostUnauthorized) Code() int { } func (o *PcloudV2VolumescloneExecutePostUnauthorized) Error() string { - return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone/{volumes_clone_id}/execute][%d] pcloudV2VolumescloneExecutePostUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone/{volumes_clone_id}/execute][%d] pcloudV2VolumescloneExecutePostUnauthorized %s", 401, payload) } func (o *PcloudV2VolumescloneExecutePostUnauthorized) String() string { - return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone/{volumes_clone_id}/execute][%d] pcloudV2VolumescloneExecutePostUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone/{volumes_clone_id}/execute][%d] pcloudV2VolumescloneExecutePostUnauthorized %s", 401, payload) } func (o *PcloudV2VolumescloneExecutePostUnauthorized) GetPayload() *models.Error { @@ -313,11 +320,13 @@ func (o *PcloudV2VolumescloneExecutePostForbidden) Code() int { } func (o *PcloudV2VolumescloneExecutePostForbidden) Error() string { - return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone/{volumes_clone_id}/execute][%d] pcloudV2VolumescloneExecutePostForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone/{volumes_clone_id}/execute][%d] pcloudV2VolumescloneExecutePostForbidden %s", 403, payload) } func (o *PcloudV2VolumescloneExecutePostForbidden) String() string { - return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone/{volumes_clone_id}/execute][%d] pcloudV2VolumescloneExecutePostForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone/{volumes_clone_id}/execute][%d] pcloudV2VolumescloneExecutePostForbidden %s", 403, payload) } func (o *PcloudV2VolumescloneExecutePostForbidden) GetPayload() *models.Error { @@ -381,11 +390,13 @@ func (o *PcloudV2VolumescloneExecutePostNotFound) Code() int { } func (o *PcloudV2VolumescloneExecutePostNotFound) Error() string { - return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone/{volumes_clone_id}/execute][%d] pcloudV2VolumescloneExecutePostNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone/{volumes_clone_id}/execute][%d] pcloudV2VolumescloneExecutePostNotFound %s", 404, payload) } func (o *PcloudV2VolumescloneExecutePostNotFound) String() string { - return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone/{volumes_clone_id}/execute][%d] pcloudV2VolumescloneExecutePostNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone/{volumes_clone_id}/execute][%d] pcloudV2VolumescloneExecutePostNotFound %s", 404, payload) } func (o *PcloudV2VolumescloneExecutePostNotFound) GetPayload() *models.Error { @@ -449,11 +460,13 @@ func (o *PcloudV2VolumescloneExecutePostInternalServerError) Code() int { } func (o *PcloudV2VolumescloneExecutePostInternalServerError) Error() string { - return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone/{volumes_clone_id}/execute][%d] pcloudV2VolumescloneExecutePostInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone/{volumes_clone_id}/execute][%d] pcloudV2VolumescloneExecutePostInternalServerError %s", 500, payload) } func (o *PcloudV2VolumescloneExecutePostInternalServerError) String() string { - return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone/{volumes_clone_id}/execute][%d] pcloudV2VolumescloneExecutePostInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone/{volumes_clone_id}/execute][%d] pcloudV2VolumescloneExecutePostInternalServerError %s", 500, payload) } func (o *PcloudV2VolumescloneExecutePostInternalServerError) GetPayload() *models.Error { diff --git a/power/client/p_cloud_volumes/pcloud_v2_volumesclone_get_responses.go b/power/client/p_cloud_volumes/pcloud_v2_volumesclone_get_responses.go index fc4d2559..04f093c8 100644 --- a/power/client/p_cloud_volumes/pcloud_v2_volumesclone_get_responses.go +++ b/power/client/p_cloud_volumes/pcloud_v2_volumesclone_get_responses.go @@ -6,6 +6,7 @@ package p_cloud_volumes // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -109,11 +110,13 @@ func (o *PcloudV2VolumescloneGetOK) Code() int { } func (o *PcloudV2VolumescloneGetOK) Error() string { - return fmt.Sprintf("[GET /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone/{volumes_clone_id}][%d] pcloudV2VolumescloneGetOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone/{volumes_clone_id}][%d] pcloudV2VolumescloneGetOK %s", 200, payload) } func (o *PcloudV2VolumescloneGetOK) String() string { - return fmt.Sprintf("[GET /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone/{volumes_clone_id}][%d] pcloudV2VolumescloneGetOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone/{volumes_clone_id}][%d] pcloudV2VolumescloneGetOK %s", 200, payload) } func (o *PcloudV2VolumescloneGetOK) GetPayload() *models.VolumesCloneDetail { @@ -177,11 +180,13 @@ func (o *PcloudV2VolumescloneGetBadRequest) Code() int { } func (o *PcloudV2VolumescloneGetBadRequest) Error() string { - return fmt.Sprintf("[GET /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone/{volumes_clone_id}][%d] pcloudV2VolumescloneGetBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone/{volumes_clone_id}][%d] pcloudV2VolumescloneGetBadRequest %s", 400, payload) } func (o *PcloudV2VolumescloneGetBadRequest) String() string { - return fmt.Sprintf("[GET /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone/{volumes_clone_id}][%d] pcloudV2VolumescloneGetBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone/{volumes_clone_id}][%d] pcloudV2VolumescloneGetBadRequest %s", 400, payload) } func (o *PcloudV2VolumescloneGetBadRequest) GetPayload() *models.Error { @@ -245,11 +250,13 @@ func (o *PcloudV2VolumescloneGetUnauthorized) Code() int { } func (o *PcloudV2VolumescloneGetUnauthorized) Error() string { - return fmt.Sprintf("[GET /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone/{volumes_clone_id}][%d] pcloudV2VolumescloneGetUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone/{volumes_clone_id}][%d] pcloudV2VolumescloneGetUnauthorized %s", 401, payload) } func (o *PcloudV2VolumescloneGetUnauthorized) String() string { - return fmt.Sprintf("[GET /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone/{volumes_clone_id}][%d] pcloudV2VolumescloneGetUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone/{volumes_clone_id}][%d] pcloudV2VolumescloneGetUnauthorized %s", 401, payload) } func (o *PcloudV2VolumescloneGetUnauthorized) GetPayload() *models.Error { @@ -313,11 +320,13 @@ func (o *PcloudV2VolumescloneGetForbidden) Code() int { } func (o *PcloudV2VolumescloneGetForbidden) Error() string { - return fmt.Sprintf("[GET /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone/{volumes_clone_id}][%d] pcloudV2VolumescloneGetForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone/{volumes_clone_id}][%d] pcloudV2VolumescloneGetForbidden %s", 403, payload) } func (o *PcloudV2VolumescloneGetForbidden) String() string { - return fmt.Sprintf("[GET /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone/{volumes_clone_id}][%d] pcloudV2VolumescloneGetForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone/{volumes_clone_id}][%d] pcloudV2VolumescloneGetForbidden %s", 403, payload) } func (o *PcloudV2VolumescloneGetForbidden) GetPayload() *models.Error { @@ -381,11 +390,13 @@ func (o *PcloudV2VolumescloneGetNotFound) Code() int { } func (o *PcloudV2VolumescloneGetNotFound) Error() string { - return fmt.Sprintf("[GET /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone/{volumes_clone_id}][%d] pcloudV2VolumescloneGetNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone/{volumes_clone_id}][%d] pcloudV2VolumescloneGetNotFound %s", 404, payload) } func (o *PcloudV2VolumescloneGetNotFound) String() string { - return fmt.Sprintf("[GET /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone/{volumes_clone_id}][%d] pcloudV2VolumescloneGetNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone/{volumes_clone_id}][%d] pcloudV2VolumescloneGetNotFound %s", 404, payload) } func (o *PcloudV2VolumescloneGetNotFound) GetPayload() *models.Error { @@ -449,11 +460,13 @@ func (o *PcloudV2VolumescloneGetInternalServerError) Code() int { } func (o *PcloudV2VolumescloneGetInternalServerError) Error() string { - return fmt.Sprintf("[GET /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone/{volumes_clone_id}][%d] pcloudV2VolumescloneGetInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone/{volumes_clone_id}][%d] pcloudV2VolumescloneGetInternalServerError %s", 500, payload) } func (o *PcloudV2VolumescloneGetInternalServerError) String() string { - return fmt.Sprintf("[GET /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone/{volumes_clone_id}][%d] pcloudV2VolumescloneGetInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone/{volumes_clone_id}][%d] pcloudV2VolumescloneGetInternalServerError %s", 500, payload) } func (o *PcloudV2VolumescloneGetInternalServerError) GetPayload() *models.Error { diff --git a/power/client/p_cloud_volumes/pcloud_v2_volumesclone_getall_responses.go b/power/client/p_cloud_volumes/pcloud_v2_volumesclone_getall_responses.go index 95d3652e..a7317a2a 100644 --- a/power/client/p_cloud_volumes/pcloud_v2_volumesclone_getall_responses.go +++ b/power/client/p_cloud_volumes/pcloud_v2_volumesclone_getall_responses.go @@ -6,6 +6,7 @@ package p_cloud_volumes // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -109,11 +110,13 @@ func (o *PcloudV2VolumescloneGetallOK) Code() int { } func (o *PcloudV2VolumescloneGetallOK) Error() string { - return fmt.Sprintf("[GET /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone][%d] pcloudV2VolumescloneGetallOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone][%d] pcloudV2VolumescloneGetallOK %s", 200, payload) } func (o *PcloudV2VolumescloneGetallOK) String() string { - return fmt.Sprintf("[GET /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone][%d] pcloudV2VolumescloneGetallOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone][%d] pcloudV2VolumescloneGetallOK %s", 200, payload) } func (o *PcloudV2VolumescloneGetallOK) GetPayload() *models.VolumesClones { @@ -177,11 +180,13 @@ func (o *PcloudV2VolumescloneGetallBadRequest) Code() int { } func (o *PcloudV2VolumescloneGetallBadRequest) Error() string { - return fmt.Sprintf("[GET /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone][%d] pcloudV2VolumescloneGetallBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone][%d] pcloudV2VolumescloneGetallBadRequest %s", 400, payload) } func (o *PcloudV2VolumescloneGetallBadRequest) String() string { - return fmt.Sprintf("[GET /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone][%d] pcloudV2VolumescloneGetallBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone][%d] pcloudV2VolumescloneGetallBadRequest %s", 400, payload) } func (o *PcloudV2VolumescloneGetallBadRequest) GetPayload() *models.Error { @@ -245,11 +250,13 @@ func (o *PcloudV2VolumescloneGetallUnauthorized) Code() int { } func (o *PcloudV2VolumescloneGetallUnauthorized) Error() string { - return fmt.Sprintf("[GET /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone][%d] pcloudV2VolumescloneGetallUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone][%d] pcloudV2VolumescloneGetallUnauthorized %s", 401, payload) } func (o *PcloudV2VolumescloneGetallUnauthorized) String() string { - return fmt.Sprintf("[GET /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone][%d] pcloudV2VolumescloneGetallUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone][%d] pcloudV2VolumescloneGetallUnauthorized %s", 401, payload) } func (o *PcloudV2VolumescloneGetallUnauthorized) GetPayload() *models.Error { @@ -313,11 +320,13 @@ func (o *PcloudV2VolumescloneGetallForbidden) Code() int { } func (o *PcloudV2VolumescloneGetallForbidden) Error() string { - return fmt.Sprintf("[GET /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone][%d] pcloudV2VolumescloneGetallForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone][%d] pcloudV2VolumescloneGetallForbidden %s", 403, payload) } func (o *PcloudV2VolumescloneGetallForbidden) String() string { - return fmt.Sprintf("[GET /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone][%d] pcloudV2VolumescloneGetallForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone][%d] pcloudV2VolumescloneGetallForbidden %s", 403, payload) } func (o *PcloudV2VolumescloneGetallForbidden) GetPayload() *models.Error { @@ -381,11 +390,13 @@ func (o *PcloudV2VolumescloneGetallNotFound) Code() int { } func (o *PcloudV2VolumescloneGetallNotFound) Error() string { - return fmt.Sprintf("[GET /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone][%d] pcloudV2VolumescloneGetallNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone][%d] pcloudV2VolumescloneGetallNotFound %s", 404, payload) } func (o *PcloudV2VolumescloneGetallNotFound) String() string { - return fmt.Sprintf("[GET /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone][%d] pcloudV2VolumescloneGetallNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone][%d] pcloudV2VolumescloneGetallNotFound %s", 404, payload) } func (o *PcloudV2VolumescloneGetallNotFound) GetPayload() *models.Error { @@ -449,11 +460,13 @@ func (o *PcloudV2VolumescloneGetallInternalServerError) Code() int { } func (o *PcloudV2VolumescloneGetallInternalServerError) Error() string { - return fmt.Sprintf("[GET /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone][%d] pcloudV2VolumescloneGetallInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone][%d] pcloudV2VolumescloneGetallInternalServerError %s", 500, payload) } func (o *PcloudV2VolumescloneGetallInternalServerError) String() string { - return fmt.Sprintf("[GET /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone][%d] pcloudV2VolumescloneGetallInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone][%d] pcloudV2VolumescloneGetallInternalServerError %s", 500, payload) } func (o *PcloudV2VolumescloneGetallInternalServerError) GetPayload() *models.Error { diff --git a/power/client/p_cloud_volumes/pcloud_v2_volumesclone_post_responses.go b/power/client/p_cloud_volumes/pcloud_v2_volumesclone_post_responses.go index 396cbfce..b467ebda 100644 --- a/power/client/p_cloud_volumes/pcloud_v2_volumesclone_post_responses.go +++ b/power/client/p_cloud_volumes/pcloud_v2_volumesclone_post_responses.go @@ -6,6 +6,7 @@ package p_cloud_volumes // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -109,11 +110,13 @@ func (o *PcloudV2VolumesclonePostAccepted) Code() int { } func (o *PcloudV2VolumesclonePostAccepted) Error() string { - return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone][%d] pcloudV2VolumesclonePostAccepted %+v", 202, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone][%d] pcloudV2VolumesclonePostAccepted %s", 202, payload) } func (o *PcloudV2VolumesclonePostAccepted) String() string { - return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone][%d] pcloudV2VolumesclonePostAccepted %+v", 202, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone][%d] pcloudV2VolumesclonePostAccepted %s", 202, payload) } func (o *PcloudV2VolumesclonePostAccepted) GetPayload() *models.VolumesClone { @@ -177,11 +180,13 @@ func (o *PcloudV2VolumesclonePostBadRequest) Code() int { } func (o *PcloudV2VolumesclonePostBadRequest) Error() string { - return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone][%d] pcloudV2VolumesclonePostBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone][%d] pcloudV2VolumesclonePostBadRequest %s", 400, payload) } func (o *PcloudV2VolumesclonePostBadRequest) String() string { - return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone][%d] pcloudV2VolumesclonePostBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone][%d] pcloudV2VolumesclonePostBadRequest %s", 400, payload) } func (o *PcloudV2VolumesclonePostBadRequest) GetPayload() *models.Error { @@ -245,11 +250,13 @@ func (o *PcloudV2VolumesclonePostUnauthorized) Code() int { } func (o *PcloudV2VolumesclonePostUnauthorized) Error() string { - return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone][%d] pcloudV2VolumesclonePostUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone][%d] pcloudV2VolumesclonePostUnauthorized %s", 401, payload) } func (o *PcloudV2VolumesclonePostUnauthorized) String() string { - return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone][%d] pcloudV2VolumesclonePostUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone][%d] pcloudV2VolumesclonePostUnauthorized %s", 401, payload) } func (o *PcloudV2VolumesclonePostUnauthorized) GetPayload() *models.Error { @@ -313,11 +320,13 @@ func (o *PcloudV2VolumesclonePostForbidden) Code() int { } func (o *PcloudV2VolumesclonePostForbidden) Error() string { - return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone][%d] pcloudV2VolumesclonePostForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone][%d] pcloudV2VolumesclonePostForbidden %s", 403, payload) } func (o *PcloudV2VolumesclonePostForbidden) String() string { - return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone][%d] pcloudV2VolumesclonePostForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone][%d] pcloudV2VolumesclonePostForbidden %s", 403, payload) } func (o *PcloudV2VolumesclonePostForbidden) GetPayload() *models.Error { @@ -381,11 +390,13 @@ func (o *PcloudV2VolumesclonePostNotFound) Code() int { } func (o *PcloudV2VolumesclonePostNotFound) Error() string { - return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone][%d] pcloudV2VolumesclonePostNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone][%d] pcloudV2VolumesclonePostNotFound %s", 404, payload) } func (o *PcloudV2VolumesclonePostNotFound) String() string { - return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone][%d] pcloudV2VolumesclonePostNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone][%d] pcloudV2VolumesclonePostNotFound %s", 404, payload) } func (o *PcloudV2VolumesclonePostNotFound) GetPayload() *models.Error { @@ -449,11 +460,13 @@ func (o *PcloudV2VolumesclonePostInternalServerError) Code() int { } func (o *PcloudV2VolumesclonePostInternalServerError) Error() string { - return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone][%d] pcloudV2VolumesclonePostInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone][%d] pcloudV2VolumesclonePostInternalServerError %s", 500, payload) } func (o *PcloudV2VolumesclonePostInternalServerError) String() string { - return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone][%d] pcloudV2VolumesclonePostInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone][%d] pcloudV2VolumesclonePostInternalServerError %s", 500, payload) } func (o *PcloudV2VolumesclonePostInternalServerError) GetPayload() *models.Error { diff --git a/power/client/p_cloud_volumes/pcloud_v2_volumesclone_start_post_responses.go b/power/client/p_cloud_volumes/pcloud_v2_volumesclone_start_post_responses.go index 2c48aa39..1af5ddc5 100644 --- a/power/client/p_cloud_volumes/pcloud_v2_volumesclone_start_post_responses.go +++ b/power/client/p_cloud_volumes/pcloud_v2_volumesclone_start_post_responses.go @@ -6,6 +6,7 @@ package p_cloud_volumes // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -109,11 +110,13 @@ func (o *PcloudV2VolumescloneStartPostOK) Code() int { } func (o *PcloudV2VolumescloneStartPostOK) Error() string { - return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone/{volumes_clone_id}/start][%d] pcloudV2VolumescloneStartPostOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone/{volumes_clone_id}/start][%d] pcloudV2VolumescloneStartPostOK %s", 200, payload) } func (o *PcloudV2VolumescloneStartPostOK) String() string { - return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone/{volumes_clone_id}/start][%d] pcloudV2VolumescloneStartPostOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone/{volumes_clone_id}/start][%d] pcloudV2VolumescloneStartPostOK %s", 200, payload) } func (o *PcloudV2VolumescloneStartPostOK) GetPayload() *models.VolumesClone { @@ -177,11 +180,13 @@ func (o *PcloudV2VolumescloneStartPostBadRequest) Code() int { } func (o *PcloudV2VolumescloneStartPostBadRequest) Error() string { - return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone/{volumes_clone_id}/start][%d] pcloudV2VolumescloneStartPostBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone/{volumes_clone_id}/start][%d] pcloudV2VolumescloneStartPostBadRequest %s", 400, payload) } func (o *PcloudV2VolumescloneStartPostBadRequest) String() string { - return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone/{volumes_clone_id}/start][%d] pcloudV2VolumescloneStartPostBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone/{volumes_clone_id}/start][%d] pcloudV2VolumescloneStartPostBadRequest %s", 400, payload) } func (o *PcloudV2VolumescloneStartPostBadRequest) GetPayload() *models.Error { @@ -245,11 +250,13 @@ func (o *PcloudV2VolumescloneStartPostUnauthorized) Code() int { } func (o *PcloudV2VolumescloneStartPostUnauthorized) Error() string { - return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone/{volumes_clone_id}/start][%d] pcloudV2VolumescloneStartPostUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone/{volumes_clone_id}/start][%d] pcloudV2VolumescloneStartPostUnauthorized %s", 401, payload) } func (o *PcloudV2VolumescloneStartPostUnauthorized) String() string { - return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone/{volumes_clone_id}/start][%d] pcloudV2VolumescloneStartPostUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone/{volumes_clone_id}/start][%d] pcloudV2VolumescloneStartPostUnauthorized %s", 401, payload) } func (o *PcloudV2VolumescloneStartPostUnauthorized) GetPayload() *models.Error { @@ -313,11 +320,13 @@ func (o *PcloudV2VolumescloneStartPostForbidden) Code() int { } func (o *PcloudV2VolumescloneStartPostForbidden) Error() string { - return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone/{volumes_clone_id}/start][%d] pcloudV2VolumescloneStartPostForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone/{volumes_clone_id}/start][%d] pcloudV2VolumescloneStartPostForbidden %s", 403, payload) } func (o *PcloudV2VolumescloneStartPostForbidden) String() string { - return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone/{volumes_clone_id}/start][%d] pcloudV2VolumescloneStartPostForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone/{volumes_clone_id}/start][%d] pcloudV2VolumescloneStartPostForbidden %s", 403, payload) } func (o *PcloudV2VolumescloneStartPostForbidden) GetPayload() *models.Error { @@ -381,11 +390,13 @@ func (o *PcloudV2VolumescloneStartPostNotFound) Code() int { } func (o *PcloudV2VolumescloneStartPostNotFound) Error() string { - return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone/{volumes_clone_id}/start][%d] pcloudV2VolumescloneStartPostNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone/{volumes_clone_id}/start][%d] pcloudV2VolumescloneStartPostNotFound %s", 404, payload) } func (o *PcloudV2VolumescloneStartPostNotFound) String() string { - return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone/{volumes_clone_id}/start][%d] pcloudV2VolumescloneStartPostNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone/{volumes_clone_id}/start][%d] pcloudV2VolumescloneStartPostNotFound %s", 404, payload) } func (o *PcloudV2VolumescloneStartPostNotFound) GetPayload() *models.Error { @@ -449,11 +460,13 @@ func (o *PcloudV2VolumescloneStartPostInternalServerError) Code() int { } func (o *PcloudV2VolumescloneStartPostInternalServerError) Error() string { - return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone/{volumes_clone_id}/start][%d] pcloudV2VolumescloneStartPostInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone/{volumes_clone_id}/start][%d] pcloudV2VolumescloneStartPostInternalServerError %s", 500, payload) } func (o *PcloudV2VolumescloneStartPostInternalServerError) String() string { - return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone/{volumes_clone_id}/start][%d] pcloudV2VolumescloneStartPostInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone/{volumes_clone_id}/start][%d] pcloudV2VolumescloneStartPostInternalServerError %s", 500, payload) } func (o *PcloudV2VolumescloneStartPostInternalServerError) GetPayload() *models.Error { diff --git a/power/client/p_cloud_volumes/pcloud_volumes_clone_post_responses.go b/power/client/p_cloud_volumes/pcloud_volumes_clone_post_responses.go index 212814d9..bb5b118c 100644 --- a/power/client/p_cloud_volumes/pcloud_volumes_clone_post_responses.go +++ b/power/client/p_cloud_volumes/pcloud_volumes_clone_post_responses.go @@ -6,6 +6,7 @@ package p_cloud_volumes // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -115,11 +116,13 @@ func (o *PcloudVolumesClonePostOK) Code() int { } func (o *PcloudVolumesClonePostOK) Error() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/clone][%d] pcloudVolumesClonePostOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/clone][%d] pcloudVolumesClonePostOK %s", 200, payload) } func (o *PcloudVolumesClonePostOK) String() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/clone][%d] pcloudVolumesClonePostOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/clone][%d] pcloudVolumesClonePostOK %s", 200, payload) } func (o *PcloudVolumesClonePostOK) GetPayload() *models.VolumesCloneResponse { @@ -183,11 +186,13 @@ func (o *PcloudVolumesClonePostBadRequest) Code() int { } func (o *PcloudVolumesClonePostBadRequest) Error() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/clone][%d] pcloudVolumesClonePostBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/clone][%d] pcloudVolumesClonePostBadRequest %s", 400, payload) } func (o *PcloudVolumesClonePostBadRequest) String() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/clone][%d] pcloudVolumesClonePostBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/clone][%d] pcloudVolumesClonePostBadRequest %s", 400, payload) } func (o *PcloudVolumesClonePostBadRequest) GetPayload() *models.Error { @@ -251,11 +256,13 @@ func (o *PcloudVolumesClonePostUnauthorized) Code() int { } func (o *PcloudVolumesClonePostUnauthorized) Error() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/clone][%d] pcloudVolumesClonePostUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/clone][%d] pcloudVolumesClonePostUnauthorized %s", 401, payload) } func (o *PcloudVolumesClonePostUnauthorized) String() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/clone][%d] pcloudVolumesClonePostUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/clone][%d] pcloudVolumesClonePostUnauthorized %s", 401, payload) } func (o *PcloudVolumesClonePostUnauthorized) GetPayload() *models.Error { @@ -319,11 +326,13 @@ func (o *PcloudVolumesClonePostForbidden) Code() int { } func (o *PcloudVolumesClonePostForbidden) Error() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/clone][%d] pcloudVolumesClonePostForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/clone][%d] pcloudVolumesClonePostForbidden %s", 403, payload) } func (o *PcloudVolumesClonePostForbidden) String() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/clone][%d] pcloudVolumesClonePostForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/clone][%d] pcloudVolumesClonePostForbidden %s", 403, payload) } func (o *PcloudVolumesClonePostForbidden) GetPayload() *models.Error { @@ -387,11 +396,13 @@ func (o *PcloudVolumesClonePostNotFound) Code() int { } func (o *PcloudVolumesClonePostNotFound) Error() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/clone][%d] pcloudVolumesClonePostNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/clone][%d] pcloudVolumesClonePostNotFound %s", 404, payload) } func (o *PcloudVolumesClonePostNotFound) String() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/clone][%d] pcloudVolumesClonePostNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/clone][%d] pcloudVolumesClonePostNotFound %s", 404, payload) } func (o *PcloudVolumesClonePostNotFound) GetPayload() *models.Error { @@ -455,11 +466,13 @@ func (o *PcloudVolumesClonePostConflict) Code() int { } func (o *PcloudVolumesClonePostConflict) Error() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/clone][%d] pcloudVolumesClonePostConflict %+v", 409, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/clone][%d] pcloudVolumesClonePostConflict %s", 409, payload) } func (o *PcloudVolumesClonePostConflict) String() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/clone][%d] pcloudVolumesClonePostConflict %+v", 409, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/clone][%d] pcloudVolumesClonePostConflict %s", 409, payload) } func (o *PcloudVolumesClonePostConflict) GetPayload() *models.Error { @@ -523,11 +536,13 @@ func (o *PcloudVolumesClonePostInternalServerError) Code() int { } func (o *PcloudVolumesClonePostInternalServerError) Error() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/clone][%d] pcloudVolumesClonePostInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/clone][%d] pcloudVolumesClonePostInternalServerError %s", 500, payload) } func (o *PcloudVolumesClonePostInternalServerError) String() string { - return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/clone][%d] pcloudVolumesClonePostInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/clone][%d] pcloudVolumesClonePostInternalServerError %s", 500, payload) } func (o *PcloudVolumesClonePostInternalServerError) GetPayload() *models.Error { diff --git a/power/client/power_edge_router/power_edge_router_client.go b/power/client/power_edge_router/power_edge_router_client.go new file mode 100644 index 00000000..67f3b9c7 --- /dev/null +++ b/power/client/power_edge_router/power_edge_router_client.go @@ -0,0 +1,106 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package power_edge_router + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + httptransport "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// New creates a new power edge router API client. +func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService { + return &Client{transport: transport, formats: formats} +} + +// New creates a new power edge router API client with basic auth credentials. +// It takes the following parameters: +// - host: http host (github.com). +// - basePath: any base path for the API client ("/v1", "/v3"). +// - scheme: http scheme ("http", "https"). +// - user: user for basic authentication header. +// - password: password for basic authentication header. +func NewClientWithBasicAuth(host, basePath, scheme, user, password string) ClientService { + transport := httptransport.New(host, basePath, []string{scheme}) + transport.DefaultAuthentication = httptransport.BasicAuth(user, password) + return &Client{transport: transport, formats: strfmt.Default} +} + +// New creates a new power edge router API client with a bearer token for authentication. +// It takes the following parameters: +// - host: http host (github.com). +// - basePath: any base path for the API client ("/v1", "/v3"). +// - scheme: http scheme ("http", "https"). +// - bearerToken: bearer token for Bearer authentication header. +func NewClientWithBearerToken(host, basePath, scheme, bearerToken string) ClientService { + transport := httptransport.New(host, basePath, []string{scheme}) + transport.DefaultAuthentication = httptransport.BearerToken(bearerToken) + return &Client{transport: transport, formats: strfmt.Default} +} + +/* +Client for power edge router API +*/ +type Client struct { + transport runtime.ClientTransport + formats strfmt.Registry +} + +// ClientOption may be used to customize the behavior of Client methods. +type ClientOption func(*runtime.ClientOperation) + +// ClientService is the interface for Client methods +type ClientService interface { + V1PoweredgerouterActionPost(params *V1PoweredgerouterActionPostParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*V1PoweredgerouterActionPostOK, error) + + SetTransport(transport runtime.ClientTransport) +} + +/* +V1PoweredgerouterActionPost performs a power edge router action migrate start migrate validate on a workspace +*/ +func (a *Client) V1PoweredgerouterActionPost(params *V1PoweredgerouterActionPostParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*V1PoweredgerouterActionPostOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1PoweredgerouterActionPostParams() + } + op := &runtime.ClientOperation{ + ID: "v1.poweredgerouter.action.post", + Method: "POST", + PathPattern: "/v1/workspaces/{workspace_id}/power-edge-router/action", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &V1PoweredgerouterActionPostReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*V1PoweredgerouterActionPostOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1.poweredgerouter.action.post: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +// SetTransport changes the transport on the client +func (a *Client) SetTransport(transport runtime.ClientTransport) { + a.transport = transport +} diff --git a/power/client/power_edge_router/v1_poweredgerouter_action_post_parameters.go b/power/client/power_edge_router/v1_poweredgerouter_action_post_parameters.go new file mode 100644 index 00000000..3a945a3c --- /dev/null +++ b/power/client/power_edge_router/v1_poweredgerouter_action_post_parameters.go @@ -0,0 +1,175 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package power_edge_router + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/IBM-Cloud/power-go-client/power/models" +) + +// NewV1PoweredgerouterActionPostParams creates a new V1PoweredgerouterActionPostParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewV1PoweredgerouterActionPostParams() *V1PoweredgerouterActionPostParams { + return &V1PoweredgerouterActionPostParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewV1PoweredgerouterActionPostParamsWithTimeout creates a new V1PoweredgerouterActionPostParams object +// with the ability to set a timeout on a request. +func NewV1PoweredgerouterActionPostParamsWithTimeout(timeout time.Duration) *V1PoweredgerouterActionPostParams { + return &V1PoweredgerouterActionPostParams{ + timeout: timeout, + } +} + +// NewV1PoweredgerouterActionPostParamsWithContext creates a new V1PoweredgerouterActionPostParams object +// with the ability to set a context for a request. +func NewV1PoweredgerouterActionPostParamsWithContext(ctx context.Context) *V1PoweredgerouterActionPostParams { + return &V1PoweredgerouterActionPostParams{ + Context: ctx, + } +} + +// NewV1PoweredgerouterActionPostParamsWithHTTPClient creates a new V1PoweredgerouterActionPostParams object +// with the ability to set a custom HTTPClient for a request. +func NewV1PoweredgerouterActionPostParamsWithHTTPClient(client *http.Client) *V1PoweredgerouterActionPostParams { + return &V1PoweredgerouterActionPostParams{ + HTTPClient: client, + } +} + +/* +V1PoweredgerouterActionPostParams contains all the parameters to send to the API endpoint + + for the v1 poweredgerouter action post operation. + + Typically these are written to a http.Request. +*/ +type V1PoweredgerouterActionPostParams struct { + + /* Body. + + Parameters for the desired action + */ + Body *models.PowerEdgeRouterAction + + /* WorkspaceID. + + Workspace ID + */ + WorkspaceID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the v1 poweredgerouter action post params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *V1PoweredgerouterActionPostParams) WithDefaults() *V1PoweredgerouterActionPostParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the v1 poweredgerouter action post params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *V1PoweredgerouterActionPostParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the v1 poweredgerouter action post params +func (o *V1PoweredgerouterActionPostParams) WithTimeout(timeout time.Duration) *V1PoweredgerouterActionPostParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 poweredgerouter action post params +func (o *V1PoweredgerouterActionPostParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 poweredgerouter action post params +func (o *V1PoweredgerouterActionPostParams) WithContext(ctx context.Context) *V1PoweredgerouterActionPostParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 poweredgerouter action post params +func (o *V1PoweredgerouterActionPostParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 poweredgerouter action post params +func (o *V1PoweredgerouterActionPostParams) WithHTTPClient(client *http.Client) *V1PoweredgerouterActionPostParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 poweredgerouter action post params +func (o *V1PoweredgerouterActionPostParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 poweredgerouter action post params +func (o *V1PoweredgerouterActionPostParams) WithBody(body *models.PowerEdgeRouterAction) *V1PoweredgerouterActionPostParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 poweredgerouter action post params +func (o *V1PoweredgerouterActionPostParams) SetBody(body *models.PowerEdgeRouterAction) { + o.Body = body +} + +// WithWorkspaceID adds the workspaceID to the v1 poweredgerouter action post params +func (o *V1PoweredgerouterActionPostParams) WithWorkspaceID(workspaceID string) *V1PoweredgerouterActionPostParams { + o.SetWorkspaceID(workspaceID) + return o +} + +// SetWorkspaceID adds the workspaceId to the v1 poweredgerouter action post params +func (o *V1PoweredgerouterActionPostParams) SetWorkspaceID(workspaceID string) { + o.WorkspaceID = workspaceID +} + +// WriteToRequest writes these params to a swagger request +func (o *V1PoweredgerouterActionPostParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param workspace_id + if err := r.SetPathParam("workspace_id", o.WorkspaceID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/power/client/power_edge_router/v1_poweredgerouter_action_post_responses.go b/power/client/power_edge_router/v1_poweredgerouter_action_post_responses.go new file mode 100644 index 00000000..625910f4 --- /dev/null +++ b/power/client/power_edge_router/v1_poweredgerouter_action_post_responses.go @@ -0,0 +1,560 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package power_edge_router + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "encoding/json" + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/IBM-Cloud/power-go-client/power/models" +) + +// V1PoweredgerouterActionPostReader is a Reader for the V1PoweredgerouterActionPost structure. +type V1PoweredgerouterActionPostReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1PoweredgerouterActionPostReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1PoweredgerouterActionPostOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 400: + result := NewV1PoweredgerouterActionPostBadRequest() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 401: + result := NewV1PoweredgerouterActionPostUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewV1PoweredgerouterActionPostForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewV1PoweredgerouterActionPostNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 409: + result := NewV1PoweredgerouterActionPostConflict() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewV1PoweredgerouterActionPostInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + default: + return nil, runtime.NewAPIError("[POST /v1/workspaces/{workspace_id}/power-edge-router/action] v1.poweredgerouter.action.post", response, response.Code()) + } +} + +// NewV1PoweredgerouterActionPostOK creates a V1PoweredgerouterActionPostOK with default headers values +func NewV1PoweredgerouterActionPostOK() *V1PoweredgerouterActionPostOK { + return &V1PoweredgerouterActionPostOK{} +} + +/* +V1PoweredgerouterActionPostOK describes a response with status code 200, with default header values. + +OK +*/ +type V1PoweredgerouterActionPostOK struct { + Payload models.Object +} + +// IsSuccess returns true when this v1 poweredgerouter action post o k response has a 2xx status code +func (o *V1PoweredgerouterActionPostOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this v1 poweredgerouter action post o k response has a 3xx status code +func (o *V1PoweredgerouterActionPostOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this v1 poweredgerouter action post o k response has a 4xx status code +func (o *V1PoweredgerouterActionPostOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this v1 poweredgerouter action post o k response has a 5xx status code +func (o *V1PoweredgerouterActionPostOK) IsServerError() bool { + return false +} + +// IsCode returns true when this v1 poweredgerouter action post o k response a status code equal to that given +func (o *V1PoweredgerouterActionPostOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the v1 poweredgerouter action post o k response +func (o *V1PoweredgerouterActionPostOK) Code() int { + return 200 +} + +func (o *V1PoweredgerouterActionPostOK) Error() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /v1/workspaces/{workspace_id}/power-edge-router/action][%d] v1PoweredgerouterActionPostOK %s", 200, payload) +} + +func (o *V1PoweredgerouterActionPostOK) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /v1/workspaces/{workspace_id}/power-edge-router/action][%d] v1PoweredgerouterActionPostOK %s", 200, payload) +} + +func (o *V1PoweredgerouterActionPostOK) GetPayload() models.Object { + return o.Payload +} + +func (o *V1PoweredgerouterActionPostOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response payload + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewV1PoweredgerouterActionPostBadRequest creates a V1PoweredgerouterActionPostBadRequest with default headers values +func NewV1PoweredgerouterActionPostBadRequest() *V1PoweredgerouterActionPostBadRequest { + return &V1PoweredgerouterActionPostBadRequest{} +} + +/* +V1PoweredgerouterActionPostBadRequest describes a response with status code 400, with default header values. + +Bad Request +*/ +type V1PoweredgerouterActionPostBadRequest struct { + Payload *models.Error +} + +// IsSuccess returns true when this v1 poweredgerouter action post bad request response has a 2xx status code +func (o *V1PoweredgerouterActionPostBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this v1 poweredgerouter action post bad request response has a 3xx status code +func (o *V1PoweredgerouterActionPostBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this v1 poweredgerouter action post bad request response has a 4xx status code +func (o *V1PoweredgerouterActionPostBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this v1 poweredgerouter action post bad request response has a 5xx status code +func (o *V1PoweredgerouterActionPostBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this v1 poweredgerouter action post bad request response a status code equal to that given +func (o *V1PoweredgerouterActionPostBadRequest) IsCode(code int) bool { + return code == 400 +} + +// Code gets the status code for the v1 poweredgerouter action post bad request response +func (o *V1PoweredgerouterActionPostBadRequest) Code() int { + return 400 +} + +func (o *V1PoweredgerouterActionPostBadRequest) Error() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /v1/workspaces/{workspace_id}/power-edge-router/action][%d] v1PoweredgerouterActionPostBadRequest %s", 400, payload) +} + +func (o *V1PoweredgerouterActionPostBadRequest) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /v1/workspaces/{workspace_id}/power-edge-router/action][%d] v1PoweredgerouterActionPostBadRequest %s", 400, payload) +} + +func (o *V1PoweredgerouterActionPostBadRequest) GetPayload() *models.Error { + return o.Payload +} + +func (o *V1PoweredgerouterActionPostBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewV1PoweredgerouterActionPostUnauthorized creates a V1PoweredgerouterActionPostUnauthorized with default headers values +func NewV1PoweredgerouterActionPostUnauthorized() *V1PoweredgerouterActionPostUnauthorized { + return &V1PoweredgerouterActionPostUnauthorized{} +} + +/* +V1PoweredgerouterActionPostUnauthorized describes a response with status code 401, with default header values. + +Unauthorized +*/ +type V1PoweredgerouterActionPostUnauthorized struct { + Payload *models.Error +} + +// IsSuccess returns true when this v1 poweredgerouter action post unauthorized response has a 2xx status code +func (o *V1PoweredgerouterActionPostUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this v1 poweredgerouter action post unauthorized response has a 3xx status code +func (o *V1PoweredgerouterActionPostUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this v1 poweredgerouter action post unauthorized response has a 4xx status code +func (o *V1PoweredgerouterActionPostUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this v1 poweredgerouter action post unauthorized response has a 5xx status code +func (o *V1PoweredgerouterActionPostUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this v1 poweredgerouter action post unauthorized response a status code equal to that given +func (o *V1PoweredgerouterActionPostUnauthorized) IsCode(code int) bool { + return code == 401 +} + +// Code gets the status code for the v1 poweredgerouter action post unauthorized response +func (o *V1PoweredgerouterActionPostUnauthorized) Code() int { + return 401 +} + +func (o *V1PoweredgerouterActionPostUnauthorized) Error() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /v1/workspaces/{workspace_id}/power-edge-router/action][%d] v1PoweredgerouterActionPostUnauthorized %s", 401, payload) +} + +func (o *V1PoweredgerouterActionPostUnauthorized) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /v1/workspaces/{workspace_id}/power-edge-router/action][%d] v1PoweredgerouterActionPostUnauthorized %s", 401, payload) +} + +func (o *V1PoweredgerouterActionPostUnauthorized) GetPayload() *models.Error { + return o.Payload +} + +func (o *V1PoweredgerouterActionPostUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewV1PoweredgerouterActionPostForbidden creates a V1PoweredgerouterActionPostForbidden with default headers values +func NewV1PoweredgerouterActionPostForbidden() *V1PoweredgerouterActionPostForbidden { + return &V1PoweredgerouterActionPostForbidden{} +} + +/* +V1PoweredgerouterActionPostForbidden describes a response with status code 403, with default header values. + +Forbidden +*/ +type V1PoweredgerouterActionPostForbidden struct { + Payload *models.Error +} + +// IsSuccess returns true when this v1 poweredgerouter action post forbidden response has a 2xx status code +func (o *V1PoweredgerouterActionPostForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this v1 poweredgerouter action post forbidden response has a 3xx status code +func (o *V1PoweredgerouterActionPostForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this v1 poweredgerouter action post forbidden response has a 4xx status code +func (o *V1PoweredgerouterActionPostForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this v1 poweredgerouter action post forbidden response has a 5xx status code +func (o *V1PoweredgerouterActionPostForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this v1 poweredgerouter action post forbidden response a status code equal to that given +func (o *V1PoweredgerouterActionPostForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the v1 poweredgerouter action post forbidden response +func (o *V1PoweredgerouterActionPostForbidden) Code() int { + return 403 +} + +func (o *V1PoweredgerouterActionPostForbidden) Error() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /v1/workspaces/{workspace_id}/power-edge-router/action][%d] v1PoweredgerouterActionPostForbidden %s", 403, payload) +} + +func (o *V1PoweredgerouterActionPostForbidden) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /v1/workspaces/{workspace_id}/power-edge-router/action][%d] v1PoweredgerouterActionPostForbidden %s", 403, payload) +} + +func (o *V1PoweredgerouterActionPostForbidden) GetPayload() *models.Error { + return o.Payload +} + +func (o *V1PoweredgerouterActionPostForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewV1PoweredgerouterActionPostNotFound creates a V1PoweredgerouterActionPostNotFound with default headers values +func NewV1PoweredgerouterActionPostNotFound() *V1PoweredgerouterActionPostNotFound { + return &V1PoweredgerouterActionPostNotFound{} +} + +/* +V1PoweredgerouterActionPostNotFound describes a response with status code 404, with default header values. + +Not Found +*/ +type V1PoweredgerouterActionPostNotFound struct { + Payload *models.Error +} + +// IsSuccess returns true when this v1 poweredgerouter action post not found response has a 2xx status code +func (o *V1PoweredgerouterActionPostNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this v1 poweredgerouter action post not found response has a 3xx status code +func (o *V1PoweredgerouterActionPostNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this v1 poweredgerouter action post not found response has a 4xx status code +func (o *V1PoweredgerouterActionPostNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this v1 poweredgerouter action post not found response has a 5xx status code +func (o *V1PoweredgerouterActionPostNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this v1 poweredgerouter action post not found response a status code equal to that given +func (o *V1PoweredgerouterActionPostNotFound) IsCode(code int) bool { + return code == 404 +} + +// Code gets the status code for the v1 poweredgerouter action post not found response +func (o *V1PoweredgerouterActionPostNotFound) Code() int { + return 404 +} + +func (o *V1PoweredgerouterActionPostNotFound) Error() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /v1/workspaces/{workspace_id}/power-edge-router/action][%d] v1PoweredgerouterActionPostNotFound %s", 404, payload) +} + +func (o *V1PoweredgerouterActionPostNotFound) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /v1/workspaces/{workspace_id}/power-edge-router/action][%d] v1PoweredgerouterActionPostNotFound %s", 404, payload) +} + +func (o *V1PoweredgerouterActionPostNotFound) GetPayload() *models.Error { + return o.Payload +} + +func (o *V1PoweredgerouterActionPostNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewV1PoweredgerouterActionPostConflict creates a V1PoweredgerouterActionPostConflict with default headers values +func NewV1PoweredgerouterActionPostConflict() *V1PoweredgerouterActionPostConflict { + return &V1PoweredgerouterActionPostConflict{} +} + +/* +V1PoweredgerouterActionPostConflict describes a response with status code 409, with default header values. + +Conflict +*/ +type V1PoweredgerouterActionPostConflict struct { + Payload *models.Error +} + +// IsSuccess returns true when this v1 poweredgerouter action post conflict response has a 2xx status code +func (o *V1PoweredgerouterActionPostConflict) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this v1 poweredgerouter action post conflict response has a 3xx status code +func (o *V1PoweredgerouterActionPostConflict) IsRedirect() bool { + return false +} + +// IsClientError returns true when this v1 poweredgerouter action post conflict response has a 4xx status code +func (o *V1PoweredgerouterActionPostConflict) IsClientError() bool { + return true +} + +// IsServerError returns true when this v1 poweredgerouter action post conflict response has a 5xx status code +func (o *V1PoweredgerouterActionPostConflict) IsServerError() bool { + return false +} + +// IsCode returns true when this v1 poweredgerouter action post conflict response a status code equal to that given +func (o *V1PoweredgerouterActionPostConflict) IsCode(code int) bool { + return code == 409 +} + +// Code gets the status code for the v1 poweredgerouter action post conflict response +func (o *V1PoweredgerouterActionPostConflict) Code() int { + return 409 +} + +func (o *V1PoweredgerouterActionPostConflict) Error() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /v1/workspaces/{workspace_id}/power-edge-router/action][%d] v1PoweredgerouterActionPostConflict %s", 409, payload) +} + +func (o *V1PoweredgerouterActionPostConflict) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /v1/workspaces/{workspace_id}/power-edge-router/action][%d] v1PoweredgerouterActionPostConflict %s", 409, payload) +} + +func (o *V1PoweredgerouterActionPostConflict) GetPayload() *models.Error { + return o.Payload +} + +func (o *V1PoweredgerouterActionPostConflict) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewV1PoweredgerouterActionPostInternalServerError creates a V1PoweredgerouterActionPostInternalServerError with default headers values +func NewV1PoweredgerouterActionPostInternalServerError() *V1PoweredgerouterActionPostInternalServerError { + return &V1PoweredgerouterActionPostInternalServerError{} +} + +/* +V1PoweredgerouterActionPostInternalServerError describes a response with status code 500, with default header values. + +Internal Server Error +*/ +type V1PoweredgerouterActionPostInternalServerError struct { + Payload *models.Error +} + +// IsSuccess returns true when this v1 poweredgerouter action post internal server error response has a 2xx status code +func (o *V1PoweredgerouterActionPostInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this v1 poweredgerouter action post internal server error response has a 3xx status code +func (o *V1PoweredgerouterActionPostInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this v1 poweredgerouter action post internal server error response has a 4xx status code +func (o *V1PoweredgerouterActionPostInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this v1 poweredgerouter action post internal server error response has a 5xx status code +func (o *V1PoweredgerouterActionPostInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this v1 poweredgerouter action post internal server error response a status code equal to that given +func (o *V1PoweredgerouterActionPostInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the v1 poweredgerouter action post internal server error response +func (o *V1PoweredgerouterActionPostInternalServerError) Code() int { + return 500 +} + +func (o *V1PoweredgerouterActionPostInternalServerError) Error() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /v1/workspaces/{workspace_id}/power-edge-router/action][%d] v1PoweredgerouterActionPostInternalServerError %s", 500, payload) +} + +func (o *V1PoweredgerouterActionPostInternalServerError) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /v1/workspaces/{workspace_id}/power-edge-router/action][%d] v1PoweredgerouterActionPostInternalServerError %s", 500, payload) +} + +func (o *V1PoweredgerouterActionPostInternalServerError) GetPayload() *models.Error { + return o.Payload +} + +func (o *V1PoweredgerouterActionPostInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/power/client/power_iaas_api_client.go b/power/client/power_iaas_api_client.go index 2b8c1a8c..43c7c298 100644 --- a/power/client/power_iaas_api_client.go +++ b/power/client/power_iaas_api_client.go @@ -15,7 +15,7 @@ import ( "github.com/IBM-Cloud/power-go-client/power/client/catalog" "github.com/IBM-Cloud/power-go-client/power/client/datacenters" "github.com/IBM-Cloud/power-go-client/power/client/hardware_platforms" - "github.com/IBM-Cloud/power-go-client/power/client/hostgroups" + "github.com/IBM-Cloud/power-go-client/power/client/host_groups" "github.com/IBM-Cloud/power-go-client/power/client/iaas_service_broker" "github.com/IBM-Cloud/power-go-client/power/client/internal_power_v_s_instances" "github.com/IBM-Cloud/power-go-client/power/client/internal_power_v_s_locations" @@ -48,8 +48,10 @@ import ( "github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volume_groups" "github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volume_onboarding" "github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes" + "github.com/IBM-Cloud/power-go-client/power/client/power_edge_router" "github.com/IBM-Cloud/power-go-client/power/client/service_bindings" "github.com/IBM-Cloud/power-go-client/power/client/service_instances" + "github.com/IBM-Cloud/power-go-client/power/client/snapshots" "github.com/IBM-Cloud/power-go-client/power/client/storage_types" "github.com/IBM-Cloud/power-go-client/power/client/swagger_spec" "github.com/IBM-Cloud/power-go-client/power/client/workspaces" @@ -102,7 +104,7 @@ func New(transport runtime.ClientTransport, formats strfmt.Registry) *PowerIaasA cli.Catalog = catalog.New(transport, formats) cli.Datacenters = datacenters.New(transport, formats) cli.HardwarePlatforms = hardware_platforms.New(transport, formats) - cli.Hostgroups = hostgroups.New(transport, formats) + cli.HostGroups = host_groups.New(transport, formats) cli.IaasServiceBroker = iaas_service_broker.New(transport, formats) cli.InternalPowervsInstances = internal_power_v_s_instances.New(transport, formats) cli.InternalPowervsLocations = internal_power_v_s_locations.New(transport, formats) @@ -135,8 +137,10 @@ func New(transport runtime.ClientTransport, formats strfmt.Registry) *PowerIaasA cli.PCloudVolumeGroups = p_cloud_volume_groups.New(transport, formats) cli.PCloudVolumeOnboarding = p_cloud_volume_onboarding.New(transport, formats) cli.PCloudVolumes = p_cloud_volumes.New(transport, formats) + cli.PowerEdgeRouter = power_edge_router.New(transport, formats) cli.ServiceBindings = service_bindings.New(transport, formats) cli.ServiceInstances = service_instances.New(transport, formats) + cli.Snapshots = snapshots.New(transport, formats) cli.StorageTypes = storage_types.New(transport, formats) cli.SwaggerSpec = swagger_spec.New(transport, formats) cli.Workspaces = workspaces.New(transport, formats) @@ -194,7 +198,7 @@ type PowerIaasAPI struct { HardwarePlatforms hardware_platforms.ClientService - Hostgroups hostgroups.ClientService + HostGroups host_groups.ClientService IaasServiceBroker iaas_service_broker.ClientService @@ -260,10 +264,14 @@ type PowerIaasAPI struct { PCloudVolumes p_cloud_volumes.ClientService + PowerEdgeRouter power_edge_router.ClientService + ServiceBindings service_bindings.ClientService ServiceInstances service_instances.ClientService + Snapshots snapshots.ClientService + StorageTypes storage_types.ClientService SwaggerSpec swagger_spec.ClientService @@ -281,7 +289,7 @@ func (c *PowerIaasAPI) SetTransport(transport runtime.ClientTransport) { c.Catalog.SetTransport(transport) c.Datacenters.SetTransport(transport) c.HardwarePlatforms.SetTransport(transport) - c.Hostgroups.SetTransport(transport) + c.HostGroups.SetTransport(transport) c.IaasServiceBroker.SetTransport(transport) c.InternalPowervsInstances.SetTransport(transport) c.InternalPowervsLocations.SetTransport(transport) @@ -314,8 +322,10 @@ func (c *PowerIaasAPI) SetTransport(transport runtime.ClientTransport) { c.PCloudVolumeGroups.SetTransport(transport) c.PCloudVolumeOnboarding.SetTransport(transport) c.PCloudVolumes.SetTransport(transport) + c.PowerEdgeRouter.SetTransport(transport) c.ServiceBindings.SetTransport(transport) c.ServiceInstances.SetTransport(transport) + c.Snapshots.SetTransport(transport) c.StorageTypes.SetTransport(transport) c.SwaggerSpec.SetTransport(transport) c.Workspaces.SetTransport(transport) diff --git a/power/client/service_bindings/service_binding_binding_responses.go b/power/client/service_bindings/service_binding_binding_responses.go index 2c32202d..6bd01f3c 100644 --- a/power/client/service_bindings/service_binding_binding_responses.go +++ b/power/client/service_bindings/service_binding_binding_responses.go @@ -6,6 +6,7 @@ package service_bindings // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -127,11 +128,13 @@ func (o *ServiceBindingBindingOK) Code() int { } func (o *ServiceBindingBindingOK) Error() string { - return fmt.Sprintf("[PUT /v2/service_instances/{instance_id}/service_bindings/{binding_id}][%d] serviceBindingBindingOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /v2/service_instances/{instance_id}/service_bindings/{binding_id}][%d] serviceBindingBindingOK %s", 200, payload) } func (o *ServiceBindingBindingOK) String() string { - return fmt.Sprintf("[PUT /v2/service_instances/{instance_id}/service_bindings/{binding_id}][%d] serviceBindingBindingOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /v2/service_instances/{instance_id}/service_bindings/{binding_id}][%d] serviceBindingBindingOK %s", 200, payload) } func (o *ServiceBindingBindingOK) GetPayload() *models.ServiceBinding { @@ -195,11 +198,13 @@ func (o *ServiceBindingBindingCreated) Code() int { } func (o *ServiceBindingBindingCreated) Error() string { - return fmt.Sprintf("[PUT /v2/service_instances/{instance_id}/service_bindings/{binding_id}][%d] serviceBindingBindingCreated %+v", 201, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /v2/service_instances/{instance_id}/service_bindings/{binding_id}][%d] serviceBindingBindingCreated %s", 201, payload) } func (o *ServiceBindingBindingCreated) String() string { - return fmt.Sprintf("[PUT /v2/service_instances/{instance_id}/service_bindings/{binding_id}][%d] serviceBindingBindingCreated %+v", 201, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /v2/service_instances/{instance_id}/service_bindings/{binding_id}][%d] serviceBindingBindingCreated %s", 201, payload) } func (o *ServiceBindingBindingCreated) GetPayload() *models.ServiceBinding { @@ -263,11 +268,13 @@ func (o *ServiceBindingBindingAccepted) Code() int { } func (o *ServiceBindingBindingAccepted) Error() string { - return fmt.Sprintf("[PUT /v2/service_instances/{instance_id}/service_bindings/{binding_id}][%d] serviceBindingBindingAccepted %+v", 202, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /v2/service_instances/{instance_id}/service_bindings/{binding_id}][%d] serviceBindingBindingAccepted %s", 202, payload) } func (o *ServiceBindingBindingAccepted) String() string { - return fmt.Sprintf("[PUT /v2/service_instances/{instance_id}/service_bindings/{binding_id}][%d] serviceBindingBindingAccepted %+v", 202, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /v2/service_instances/{instance_id}/service_bindings/{binding_id}][%d] serviceBindingBindingAccepted %s", 202, payload) } func (o *ServiceBindingBindingAccepted) GetPayload() *models.AsyncOperation { @@ -331,11 +338,13 @@ func (o *ServiceBindingBindingBadRequest) Code() int { } func (o *ServiceBindingBindingBadRequest) Error() string { - return fmt.Sprintf("[PUT /v2/service_instances/{instance_id}/service_bindings/{binding_id}][%d] serviceBindingBindingBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /v2/service_instances/{instance_id}/service_bindings/{binding_id}][%d] serviceBindingBindingBadRequest %s", 400, payload) } func (o *ServiceBindingBindingBadRequest) String() string { - return fmt.Sprintf("[PUT /v2/service_instances/{instance_id}/service_bindings/{binding_id}][%d] serviceBindingBindingBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /v2/service_instances/{instance_id}/service_bindings/{binding_id}][%d] serviceBindingBindingBadRequest %s", 400, payload) } func (o *ServiceBindingBindingBadRequest) GetPayload() *models.Error { @@ -399,11 +408,13 @@ func (o *ServiceBindingBindingUnauthorized) Code() int { } func (o *ServiceBindingBindingUnauthorized) Error() string { - return fmt.Sprintf("[PUT /v2/service_instances/{instance_id}/service_bindings/{binding_id}][%d] serviceBindingBindingUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /v2/service_instances/{instance_id}/service_bindings/{binding_id}][%d] serviceBindingBindingUnauthorized %s", 401, payload) } func (o *ServiceBindingBindingUnauthorized) String() string { - return fmt.Sprintf("[PUT /v2/service_instances/{instance_id}/service_bindings/{binding_id}][%d] serviceBindingBindingUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /v2/service_instances/{instance_id}/service_bindings/{binding_id}][%d] serviceBindingBindingUnauthorized %s", 401, payload) } func (o *ServiceBindingBindingUnauthorized) GetPayload() *models.Error { @@ -467,11 +478,13 @@ func (o *ServiceBindingBindingForbidden) Code() int { } func (o *ServiceBindingBindingForbidden) Error() string { - return fmt.Sprintf("[PUT /v2/service_instances/{instance_id}/service_bindings/{binding_id}][%d] serviceBindingBindingForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /v2/service_instances/{instance_id}/service_bindings/{binding_id}][%d] serviceBindingBindingForbidden %s", 403, payload) } func (o *ServiceBindingBindingForbidden) String() string { - return fmt.Sprintf("[PUT /v2/service_instances/{instance_id}/service_bindings/{binding_id}][%d] serviceBindingBindingForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /v2/service_instances/{instance_id}/service_bindings/{binding_id}][%d] serviceBindingBindingForbidden %s", 403, payload) } func (o *ServiceBindingBindingForbidden) GetPayload() *models.Error { @@ -535,11 +548,13 @@ func (o *ServiceBindingBindingNotFound) Code() int { } func (o *ServiceBindingBindingNotFound) Error() string { - return fmt.Sprintf("[PUT /v2/service_instances/{instance_id}/service_bindings/{binding_id}][%d] serviceBindingBindingNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /v2/service_instances/{instance_id}/service_bindings/{binding_id}][%d] serviceBindingBindingNotFound %s", 404, payload) } func (o *ServiceBindingBindingNotFound) String() string { - return fmt.Sprintf("[PUT /v2/service_instances/{instance_id}/service_bindings/{binding_id}][%d] serviceBindingBindingNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /v2/service_instances/{instance_id}/service_bindings/{binding_id}][%d] serviceBindingBindingNotFound %s", 404, payload) } func (o *ServiceBindingBindingNotFound) GetPayload() *models.Error { @@ -603,11 +618,13 @@ func (o *ServiceBindingBindingConflict) Code() int { } func (o *ServiceBindingBindingConflict) Error() string { - return fmt.Sprintf("[PUT /v2/service_instances/{instance_id}/service_bindings/{binding_id}][%d] serviceBindingBindingConflict %+v", 409, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /v2/service_instances/{instance_id}/service_bindings/{binding_id}][%d] serviceBindingBindingConflict %s", 409, payload) } func (o *ServiceBindingBindingConflict) String() string { - return fmt.Sprintf("[PUT /v2/service_instances/{instance_id}/service_bindings/{binding_id}][%d] serviceBindingBindingConflict %+v", 409, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /v2/service_instances/{instance_id}/service_bindings/{binding_id}][%d] serviceBindingBindingConflict %s", 409, payload) } func (o *ServiceBindingBindingConflict) GetPayload() *models.Error { @@ -671,11 +688,13 @@ func (o *ServiceBindingBindingUnprocessableEntity) Code() int { } func (o *ServiceBindingBindingUnprocessableEntity) Error() string { - return fmt.Sprintf("[PUT /v2/service_instances/{instance_id}/service_bindings/{binding_id}][%d] serviceBindingBindingUnprocessableEntity %+v", 422, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /v2/service_instances/{instance_id}/service_bindings/{binding_id}][%d] serviceBindingBindingUnprocessableEntity %s", 422, payload) } func (o *ServiceBindingBindingUnprocessableEntity) String() string { - return fmt.Sprintf("[PUT /v2/service_instances/{instance_id}/service_bindings/{binding_id}][%d] serviceBindingBindingUnprocessableEntity %+v", 422, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /v2/service_instances/{instance_id}/service_bindings/{binding_id}][%d] serviceBindingBindingUnprocessableEntity %s", 422, payload) } func (o *ServiceBindingBindingUnprocessableEntity) GetPayload() *models.Error { diff --git a/power/client/service_bindings/service_binding_get_responses.go b/power/client/service_bindings/service_binding_get_responses.go index 3701f13c..740dc496 100644 --- a/power/client/service_bindings/service_binding_get_responses.go +++ b/power/client/service_bindings/service_binding_get_responses.go @@ -6,6 +6,7 @@ package service_bindings // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -103,11 +104,13 @@ func (o *ServiceBindingGetOK) Code() int { } func (o *ServiceBindingGetOK) Error() string { - return fmt.Sprintf("[GET /v2/service_instances/{instance_id}/service_bindings/{binding_id}][%d] serviceBindingGetOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /v2/service_instances/{instance_id}/service_bindings/{binding_id}][%d] serviceBindingGetOK %s", 200, payload) } func (o *ServiceBindingGetOK) String() string { - return fmt.Sprintf("[GET /v2/service_instances/{instance_id}/service_bindings/{binding_id}][%d] serviceBindingGetOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /v2/service_instances/{instance_id}/service_bindings/{binding_id}][%d] serviceBindingGetOK %s", 200, payload) } func (o *ServiceBindingGetOK) GetPayload() *models.ServiceBindingResource { @@ -171,11 +174,13 @@ func (o *ServiceBindingGetBadRequest) Code() int { } func (o *ServiceBindingGetBadRequest) Error() string { - return fmt.Sprintf("[GET /v2/service_instances/{instance_id}/service_bindings/{binding_id}][%d] serviceBindingGetBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /v2/service_instances/{instance_id}/service_bindings/{binding_id}][%d] serviceBindingGetBadRequest %s", 400, payload) } func (o *ServiceBindingGetBadRequest) String() string { - return fmt.Sprintf("[GET /v2/service_instances/{instance_id}/service_bindings/{binding_id}][%d] serviceBindingGetBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /v2/service_instances/{instance_id}/service_bindings/{binding_id}][%d] serviceBindingGetBadRequest %s", 400, payload) } func (o *ServiceBindingGetBadRequest) GetPayload() *models.Error { @@ -239,11 +244,13 @@ func (o *ServiceBindingGetUnauthorized) Code() int { } func (o *ServiceBindingGetUnauthorized) Error() string { - return fmt.Sprintf("[GET /v2/service_instances/{instance_id}/service_bindings/{binding_id}][%d] serviceBindingGetUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /v2/service_instances/{instance_id}/service_bindings/{binding_id}][%d] serviceBindingGetUnauthorized %s", 401, payload) } func (o *ServiceBindingGetUnauthorized) String() string { - return fmt.Sprintf("[GET /v2/service_instances/{instance_id}/service_bindings/{binding_id}][%d] serviceBindingGetUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /v2/service_instances/{instance_id}/service_bindings/{binding_id}][%d] serviceBindingGetUnauthorized %s", 401, payload) } func (o *ServiceBindingGetUnauthorized) GetPayload() *models.Error { @@ -307,11 +314,13 @@ func (o *ServiceBindingGetForbidden) Code() int { } func (o *ServiceBindingGetForbidden) Error() string { - return fmt.Sprintf("[GET /v2/service_instances/{instance_id}/service_bindings/{binding_id}][%d] serviceBindingGetForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /v2/service_instances/{instance_id}/service_bindings/{binding_id}][%d] serviceBindingGetForbidden %s", 403, payload) } func (o *ServiceBindingGetForbidden) String() string { - return fmt.Sprintf("[GET /v2/service_instances/{instance_id}/service_bindings/{binding_id}][%d] serviceBindingGetForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /v2/service_instances/{instance_id}/service_bindings/{binding_id}][%d] serviceBindingGetForbidden %s", 403, payload) } func (o *ServiceBindingGetForbidden) GetPayload() *models.Error { @@ -375,11 +384,13 @@ func (o *ServiceBindingGetNotFound) Code() int { } func (o *ServiceBindingGetNotFound) Error() string { - return fmt.Sprintf("[GET /v2/service_instances/{instance_id}/service_bindings/{binding_id}][%d] serviceBindingGetNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /v2/service_instances/{instance_id}/service_bindings/{binding_id}][%d] serviceBindingGetNotFound %s", 404, payload) } func (o *ServiceBindingGetNotFound) String() string { - return fmt.Sprintf("[GET /v2/service_instances/{instance_id}/service_bindings/{binding_id}][%d] serviceBindingGetNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /v2/service_instances/{instance_id}/service_bindings/{binding_id}][%d] serviceBindingGetNotFound %s", 404, payload) } func (o *ServiceBindingGetNotFound) GetPayload() *models.Error { diff --git a/power/client/service_bindings/service_binding_last_operation_get_responses.go b/power/client/service_bindings/service_binding_last_operation_get_responses.go index 00066825..9f0824ba 100644 --- a/power/client/service_bindings/service_binding_last_operation_get_responses.go +++ b/power/client/service_bindings/service_binding_last_operation_get_responses.go @@ -6,6 +6,7 @@ package service_bindings // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -109,11 +110,13 @@ func (o *ServiceBindingLastOperationGetOK) Code() int { } func (o *ServiceBindingLastOperationGetOK) Error() string { - return fmt.Sprintf("[GET /v2/service_instances/{instance_id}/service_bindings/{binding_id}/last_operation][%d] serviceBindingLastOperationGetOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /v2/service_instances/{instance_id}/service_bindings/{binding_id}/last_operation][%d] serviceBindingLastOperationGetOK %s", 200, payload) } func (o *ServiceBindingLastOperationGetOK) String() string { - return fmt.Sprintf("[GET /v2/service_instances/{instance_id}/service_bindings/{binding_id}/last_operation][%d] serviceBindingLastOperationGetOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /v2/service_instances/{instance_id}/service_bindings/{binding_id}/last_operation][%d] serviceBindingLastOperationGetOK %s", 200, payload) } func (o *ServiceBindingLastOperationGetOK) GetPayload() *models.LastOperationResource { @@ -177,11 +180,13 @@ func (o *ServiceBindingLastOperationGetBadRequest) Code() int { } func (o *ServiceBindingLastOperationGetBadRequest) Error() string { - return fmt.Sprintf("[GET /v2/service_instances/{instance_id}/service_bindings/{binding_id}/last_operation][%d] serviceBindingLastOperationGetBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /v2/service_instances/{instance_id}/service_bindings/{binding_id}/last_operation][%d] serviceBindingLastOperationGetBadRequest %s", 400, payload) } func (o *ServiceBindingLastOperationGetBadRequest) String() string { - return fmt.Sprintf("[GET /v2/service_instances/{instance_id}/service_bindings/{binding_id}/last_operation][%d] serviceBindingLastOperationGetBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /v2/service_instances/{instance_id}/service_bindings/{binding_id}/last_operation][%d] serviceBindingLastOperationGetBadRequest %s", 400, payload) } func (o *ServiceBindingLastOperationGetBadRequest) GetPayload() *models.Error { @@ -245,11 +250,13 @@ func (o *ServiceBindingLastOperationGetUnauthorized) Code() int { } func (o *ServiceBindingLastOperationGetUnauthorized) Error() string { - return fmt.Sprintf("[GET /v2/service_instances/{instance_id}/service_bindings/{binding_id}/last_operation][%d] serviceBindingLastOperationGetUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /v2/service_instances/{instance_id}/service_bindings/{binding_id}/last_operation][%d] serviceBindingLastOperationGetUnauthorized %s", 401, payload) } func (o *ServiceBindingLastOperationGetUnauthorized) String() string { - return fmt.Sprintf("[GET /v2/service_instances/{instance_id}/service_bindings/{binding_id}/last_operation][%d] serviceBindingLastOperationGetUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /v2/service_instances/{instance_id}/service_bindings/{binding_id}/last_operation][%d] serviceBindingLastOperationGetUnauthorized %s", 401, payload) } func (o *ServiceBindingLastOperationGetUnauthorized) GetPayload() *models.Error { @@ -313,11 +320,13 @@ func (o *ServiceBindingLastOperationGetForbidden) Code() int { } func (o *ServiceBindingLastOperationGetForbidden) Error() string { - return fmt.Sprintf("[GET /v2/service_instances/{instance_id}/service_bindings/{binding_id}/last_operation][%d] serviceBindingLastOperationGetForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /v2/service_instances/{instance_id}/service_bindings/{binding_id}/last_operation][%d] serviceBindingLastOperationGetForbidden %s", 403, payload) } func (o *ServiceBindingLastOperationGetForbidden) String() string { - return fmt.Sprintf("[GET /v2/service_instances/{instance_id}/service_bindings/{binding_id}/last_operation][%d] serviceBindingLastOperationGetForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /v2/service_instances/{instance_id}/service_bindings/{binding_id}/last_operation][%d] serviceBindingLastOperationGetForbidden %s", 403, payload) } func (o *ServiceBindingLastOperationGetForbidden) GetPayload() *models.Error { @@ -381,11 +390,13 @@ func (o *ServiceBindingLastOperationGetNotFound) Code() int { } func (o *ServiceBindingLastOperationGetNotFound) Error() string { - return fmt.Sprintf("[GET /v2/service_instances/{instance_id}/service_bindings/{binding_id}/last_operation][%d] serviceBindingLastOperationGetNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /v2/service_instances/{instance_id}/service_bindings/{binding_id}/last_operation][%d] serviceBindingLastOperationGetNotFound %s", 404, payload) } func (o *ServiceBindingLastOperationGetNotFound) String() string { - return fmt.Sprintf("[GET /v2/service_instances/{instance_id}/service_bindings/{binding_id}/last_operation][%d] serviceBindingLastOperationGetNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /v2/service_instances/{instance_id}/service_bindings/{binding_id}/last_operation][%d] serviceBindingLastOperationGetNotFound %s", 404, payload) } func (o *ServiceBindingLastOperationGetNotFound) GetPayload() *models.Error { @@ -449,11 +460,13 @@ func (o *ServiceBindingLastOperationGetGone) Code() int { } func (o *ServiceBindingLastOperationGetGone) Error() string { - return fmt.Sprintf("[GET /v2/service_instances/{instance_id}/service_bindings/{binding_id}/last_operation][%d] serviceBindingLastOperationGetGone %+v", 410, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /v2/service_instances/{instance_id}/service_bindings/{binding_id}/last_operation][%d] serviceBindingLastOperationGetGone %s", 410, payload) } func (o *ServiceBindingLastOperationGetGone) String() string { - return fmt.Sprintf("[GET /v2/service_instances/{instance_id}/service_bindings/{binding_id}/last_operation][%d] serviceBindingLastOperationGetGone %+v", 410, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /v2/service_instances/{instance_id}/service_bindings/{binding_id}/last_operation][%d] serviceBindingLastOperationGetGone %s", 410, payload) } func (o *ServiceBindingLastOperationGetGone) GetPayload() *models.Error { diff --git a/power/client/service_bindings/service_binding_unbinding_responses.go b/power/client/service_bindings/service_binding_unbinding_responses.go index 6f1cb703..2fdaa4f6 100644 --- a/power/client/service_bindings/service_binding_unbinding_responses.go +++ b/power/client/service_bindings/service_binding_unbinding_responses.go @@ -6,6 +6,7 @@ package service_bindings // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -115,11 +116,13 @@ func (o *ServiceBindingUnbindingOK) Code() int { } func (o *ServiceBindingUnbindingOK) Error() string { - return fmt.Sprintf("[DELETE /v2/service_instances/{instance_id}/service_bindings/{binding_id}][%d] serviceBindingUnbindingOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /v2/service_instances/{instance_id}/service_bindings/{binding_id}][%d] serviceBindingUnbindingOK %s", 200, payload) } func (o *ServiceBindingUnbindingOK) String() string { - return fmt.Sprintf("[DELETE /v2/service_instances/{instance_id}/service_bindings/{binding_id}][%d] serviceBindingUnbindingOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /v2/service_instances/{instance_id}/service_bindings/{binding_id}][%d] serviceBindingUnbindingOK %s", 200, payload) } func (o *ServiceBindingUnbindingOK) GetPayload() models.Object { @@ -181,11 +184,13 @@ func (o *ServiceBindingUnbindingAccepted) Code() int { } func (o *ServiceBindingUnbindingAccepted) Error() string { - return fmt.Sprintf("[DELETE /v2/service_instances/{instance_id}/service_bindings/{binding_id}][%d] serviceBindingUnbindingAccepted %+v", 202, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /v2/service_instances/{instance_id}/service_bindings/{binding_id}][%d] serviceBindingUnbindingAccepted %s", 202, payload) } func (o *ServiceBindingUnbindingAccepted) String() string { - return fmt.Sprintf("[DELETE /v2/service_instances/{instance_id}/service_bindings/{binding_id}][%d] serviceBindingUnbindingAccepted %+v", 202, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /v2/service_instances/{instance_id}/service_bindings/{binding_id}][%d] serviceBindingUnbindingAccepted %s", 202, payload) } func (o *ServiceBindingUnbindingAccepted) GetPayload() *models.AsyncOperation { @@ -249,11 +254,13 @@ func (o *ServiceBindingUnbindingBadRequest) Code() int { } func (o *ServiceBindingUnbindingBadRequest) Error() string { - return fmt.Sprintf("[DELETE /v2/service_instances/{instance_id}/service_bindings/{binding_id}][%d] serviceBindingUnbindingBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /v2/service_instances/{instance_id}/service_bindings/{binding_id}][%d] serviceBindingUnbindingBadRequest %s", 400, payload) } func (o *ServiceBindingUnbindingBadRequest) String() string { - return fmt.Sprintf("[DELETE /v2/service_instances/{instance_id}/service_bindings/{binding_id}][%d] serviceBindingUnbindingBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /v2/service_instances/{instance_id}/service_bindings/{binding_id}][%d] serviceBindingUnbindingBadRequest %s", 400, payload) } func (o *ServiceBindingUnbindingBadRequest) GetPayload() *models.Error { @@ -317,11 +324,13 @@ func (o *ServiceBindingUnbindingUnauthorized) Code() int { } func (o *ServiceBindingUnbindingUnauthorized) Error() string { - return fmt.Sprintf("[DELETE /v2/service_instances/{instance_id}/service_bindings/{binding_id}][%d] serviceBindingUnbindingUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /v2/service_instances/{instance_id}/service_bindings/{binding_id}][%d] serviceBindingUnbindingUnauthorized %s", 401, payload) } func (o *ServiceBindingUnbindingUnauthorized) String() string { - return fmt.Sprintf("[DELETE /v2/service_instances/{instance_id}/service_bindings/{binding_id}][%d] serviceBindingUnbindingUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /v2/service_instances/{instance_id}/service_bindings/{binding_id}][%d] serviceBindingUnbindingUnauthorized %s", 401, payload) } func (o *ServiceBindingUnbindingUnauthorized) GetPayload() *models.Error { @@ -385,11 +394,13 @@ func (o *ServiceBindingUnbindingForbidden) Code() int { } func (o *ServiceBindingUnbindingForbidden) Error() string { - return fmt.Sprintf("[DELETE /v2/service_instances/{instance_id}/service_bindings/{binding_id}][%d] serviceBindingUnbindingForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /v2/service_instances/{instance_id}/service_bindings/{binding_id}][%d] serviceBindingUnbindingForbidden %s", 403, payload) } func (o *ServiceBindingUnbindingForbidden) String() string { - return fmt.Sprintf("[DELETE /v2/service_instances/{instance_id}/service_bindings/{binding_id}][%d] serviceBindingUnbindingForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /v2/service_instances/{instance_id}/service_bindings/{binding_id}][%d] serviceBindingUnbindingForbidden %s", 403, payload) } func (o *ServiceBindingUnbindingForbidden) GetPayload() *models.Error { @@ -453,11 +464,13 @@ func (o *ServiceBindingUnbindingNotFound) Code() int { } func (o *ServiceBindingUnbindingNotFound) Error() string { - return fmt.Sprintf("[DELETE /v2/service_instances/{instance_id}/service_bindings/{binding_id}][%d] serviceBindingUnbindingNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /v2/service_instances/{instance_id}/service_bindings/{binding_id}][%d] serviceBindingUnbindingNotFound %s", 404, payload) } func (o *ServiceBindingUnbindingNotFound) String() string { - return fmt.Sprintf("[DELETE /v2/service_instances/{instance_id}/service_bindings/{binding_id}][%d] serviceBindingUnbindingNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /v2/service_instances/{instance_id}/service_bindings/{binding_id}][%d] serviceBindingUnbindingNotFound %s", 404, payload) } func (o *ServiceBindingUnbindingNotFound) GetPayload() *models.Error { @@ -521,11 +534,13 @@ func (o *ServiceBindingUnbindingGone) Code() int { } func (o *ServiceBindingUnbindingGone) Error() string { - return fmt.Sprintf("[DELETE /v2/service_instances/{instance_id}/service_bindings/{binding_id}][%d] serviceBindingUnbindingGone %+v", 410, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /v2/service_instances/{instance_id}/service_bindings/{binding_id}][%d] serviceBindingUnbindingGone %s", 410, payload) } func (o *ServiceBindingUnbindingGone) String() string { - return fmt.Sprintf("[DELETE /v2/service_instances/{instance_id}/service_bindings/{binding_id}][%d] serviceBindingUnbindingGone %+v", 410, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /v2/service_instances/{instance_id}/service_bindings/{binding_id}][%d] serviceBindingUnbindingGone %s", 410, payload) } func (o *ServiceBindingUnbindingGone) GetPayload() *models.Error { diff --git a/power/client/service_bindings/service_bindings_client.go b/power/client/service_bindings/service_bindings_client.go index 73c69f53..7eb11603 100644 --- a/power/client/service_bindings/service_bindings_client.go +++ b/power/client/service_bindings/service_bindings_client.go @@ -9,6 +9,7 @@ import ( "fmt" "github.com/go-openapi/runtime" + httptransport "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" ) @@ -17,6 +18,31 @@ func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientServi return &Client{transport: transport, formats: formats} } +// New creates a new service bindings API client with basic auth credentials. +// It takes the following parameters: +// - host: http host (github.com). +// - basePath: any base path for the API client ("/v1", "/v3"). +// - scheme: http scheme ("http", "https"). +// - user: user for basic authentication header. +// - password: password for basic authentication header. +func NewClientWithBasicAuth(host, basePath, scheme, user, password string) ClientService { + transport := httptransport.New(host, basePath, []string{scheme}) + transport.DefaultAuthentication = httptransport.BasicAuth(user, password) + return &Client{transport: transport, formats: strfmt.Default} +} + +// New creates a new service bindings API client with a bearer token for authentication. +// It takes the following parameters: +// - host: http host (github.com). +// - basePath: any base path for the API client ("/v1", "/v3"). +// - scheme: http scheme ("http", "https"). +// - bearerToken: bearer token for Bearer authentication header. +func NewClientWithBearerToken(host, basePath, scheme, bearerToken string) ClientService { + transport := httptransport.New(host, basePath, []string{scheme}) + transport.DefaultAuthentication = httptransport.BearerToken(bearerToken) + return &Client{transport: transport, formats: strfmt.Default} +} + /* Client for service bindings API */ @@ -25,7 +51,7 @@ type Client struct { formats strfmt.Registry } -// ClientOption is the option for Client methods +// ClientOption may be used to customize the behavior of Client methods. type ClientOption func(*runtime.ClientOperation) // ClientService is the interface for Client methods diff --git a/power/client/service_instances/service_instance_deprovision_responses.go b/power/client/service_instances/service_instance_deprovision_responses.go index 9c2251ee..83b0ddd2 100644 --- a/power/client/service_instances/service_instance_deprovision_responses.go +++ b/power/client/service_instances/service_instance_deprovision_responses.go @@ -6,6 +6,7 @@ package service_instances // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -121,11 +122,13 @@ func (o *ServiceInstanceDeprovisionOK) Code() int { } func (o *ServiceInstanceDeprovisionOK) Error() string { - return fmt.Sprintf("[DELETE /v2/service_instances/{instance_id}][%d] serviceInstanceDeprovisionOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /v2/service_instances/{instance_id}][%d] serviceInstanceDeprovisionOK %s", 200, payload) } func (o *ServiceInstanceDeprovisionOK) String() string { - return fmt.Sprintf("[DELETE /v2/service_instances/{instance_id}][%d] serviceInstanceDeprovisionOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /v2/service_instances/{instance_id}][%d] serviceInstanceDeprovisionOK %s", 200, payload) } func (o *ServiceInstanceDeprovisionOK) GetPayload() models.Object { @@ -187,11 +190,13 @@ func (o *ServiceInstanceDeprovisionAccepted) Code() int { } func (o *ServiceInstanceDeprovisionAccepted) Error() string { - return fmt.Sprintf("[DELETE /v2/service_instances/{instance_id}][%d] serviceInstanceDeprovisionAccepted %+v", 202, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /v2/service_instances/{instance_id}][%d] serviceInstanceDeprovisionAccepted %s", 202, payload) } func (o *ServiceInstanceDeprovisionAccepted) String() string { - return fmt.Sprintf("[DELETE /v2/service_instances/{instance_id}][%d] serviceInstanceDeprovisionAccepted %+v", 202, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /v2/service_instances/{instance_id}][%d] serviceInstanceDeprovisionAccepted %s", 202, payload) } func (o *ServiceInstanceDeprovisionAccepted) GetPayload() *models.AsyncOperation { @@ -255,11 +260,13 @@ func (o *ServiceInstanceDeprovisionBadRequest) Code() int { } func (o *ServiceInstanceDeprovisionBadRequest) Error() string { - return fmt.Sprintf("[DELETE /v2/service_instances/{instance_id}][%d] serviceInstanceDeprovisionBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /v2/service_instances/{instance_id}][%d] serviceInstanceDeprovisionBadRequest %s", 400, payload) } func (o *ServiceInstanceDeprovisionBadRequest) String() string { - return fmt.Sprintf("[DELETE /v2/service_instances/{instance_id}][%d] serviceInstanceDeprovisionBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /v2/service_instances/{instance_id}][%d] serviceInstanceDeprovisionBadRequest %s", 400, payload) } func (o *ServiceInstanceDeprovisionBadRequest) GetPayload() *models.Error { @@ -323,11 +330,13 @@ func (o *ServiceInstanceDeprovisionUnauthorized) Code() int { } func (o *ServiceInstanceDeprovisionUnauthorized) Error() string { - return fmt.Sprintf("[DELETE /v2/service_instances/{instance_id}][%d] serviceInstanceDeprovisionUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /v2/service_instances/{instance_id}][%d] serviceInstanceDeprovisionUnauthorized %s", 401, payload) } func (o *ServiceInstanceDeprovisionUnauthorized) String() string { - return fmt.Sprintf("[DELETE /v2/service_instances/{instance_id}][%d] serviceInstanceDeprovisionUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /v2/service_instances/{instance_id}][%d] serviceInstanceDeprovisionUnauthorized %s", 401, payload) } func (o *ServiceInstanceDeprovisionUnauthorized) GetPayload() *models.Error { @@ -391,11 +400,13 @@ func (o *ServiceInstanceDeprovisionForbidden) Code() int { } func (o *ServiceInstanceDeprovisionForbidden) Error() string { - return fmt.Sprintf("[DELETE /v2/service_instances/{instance_id}][%d] serviceInstanceDeprovisionForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /v2/service_instances/{instance_id}][%d] serviceInstanceDeprovisionForbidden %s", 403, payload) } func (o *ServiceInstanceDeprovisionForbidden) String() string { - return fmt.Sprintf("[DELETE /v2/service_instances/{instance_id}][%d] serviceInstanceDeprovisionForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /v2/service_instances/{instance_id}][%d] serviceInstanceDeprovisionForbidden %s", 403, payload) } func (o *ServiceInstanceDeprovisionForbidden) GetPayload() *models.Error { @@ -459,11 +470,13 @@ func (o *ServiceInstanceDeprovisionNotFound) Code() int { } func (o *ServiceInstanceDeprovisionNotFound) Error() string { - return fmt.Sprintf("[DELETE /v2/service_instances/{instance_id}][%d] serviceInstanceDeprovisionNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /v2/service_instances/{instance_id}][%d] serviceInstanceDeprovisionNotFound %s", 404, payload) } func (o *ServiceInstanceDeprovisionNotFound) String() string { - return fmt.Sprintf("[DELETE /v2/service_instances/{instance_id}][%d] serviceInstanceDeprovisionNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /v2/service_instances/{instance_id}][%d] serviceInstanceDeprovisionNotFound %s", 404, payload) } func (o *ServiceInstanceDeprovisionNotFound) GetPayload() *models.Error { @@ -527,11 +540,13 @@ func (o *ServiceInstanceDeprovisionGone) Code() int { } func (o *ServiceInstanceDeprovisionGone) Error() string { - return fmt.Sprintf("[DELETE /v2/service_instances/{instance_id}][%d] serviceInstanceDeprovisionGone %+v", 410, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /v2/service_instances/{instance_id}][%d] serviceInstanceDeprovisionGone %s", 410, payload) } func (o *ServiceInstanceDeprovisionGone) String() string { - return fmt.Sprintf("[DELETE /v2/service_instances/{instance_id}][%d] serviceInstanceDeprovisionGone %+v", 410, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /v2/service_instances/{instance_id}][%d] serviceInstanceDeprovisionGone %s", 410, payload) } func (o *ServiceInstanceDeprovisionGone) GetPayload() *models.Error { @@ -595,11 +610,13 @@ func (o *ServiceInstanceDeprovisionUnprocessableEntity) Code() int { } func (o *ServiceInstanceDeprovisionUnprocessableEntity) Error() string { - return fmt.Sprintf("[DELETE /v2/service_instances/{instance_id}][%d] serviceInstanceDeprovisionUnprocessableEntity %+v", 422, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /v2/service_instances/{instance_id}][%d] serviceInstanceDeprovisionUnprocessableEntity %s", 422, payload) } func (o *ServiceInstanceDeprovisionUnprocessableEntity) String() string { - return fmt.Sprintf("[DELETE /v2/service_instances/{instance_id}][%d] serviceInstanceDeprovisionUnprocessableEntity %+v", 422, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /v2/service_instances/{instance_id}][%d] serviceInstanceDeprovisionUnprocessableEntity %s", 422, payload) } func (o *ServiceInstanceDeprovisionUnprocessableEntity) GetPayload() *models.Error { diff --git a/power/client/service_instances/service_instance_get_responses.go b/power/client/service_instances/service_instance_get_responses.go index f80a178f..d94ed17c 100644 --- a/power/client/service_instances/service_instance_get_responses.go +++ b/power/client/service_instances/service_instance_get_responses.go @@ -6,6 +6,7 @@ package service_instances // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -103,11 +104,13 @@ func (o *ServiceInstanceGetOK) Code() int { } func (o *ServiceInstanceGetOK) Error() string { - return fmt.Sprintf("[GET /v2/service_instances/{instance_id}][%d] serviceInstanceGetOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /v2/service_instances/{instance_id}][%d] serviceInstanceGetOK %s", 200, payload) } func (o *ServiceInstanceGetOK) String() string { - return fmt.Sprintf("[GET /v2/service_instances/{instance_id}][%d] serviceInstanceGetOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /v2/service_instances/{instance_id}][%d] serviceInstanceGetOK %s", 200, payload) } func (o *ServiceInstanceGetOK) GetPayload() *models.ServiceInstanceResource { @@ -171,11 +174,13 @@ func (o *ServiceInstanceGetBadRequest) Code() int { } func (o *ServiceInstanceGetBadRequest) Error() string { - return fmt.Sprintf("[GET /v2/service_instances/{instance_id}][%d] serviceInstanceGetBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /v2/service_instances/{instance_id}][%d] serviceInstanceGetBadRequest %s", 400, payload) } func (o *ServiceInstanceGetBadRequest) String() string { - return fmt.Sprintf("[GET /v2/service_instances/{instance_id}][%d] serviceInstanceGetBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /v2/service_instances/{instance_id}][%d] serviceInstanceGetBadRequest %s", 400, payload) } func (o *ServiceInstanceGetBadRequest) GetPayload() *models.Error { @@ -239,11 +244,13 @@ func (o *ServiceInstanceGetUnauthorized) Code() int { } func (o *ServiceInstanceGetUnauthorized) Error() string { - return fmt.Sprintf("[GET /v2/service_instances/{instance_id}][%d] serviceInstanceGetUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /v2/service_instances/{instance_id}][%d] serviceInstanceGetUnauthorized %s", 401, payload) } func (o *ServiceInstanceGetUnauthorized) String() string { - return fmt.Sprintf("[GET /v2/service_instances/{instance_id}][%d] serviceInstanceGetUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /v2/service_instances/{instance_id}][%d] serviceInstanceGetUnauthorized %s", 401, payload) } func (o *ServiceInstanceGetUnauthorized) GetPayload() *models.Error { @@ -307,11 +314,13 @@ func (o *ServiceInstanceGetForbidden) Code() int { } func (o *ServiceInstanceGetForbidden) Error() string { - return fmt.Sprintf("[GET /v2/service_instances/{instance_id}][%d] serviceInstanceGetForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /v2/service_instances/{instance_id}][%d] serviceInstanceGetForbidden %s", 403, payload) } func (o *ServiceInstanceGetForbidden) String() string { - return fmt.Sprintf("[GET /v2/service_instances/{instance_id}][%d] serviceInstanceGetForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /v2/service_instances/{instance_id}][%d] serviceInstanceGetForbidden %s", 403, payload) } func (o *ServiceInstanceGetForbidden) GetPayload() *models.Error { @@ -375,11 +384,13 @@ func (o *ServiceInstanceGetNotFound) Code() int { } func (o *ServiceInstanceGetNotFound) Error() string { - return fmt.Sprintf("[GET /v2/service_instances/{instance_id}][%d] serviceInstanceGetNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /v2/service_instances/{instance_id}][%d] serviceInstanceGetNotFound %s", 404, payload) } func (o *ServiceInstanceGetNotFound) String() string { - return fmt.Sprintf("[GET /v2/service_instances/{instance_id}][%d] serviceInstanceGetNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /v2/service_instances/{instance_id}][%d] serviceInstanceGetNotFound %s", 404, payload) } func (o *ServiceInstanceGetNotFound) GetPayload() *models.Error { diff --git a/power/client/service_instances/service_instance_last_operation_get_responses.go b/power/client/service_instances/service_instance_last_operation_get_responses.go index 866c00b5..e9a10245 100644 --- a/power/client/service_instances/service_instance_last_operation_get_responses.go +++ b/power/client/service_instances/service_instance_last_operation_get_responses.go @@ -6,6 +6,7 @@ package service_instances // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -109,11 +110,13 @@ func (o *ServiceInstanceLastOperationGetOK) Code() int { } func (o *ServiceInstanceLastOperationGetOK) Error() string { - return fmt.Sprintf("[GET /v2/service_instances/{instance_id}/last_operation][%d] serviceInstanceLastOperationGetOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /v2/service_instances/{instance_id}/last_operation][%d] serviceInstanceLastOperationGetOK %s", 200, payload) } func (o *ServiceInstanceLastOperationGetOK) String() string { - return fmt.Sprintf("[GET /v2/service_instances/{instance_id}/last_operation][%d] serviceInstanceLastOperationGetOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /v2/service_instances/{instance_id}/last_operation][%d] serviceInstanceLastOperationGetOK %s", 200, payload) } func (o *ServiceInstanceLastOperationGetOK) GetPayload() *models.LastOperationResource { @@ -177,11 +180,13 @@ func (o *ServiceInstanceLastOperationGetBadRequest) Code() int { } func (o *ServiceInstanceLastOperationGetBadRequest) Error() string { - return fmt.Sprintf("[GET /v2/service_instances/{instance_id}/last_operation][%d] serviceInstanceLastOperationGetBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /v2/service_instances/{instance_id}/last_operation][%d] serviceInstanceLastOperationGetBadRequest %s", 400, payload) } func (o *ServiceInstanceLastOperationGetBadRequest) String() string { - return fmt.Sprintf("[GET /v2/service_instances/{instance_id}/last_operation][%d] serviceInstanceLastOperationGetBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /v2/service_instances/{instance_id}/last_operation][%d] serviceInstanceLastOperationGetBadRequest %s", 400, payload) } func (o *ServiceInstanceLastOperationGetBadRequest) GetPayload() *models.Error { @@ -245,11 +250,13 @@ func (o *ServiceInstanceLastOperationGetUnauthorized) Code() int { } func (o *ServiceInstanceLastOperationGetUnauthorized) Error() string { - return fmt.Sprintf("[GET /v2/service_instances/{instance_id}/last_operation][%d] serviceInstanceLastOperationGetUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /v2/service_instances/{instance_id}/last_operation][%d] serviceInstanceLastOperationGetUnauthorized %s", 401, payload) } func (o *ServiceInstanceLastOperationGetUnauthorized) String() string { - return fmt.Sprintf("[GET /v2/service_instances/{instance_id}/last_operation][%d] serviceInstanceLastOperationGetUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /v2/service_instances/{instance_id}/last_operation][%d] serviceInstanceLastOperationGetUnauthorized %s", 401, payload) } func (o *ServiceInstanceLastOperationGetUnauthorized) GetPayload() *models.Error { @@ -313,11 +320,13 @@ func (o *ServiceInstanceLastOperationGetForbidden) Code() int { } func (o *ServiceInstanceLastOperationGetForbidden) Error() string { - return fmt.Sprintf("[GET /v2/service_instances/{instance_id}/last_operation][%d] serviceInstanceLastOperationGetForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /v2/service_instances/{instance_id}/last_operation][%d] serviceInstanceLastOperationGetForbidden %s", 403, payload) } func (o *ServiceInstanceLastOperationGetForbidden) String() string { - return fmt.Sprintf("[GET /v2/service_instances/{instance_id}/last_operation][%d] serviceInstanceLastOperationGetForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /v2/service_instances/{instance_id}/last_operation][%d] serviceInstanceLastOperationGetForbidden %s", 403, payload) } func (o *ServiceInstanceLastOperationGetForbidden) GetPayload() *models.Error { @@ -381,11 +390,13 @@ func (o *ServiceInstanceLastOperationGetNotFound) Code() int { } func (o *ServiceInstanceLastOperationGetNotFound) Error() string { - return fmt.Sprintf("[GET /v2/service_instances/{instance_id}/last_operation][%d] serviceInstanceLastOperationGetNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /v2/service_instances/{instance_id}/last_operation][%d] serviceInstanceLastOperationGetNotFound %s", 404, payload) } func (o *ServiceInstanceLastOperationGetNotFound) String() string { - return fmt.Sprintf("[GET /v2/service_instances/{instance_id}/last_operation][%d] serviceInstanceLastOperationGetNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /v2/service_instances/{instance_id}/last_operation][%d] serviceInstanceLastOperationGetNotFound %s", 404, payload) } func (o *ServiceInstanceLastOperationGetNotFound) GetPayload() *models.Error { @@ -449,11 +460,13 @@ func (o *ServiceInstanceLastOperationGetGone) Code() int { } func (o *ServiceInstanceLastOperationGetGone) Error() string { - return fmt.Sprintf("[GET /v2/service_instances/{instance_id}/last_operation][%d] serviceInstanceLastOperationGetGone %+v", 410, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /v2/service_instances/{instance_id}/last_operation][%d] serviceInstanceLastOperationGetGone %s", 410, payload) } func (o *ServiceInstanceLastOperationGetGone) String() string { - return fmt.Sprintf("[GET /v2/service_instances/{instance_id}/last_operation][%d] serviceInstanceLastOperationGetGone %+v", 410, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /v2/service_instances/{instance_id}/last_operation][%d] serviceInstanceLastOperationGetGone %s", 410, payload) } func (o *ServiceInstanceLastOperationGetGone) GetPayload() *models.Error { diff --git a/power/client/service_instances/service_instance_provision_responses.go b/power/client/service_instances/service_instance_provision_responses.go index 89e977ad..6d82abbf 100644 --- a/power/client/service_instances/service_instance_provision_responses.go +++ b/power/client/service_instances/service_instance_provision_responses.go @@ -6,6 +6,7 @@ package service_instances // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -127,11 +128,13 @@ func (o *ServiceInstanceProvisionOK) Code() int { } func (o *ServiceInstanceProvisionOK) Error() string { - return fmt.Sprintf("[PUT /v2/service_instances/{instance_id}][%d] serviceInstanceProvisionOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /v2/service_instances/{instance_id}][%d] serviceInstanceProvisionOK %s", 200, payload) } func (o *ServiceInstanceProvisionOK) String() string { - return fmt.Sprintf("[PUT /v2/service_instances/{instance_id}][%d] serviceInstanceProvisionOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /v2/service_instances/{instance_id}][%d] serviceInstanceProvisionOK %s", 200, payload) } func (o *ServiceInstanceProvisionOK) GetPayload() *models.ServiceInstanceProvision { @@ -195,11 +198,13 @@ func (o *ServiceInstanceProvisionCreated) Code() int { } func (o *ServiceInstanceProvisionCreated) Error() string { - return fmt.Sprintf("[PUT /v2/service_instances/{instance_id}][%d] serviceInstanceProvisionCreated %+v", 201, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /v2/service_instances/{instance_id}][%d] serviceInstanceProvisionCreated %s", 201, payload) } func (o *ServiceInstanceProvisionCreated) String() string { - return fmt.Sprintf("[PUT /v2/service_instances/{instance_id}][%d] serviceInstanceProvisionCreated %+v", 201, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /v2/service_instances/{instance_id}][%d] serviceInstanceProvisionCreated %s", 201, payload) } func (o *ServiceInstanceProvisionCreated) GetPayload() *models.ServiceInstanceProvision { @@ -263,11 +268,13 @@ func (o *ServiceInstanceProvisionAccepted) Code() int { } func (o *ServiceInstanceProvisionAccepted) Error() string { - return fmt.Sprintf("[PUT /v2/service_instances/{instance_id}][%d] serviceInstanceProvisionAccepted %+v", 202, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /v2/service_instances/{instance_id}][%d] serviceInstanceProvisionAccepted %s", 202, payload) } func (o *ServiceInstanceProvisionAccepted) String() string { - return fmt.Sprintf("[PUT /v2/service_instances/{instance_id}][%d] serviceInstanceProvisionAccepted %+v", 202, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /v2/service_instances/{instance_id}][%d] serviceInstanceProvisionAccepted %s", 202, payload) } func (o *ServiceInstanceProvisionAccepted) GetPayload() *models.ServiceInstanceAsyncOperation { @@ -331,11 +338,13 @@ func (o *ServiceInstanceProvisionBadRequest) Code() int { } func (o *ServiceInstanceProvisionBadRequest) Error() string { - return fmt.Sprintf("[PUT /v2/service_instances/{instance_id}][%d] serviceInstanceProvisionBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /v2/service_instances/{instance_id}][%d] serviceInstanceProvisionBadRequest %s", 400, payload) } func (o *ServiceInstanceProvisionBadRequest) String() string { - return fmt.Sprintf("[PUT /v2/service_instances/{instance_id}][%d] serviceInstanceProvisionBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /v2/service_instances/{instance_id}][%d] serviceInstanceProvisionBadRequest %s", 400, payload) } func (o *ServiceInstanceProvisionBadRequest) GetPayload() *models.Error { @@ -399,11 +408,13 @@ func (o *ServiceInstanceProvisionUnauthorized) Code() int { } func (o *ServiceInstanceProvisionUnauthorized) Error() string { - return fmt.Sprintf("[PUT /v2/service_instances/{instance_id}][%d] serviceInstanceProvisionUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /v2/service_instances/{instance_id}][%d] serviceInstanceProvisionUnauthorized %s", 401, payload) } func (o *ServiceInstanceProvisionUnauthorized) String() string { - return fmt.Sprintf("[PUT /v2/service_instances/{instance_id}][%d] serviceInstanceProvisionUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /v2/service_instances/{instance_id}][%d] serviceInstanceProvisionUnauthorized %s", 401, payload) } func (o *ServiceInstanceProvisionUnauthorized) GetPayload() *models.Error { @@ -467,11 +478,13 @@ func (o *ServiceInstanceProvisionForbidden) Code() int { } func (o *ServiceInstanceProvisionForbidden) Error() string { - return fmt.Sprintf("[PUT /v2/service_instances/{instance_id}][%d] serviceInstanceProvisionForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /v2/service_instances/{instance_id}][%d] serviceInstanceProvisionForbidden %s", 403, payload) } func (o *ServiceInstanceProvisionForbidden) String() string { - return fmt.Sprintf("[PUT /v2/service_instances/{instance_id}][%d] serviceInstanceProvisionForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /v2/service_instances/{instance_id}][%d] serviceInstanceProvisionForbidden %s", 403, payload) } func (o *ServiceInstanceProvisionForbidden) GetPayload() *models.Error { @@ -535,11 +548,13 @@ func (o *ServiceInstanceProvisionNotFound) Code() int { } func (o *ServiceInstanceProvisionNotFound) Error() string { - return fmt.Sprintf("[PUT /v2/service_instances/{instance_id}][%d] serviceInstanceProvisionNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /v2/service_instances/{instance_id}][%d] serviceInstanceProvisionNotFound %s", 404, payload) } func (o *ServiceInstanceProvisionNotFound) String() string { - return fmt.Sprintf("[PUT /v2/service_instances/{instance_id}][%d] serviceInstanceProvisionNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /v2/service_instances/{instance_id}][%d] serviceInstanceProvisionNotFound %s", 404, payload) } func (o *ServiceInstanceProvisionNotFound) GetPayload() *models.Error { @@ -603,11 +618,13 @@ func (o *ServiceInstanceProvisionConflict) Code() int { } func (o *ServiceInstanceProvisionConflict) Error() string { - return fmt.Sprintf("[PUT /v2/service_instances/{instance_id}][%d] serviceInstanceProvisionConflict %+v", 409, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /v2/service_instances/{instance_id}][%d] serviceInstanceProvisionConflict %s", 409, payload) } func (o *ServiceInstanceProvisionConflict) String() string { - return fmt.Sprintf("[PUT /v2/service_instances/{instance_id}][%d] serviceInstanceProvisionConflict %+v", 409, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /v2/service_instances/{instance_id}][%d] serviceInstanceProvisionConflict %s", 409, payload) } func (o *ServiceInstanceProvisionConflict) GetPayload() *models.Error { @@ -671,11 +688,13 @@ func (o *ServiceInstanceProvisionUnprocessableEntity) Code() int { } func (o *ServiceInstanceProvisionUnprocessableEntity) Error() string { - return fmt.Sprintf("[PUT /v2/service_instances/{instance_id}][%d] serviceInstanceProvisionUnprocessableEntity %+v", 422, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /v2/service_instances/{instance_id}][%d] serviceInstanceProvisionUnprocessableEntity %s", 422, payload) } func (o *ServiceInstanceProvisionUnprocessableEntity) String() string { - return fmt.Sprintf("[PUT /v2/service_instances/{instance_id}][%d] serviceInstanceProvisionUnprocessableEntity %+v", 422, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /v2/service_instances/{instance_id}][%d] serviceInstanceProvisionUnprocessableEntity %s", 422, payload) } func (o *ServiceInstanceProvisionUnprocessableEntity) GetPayload() *models.Error { diff --git a/power/client/service_instances/service_instance_update_responses.go b/power/client/service_instances/service_instance_update_responses.go index eeb9bd7c..66aa9ad1 100644 --- a/power/client/service_instances/service_instance_update_responses.go +++ b/power/client/service_instances/service_instance_update_responses.go @@ -6,6 +6,7 @@ package service_instances // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -115,11 +116,13 @@ func (o *ServiceInstanceUpdateOK) Code() int { } func (o *ServiceInstanceUpdateOK) Error() string { - return fmt.Sprintf("[PATCH /v2/service_instances/{instance_id}][%d] serviceInstanceUpdateOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PATCH /v2/service_instances/{instance_id}][%d] serviceInstanceUpdateOK %s", 200, payload) } func (o *ServiceInstanceUpdateOK) String() string { - return fmt.Sprintf("[PATCH /v2/service_instances/{instance_id}][%d] serviceInstanceUpdateOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PATCH /v2/service_instances/{instance_id}][%d] serviceInstanceUpdateOK %s", 200, payload) } func (o *ServiceInstanceUpdateOK) GetPayload() models.Object { @@ -181,11 +184,13 @@ func (o *ServiceInstanceUpdateAccepted) Code() int { } func (o *ServiceInstanceUpdateAccepted) Error() string { - return fmt.Sprintf("[PATCH /v2/service_instances/{instance_id}][%d] serviceInstanceUpdateAccepted %+v", 202, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PATCH /v2/service_instances/{instance_id}][%d] serviceInstanceUpdateAccepted %s", 202, payload) } func (o *ServiceInstanceUpdateAccepted) String() string { - return fmt.Sprintf("[PATCH /v2/service_instances/{instance_id}][%d] serviceInstanceUpdateAccepted %+v", 202, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PATCH /v2/service_instances/{instance_id}][%d] serviceInstanceUpdateAccepted %s", 202, payload) } func (o *ServiceInstanceUpdateAccepted) GetPayload() *models.ServiceInstanceAsyncOperation { @@ -249,11 +254,13 @@ func (o *ServiceInstanceUpdateBadRequest) Code() int { } func (o *ServiceInstanceUpdateBadRequest) Error() string { - return fmt.Sprintf("[PATCH /v2/service_instances/{instance_id}][%d] serviceInstanceUpdateBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PATCH /v2/service_instances/{instance_id}][%d] serviceInstanceUpdateBadRequest %s", 400, payload) } func (o *ServiceInstanceUpdateBadRequest) String() string { - return fmt.Sprintf("[PATCH /v2/service_instances/{instance_id}][%d] serviceInstanceUpdateBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PATCH /v2/service_instances/{instance_id}][%d] serviceInstanceUpdateBadRequest %s", 400, payload) } func (o *ServiceInstanceUpdateBadRequest) GetPayload() *models.Error { @@ -317,11 +324,13 @@ func (o *ServiceInstanceUpdateUnauthorized) Code() int { } func (o *ServiceInstanceUpdateUnauthorized) Error() string { - return fmt.Sprintf("[PATCH /v2/service_instances/{instance_id}][%d] serviceInstanceUpdateUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PATCH /v2/service_instances/{instance_id}][%d] serviceInstanceUpdateUnauthorized %s", 401, payload) } func (o *ServiceInstanceUpdateUnauthorized) String() string { - return fmt.Sprintf("[PATCH /v2/service_instances/{instance_id}][%d] serviceInstanceUpdateUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PATCH /v2/service_instances/{instance_id}][%d] serviceInstanceUpdateUnauthorized %s", 401, payload) } func (o *ServiceInstanceUpdateUnauthorized) GetPayload() *models.Error { @@ -385,11 +394,13 @@ func (o *ServiceInstanceUpdateForbidden) Code() int { } func (o *ServiceInstanceUpdateForbidden) Error() string { - return fmt.Sprintf("[PATCH /v2/service_instances/{instance_id}][%d] serviceInstanceUpdateForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PATCH /v2/service_instances/{instance_id}][%d] serviceInstanceUpdateForbidden %s", 403, payload) } func (o *ServiceInstanceUpdateForbidden) String() string { - return fmt.Sprintf("[PATCH /v2/service_instances/{instance_id}][%d] serviceInstanceUpdateForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PATCH /v2/service_instances/{instance_id}][%d] serviceInstanceUpdateForbidden %s", 403, payload) } func (o *ServiceInstanceUpdateForbidden) GetPayload() *models.Error { @@ -453,11 +464,13 @@ func (o *ServiceInstanceUpdateNotFound) Code() int { } func (o *ServiceInstanceUpdateNotFound) Error() string { - return fmt.Sprintf("[PATCH /v2/service_instances/{instance_id}][%d] serviceInstanceUpdateNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PATCH /v2/service_instances/{instance_id}][%d] serviceInstanceUpdateNotFound %s", 404, payload) } func (o *ServiceInstanceUpdateNotFound) String() string { - return fmt.Sprintf("[PATCH /v2/service_instances/{instance_id}][%d] serviceInstanceUpdateNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PATCH /v2/service_instances/{instance_id}][%d] serviceInstanceUpdateNotFound %s", 404, payload) } func (o *ServiceInstanceUpdateNotFound) GetPayload() *models.Error { @@ -521,11 +534,13 @@ func (o *ServiceInstanceUpdateUnprocessableEntity) Code() int { } func (o *ServiceInstanceUpdateUnprocessableEntity) Error() string { - return fmt.Sprintf("[PATCH /v2/service_instances/{instance_id}][%d] serviceInstanceUpdateUnprocessableEntity %+v", 422, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PATCH /v2/service_instances/{instance_id}][%d] serviceInstanceUpdateUnprocessableEntity %s", 422, payload) } func (o *ServiceInstanceUpdateUnprocessableEntity) String() string { - return fmt.Sprintf("[PATCH /v2/service_instances/{instance_id}][%d] serviceInstanceUpdateUnprocessableEntity %+v", 422, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PATCH /v2/service_instances/{instance_id}][%d] serviceInstanceUpdateUnprocessableEntity %s", 422, payload) } func (o *ServiceInstanceUpdateUnprocessableEntity) GetPayload() *models.Error { diff --git a/power/client/service_instances/service_instances_client.go b/power/client/service_instances/service_instances_client.go index 9dc2833e..094ce61c 100644 --- a/power/client/service_instances/service_instances_client.go +++ b/power/client/service_instances/service_instances_client.go @@ -9,6 +9,7 @@ import ( "fmt" "github.com/go-openapi/runtime" + httptransport "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" ) @@ -17,6 +18,31 @@ func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientServi return &Client{transport: transport, formats: formats} } +// New creates a new service instances API client with basic auth credentials. +// It takes the following parameters: +// - host: http host (github.com). +// - basePath: any base path for the API client ("/v1", "/v3"). +// - scheme: http scheme ("http", "https"). +// - user: user for basic authentication header. +// - password: password for basic authentication header. +func NewClientWithBasicAuth(host, basePath, scheme, user, password string) ClientService { + transport := httptransport.New(host, basePath, []string{scheme}) + transport.DefaultAuthentication = httptransport.BasicAuth(user, password) + return &Client{transport: transport, formats: strfmt.Default} +} + +// New creates a new service instances API client with a bearer token for authentication. +// It takes the following parameters: +// - host: http host (github.com). +// - basePath: any base path for the API client ("/v1", "/v3"). +// - scheme: http scheme ("http", "https"). +// - bearerToken: bearer token for Bearer authentication header. +func NewClientWithBearerToken(host, basePath, scheme, bearerToken string) ClientService { + transport := httptransport.New(host, basePath, []string{scheme}) + transport.DefaultAuthentication = httptransport.BearerToken(bearerToken) + return &Client{transport: transport, formats: strfmt.Default} +} + /* Client for service instances API */ @@ -25,7 +51,7 @@ type Client struct { formats strfmt.Registry } -// ClientOption is the option for Client methods +// ClientOption may be used to customize the behavior of Client methods. type ClientOption func(*runtime.ClientOperation) // ClientService is the interface for Client methods diff --git a/power/client/snapshots/snapshots_client.go b/power/client/snapshots/snapshots_client.go new file mode 100644 index 00000000..3ad1d9fc --- /dev/null +++ b/power/client/snapshots/snapshots_client.go @@ -0,0 +1,147 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package snapshots + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + httptransport "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// New creates a new snapshots API client. +func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService { + return &Client{transport: transport, formats: formats} +} + +// New creates a new snapshots API client with basic auth credentials. +// It takes the following parameters: +// - host: http host (github.com). +// - basePath: any base path for the API client ("/v1", "/v3"). +// - scheme: http scheme ("http", "https"). +// - user: user for basic authentication header. +// - password: password for basic authentication header. +func NewClientWithBasicAuth(host, basePath, scheme, user, password string) ClientService { + transport := httptransport.New(host, basePath, []string{scheme}) + transport.DefaultAuthentication = httptransport.BasicAuth(user, password) + return &Client{transport: transport, formats: strfmt.Default} +} + +// New creates a new snapshots API client with a bearer token for authentication. +// It takes the following parameters: +// - host: http host (github.com). +// - basePath: any base path for the API client ("/v1", "/v3"). +// - scheme: http scheme ("http", "https"). +// - bearerToken: bearer token for Bearer authentication header. +func NewClientWithBearerToken(host, basePath, scheme, bearerToken string) ClientService { + transport := httptransport.New(host, basePath, []string{scheme}) + transport.DefaultAuthentication = httptransport.BearerToken(bearerToken) + return &Client{transport: transport, formats: strfmt.Default} +} + +/* +Client for snapshots API +*/ +type Client struct { + transport runtime.ClientTransport + formats strfmt.Registry +} + +// ClientOption may be used to customize the behavior of Client methods. +type ClientOption func(*runtime.ClientOperation) + +// ClientService is the interface for Client methods +type ClientService interface { + V1SnapshotsGet(params *V1SnapshotsGetParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*V1SnapshotsGetOK, error) + + V1SnapshotsGetall(params *V1SnapshotsGetallParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*V1SnapshotsGetallOK, error) + + SetTransport(transport runtime.ClientTransport) +} + +/* +V1SnapshotsGet gets the detail of a snapshot +*/ +func (a *Client) V1SnapshotsGet(params *V1SnapshotsGetParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*V1SnapshotsGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1SnapshotsGetParams() + } + op := &runtime.ClientOperation{ + ID: "v1.snapshots.get", + Method: "GET", + PathPattern: "/v1/snapshots/{snapshot_id}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &V1SnapshotsGetReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*V1SnapshotsGetOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1.snapshots.get: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1SnapshotsGetall gets a list of all the snapshots on a workspace +*/ +func (a *Client) V1SnapshotsGetall(params *V1SnapshotsGetallParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*V1SnapshotsGetallOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1SnapshotsGetallParams() + } + op := &runtime.ClientOperation{ + ID: "v1.snapshots.getall", + Method: "GET", + PathPattern: "/v1/snapshots", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &V1SnapshotsGetallReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*V1SnapshotsGetallOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1.snapshots.getall: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +// SetTransport changes the transport on the client +func (a *Client) SetTransport(transport runtime.ClientTransport) { + a.transport = transport +} diff --git a/power/client/snapshots/v1_snapshots_get_parameters.go b/power/client/snapshots/v1_snapshots_get_parameters.go new file mode 100644 index 00000000..9777373d --- /dev/null +++ b/power/client/snapshots/v1_snapshots_get_parameters.go @@ -0,0 +1,151 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package snapshots + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1SnapshotsGetParams creates a new V1SnapshotsGetParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewV1SnapshotsGetParams() *V1SnapshotsGetParams { + return &V1SnapshotsGetParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewV1SnapshotsGetParamsWithTimeout creates a new V1SnapshotsGetParams object +// with the ability to set a timeout on a request. +func NewV1SnapshotsGetParamsWithTimeout(timeout time.Duration) *V1SnapshotsGetParams { + return &V1SnapshotsGetParams{ + timeout: timeout, + } +} + +// NewV1SnapshotsGetParamsWithContext creates a new V1SnapshotsGetParams object +// with the ability to set a context for a request. +func NewV1SnapshotsGetParamsWithContext(ctx context.Context) *V1SnapshotsGetParams { + return &V1SnapshotsGetParams{ + Context: ctx, + } +} + +// NewV1SnapshotsGetParamsWithHTTPClient creates a new V1SnapshotsGetParams object +// with the ability to set a custom HTTPClient for a request. +func NewV1SnapshotsGetParamsWithHTTPClient(client *http.Client) *V1SnapshotsGetParams { + return &V1SnapshotsGetParams{ + HTTPClient: client, + } +} + +/* +V1SnapshotsGetParams contains all the parameters to send to the API endpoint + + for the v1 snapshots get operation. + + Typically these are written to a http.Request. +*/ +type V1SnapshotsGetParams struct { + + /* SnapshotID. + + PVM Instance snapshot id + */ + SnapshotID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the v1 snapshots get params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *V1SnapshotsGetParams) WithDefaults() *V1SnapshotsGetParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the v1 snapshots get params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *V1SnapshotsGetParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the v1 snapshots get params +func (o *V1SnapshotsGetParams) WithTimeout(timeout time.Duration) *V1SnapshotsGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 snapshots get params +func (o *V1SnapshotsGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 snapshots get params +func (o *V1SnapshotsGetParams) WithContext(ctx context.Context) *V1SnapshotsGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 snapshots get params +func (o *V1SnapshotsGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 snapshots get params +func (o *V1SnapshotsGetParams) WithHTTPClient(client *http.Client) *V1SnapshotsGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 snapshots get params +func (o *V1SnapshotsGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithSnapshotID adds the snapshotID to the v1 snapshots get params +func (o *V1SnapshotsGetParams) WithSnapshotID(snapshotID string) *V1SnapshotsGetParams { + o.SetSnapshotID(snapshotID) + return o +} + +// SetSnapshotID adds the snapshotId to the v1 snapshots get params +func (o *V1SnapshotsGetParams) SetSnapshotID(snapshotID string) { + o.SnapshotID = snapshotID +} + +// WriteToRequest writes these params to a swagger request +func (o *V1SnapshotsGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param snapshot_id + if err := r.SetPathParam("snapshot_id", o.SnapshotID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/power/client/snapshots/v1_snapshots_get_responses.go b/power/client/snapshots/v1_snapshots_get_responses.go new file mode 100644 index 00000000..ebddf614 --- /dev/null +++ b/power/client/snapshots/v1_snapshots_get_responses.go @@ -0,0 +1,562 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package snapshots + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "encoding/json" + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/IBM-Cloud/power-go-client/power/models" +) + +// V1SnapshotsGetReader is a Reader for the V1SnapshotsGet structure. +type V1SnapshotsGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1SnapshotsGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1SnapshotsGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 400: + result := NewV1SnapshotsGetBadRequest() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 401: + result := NewV1SnapshotsGetUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewV1SnapshotsGetForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewV1SnapshotsGetNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewV1SnapshotsGetInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 503: + result := NewV1SnapshotsGetServiceUnavailable() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + default: + return nil, runtime.NewAPIError("[GET /v1/snapshots/{snapshot_id}] v1.snapshots.get", response, response.Code()) + } +} + +// NewV1SnapshotsGetOK creates a V1SnapshotsGetOK with default headers values +func NewV1SnapshotsGetOK() *V1SnapshotsGetOK { + return &V1SnapshotsGetOK{} +} + +/* +V1SnapshotsGetOK describes a response with status code 200, with default header values. + +OK +*/ +type V1SnapshotsGetOK struct { + Payload *models.SnapshotV1 +} + +// IsSuccess returns true when this v1 snapshots get o k response has a 2xx status code +func (o *V1SnapshotsGetOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this v1 snapshots get o k response has a 3xx status code +func (o *V1SnapshotsGetOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this v1 snapshots get o k response has a 4xx status code +func (o *V1SnapshotsGetOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this v1 snapshots get o k response has a 5xx status code +func (o *V1SnapshotsGetOK) IsServerError() bool { + return false +} + +// IsCode returns true when this v1 snapshots get o k response a status code equal to that given +func (o *V1SnapshotsGetOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the v1 snapshots get o k response +func (o *V1SnapshotsGetOK) Code() int { + return 200 +} + +func (o *V1SnapshotsGetOK) Error() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /v1/snapshots/{snapshot_id}][%d] v1SnapshotsGetOK %s", 200, payload) +} + +func (o *V1SnapshotsGetOK) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /v1/snapshots/{snapshot_id}][%d] v1SnapshotsGetOK %s", 200, payload) +} + +func (o *V1SnapshotsGetOK) GetPayload() *models.SnapshotV1 { + return o.Payload +} + +func (o *V1SnapshotsGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.SnapshotV1) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewV1SnapshotsGetBadRequest creates a V1SnapshotsGetBadRequest with default headers values +func NewV1SnapshotsGetBadRequest() *V1SnapshotsGetBadRequest { + return &V1SnapshotsGetBadRequest{} +} + +/* +V1SnapshotsGetBadRequest describes a response with status code 400, with default header values. + +Bad Request +*/ +type V1SnapshotsGetBadRequest struct { + Payload *models.Error +} + +// IsSuccess returns true when this v1 snapshots get bad request response has a 2xx status code +func (o *V1SnapshotsGetBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this v1 snapshots get bad request response has a 3xx status code +func (o *V1SnapshotsGetBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this v1 snapshots get bad request response has a 4xx status code +func (o *V1SnapshotsGetBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this v1 snapshots get bad request response has a 5xx status code +func (o *V1SnapshotsGetBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this v1 snapshots get bad request response a status code equal to that given +func (o *V1SnapshotsGetBadRequest) IsCode(code int) bool { + return code == 400 +} + +// Code gets the status code for the v1 snapshots get bad request response +func (o *V1SnapshotsGetBadRequest) Code() int { + return 400 +} + +func (o *V1SnapshotsGetBadRequest) Error() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /v1/snapshots/{snapshot_id}][%d] v1SnapshotsGetBadRequest %s", 400, payload) +} + +func (o *V1SnapshotsGetBadRequest) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /v1/snapshots/{snapshot_id}][%d] v1SnapshotsGetBadRequest %s", 400, payload) +} + +func (o *V1SnapshotsGetBadRequest) GetPayload() *models.Error { + return o.Payload +} + +func (o *V1SnapshotsGetBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewV1SnapshotsGetUnauthorized creates a V1SnapshotsGetUnauthorized with default headers values +func NewV1SnapshotsGetUnauthorized() *V1SnapshotsGetUnauthorized { + return &V1SnapshotsGetUnauthorized{} +} + +/* +V1SnapshotsGetUnauthorized describes a response with status code 401, with default header values. + +Unauthorized +*/ +type V1SnapshotsGetUnauthorized struct { + Payload *models.Error +} + +// IsSuccess returns true when this v1 snapshots get unauthorized response has a 2xx status code +func (o *V1SnapshotsGetUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this v1 snapshots get unauthorized response has a 3xx status code +func (o *V1SnapshotsGetUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this v1 snapshots get unauthorized response has a 4xx status code +func (o *V1SnapshotsGetUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this v1 snapshots get unauthorized response has a 5xx status code +func (o *V1SnapshotsGetUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this v1 snapshots get unauthorized response a status code equal to that given +func (o *V1SnapshotsGetUnauthorized) IsCode(code int) bool { + return code == 401 +} + +// Code gets the status code for the v1 snapshots get unauthorized response +func (o *V1SnapshotsGetUnauthorized) Code() int { + return 401 +} + +func (o *V1SnapshotsGetUnauthorized) Error() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /v1/snapshots/{snapshot_id}][%d] v1SnapshotsGetUnauthorized %s", 401, payload) +} + +func (o *V1SnapshotsGetUnauthorized) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /v1/snapshots/{snapshot_id}][%d] v1SnapshotsGetUnauthorized %s", 401, payload) +} + +func (o *V1SnapshotsGetUnauthorized) GetPayload() *models.Error { + return o.Payload +} + +func (o *V1SnapshotsGetUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewV1SnapshotsGetForbidden creates a V1SnapshotsGetForbidden with default headers values +func NewV1SnapshotsGetForbidden() *V1SnapshotsGetForbidden { + return &V1SnapshotsGetForbidden{} +} + +/* +V1SnapshotsGetForbidden describes a response with status code 403, with default header values. + +Forbidden +*/ +type V1SnapshotsGetForbidden struct { + Payload *models.Error +} + +// IsSuccess returns true when this v1 snapshots get forbidden response has a 2xx status code +func (o *V1SnapshotsGetForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this v1 snapshots get forbidden response has a 3xx status code +func (o *V1SnapshotsGetForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this v1 snapshots get forbidden response has a 4xx status code +func (o *V1SnapshotsGetForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this v1 snapshots get forbidden response has a 5xx status code +func (o *V1SnapshotsGetForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this v1 snapshots get forbidden response a status code equal to that given +func (o *V1SnapshotsGetForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the v1 snapshots get forbidden response +func (o *V1SnapshotsGetForbidden) Code() int { + return 403 +} + +func (o *V1SnapshotsGetForbidden) Error() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /v1/snapshots/{snapshot_id}][%d] v1SnapshotsGetForbidden %s", 403, payload) +} + +func (o *V1SnapshotsGetForbidden) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /v1/snapshots/{snapshot_id}][%d] v1SnapshotsGetForbidden %s", 403, payload) +} + +func (o *V1SnapshotsGetForbidden) GetPayload() *models.Error { + return o.Payload +} + +func (o *V1SnapshotsGetForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewV1SnapshotsGetNotFound creates a V1SnapshotsGetNotFound with default headers values +func NewV1SnapshotsGetNotFound() *V1SnapshotsGetNotFound { + return &V1SnapshotsGetNotFound{} +} + +/* +V1SnapshotsGetNotFound describes a response with status code 404, with default header values. + +Not Found +*/ +type V1SnapshotsGetNotFound struct { + Payload *models.Error +} + +// IsSuccess returns true when this v1 snapshots get not found response has a 2xx status code +func (o *V1SnapshotsGetNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this v1 snapshots get not found response has a 3xx status code +func (o *V1SnapshotsGetNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this v1 snapshots get not found response has a 4xx status code +func (o *V1SnapshotsGetNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this v1 snapshots get not found response has a 5xx status code +func (o *V1SnapshotsGetNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this v1 snapshots get not found response a status code equal to that given +func (o *V1SnapshotsGetNotFound) IsCode(code int) bool { + return code == 404 +} + +// Code gets the status code for the v1 snapshots get not found response +func (o *V1SnapshotsGetNotFound) Code() int { + return 404 +} + +func (o *V1SnapshotsGetNotFound) Error() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /v1/snapshots/{snapshot_id}][%d] v1SnapshotsGetNotFound %s", 404, payload) +} + +func (o *V1SnapshotsGetNotFound) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /v1/snapshots/{snapshot_id}][%d] v1SnapshotsGetNotFound %s", 404, payload) +} + +func (o *V1SnapshotsGetNotFound) GetPayload() *models.Error { + return o.Payload +} + +func (o *V1SnapshotsGetNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewV1SnapshotsGetInternalServerError creates a V1SnapshotsGetInternalServerError with default headers values +func NewV1SnapshotsGetInternalServerError() *V1SnapshotsGetInternalServerError { + return &V1SnapshotsGetInternalServerError{} +} + +/* +V1SnapshotsGetInternalServerError describes a response with status code 500, with default header values. + +Internal Server Error +*/ +type V1SnapshotsGetInternalServerError struct { + Payload *models.Error +} + +// IsSuccess returns true when this v1 snapshots get internal server error response has a 2xx status code +func (o *V1SnapshotsGetInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this v1 snapshots get internal server error response has a 3xx status code +func (o *V1SnapshotsGetInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this v1 snapshots get internal server error response has a 4xx status code +func (o *V1SnapshotsGetInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this v1 snapshots get internal server error response has a 5xx status code +func (o *V1SnapshotsGetInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this v1 snapshots get internal server error response a status code equal to that given +func (o *V1SnapshotsGetInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the v1 snapshots get internal server error response +func (o *V1SnapshotsGetInternalServerError) Code() int { + return 500 +} + +func (o *V1SnapshotsGetInternalServerError) Error() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /v1/snapshots/{snapshot_id}][%d] v1SnapshotsGetInternalServerError %s", 500, payload) +} + +func (o *V1SnapshotsGetInternalServerError) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /v1/snapshots/{snapshot_id}][%d] v1SnapshotsGetInternalServerError %s", 500, payload) +} + +func (o *V1SnapshotsGetInternalServerError) GetPayload() *models.Error { + return o.Payload +} + +func (o *V1SnapshotsGetInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewV1SnapshotsGetServiceUnavailable creates a V1SnapshotsGetServiceUnavailable with default headers values +func NewV1SnapshotsGetServiceUnavailable() *V1SnapshotsGetServiceUnavailable { + return &V1SnapshotsGetServiceUnavailable{} +} + +/* +V1SnapshotsGetServiceUnavailable describes a response with status code 503, with default header values. + +Service Unavailable +*/ +type V1SnapshotsGetServiceUnavailable struct { + Payload *models.Error +} + +// IsSuccess returns true when this v1 snapshots get service unavailable response has a 2xx status code +func (o *V1SnapshotsGetServiceUnavailable) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this v1 snapshots get service unavailable response has a 3xx status code +func (o *V1SnapshotsGetServiceUnavailable) IsRedirect() bool { + return false +} + +// IsClientError returns true when this v1 snapshots get service unavailable response has a 4xx status code +func (o *V1SnapshotsGetServiceUnavailable) IsClientError() bool { + return false +} + +// IsServerError returns true when this v1 snapshots get service unavailable response has a 5xx status code +func (o *V1SnapshotsGetServiceUnavailable) IsServerError() bool { + return true +} + +// IsCode returns true when this v1 snapshots get service unavailable response a status code equal to that given +func (o *V1SnapshotsGetServiceUnavailable) IsCode(code int) bool { + return code == 503 +} + +// Code gets the status code for the v1 snapshots get service unavailable response +func (o *V1SnapshotsGetServiceUnavailable) Code() int { + return 503 +} + +func (o *V1SnapshotsGetServiceUnavailable) Error() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /v1/snapshots/{snapshot_id}][%d] v1SnapshotsGetServiceUnavailable %s", 503, payload) +} + +func (o *V1SnapshotsGetServiceUnavailable) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /v1/snapshots/{snapshot_id}][%d] v1SnapshotsGetServiceUnavailable %s", 503, payload) +} + +func (o *V1SnapshotsGetServiceUnavailable) GetPayload() *models.Error { + return o.Payload +} + +func (o *V1SnapshotsGetServiceUnavailable) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/power/client/snapshots/v1_snapshots_getall_parameters.go b/power/client/snapshots/v1_snapshots_getall_parameters.go new file mode 100644 index 00000000..99063ef1 --- /dev/null +++ b/power/client/snapshots/v1_snapshots_getall_parameters.go @@ -0,0 +1,128 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package snapshots + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1SnapshotsGetallParams creates a new V1SnapshotsGetallParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewV1SnapshotsGetallParams() *V1SnapshotsGetallParams { + return &V1SnapshotsGetallParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewV1SnapshotsGetallParamsWithTimeout creates a new V1SnapshotsGetallParams object +// with the ability to set a timeout on a request. +func NewV1SnapshotsGetallParamsWithTimeout(timeout time.Duration) *V1SnapshotsGetallParams { + return &V1SnapshotsGetallParams{ + timeout: timeout, + } +} + +// NewV1SnapshotsGetallParamsWithContext creates a new V1SnapshotsGetallParams object +// with the ability to set a context for a request. +func NewV1SnapshotsGetallParamsWithContext(ctx context.Context) *V1SnapshotsGetallParams { + return &V1SnapshotsGetallParams{ + Context: ctx, + } +} + +// NewV1SnapshotsGetallParamsWithHTTPClient creates a new V1SnapshotsGetallParams object +// with the ability to set a custom HTTPClient for a request. +func NewV1SnapshotsGetallParamsWithHTTPClient(client *http.Client) *V1SnapshotsGetallParams { + return &V1SnapshotsGetallParams{ + HTTPClient: client, + } +} + +/* +V1SnapshotsGetallParams contains all the parameters to send to the API endpoint + + for the v1 snapshots getall operation. + + Typically these are written to a http.Request. +*/ +type V1SnapshotsGetallParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the v1 snapshots getall params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *V1SnapshotsGetallParams) WithDefaults() *V1SnapshotsGetallParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the v1 snapshots getall params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *V1SnapshotsGetallParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the v1 snapshots getall params +func (o *V1SnapshotsGetallParams) WithTimeout(timeout time.Duration) *V1SnapshotsGetallParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 snapshots getall params +func (o *V1SnapshotsGetallParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 snapshots getall params +func (o *V1SnapshotsGetallParams) WithContext(ctx context.Context) *V1SnapshotsGetallParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 snapshots getall params +func (o *V1SnapshotsGetallParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 snapshots getall params +func (o *V1SnapshotsGetallParams) WithHTTPClient(client *http.Client) *V1SnapshotsGetallParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 snapshots getall params +func (o *V1SnapshotsGetallParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *V1SnapshotsGetallParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/power/client/snapshots/v1_snapshots_getall_responses.go b/power/client/snapshots/v1_snapshots_getall_responses.go new file mode 100644 index 00000000..5c4ebf06 --- /dev/null +++ b/power/client/snapshots/v1_snapshots_getall_responses.go @@ -0,0 +1,486 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package snapshots + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "encoding/json" + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/IBM-Cloud/power-go-client/power/models" +) + +// V1SnapshotsGetallReader is a Reader for the V1SnapshotsGetall structure. +type V1SnapshotsGetallReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1SnapshotsGetallReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1SnapshotsGetallOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 401: + result := NewV1SnapshotsGetallUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewV1SnapshotsGetallForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewV1SnapshotsGetallNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewV1SnapshotsGetallInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 503: + result := NewV1SnapshotsGetallServiceUnavailable() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + default: + return nil, runtime.NewAPIError("[GET /v1/snapshots] v1.snapshots.getall", response, response.Code()) + } +} + +// NewV1SnapshotsGetallOK creates a V1SnapshotsGetallOK with default headers values +func NewV1SnapshotsGetallOK() *V1SnapshotsGetallOK { + return &V1SnapshotsGetallOK{} +} + +/* +V1SnapshotsGetallOK describes a response with status code 200, with default header values. + +OK +*/ +type V1SnapshotsGetallOK struct { + Payload *models.SnapshotList +} + +// IsSuccess returns true when this v1 snapshots getall o k response has a 2xx status code +func (o *V1SnapshotsGetallOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this v1 snapshots getall o k response has a 3xx status code +func (o *V1SnapshotsGetallOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this v1 snapshots getall o k response has a 4xx status code +func (o *V1SnapshotsGetallOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this v1 snapshots getall o k response has a 5xx status code +func (o *V1SnapshotsGetallOK) IsServerError() bool { + return false +} + +// IsCode returns true when this v1 snapshots getall o k response a status code equal to that given +func (o *V1SnapshotsGetallOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the v1 snapshots getall o k response +func (o *V1SnapshotsGetallOK) Code() int { + return 200 +} + +func (o *V1SnapshotsGetallOK) Error() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /v1/snapshots][%d] v1SnapshotsGetallOK %s", 200, payload) +} + +func (o *V1SnapshotsGetallOK) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /v1/snapshots][%d] v1SnapshotsGetallOK %s", 200, payload) +} + +func (o *V1SnapshotsGetallOK) GetPayload() *models.SnapshotList { + return o.Payload +} + +func (o *V1SnapshotsGetallOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.SnapshotList) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewV1SnapshotsGetallUnauthorized creates a V1SnapshotsGetallUnauthorized with default headers values +func NewV1SnapshotsGetallUnauthorized() *V1SnapshotsGetallUnauthorized { + return &V1SnapshotsGetallUnauthorized{} +} + +/* +V1SnapshotsGetallUnauthorized describes a response with status code 401, with default header values. + +Unauthorized +*/ +type V1SnapshotsGetallUnauthorized struct { + Payload *models.Error +} + +// IsSuccess returns true when this v1 snapshots getall unauthorized response has a 2xx status code +func (o *V1SnapshotsGetallUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this v1 snapshots getall unauthorized response has a 3xx status code +func (o *V1SnapshotsGetallUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this v1 snapshots getall unauthorized response has a 4xx status code +func (o *V1SnapshotsGetallUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this v1 snapshots getall unauthorized response has a 5xx status code +func (o *V1SnapshotsGetallUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this v1 snapshots getall unauthorized response a status code equal to that given +func (o *V1SnapshotsGetallUnauthorized) IsCode(code int) bool { + return code == 401 +} + +// Code gets the status code for the v1 snapshots getall unauthorized response +func (o *V1SnapshotsGetallUnauthorized) Code() int { + return 401 +} + +func (o *V1SnapshotsGetallUnauthorized) Error() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /v1/snapshots][%d] v1SnapshotsGetallUnauthorized %s", 401, payload) +} + +func (o *V1SnapshotsGetallUnauthorized) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /v1/snapshots][%d] v1SnapshotsGetallUnauthorized %s", 401, payload) +} + +func (o *V1SnapshotsGetallUnauthorized) GetPayload() *models.Error { + return o.Payload +} + +func (o *V1SnapshotsGetallUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewV1SnapshotsGetallForbidden creates a V1SnapshotsGetallForbidden with default headers values +func NewV1SnapshotsGetallForbidden() *V1SnapshotsGetallForbidden { + return &V1SnapshotsGetallForbidden{} +} + +/* +V1SnapshotsGetallForbidden describes a response with status code 403, with default header values. + +Forbidden +*/ +type V1SnapshotsGetallForbidden struct { + Payload *models.Error +} + +// IsSuccess returns true when this v1 snapshots getall forbidden response has a 2xx status code +func (o *V1SnapshotsGetallForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this v1 snapshots getall forbidden response has a 3xx status code +func (o *V1SnapshotsGetallForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this v1 snapshots getall forbidden response has a 4xx status code +func (o *V1SnapshotsGetallForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this v1 snapshots getall forbidden response has a 5xx status code +func (o *V1SnapshotsGetallForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this v1 snapshots getall forbidden response a status code equal to that given +func (o *V1SnapshotsGetallForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the v1 snapshots getall forbidden response +func (o *V1SnapshotsGetallForbidden) Code() int { + return 403 +} + +func (o *V1SnapshotsGetallForbidden) Error() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /v1/snapshots][%d] v1SnapshotsGetallForbidden %s", 403, payload) +} + +func (o *V1SnapshotsGetallForbidden) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /v1/snapshots][%d] v1SnapshotsGetallForbidden %s", 403, payload) +} + +func (o *V1SnapshotsGetallForbidden) GetPayload() *models.Error { + return o.Payload +} + +func (o *V1SnapshotsGetallForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewV1SnapshotsGetallNotFound creates a V1SnapshotsGetallNotFound with default headers values +func NewV1SnapshotsGetallNotFound() *V1SnapshotsGetallNotFound { + return &V1SnapshotsGetallNotFound{} +} + +/* +V1SnapshotsGetallNotFound describes a response with status code 404, with default header values. + +Not Found +*/ +type V1SnapshotsGetallNotFound struct { + Payload *models.Error +} + +// IsSuccess returns true when this v1 snapshots getall not found response has a 2xx status code +func (o *V1SnapshotsGetallNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this v1 snapshots getall not found response has a 3xx status code +func (o *V1SnapshotsGetallNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this v1 snapshots getall not found response has a 4xx status code +func (o *V1SnapshotsGetallNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this v1 snapshots getall not found response has a 5xx status code +func (o *V1SnapshotsGetallNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this v1 snapshots getall not found response a status code equal to that given +func (o *V1SnapshotsGetallNotFound) IsCode(code int) bool { + return code == 404 +} + +// Code gets the status code for the v1 snapshots getall not found response +func (o *V1SnapshotsGetallNotFound) Code() int { + return 404 +} + +func (o *V1SnapshotsGetallNotFound) Error() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /v1/snapshots][%d] v1SnapshotsGetallNotFound %s", 404, payload) +} + +func (o *V1SnapshotsGetallNotFound) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /v1/snapshots][%d] v1SnapshotsGetallNotFound %s", 404, payload) +} + +func (o *V1SnapshotsGetallNotFound) GetPayload() *models.Error { + return o.Payload +} + +func (o *V1SnapshotsGetallNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewV1SnapshotsGetallInternalServerError creates a V1SnapshotsGetallInternalServerError with default headers values +func NewV1SnapshotsGetallInternalServerError() *V1SnapshotsGetallInternalServerError { + return &V1SnapshotsGetallInternalServerError{} +} + +/* +V1SnapshotsGetallInternalServerError describes a response with status code 500, with default header values. + +Internal Server Error +*/ +type V1SnapshotsGetallInternalServerError struct { + Payload *models.Error +} + +// IsSuccess returns true when this v1 snapshots getall internal server error response has a 2xx status code +func (o *V1SnapshotsGetallInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this v1 snapshots getall internal server error response has a 3xx status code +func (o *V1SnapshotsGetallInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this v1 snapshots getall internal server error response has a 4xx status code +func (o *V1SnapshotsGetallInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this v1 snapshots getall internal server error response has a 5xx status code +func (o *V1SnapshotsGetallInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this v1 snapshots getall internal server error response a status code equal to that given +func (o *V1SnapshotsGetallInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the v1 snapshots getall internal server error response +func (o *V1SnapshotsGetallInternalServerError) Code() int { + return 500 +} + +func (o *V1SnapshotsGetallInternalServerError) Error() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /v1/snapshots][%d] v1SnapshotsGetallInternalServerError %s", 500, payload) +} + +func (o *V1SnapshotsGetallInternalServerError) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /v1/snapshots][%d] v1SnapshotsGetallInternalServerError %s", 500, payload) +} + +func (o *V1SnapshotsGetallInternalServerError) GetPayload() *models.Error { + return o.Payload +} + +func (o *V1SnapshotsGetallInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewV1SnapshotsGetallServiceUnavailable creates a V1SnapshotsGetallServiceUnavailable with default headers values +func NewV1SnapshotsGetallServiceUnavailable() *V1SnapshotsGetallServiceUnavailable { + return &V1SnapshotsGetallServiceUnavailable{} +} + +/* +V1SnapshotsGetallServiceUnavailable describes a response with status code 503, with default header values. + +Service Unavailable +*/ +type V1SnapshotsGetallServiceUnavailable struct { + Payload *models.Error +} + +// IsSuccess returns true when this v1 snapshots getall service unavailable response has a 2xx status code +func (o *V1SnapshotsGetallServiceUnavailable) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this v1 snapshots getall service unavailable response has a 3xx status code +func (o *V1SnapshotsGetallServiceUnavailable) IsRedirect() bool { + return false +} + +// IsClientError returns true when this v1 snapshots getall service unavailable response has a 4xx status code +func (o *V1SnapshotsGetallServiceUnavailable) IsClientError() bool { + return false +} + +// IsServerError returns true when this v1 snapshots getall service unavailable response has a 5xx status code +func (o *V1SnapshotsGetallServiceUnavailable) IsServerError() bool { + return true +} + +// IsCode returns true when this v1 snapshots getall service unavailable response a status code equal to that given +func (o *V1SnapshotsGetallServiceUnavailable) IsCode(code int) bool { + return code == 503 +} + +// Code gets the status code for the v1 snapshots getall service unavailable response +func (o *V1SnapshotsGetallServiceUnavailable) Code() int { + return 503 +} + +func (o *V1SnapshotsGetallServiceUnavailable) Error() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /v1/snapshots][%d] v1SnapshotsGetallServiceUnavailable %s", 503, payload) +} + +func (o *V1SnapshotsGetallServiceUnavailable) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /v1/snapshots][%d] v1SnapshotsGetallServiceUnavailable %s", 503, payload) +} + +func (o *V1SnapshotsGetallServiceUnavailable) GetPayload() *models.Error { + return o.Payload +} + +func (o *V1SnapshotsGetallServiceUnavailable) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/power/client/storage_types/service_broker_storagetypes_get_responses.go b/power/client/storage_types/service_broker_storagetypes_get_responses.go index e1fb7e6b..d8bd8f2d 100644 --- a/power/client/storage_types/service_broker_storagetypes_get_responses.go +++ b/power/client/storage_types/service_broker_storagetypes_get_responses.go @@ -6,6 +6,7 @@ package storage_types // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -115,11 +116,13 @@ func (o *ServiceBrokerStoragetypesGetOK) Code() int { } func (o *ServiceBrokerStoragetypesGetOK) Error() string { - return fmt.Sprintf("[GET /broker/v1/storage-types][%d] serviceBrokerStoragetypesGetOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /broker/v1/storage-types][%d] serviceBrokerStoragetypesGetOK %s", 200, payload) } func (o *ServiceBrokerStoragetypesGetOK) String() string { - return fmt.Sprintf("[GET /broker/v1/storage-types][%d] serviceBrokerStoragetypesGetOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /broker/v1/storage-types][%d] serviceBrokerStoragetypesGetOK %s", 200, payload) } func (o *ServiceBrokerStoragetypesGetOK) GetPayload() models.StorageTypes { @@ -181,11 +184,13 @@ func (o *ServiceBrokerStoragetypesGetBadRequest) Code() int { } func (o *ServiceBrokerStoragetypesGetBadRequest) Error() string { - return fmt.Sprintf("[GET /broker/v1/storage-types][%d] serviceBrokerStoragetypesGetBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /broker/v1/storage-types][%d] serviceBrokerStoragetypesGetBadRequest %s", 400, payload) } func (o *ServiceBrokerStoragetypesGetBadRequest) String() string { - return fmt.Sprintf("[GET /broker/v1/storage-types][%d] serviceBrokerStoragetypesGetBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /broker/v1/storage-types][%d] serviceBrokerStoragetypesGetBadRequest %s", 400, payload) } func (o *ServiceBrokerStoragetypesGetBadRequest) GetPayload() *models.Error { @@ -249,11 +254,13 @@ func (o *ServiceBrokerStoragetypesGetUnauthorized) Code() int { } func (o *ServiceBrokerStoragetypesGetUnauthorized) Error() string { - return fmt.Sprintf("[GET /broker/v1/storage-types][%d] serviceBrokerStoragetypesGetUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /broker/v1/storage-types][%d] serviceBrokerStoragetypesGetUnauthorized %s", 401, payload) } func (o *ServiceBrokerStoragetypesGetUnauthorized) String() string { - return fmt.Sprintf("[GET /broker/v1/storage-types][%d] serviceBrokerStoragetypesGetUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /broker/v1/storage-types][%d] serviceBrokerStoragetypesGetUnauthorized %s", 401, payload) } func (o *ServiceBrokerStoragetypesGetUnauthorized) GetPayload() *models.Error { @@ -317,11 +324,13 @@ func (o *ServiceBrokerStoragetypesGetForbidden) Code() int { } func (o *ServiceBrokerStoragetypesGetForbidden) Error() string { - return fmt.Sprintf("[GET /broker/v1/storage-types][%d] serviceBrokerStoragetypesGetForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /broker/v1/storage-types][%d] serviceBrokerStoragetypesGetForbidden %s", 403, payload) } func (o *ServiceBrokerStoragetypesGetForbidden) String() string { - return fmt.Sprintf("[GET /broker/v1/storage-types][%d] serviceBrokerStoragetypesGetForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /broker/v1/storage-types][%d] serviceBrokerStoragetypesGetForbidden %s", 403, payload) } func (o *ServiceBrokerStoragetypesGetForbidden) GetPayload() *models.Error { @@ -385,11 +394,13 @@ func (o *ServiceBrokerStoragetypesGetNotFound) Code() int { } func (o *ServiceBrokerStoragetypesGetNotFound) Error() string { - return fmt.Sprintf("[GET /broker/v1/storage-types][%d] serviceBrokerStoragetypesGetNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /broker/v1/storage-types][%d] serviceBrokerStoragetypesGetNotFound %s", 404, payload) } func (o *ServiceBrokerStoragetypesGetNotFound) String() string { - return fmt.Sprintf("[GET /broker/v1/storage-types][%d] serviceBrokerStoragetypesGetNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /broker/v1/storage-types][%d] serviceBrokerStoragetypesGetNotFound %s", 404, payload) } func (o *ServiceBrokerStoragetypesGetNotFound) GetPayload() *models.Error { @@ -453,11 +464,13 @@ func (o *ServiceBrokerStoragetypesGetUnprocessableEntity) Code() int { } func (o *ServiceBrokerStoragetypesGetUnprocessableEntity) Error() string { - return fmt.Sprintf("[GET /broker/v1/storage-types][%d] serviceBrokerStoragetypesGetUnprocessableEntity %+v", 422, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /broker/v1/storage-types][%d] serviceBrokerStoragetypesGetUnprocessableEntity %s", 422, payload) } func (o *ServiceBrokerStoragetypesGetUnprocessableEntity) String() string { - return fmt.Sprintf("[GET /broker/v1/storage-types][%d] serviceBrokerStoragetypesGetUnprocessableEntity %+v", 422, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /broker/v1/storage-types][%d] serviceBrokerStoragetypesGetUnprocessableEntity %s", 422, payload) } func (o *ServiceBrokerStoragetypesGetUnprocessableEntity) GetPayload() *models.Error { @@ -521,11 +534,13 @@ func (o *ServiceBrokerStoragetypesGetInternalServerError) Code() int { } func (o *ServiceBrokerStoragetypesGetInternalServerError) Error() string { - return fmt.Sprintf("[GET /broker/v1/storage-types][%d] serviceBrokerStoragetypesGetInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /broker/v1/storage-types][%d] serviceBrokerStoragetypesGetInternalServerError %s", 500, payload) } func (o *ServiceBrokerStoragetypesGetInternalServerError) String() string { - return fmt.Sprintf("[GET /broker/v1/storage-types][%d] serviceBrokerStoragetypesGetInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /broker/v1/storage-types][%d] serviceBrokerStoragetypesGetInternalServerError %s", 500, payload) } func (o *ServiceBrokerStoragetypesGetInternalServerError) GetPayload() *models.Error { diff --git a/power/client/storage_types/storage_types_client.go b/power/client/storage_types/storage_types_client.go index 7a981903..51bfe993 100644 --- a/power/client/storage_types/storage_types_client.go +++ b/power/client/storage_types/storage_types_client.go @@ -9,6 +9,7 @@ import ( "fmt" "github.com/go-openapi/runtime" + httptransport "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" ) @@ -17,6 +18,31 @@ func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientServi return &Client{transport: transport, formats: formats} } +// New creates a new storage types API client with basic auth credentials. +// It takes the following parameters: +// - host: http host (github.com). +// - basePath: any base path for the API client ("/v1", "/v3"). +// - scheme: http scheme ("http", "https"). +// - user: user for basic authentication header. +// - password: password for basic authentication header. +func NewClientWithBasicAuth(host, basePath, scheme, user, password string) ClientService { + transport := httptransport.New(host, basePath, []string{scheme}) + transport.DefaultAuthentication = httptransport.BasicAuth(user, password) + return &Client{transport: transport, formats: strfmt.Default} +} + +// New creates a new storage types API client with a bearer token for authentication. +// It takes the following parameters: +// - host: http host (github.com). +// - basePath: any base path for the API client ("/v1", "/v3"). +// - scheme: http scheme ("http", "https"). +// - bearerToken: bearer token for Bearer authentication header. +func NewClientWithBearerToken(host, basePath, scheme, bearerToken string) ClientService { + transport := httptransport.New(host, basePath, []string{scheme}) + transport.DefaultAuthentication = httptransport.BearerToken(bearerToken) + return &Client{transport: transport, formats: strfmt.Default} +} + /* Client for storage types API */ @@ -25,7 +51,7 @@ type Client struct { formats strfmt.Registry } -// ClientOption is the option for Client methods +// ClientOption may be used to customize the behavior of Client methods. type ClientOption func(*runtime.ClientOperation) // ClientService is the interface for Client methods diff --git a/power/client/swagger_spec/service_broker_swaggerspec_responses.go b/power/client/swagger_spec/service_broker_swaggerspec_responses.go index 8e445944..d938fd2f 100644 --- a/power/client/swagger_spec/service_broker_swaggerspec_responses.go +++ b/power/client/swagger_spec/service_broker_swaggerspec_responses.go @@ -6,6 +6,7 @@ package swagger_spec // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -103,11 +104,13 @@ func (o *ServiceBrokerSwaggerspecOK) Code() int { } func (o *ServiceBrokerSwaggerspecOK) Error() string { - return fmt.Sprintf("[GET /v1/swagger.json][%d] serviceBrokerSwaggerspecOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /v1/swagger.json][%d] serviceBrokerSwaggerspecOK %s", 200, payload) } func (o *ServiceBrokerSwaggerspecOK) String() string { - return fmt.Sprintf("[GET /v1/swagger.json][%d] serviceBrokerSwaggerspecOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /v1/swagger.json][%d] serviceBrokerSwaggerspecOK %s", 200, payload) } func (o *ServiceBrokerSwaggerspecOK) GetPayload() models.Object { @@ -169,11 +172,13 @@ func (o *ServiceBrokerSwaggerspecBadRequest) Code() int { } func (o *ServiceBrokerSwaggerspecBadRequest) Error() string { - return fmt.Sprintf("[GET /v1/swagger.json][%d] serviceBrokerSwaggerspecBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /v1/swagger.json][%d] serviceBrokerSwaggerspecBadRequest %s", 400, payload) } func (o *ServiceBrokerSwaggerspecBadRequest) String() string { - return fmt.Sprintf("[GET /v1/swagger.json][%d] serviceBrokerSwaggerspecBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /v1/swagger.json][%d] serviceBrokerSwaggerspecBadRequest %s", 400, payload) } func (o *ServiceBrokerSwaggerspecBadRequest) GetPayload() *models.Error { @@ -237,11 +242,13 @@ func (o *ServiceBrokerSwaggerspecUnauthorized) Code() int { } func (o *ServiceBrokerSwaggerspecUnauthorized) Error() string { - return fmt.Sprintf("[GET /v1/swagger.json][%d] serviceBrokerSwaggerspecUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /v1/swagger.json][%d] serviceBrokerSwaggerspecUnauthorized %s", 401, payload) } func (o *ServiceBrokerSwaggerspecUnauthorized) String() string { - return fmt.Sprintf("[GET /v1/swagger.json][%d] serviceBrokerSwaggerspecUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /v1/swagger.json][%d] serviceBrokerSwaggerspecUnauthorized %s", 401, payload) } func (o *ServiceBrokerSwaggerspecUnauthorized) GetPayload() *models.Error { @@ -305,11 +312,13 @@ func (o *ServiceBrokerSwaggerspecForbidden) Code() int { } func (o *ServiceBrokerSwaggerspecForbidden) Error() string { - return fmt.Sprintf("[GET /v1/swagger.json][%d] serviceBrokerSwaggerspecForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /v1/swagger.json][%d] serviceBrokerSwaggerspecForbidden %s", 403, payload) } func (o *ServiceBrokerSwaggerspecForbidden) String() string { - return fmt.Sprintf("[GET /v1/swagger.json][%d] serviceBrokerSwaggerspecForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /v1/swagger.json][%d] serviceBrokerSwaggerspecForbidden %s", 403, payload) } func (o *ServiceBrokerSwaggerspecForbidden) GetPayload() *models.Error { @@ -373,11 +382,13 @@ func (o *ServiceBrokerSwaggerspecNotFound) Code() int { } func (o *ServiceBrokerSwaggerspecNotFound) Error() string { - return fmt.Sprintf("[GET /v1/swagger.json][%d] serviceBrokerSwaggerspecNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /v1/swagger.json][%d] serviceBrokerSwaggerspecNotFound %s", 404, payload) } func (o *ServiceBrokerSwaggerspecNotFound) String() string { - return fmt.Sprintf("[GET /v1/swagger.json][%d] serviceBrokerSwaggerspecNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /v1/swagger.json][%d] serviceBrokerSwaggerspecNotFound %s", 404, payload) } func (o *ServiceBrokerSwaggerspecNotFound) GetPayload() *models.Error { diff --git a/power/client/swagger_spec/swagger_spec_client.go b/power/client/swagger_spec/swagger_spec_client.go index 32228ff3..6ac98108 100644 --- a/power/client/swagger_spec/swagger_spec_client.go +++ b/power/client/swagger_spec/swagger_spec_client.go @@ -9,6 +9,7 @@ import ( "fmt" "github.com/go-openapi/runtime" + httptransport "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" ) @@ -17,6 +18,31 @@ func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientServi return &Client{transport: transport, formats: formats} } +// New creates a new swagger spec API client with basic auth credentials. +// It takes the following parameters: +// - host: http host (github.com). +// - basePath: any base path for the API client ("/v1", "/v3"). +// - scheme: http scheme ("http", "https"). +// - user: user for basic authentication header. +// - password: password for basic authentication header. +func NewClientWithBasicAuth(host, basePath, scheme, user, password string) ClientService { + transport := httptransport.New(host, basePath, []string{scheme}) + transport.DefaultAuthentication = httptransport.BasicAuth(user, password) + return &Client{transport: transport, formats: strfmt.Default} +} + +// New creates a new swagger spec API client with a bearer token for authentication. +// It takes the following parameters: +// - host: http host (github.com). +// - basePath: any base path for the API client ("/v1", "/v3"). +// - scheme: http scheme ("http", "https"). +// - bearerToken: bearer token for Bearer authentication header. +func NewClientWithBearerToken(host, basePath, scheme, bearerToken string) ClientService { + transport := httptransport.New(host, basePath, []string{scheme}) + transport.DefaultAuthentication = httptransport.BearerToken(bearerToken) + return &Client{transport: transport, formats: strfmt.Default} +} + /* Client for swagger spec API */ @@ -25,7 +51,7 @@ type Client struct { formats strfmt.Registry } -// ClientOption is the option for Client methods +// ClientOption may be used to customize the behavior of Client methods. type ClientOption func(*runtime.ClientOperation) // ClientService is the interface for Client methods diff --git a/power/client/workspaces/v1_workspaces_get_responses.go b/power/client/workspaces/v1_workspaces_get_responses.go index e04a3ee5..9a44710f 100644 --- a/power/client/workspaces/v1_workspaces_get_responses.go +++ b/power/client/workspaces/v1_workspaces_get_responses.go @@ -6,6 +6,7 @@ package workspaces // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -115,11 +116,13 @@ func (o *V1WorkspacesGetOK) Code() int { } func (o *V1WorkspacesGetOK) Error() string { - return fmt.Sprintf("[GET /v1/workspaces/{workspace_id}][%d] v1WorkspacesGetOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /v1/workspaces/{workspace_id}][%d] v1WorkspacesGetOK %s", 200, payload) } func (o *V1WorkspacesGetOK) String() string { - return fmt.Sprintf("[GET /v1/workspaces/{workspace_id}][%d] v1WorkspacesGetOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /v1/workspaces/{workspace_id}][%d] v1WorkspacesGetOK %s", 200, payload) } func (o *V1WorkspacesGetOK) GetPayload() *models.Workspace { @@ -183,11 +186,13 @@ func (o *V1WorkspacesGetBadRequest) Code() int { } func (o *V1WorkspacesGetBadRequest) Error() string { - return fmt.Sprintf("[GET /v1/workspaces/{workspace_id}][%d] v1WorkspacesGetBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /v1/workspaces/{workspace_id}][%d] v1WorkspacesGetBadRequest %s", 400, payload) } func (o *V1WorkspacesGetBadRequest) String() string { - return fmt.Sprintf("[GET /v1/workspaces/{workspace_id}][%d] v1WorkspacesGetBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /v1/workspaces/{workspace_id}][%d] v1WorkspacesGetBadRequest %s", 400, payload) } func (o *V1WorkspacesGetBadRequest) GetPayload() *models.Error { @@ -251,11 +256,13 @@ func (o *V1WorkspacesGetUnauthorized) Code() int { } func (o *V1WorkspacesGetUnauthorized) Error() string { - return fmt.Sprintf("[GET /v1/workspaces/{workspace_id}][%d] v1WorkspacesGetUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /v1/workspaces/{workspace_id}][%d] v1WorkspacesGetUnauthorized %s", 401, payload) } func (o *V1WorkspacesGetUnauthorized) String() string { - return fmt.Sprintf("[GET /v1/workspaces/{workspace_id}][%d] v1WorkspacesGetUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /v1/workspaces/{workspace_id}][%d] v1WorkspacesGetUnauthorized %s", 401, payload) } func (o *V1WorkspacesGetUnauthorized) GetPayload() *models.Error { @@ -319,11 +326,13 @@ func (o *V1WorkspacesGetForbidden) Code() int { } func (o *V1WorkspacesGetForbidden) Error() string { - return fmt.Sprintf("[GET /v1/workspaces/{workspace_id}][%d] v1WorkspacesGetForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /v1/workspaces/{workspace_id}][%d] v1WorkspacesGetForbidden %s", 403, payload) } func (o *V1WorkspacesGetForbidden) String() string { - return fmt.Sprintf("[GET /v1/workspaces/{workspace_id}][%d] v1WorkspacesGetForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /v1/workspaces/{workspace_id}][%d] v1WorkspacesGetForbidden %s", 403, payload) } func (o *V1WorkspacesGetForbidden) GetPayload() *models.Error { @@ -387,11 +396,13 @@ func (o *V1WorkspacesGetNotFound) Code() int { } func (o *V1WorkspacesGetNotFound) Error() string { - return fmt.Sprintf("[GET /v1/workspaces/{workspace_id}][%d] v1WorkspacesGetNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /v1/workspaces/{workspace_id}][%d] v1WorkspacesGetNotFound %s", 404, payload) } func (o *V1WorkspacesGetNotFound) String() string { - return fmt.Sprintf("[GET /v1/workspaces/{workspace_id}][%d] v1WorkspacesGetNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /v1/workspaces/{workspace_id}][%d] v1WorkspacesGetNotFound %s", 404, payload) } func (o *V1WorkspacesGetNotFound) GetPayload() *models.Error { @@ -455,11 +466,13 @@ func (o *V1WorkspacesGetTooManyRequests) Code() int { } func (o *V1WorkspacesGetTooManyRequests) Error() string { - return fmt.Sprintf("[GET /v1/workspaces/{workspace_id}][%d] v1WorkspacesGetTooManyRequests %+v", 429, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /v1/workspaces/{workspace_id}][%d] v1WorkspacesGetTooManyRequests %s", 429, payload) } func (o *V1WorkspacesGetTooManyRequests) String() string { - return fmt.Sprintf("[GET /v1/workspaces/{workspace_id}][%d] v1WorkspacesGetTooManyRequests %+v", 429, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /v1/workspaces/{workspace_id}][%d] v1WorkspacesGetTooManyRequests %s", 429, payload) } func (o *V1WorkspacesGetTooManyRequests) GetPayload() *models.Error { @@ -523,11 +536,13 @@ func (o *V1WorkspacesGetInternalServerError) Code() int { } func (o *V1WorkspacesGetInternalServerError) Error() string { - return fmt.Sprintf("[GET /v1/workspaces/{workspace_id}][%d] v1WorkspacesGetInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /v1/workspaces/{workspace_id}][%d] v1WorkspacesGetInternalServerError %s", 500, payload) } func (o *V1WorkspacesGetInternalServerError) String() string { - return fmt.Sprintf("[GET /v1/workspaces/{workspace_id}][%d] v1WorkspacesGetInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /v1/workspaces/{workspace_id}][%d] v1WorkspacesGetInternalServerError %s", 500, payload) } func (o *V1WorkspacesGetInternalServerError) GetPayload() *models.Error { diff --git a/power/client/workspaces/v1_workspaces_getall_responses.go b/power/client/workspaces/v1_workspaces_getall_responses.go index 671dc336..1ab245fc 100644 --- a/power/client/workspaces/v1_workspaces_getall_responses.go +++ b/power/client/workspaces/v1_workspaces_getall_responses.go @@ -6,6 +6,7 @@ package workspaces // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -103,11 +104,13 @@ func (o *V1WorkspacesGetallOK) Code() int { } func (o *V1WorkspacesGetallOK) Error() string { - return fmt.Sprintf("[GET /v1/workspaces][%d] v1WorkspacesGetallOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /v1/workspaces][%d] v1WorkspacesGetallOK %s", 200, payload) } func (o *V1WorkspacesGetallOK) String() string { - return fmt.Sprintf("[GET /v1/workspaces][%d] v1WorkspacesGetallOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /v1/workspaces][%d] v1WorkspacesGetallOK %s", 200, payload) } func (o *V1WorkspacesGetallOK) GetPayload() *models.Workspaces { @@ -171,11 +174,13 @@ func (o *V1WorkspacesGetallUnauthorized) Code() int { } func (o *V1WorkspacesGetallUnauthorized) Error() string { - return fmt.Sprintf("[GET /v1/workspaces][%d] v1WorkspacesGetallUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /v1/workspaces][%d] v1WorkspacesGetallUnauthorized %s", 401, payload) } func (o *V1WorkspacesGetallUnauthorized) String() string { - return fmt.Sprintf("[GET /v1/workspaces][%d] v1WorkspacesGetallUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /v1/workspaces][%d] v1WorkspacesGetallUnauthorized %s", 401, payload) } func (o *V1WorkspacesGetallUnauthorized) GetPayload() *models.Error { @@ -239,11 +244,13 @@ func (o *V1WorkspacesGetallForbidden) Code() int { } func (o *V1WorkspacesGetallForbidden) Error() string { - return fmt.Sprintf("[GET /v1/workspaces][%d] v1WorkspacesGetallForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /v1/workspaces][%d] v1WorkspacesGetallForbidden %s", 403, payload) } func (o *V1WorkspacesGetallForbidden) String() string { - return fmt.Sprintf("[GET /v1/workspaces][%d] v1WorkspacesGetallForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /v1/workspaces][%d] v1WorkspacesGetallForbidden %s", 403, payload) } func (o *V1WorkspacesGetallForbidden) GetPayload() *models.Error { @@ -307,11 +314,13 @@ func (o *V1WorkspacesGetallTooManyRequests) Code() int { } func (o *V1WorkspacesGetallTooManyRequests) Error() string { - return fmt.Sprintf("[GET /v1/workspaces][%d] v1WorkspacesGetallTooManyRequests %+v", 429, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /v1/workspaces][%d] v1WorkspacesGetallTooManyRequests %s", 429, payload) } func (o *V1WorkspacesGetallTooManyRequests) String() string { - return fmt.Sprintf("[GET /v1/workspaces][%d] v1WorkspacesGetallTooManyRequests %+v", 429, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /v1/workspaces][%d] v1WorkspacesGetallTooManyRequests %s", 429, payload) } func (o *V1WorkspacesGetallTooManyRequests) GetPayload() *models.Error { @@ -375,11 +384,13 @@ func (o *V1WorkspacesGetallInternalServerError) Code() int { } func (o *V1WorkspacesGetallInternalServerError) Error() string { - return fmt.Sprintf("[GET /v1/workspaces][%d] v1WorkspacesGetallInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /v1/workspaces][%d] v1WorkspacesGetallInternalServerError %s", 500, payload) } func (o *V1WorkspacesGetallInternalServerError) String() string { - return fmt.Sprintf("[GET /v1/workspaces][%d] v1WorkspacesGetallInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /v1/workspaces][%d] v1WorkspacesGetallInternalServerError %s", 500, payload) } func (o *V1WorkspacesGetallInternalServerError) GetPayload() *models.Error { diff --git a/power/client/workspaces/workspaces_client.go b/power/client/workspaces/workspaces_client.go index 4929b695..be7f3e6e 100644 --- a/power/client/workspaces/workspaces_client.go +++ b/power/client/workspaces/workspaces_client.go @@ -9,6 +9,7 @@ import ( "fmt" "github.com/go-openapi/runtime" + httptransport "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" ) @@ -17,6 +18,31 @@ func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientServi return &Client{transport: transport, formats: formats} } +// New creates a new workspaces API client with basic auth credentials. +// It takes the following parameters: +// - host: http host (github.com). +// - basePath: any base path for the API client ("/v1", "/v3"). +// - scheme: http scheme ("http", "https"). +// - user: user for basic authentication header. +// - password: password for basic authentication header. +func NewClientWithBasicAuth(host, basePath, scheme, user, password string) ClientService { + transport := httptransport.New(host, basePath, []string{scheme}) + transport.DefaultAuthentication = httptransport.BasicAuth(user, password) + return &Client{transport: transport, formats: strfmt.Default} +} + +// New creates a new workspaces API client with a bearer token for authentication. +// It takes the following parameters: +// - host: http host (github.com). +// - basePath: any base path for the API client ("/v1", "/v3"). +// - scheme: http scheme ("http", "https"). +// - bearerToken: bearer token for Bearer authentication header. +func NewClientWithBearerToken(host, basePath, scheme, bearerToken string) ClientService { + transport := httptransport.New(host, basePath, []string{scheme}) + transport.DefaultAuthentication = httptransport.BearerToken(bearerToken) + return &Client{transport: transport, formats: strfmt.Default} +} + /* Client for workspaces API */ @@ -25,7 +51,7 @@ type Client struct { formats strfmt.Registry } -// ClientOption is the option for Client methods +// ClientOption may be used to customize the behavior of Client methods. type ClientOption func(*runtime.ClientOperation) // ClientService is the interface for Client methods diff --git a/power/models/add_host.go b/power/models/add_host.go index fb06e74e..b0e6358a 100644 --- a/power/models/add_host.go +++ b/power/models/add_host.go @@ -14,7 +14,7 @@ import ( "github.com/go-openapi/validate" ) -// AddHost Host to add to a hostgroup +// AddHost Host to add to a host group // // swagger:model AddHost type AddHost struct { diff --git a/power/models/available_host.go b/power/models/available_host.go index 35b33173..db8b23ba 100644 --- a/power/models/available_host.go +++ b/power/models/available_host.go @@ -19,7 +19,7 @@ import ( type AvailableHost struct { // Resource capacities for that system type and configuration - Capacity *HostAvailableCapacity `json:"capacity,omitempty"` + Capacity *AvailableHostCapacity `json:"capacity,omitempty"` // How many hosts of such type/capacities are available Count int64 `json:"count,omitempty"` diff --git a/power/models/available_host_capacity.go b/power/models/available_host_capacity.go new file mode 100644 index 00000000..0aed652d --- /dev/null +++ b/power/models/available_host_capacity.go @@ -0,0 +1,160 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// AvailableHostCapacity available host capacity +// +// swagger:model AvailableHostCapacity +type AvailableHostCapacity struct { + + // Core capacity of the host + Cores *AvailableHostResourceCapacity `json:"cores,omitempty"` + + // Memory capacity of the host (in GB) + Memory *AvailableHostResourceCapacity `json:"memory,omitempty"` +} + +// Validate validates this available host capacity +func (m *AvailableHostCapacity) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateCores(formats); err != nil { + res = append(res, err) + } + + if err := m.validateMemory(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *AvailableHostCapacity) validateCores(formats strfmt.Registry) error { + if swag.IsZero(m.Cores) { // not required + return nil + } + + if m.Cores != nil { + if err := m.Cores.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("cores") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("cores") + } + return err + } + } + + return nil +} + +func (m *AvailableHostCapacity) validateMemory(formats strfmt.Registry) error { + if swag.IsZero(m.Memory) { // not required + return nil + } + + if m.Memory != nil { + if err := m.Memory.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("memory") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("memory") + } + return err + } + } + + return nil +} + +// ContextValidate validate this available host capacity based on the context it is used +func (m *AvailableHostCapacity) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateCores(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateMemory(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *AvailableHostCapacity) contextValidateCores(ctx context.Context, formats strfmt.Registry) error { + + if m.Cores != nil { + + if swag.IsZero(m.Cores) { // not required + return nil + } + + if err := m.Cores.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("cores") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("cores") + } + return err + } + } + + return nil +} + +func (m *AvailableHostCapacity) contextValidateMemory(ctx context.Context, formats strfmt.Registry) error { + + if m.Memory != nil { + + if swag.IsZero(m.Memory) { // not required + return nil + } + + if err := m.Memory.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("memory") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("memory") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *AvailableHostCapacity) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *AvailableHostCapacity) UnmarshalBinary(b []byte) error { + var res AvailableHostCapacity + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/power/models/available_host_resource_capacity.go b/power/models/available_host_resource_capacity.go new file mode 100644 index 00000000..9f0f852d --- /dev/null +++ b/power/models/available_host_resource_capacity.go @@ -0,0 +1,71 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// AvailableHostResourceCapacity available host resource capacity +// +// swagger:model AvailableHostResourceCapacity +type AvailableHostResourceCapacity struct { + + // total + // Required: true + Total *float64 `json:"total"` +} + +// Validate validates this available host resource capacity +func (m *AvailableHostResourceCapacity) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateTotal(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *AvailableHostResourceCapacity) validateTotal(formats strfmt.Registry) error { + + if err := validate.Required("total", "body", m.Total); err != nil { + return err + } + + return nil +} + +// ContextValidate validates this available host resource capacity based on context it is used +func (m *AvailableHostResourceCapacity) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *AvailableHostResourceCapacity) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *AvailableHostResourceCapacity) UnmarshalBinary(b []byte) error { + var res AvailableHostResourceCapacity + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/power/models/clone_task_status.go b/power/models/clone_task_status.go index cb47470d..1099b76a 100644 --- a/power/models/clone_task_status.go +++ b/power/models/clone_task_status.go @@ -33,7 +33,7 @@ type CloneTaskStatus struct { // Status of the clone volumes task // Required: true - // Enum: [running completed failed unknown] + // Enum: ["running","completed","failed","unknown"] Status *string `json:"status"` } diff --git a/power/models/cloud_connection_create.go b/power/models/cloud_connection_create.go index dba0f641..ccae9f01 100644 --- a/power/models/cloud_connection_create.go +++ b/power/models/cloud_connection_create.go @@ -35,7 +35,7 @@ type CloudConnectionCreate struct { // speed of the cloud connection (speed in megabits per second) // Required: true - // Enum: [50 100 200 500 1000 2000 5000 10000] + // Enum: [50,100,200,500,1000,2000,5000,10000] Speed *int64 `json:"speed"` // list of subnets to attach to cloud connection diff --git a/power/models/cloud_connection_update.go b/power/models/cloud_connection_update.go index 4274cf1c..eedf1a7a 100644 --- a/power/models/cloud_connection_update.go +++ b/power/models/cloud_connection_update.go @@ -33,7 +33,7 @@ type CloudConnectionUpdate struct { Name *string `json:"name,omitempty"` // speed of the cloud connection (speed in megabits per second) - // Enum: [50 100 200 500 1000 2000 5000 10000] + // Enum: [50,100,200,500,1000,2000,5000,10000] Speed *int64 `json:"speed,omitempty"` // vpc diff --git a/power/models/cloud_initialization.go b/power/models/cloud_initialization.go index 49be6931..3bc111b2 100644 --- a/power/models/cloud_initialization.go +++ b/power/models/cloud_initialization.go @@ -21,7 +21,7 @@ import ( type CloudInitialization struct { // Virtual Machine's Cloud Initialization Virtual Optical Device - // Enum: [attach detach] + // Enum: ["attach","detach"] VirtualOpticalDevice string `json:"virtualOpticalDevice,omitempty"` } diff --git a/power/models/create_cos_image_import_job.go b/power/models/create_cos_image_import_job.go index 12186df3..642f5675 100644 --- a/power/models/create_cos_image_import_job.go +++ b/power/models/create_cos_image_import_job.go @@ -24,13 +24,16 @@ type CreateCosImageImportJob struct { AccessKey string `json:"accessKey,omitempty"` // indicates if the bucket has public or private access public access require no authentication keys private access requires hmac authentication keys (access,secret) - // Enum: [public private] + // Enum: ["public","private"] BucketAccess *string `json:"bucketAccess,omitempty"` // Cloud Object Storage bucket name; bucket-name[/optional/folder] // Required: true BucketName *string `json:"bucketName"` + // Import and Check checksum file + Checksum bool `json:"checksum,omitempty"` + // Cloud Object Storage image filename // Required: true ImageFilename *string `json:"imageFilename"` @@ -39,8 +42,11 @@ type CreateCosImageImportJob struct { // Required: true ImageName *string `json:"imageName"` + // Import details for SAP images + ImportDetails *ImageImportDetails `json:"importDetails,omitempty"` + // Image OS Type, required if importing a raw image; raw images can only be imported using the command line interface - // Enum: [aix ibmi rhel sles] + // Enum: ["aix","ibmi","rhel","sles"] OsType string `json:"osType,omitempty"` // Cloud Object Storage region @@ -80,6 +86,10 @@ func (m *CreateCosImageImportJob) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := m.validateImportDetails(formats); err != nil { + res = append(res, err) + } + if err := m.validateOsType(formats); err != nil { res = append(res, err) } @@ -167,6 +177,25 @@ func (m *CreateCosImageImportJob) validateImageName(formats strfmt.Registry) err return nil } +func (m *CreateCosImageImportJob) validateImportDetails(formats strfmt.Registry) error { + if swag.IsZero(m.ImportDetails) { // not required + return nil + } + + if m.ImportDetails != nil { + if err := m.ImportDetails.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("importDetails") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("importDetails") + } + return err + } + } + + return nil +} + var createCosImageImportJobTypeOsTypePropEnum []interface{} func init() { @@ -247,6 +276,10 @@ func (m *CreateCosImageImportJob) validateStorageAffinity(formats strfmt.Registr func (m *CreateCosImageImportJob) ContextValidate(ctx context.Context, formats strfmt.Registry) error { var res []error + if err := m.contextValidateImportDetails(ctx, formats); err != nil { + res = append(res, err) + } + if err := m.contextValidateStorageAffinity(ctx, formats); err != nil { res = append(res, err) } @@ -257,6 +290,27 @@ func (m *CreateCosImageImportJob) ContextValidate(ctx context.Context, formats s return nil } +func (m *CreateCosImageImportJob) contextValidateImportDetails(ctx context.Context, formats strfmt.Registry) error { + + if m.ImportDetails != nil { + + if swag.IsZero(m.ImportDetails) { // not required + return nil + } + + if err := m.ImportDetails.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("importDetails") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("importDetails") + } + return err + } + } + + return nil +} + func (m *CreateCosImageImportJob) contextValidateStorageAffinity(ctx context.Context, formats strfmt.Registry) error { if m.StorageAffinity != nil { diff --git a/power/models/create_data_volume.go b/power/models/create_data_volume.go index 626e9b09..52d2a500 100644 --- a/power/models/create_data_volume.go +++ b/power/models/create_data_volume.go @@ -24,7 +24,7 @@ type CreateDataVolume struct { AffinityPVMInstance *string `json:"affinityPVMInstance,omitempty"` // Affinity policy for data volume being created; ignored if volumePool provided; for policy 'affinity' requires one of affinityPVMInstance or affinityVolume to be specified; for policy 'anti-affinity' requires one of antiAffinityPVMInstances or antiAffinityVolumes to be specified - // Enum: [affinity anti-affinity] + // Enum: ["affinity","anti-affinity"] AffinityPolicy *string `json:"affinityPolicy,omitempty"` // Volume (ID or Name) to base volume affinity policy against; required if requesting affinity and affinityPVMInstance is not provided @@ -46,6 +46,9 @@ type CreateDataVolume struct { // Indicates if the volume should be replication enabled or not ReplicationEnabled *bool `json:"replicationEnabled,omitempty"` + // List of replication sites for volume replication + ReplicationSite []string `json:"replicationSite,omitempty"` + // Indicates if the volume is shareable between VMs Shareable *bool `json:"shareable,omitempty"` diff --git a/power/models/create_image.go b/power/models/create_image.go index 3fe6eb12..d109378b 100644 --- a/power/models/create_image.go +++ b/power/models/create_image.go @@ -42,7 +42,7 @@ type CreateImage struct { ImagePath string `json:"imagePath,omitempty"` // Image OS Type, required if importing a raw image; raw images can only be imported using the command line interface - // Enum: [aix ibmi rhel sles] + // Enum: ["aix","ibmi","rhel","sles"] OsType string `json:"osType,omitempty"` // Cloud Storage Region; only required to access IBM Cloud Storage @@ -55,7 +55,7 @@ type CreateImage struct { // >*Note*: url option is deprecated, this option is supported till Oct 2022 // // Required: true - // Enum: [root-project url] + // Enum: ["root-project","url"] Source *string `json:"source"` // The storage affinity data; ignored if storagePool is provided; Used only when importing an image from cloud storage. diff --git a/power/models/datacenter.go b/power/models/datacenter.go index 62c632be..2c33b15c 100644 --- a/power/models/datacenter.go +++ b/power/models/datacenter.go @@ -33,12 +33,12 @@ type Datacenter struct { // The Datacenter status // Required: true - // Enum: [active maintenance down] + // Enum: ["active","maintenance","down"] Status *string `json:"status"` // The Datacenter type // Required: true - // Enum: [off-premises on-premises] + // Enum: ["off-premises","on-premises"] Type *string `json:"type"` } diff --git a/power/models/dead_peer_detection.go b/power/models/dead_peer_detection.go index 89688eaa..5ec338a8 100644 --- a/power/models/dead_peer_detection.go +++ b/power/models/dead_peer_detection.go @@ -22,7 +22,7 @@ type DeadPeerDetection struct { // Action to take when a Peer Gateway stops responding // Required: true - // Enum: [restart] + // Enum: ["restart"] Action *string `json:"action"` // How often to test that the Peer Gateway is responsive diff --git a/power/models/deployment_target.go b/power/models/deployment_target.go new file mode 100644 index 00000000..baf2b292 --- /dev/null +++ b/power/models/deployment_target.go @@ -0,0 +1,124 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "encoding/json" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// DeploymentTarget deployment target +// +// swagger:model DeploymentTarget +type DeploymentTarget struct { + + // The uuid of the host group or host + // Required: true + ID *string `json:"id"` + + // specify if deploying to a host group or a host + // Required: true + // Enum: ["hostGroup","host"] + Type *string `json:"type"` +} + +// Validate validates this deployment target +func (m *DeploymentTarget) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateID(formats); err != nil { + res = append(res, err) + } + + if err := m.validateType(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *DeploymentTarget) validateID(formats strfmt.Registry) error { + + if err := validate.Required("id", "body", m.ID); err != nil { + return err + } + + return nil +} + +var deploymentTargetTypeTypePropEnum []interface{} + +func init() { + var res []string + if err := json.Unmarshal([]byte(`["hostGroup","host"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + deploymentTargetTypeTypePropEnum = append(deploymentTargetTypeTypePropEnum, v) + } +} + +const ( + + // DeploymentTargetTypeHostGroup captures enum value "hostGroup" + DeploymentTargetTypeHostGroup string = "hostGroup" + + // DeploymentTargetTypeHost captures enum value "host" + DeploymentTargetTypeHost string = "host" +) + +// prop value enum +func (m *DeploymentTarget) validateTypeEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, deploymentTargetTypeTypePropEnum, true); err != nil { + return err + } + return nil +} + +func (m *DeploymentTarget) validateType(formats strfmt.Registry) error { + + if err := validate.Required("type", "body", m.Type); err != nil { + return err + } + + // value enum + if err := m.validateTypeEnum("type", "body", *m.Type); err != nil { + return err + } + + return nil +} + +// ContextValidate validates this deployment target based on context it is used +func (m *DeploymentTarget) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *DeploymentTarget) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *DeploymentTarget) UnmarshalBinary(b []byte) error { + var res DeploymentTarget + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/power/models/event.go b/power/models/event.go index bd5ac368..79d6edec 100644 --- a/power/models/event.go +++ b/power/models/event.go @@ -30,7 +30,7 @@ type Event struct { // Level of the event (notice, info, warning, error) // Required: true - // Enum: [notice info warning error] + // Enum: ["notice","info","warning","error"] Level *string `json:"level"` // The (translated) message of the event diff --git a/power/models/export_image.go b/power/models/export_image.go index 1f8a17dd..2b5ff7f3 100644 --- a/power/models/export_image.go +++ b/power/models/export_image.go @@ -27,6 +27,9 @@ type ExportImage struct { // Required: true BucketName *string `json:"bucketName"` + // Create a checksum filename + Checksum bool `json:"checksum,omitempty"` + // Cloud Object Storage Region; required for IBM COS Region string `json:"region,omitempty"` diff --git a/power/models/host.go b/power/models/host.go index d0ad65f7..51e2d4a4 100644 --- a/power/models/host.go +++ b/power/models/host.go @@ -24,8 +24,8 @@ type Host struct { // Name of the host (chosen by the user) DisplayName string `json:"displayName,omitempty"` - // Link to the owning hostgroup - Hostgroup HostgroupHref `json:"hostgroup,omitempty"` + // Information about the owning host group + HostGroup *HostGroupSummary `json:"hostGroup,omitempty"` // ID of the host ID string `json:"id,omitempty"` @@ -48,7 +48,7 @@ func (m *Host) Validate(formats strfmt.Registry) error { res = append(res, err) } - if err := m.validateHostgroup(formats); err != nil { + if err := m.validateHostGroup(formats); err != nil { res = append(res, err) } @@ -77,18 +77,20 @@ func (m *Host) validateCapacity(formats strfmt.Registry) error { return nil } -func (m *Host) validateHostgroup(formats strfmt.Registry) error { - if swag.IsZero(m.Hostgroup) { // not required +func (m *Host) validateHostGroup(formats strfmt.Registry) error { + if swag.IsZero(m.HostGroup) { // not required return nil } - if err := m.Hostgroup.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("hostgroup") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("hostgroup") + if m.HostGroup != nil { + if err := m.HostGroup.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("hostGroup") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("hostGroup") + } + return err } - return err } return nil @@ -102,7 +104,7 @@ func (m *Host) ContextValidate(ctx context.Context, formats strfmt.Registry) err res = append(res, err) } - if err := m.contextValidateHostgroup(ctx, formats); err != nil { + if err := m.contextValidateHostGroup(ctx, formats); err != nil { res = append(res, err) } @@ -133,19 +135,22 @@ func (m *Host) contextValidateCapacity(ctx context.Context, formats strfmt.Regis return nil } -func (m *Host) contextValidateHostgroup(ctx context.Context, formats strfmt.Registry) error { +func (m *Host) contextValidateHostGroup(ctx context.Context, formats strfmt.Registry) error { - if swag.IsZero(m.Hostgroup) { // not required - return nil - } + if m.HostGroup != nil { - if err := m.Hostgroup.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("hostgroup") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("hostgroup") + if swag.IsZero(m.HostGroup) { // not required + return nil + } + + if err := m.HostGroup.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("hostGroup") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("hostGroup") + } + return err } - return err } return nil diff --git a/power/models/host_available_capacity.go b/power/models/host_available_capacity.go deleted file mode 100644 index 4099a90f..00000000 --- a/power/models/host_available_capacity.go +++ /dev/null @@ -1,53 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// HostAvailableCapacity host available capacity -// -// swagger:model HostAvailableCapacity -type HostAvailableCapacity struct { - - // Number of cores available on the host - AvailableCore float64 `json:"availableCore,omitempty"` - - // Memory capacity available on the host (in MB) - AvailableMemory float64 `json:"availableMemory,omitempty"` -} - -// Validate validates this host available capacity -func (m *HostAvailableCapacity) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this host available capacity based on context it is used -func (m *HostAvailableCapacity) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *HostAvailableCapacity) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *HostAvailableCapacity) UnmarshalBinary(b []byte) error { - var res HostAvailableCapacity - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/power/models/host_capacity.go b/power/models/host_capacity.go index 1e822fb7..506c43e5 100644 --- a/power/models/host_capacity.go +++ b/power/models/host_capacity.go @@ -8,6 +8,7 @@ package models import ( "context" + "github.com/go-openapi/errors" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" ) @@ -17,38 +18,126 @@ import ( // swagger:model HostCapacity type HostCapacity struct { - // Number of cores currently available - AvailableCore float64 `json:"availableCore,omitempty"` + // Core capacity of the host + Cores *HostResourceCapacity `json:"cores,omitempty"` - // Amount of memory currently available (in MB) - AvailableMemory float64 `json:"availableMemory,omitempty"` + // Memory capacity of the host (in GB) + Memory *HostResourceCapacity `json:"memory,omitempty"` +} - // Number of cores reserved for system use - ReservedCore float64 `json:"reservedCore,omitempty"` +// Validate validates this host capacity +func (m *HostCapacity) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateCores(formats); err != nil { + res = append(res, err) + } - // Amount of memory reserved for system use (in MB) - ReservedMemory float64 `json:"reservedMemory,omitempty"` + if err := m.validateMemory(formats); err != nil { + res = append(res, err) + } - // Total number of cores of the host - TotalCore float64 `json:"totalCore,omitempty"` + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} - // Total amount of memory of the host (in MB) - TotalMemory float64 `json:"totalMemory,omitempty"` +func (m *HostCapacity) validateCores(formats strfmt.Registry) error { + if swag.IsZero(m.Cores) { // not required + return nil + } - // Number of cores in use on the host - UsedCore float64 `json:"usedCore,omitempty"` + if m.Cores != nil { + if err := m.Cores.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("cores") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("cores") + } + return err + } + } - // Amount of memory used on the host (in MB) - UsedMemory float64 `json:"usedMemory,omitempty"` + return nil } -// Validate validates this host capacity -func (m *HostCapacity) Validate(formats strfmt.Registry) error { +func (m *HostCapacity) validateMemory(formats strfmt.Registry) error { + if swag.IsZero(m.Memory) { // not required + return nil + } + + if m.Memory != nil { + if err := m.Memory.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("memory") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("memory") + } + return err + } + } + return nil } -// ContextValidate validates this host capacity based on context it is used +// ContextValidate validate this host capacity based on the context it is used func (m *HostCapacity) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateCores(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateMemory(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *HostCapacity) contextValidateCores(ctx context.Context, formats strfmt.Registry) error { + + if m.Cores != nil { + + if swag.IsZero(m.Cores) { // not required + return nil + } + + if err := m.Cores.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("cores") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("cores") + } + return err + } + } + + return nil +} + +func (m *HostCapacity) contextValidateMemory(ctx context.Context, formats strfmt.Registry) error { + + if m.Memory != nil { + + if swag.IsZero(m.Memory) { // not required + return nil + } + + if err := m.Memory.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("memory") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("memory") + } + return err + } + } + return nil } diff --git a/power/models/host_create.go b/power/models/host_create.go index 0e7d68ee..8c256de8 100644 --- a/power/models/host_create.go +++ b/power/models/host_create.go @@ -7,6 +7,7 @@ package models import ( "context" + "strconv" "github.com/go-openapi/errors" "github.com/go-openapi/strfmt" @@ -14,29 +15,29 @@ import ( "github.com/go-openapi/validate" ) -// HostCreate Parameters to add a host to an existing hostgroup +// HostCreate Parameters to add a host to an existing host group // // swagger:model HostCreate type HostCreate struct { - // Host to be added + // ID of the host group to which the host should be added // Required: true - Host *AddHost `json:"host"` + HostGroupID *string `json:"hostGroupID"` - // ID of the hostgroup to which the host should be added + // Hosts to be added // Required: true - HostgroupID *string `json:"hostgroupID"` + Hosts []*AddHost `json:"hosts"` } // Validate validates this host create func (m *HostCreate) Validate(formats strfmt.Registry) error { var res []error - if err := m.validateHost(formats); err != nil { + if err := m.validateHostGroupID(formats); err != nil { res = append(res, err) } - if err := m.validateHostgroupID(formats); err != nil { + if err := m.validateHosts(formats); err != nil { res = append(res, err) } @@ -46,32 +47,39 @@ func (m *HostCreate) Validate(formats strfmt.Registry) error { return nil } -func (m *HostCreate) validateHost(formats strfmt.Registry) error { +func (m *HostCreate) validateHostGroupID(formats strfmt.Registry) error { - if err := validate.Required("host", "body", m.Host); err != nil { + if err := validate.Required("hostGroupID", "body", m.HostGroupID); err != nil { return err } - if m.Host != nil { - if err := m.Host.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("host") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("host") - } - return err - } - } - return nil } -func (m *HostCreate) validateHostgroupID(formats strfmt.Registry) error { +func (m *HostCreate) validateHosts(formats strfmt.Registry) error { - if err := validate.Required("hostgroupID", "body", m.HostgroupID); err != nil { + if err := validate.Required("hosts", "body", m.Hosts); err != nil { return err } + for i := 0; i < len(m.Hosts); i++ { + if swag.IsZero(m.Hosts[i]) { // not required + continue + } + + if m.Hosts[i] != nil { + if err := m.Hosts[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("hosts" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("hosts" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + return nil } @@ -79,7 +87,7 @@ func (m *HostCreate) validateHostgroupID(formats strfmt.Registry) error { func (m *HostCreate) ContextValidate(ctx context.Context, formats strfmt.Registry) error { var res []error - if err := m.contextValidateHost(ctx, formats); err != nil { + if err := m.contextValidateHosts(ctx, formats); err != nil { res = append(res, err) } @@ -89,18 +97,26 @@ func (m *HostCreate) ContextValidate(ctx context.Context, formats strfmt.Registr return nil } -func (m *HostCreate) contextValidateHost(ctx context.Context, formats strfmt.Registry) error { +func (m *HostCreate) contextValidateHosts(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Hosts); i++ { - if m.Host != nil { + if m.Hosts[i] != nil { - if err := m.Host.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("host") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("host") + if swag.IsZero(m.Hosts[i]) { // not required + return nil + } + + if err := m.Hosts[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("hosts" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("hosts" + "." + strconv.Itoa(i)) + } + return err } - return err } + } return nil diff --git a/power/models/hostgroup.go b/power/models/host_group.go similarity index 74% rename from power/models/hostgroup.go rename to power/models/host_group.go index 7ca1c07c..2effa932 100644 --- a/power/models/hostgroup.go +++ b/power/models/host_group.go @@ -15,33 +15,33 @@ import ( "github.com/go-openapi/validate" ) -// Hostgroup Description of a hostgroup +// HostGroup Description of a host group // -// swagger:model Hostgroup -type Hostgroup struct { +// swagger:model HostGroup +type HostGroup struct { - // Date/Time of hostgroup creation + // Date/Time of host group creation // Format: date-time CreationDate strfmt.DateTime `json:"creationDate,omitempty"` // List of hosts Hosts []HostHref `json:"hosts"` - // Hostgroup ID + // Host group ID ID string `json:"id,omitempty"` - // Name of the hostgroup + // Name of the host group Name string `json:"name,omitempty"` - // Name of the workspace owning the hostgroup + // ID of the workspace owning the host group Primary string `json:"primary,omitempty"` - // Names of workspaces the hostgroup has been shared with + // IDs of workspaces the host group has been shared with Secondaries []string `json:"secondaries"` } -// Validate validates this hostgroup -func (m *Hostgroup) Validate(formats strfmt.Registry) error { +// Validate validates this host group +func (m *HostGroup) Validate(formats strfmt.Registry) error { var res []error if err := m.validateCreationDate(formats); err != nil { @@ -58,7 +58,7 @@ func (m *Hostgroup) Validate(formats strfmt.Registry) error { return nil } -func (m *Hostgroup) validateCreationDate(formats strfmt.Registry) error { +func (m *HostGroup) validateCreationDate(formats strfmt.Registry) error { if swag.IsZero(m.CreationDate) { // not required return nil } @@ -70,7 +70,7 @@ func (m *Hostgroup) validateCreationDate(formats strfmt.Registry) error { return nil } -func (m *Hostgroup) validateHosts(formats strfmt.Registry) error { +func (m *HostGroup) validateHosts(formats strfmt.Registry) error { if swag.IsZero(m.Hosts) { // not required return nil } @@ -91,8 +91,8 @@ func (m *Hostgroup) validateHosts(formats strfmt.Registry) error { return nil } -// ContextValidate validate this hostgroup based on the context it is used -func (m *Hostgroup) ContextValidate(ctx context.Context, formats strfmt.Registry) error { +// ContextValidate validate this host group based on the context it is used +func (m *HostGroup) ContextValidate(ctx context.Context, formats strfmt.Registry) error { var res []error if err := m.contextValidateHosts(ctx, formats); err != nil { @@ -105,7 +105,7 @@ func (m *Hostgroup) ContextValidate(ctx context.Context, formats strfmt.Registry return nil } -func (m *Hostgroup) contextValidateHosts(ctx context.Context, formats strfmt.Registry) error { +func (m *HostGroup) contextValidateHosts(ctx context.Context, formats strfmt.Registry) error { for i := 0; i < len(m.Hosts); i++ { @@ -128,7 +128,7 @@ func (m *Hostgroup) contextValidateHosts(ctx context.Context, formats strfmt.Reg } // MarshalBinary interface implementation -func (m *Hostgroup) MarshalBinary() ([]byte, error) { +func (m *HostGroup) MarshalBinary() ([]byte, error) { if m == nil { return nil, nil } @@ -136,8 +136,8 @@ func (m *Hostgroup) MarshalBinary() ([]byte, error) { } // UnmarshalBinary interface implementation -func (m *Hostgroup) UnmarshalBinary(b []byte) error { - var res Hostgroup +func (m *HostGroup) UnmarshalBinary(b []byte) error { + var res HostGroup if err := swag.ReadJSON(b, &res); err != nil { return err } diff --git a/power/models/hostgroup_create.go b/power/models/host_group_create.go similarity index 79% rename from power/models/hostgroup_create.go rename to power/models/host_group_create.go index b2c8b2cd..48f3e169 100644 --- a/power/models/hostgroup_create.go +++ b/power/models/host_group_create.go @@ -15,25 +15,25 @@ import ( "github.com/go-openapi/validate" ) -// HostgroupCreate Parameters for the creation of a new hostgroup +// HostGroupCreate Parameters for the creation of a new host group // -// swagger:model HostgroupCreate -type HostgroupCreate struct { +// swagger:model HostGroupCreate +type HostGroupCreate struct { - // List of hosts to add to the group + // List of hosts to add to the host group // Required: true Hosts []*AddHost `json:"hosts"` - // Name of the hostgroup to create + // Name of the host group to create // Required: true Name *string `json:"name"` - // List of workspace names to share the hostgroup with (optional) + // List of workspaces to share the host group with (optional) Secondaries []*Secondary `json:"secondaries"` } -// Validate validates this hostgroup create -func (m *HostgroupCreate) Validate(formats strfmt.Registry) error { +// Validate validates this host group create +func (m *HostGroupCreate) Validate(formats strfmt.Registry) error { var res []error if err := m.validateHosts(formats); err != nil { @@ -54,7 +54,7 @@ func (m *HostgroupCreate) Validate(formats strfmt.Registry) error { return nil } -func (m *HostgroupCreate) validateHosts(formats strfmt.Registry) error { +func (m *HostGroupCreate) validateHosts(formats strfmt.Registry) error { if err := validate.Required("hosts", "body", m.Hosts); err != nil { return err @@ -81,7 +81,7 @@ func (m *HostgroupCreate) validateHosts(formats strfmt.Registry) error { return nil } -func (m *HostgroupCreate) validateName(formats strfmt.Registry) error { +func (m *HostGroupCreate) validateName(formats strfmt.Registry) error { if err := validate.Required("name", "body", m.Name); err != nil { return err @@ -90,7 +90,7 @@ func (m *HostgroupCreate) validateName(formats strfmt.Registry) error { return nil } -func (m *HostgroupCreate) validateSecondaries(formats strfmt.Registry) error { +func (m *HostGroupCreate) validateSecondaries(formats strfmt.Registry) error { if swag.IsZero(m.Secondaries) { // not required return nil } @@ -116,8 +116,8 @@ func (m *HostgroupCreate) validateSecondaries(formats strfmt.Registry) error { return nil } -// ContextValidate validate this hostgroup create based on the context it is used -func (m *HostgroupCreate) ContextValidate(ctx context.Context, formats strfmt.Registry) error { +// ContextValidate validate this host group create based on the context it is used +func (m *HostGroupCreate) ContextValidate(ctx context.Context, formats strfmt.Registry) error { var res []error if err := m.contextValidateHosts(ctx, formats); err != nil { @@ -134,7 +134,7 @@ func (m *HostgroupCreate) ContextValidate(ctx context.Context, formats strfmt.Re return nil } -func (m *HostgroupCreate) contextValidateHosts(ctx context.Context, formats strfmt.Registry) error { +func (m *HostGroupCreate) contextValidateHosts(ctx context.Context, formats strfmt.Registry) error { for i := 0; i < len(m.Hosts); i++ { @@ -159,7 +159,7 @@ func (m *HostgroupCreate) contextValidateHosts(ctx context.Context, formats strf return nil } -func (m *HostgroupCreate) contextValidateSecondaries(ctx context.Context, formats strfmt.Registry) error { +func (m *HostGroupCreate) contextValidateSecondaries(ctx context.Context, formats strfmt.Registry) error { for i := 0; i < len(m.Secondaries); i++ { @@ -185,7 +185,7 @@ func (m *HostgroupCreate) contextValidateSecondaries(ctx context.Context, format } // MarshalBinary interface implementation -func (m *HostgroupCreate) MarshalBinary() ([]byte, error) { +func (m *HostGroupCreate) MarshalBinary() ([]byte, error) { if m == nil { return nil, nil } @@ -193,8 +193,8 @@ func (m *HostgroupCreate) MarshalBinary() ([]byte, error) { } // UnmarshalBinary interface implementation -func (m *HostgroupCreate) UnmarshalBinary(b []byte) error { - var res HostgroupCreate +func (m *HostGroupCreate) UnmarshalBinary(b []byte) error { + var res HostGroupCreate if err := swag.ReadJSON(b, &res); err != nil { return err } diff --git a/power/models/hostgroup_list.go b/power/models/host_group_list.go similarity index 79% rename from power/models/hostgroup_list.go rename to power/models/host_group_list.go index bdcc2bb3..617cb02d 100644 --- a/power/models/hostgroup_list.go +++ b/power/models/host_group_list.go @@ -14,13 +14,13 @@ import ( "github.com/go-openapi/swag" ) -// HostgroupList hostgroup list +// HostGroupList host group list // -// swagger:model HostgroupList -type HostgroupList []*Hostgroup +// swagger:model HostGroupList +type HostGroupList []*HostGroup -// Validate validates this hostgroup list -func (m HostgroupList) Validate(formats strfmt.Registry) error { +// Validate validates this host group list +func (m HostGroupList) Validate(formats strfmt.Registry) error { var res []error for i := 0; i < len(m); i++ { @@ -47,8 +47,8 @@ func (m HostgroupList) Validate(formats strfmt.Registry) error { return nil } -// ContextValidate validate this hostgroup list based on the context it is used -func (m HostgroupList) ContextValidate(ctx context.Context, formats strfmt.Registry) error { +// ContextValidate validate this host group list based on the context it is used +func (m HostGroupList) ContextValidate(ctx context.Context, formats strfmt.Registry) error { var res []error for i := 0; i < len(m); i++ { diff --git a/power/models/hostgroup_share_op.go b/power/models/host_group_share_op.go similarity index 72% rename from power/models/hostgroup_share_op.go rename to power/models/host_group_share_op.go index ebd3fd75..f90d9d17 100644 --- a/power/models/hostgroup_share_op.go +++ b/power/models/host_group_share_op.go @@ -14,20 +14,20 @@ import ( "github.com/go-openapi/swag" ) -// HostgroupShareOp Operation updating the sharing status (mutually exclusive) +// HostGroupShareOp Operation updating the sharing status (mutually exclusive) // -// swagger:model HostgroupShareOp -type HostgroupShareOp struct { +// swagger:model HostGroupShareOp +type HostGroupShareOp struct { - // List of workspace names to share the hostgroup with + // List of workspaces to share the host group with Add []*Secondary `json:"add"` - // A workspace name to stop sharing the hostgroup with + // A workspace ID to stop sharing the host group with Remove string `json:"remove,omitempty"` } -// Validate validates this hostgroup share op -func (m *HostgroupShareOp) Validate(formats strfmt.Registry) error { +// Validate validates this host group share op +func (m *HostGroupShareOp) Validate(formats strfmt.Registry) error { var res []error if err := m.validateAdd(formats); err != nil { @@ -40,7 +40,7 @@ func (m *HostgroupShareOp) Validate(formats strfmt.Registry) error { return nil } -func (m *HostgroupShareOp) validateAdd(formats strfmt.Registry) error { +func (m *HostGroupShareOp) validateAdd(formats strfmt.Registry) error { if swag.IsZero(m.Add) { // not required return nil } @@ -66,8 +66,8 @@ func (m *HostgroupShareOp) validateAdd(formats strfmt.Registry) error { return nil } -// ContextValidate validate this hostgroup share op based on the context it is used -func (m *HostgroupShareOp) ContextValidate(ctx context.Context, formats strfmt.Registry) error { +// ContextValidate validate this host group share op based on the context it is used +func (m *HostGroupShareOp) ContextValidate(ctx context.Context, formats strfmt.Registry) error { var res []error if err := m.contextValidateAdd(ctx, formats); err != nil { @@ -80,7 +80,7 @@ func (m *HostgroupShareOp) ContextValidate(ctx context.Context, formats strfmt.R return nil } -func (m *HostgroupShareOp) contextValidateAdd(ctx context.Context, formats strfmt.Registry) error { +func (m *HostGroupShareOp) contextValidateAdd(ctx context.Context, formats strfmt.Registry) error { for i := 0; i < len(m.Add); i++ { @@ -106,7 +106,7 @@ func (m *HostgroupShareOp) contextValidateAdd(ctx context.Context, formats strfm } // MarshalBinary interface implementation -func (m *HostgroupShareOp) MarshalBinary() ([]byte, error) { +func (m *HostGroupShareOp) MarshalBinary() ([]byte, error) { if m == nil { return nil, nil } @@ -114,8 +114,8 @@ func (m *HostgroupShareOp) MarshalBinary() ([]byte, error) { } // UnmarshalBinary interface implementation -func (m *HostgroupShareOp) UnmarshalBinary(b []byte) error { - var res HostgroupShareOp +func (m *HostGroupShareOp) UnmarshalBinary(b []byte) error { + var res HostGroupShareOp if err := swag.ReadJSON(b, &res); err != nil { return err } diff --git a/power/models/host_group_summary.go b/power/models/host_group_summary.go new file mode 100644 index 00000000..f4c345ed --- /dev/null +++ b/power/models/host_group_summary.go @@ -0,0 +1,56 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// HostGroupSummary host group summary +// +// swagger:model HostGroupSummary +type HostGroupSummary struct { + + // Whether the host group is a primary or secondary host group + Access string `json:"access,omitempty"` + + // Link to the host group resource + Href string `json:"href,omitempty"` + + // Name of the host group + Name string `json:"name,omitempty"` +} + +// Validate validates this host group summary +func (m *HostGroupSummary) Validate(formats strfmt.Registry) error { + return nil +} + +// ContextValidate validates this host group summary based on context it is used +func (m *HostGroupSummary) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *HostGroupSummary) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *HostGroupSummary) UnmarshalBinary(b []byte) error { + var res HostGroupSummary + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/power/models/host_resource_capacity.go b/power/models/host_resource_capacity.go new file mode 100644 index 00000000..6f1943e7 --- /dev/null +++ b/power/models/host_resource_capacity.go @@ -0,0 +1,122 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// HostResourceCapacity host resource capacity +// +// swagger:model HostResourceCapacity +type HostResourceCapacity struct { + + // available + // Required: true + Available *float64 `json:"available"` + + // reserved + // Required: true + Reserved *float64 `json:"reserved"` + + // total + // Required: true + Total *float64 `json:"total"` + + // used + // Required: true + Used *float64 `json:"used"` +} + +// Validate validates this host resource capacity +func (m *HostResourceCapacity) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateAvailable(formats); err != nil { + res = append(res, err) + } + + if err := m.validateReserved(formats); err != nil { + res = append(res, err) + } + + if err := m.validateTotal(formats); err != nil { + res = append(res, err) + } + + if err := m.validateUsed(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *HostResourceCapacity) validateAvailable(formats strfmt.Registry) error { + + if err := validate.Required("available", "body", m.Available); err != nil { + return err + } + + return nil +} + +func (m *HostResourceCapacity) validateReserved(formats strfmt.Registry) error { + + if err := validate.Required("reserved", "body", m.Reserved); err != nil { + return err + } + + return nil +} + +func (m *HostResourceCapacity) validateTotal(formats strfmt.Registry) error { + + if err := validate.Required("total", "body", m.Total); err != nil { + return err + } + + return nil +} + +func (m *HostResourceCapacity) validateUsed(formats strfmt.Registry) error { + + if err := validate.Required("used", "body", m.Used); err != nil { + return err + } + + return nil +} + +// ContextValidate validates this host resource capacity based on context it is used +func (m *HostResourceCapacity) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *HostResourceCapacity) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *HostResourceCapacity) UnmarshalBinary(b []byte) error { + var res HostResourceCapacity + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/power/models/hostgroup_href.go b/power/models/hostgroup_href.go deleted file mode 100644 index 2733f00f..00000000 --- a/power/models/hostgroup_href.go +++ /dev/null @@ -1,27 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/strfmt" -) - -// HostgroupHref Link to hostgroup resource -// -// swagger:model HostgroupHref -type HostgroupHref string - -// Validate validates this hostgroup href -func (m HostgroupHref) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this hostgroup href based on context it is used -func (m HostgroupHref) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} diff --git a/power/models/i_k_e_policy.go b/power/models/i_k_e_policy.go index 4a101ecf..b1464ef1 100644 --- a/power/models/i_k_e_policy.go +++ b/power/models/i_k_e_policy.go @@ -27,13 +27,13 @@ type IKEPolicy struct { // DH group of the IKE Policy // Example: 2 // Required: true - // Enum: [1 2 5 14 19 20 24] + // Enum: [1,2,5,14,19,20,24] DhGroup *int64 `json:"dhGroup"` // encryption of the IKE Policy // Example: aes-256-cbc // Required: true - // Enum: [aes-256-cbc aes-192-cbc aes-128-cbc aes-256-gcm aes-128-gcm 3des-cbc] + // Enum: ["aes-256-cbc","aes-192-cbc","aes-128-cbc","aes-256-gcm","aes-128-gcm","3des-cbc"] Encryption *string `json:"encryption"` // unique identifier of the IKE Policy object @@ -53,7 +53,7 @@ type IKEPolicy struct { // version of the IKE Policy // Example: 2 // Required: true - // Enum: [1 2] + // Enum: [1,2] Version *int64 `json:"version"` } diff --git a/power/models/i_k_e_policy_create.go b/power/models/i_k_e_policy_create.go index 39757af5..0f663cb5 100644 --- a/power/models/i_k_e_policy_create.go +++ b/power/models/i_k_e_policy_create.go @@ -26,13 +26,13 @@ type IKEPolicyCreate struct { // DH group of the IKE Policy // Example: 2 // Required: true - // Enum: [1 2 5 14 19 20 24] + // Enum: [1,2,5,14,19,20,24] DhGroup *int64 `json:"dhGroup"` // encryption of the IKE Policy // Example: aes-256-cbc // Required: true - // Enum: [aes-256-cbc aes-192-cbc aes-128-cbc aes-256-gcm aes-128-gcm 3des-cbc] + // Enum: ["aes-256-cbc","aes-192-cbc","aes-128-cbc","aes-256-gcm","aes-128-gcm","3des-cbc"] Encryption *string `json:"encryption"` // key lifetime @@ -53,7 +53,7 @@ type IKEPolicyCreate struct { // version of the IKE Policy // Example: 2 // Required: true - // Enum: [1 2] + // Enum: [1,2] Version *int64 `json:"version"` } diff --git a/power/models/i_k_e_policy_update.go b/power/models/i_k_e_policy_update.go index e8d42411..2bb87db9 100644 --- a/power/models/i_k_e_policy_update.go +++ b/power/models/i_k_e_policy_update.go @@ -17,7 +17,7 @@ import ( // IKEPolicyUpdate IKE Policy object used for update // -// Min Properties: 1 +// MinProperties: 1 // // swagger:model IKEPolicyUpdate type IKEPolicyUpdate struct { @@ -27,12 +27,12 @@ type IKEPolicyUpdate struct { // DH group of the IKE Policy // Example: 2 - // Enum: [1 2 5 14 19 20 24] + // Enum: [1,2,5,14,19,20,24] DhGroup int64 `json:"dhGroup,omitempty"` // encryption of the IKE Policy // Example: aes-256-cbc - // Enum: [aes-256-cbc aes-192-cbc aes-128-cbc aes-256-gcm aes-128-gcm 3des-cbc] + // Enum: ["aes-256-cbc","aes-192-cbc","aes-128-cbc","aes-256-gcm","aes-128-gcm","3des-cbc"] Encryption string `json:"encryption,omitempty"` // key lifetime @@ -49,7 +49,7 @@ type IKEPolicyUpdate struct { // version of the IKE Policy // Example: 2 - // Enum: [1 2] + // Enum: [1,2] Version int64 `json:"version,omitempty"` // i k e policy update additional properties @@ -66,12 +66,12 @@ func (m *IKEPolicyUpdate) UnmarshalJSON(data []byte) error { // DH group of the IKE Policy // Example: 2 - // Enum: [1 2 5 14 19 20 24] + // Enum: [1,2,5,14,19,20,24] DhGroup int64 `json:"dhGroup,omitempty"` // encryption of the IKE Policy // Example: aes-256-cbc - // Enum: [aes-256-cbc aes-192-cbc aes-128-cbc aes-256-gcm aes-128-gcm 3des-cbc] + // Enum: ["aes-256-cbc","aes-192-cbc","aes-128-cbc","aes-256-gcm","aes-128-gcm","3des-cbc"] Encryption string `json:"encryption,omitempty"` // key lifetime @@ -88,7 +88,7 @@ func (m *IKEPolicyUpdate) UnmarshalJSON(data []byte) error { // version of the IKE Policy // Example: 2 - // Enum: [1 2] + // Enum: [1,2] Version int64 `json:"version,omitempty"` } if err := json.Unmarshal(data, &stage1); err != nil { @@ -143,12 +143,12 @@ func (m IKEPolicyUpdate) MarshalJSON() ([]byte, error) { // DH group of the IKE Policy // Example: 2 - // Enum: [1 2 5 14 19 20 24] + // Enum: [1,2,5,14,19,20,24] DhGroup int64 `json:"dhGroup,omitempty"` // encryption of the IKE Policy // Example: aes-256-cbc - // Enum: [aes-256-cbc aes-192-cbc aes-128-cbc aes-256-gcm aes-128-gcm 3des-cbc] + // Enum: ["aes-256-cbc","aes-192-cbc","aes-128-cbc","aes-256-gcm","aes-128-gcm","3des-cbc"] Encryption string `json:"encryption,omitempty"` // key lifetime @@ -165,7 +165,7 @@ func (m IKEPolicyUpdate) MarshalJSON() ([]byte, error) { // version of the IKE Policy // Example: 2 - // Enum: [1 2] + // Enum: [1,2] Version int64 `json:"version,omitempty"` } diff --git a/power/models/image_import_details.go b/power/models/image_import_details.go new file mode 100644 index 00000000..4fc18548 --- /dev/null +++ b/power/models/image_import_details.go @@ -0,0 +1,205 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "encoding/json" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// ImageImportDetails image import details +// +// swagger:model ImageImportDetails +type ImageImportDetails struct { + + // Origin of the license of the product + // Required: true + // Enum: ["byol"] + LicenseType *string `json:"licenseType"` + + // Product within the image + // Required: true + // Enum: ["Hana","Netweaver"] + Product *string `json:"product"` + + // Vendor supporting the product + // Required: true + // Enum: ["SAP"] + Vendor *string `json:"vendor"` +} + +// Validate validates this image import details +func (m *ImageImportDetails) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateLicenseType(formats); err != nil { + res = append(res, err) + } + + if err := m.validateProduct(formats); err != nil { + res = append(res, err) + } + + if err := m.validateVendor(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +var imageImportDetailsTypeLicenseTypePropEnum []interface{} + +func init() { + var res []string + if err := json.Unmarshal([]byte(`["byol"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + imageImportDetailsTypeLicenseTypePropEnum = append(imageImportDetailsTypeLicenseTypePropEnum, v) + } +} + +const ( + + // ImageImportDetailsLicenseTypeByol captures enum value "byol" + ImageImportDetailsLicenseTypeByol string = "byol" +) + +// prop value enum +func (m *ImageImportDetails) validateLicenseTypeEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, imageImportDetailsTypeLicenseTypePropEnum, true); err != nil { + return err + } + return nil +} + +func (m *ImageImportDetails) validateLicenseType(formats strfmt.Registry) error { + + if err := validate.Required("licenseType", "body", m.LicenseType); err != nil { + return err + } + + // value enum + if err := m.validateLicenseTypeEnum("licenseType", "body", *m.LicenseType); err != nil { + return err + } + + return nil +} + +var imageImportDetailsTypeProductPropEnum []interface{} + +func init() { + var res []string + if err := json.Unmarshal([]byte(`["Hana","Netweaver"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + imageImportDetailsTypeProductPropEnum = append(imageImportDetailsTypeProductPropEnum, v) + } +} + +const ( + + // ImageImportDetailsProductHana captures enum value "Hana" + ImageImportDetailsProductHana string = "Hana" + + // ImageImportDetailsProductNetweaver captures enum value "Netweaver" + ImageImportDetailsProductNetweaver string = "Netweaver" +) + +// prop value enum +func (m *ImageImportDetails) validateProductEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, imageImportDetailsTypeProductPropEnum, true); err != nil { + return err + } + return nil +} + +func (m *ImageImportDetails) validateProduct(formats strfmt.Registry) error { + + if err := validate.Required("product", "body", m.Product); err != nil { + return err + } + + // value enum + if err := m.validateProductEnum("product", "body", *m.Product); err != nil { + return err + } + + return nil +} + +var imageImportDetailsTypeVendorPropEnum []interface{} + +func init() { + var res []string + if err := json.Unmarshal([]byte(`["SAP"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + imageImportDetailsTypeVendorPropEnum = append(imageImportDetailsTypeVendorPropEnum, v) + } +} + +const ( + + // ImageImportDetailsVendorSAP captures enum value "SAP" + ImageImportDetailsVendorSAP string = "SAP" +) + +// prop value enum +func (m *ImageImportDetails) validateVendorEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, imageImportDetailsTypeVendorPropEnum, true); err != nil { + return err + } + return nil +} + +func (m *ImageImportDetails) validateVendor(formats strfmt.Registry) error { + + if err := validate.Required("vendor", "body", m.Vendor); err != nil { + return err + } + + // value enum + if err := m.validateVendorEnum("vendor", "body", *m.Vendor); err != nil { + return err + } + + return nil +} + +// ContextValidate validates this image import details based on context it is used +func (m *ImageImportDetails) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *ImageImportDetails) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *ImageImportDetails) UnmarshalBinary(b []byte) error { + var res ImageImportDetails + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/power/models/ip_sec_policy.go b/power/models/ip_sec_policy.go index d2e62f42..67e87daa 100644 --- a/power/models/ip_sec_policy.go +++ b/power/models/ip_sec_policy.go @@ -27,13 +27,13 @@ type IPSecPolicy struct { // Diffie-Hellman group // Example: 2 // Required: true - // Enum: [1 2 5 14 19 20 24] + // Enum: [1,2,5,14,19,20,24] DhGroup *int64 `json:"dhGroup"` // connection encryption policy // Example: aes-256-cbc // Required: true - // Enum: [aes-256-cbc aes-192-cbc aes-128-cbc aes-256-gcm aes-192-gcm aes-128-gcm 3des-cbc] + // Enum: ["aes-256-cbc","aes-192-cbc","aes-128-cbc","aes-256-gcm","aes-192-gcm","aes-128-gcm","3des-cbc"] Encryption *string `json:"encryption"` // unique identifier of the IPSec Policy diff --git a/power/models/ip_sec_policy_create.go b/power/models/ip_sec_policy_create.go index b46a3812..d64e5945 100644 --- a/power/models/ip_sec_policy_create.go +++ b/power/models/ip_sec_policy_create.go @@ -26,13 +26,13 @@ type IPSecPolicyCreate struct { // Diffie-Hellman group // Example: 2 // Required: true - // Enum: [1 2 5 14 19 20 24] + // Enum: [1,2,5,14,19,20,24] DhGroup *int64 `json:"dhGroup"` // connection encryption policy // Example: aes-256-cbc // Required: true - // Enum: [aes-256-cbc aes-192-cbc aes-128-cbc aes-256-gcm aes-192-gcm aes-128-gcm 3des-cbc] + // Enum: ["aes-256-cbc","aes-192-cbc","aes-128-cbc","aes-256-gcm","aes-192-gcm","aes-128-gcm","3des-cbc"] Encryption *string `json:"encryption"` // key lifetime diff --git a/power/models/ip_sec_policy_update.go b/power/models/ip_sec_policy_update.go index f753650c..b795c162 100644 --- a/power/models/ip_sec_policy_update.go +++ b/power/models/ip_sec_policy_update.go @@ -17,7 +17,7 @@ import ( // IPSecPolicyUpdate IPSEc Policy object used for update // -// Min Properties: 1 +// MinProperties: 1 // // swagger:model IPSecPolicyUpdate type IPSecPolicyUpdate struct { @@ -27,12 +27,12 @@ type IPSecPolicyUpdate struct { // Diffie-Hellman group // Example: 2 - // Enum: [1 2 5 14 19 20 24] + // Enum: [1,2,5,14,19,20,24] DhGroup int64 `json:"dhGroup,omitempty"` // connection encryption policy // Example: aes-256-cbc - // Enum: [aes-256-cbc aes-192-cbc aes-128-cbc aes-256-gcm aes-192-gcm aes-128-gcm 3des-cbc] + // Enum: ["aes-256-cbc","aes-192-cbc","aes-128-cbc","aes-256-gcm","aes-192-gcm","aes-128-gcm","3des-cbc"] Encryption string `json:"encryption,omitempty"` // key lifetime @@ -62,12 +62,12 @@ func (m *IPSecPolicyUpdate) UnmarshalJSON(data []byte) error { // Diffie-Hellman group // Example: 2 - // Enum: [1 2 5 14 19 20 24] + // Enum: [1,2,5,14,19,20,24] DhGroup int64 `json:"dhGroup,omitempty"` // connection encryption policy // Example: aes-256-cbc - // Enum: [aes-256-cbc aes-192-cbc aes-128-cbc aes-256-gcm aes-192-gcm aes-128-gcm 3des-cbc] + // Enum: ["aes-256-cbc","aes-192-cbc","aes-128-cbc","aes-256-gcm","aes-192-gcm","aes-128-gcm","3des-cbc"] Encryption string `json:"encryption,omitempty"` // key lifetime @@ -133,12 +133,12 @@ func (m IPSecPolicyUpdate) MarshalJSON() ([]byte, error) { // Diffie-Hellman group // Example: 2 - // Enum: [1 2 5 14 19 20 24] + // Enum: [1,2,5,14,19,20,24] DhGroup int64 `json:"dhGroup,omitempty"` // connection encryption policy // Example: aes-256-cbc - // Enum: [aes-256-cbc aes-192-cbc aes-128-cbc aes-256-gcm aes-192-gcm aes-128-gcm 3des-cbc] + // Enum: ["aes-256-cbc","aes-192-cbc","aes-128-cbc","aes-256-gcm","aes-192-gcm","aes-128-gcm","3des-cbc"] Encryption string `json:"encryption,omitempty"` // key lifetime diff --git a/power/models/last_operation_resource.go b/power/models/last_operation_resource.go index 37596b72..166044db 100644 --- a/power/models/last_operation_resource.go +++ b/power/models/last_operation_resource.go @@ -25,7 +25,7 @@ type LastOperationResource struct { // state // Required: true - // Enum: [in progress succeeded failed] + // Enum: ["in progress","succeeded","failed"] State *string `json:"state"` } diff --git a/power/models/multi_volumes_create.go b/power/models/multi_volumes_create.go index 5e5ae0cf..28ce2b24 100644 --- a/power/models/multi_volumes_create.go +++ b/power/models/multi_volumes_create.go @@ -24,7 +24,7 @@ type MultiVolumesCreate struct { AffinityPVMInstance *string `json:"affinityPVMInstance,omitempty"` // Affinity policy for data volume being created; ignored if volumePool provided; for policy 'affinity' requires one of affinityPVMInstance or affinityVolume to be specified; for policy 'anti-affinity' requires one of antiAffinityPVMInstances or antiAffinityVolumes to be specified - // Enum: [affinity anti-affinity] + // Enum: ["affinity","anti-affinity"] AffinityPolicy *string `json:"affinityPolicy,omitempty"` // Volume (ID or Name) to base volume affinity policy against; required if requesting affinity and affinityPVMInstance is not provided @@ -49,6 +49,9 @@ type MultiVolumesCreate struct { // Indicates if the volume should be replication enabled or not ReplicationEnabled *bool `json:"replicationEnabled,omitempty"` + // List of replication sites for volume replication + ReplicationSite []string `json:"replicationSite,omitempty"` + // Indicates if the volume is shareable between VMs Shareable *bool `json:"shareable,omitempty"` diff --git a/power/models/network.go b/power/models/network.go index 512aa941..848f5280 100644 --- a/power/models/network.go +++ b/power/models/network.go @@ -70,7 +70,7 @@ type Network struct { // Type of Network - 'vlan' (private network) 'pub-vlan' (public network) 'dhcp-vlan' (for satellite locations only) // Required: true - // Enum: [vlan pub-vlan dhcp-vlan] + // Enum: ["vlan","pub-vlan","dhcp-vlan"] Type *string `json:"type"` // VLAN ID diff --git a/power/models/network_create.go b/power/models/network_create.go index f320776e..093cbaa0 100644 --- a/power/models/network_create.go +++ b/power/models/network_create.go @@ -50,7 +50,7 @@ type NetworkCreate struct { // Type of Network - 'vlan' (private network) 'pub-vlan' (public network) 'dhcp-vlan' (for satellite locations only) // Required: true - // Enum: [vlan pub-vlan dhcp-vlan] + // Enum: ["vlan","pub-vlan","dhcp-vlan"] Type *string `json:"type"` } diff --git a/power/models/network_reference.go b/power/models/network_reference.go index 40563314..f4e765c6 100644 --- a/power/models/network_reference.go +++ b/power/models/network_reference.go @@ -48,7 +48,7 @@ type NetworkReference struct { // Type of Network - 'vlan' (private network) 'pub-vlan' (public network) 'dhcp-vlan' (for satellite locations only) // Required: true - // Enum: [vlan pub-vlan dhcp-vlan] + // Enum: ["vlan","pub-vlan","dhcp-vlan"] Type *string `json:"type"` // VLAN ID diff --git a/power/models/operations.go b/power/models/operations.go index 4c2d8b08..66c44c0f 100644 --- a/power/models/operations.go +++ b/power/models/operations.go @@ -21,15 +21,15 @@ import ( type Operations struct { // Name of the server boot mode a(Boot from disk using copy A), b(Boot from disk using copy B), c(Reserved for IBM lab use only), d(Boot from media/drives) - // Enum: [a b c d] + // Enum: ["a","b","c","d"] BootMode string `json:"bootMode,omitempty"` // Name of the server operating mode - // Enum: [normal manual] + // Enum: ["normal","manual"] OperatingMode string `json:"operatingMode,omitempty"` // Name of the job task to execute - // Enum: [dston retrydump consoleservice iopreset remotedstoff remotedston iopdump dumprestart] + // Enum: ["dston","retrydump","consoleservice","iopreset","remotedstoff","remotedston","iopdump","dumprestart"] Task string `json:"task,omitempty"` } diff --git a/power/models/p_vm_instance.go b/power/models/p_vm_instance.go index 1e968079..525c15d6 100644 --- a/power/models/p_vm_instance.go +++ b/power/models/p_vm_instance.go @@ -95,7 +95,7 @@ type PVMInstance struct { // Processor type (dedicated, shared, capped) // Required: true - // Enum: [dedicated shared capped ] + // Enum: ["dedicated","shared","capped",""] ProcType *string `json:"procType"` // Number of processors allocated @@ -148,6 +148,9 @@ type PVMInstance struct { // System type used to host the instance SysType string `json:"sysType,omitempty"` + // Represents the task state of a virtual machine (VM). + TaskState string `json:"taskState,omitempty"` + // Date/Time of PVM last update // Format: date-time UpdatedDate strfmt.DateTime `json:"updatedDate,omitempty"` diff --git a/power/models/p_vm_instance_action.go b/power/models/p_vm_instance_action.go index ee89da8e..582f52a5 100644 --- a/power/models/p_vm_instance_action.go +++ b/power/models/p_vm_instance_action.go @@ -22,7 +22,7 @@ type PVMInstanceAction struct { // Name of the action to take; can be start, stop, hard-reboot, soft-reboot, immediate-shutdown, reset-state, dhcp-ip-sync (on-prem only) // Required: true - // Enum: [start stop immediate-shutdown hard-reboot soft-reboot reset-state dhcp-ip-sync] + // Enum: ["start","stop","immediate-shutdown","hard-reboot","soft-reboot","reset-state","dhcp-ip-sync"] Action *string `json:"action"` } diff --git a/power/models/p_vm_instance_address.go b/power/models/p_vm_instance_address.go index 2e7ad6b9..48dee66d 100644 --- a/power/models/p_vm_instance_address.go +++ b/power/models/p_vm_instance_address.go @@ -46,6 +46,16 @@ func (m PVMInstanceAddress) MarshalJSON() ([]byte, error) { // Validate validates this p VM instance address func (m *PVMInstanceAddress) Validate(formats strfmt.Registry) error { + var res []error + + // validation for a type composition with PVMInstanceNetwork + if err := m.PVMInstanceNetwork.Validate(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } return nil } diff --git a/power/models/p_vm_instance_capture.go b/power/models/p_vm_instance_capture.go index 7f925c28..1f0976d1 100644 --- a/power/models/p_vm_instance_capture.go +++ b/power/models/p_vm_instance_capture.go @@ -22,7 +22,7 @@ type PVMInstanceCapture struct { // Destination for the deployable image // Required: true - // Enum: [image-catalog cloud-storage both] + // Enum: ["image-catalog","cloud-storage","both"] CaptureDestination *string `json:"captureDestination"` // Name of the deployable image created for the captured PVMInstance @@ -32,6 +32,9 @@ type PVMInstanceCapture struct { // List of Data volume IDs to include in the captured PVMInstance CaptureVolumeIDs []string `json:"captureVolumeIDs"` + // Create a checksum file + Checksum bool `json:"checksum,omitempty"` + // Cloud Storage Access key CloudStorageAccessKey string `json:"cloudStorageAccessKey,omitempty"` diff --git a/power/models/p_vm_instance_clone.go b/power/models/p_vm_instance_clone.go index 6604fcf8..b1bbd983 100644 --- a/power/models/p_vm_instance_clone.go +++ b/power/models/p_vm_instance_clone.go @@ -36,7 +36,7 @@ type PVMInstanceClone struct { Networks []*PVMInstanceAddNetwork `json:"networks"` // Processor type (dedicated, shared, capped) - // Enum: [dedicated shared capped] + // Enum: ["dedicated","shared","capped"] ProcType *string `json:"procType,omitempty"` // Number of processors allocated diff --git a/power/models/p_vm_instance_create.go b/power/models/p_vm_instance_create.go index 013a094c..c8ec2702 100644 --- a/power/models/p_vm_instance_create.go +++ b/power/models/p_vm_instance_create.go @@ -21,8 +21,8 @@ import ( // swagger:model PVMInstanceCreate type PVMInstanceCreate struct { - // The name of the host or hostgroup where to deploy the VM - DeployTarget string `json:"deployTarget,omitempty"` + // The deployment of a dedicated host + DeploymentTarget *DeploymentTarget `json:"deploymentTarget,omitempty"` // The custom deployment type DeploymentType string `json:"deploymentType,omitempty"` @@ -58,7 +58,7 @@ type PVMInstanceCreate struct { // Processor type (dedicated, shared, capped) // Required: true - // Enum: [dedicated shared capped] + // Enum: ["dedicated","shared","capped"] ProcType *string `json:"procType"` // Number of processors allocated @@ -66,11 +66,11 @@ type PVMInstanceCreate struct { Processors *float64 `json:"processors"` // Affinity policy for replicants being created; affinity for the same host, anti-affinity for different hosts, none for no preference - // Enum: [affinity anti-affinity none] + // Enum: ["affinity","anti-affinity","none"] ReplicantAffinityPolicy *string `json:"replicantAffinityPolicy,omitempty"` // How to name the created vms - // Enum: [prefix suffix] + // Enum: ["prefix","suffix"] ReplicantNamingScheme *string `json:"replicantNamingScheme,omitempty"` // Number of duplicate instances to create in this request @@ -90,23 +90,26 @@ type PVMInstanceCreate struct { StorageAffinity *StorageAffinity `json:"storageAffinity,omitempty"` // The storage connection type - // Enum: [vSCSI] + // Enum: ["vSCSI","maxVolumeSupport"] StorageConnection string `json:"storageConnection,omitempty"` // The storage connection type - // Enum: [vSCSI maxVolumeSupport] + // Enum: ["vSCSI","maxVolumeSupport"] StorageConnectionV2 string `json:"storageConnectionV2,omitempty"` // Storage Pool for server deployment; if provided then storageAffinity will be ignored; Only valid when you deploy one of the IBM supplied stock images. Storage pool for a custom image (an imported image or an image that is created from a PVMInstance capture) defaults to the storage pool the image was created in StoragePool string `json:"storagePool,omitempty"` + // Indicates if all volumes attached to the server must reside in the same storage pool; If set to false then volumes from any storage type and pool can be attached to the PVMInstance; Impacts PVMInstance snapshot, capture, and clone, for capture and clone - only data volumes that are of the same storage type and in the same storage pool of the PVMInstance's boot volume can be included; for snapshot - all data volumes to be included in the snapshot must reside in the same storage type and pool. Once set to false, cannot be set back to true unless all volumes attached reside in the same storage type and pool. + StoragePoolAffinity *bool `json:"storagePoolAffinity,omitempty"` + // Storage type for server deployment; if storageType is not provided the storage type will default to 'tier3'. StorageType string `json:"storageType,omitempty"` // System type used to host the instance SysType string `json:"sysType,omitempty"` - // Cloud init user defined data + // Cloud init user defined data; For FLS, only cloud-config instance-data is supported and data must not be compressed or exceed 63K UserData string `json:"userData,omitempty"` // The pvm instance virtual CPU information @@ -120,6 +123,10 @@ type PVMInstanceCreate struct { func (m *PVMInstanceCreate) Validate(formats strfmt.Registry) error { var res []error + if err := m.validateDeploymentTarget(formats); err != nil { + res = append(res, err) + } + if err := m.validateImageID(formats); err != nil { res = append(res, err) } @@ -182,6 +189,25 @@ func (m *PVMInstanceCreate) Validate(formats strfmt.Registry) error { return nil } +func (m *PVMInstanceCreate) validateDeploymentTarget(formats strfmt.Registry) error { + if swag.IsZero(m.DeploymentTarget) { // not required + return nil + } + + if m.DeploymentTarget != nil { + if err := m.DeploymentTarget.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("deploymentTarget") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("deploymentTarget") + } + return err + } + } + + return nil +} + func (m *PVMInstanceCreate) validateImageID(formats strfmt.Registry) error { if err := validate.Required("imageID", "body", m.ImageID); err != nil { @@ -436,7 +462,7 @@ var pVmInstanceCreateTypeStorageConnectionPropEnum []interface{} func init() { var res []string - if err := json.Unmarshal([]byte(`["vSCSI"]`), &res); err != nil { + if err := json.Unmarshal([]byte(`["vSCSI","maxVolumeSupport"]`), &res); err != nil { panic(err) } for _, v := range res { @@ -448,6 +474,9 @@ const ( // PVMInstanceCreateStorageConnectionVSCSI captures enum value "vSCSI" PVMInstanceCreateStorageConnectionVSCSI string = "vSCSI" + + // PVMInstanceCreateStorageConnectionMaxVolumeSupport captures enum value "maxVolumeSupport" + PVMInstanceCreateStorageConnectionMaxVolumeSupport string = "maxVolumeSupport" ) // prop value enum @@ -536,6 +565,10 @@ func (m *PVMInstanceCreate) validateVirtualCores(formats strfmt.Registry) error func (m *PVMInstanceCreate) ContextValidate(ctx context.Context, formats strfmt.Registry) error { var res []error + if err := m.contextValidateDeploymentTarget(ctx, formats); err != nil { + res = append(res, err) + } + if err := m.contextValidateNetworks(ctx, formats); err != nil { res = append(res, err) } @@ -562,6 +595,27 @@ func (m *PVMInstanceCreate) ContextValidate(ctx context.Context, formats strfmt. return nil } +func (m *PVMInstanceCreate) contextValidateDeploymentTarget(ctx context.Context, formats strfmt.Registry) error { + + if m.DeploymentTarget != nil { + + if swag.IsZero(m.DeploymentTarget) { // not required + return nil + } + + if err := m.DeploymentTarget.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("deploymentTarget") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("deploymentTarget") + } + return err + } + } + + return nil +} + func (m *PVMInstanceCreate) contextValidateNetworks(ctx context.Context, formats strfmt.Registry) error { for i := 0; i < len(m.Networks); i++ { diff --git a/power/models/p_vm_instance_multi_create.go b/power/models/p_vm_instance_multi_create.go index 682af222..7df1b2e6 100644 --- a/power/models/p_vm_instance_multi_create.go +++ b/power/models/p_vm_instance_multi_create.go @@ -21,14 +21,14 @@ import ( type PVMInstanceMultiCreate struct { // Affinity policy for pvm-instances being created; affinity for the same host, anti-affinity for different hosts, none for no preference - // Enum: [affinity anti-affinity none] + // Enum: ["affinity","anti-affinity","none"] AffinityPolicy *string `json:"affinityPolicy,omitempty"` // Number of pvm-instances to create Count int64 `json:"count,omitempty"` // Where to place the numerical number of the multi-created instance - // Enum: [prefix suffix] + // Enum: ["prefix","suffix"] Numerical *string `json:"numerical,omitempty"` } diff --git a/power/models/p_vm_instance_operation.go b/power/models/p_vm_instance_operation.go index 37c18f85..88a38dfb 100644 --- a/power/models/p_vm_instance_operation.go +++ b/power/models/p_vm_instance_operation.go @@ -26,7 +26,7 @@ type PVMInstanceOperation struct { // Name of the operation to execute; can be job or boot // Required: true - // Enum: [job boot] + // Enum: ["job","boot"] OperationType *string `json:"operationType"` } diff --git a/power/models/p_vm_instance_reference.go b/power/models/p_vm_instance_reference.go index 94b236f8..54e5d7b1 100644 --- a/power/models/p_vm_instance_reference.go +++ b/power/models/p_vm_instance_reference.go @@ -89,7 +89,7 @@ type PVMInstanceReference struct { // Processor type (dedicated, shared, capped) // Required: true - // Enum: [dedicated shared capped] + // Enum: ["dedicated","shared","capped"] ProcType *string `json:"procType"` // Number of processors allocated @@ -141,6 +141,9 @@ type PVMInstanceReference struct { // System type used to host the instance SysType string `json:"sysType,omitempty"` + // Represents the task state of a virtual machine (VM). + TaskState string `json:"taskState,omitempty"` + // Date/Time of PVM last update // Format: date-time UpdatedDate strfmt.DateTime `json:"updatedDate,omitempty"` diff --git a/power/models/p_vm_instance_update.go b/power/models/p_vm_instance_update.go index 4fb843f6..56e06295 100644 --- a/power/models/p_vm_instance_update.go +++ b/power/models/p_vm_instance_update.go @@ -36,7 +36,7 @@ type PVMInstanceUpdate struct { PinPolicy PinPolicy `json:"pinPolicy,omitempty"` // Processor type (dedicated, shared, capped) - // Enum: [dedicated shared capped] + // Enum: ["dedicated","shared","capped"] ProcType string `json:"procType,omitempty"` // Number of processors allocated diff --git a/power/models/p_vm_instance_update_response.go b/power/models/p_vm_instance_update_response.go index 1c8e9a76..21176e39 100644 --- a/power/models/p_vm_instance_update_response.go +++ b/power/models/p_vm_instance_update_response.go @@ -30,7 +30,7 @@ type PVMInstanceUpdateResponse struct { PinPolicy PinPolicy `json:"pinPolicy,omitempty"` // Processor type (dedicated, shared, capped) - // Enum: [dedicated shared capped] + // Enum: ["dedicated","shared","capped"] ProcType string `json:"procType,omitempty"` // Number of processors allocated @@ -41,6 +41,12 @@ type PVMInstanceUpdateResponse struct { // URL to check for status of the operation (for now, just the URL for the GET on the server, which has status information from powervc) StatusURL string `json:"statusUrl,omitempty"` + + // Indicates if all volumes attached to the server must reside in the same storage pool; If set to false then volumes from any storage type and pool can be attached to the PVMInstance; Impacts PVMInstance snapshot, capture, and clone, for capture and clone - only data volumes that are of the same storage type and in the same storage pool of the PVMInstance's boot volume can be included; for snapshot - all data volumes to be included in the snapshot must reside in the same storage type and pool. Once set to false, cannot be set back to true unless all volumes attached reside in the same storage type and pool. + StoragePoolAffinity *bool `json:"storagePoolAffinity,omitempty"` + + // The pvm instance virtual CPU information + VirtualCores *VirtualCores `json:"virtualCores,omitempty"` } // Validate validates this p VM instance update response @@ -55,6 +61,10 @@ func (m *PVMInstanceUpdateResponse) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := m.validateVirtualCores(formats); err != nil { + res = append(res, err) + } + if len(res) > 0 { return errors.CompositeValidationError(res...) } @@ -123,6 +133,25 @@ func (m *PVMInstanceUpdateResponse) validateProcType(formats strfmt.Registry) er return nil } +func (m *PVMInstanceUpdateResponse) validateVirtualCores(formats strfmt.Registry) error { + if swag.IsZero(m.VirtualCores) { // not required + return nil + } + + if m.VirtualCores != nil { + if err := m.VirtualCores.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("virtualCores") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("virtualCores") + } + return err + } + } + + return nil +} + // ContextValidate validate this p VM instance update response based on the context it is used func (m *PVMInstanceUpdateResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error { var res []error @@ -131,6 +160,10 @@ func (m *PVMInstanceUpdateResponse) ContextValidate(ctx context.Context, formats res = append(res, err) } + if err := m.contextValidateVirtualCores(ctx, formats); err != nil { + res = append(res, err) + } + if len(res) > 0 { return errors.CompositeValidationError(res...) } @@ -155,6 +188,27 @@ func (m *PVMInstanceUpdateResponse) contextValidatePinPolicy(ctx context.Context return nil } +func (m *PVMInstanceUpdateResponse) contextValidateVirtualCores(ctx context.Context, formats strfmt.Registry) error { + + if m.VirtualCores != nil { + + if swag.IsZero(m.VirtualCores) { // not required + return nil + } + + if err := m.VirtualCores.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("virtualCores") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("virtualCores") + } + return err + } + } + + return nil +} + // MarshalBinary interface implementation func (m *PVMInstanceUpdateResponse) MarshalBinary() ([]byte, error) { if m == nil { diff --git a/power/models/p_vm_instance_v2_network_port.go b/power/models/p_vm_instance_v2_network_port.go index dc5bacb4..840f0d50 100644 --- a/power/models/p_vm_instance_v2_network_port.go +++ b/power/models/p_vm_instance_v2_network_port.go @@ -24,7 +24,7 @@ type PVMInstanceV2NetworkPort struct { ID string `json:"id,omitempty"` // Dynamic Host Configuration Protocol {IPv4, IPv6} - // Enum: [IPv4 IPv6] + // Enum: ["IPv4","IPv6"] IPProtocol string `json:"ipProtocol,omitempty"` // The mac address of the network interface @@ -34,7 +34,7 @@ type PVMInstanceV2NetworkPort struct { PrivateIP string `json:"privateIP,omitempty"` // The type of ip allocation {dhcp, static} - // Enum: [dhcp static] + // Enum: ["dhcp","static"] Type string `json:"type,omitempty"` } diff --git a/power/models/placement_group.go b/power/models/placement_group.go index 31661603..bd3cf515 100644 --- a/power/models/placement_group.go +++ b/power/models/placement_group.go @@ -34,7 +34,7 @@ type PlacementGroup struct { // The Placement Group Policy // Required: true - // Enum: [affinity anti-affinity] + // Enum: ["affinity","anti-affinity"] Policy *string `json:"policy"` } diff --git a/power/models/placement_group_create.go b/power/models/placement_group_create.go index 2fd3d083..9c3a804e 100644 --- a/power/models/placement_group_create.go +++ b/power/models/placement_group_create.go @@ -26,7 +26,7 @@ type PlacementGroupCreate struct { // The Placement Group Policy // Required: true - // Enum: [affinity anti-affinity] + // Enum: ["affinity","anti-affinity"] Policy *string `json:"policy"` } diff --git a/power/models/power_edge_router_action.go b/power/models/power_edge_router_action.go new file mode 100644 index 00000000..428c4ef4 --- /dev/null +++ b/power/models/power_edge_router_action.go @@ -0,0 +1,107 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "encoding/json" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// PowerEdgeRouterAction power edge router action +// +// swagger:model PowerEdgeRouterAction +type PowerEdgeRouterAction struct { + + // Name of the action to take; can be migrate-start, migrate-validate + // Required: true + // Enum: ["migrate-start","migrate-validate"] + Action *string `json:"action"` +} + +// Validate validates this power edge router action +func (m *PowerEdgeRouterAction) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateAction(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +var powerEdgeRouterActionTypeActionPropEnum []interface{} + +func init() { + var res []string + if err := json.Unmarshal([]byte(`["migrate-start","migrate-validate"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + powerEdgeRouterActionTypeActionPropEnum = append(powerEdgeRouterActionTypeActionPropEnum, v) + } +} + +const ( + + // PowerEdgeRouterActionActionMigrateDashStart captures enum value "migrate-start" + PowerEdgeRouterActionActionMigrateDashStart string = "migrate-start" + + // PowerEdgeRouterActionActionMigrateDashValidate captures enum value "migrate-validate" + PowerEdgeRouterActionActionMigrateDashValidate string = "migrate-validate" +) + +// prop value enum +func (m *PowerEdgeRouterAction) validateActionEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, powerEdgeRouterActionTypeActionPropEnum, true); err != nil { + return err + } + return nil +} + +func (m *PowerEdgeRouterAction) validateAction(formats strfmt.Registry) error { + + if err := validate.Required("action", "body", m.Action); err != nil { + return err + } + + // value enum + if err := m.validateActionEnum("action", "body", *m.Action); err != nil { + return err + } + + return nil +} + +// ContextValidate validates this power edge router action based on context it is used +func (m *PowerEdgeRouterAction) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *PowerEdgeRouterAction) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *PowerEdgeRouterAction) UnmarshalBinary(b []byte) error { + var res PowerEdgeRouterAction + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/power/models/pvm_instance_deployment.go b/power/models/pvm_instance_deployment.go index e3be7bea..24a38568 100644 --- a/power/models/pvm_instance_deployment.go +++ b/power/models/pvm_instance_deployment.go @@ -28,7 +28,7 @@ type PvmInstanceDeployment struct { // Processor mode (dedicated, shared, capped) // Required: true - // Enum: [dedicated shared capped] + // Enum: ["dedicated","shared","capped"] ProcessorMode *string `json:"processorMode"` // Type of Deployment [SAP-RISE, EPIC] diff --git a/power/models/s_a_p_create.go b/power/models/s_a_p_create.go index e16ee442..36187301 100644 --- a/power/models/s_a_p_create.go +++ b/power/models/s_a_p_create.go @@ -20,6 +20,9 @@ import ( // swagger:model SAPCreate type SAPCreate struct { + // The deployment of a dedicated host + DeploymentTarget *DeploymentTarget `json:"deploymentTarget,omitempty"` + // Custom SAP Deployment Type Information (For Internal Use Only) DeploymentType string `json:"deploymentType,omitempty"` @@ -63,7 +66,7 @@ type SAPCreate struct { // System type used to host the instance. Only e880, e980, e1080 are supported SysType string `json:"sysType,omitempty"` - // Cloud init user defined data + // Cloud init user defined data; For FLS, only cloud-config instance-data is supported and data must not be compressed or exceed 63K UserData string `json:"userData,omitempty"` // List of Volume IDs to attach to the pvm-instance on creation @@ -74,6 +77,10 @@ type SAPCreate struct { func (m *SAPCreate) Validate(formats strfmt.Registry) error { var res []error + if err := m.validateDeploymentTarget(formats); err != nil { + res = append(res, err) + } + if err := m.validateImageID(formats); err != nil { res = append(res, err) } @@ -108,6 +115,25 @@ func (m *SAPCreate) Validate(formats strfmt.Registry) error { return nil } +func (m *SAPCreate) validateDeploymentTarget(formats strfmt.Registry) error { + if swag.IsZero(m.DeploymentTarget) { // not required + return nil + } + + if m.DeploymentTarget != nil { + if err := m.DeploymentTarget.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("deploymentTarget") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("deploymentTarget") + } + return err + } + } + + return nil +} + func (m *SAPCreate) validateImageID(formats strfmt.Registry) error { if err := validate.Required("imageID", "body", m.ImageID); err != nil { @@ -221,6 +247,10 @@ func (m *SAPCreate) validateStorageAffinity(formats strfmt.Registry) error { func (m *SAPCreate) ContextValidate(ctx context.Context, formats strfmt.Registry) error { var res []error + if err := m.contextValidateDeploymentTarget(ctx, formats); err != nil { + res = append(res, err) + } + if err := m.contextValidateInstances(ctx, formats); err != nil { res = append(res, err) } @@ -243,6 +273,27 @@ func (m *SAPCreate) ContextValidate(ctx context.Context, formats strfmt.Registry return nil } +func (m *SAPCreate) contextValidateDeploymentTarget(ctx context.Context, formats strfmt.Registry) error { + + if m.DeploymentTarget != nil { + + if swag.IsZero(m.DeploymentTarget) { // not required + return nil + } + + if err := m.DeploymentTarget.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("deploymentTarget") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("deploymentTarget") + } + return err + } + } + + return nil +} + func (m *SAPCreate) contextValidateInstances(ctx context.Context, formats strfmt.Registry) error { if m.Instances != nil { diff --git a/power/models/s_a_p_profile.go b/power/models/s_a_p_profile.go index 73096fa6..86d688a2 100644 --- a/power/models/s_a_p_profile.go +++ b/power/models/s_a_p_profile.go @@ -28,6 +28,9 @@ type SAPProfile struct { // Required: true Cores *int64 `json:"cores"` + // Requires full system for deployment + FullSystemProfile bool `json:"fullSystemProfile"` + // Amount of memory (in GB) // Required: true Memory *int64 `json:"memory"` @@ -36,10 +39,23 @@ type SAPProfile struct { // Required: true ProfileID *string `json:"profileID"` + // SAP Application Performance Standard + Saps int64 `json:"saps"` + + // Required smt mode for that profile + // Enum: [4,8] + SmtMode int64 `json:"smtMode"` + + // List of supported systems + SupportedSystems []string `json:"supportedSystems"` + // Type of profile // Required: true - // Enum: [balanced compute memory non-production ultra-memory] + // Enum: ["balanced","compute","memory","non-production","ultra-memory","small","SAP Rise Optimized"] Type *string `json:"type"` + + // List of supported workload types + WorkloadTypes []string `json:"workloadTypes"` } // Validate validates this s a p profile @@ -62,6 +78,10 @@ func (m *SAPProfile) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := m.validateSmtMode(formats); err != nil { + res = append(res, err) + } + if err := m.validateType(formats); err != nil { res = append(res, err) } @@ -108,11 +128,44 @@ func (m *SAPProfile) validateProfileID(formats strfmt.Registry) error { return nil } +var sAPProfileTypeSmtModePropEnum []interface{} + +func init() { + var res []int64 + if err := json.Unmarshal([]byte(`[4,8]`), &res); err != nil { + panic(err) + } + for _, v := range res { + sAPProfileTypeSmtModePropEnum = append(sAPProfileTypeSmtModePropEnum, v) + } +} + +// prop value enum +func (m *SAPProfile) validateSmtModeEnum(path, location string, value int64) error { + if err := validate.EnumCase(path, location, value, sAPProfileTypeSmtModePropEnum, true); err != nil { + return err + } + return nil +} + +func (m *SAPProfile) validateSmtMode(formats strfmt.Registry) error { + if swag.IsZero(m.SmtMode) { // not required + return nil + } + + // value enum + if err := m.validateSmtModeEnum("smtMode", "body", m.SmtMode); err != nil { + return err + } + + return nil +} + var sAPProfileTypeTypePropEnum []interface{} func init() { var res []string - if err := json.Unmarshal([]byte(`["balanced","compute","memory","non-production","ultra-memory"]`), &res); err != nil { + if err := json.Unmarshal([]byte(`["balanced","compute","memory","non-production","ultra-memory","small","SAP Rise Optimized"]`), &res); err != nil { panic(err) } for _, v := range res { @@ -136,6 +189,12 @@ const ( // SAPProfileTypeUltraDashMemory captures enum value "ultra-memory" SAPProfileTypeUltraDashMemory string = "ultra-memory" + + // SAPProfileTypeSmall captures enum value "small" + SAPProfileTypeSmall string = "small" + + // SAPProfileTypeSAPRiseOptimized captures enum value "SAP Rise Optimized" + SAPProfileTypeSAPRiseOptimized string = "SAP Rise Optimized" ) // prop value enum diff --git a/power/models/s_p_p_placement_group_create.go b/power/models/s_p_p_placement_group_create.go index 9bc09ffc..acf4c06d 100644 --- a/power/models/s_p_p_placement_group_create.go +++ b/power/models/s_p_p_placement_group_create.go @@ -26,7 +26,7 @@ type SPPPlacementGroupCreate struct { // The placement group policy // Required: true - // Enum: [affinity anti-affinity] + // Enum: ["affinity","anti-affinity"] Policy *string `json:"policy"` } diff --git a/power/models/secondary.go b/power/models/secondary.go index 11c37f88..a312c5ea 100644 --- a/power/models/secondary.go +++ b/power/models/secondary.go @@ -14,15 +14,15 @@ import ( "github.com/go-openapi/validate" ) -// Secondary Information to create a secondary hostgroup +// Secondary Information to create a secondary host group // // swagger:model Secondary type Secondary struct { - // Name of the hostgroup to create in the secondary workspace + // Name of the host group to create in the secondary workspace Name string `json:"name,omitempty"` - // Name of the workspace to share the hostgroup with + // ID of the workspace to share the host group with // Required: true Workspace *string `json:"workspace"` } diff --git a/power/models/service_binding_volume_mount.go b/power/models/service_binding_volume_mount.go index 96b1ac78..e95edd18 100644 --- a/power/models/service_binding_volume_mount.go +++ b/power/models/service_binding_volume_mount.go @@ -30,7 +30,7 @@ type ServiceBindingVolumeMount struct { // device type // Required: true - // Enum: [shared] + // Enum: ["shared"] DeviceType *string `json:"device_type"` // driver @@ -39,7 +39,7 @@ type ServiceBindingVolumeMount struct { // mode // Required: true - // Enum: [r rw] + // Enum: ["r","rw"] Mode *string `json:"mode"` } diff --git a/power/models/shared_processor_pool_create.go b/power/models/shared_processor_pool_create.go index 6818e700..a951586a 100644 --- a/power/models/shared_processor_pool_create.go +++ b/power/models/shared_processor_pool_create.go @@ -23,6 +23,9 @@ type SharedProcessorPoolCreate struct { // Required: true HostGroup *string `json:"hostGroup"` + // The host id of a host in a host group (only available for dedicated hosts) + HostID string `json:"hostID,omitempty"` + // The name of the Shared Processor Pool; minumum of 2 characters, maximum of 12, the only special character allowed is the underscore '_'. // Required: true Name *string `json:"name"` diff --git a/power/models/shared_processor_pool_server.go b/power/models/shared_processor_pool_server.go index 87e4b461..87a1dcab 100644 --- a/power/models/shared_processor_pool_server.go +++ b/power/models/shared_processor_pool_server.go @@ -18,7 +18,7 @@ import ( type SharedProcessorPoolServer struct { // The amount of cpus for the server - Cpus int64 `json:"Cpus,omitempty"` + Cpus float64 `json:"Cpus,omitempty"` // Identifies if uncapped or not Uncapped bool `json:"Uncapped,omitempty"` @@ -39,7 +39,7 @@ type SharedProcessorPoolServer struct { Status string `json:"status,omitempty"` // The amout of vcpus for the server - Vcpus float64 `json:"vcpus,omitempty"` + Vcpus int64 `json:"vcpus,omitempty"` } // Validate validates this shared processor pool server diff --git a/power/models/shared_processor_pool_update.go b/power/models/shared_processor_pool_update.go index 2c5fb901..56ba68d7 100644 --- a/power/models/shared_processor_pool_update.go +++ b/power/models/shared_processor_pool_update.go @@ -21,7 +21,7 @@ type SharedProcessorPoolUpdate struct { Name string `json:"name,omitempty"` // The amount of reserved processor cores for the Shared Processor Pool; only integers allowed, no fractional values; the amount can be increased (dependent on available resources) or decreased (dependent on currently allocated resources) - ReservedCores int64 `json:"reservedCores,omitempty"` + ReservedCores *int64 `json:"reservedCores,omitempty"` } // Validate validates this shared processor pool update diff --git a/power/models/site.go b/power/models/site.go index e6523f50..2a9caa29 100644 --- a/power/models/site.go +++ b/power/models/site.go @@ -7,7 +7,9 @@ package models import ( "context" + "strconv" + "github.com/go-openapi/errors" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" ) @@ -17,6 +19,9 @@ import ( // swagger:model Site type Site struct { + // replication pool map + ReplicationPoolMap []*StoragePoolMap `json:"ReplicationPoolMap,omitempty"` + // true if location is active , otherwise it is false IsActive bool `json:"isActive,omitempty"` @@ -26,11 +31,80 @@ type Site struct { // Validate validates this site func (m *Site) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateReplicationPoolMap(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *Site) validateReplicationPoolMap(formats strfmt.Registry) error { + if swag.IsZero(m.ReplicationPoolMap) { // not required + return nil + } + + for i := 0; i < len(m.ReplicationPoolMap); i++ { + if swag.IsZero(m.ReplicationPoolMap[i]) { // not required + continue + } + + if m.ReplicationPoolMap[i] != nil { + if err := m.ReplicationPoolMap[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("ReplicationPoolMap" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("ReplicationPoolMap" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + return nil } -// ContextValidate validates this site based on context it is used +// ContextValidate validate this site based on the context it is used func (m *Site) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateReplicationPoolMap(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *Site) contextValidateReplicationPoolMap(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.ReplicationPoolMap); i++ { + + if m.ReplicationPoolMap[i] != nil { + + if swag.IsZero(m.ReplicationPoolMap[i]) { // not required + return nil + } + + if err := m.ReplicationPoolMap[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("ReplicationPoolMap" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("ReplicationPoolMap" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + return nil } diff --git a/power/models/snapshot_list.go b/power/models/snapshot_list.go new file mode 100644 index 00000000..a1e6fd10 --- /dev/null +++ b/power/models/snapshot_list.go @@ -0,0 +1,124 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// SnapshotList snapshot list +// +// swagger:model SnapshotList +type SnapshotList struct { + + // The list of snapshots. + // Required: true + Snapshots []*SnapshotV1 `json:"snapshots"` +} + +// Validate validates this snapshot list +func (m *SnapshotList) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateSnapshots(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *SnapshotList) validateSnapshots(formats strfmt.Registry) error { + + if err := validate.Required("snapshots", "body", m.Snapshots); err != nil { + return err + } + + for i := 0; i < len(m.Snapshots); i++ { + if swag.IsZero(m.Snapshots[i]) { // not required + continue + } + + if m.Snapshots[i] != nil { + if err := m.Snapshots[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("snapshots" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("snapshots" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// ContextValidate validate this snapshot list based on the context it is used +func (m *SnapshotList) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateSnapshots(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *SnapshotList) contextValidateSnapshots(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Snapshots); i++ { + + if m.Snapshots[i] != nil { + + if swag.IsZero(m.Snapshots[i]) { // not required + return nil + } + + if err := m.Snapshots[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("snapshots" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("snapshots" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *SnapshotList) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *SnapshotList) UnmarshalBinary(b []byte) error { + var res SnapshotList + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/power/models/snapshot_v1.go b/power/models/snapshot_v1.go new file mode 100644 index 00000000..2974fef6 --- /dev/null +++ b/power/models/snapshot_v1.go @@ -0,0 +1,179 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// SnapshotV1 snapshot v1 +// +// swagger:model SnapshotV1 +type SnapshotV1 struct { + + // The date and time when the snapshot was created. + // Format: date-time + CreationDate strfmt.DateTime `json:"creationDate,omitempty"` + + // The snapshot UUID. + // Required: true + ID *string `json:"id"` + + // The snapshot name. + // Required: true + Name *string `json:"name"` + + // The size of the snapshot, in gibibytes (GiB). + // Required: true + Size *float64 `json:"size"` + + // The status for the snapshot. + // Required: true + Status *string `json:"status"` + + // The date and time when the snapshot was last updated. + // Format: date-time + UpdatedDate strfmt.DateTime `json:"updatedDate,omitempty"` + + // The volume UUID associated with the snapshot. + // Required: true + VolumeID *string `json:"volumeID"` +} + +// Validate validates this snapshot v1 +func (m *SnapshotV1) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateCreationDate(formats); err != nil { + res = append(res, err) + } + + if err := m.validateID(formats); err != nil { + res = append(res, err) + } + + if err := m.validateName(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSize(formats); err != nil { + res = append(res, err) + } + + if err := m.validateStatus(formats); err != nil { + res = append(res, err) + } + + if err := m.validateUpdatedDate(formats); err != nil { + res = append(res, err) + } + + if err := m.validateVolumeID(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *SnapshotV1) validateCreationDate(formats strfmt.Registry) error { + if swag.IsZero(m.CreationDate) { // not required + return nil + } + + if err := validate.FormatOf("creationDate", "body", "date-time", m.CreationDate.String(), formats); err != nil { + return err + } + + return nil +} + +func (m *SnapshotV1) validateID(formats strfmt.Registry) error { + + if err := validate.Required("id", "body", m.ID); err != nil { + return err + } + + return nil +} + +func (m *SnapshotV1) validateName(formats strfmt.Registry) error { + + if err := validate.Required("name", "body", m.Name); err != nil { + return err + } + + return nil +} + +func (m *SnapshotV1) validateSize(formats strfmt.Registry) error { + + if err := validate.Required("size", "body", m.Size); err != nil { + return err + } + + return nil +} + +func (m *SnapshotV1) validateStatus(formats strfmt.Registry) error { + + if err := validate.Required("status", "body", m.Status); err != nil { + return err + } + + return nil +} + +func (m *SnapshotV1) validateUpdatedDate(formats strfmt.Registry) error { + if swag.IsZero(m.UpdatedDate) { // not required + return nil + } + + if err := validate.FormatOf("updatedDate", "body", "date-time", m.UpdatedDate.String(), formats); err != nil { + return err + } + + return nil +} + +func (m *SnapshotV1) validateVolumeID(formats strfmt.Registry) error { + + if err := validate.Required("volumeID", "body", m.VolumeID); err != nil { + return err + } + + return nil +} + +// ContextValidate validates this snapshot v1 based on context it is used +func (m *SnapshotV1) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *SnapshotV1) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *SnapshotV1) UnmarshalBinary(b []byte) error { + var res SnapshotV1 + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/power/models/storage_affinity.go b/power/models/storage_affinity.go index 071b9891..49ea8ed6 100644 --- a/power/models/storage_affinity.go +++ b/power/models/storage_affinity.go @@ -24,7 +24,7 @@ type StorageAffinity struct { AffinityPVMInstance *string `json:"affinityPVMInstance,omitempty"` // Affinity policy for storage pool selection; ignored if storagePool provided; for policy 'affinity' requires one of affinityPVMInstance or affinityVolume to be specified; for policy 'anti-affinity' requires one of antiAffinityPVMInstances or antiAffinityVolumes to be specified - // Enum: [affinity anti-affinity] + // Enum: ["affinity","anti-affinity"] AffinityPolicy *string `json:"affinityPolicy,omitempty"` // Volume (ID or Name) to base storage affinity policy against; required if requesting storage affinity and affinityPVMInstance is not provided diff --git a/power/models/storage_pool.go b/power/models/storage_pool.go index 2689e790..3f70d6a3 100644 --- a/power/models/storage_pool.go +++ b/power/models/storage_pool.go @@ -37,7 +37,7 @@ type StoragePool struct { // state of storage pool // Required: true - // Enum: [closed opened] + // Enum: ["closed","opened"] State *string `json:"state"` // type of storage pool diff --git a/power/models/storage_pool_map.go b/power/models/storage_pool_map.go new file mode 100644 index 00000000..d42b5209 --- /dev/null +++ b/power/models/storage_pool_map.go @@ -0,0 +1,53 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// StoragePoolMap storage pool map +// +// swagger:model StoragePoolMap +type StoragePoolMap struct { + + // remote pool + RemotePool string `json:"remotePool,omitempty"` + + // volume pool + VolumePool string `json:"volumePool,omitempty"` +} + +// Validate validates this storage pool map +func (m *StoragePoolMap) Validate(formats strfmt.Registry) error { + return nil +} + +// ContextValidate validates this storage pool map based on context it is used +func (m *StoragePoolMap) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *StoragePoolMap) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *StoragePoolMap) UnmarshalBinary(b []byte) error { + var res StoragePoolMap + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/power/models/storage_tier.go b/power/models/storage_tier.go index ae6990bb..16531848 100644 --- a/power/models/storage_tier.go +++ b/power/models/storage_tier.go @@ -27,7 +27,7 @@ type StorageTier struct { Name string `json:"name,omitempty"` // State of the storage tier (active or inactive) - // Enum: [active inactive] + // Enum: ["active","inactive"] State *string `json:"state,omitempty"` } diff --git a/power/models/storage_type.go b/power/models/storage_type.go index 4af1f895..79b41647 100644 --- a/power/models/storage_type.go +++ b/power/models/storage_type.go @@ -27,7 +27,7 @@ type StorageType struct { Description string `json:"description,omitempty"` // State of the storage type (active or inactive) - // Enum: [active inactive] + // Enum: ["active","inactive"] State *string `json:"state,omitempty"` // Storage type diff --git a/power/models/token_request.go b/power/models/token_request.go index a136c5ce..a6801a13 100644 --- a/power/models/token_request.go +++ b/power/models/token_request.go @@ -26,7 +26,7 @@ type TokenRequest struct { // Source type of the token request (web or cli) // Required: true - // Enum: [web cli] + // Enum: ["web","cli"] Source *string `json:"source"` } diff --git a/power/models/transit_gateway_location.go b/power/models/transit_gateway_location.go index 98e5e393..766183b6 100644 --- a/power/models/transit_gateway_location.go +++ b/power/models/transit_gateway_location.go @@ -28,7 +28,7 @@ type TransitGatewayLocation struct { // Location Type of the PowerVS Service // Example: data-center // Required: true - // Enum: [region data-center zone] + // Enum: ["region","data-center","zone"] LocationType *string `json:"locationType"` // The PowerVS Location URL path to access specific service instance information diff --git a/power/models/update_storage_pool.go b/power/models/update_storage_pool.go index 288e2d3c..cdb59e49 100644 --- a/power/models/update_storage_pool.go +++ b/power/models/update_storage_pool.go @@ -30,7 +30,7 @@ type UpdateStoragePool struct { OverrideThresholds *Thresholds `json:"overrideThresholds,omitempty"` // state of storage pool - // Enum: [closed opened] + // Enum: ["closed","opened"] State *string `json:"state,omitempty"` } diff --git a/power/models/v_p_n_connection.go b/power/models/v_p_n_connection.go index cdc7c00e..cafa6591 100644 --- a/power/models/v_p_n_connection.go +++ b/power/models/v_p_n_connection.go @@ -45,7 +45,7 @@ type VPNConnection struct { // Mode used by this VPNConnection, either policy-based, or route-based, this attribute is set at the creation and cannot be updated later. // Example: policy // Required: true - // Enum: [policy route] + // Enum: ["policy","route"] Mode *string `json:"mode"` // VPN Connection name @@ -69,7 +69,7 @@ type VPNConnection struct { // status of the VPN connection // Required: true - // Enum: [active warning disabled] + // Enum: ["active","warning","disabled"] Status *string `json:"status"` // public IP address of the VPN Gateway (vSRX) attached to this VPNConnection diff --git a/power/models/v_p_n_connection_create.go b/power/models/v_p_n_connection_create.go index 3e6fe175..81738285 100644 --- a/power/models/v_p_n_connection_create.go +++ b/power/models/v_p_n_connection_create.go @@ -33,7 +33,7 @@ type VPNConnectionCreate struct { // Mode used by this VPNConnection, either policy-based, or route-based, this attribute is set at the creation and cannot be updated later. // Example: policy // Required: true - // Enum: [policy route] + // Enum: ["policy","route"] Mode *string `json:"mode"` // VPN Connection name diff --git a/power/models/v_p_n_connection_update.go b/power/models/v_p_n_connection_update.go index 455d705f..5fe68e01 100644 --- a/power/models/v_p_n_connection_update.go +++ b/power/models/v_p_n_connection_update.go @@ -16,7 +16,7 @@ import ( // VPNConnectionUpdate VPN Connection object to send during the update // -// Min Properties: 1 +// MinProperties: 1 // // swagger:model VPNConnectionUpdate type VPNConnectionUpdate struct { diff --git a/power/models/volume.go b/power/models/volume.go index a547d52f..97e5ca8b 100644 --- a/power/models/volume.go +++ b/power/models/volume.go @@ -71,7 +71,7 @@ type Volume struct { OutOfBandDeleted bool `json:"outOfBandDeleted,omitempty"` // indicates whether master/aux volume is playing the primary role - // Enum: [master aux] + // Enum: ["master","aux"] PrimaryRole string `json:"primaryRole,omitempty"` // List of PCloud PVM Instance attached to the volume @@ -80,6 +80,9 @@ type Volume struct { // True if volume is replication enabled otherwise false ReplicationEnabled *bool `json:"replicationEnabled,omitempty"` + // List of replication sites for volume replication + ReplicationSite []string `json:"replicationSite,omitempty"` + // Replication status of a volume ReplicationStatus string `json:"replicationStatus,omitempty"` diff --git a/power/models/volume_group_action.go b/power/models/volume_group_action.go index 937960a0..9da802f0 100644 --- a/power/models/volume_group_action.go +++ b/power/models/volume_group_action.go @@ -16,8 +16,8 @@ import ( // VolumeGroupAction Performs an action (start stop reset ) on a volume group(one at a time). // -// Min Properties: 1 -// Max Properties: 1 +// MinProperties: 1 +// MaxProperties: 1 // // swagger:model VolumeGroupAction type VolumeGroupAction struct { diff --git a/power/models/volume_group_action_reset.go b/power/models/volume_group_action_reset.go index 6a108ff7..1e5bb0ac 100644 --- a/power/models/volume_group_action_reset.go +++ b/power/models/volume_group_action_reset.go @@ -22,7 +22,7 @@ type VolumeGroupActionReset struct { // New status to be set for a volume group // Required: true - // Enum: [available] + // Enum: ["available"] Status *string `json:"status"` } diff --git a/power/models/volume_group_action_start.go b/power/models/volume_group_action_start.go index 8a445a15..fe500653 100644 --- a/power/models/volume_group_action_start.go +++ b/power/models/volume_group_action_start.go @@ -22,7 +22,7 @@ type VolumeGroupActionStart struct { // Indicates the source of the action // Required: true - // Enum: [master aux] + // Enum: ["master","aux"] Source *string `json:"source"` } diff --git a/power/models/volume_reference.go b/power/models/volume_reference.go index fe2c483b..1998307a 100644 --- a/power/models/volume_reference.go +++ b/power/models/volume_reference.go @@ -77,7 +77,7 @@ type VolumeReference struct { OutOfBandDeleted bool `json:"outOfBandDeleted,omitempty"` // indicates whether master/aux volume is playing the primary role - // Enum: [master aux] + // Enum: ["master","aux"] PrimaryRole string `json:"primaryRole,omitempty"` // List of PCloud PVM Instance attached to the volume @@ -86,6 +86,9 @@ type VolumeReference struct { // True if volume is replication enabled otherwise false ReplicationEnabled *bool `json:"replicationEnabled,omitempty"` + // List of replication sites for volume replication + ReplicationSite []string `json:"replicationSite,omitempty"` + // shows the replication status of a volume ReplicationStatus string `json:"replicationStatus,omitempty"` diff --git a/power/models/volumes_clone_async_request.go b/power/models/volumes_clone_async_request.go index 7c4628c2..1b0993a1 100644 --- a/power/models/volumes_clone_async_request.go +++ b/power/models/volumes_clone_async_request.go @@ -26,6 +26,7 @@ type VolumesCloneAsyncRequest struct { // Example volume names using name="volume-abcdef" // single volume clone will be named "clone-volume-abcdef-83081" // multi volume clone will be named "clone-volume-abcdef-73721-1", "clone-volume-abcdef-73721-2", ... + // For multiple volume clone, the provided name will be truncated to the first 20 characters. // // Required: true Name *string `json:"name"` diff --git a/power/models/volumes_clone_execute.go b/power/models/volumes_clone_execute.go index 1d880001..b470cb78 100644 --- a/power/models/volumes_clone_execute.go +++ b/power/models/volumes_clone_execute.go @@ -26,6 +26,7 @@ type VolumesCloneExecute struct { // Example volume names using name="volume-abcdef" // single volume clone will be named "clone-volume-abcdef-83081" // multi volume clone will be named "clone-volume-abcdef-73721-1", "clone-volume-abcdef-73721-2", ... + // For multiple volume clone, the provided name will be truncated to the first 20 characters. // // Required: true Name *string `json:"name"` diff --git a/power/models/volumes_clone_request.go b/power/models/volumes_clone_request.go index 7ed5f8c5..cb238678 100644 --- a/power/models/volumes_clone_request.go +++ b/power/models/volumes_clone_request.go @@ -25,6 +25,7 @@ type VolumesCloneRequest struct { // Example volume names using displayName="volume-abcdef" // single volume clone will be named "clone-volume-abcdef" // multi volume clone will be named "clone-volume-abcdef-1", "clone-volume-abcdef-2", ... + // For multiple volume clone, the provided name will be truncated to the first 20 characters. // // Required: true DisplayName *string `json:"displayName"` diff --git a/power/models/workspace.go b/power/models/workspace.go index 6cc54bab..89fdc4dc 100644 --- a/power/models/workspace.go +++ b/power/models/workspace.go @@ -46,7 +46,7 @@ type Workspace struct { // The Workspace type // Required: true - // Enum: [off-premises on-premises] + // Enum: ["off-premises","on-premises"] Type *string `json:"type"` } diff --git a/power/models/workspace_power_edge_router_details.go b/power/models/workspace_power_edge_router_details.go index 26bc396b..60509fb7 100644 --- a/power/models/workspace_power_edge_router_details.go +++ b/power/models/workspace_power_edge_router_details.go @@ -21,17 +21,17 @@ import ( type WorkspacePowerEdgeRouterDetails struct { // The migration status of a Power Edge Router - // Enum: [intializing migrating deleted completed] + // Enum: ["intializing","migrating","deleted","completed"] MigrationStatus string `json:"migrationStatus,omitempty"` // The state of a Power Edge Router // Required: true - // Enum: [active error warning configuring removing inactive] + // Enum: ["active","error","warning","configuring","removing","inactive","user-validation"] State *string `json:"state"` // The Power Edge Router type // Required: true - // Enum: [automated manual] + // Enum: ["automated","manual"] Type *string `json:"type"` } @@ -109,7 +109,7 @@ var workspacePowerEdgeRouterDetailsTypeStatePropEnum []interface{} func init() { var res []string - if err := json.Unmarshal([]byte(`["active","error","warning","configuring","removing","inactive"]`), &res); err != nil { + if err := json.Unmarshal([]byte(`["active","error","warning","configuring","removing","inactive","user-validation"]`), &res); err != nil { panic(err) } for _, v := range res { @@ -136,6 +136,9 @@ const ( // WorkspacePowerEdgeRouterDetailsStateInactive captures enum value "inactive" WorkspacePowerEdgeRouterDetailsStateInactive string = "inactive" + + // WorkspacePowerEdgeRouterDetailsStateUserDashValidation captures enum value "user-validation" + WorkspacePowerEdgeRouterDetailsStateUserDashValidation string = "user-validation" ) // prop value enum